static List<PathSegment> parse(String path) {
        requireNonNull(path, "path");
        checkArgument(!path.isEmpty(), "path is empty.");

        final Context context = new Context(path);
        checkArgument(context.read() == '/', "path: %s (must start with '/')", context.path());

        final ImmutableList.Builder<PathSegment> segments = ImmutableList.builder();
        // Parse 'Segments' until the start symbol of 'Verb' part.
        // Basically, 'parse*' methods stop reading path characters if they see a delimiter. Also, they don't
        // consume the delimiter so that a caller can check the delimiter.
        segments.addAll(parseSegments(context, new Delimiters(':')));
        if (context.hasNext()) {
            // Consume the start symbol ':'.
            checkArgument(context.read() == ':',
                          "path: %s (invalid verb part at index %s)", context.path(), context.index());
            segments.add(new VerbPathSegment(context.readAll()));
        }

        final List<PathSegment> pathSegments = segments.build();
        checkArgument(!pathSegments.isEmpty(), "path: %s (must contain at least one segment)", context.path());
        return pathSegments;
    }
Parses HTTP API path defined in {@code google.api.http} option.

<p>
Template = "/" Segments [ Verb ]
Verb     = ":" LITERAL
</p>

@see <a href="https://cloud.google.com/endpoints/docs/grpc-service-config/reference/rpc/google.api#path-template-syntax">Path template syntax</a>
grpc/src/main/java/com/linecorp/armeria/server/grpc/HttpJsonTranscodingPathParser.java