public static Set<String> parse(final String grammarFilePath) throws IOException {
        final Set<String> keywords = new LinkedHashSet<>();

        final List<String> lines = Files.readAllLines(Paths.get(grammarFilePath), StandardCharsets.UTF_8);

        for (String line : lines) {
            final Matcher matcher = tokenPattern.matcher(line.trim());
            if (matcher.matches()) {
                // Extract the string representation inside the single quotes
                final String keyword = matcher.group(1);
                keywords.add(keyword);
            }
        }

        return keywords;
    }
Parse a grammar file to extract all keyword string representations.

@param grammarFilePath The path to the ANTLR grammar file
@return A set of keyword string representations
@throws IOException If there's an error reading the file
gremlin-language/src/main/java/org/apache/tinkerpop/gremlin/language/corpus/GrammarReader.java