Copy disabled (too large)
Download .txt
Showing preview only (10,527K chars total). Download the full file to get everything.
Repository: antlr/antlr4
Branch: dev
Commit: 7d5770395bb7
Files: 2263
Total size: 9.6 MB
Directory structure:
gitextract_275zyhbd/
├── .clang-format
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── hosted.yml
├── .gitignore
├── ANTLR-HOUSE-RULES.md
├── CHANGES.txt
├── CONTRIBUTING.md
├── LICENSE.txt
├── Package.swift
├── README.md
├── antlr4-maven-plugin/
│ ├── nb-configuration.xml
│ ├── pom.xml
│ ├── resources/
│ │ └── META-INF/
│ │ └── m2e/
│ │ └── lifecycle-mapping-metadata.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── antlr/
│ │ └── mojo/
│ │ └── antlr4/
│ │ ├── Antlr4ErrorLog.java
│ │ ├── Antlr4Mojo.java
│ │ ├── GrammarDependencies.java
│ │ └── MojoUtils.java
│ ├── site/
│ │ ├── apt/
│ │ │ ├── examples/
│ │ │ │ ├── import.apt
│ │ │ │ ├── libraries.apt.vm
│ │ │ │ └── simple.apt.vm
│ │ │ ├── faq.apt.vm
│ │ │ ├── index.apt
│ │ │ └── usage.apt.vm
│ │ └── site.xml
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── antlr/
│ │ └── mojo/
│ │ └── antlr4/
│ │ └── Antlr4MojoTest.java
│ └── projects/
│ ├── dependencyRemoved/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── imports/
│ │ │ └── HelloBase.g4
│ │ └── test/
│ │ └── Hello.g4
│ ├── importTokens/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── imports/
│ │ │ └── SimpleLexer.tokens
│ │ └── test/
│ │ └── SimpleParser.g4
│ ├── importsCustom/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── Hello.g4
│ │ ├── TestLexer.g4
│ │ ├── TestParser.g4
│ │ └── imports/
│ │ └── TestBaseLexer.g4
│ └── importsStandard/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── antlr4/
│ ├── imports/
│ │ ├── TestBaseLexer.g4
│ │ └── TestBaseLexer2.g4
│ └── test/
│ ├── Hello.g4
│ ├── TestLexer.g4
│ └── TestParser.g4
├── developer-cert-of-origin.txt
├── doc/
│ ├── IDEs.md
│ ├── ace-javascript-target.md
│ ├── actions.md
│ ├── antlr-project-testing.md
│ ├── building-antlr.md
│ ├── cpp-target.md
│ ├── creating-a-language-target.md
│ ├── csharp-target.md
│ ├── dart-target.md
│ ├── faq/
│ │ ├── actions-preds.md
│ │ ├── error-handling.md
│ │ ├── general.md
│ │ ├── getting-started.md
│ │ ├── index.md
│ │ ├── installation.md
│ │ ├── lexical.md
│ │ ├── parse-trees.md
│ │ └── translation.md
│ ├── getting-started.md
│ ├── go-changes.md
│ ├── go-target.md
│ ├── grammars.md
│ ├── index.md
│ ├── interpreters.md
│ ├── java-target.md
│ ├── javascript-target.md
│ ├── left-recursion.md
│ ├── lexer-rules.md
│ ├── lexicon.md
│ ├── listeners.md
│ ├── options.md
│ ├── parser-rules.md
│ ├── parsing-binary-files.md
│ ├── php-target.md
│ ├── predicates.md
│ ├── python-target.md
│ ├── releasing-antlr.md
│ ├── resources.md
│ ├── swift-target.md
│ ├── target-agnostic-grammars.md
│ ├── targets.md
│ ├── tool-options.md
│ ├── tree-matching.md
│ ├── typescript-target.md
│ ├── unicode.md
│ └── wildcard.md
├── docker/
│ ├── .dockerignore
│ ├── Dockerfile
│ └── README.md
├── historical-contributors-agreement.txt
├── pom.xml
├── runtime/
│ ├── CSharp/
│ │ ├── src/
│ │ │ ├── Antlr4.csproj
│ │ │ ├── Antlr4.snk
│ │ │ ├── AntlrFileStream.cs
│ │ │ ├── AntlrInputStream.cs
│ │ │ ├── Atn/
│ │ │ │ ├── ATN.cs
│ │ │ │ ├── ATNConfig.cs
│ │ │ │ ├── ATNConfigSet.cs
│ │ │ │ ├── ATNDeserializationOptions.cs
│ │ │ │ ├── ATNDeserializer.cs
│ │ │ │ ├── ATNSimulator.cs
│ │ │ │ ├── ATNState.cs
│ │ │ │ ├── ATNType.cs
│ │ │ │ ├── AbstractPredicateTransition.cs
│ │ │ │ ├── ActionTransition.cs
│ │ │ │ ├── AmbiguityInfo.cs
│ │ │ │ ├── ArrayPredictionContext.cs
│ │ │ │ ├── AtomTransition.cs
│ │ │ │ ├── BasicBlockStartState.cs
│ │ │ │ ├── BasicState.cs
│ │ │ │ ├── BlockEndState.cs
│ │ │ │ ├── BlockStartState.cs
│ │ │ │ ├── ConflictInfo.cs
│ │ │ │ ├── ContextSensitivityInfo.cs
│ │ │ │ ├── DecisionEventInfo.cs
│ │ │ │ ├── DecisionInfo.cs
│ │ │ │ ├── DecisionState.cs
│ │ │ │ ├── EmptyPredictionContext.cs
│ │ │ │ ├── EpsilonTransition.cs
│ │ │ │ ├── ErrorInfo.cs
│ │ │ │ ├── ILexerAction.cs
│ │ │ │ ├── LL1Analyzer.cs
│ │ │ │ ├── LexerATNConfig.cs
│ │ │ │ ├── LexerATNSimulator.cs
│ │ │ │ ├── LexerActionExecutor.cs
│ │ │ │ ├── LexerActionType.cs
│ │ │ │ ├── LexerChannelAction.cs
│ │ │ │ ├── LexerCustomAction.cs
│ │ │ │ ├── LexerIndexedCustomAction.cs
│ │ │ │ ├── LexerModeAction.cs
│ │ │ │ ├── LexerMoreAction.cs
│ │ │ │ ├── LexerPopModeAction.cs
│ │ │ │ ├── LexerPushModeAction.cs
│ │ │ │ ├── LexerSkipAction.cs
│ │ │ │ ├── LexerTypeAction.cs
│ │ │ │ ├── LookaheadEventInfo.cs
│ │ │ │ ├── LoopEndState.cs
│ │ │ │ ├── MergeCache.cs
│ │ │ │ ├── NotSetTransition.cs
│ │ │ │ ├── ParseInfo.cs
│ │ │ │ ├── ParserATNSimulator.cs
│ │ │ │ ├── PlusBlockStartState.cs
│ │ │ │ ├── PlusLoopbackState.cs
│ │ │ │ ├── PrecedencePredicateTransition.cs
│ │ │ │ ├── PredicateEvalInfo.cs
│ │ │ │ ├── PredicateTransition.cs
│ │ │ │ ├── PredictionContext.cs
│ │ │ │ ├── PredictionContextCache.cs
│ │ │ │ ├── PredictionMode.cs
│ │ │ │ ├── ProfilingATNSimulator.cs
│ │ │ │ ├── RangeTransition.cs
│ │ │ │ ├── RuleStartState.cs
│ │ │ │ ├── RuleStopState.cs
│ │ │ │ ├── RuleTransition.cs
│ │ │ │ ├── SemanticContext.cs
│ │ │ │ ├── SetTransition.cs
│ │ │ │ ├── SimulatorState.cs
│ │ │ │ ├── SingletonPredictionContext.cs
│ │ │ │ ├── StarBlockStartState.cs
│ │ │ │ ├── StarLoopEntryState.cs
│ │ │ │ ├── StarLoopbackState.cs
│ │ │ │ ├── StateType.cs
│ │ │ │ ├── TokensStartState.cs
│ │ │ │ ├── Transition.cs
│ │ │ │ ├── TransitionType.cs
│ │ │ │ └── WildcardTransition.cs
│ │ │ ├── BailErrorStrategy.cs
│ │ │ ├── BaseErrorListener.cs
│ │ │ ├── BufferedTokenStream.cs
│ │ │ ├── CharStreams.cs
│ │ │ ├── CommonToken.cs
│ │ │ ├── CommonTokenFactory.cs
│ │ │ ├── CommonTokenStream.cs
│ │ │ ├── ConsoleErrorListener.cs
│ │ │ ├── DefaultErrorStrategy.cs
│ │ │ ├── Dependents.cs
│ │ │ ├── Dfa/
│ │ │ │ ├── AbstractEdgeMap.cs
│ │ │ │ ├── AcceptStateInfo.cs
│ │ │ │ ├── ArrayEdgeMap.cs
│ │ │ │ ├── DFA.cs
│ │ │ │ ├── DFASerializer.cs
│ │ │ │ ├── DFAState.cs
│ │ │ │ ├── EmptyEdgeMap.cs
│ │ │ │ ├── IEdgeMap.cs
│ │ │ │ ├── LexerDFASerializer.cs
│ │ │ │ ├── SingletonEdgeMap.cs
│ │ │ │ └── SparseEdgeMap.cs
│ │ │ ├── DiagnosticErrorListener.cs
│ │ │ ├── FailedPredicateException.cs
│ │ │ ├── IAntlrErrorListener.cs
│ │ │ ├── IAntlrErrorStrategy.cs
│ │ │ ├── ICharStream.cs
│ │ │ ├── IIntStream.cs
│ │ │ ├── IParserErrorListener.cs
│ │ │ ├── IRecognizer.cs
│ │ │ ├── IToken.cs
│ │ │ ├── ITokenFactory.cs
│ │ │ ├── ITokenSource.cs
│ │ │ ├── ITokenStream.cs
│ │ │ ├── IVocabulary.cs
│ │ │ ├── IWritableToken.cs
│ │ │ ├── InputMismatchException.cs
│ │ │ ├── InterpreterRuleContext.cs
│ │ │ ├── Lexer.cs
│ │ │ ├── LexerInterpreter.cs
│ │ │ ├── LexerNoViableAltException.cs
│ │ │ ├── ListTokenSource.cs
│ │ │ ├── Misc/
│ │ │ │ ├── Args.cs
│ │ │ │ ├── ArrayList.cs
│ │ │ │ ├── IIntSet.cs
│ │ │ │ ├── Interval.cs
│ │ │ │ ├── IntervalSet.cs
│ │ │ │ ├── MultiMap.cs
│ │ │ │ ├── MurmurHash.cs
│ │ │ │ ├── NotNullAttribute.cs
│ │ │ │ ├── NullableAttribute.cs
│ │ │ │ ├── Pair.cs
│ │ │ │ ├── ParseCanceledException.cs
│ │ │ │ ├── RuleDependencyChecker.cs
│ │ │ │ └── Utils.cs
│ │ │ ├── NoViableAltException.cs
│ │ │ ├── Parser.cs
│ │ │ ├── ParserInterpreter.cs
│ │ │ ├── ParserRuleContext.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ProxyErrorListener.cs
│ │ │ ├── ProxyParserErrorListener.cs
│ │ │ ├── README.md
│ │ │ ├── RecognitionException.cs
│ │ │ ├── Recognizer.cs
│ │ │ ├── RuleContext.cs
│ │ │ ├── RuleDependencyAttribute.cs
│ │ │ ├── RuleVersionAttribute.cs
│ │ │ ├── Sharpen/
│ │ │ │ ├── Arrays.cs
│ │ │ │ ├── AtomicReference.cs
│ │ │ │ ├── BitSet.cs
│ │ │ │ ├── Collections.cs
│ │ │ │ ├── DictionaryExtensions.cs
│ │ │ │ ├── ListExtensions.cs
│ │ │ │ ├── Runtime.cs
│ │ │ │ └── SequenceEqualityComparer.cs
│ │ │ ├── TokenStreamRewriter.cs
│ │ │ ├── TokenTypes.cs
│ │ │ ├── Tree/
│ │ │ │ ├── AbstractParseTreeVisitor.cs
│ │ │ │ ├── ErrorNodeImpl.cs
│ │ │ │ ├── IErrorNode.cs
│ │ │ │ ├── IParseTree.cs
│ │ │ │ ├── IParseTreeListener.cs
│ │ │ │ ├── IParseTreeVisitor.cs
│ │ │ │ ├── IRuleNode.cs
│ │ │ │ ├── ISyntaxTree.cs
│ │ │ │ ├── ITerminalNode.cs
│ │ │ │ ├── ITree.cs
│ │ │ │ ├── ParseTreeProperty.cs
│ │ │ │ ├── ParseTreeWalker.cs
│ │ │ │ ├── Pattern/
│ │ │ │ │ ├── Chunk.cs
│ │ │ │ │ ├── ParseTreeMatch.cs
│ │ │ │ │ ├── ParseTreePattern.cs
│ │ │ │ │ ├── ParseTreePatternMatcher.cs
│ │ │ │ │ ├── RuleTagToken.cs
│ │ │ │ │ ├── TagChunk.cs
│ │ │ │ │ ├── TextChunk.cs
│ │ │ │ │ └── TokenTagToken.cs
│ │ │ │ ├── TerminalNodeImpl.cs
│ │ │ │ ├── Trees.cs
│ │ │ │ └── Xpath/
│ │ │ │ ├── XPath.cs
│ │ │ │ ├── XPathElement.cs
│ │ │ │ ├── XPathLexer.cs
│ │ │ │ ├── XPathLexer.g4
│ │ │ │ ├── XPathLexer.tokens
│ │ │ │ ├── XPathLexerErrorListener.cs
│ │ │ │ ├── XPathRuleAnywhereElement.cs
│ │ │ │ ├── XPathRuleElement.cs
│ │ │ │ ├── XPathTokenAnywhereElement.cs
│ │ │ │ ├── XPathTokenElement.cs
│ │ │ │ ├── XPathWildcardAnywhereElement.cs
│ │ │ │ └── XPathWildcardElement.cs
│ │ │ ├── UnbufferedCharStream.cs
│ │ │ ├── UnbufferedTokenStream.cs
│ │ │ └── Vocabulary.cs
│ │ └── tests/
│ │ ├── issue-2693/
│ │ │ ├── ErrorListener.cs
│ │ │ ├── Program.cs
│ │ │ ├── Test.csproj
│ │ │ ├── Test.sln
│ │ │ ├── TreeOutput.cs
│ │ │ ├── asm8080.g4
│ │ │ ├── cpm22.asm
│ │ │ └── test.sh
│ │ └── issue-3079/
│ │ ├── Arithmetic.g4
│ │ ├── ErrorListener.cs
│ │ ├── Program.cs
│ │ ├── Test.csproj
│ │ ├── Test.sln
│ │ ├── readme.md
│ │ └── test.sh
│ ├── Cpp/
│ │ ├── CMakeLists.txt
│ │ ├── CMakeSettings.json
│ │ ├── README.md
│ │ ├── VERSION
│ │ ├── cmake/
│ │ │ ├── Antlr4Package.md
│ │ │ ├── ExternalAntlr4Cpp.cmake
│ │ │ ├── FindANTLR.cmake
│ │ │ ├── README.md
│ │ │ ├── antlr4-generator.cmake.in
│ │ │ └── antlr4-runtime.cmake.in
│ │ ├── demo/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Linux/
│ │ │ │ └── main.cpp
│ │ │ ├── Mac/
│ │ │ │ ├── antlr4-cpp-demo/
│ │ │ │ │ └── main.cpp
│ │ │ │ ├── antlrcpp Tests/
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── InputHandlingTests.mm
│ │ │ │ │ ├── MiscClassTests.mm
│ │ │ │ │ └── antlrcpp_Tests.mm
│ │ │ │ ├── antlrcpp-demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ │ └── xcshareddata/
│ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── xcschemes/
│ │ │ │ │ ├── antlr4-cpp-demo.xcscheme
│ │ │ │ │ └── antlrcpp Tests.xcscheme
│ │ │ │ └── build.sh
│ │ │ ├── README.md
│ │ │ ├── TLexer.g4
│ │ │ ├── TParser.g4
│ │ │ ├── Windows/
│ │ │ │ ├── antlr4-cpp-demo/
│ │ │ │ │ ├── antlr4-cpp-demo-vs2022.vcxproj
│ │ │ │ │ ├── antlr4-cpp-demo-vs2022.vcxproj.filters
│ │ │ │ │ └── main.cpp
│ │ │ │ └── antlr4cpp-vs2022.sln
│ │ │ ├── generate.cmd
│ │ │ └── generate.sh
│ │ ├── deploy-macos.sh
│ │ ├── deploy-source.sh
│ │ ├── deploy-windows.cmd
│ │ └── runtime/
│ │ ├── CMakeLists.txt
│ │ ├── antlr4cpp-vs2019.vcxproj
│ │ ├── antlr4cpp-vs2019.vcxproj.filters
│ │ ├── antlr4cpp-vs2022.vcxproj
│ │ ├── antlr4cpp-vs2022.vcxproj.filters
│ │ ├── antlrcpp-ios/
│ │ │ ├── Info.plist
│ │ │ └── antlrcpp_ios.h
│ │ ├── antlrcpp.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcshareddata/
│ │ │ └── xcschemes/
│ │ │ ├── antlr4.xcscheme
│ │ │ ├── antlr4_ios.xcscheme
│ │ │ └── antlr4_static.xcscheme
│ │ ├── nuget/
│ │ │ ├── ANTLR4.Runtime.cpp.noarch.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.noarch.targets
│ │ │ ├── ANTLR4.Runtime.cpp.shared.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.shared.props
│ │ │ ├── ANTLR4.Runtime.cpp.shared.targets
│ │ │ ├── ANTLR4.Runtime.cpp.static.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.static.targets
│ │ │ └── pack.cmd
│ │ ├── src/
│ │ │ ├── ANTLRErrorListener.cpp
│ │ │ ├── ANTLRErrorListener.h
│ │ │ ├── ANTLRErrorStrategy.cpp
│ │ │ ├── ANTLRErrorStrategy.h
│ │ │ ├── ANTLRFileStream.cpp
│ │ │ ├── ANTLRFileStream.h
│ │ │ ├── ANTLRInputStream.cpp
│ │ │ ├── ANTLRInputStream.h
│ │ │ ├── BailErrorStrategy.cpp
│ │ │ ├── BailErrorStrategy.h
│ │ │ ├── BaseErrorListener.cpp
│ │ │ ├── BaseErrorListener.h
│ │ │ ├── BufferedTokenStream.cpp
│ │ │ ├── BufferedTokenStream.h
│ │ │ ├── CharStream.cpp
│ │ │ ├── CharStream.h
│ │ │ ├── CommonToken.cpp
│ │ │ ├── CommonToken.h
│ │ │ ├── CommonTokenFactory.cpp
│ │ │ ├── CommonTokenFactory.h
│ │ │ ├── CommonTokenStream.cpp
│ │ │ ├── CommonTokenStream.h
│ │ │ ├── ConsoleErrorListener.cpp
│ │ │ ├── ConsoleErrorListener.h
│ │ │ ├── DefaultErrorStrategy.cpp
│ │ │ ├── DefaultErrorStrategy.h
│ │ │ ├── DiagnosticErrorListener.cpp
│ │ │ ├── DiagnosticErrorListener.h
│ │ │ ├── Exceptions.cpp
│ │ │ ├── Exceptions.h
│ │ │ ├── FailedPredicateException.cpp
│ │ │ ├── FailedPredicateException.h
│ │ │ ├── FlatHashMap.h
│ │ │ ├── FlatHashSet.h
│ │ │ ├── InputMismatchException.cpp
│ │ │ ├── InputMismatchException.h
│ │ │ ├── IntStream.cpp
│ │ │ ├── IntStream.h
│ │ │ ├── InterpreterRuleContext.cpp
│ │ │ ├── InterpreterRuleContext.h
│ │ │ ├── Lexer.cpp
│ │ │ ├── Lexer.h
│ │ │ ├── LexerInterpreter.cpp
│ │ │ ├── LexerInterpreter.h
│ │ │ ├── LexerNoViableAltException.cpp
│ │ │ ├── LexerNoViableAltException.h
│ │ │ ├── ListTokenSource.cpp
│ │ │ ├── ListTokenSource.h
│ │ │ ├── NoViableAltException.cpp
│ │ │ ├── NoViableAltException.h
│ │ │ ├── Parser.cpp
│ │ │ ├── Parser.h
│ │ │ ├── ParserInterpreter.cpp
│ │ │ ├── ParserInterpreter.h
│ │ │ ├── ParserRuleContext.cpp
│ │ │ ├── ParserRuleContext.h
│ │ │ ├── ProxyErrorListener.cpp
│ │ │ ├── ProxyErrorListener.h
│ │ │ ├── RecognitionException.cpp
│ │ │ ├── RecognitionException.h
│ │ │ ├── Recognizer.cpp
│ │ │ ├── Recognizer.h
│ │ │ ├── RuleContext.cpp
│ │ │ ├── RuleContext.h
│ │ │ ├── RuleContextWithAltNum.cpp
│ │ │ ├── RuleContextWithAltNum.h
│ │ │ ├── RuntimeMetaData.cpp
│ │ │ ├── RuntimeMetaData.h
│ │ │ ├── Token.cpp
│ │ │ ├── Token.h
│ │ │ ├── TokenFactory.h
│ │ │ ├── TokenSource.cpp
│ │ │ ├── TokenSource.h
│ │ │ ├── TokenStream.cpp
│ │ │ ├── TokenStream.h
│ │ │ ├── TokenStreamRewriter.cpp
│ │ │ ├── TokenStreamRewriter.h
│ │ │ ├── UnbufferedCharStream.cpp
│ │ │ ├── UnbufferedCharStream.h
│ │ │ ├── UnbufferedTokenStream.cpp
│ │ │ ├── UnbufferedTokenStream.h
│ │ │ ├── Version.h
│ │ │ ├── Vocabulary.cpp
│ │ │ ├── Vocabulary.h
│ │ │ ├── WritableToken.cpp
│ │ │ ├── WritableToken.h
│ │ │ ├── antlr4-common.h
│ │ │ ├── antlr4-runtime.h
│ │ │ ├── atn/
│ │ │ │ ├── ATN.cpp
│ │ │ │ ├── ATN.h
│ │ │ │ ├── ATNConfig.cpp
│ │ │ │ ├── ATNConfig.h
│ │ │ │ ├── ATNConfigSet.cpp
│ │ │ │ ├── ATNConfigSet.h
│ │ │ │ ├── ATNDeserializationOptions.cpp
│ │ │ │ ├── ATNDeserializationOptions.h
│ │ │ │ ├── ATNDeserializer.cpp
│ │ │ │ ├── ATNDeserializer.h
│ │ │ │ ├── ATNSimulator.cpp
│ │ │ │ ├── ATNSimulator.h
│ │ │ │ ├── ATNState.cpp
│ │ │ │ ├── ATNState.h
│ │ │ │ ├── ATNStateType.cpp
│ │ │ │ ├── ATNStateType.h
│ │ │ │ ├── ATNType.h
│ │ │ │ ├── ActionTransition.cpp
│ │ │ │ ├── ActionTransition.h
│ │ │ │ ├── AmbiguityInfo.cpp
│ │ │ │ ├── AmbiguityInfo.h
│ │ │ │ ├── ArrayPredictionContext.cpp
│ │ │ │ ├── ArrayPredictionContext.h
│ │ │ │ ├── AtomTransition.cpp
│ │ │ │ ├── AtomTransition.h
│ │ │ │ ├── BasicBlockStartState.h
│ │ │ │ ├── BasicState.h
│ │ │ │ ├── BlockEndState.h
│ │ │ │ ├── BlockStartState.h
│ │ │ │ ├── ContextSensitivityInfo.cpp
│ │ │ │ ├── ContextSensitivityInfo.h
│ │ │ │ ├── DecisionEventInfo.cpp
│ │ │ │ ├── DecisionEventInfo.h
│ │ │ │ ├── DecisionInfo.cpp
│ │ │ │ ├── DecisionInfo.h
│ │ │ │ ├── DecisionState.cpp
│ │ │ │ ├── DecisionState.h
│ │ │ │ ├── EpsilonTransition.cpp
│ │ │ │ ├── EpsilonTransition.h
│ │ │ │ ├── ErrorInfo.cpp
│ │ │ │ ├── ErrorInfo.h
│ │ │ │ ├── HashUtils.h
│ │ │ │ ├── LL1Analyzer.cpp
│ │ │ │ ├── LL1Analyzer.h
│ │ │ │ ├── LexerATNConfig.cpp
│ │ │ │ ├── LexerATNConfig.h
│ │ │ │ ├── LexerATNSimulator.cpp
│ │ │ │ ├── LexerATNSimulator.h
│ │ │ │ ├── LexerAction.cpp
│ │ │ │ ├── LexerAction.h
│ │ │ │ ├── LexerActionExecutor.cpp
│ │ │ │ ├── LexerActionExecutor.h
│ │ │ │ ├── LexerActionType.h
│ │ │ │ ├── LexerChannelAction.cpp
│ │ │ │ ├── LexerChannelAction.h
│ │ │ │ ├── LexerCustomAction.cpp
│ │ │ │ ├── LexerCustomAction.h
│ │ │ │ ├── LexerIndexedCustomAction.cpp
│ │ │ │ ├── LexerIndexedCustomAction.h
│ │ │ │ ├── LexerModeAction.cpp
│ │ │ │ ├── LexerModeAction.h
│ │ │ │ ├── LexerMoreAction.cpp
│ │ │ │ ├── LexerMoreAction.h
│ │ │ │ ├── LexerPopModeAction.cpp
│ │ │ │ ├── LexerPopModeAction.h
│ │ │ │ ├── LexerPushModeAction.cpp
│ │ │ │ ├── LexerPushModeAction.h
│ │ │ │ ├── LexerSkipAction.cpp
│ │ │ │ ├── LexerSkipAction.h
│ │ │ │ ├── LexerTypeAction.cpp
│ │ │ │ ├── LexerTypeAction.h
│ │ │ │ ├── LookaheadEventInfo.cpp
│ │ │ │ ├── LookaheadEventInfo.h
│ │ │ │ ├── LoopEndState.h
│ │ │ │ ├── NotSetTransition.cpp
│ │ │ │ ├── NotSetTransition.h
│ │ │ │ ├── OrderedATNConfigSet.cpp
│ │ │ │ ├── OrderedATNConfigSet.h
│ │ │ │ ├── ParseInfo.cpp
│ │ │ │ ├── ParseInfo.h
│ │ │ │ ├── ParserATNSimulator.cpp
│ │ │ │ ├── ParserATNSimulator.h
│ │ │ │ ├── ParserATNSimulatorOptions.h
│ │ │ │ ├── PlusBlockStartState.h
│ │ │ │ ├── PlusLoopbackState.h
│ │ │ │ ├── PrecedencePredicateTransition.cpp
│ │ │ │ ├── PrecedencePredicateTransition.h
│ │ │ │ ├── PredicateEvalInfo.cpp
│ │ │ │ ├── PredicateEvalInfo.h
│ │ │ │ ├── PredicateTransition.cpp
│ │ │ │ ├── PredicateTransition.h
│ │ │ │ ├── PredictionContext.cpp
│ │ │ │ ├── PredictionContext.h
│ │ │ │ ├── PredictionContextCache.cpp
│ │ │ │ ├── PredictionContextCache.h
│ │ │ │ ├── PredictionContextMergeCache.cpp
│ │ │ │ ├── PredictionContextMergeCache.h
│ │ │ │ ├── PredictionContextMergeCacheOptions.h
│ │ │ │ ├── PredictionContextType.h
│ │ │ │ ├── PredictionMode.cpp
│ │ │ │ ├── PredictionMode.h
│ │ │ │ ├── ProfilingATNSimulator.cpp
│ │ │ │ ├── ProfilingATNSimulator.h
│ │ │ │ ├── RangeTransition.cpp
│ │ │ │ ├── RangeTransition.h
│ │ │ │ ├── RuleStartState.h
│ │ │ │ ├── RuleStopState.h
│ │ │ │ ├── RuleTransition.cpp
│ │ │ │ ├── RuleTransition.h
│ │ │ │ ├── SemanticContext.cpp
│ │ │ │ ├── SemanticContext.h
│ │ │ │ ├── SemanticContextType.h
│ │ │ │ ├── SerializedATNView.h
│ │ │ │ ├── SetTransition.cpp
│ │ │ │ ├── SetTransition.h
│ │ │ │ ├── SingletonPredictionContext.cpp
│ │ │ │ ├── SingletonPredictionContext.h
│ │ │ │ ├── StarBlockStartState.h
│ │ │ │ ├── StarLoopEntryState.h
│ │ │ │ ├── StarLoopbackState.cpp
│ │ │ │ ├── StarLoopbackState.h
│ │ │ │ ├── TokensStartState.h
│ │ │ │ ├── Transition.cpp
│ │ │ │ ├── Transition.h
│ │ │ │ ├── TransitionType.cpp
│ │ │ │ ├── TransitionType.h
│ │ │ │ ├── WildcardTransition.cpp
│ │ │ │ └── WildcardTransition.h
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.cpp
│ │ │ │ ├── DFA.h
│ │ │ │ ├── DFASerializer.cpp
│ │ │ │ ├── DFASerializer.h
│ │ │ │ ├── DFAState.cpp
│ │ │ │ ├── DFAState.h
│ │ │ │ ├── LexerDFASerializer.cpp
│ │ │ │ └── LexerDFASerializer.h
│ │ │ ├── internal/
│ │ │ │ ├── Synchronization.cpp
│ │ │ │ └── Synchronization.h
│ │ │ ├── misc/
│ │ │ │ ├── InterpreterDataReader.cpp
│ │ │ │ ├── InterpreterDataReader.h
│ │ │ │ ├── Interval.cpp
│ │ │ │ ├── Interval.h
│ │ │ │ ├── IntervalSet.cpp
│ │ │ │ ├── IntervalSet.h
│ │ │ │ ├── MurmurHash.cpp
│ │ │ │ ├── MurmurHash.h
│ │ │ │ ├── Predicate.cpp
│ │ │ │ └── Predicate.h
│ │ │ ├── support/
│ │ │ │ ├── Any.cpp
│ │ │ │ ├── Any.h
│ │ │ │ ├── Arrays.cpp
│ │ │ │ ├── Arrays.h
│ │ │ │ ├── BitSet.h
│ │ │ │ ├── CPPUtils.cpp
│ │ │ │ ├── CPPUtils.h
│ │ │ │ ├── Casts.h
│ │ │ │ ├── Declarations.h
│ │ │ │ ├── StringUtils.cpp
│ │ │ │ ├── StringUtils.h
│ │ │ │ ├── Unicode.h
│ │ │ │ ├── Utf8.cpp
│ │ │ │ └── Utf8.h
│ │ │ └── tree/
│ │ │ ├── AbstractParseTreeVisitor.h
│ │ │ ├── ErrorNode.h
│ │ │ ├── ErrorNodeImpl.cpp
│ │ │ ├── ErrorNodeImpl.h
│ │ │ ├── IterativeParseTreeWalker.cpp
│ │ │ ├── IterativeParseTreeWalker.h
│ │ │ ├── ParseTree.cpp
│ │ │ ├── ParseTree.h
│ │ │ ├── ParseTreeListener.cpp
│ │ │ ├── ParseTreeListener.h
│ │ │ ├── ParseTreeProperty.h
│ │ │ ├── ParseTreeType.h
│ │ │ ├── ParseTreeVisitor.cpp
│ │ │ ├── ParseTreeVisitor.h
│ │ │ ├── ParseTreeWalker.cpp
│ │ │ ├── ParseTreeWalker.h
│ │ │ ├── TerminalNode.h
│ │ │ ├── TerminalNodeImpl.cpp
│ │ │ ├── TerminalNodeImpl.h
│ │ │ ├── Trees.cpp
│ │ │ ├── Trees.h
│ │ │ ├── pattern/
│ │ │ │ ├── Chunk.cpp
│ │ │ │ ├── Chunk.h
│ │ │ │ ├── ParseTreeMatch.cpp
│ │ │ │ ├── ParseTreeMatch.h
│ │ │ │ ├── ParseTreePattern.cpp
│ │ │ │ ├── ParseTreePattern.h
│ │ │ │ ├── ParseTreePatternMatcher.cpp
│ │ │ │ ├── ParseTreePatternMatcher.h
│ │ │ │ ├── RuleTagToken.cpp
│ │ │ │ ├── RuleTagToken.h
│ │ │ │ ├── TagChunk.cpp
│ │ │ │ ├── TagChunk.h
│ │ │ │ ├── TextChunk.cpp
│ │ │ │ ├── TextChunk.h
│ │ │ │ ├── TokenTagToken.cpp
│ │ │ │ └── TokenTagToken.h
│ │ │ └── xpath/
│ │ │ ├── XPath.cpp
│ │ │ ├── XPath.h
│ │ │ ├── XPathElement.cpp
│ │ │ ├── XPathElement.h
│ │ │ ├── XPathLexer.cpp
│ │ │ ├── XPathLexer.g4
│ │ │ ├── XPathLexer.h
│ │ │ ├── XPathLexer.tokens
│ │ │ ├── XPathLexerErrorListener.cpp
│ │ │ ├── XPathLexerErrorListener.h
│ │ │ ├── XPathRuleAnywhereElement.cpp
│ │ │ ├── XPathRuleAnywhereElement.h
│ │ │ ├── XPathRuleElement.cpp
│ │ │ ├── XPathRuleElement.h
│ │ │ ├── XPathTokenAnywhereElement.cpp
│ │ │ ├── XPathTokenAnywhereElement.h
│ │ │ ├── XPathTokenElement.cpp
│ │ │ ├── XPathTokenElement.h
│ │ │ ├── XPathWildcardAnywhereElement.cpp
│ │ │ ├── XPathWildcardAnywhereElement.h
│ │ │ ├── XPathWildcardElement.cpp
│ │ │ └── XPathWildcardElement.h
│ │ └── tests/
│ │ └── Utf8Test.cpp
│ ├── Dart/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── benchmark/
│ │ │ └── src/
│ │ │ └── util/
│ │ │ └── bit_set.dart
│ │ ├── lib/
│ │ │ ├── antlr4.dart
│ │ │ └── src/
│ │ │ ├── atn/
│ │ │ │ ├── atn.dart
│ │ │ │ └── src/
│ │ │ │ ├── atn.dart
│ │ │ │ ├── atn_config.dart
│ │ │ │ ├── atn_config_set.dart
│ │ │ │ ├── atn_deserializer.dart
│ │ │ │ ├── atn_simulator.dart
│ │ │ │ ├── atn_state.dart
│ │ │ │ ├── atn_type.dart
│ │ │ │ ├── info.dart
│ │ │ │ ├── lexer_action.dart
│ │ │ │ ├── lexer_action_executor.dart
│ │ │ │ ├── lexer_atn_simulator.dart
│ │ │ │ ├── parser_atn_simulator.dart
│ │ │ │ ├── profiling_atn_simulator.dart
│ │ │ │ ├── semantic_context.dart
│ │ │ │ └── transition.dart
│ │ │ ├── dfa/
│ │ │ │ ├── dfa.dart
│ │ │ │ └── src/
│ │ │ │ ├── dfa.dart
│ │ │ │ ├── dfa_serializer.dart
│ │ │ │ └── dfa_state.dart
│ │ │ ├── error/
│ │ │ │ ├── error.dart
│ │ │ │ └── src/
│ │ │ │ ├── diagnostic_error_listener.dart
│ │ │ │ ├── error_listener.dart
│ │ │ │ ├── error_strategy.dart
│ │ │ │ └── errors.dart
│ │ │ ├── input_stream.dart
│ │ │ ├── interval_set.dart
│ │ │ ├── lexer.dart
│ │ │ ├── ll1_analyzer.dart
│ │ │ ├── misc/
│ │ │ │ ├── misc.dart
│ │ │ │ └── src/
│ │ │ │ ├── multi_map.dart
│ │ │ │ └── pair.dart
│ │ │ ├── parser.dart
│ │ │ ├── parser_interpreter.dart
│ │ │ ├── parser_rule_context.dart
│ │ │ ├── prediction_context.dart
│ │ │ ├── recognizer.dart
│ │ │ ├── rule_context.dart
│ │ │ ├── runtime_meta_data.dart
│ │ │ ├── token.dart
│ │ │ ├── token_factory.dart
│ │ │ ├── token_source.dart
│ │ │ ├── token_stream.dart
│ │ │ ├── tree/
│ │ │ │ ├── src/
│ │ │ │ │ ├── pattern/
│ │ │ │ │ │ ├── chunk.dart
│ │ │ │ │ │ └── parse_tree_match.dart
│ │ │ │ │ ├── tree.dart
│ │ │ │ │ └── trees.dart
│ │ │ │ └── tree.dart
│ │ │ ├── util/
│ │ │ │ ├── bit_operation_util.dart
│ │ │ │ ├── bit_operation_util_html.dart
│ │ │ │ ├── bit_set.dart
│ │ │ │ ├── murmur_hash.dart
│ │ │ │ ├── platform_html.dart
│ │ │ │ ├── platform_io.dart
│ │ │ │ ├── platform_stub.dart
│ │ │ │ └── utils.dart
│ │ │ └── vocabulary.dart
│ │ ├── pubspec.yaml
│ │ └── test/
│ │ └── src/
│ │ └── util/
│ │ └── bit_set_test.dart
│ ├── Go/
│ │ └── antlr/
│ │ ├── README.adoc
│ │ └── v4/
│ │ ├── LICENSE
│ │ ├── antlrdoc.go
│ │ ├── atn.go
│ │ ├── atn_config.go
│ │ ├── atn_config_set.go
│ │ ├── atn_deserialization_options.go
│ │ ├── atn_deserializer.go
│ │ ├── atn_simulator.go
│ │ ├── atn_state.go
│ │ ├── atn_type.go
│ │ ├── char_stream.go
│ │ ├── common_token_factory.go
│ │ ├── common_token_stream.go
│ │ ├── comparators.go
│ │ ├── configuration.go
│ │ ├── dfa.go
│ │ ├── dfa_serializer.go
│ │ ├── dfa_state.go
│ │ ├── diagnostic_error_listener.go
│ │ ├── error_listener.go
│ │ ├── error_strategy.go
│ │ ├── errors.go
│ │ ├── file_stream.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── input_stream.go
│ │ ├── int_stream.go
│ │ ├── interval_set.go
│ │ ├── jcollect.go
│ │ ├── lexer.go
│ │ ├── lexer_action.go
│ │ ├── lexer_action_executor.go
│ │ ├── lexer_atn_simulator.go
│ │ ├── ll1_analyzer.go
│ │ ├── mutex.go
│ │ ├── mutex_nomutex.go
│ │ ├── nostatistics.go
│ │ ├── parser.go
│ │ ├── parser_atn_simulator.go
│ │ ├── parser_rule_context.go
│ │ ├── prediction_context.go
│ │ ├── prediction_context_cache.go
│ │ ├── prediction_mode.go
│ │ ├── recognizer.go
│ │ ├── rule_context.go
│ │ ├── semantic_context.go
│ │ ├── statistics.go
│ │ ├── stats_data.go
│ │ ├── token.go
│ │ ├── token_source.go
│ │ ├── token_stream.go
│ │ ├── tokenstream_rewriter.go
│ │ ├── trace_listener.go
│ │ ├── transition.go
│ │ ├── tree.go
│ │ ├── trees.go
│ │ └── utils.go
│ ├── Java/
│ │ ├── doxyfile
│ │ ├── nb-configuration.xml
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── dot/
│ │ │ └── org/
│ │ │ └── antlr/
│ │ │ └── v4/
│ │ │ └── runtime/
│ │ │ └── atn/
│ │ │ └── images/
│ │ │ ├── ArrayMerge_DiffTopDiffPar.dot
│ │ │ ├── ArrayMerge_EqualTop.dot
│ │ │ ├── ArrayMerge_ShareTopDiffPar.dot
│ │ │ ├── ArrayMerge_ShareTopSamePar.dot
│ │ │ ├── ArrayMerge_ShareTopSharePar.dot
│ │ │ ├── Block.dot
│ │ │ ├── ClosureGreedy.dot
│ │ │ ├── ClosureNonGreedy.dot
│ │ │ ├── FullMerge_EmptyRoot.dot
│ │ │ ├── FullMerge_EmptyRoots.dot
│ │ │ ├── FullMerge_SameRoot.dot
│ │ │ ├── LocalMerge_DiffRoots.dot
│ │ │ ├── LocalMerge_EmptyParent.dot
│ │ │ ├── LocalMerge_EmptyRoot.dot
│ │ │ ├── OptionalGreedy.dot
│ │ │ ├── OptionalNonGreedy.dot
│ │ │ ├── PositiveClosureGreedy.dot
│ │ │ ├── PositiveClosureNonGreedy.dot
│ │ │ ├── Rule.dot
│ │ │ ├── SingletonMerge_DiffRootDiffPar.dot
│ │ │ ├── SingletonMerge_DiffRootSamePar.dot
│ │ │ ├── SingletonMerge_SameRootDiffPar.dot
│ │ │ └── SingletonMerge_SameRootSamePar.dot
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── runtime/
│ │ ├── ANTLRErrorListener.java
│ │ ├── ANTLRErrorStrategy.java
│ │ ├── ANTLRFileStream.java
│ │ ├── ANTLRInputStream.java
│ │ ├── BailErrorStrategy.java
│ │ ├── BaseErrorListener.java
│ │ ├── BufferedTokenStream.java
│ │ ├── CharStream.java
│ │ ├── CharStreams.java
│ │ ├── CodePointBuffer.java
│ │ ├── CodePointCharStream.java
│ │ ├── CommonToken.java
│ │ ├── CommonTokenFactory.java
│ │ ├── CommonTokenStream.java
│ │ ├── ConsoleErrorListener.java
│ │ ├── DefaultErrorStrategy.java
│ │ ├── DiagnosticErrorListener.java
│ │ ├── FailedPredicateException.java
│ │ ├── InputMismatchException.java
│ │ ├── IntStream.java
│ │ ├── InterpreterRuleContext.java
│ │ ├── Lexer.java
│ │ ├── LexerInterpreter.java
│ │ ├── LexerNoViableAltException.java
│ │ ├── ListTokenSource.java
│ │ ├── NoViableAltException.java
│ │ ├── Parser.java
│ │ ├── ParserInterpreter.java
│ │ ├── ParserRuleContext.java
│ │ ├── ProxyErrorListener.java
│ │ ├── RecognitionException.java
│ │ ├── Recognizer.java
│ │ ├── RuleContext.java
│ │ ├── RuleContextWithAltNum.java
│ │ ├── RuntimeMetaData.java
│ │ ├── Token.java
│ │ ├── TokenFactory.java
│ │ ├── TokenSource.java
│ │ ├── TokenStream.java
│ │ ├── TokenStreamRewriter.java
│ │ ├── UnbufferedCharStream.java
│ │ ├── UnbufferedTokenStream.java
│ │ ├── Vocabulary.java
│ │ ├── VocabularyImpl.java
│ │ ├── WritableToken.java
│ │ ├── atn/
│ │ │ ├── ATN.java
│ │ │ ├── ATNConfig.java
│ │ │ ├── ATNConfigSet.java
│ │ │ ├── ATNDeserializationOptions.java
│ │ │ ├── ATNDeserializer.java
│ │ │ ├── ATNSerializer.java
│ │ │ ├── ATNSimulator.java
│ │ │ ├── ATNState.java
│ │ │ ├── ATNType.java
│ │ │ ├── AbstractPredicateTransition.java
│ │ │ ├── ActionTransition.java
│ │ │ ├── AmbiguityInfo.java
│ │ │ ├── ArrayPredictionContext.java
│ │ │ ├── AtomTransition.java
│ │ │ ├── BasicBlockStartState.java
│ │ │ ├── BasicState.java
│ │ │ ├── BlockEndState.java
│ │ │ ├── BlockStartState.java
│ │ │ ├── CodePointTransitions.java
│ │ │ ├── ContextSensitivityInfo.java
│ │ │ ├── DecisionEventInfo.java
│ │ │ ├── DecisionInfo.java
│ │ │ ├── DecisionState.java
│ │ │ ├── EmptyPredictionContext.java
│ │ │ ├── EpsilonTransition.java
│ │ │ ├── ErrorInfo.java
│ │ │ ├── LL1Analyzer.java
│ │ │ ├── LexerATNConfig.java
│ │ │ ├── LexerATNSimulator.java
│ │ │ ├── LexerAction.java
│ │ │ ├── LexerActionExecutor.java
│ │ │ ├── LexerActionType.java
│ │ │ ├── LexerChannelAction.java
│ │ │ ├── LexerCustomAction.java
│ │ │ ├── LexerIndexedCustomAction.java
│ │ │ ├── LexerModeAction.java
│ │ │ ├── LexerMoreAction.java
│ │ │ ├── LexerPopModeAction.java
│ │ │ ├── LexerPushModeAction.java
│ │ │ ├── LexerSkipAction.java
│ │ │ ├── LexerTypeAction.java
│ │ │ ├── LookaheadEventInfo.java
│ │ │ ├── LoopEndState.java
│ │ │ ├── NotSetTransition.java
│ │ │ ├── OrderedATNConfigSet.java
│ │ │ ├── ParseInfo.java
│ │ │ ├── ParserATNSimulator.java
│ │ │ ├── PlusBlockStartState.java
│ │ │ ├── PlusLoopbackState.java
│ │ │ ├── PrecedencePredicateTransition.java
│ │ │ ├── PredicateEvalInfo.java
│ │ │ ├── PredicateTransition.java
│ │ │ ├── PredictionContext.java
│ │ │ ├── PredictionContextCache.java
│ │ │ ├── PredictionMode.java
│ │ │ ├── ProfilingATNSimulator.java
│ │ │ ├── RangeTransition.java
│ │ │ ├── RuleStartState.java
│ │ │ ├── RuleStopState.java
│ │ │ ├── RuleTransition.java
│ │ │ ├── SemanticContext.java
│ │ │ ├── SetTransition.java
│ │ │ ├── SingletonPredictionContext.java
│ │ │ ├── StarBlockStartState.java
│ │ │ ├── StarLoopEntryState.java
│ │ │ ├── StarLoopbackState.java
│ │ │ ├── TokensStartState.java
│ │ │ ├── Transition.java
│ │ │ └── WildcardTransition.java
│ │ ├── dfa/
│ │ │ ├── DFA.java
│ │ │ ├── DFASerializer.java
│ │ │ ├── DFAState.java
│ │ │ └── LexerDFASerializer.java
│ │ ├── misc/
│ │ │ ├── AbstractEqualityComparator.java
│ │ │ ├── Array2DHashSet.java
│ │ │ ├── DoubleKeyMap.java
│ │ │ ├── EqualityComparator.java
│ │ │ ├── FlexibleHashMap.java
│ │ │ ├── IntSet.java
│ │ │ ├── IntegerList.java
│ │ │ ├── IntegerStack.java
│ │ │ ├── InterpreterDataReader.java
│ │ │ ├── Interval.java
│ │ │ ├── IntervalSet.java
│ │ │ ├── LogManager.java
│ │ │ ├── MultiMap.java
│ │ │ ├── MurmurHash.java
│ │ │ ├── NotNull.java
│ │ │ ├── ObjectEqualityComparator.java
│ │ │ ├── OrderedHashSet.java
│ │ │ ├── Pair.java
│ │ │ ├── ParseCancellationException.java
│ │ │ ├── Predicate.java
│ │ │ ├── TestRig.java
│ │ │ ├── Triple.java
│ │ │ └── Utils.java
│ │ └── tree/
│ │ ├── AbstractParseTreeVisitor.java
│ │ ├── ErrorNode.java
│ │ ├── ErrorNodeImpl.java
│ │ ├── IterativeParseTreeWalker.java
│ │ ├── ParseTree.java
│ │ ├── ParseTreeListener.java
│ │ ├── ParseTreeProperty.java
│ │ ├── ParseTreeVisitor.java
│ │ ├── ParseTreeWalker.java
│ │ ├── RuleNode.java
│ │ ├── SyntaxTree.java
│ │ ├── TerminalNode.java
│ │ ├── TerminalNodeImpl.java
│ │ ├── Tree.java
│ │ ├── Trees.java
│ │ ├── pattern/
│ │ │ ├── Chunk.java
│ │ │ ├── ParseTreeMatch.java
│ │ │ ├── ParseTreePattern.java
│ │ │ ├── ParseTreePatternMatcher.java
│ │ │ ├── RuleTagToken.java
│ │ │ ├── TagChunk.java
│ │ │ ├── TextChunk.java
│ │ │ └── TokenTagToken.java
│ │ └── xpath/
│ │ ├── XPath.java
│ │ ├── XPathElement.java
│ │ ├── XPathLexer.java
│ │ ├── XPathLexerErrorListener.java
│ │ ├── XPathRuleAnywhereElement.java
│ │ ├── XPathRuleElement.java
│ │ ├── XPathTokenAnywhereElement.java
│ │ ├── XPathTokenElement.java
│ │ ├── XPathWildcardAnywhereElement.java
│ │ └── XPathWildcardElement.java
│ ├── JavaScript/
│ │ ├── .babelrc
│ │ ├── .c8rc.json
│ │ ├── .eslintignore
│ │ ├── .eslintrc.yml
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── spec/
│ │ │ ├── BitSetSpec.js
│ │ │ ├── HashMapSpec.js
│ │ │ ├── HashSetSpec.js
│ │ │ ├── IntervalSetSpec.js
│ │ │ ├── helpers/
│ │ │ │ └── Reporter.js
│ │ │ ├── imports/
│ │ │ │ ├── NodeCommonJSImportSpec.cjs
│ │ │ │ ├── NodeEsmImportSpec.mjs
│ │ │ │ └── builds/
│ │ │ │ ├── node-cjs-ts/
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── test.sh
│ │ │ │ │ └── tsconfig.node.commonjs.json
│ │ │ │ └── node-esm-ts/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── index.ts
│ │ │ │ ├── package.json
│ │ │ │ ├── test.sh
│ │ │ │ ├── tsconfig.bundler.es2022.json
│ │ │ │ └── tsconfig.node16.json
│ │ │ ├── rewriter/
│ │ │ │ ├── Makefile
│ │ │ │ ├── TokenStreamRewriterSpec.js
│ │ │ │ ├── abc.g4
│ │ │ │ ├── calc.g4
│ │ │ │ └── generatedCode/
│ │ │ │ ├── abc.js
│ │ │ │ └── calc.js
│ │ │ └── support/
│ │ │ └── jasmine.json
│ │ ├── src/
│ │ │ └── antlr4/
│ │ │ ├── BufferedTokenStream.d.ts
│ │ │ ├── BufferedTokenStream.js
│ │ │ ├── CharStream.d.ts
│ │ │ ├── CharStream.js
│ │ │ ├── CharStreams.d.ts
│ │ │ ├── CharStreams.js
│ │ │ ├── CommonToken.d.ts
│ │ │ ├── CommonToken.js
│ │ │ ├── CommonTokenFactory.js
│ │ │ ├── CommonTokenStream.d.ts
│ │ │ ├── CommonTokenStream.js
│ │ │ ├── FileStream.d.ts
│ │ │ ├── FileStream.js
│ │ │ ├── InputStream.d.ts
│ │ │ ├── InputStream.js
│ │ │ ├── Lexer.d.ts
│ │ │ ├── Lexer.js
│ │ │ ├── Parser.d.ts
│ │ │ ├── Parser.js
│ │ │ ├── Recognizer.d.ts
│ │ │ ├── Recognizer.js
│ │ │ ├── Token.d.ts
│ │ │ ├── Token.js
│ │ │ ├── TokenSource.d.ts
│ │ │ ├── TokenSource.js
│ │ │ ├── TokenStream.d.ts
│ │ │ ├── TokenStream.js
│ │ │ ├── TokenStreamRewriter.d.ts
│ │ │ ├── TokenStreamRewriter.js
│ │ │ ├── TraceListener.js
│ │ │ ├── action/
│ │ │ │ ├── LexerAction.js
│ │ │ │ ├── LexerChannelAction.js
│ │ │ │ ├── LexerCustomAction.js
│ │ │ │ ├── LexerIndexedCustomAction.js
│ │ │ │ ├── LexerModeAction.js
│ │ │ │ ├── LexerMoreAction.js
│ │ │ │ ├── LexerPopModeAction.js
│ │ │ │ ├── LexerPushModeAction.js
│ │ │ │ ├── LexerSkipAction.js
│ │ │ │ └── LexerTypeAction.js
│ │ │ ├── atn/
│ │ │ │ ├── ATN.d.ts
│ │ │ │ ├── ATN.js
│ │ │ │ ├── ATNConfig.d.ts
│ │ │ │ ├── ATNConfig.js
│ │ │ │ ├── ATNConfigSet.d.ts
│ │ │ │ ├── ATNConfigSet.js
│ │ │ │ ├── ATNDeserializationOptions.d.ts
│ │ │ │ ├── ATNDeserializationOptions.js
│ │ │ │ ├── ATNDeserializer.d.ts
│ │ │ │ ├── ATNDeserializer.js
│ │ │ │ ├── ATNSimulator.d.ts
│ │ │ │ ├── ATNSimulator.js
│ │ │ │ ├── ATNType.js
│ │ │ │ ├── AbstractPredicateTransition.js
│ │ │ │ ├── LL1Analyzer.js
│ │ │ │ ├── LexerATNConfig.js
│ │ │ │ ├── LexerATNSimulator.d.ts
│ │ │ │ ├── LexerATNSimulator.js
│ │ │ │ ├── LexerActionExecutor.js
│ │ │ │ ├── LexerActionType.js
│ │ │ │ ├── OrderedATNConfigSet.js
│ │ │ │ ├── ParserATNSimulator.d.ts
│ │ │ │ ├── ParserATNSimulator.js
│ │ │ │ ├── PrecedencePredicate.js
│ │ │ │ ├── Predicate.js
│ │ │ │ ├── PredictionContextCache.d.ts
│ │ │ │ ├── PredictionContextCache.js
│ │ │ │ ├── PredictionMode.d.ts
│ │ │ │ ├── PredictionMode.js
│ │ │ │ ├── SemanticContext.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── context/
│ │ │ │ ├── ArrayPredictionContext.js
│ │ │ │ ├── EmptyPredictionContext.js
│ │ │ │ ├── InterpreterRuleContext.js
│ │ │ │ ├── ParserRuleContext.d.ts
│ │ │ │ ├── ParserRuleContext.js
│ │ │ │ ├── PredictionContext.js
│ │ │ │ ├── PredictionContextUtils.js
│ │ │ │ ├── RuleContext.d.ts
│ │ │ │ ├── RuleContext.js
│ │ │ │ ├── SingletonPredictionContext.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.d.ts
│ │ │ │ ├── DFA.js
│ │ │ │ ├── DFASerializer.js
│ │ │ │ ├── DFAState.js
│ │ │ │ ├── LexerDFASerializer.js
│ │ │ │ ├── PredPrediction.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── error/
│ │ │ │ ├── BailErrorStrategy.d.ts
│ │ │ │ ├── BailErrorStrategy.js
│ │ │ │ ├── ConsoleErrorListener.js
│ │ │ │ ├── DefaultErrorStrategy.d.ts
│ │ │ │ ├── DefaultErrorStrategy.js
│ │ │ │ ├── DiagnosticErrorListener.d.ts
│ │ │ │ ├── DiagnosticErrorListener.js
│ │ │ │ ├── ErrorListener.d.ts
│ │ │ │ ├── ErrorListener.js
│ │ │ │ ├── ErrorStrategy.d.ts
│ │ │ │ ├── ErrorStrategy.js
│ │ │ │ ├── FailedPredicateException.d.ts
│ │ │ │ ├── FailedPredicateException.js
│ │ │ │ ├── InputMismatchException.d.ts
│ │ │ │ ├── InputMismatchException.js
│ │ │ │ ├── LexerNoViableAltException.d.ts
│ │ │ │ ├── LexerNoViableAltException.js
│ │ │ │ ├── NoViableAltException.d.ts
│ │ │ │ ├── NoViableAltException.js
│ │ │ │ ├── ParseCancellationException.js
│ │ │ │ ├── ProxyErrorListener.js
│ │ │ │ ├── RecognitionException.d.ts
│ │ │ │ ├── RecognitionException.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── index.d.cts
│ │ │ ├── index.node.js
│ │ │ ├── index.web.js
│ │ │ ├── misc/
│ │ │ │ ├── AltDict.js
│ │ │ │ ├── BitSet.d.ts
│ │ │ │ ├── BitSet.js
│ │ │ │ ├── HashCode.js
│ │ │ │ ├── HashMap.js
│ │ │ │ ├── HashSet.js
│ │ │ │ ├── Interval.d.ts
│ │ │ │ ├── Interval.js
│ │ │ │ ├── IntervalSet.d.ts
│ │ │ │ ├── IntervalSet.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── state/
│ │ │ │ ├── ATNState.d.ts
│ │ │ │ ├── ATNState.js
│ │ │ │ ├── BasicBlockStartState.js
│ │ │ │ ├── BasicState.js
│ │ │ │ ├── BlockEndState.js
│ │ │ │ ├── BlockStartState.js
│ │ │ │ ├── DecisionState.d.ts
│ │ │ │ ├── DecisionState.js
│ │ │ │ ├── LoopEndState.js
│ │ │ │ ├── PlusBlockStartState.js
│ │ │ │ ├── PlusLoopbackState.js
│ │ │ │ ├── RuleStartState.d.ts
│ │ │ │ ├── RuleStartState.js
│ │ │ │ ├── RuleStopState.d.ts
│ │ │ │ ├── RuleStopState.js
│ │ │ │ ├── StarBlockStartState.js
│ │ │ │ ├── StarLoopEntryState.js
│ │ │ │ ├── StarLoopbackState.js
│ │ │ │ ├── TokensStartState.js
│ │ │ │ └── index.d.ts
│ │ │ ├── transition/
│ │ │ │ ├── ActionTransition.js
│ │ │ │ ├── AtomTransition.js
│ │ │ │ ├── EpsilonTransition.js
│ │ │ │ ├── NotSetTransition.js
│ │ │ │ ├── PrecedencePredicateTransition.js
│ │ │ │ ├── PredicateTransition.js
│ │ │ │ ├── RangeTransition.js
│ │ │ │ ├── RuleTransition.js
│ │ │ │ ├── SetTransition.js
│ │ │ │ ├── Transition.js
│ │ │ │ └── WildcardTransition.js
│ │ │ ├── tree/
│ │ │ │ ├── ErrorNode.d.ts
│ │ │ │ ├── ErrorNode.js
│ │ │ │ ├── ErrorNodeImpl.js
│ │ │ │ ├── ParseTree.d.ts
│ │ │ │ ├── ParseTree.js
│ │ │ │ ├── ParseTreeListener.d.ts
│ │ │ │ ├── ParseTreeListener.js
│ │ │ │ ├── ParseTreeVisitor.d.ts
│ │ │ │ ├── ParseTreeVisitor.js
│ │ │ │ ├── ParseTreeWalker.d.ts
│ │ │ │ ├── ParseTreeWalker.js
│ │ │ │ ├── RuleNode.d.ts
│ │ │ │ ├── RuleNode.js
│ │ │ │ ├── SyntaxTree.d.ts
│ │ │ │ ├── SyntaxTree.js
│ │ │ │ ├── TerminalNode.d.ts
│ │ │ │ ├── TerminalNode.js
│ │ │ │ ├── TerminalNodeImpl.js
│ │ │ │ ├── Tree.d.ts
│ │ │ │ ├── Tree.js
│ │ │ │ ├── Trees.d.ts
│ │ │ │ ├── Trees.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ └── utils/
│ │ │ ├── DoubleDict.js
│ │ │ ├── Printer.d.ts
│ │ │ ├── arrayToString.d.ts
│ │ │ ├── arrayToString.js
│ │ │ ├── equalArrays.js
│ │ │ ├── escapeWhitespace.js
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── standardEqualsFunction.js
│ │ │ ├── standardHashCodeFunction.js
│ │ │ ├── stringHashCode.js
│ │ │ ├── stringToCharArray.d.ts
│ │ │ ├── stringToCharArray.js
│ │ │ ├── titleCase.js
│ │ │ └── valueToString.js
│ │ ├── test-builds.sh
│ │ ├── tsconfig.json
│ │ └── webpack.config.js
│ ├── Python3/
│ │ ├── MANIFEST.in
│ │ ├── README.txt
│ │ ├── RELEASE-4.5.txt
│ │ ├── pyproject.toml
│ │ ├── src/
│ │ │ └── antlr4/
│ │ │ ├── BufferedTokenStream.py
│ │ │ ├── CommonTokenFactory.py
│ │ │ ├── CommonTokenStream.py
│ │ │ ├── FileStream.py
│ │ │ ├── InputStream.py
│ │ │ ├── IntervalSet.py
│ │ │ ├── LL1Analyzer.py
│ │ │ ├── Lexer.py
│ │ │ ├── ListTokenSource.py
│ │ │ ├── Parser.py
│ │ │ ├── ParserInterpreter.py
│ │ │ ├── ParserRuleContext.py
│ │ │ ├── PredictionContext.py
│ │ │ ├── Recognizer.py
│ │ │ ├── RuleContext.py
│ │ │ ├── StdinStream.py
│ │ │ ├── Token.py
│ │ │ ├── TokenStreamRewriter.py
│ │ │ ├── Utils.py
│ │ │ ├── __init__.py
│ │ │ ├── _pygrun.py
│ │ │ ├── atn/
│ │ │ │ ├── ATN.py
│ │ │ │ ├── ATNConfig.py
│ │ │ │ ├── ATNConfigSet.py
│ │ │ │ ├── ATNDeserializationOptions.py
│ │ │ │ ├── ATNDeserializer.py
│ │ │ │ ├── ATNSimulator.py
│ │ │ │ ├── ATNState.py
│ │ │ │ ├── ATNType.py
│ │ │ │ ├── LexerATNSimulator.py
│ │ │ │ ├── LexerAction.py
│ │ │ │ ├── LexerActionExecutor.py
│ │ │ │ ├── ParserATNSimulator.py
│ │ │ │ ├── PredictionMode.py
│ │ │ │ ├── SemanticContext.py
│ │ │ │ ├── Transition.py
│ │ │ │ └── __init__.py
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.py
│ │ │ │ ├── DFASerializer.py
│ │ │ │ ├── DFAState.py
│ │ │ │ └── __init__.py
│ │ │ ├── error/
│ │ │ │ ├── DiagnosticErrorListener.py
│ │ │ │ ├── ErrorListener.py
│ │ │ │ ├── ErrorStrategy.py
│ │ │ │ ├── Errors.py
│ │ │ │ └── __init__.py
│ │ │ ├── tree/
│ │ │ │ ├── Chunk.py
│ │ │ │ ├── ParseTreeMatch.py
│ │ │ │ ├── ParseTreePattern.py
│ │ │ │ ├── ParseTreePatternMatcher.py
│ │ │ │ ├── RuleTagToken.py
│ │ │ │ ├── TokenTagToken.py
│ │ │ │ ├── Tree.py
│ │ │ │ ├── Trees.py
│ │ │ │ └── __init__.py
│ │ │ └── xpath/
│ │ │ ├── XPath.py
│ │ │ ├── XPathLexer.g4
│ │ │ ├── XPathLexer.py
│ │ │ └── __init__.py
│ │ └── tests/
│ │ ├── TestFileStream.py
│ │ ├── TestInputStream.py
│ │ ├── TestIntervalSet.py
│ │ ├── TestRecognizer.py
│ │ ├── TestTokenStreamRewriter.py
│ │ ├── __init__.py
│ │ ├── c.c
│ │ ├── ctest.py
│ │ ├── expr/
│ │ │ ├── Expr.g4
│ │ │ ├── ExprLexer.py
│ │ │ └── ExprParser.py
│ │ ├── mocks/
│ │ │ ├── TestLexer.py
│ │ │ └── __init__.py
│ │ ├── parser/
│ │ │ ├── __init__.py
│ │ │ ├── clexer.py
│ │ │ └── cparser.py
│ │ ├── run.py
│ │ └── xpathtest.py
│ └── Swift/
│ ├── .gitignore
│ ├── Sources/
│ │ ├── Antlr4/
│ │ │ ├── ANTLRErrorListener.swift
│ │ │ ├── ANTLRErrorStrategy.swift
│ │ │ ├── ANTLRFileStream.swift
│ │ │ ├── ANTLRInputStream.swift
│ │ │ ├── BailErrorStrategy.swift
│ │ │ ├── BaseErrorListener.swift
│ │ │ ├── BufferedTokenStream.swift
│ │ │ ├── CharStream.swift
│ │ │ ├── CommonToken.swift
│ │ │ ├── CommonTokenFactory.swift
│ │ │ ├── CommonTokenStream.swift
│ │ │ ├── ConsoleErrorListener.swift
│ │ │ ├── DefaultErrorStrategy.swift
│ │ │ ├── DiagnosticErrorListener.swift
│ │ │ ├── FailedPredicateException.swift
│ │ │ ├── InputMismatchException.swift
│ │ │ ├── IntStream.swift
│ │ │ ├── InterpreterRuleContext.swift
│ │ │ ├── Lexer.swift
│ │ │ ├── LexerInterpreter.swift
│ │ │ ├── LexerNoViableAltException.swift
│ │ │ ├── ListTokenSource.swift
│ │ │ ├── NoViableAltException.swift
│ │ │ ├── Parser.swift
│ │ │ ├── ParserInterpreter.swift
│ │ │ ├── ParserRuleContext.swift
│ │ │ ├── ProxyErrorListener.swift
│ │ │ ├── RecognitionException.swift
│ │ │ ├── Recognizer.swift
│ │ │ ├── RuleContext.swift
│ │ │ ├── RuntimeMetaData.swift
│ │ │ ├── Token.swift
│ │ │ ├── TokenFactory.swift
│ │ │ ├── TokenSource.swift
│ │ │ ├── TokenStream.swift
│ │ │ ├── TokenStreamRewriter.swift
│ │ │ ├── UnbufferedCharStream.swift
│ │ │ ├── UnbufferedTokenStream.swift
│ │ │ ├── VocabularySingle.swift
│ │ │ ├── WritableToken.swift
│ │ │ ├── atn/
│ │ │ │ ├── ATN.swift
│ │ │ │ ├── ATNConfig.swift
│ │ │ │ ├── ATNConfigSet.swift
│ │ │ │ ├── ATNDeserializationOptions.swift
│ │ │ │ ├── ATNDeserializer.swift
│ │ │ │ ├── ATNSimulator.swift
│ │ │ │ ├── ATNState.swift
│ │ │ │ ├── ATNType.swift
│ │ │ │ ├── AbstractPredicateTransition.swift
│ │ │ │ ├── ActionTransition.swift
│ │ │ │ ├── AmbiguityInfo.swift
│ │ │ │ ├── ArrayPredictionContext.swift
│ │ │ │ ├── AtomTransition.swift
│ │ │ │ ├── BasicBlockStartState.swift
│ │ │ │ ├── BasicState.swift
│ │ │ │ ├── BlockEndState.swift
│ │ │ │ ├── BlockStartState.swift
│ │ │ │ ├── ContextSensitivityInfo.swift
│ │ │ │ ├── DecisionEventInfo.swift
│ │ │ │ ├── DecisionInfo.swift
│ │ │ │ ├── DecisionState.swift
│ │ │ │ ├── DefaultATNConfig.swift
│ │ │ │ ├── EmptyPredictionContext.swift
│ │ │ │ ├── EpsilonTransition.swift
│ │ │ │ ├── ErrorInfo.swift
│ │ │ │ ├── LL1Analyzer.swift
│ │ │ │ ├── LexerATNConfig.swift
│ │ │ │ ├── LexerATNSimulator.swift
│ │ │ │ ├── LexerAction.swift
│ │ │ │ ├── LexerActionExecutor.swift
│ │ │ │ ├── LexerActionType.swift
│ │ │ │ ├── LexerChannelAction.swift
│ │ │ │ ├── LexerCustomAction.swift
│ │ │ │ ├── LexerIndexedCustomAction.swift
│ │ │ │ ├── LexerModeAction.swift
│ │ │ │ ├── LexerMoreAction.swift
│ │ │ │ ├── LexerPopModeAction.swift
│ │ │ │ ├── LexerPushModeAction.swift
│ │ │ │ ├── LexerSkipAction.swift
│ │ │ │ ├── LexerTypeAction.swift
│ │ │ │ ├── LookaheadEventInfo.swift
│ │ │ │ ├── LookupATNConfig.swift
│ │ │ │ ├── LookupDictionary.swift
│ │ │ │ ├── LoopEndState.swift
│ │ │ │ ├── NotSetTransition.swift
│ │ │ │ ├── ParseInfo.swift
│ │ │ │ ├── ParserATNSimulator.swift
│ │ │ │ ├── PlusBlockStartState.swift
│ │ │ │ ├── PlusLoopbackState.swift
│ │ │ │ ├── PrecedencePredicateTransition.swift
│ │ │ │ ├── PredicateEvalInfo.swift
│ │ │ │ ├── PredicateTransition.swift
│ │ │ │ ├── PredictionContext.swift
│ │ │ │ ├── PredictionContextCache.swift
│ │ │ │ ├── PredictionMode.swift
│ │ │ │ ├── ProfilingATNSimulator.swift
│ │ │ │ ├── RangeTransition.swift
│ │ │ │ ├── RuleStartState.swift
│ │ │ │ ├── RuleStopState.swift
│ │ │ │ ├── RuleTransition.swift
│ │ │ │ ├── SemanticContext.swift
│ │ │ │ ├── SetTransition.swift
│ │ │ │ ├── SingletonPredictionContext.swift
│ │ │ │ ├── StarBlockStartState.swift
│ │ │ │ ├── StarLoopEntryState.swift
│ │ │ │ ├── StarLoopbackState.swift
│ │ │ │ ├── TokensStartState.swift
│ │ │ │ ├── Transition.swift
│ │ │ │ └── WildcardTransition.swift
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.swift
│ │ │ │ ├── DFASerializer.swift
│ │ │ │ ├── DFAState.swift
│ │ │ │ └── LexerDFASerializer.swift
│ │ │ ├── misc/
│ │ │ │ ├── BitSet.swift
│ │ │ │ ├── DoubleKeyMap.swift
│ │ │ │ ├── IntSet.swift
│ │ │ │ ├── InterpreterDataReader.swift
│ │ │ │ ├── Interval.swift
│ │ │ │ ├── IntervalSet.swift
│ │ │ │ ├── MultiMap.swift
│ │ │ │ ├── MurmurHash.swift
│ │ │ │ ├── Utils.swift
│ │ │ │ ├── exception/
│ │ │ │ │ ├── ANTLRError.swift
│ │ │ │ │ └── ANTLRException.swift
│ │ │ │ ├── extension/
│ │ │ │ │ ├── ArrayExtension.swift
│ │ │ │ │ ├── CharacterExtension.swift
│ │ │ │ │ ├── IntStreamExtension.swift
│ │ │ │ │ ├── StringExtension.swift
│ │ │ │ │ ├── TokenExtension.swift
│ │ │ │ │ └── UUIDExtension.swift
│ │ │ │ └── utils/
│ │ │ │ ├── CommonUtil.swift
│ │ │ │ ├── Mutex.swift
│ │ │ │ └── Stack.swift
│ │ │ └── tree/
│ │ │ ├── AbstractParseTreeVisitor.swift
│ │ │ ├── ErrorNode.swift
│ │ │ ├── ParseTree.swift
│ │ │ ├── ParseTreeListener.swift
│ │ │ ├── ParseTreeProperty.swift
│ │ │ ├── ParseTreeVisitor.swift
│ │ │ ├── ParseTreeWalker.swift
│ │ │ ├── RuleNode.swift
│ │ │ ├── SyntaxTree.swift
│ │ │ ├── TerminalNode.swift
│ │ │ ├── TerminalNodeImpl.swift
│ │ │ ├── Tree.swift
│ │ │ ├── Trees.swift
│ │ │ └── pattern/
│ │ │ ├── Chunk.swift
│ │ │ ├── ParseTreeMatch.swift
│ │ │ ├── ParseTreePattern.swift
│ │ │ ├── ParseTreePatternMatcher.swift
│ │ │ ├── RuleTagToken.swift
│ │ │ ├── TagChunk.swift
│ │ │ ├── TextChunk.swift
│ │ │ └── TokenTagToken.swift
│ │ ├── Info-IOS.plist
│ │ └── Info-OSX.plist
│ ├── Tests/
│ │ ├── Antlr4Tests/
│ │ │ ├── ANTLRInputStreamTests.swift
│ │ │ ├── InterpreterDataTests.swift
│ │ │ ├── LexerA.g4
│ │ │ ├── LexerB.g4
│ │ │ ├── MurmurHashTests.swift
│ │ │ ├── ParseTreePatternMatcherTests.swift
│ │ │ ├── RuntimeMetaDataTests.swift
│ │ │ ├── StringExtensionTests.swift
│ │ │ ├── Threading.g4
│ │ │ ├── ThreadingTests.swift
│ │ │ ├── TokenStreamRewriterTests.swift
│ │ │ ├── TokenStreamTests.swift
│ │ │ ├── VisitorBasic.g4
│ │ │ ├── VisitorCalc.g4
│ │ │ └── VisitorTests.swift
│ │ ├── Info.plist
│ │ └── LinuxMain.swift
│ └── boot.py
├── runtime-testsuite/
│ ├── pom.xml
│ ├── resources/
│ │ ├── junit-platform.properties
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── test/
│ │ └── runtime/
│ │ ├── descriptors/
│ │ │ ├── CompositeLexers/
│ │ │ │ ├── LexerDelegatorInvokesDelegateRule.txt
│ │ │ │ └── LexerDelegatorRuleOverridesDelegate.txt
│ │ │ ├── CompositeParsers/
│ │ │ │ ├── BringInLiteralsFromDelegate.txt
│ │ │ │ ├── CombinedImportsCombined.txt
│ │ │ │ ├── DelegatesSeeSameTokenType.txt
│ │ │ │ ├── DelegatorAccessesDelegateMembers.txt
│ │ │ │ ├── DelegatorInvokesDelegateRule.txt
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithArgs.txt
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithReturnStruct.txt
│ │ │ │ ├── DelegatorInvokesFirstVersionOfDelegateRule.txt
│ │ │ │ ├── DelegatorRuleOverridesDelegate.txt
│ │ │ │ ├── DelegatorRuleOverridesDelegates.txt
│ │ │ │ ├── DelegatorRuleOverridesLookaheadInDelegate.txt
│ │ │ │ ├── ImportLexerWithOnlyFragmentRules.txt
│ │ │ │ ├── ImportedGrammarWithEmptyOptions.txt
│ │ │ │ ├── ImportedRuleWithAction.txt
│ │ │ │ └── KeywordVSIDOrder.txt
│ │ │ ├── FullContextParsing/
│ │ │ │ ├── AmbigYieldsCtxSensitiveDFA.txt
│ │ │ │ ├── AmbiguityNoLoop.txt
│ │ │ │ ├── CtxSensitiveDFATwoDiffInput.txt
│ │ │ │ ├── CtxSensitiveDFA_1.txt
│ │ │ │ ├── CtxSensitiveDFA_2.txt
│ │ │ │ ├── ExprAmbiguity_1.txt
│ │ │ │ ├── ExprAmbiguity_2.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_1.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_2.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_3.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_4.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_5.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_6.txt
│ │ │ │ ├── LoopsSimulateTailRecursion.txt
│ │ │ │ └── SLLSeesEOFInLLGrammar.txt
│ │ │ ├── LeftRecursion/
│ │ │ │ ├── AmbigLR_1.txt
│ │ │ │ ├── AmbigLR_2.txt
│ │ │ │ ├── AmbigLR_3.txt
│ │ │ │ ├── AmbigLR_4.txt
│ │ │ │ ├── AmbigLR_5.txt
│ │ │ │ ├── Declarations_1.txt
│ │ │ │ ├── Declarations_10.txt
│ │ │ │ ├── Declarations_2.txt
│ │ │ │ ├── Declarations_3.txt
│ │ │ │ ├── Declarations_4.txt
│ │ │ │ ├── Declarations_5.txt
│ │ │ │ ├── Declarations_6.txt
│ │ │ │ ├── Declarations_7.txt
│ │ │ │ ├── Declarations_8.txt
│ │ │ │ ├── Declarations_9.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_1.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_2.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_3.txt
│ │ │ │ ├── Expressions_1.txt
│ │ │ │ ├── Expressions_2.txt
│ │ │ │ ├── Expressions_3.txt
│ │ │ │ ├── Expressions_4.txt
│ │ │ │ ├── Expressions_5.txt
│ │ │ │ ├── Expressions_6.txt
│ │ │ │ ├── Expressions_7.txt
│ │ │ │ ├── JavaExpressions_1.txt
│ │ │ │ ├── JavaExpressions_10.txt
│ │ │ │ ├── JavaExpressions_11.txt
│ │ │ │ ├── JavaExpressions_12.txt
│ │ │ │ ├── JavaExpressions_2.txt
│ │ │ │ ├── JavaExpressions_3.txt
│ │ │ │ ├── JavaExpressions_4.txt
│ │ │ │ ├── JavaExpressions_5.txt
│ │ │ │ ├── JavaExpressions_6.txt
│ │ │ │ ├── JavaExpressions_7.txt
│ │ │ │ ├── JavaExpressions_8.txt
│ │ │ │ ├── JavaExpressions_9.txt
│ │ │ │ ├── LabelsOnOpSubrule_1.txt
│ │ │ │ ├── LabelsOnOpSubrule_2.txt
│ │ │ │ ├── LabelsOnOpSubrule_3.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_1.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_2.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_3.txt
│ │ │ │ ├── MultipleActions_1.txt
│ │ │ │ ├── MultipleActions_2.txt
│ │ │ │ ├── MultipleActions_3.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_1.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_2.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_3.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_4.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_5.txt
│ │ │ │ ├── PrecedenceFilterConsidersContext.txt
│ │ │ │ ├── PrefixAndOtherAlt_1.txt
│ │ │ │ ├── PrefixAndOtherAlt_2.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_1.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_2.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_3.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_1.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_2.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_3.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_4.txt
│ │ │ │ ├── ReturnValueAndActionsList1_1.txt
│ │ │ │ ├── ReturnValueAndActionsList1_2.txt
│ │ │ │ ├── ReturnValueAndActionsList1_3.txt
│ │ │ │ ├── ReturnValueAndActionsList1_4.txt
│ │ │ │ ├── ReturnValueAndActionsList2_1.txt
│ │ │ │ ├── ReturnValueAndActionsList2_2.txt
│ │ │ │ ├── ReturnValueAndActionsList2_3.txt
│ │ │ │ ├── ReturnValueAndActionsList2_4.txt
│ │ │ │ ├── ReturnValueAndActions_1.txt
│ │ │ │ ├── ReturnValueAndActions_2.txt
│ │ │ │ ├── ReturnValueAndActions_3.txt
│ │ │ │ ├── ReturnValueAndActions_4.txt
│ │ │ │ ├── SemPred.txt
│ │ │ │ ├── SemPredFailOption.txt
│ │ │ │ ├── Simple_1.txt
│ │ │ │ ├── Simple_2.txt
│ │ │ │ ├── Simple_3.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_1.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_2.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_3.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_4.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_5.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_6.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_7.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_8.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_9.txt
│ │ │ │ ├── TernaryExpr_1.txt
│ │ │ │ ├── TernaryExpr_2.txt
│ │ │ │ ├── TernaryExpr_3.txt
│ │ │ │ ├── TernaryExpr_4.txt
│ │ │ │ ├── TernaryExpr_5.txt
│ │ │ │ ├── TernaryExpr_6.txt
│ │ │ │ ├── TernaryExpr_7.txt
│ │ │ │ ├── TernaryExpr_8.txt
│ │ │ │ ├── TernaryExpr_9.txt
│ │ │ │ ├── WhitespaceInfluence_1.txt
│ │ │ │ └── WhitespaceInfluence_2.txt
│ │ │ ├── LexerErrors/
│ │ │ │ ├── DFAToATNThatFailsBackToDFA.txt
│ │ │ │ ├── DFAToATNThatMatchesThenFailsInATN.txt
│ │ │ │ ├── EnforcedGreedyNestedBraces_1.txt
│ │ │ │ ├── EnforcedGreedyNestedBraces_2.txt
│ │ │ │ ├── ErrorInMiddle.txt
│ │ │ │ ├── InvalidCharAtStart.txt
│ │ │ │ ├── InvalidCharAtStartAfterDFACache.txt
│ │ │ │ ├── InvalidCharInToken.txt
│ │ │ │ ├── InvalidCharInTokenAfterDFACache.txt
│ │ │ │ ├── LexerExecDFA.txt
│ │ │ │ ├── StringsEmbeddedInActions_1.txt
│ │ │ │ └── StringsEmbeddedInActions_2.txt
│ │ │ ├── LexerExec/
│ │ │ │ ├── ActionPlacement.txt
│ │ │ │ ├── CharSet.txt
│ │ │ │ ├── CharSetInSet.txt
│ │ │ │ ├── CharSetNot.txt
│ │ │ │ ├── CharSetPlus.txt
│ │ │ │ ├── CharSetRange.txt
│ │ │ │ ├── CharSetWithEscapedChar.txt
│ │ │ │ ├── CharSetWithMissingEscapeChar.txt
│ │ │ │ ├── CharSetWithQuote1.txt
│ │ │ │ ├── CharSetWithQuote2.txt
│ │ │ │ ├── EOFByItself.txt
│ │ │ │ ├── EOFSuffixInFirstRule_1.txt
│ │ │ │ ├── EOFSuffixInFirstRule_2.txt
│ │ │ │ ├── EscapeTargetStringLiteral.txt
│ │ │ │ ├── EscapedCharacters.txt
│ │ │ │ ├── GreedyClosure.txt
│ │ │ │ ├── GreedyConfigs.txt
│ │ │ │ ├── GreedyOptional.txt
│ │ │ │ ├── GreedyPositiveClosure.txt
│ │ │ │ ├── HexVsID.txt
│ │ │ │ ├── KeywordID.txt
│ │ │ │ ├── NonGreedyClosure.txt
│ │ │ │ ├── NonGreedyConfigs.txt
│ │ │ │ ├── NonGreedyOptional.txt
│ │ │ │ ├── NonGreedyPositiveClosure.txt
│ │ │ │ ├── NonGreedyTermination1.txt
│ │ │ │ ├── NonGreedyTermination2.txt
│ │ │ │ ├── Parentheses.txt
│ │ │ │ ├── PositionAdjustingLexer.txt
│ │ │ │ ├── QuoteTranslation.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_1.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_2.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_1.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_2.txt
│ │ │ │ ├── RefToRuleDoesNotSetTokenNorEmitAnother.txt
│ │ │ │ ├── ReservedWordsEscaping.txt
│ │ │ │ ├── ReservedWordsEscaping_NULL.txt
│ │ │ │ ├── Slashes.txt
│ │ │ │ ├── StackoverflowDueToNotEscapedHyphen.txt
│ │ │ │ ├── TokenType0xFFFF.txt
│ │ │ │ ├── UnicodeCharSet.txt
│ │ │ │ └── ZeroLengthToken.txt
│ │ │ ├── Listeners/
│ │ │ │ ├── Basic.txt
│ │ │ │ ├── LR.txt
│ │ │ │ ├── LRWithLabels.txt
│ │ │ │ ├── RuleGetters_1.txt
│ │ │ │ ├── RuleGetters_2.txt
│ │ │ │ ├── TokenGetters_1.txt
│ │ │ │ └── TokenGetters_2.txt
│ │ │ ├── ParseTrees/
│ │ │ │ ├── AltNum.txt
│ │ │ │ ├── ExtraToken.txt
│ │ │ │ ├── ExtraTokensAndAltLabels.txt
│ │ │ │ ├── NoViableAlt.txt
│ │ │ │ ├── RuleRef.txt
│ │ │ │ ├── Sync.txt
│ │ │ │ ├── Token2.txt
│ │ │ │ ├── TokenAndRuleContextString.txt
│ │ │ │ ├── TwoAltLoop.txt
│ │ │ │ └── TwoAlts.txt
│ │ │ ├── ParserErrors/
│ │ │ │ ├── ConjuringUpToken.txt
│ │ │ │ ├── ConjuringUpTokenFromSet.txt
│ │ │ │ ├── ContextListGetters.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_1.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_2.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_3.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_4.txt
│ │ │ │ ├── ExtraneousInput.txt
│ │ │ │ ├── InvalidATNStateRemoval.txt
│ │ │ │ ├── InvalidEmptyInput.txt
│ │ │ │ ├── LL1ErrorInfo.txt
│ │ │ │ ├── LL2.txt
│ │ │ │ ├── LL3.txt
│ │ │ │ ├── LLStar.txt
│ │ │ │ ├── MultiTokenDeletionBeforeLoop.txt
│ │ │ │ ├── MultiTokenDeletionBeforeLoop2.txt
│ │ │ │ ├── MultiTokenDeletionDuringLoop.txt
│ │ │ │ ├── MultiTokenDeletionDuringLoop2.txt
│ │ │ │ ├── NoViableAltAvoidance.txt
│ │ │ │ ├── SingleSetInsertion.txt
│ │ │ │ ├── SingleSetInsertionConsumption.txt
│ │ │ │ ├── SingleTokenDeletion.txt
│ │ │ │ ├── SingleTokenDeletionBeforeAlt.txt
│ │ │ │ ├── SingleTokenDeletionBeforeLoop.txt
│ │ │ │ ├── SingleTokenDeletionBeforeLoop2.txt
│ │ │ │ ├── SingleTokenDeletionBeforePredict.txt
│ │ │ │ ├── SingleTokenDeletionConsumption.txt
│ │ │ │ ├── SingleTokenDeletionDuringLoop.txt
│ │ │ │ ├── SingleTokenDeletionDuringLoop2.txt
│ │ │ │ ├── SingleTokenDeletionExpectingSet.txt
│ │ │ │ ├── SingleTokenInsertion.txt
│ │ │ │ ├── TokenMismatch.txt
│ │ │ │ ├── TokenMismatch2.txt
│ │ │ │ └── TokenMismatch3.txt
│ │ │ ├── ParserExec/
│ │ │ │ ├── APlus.txt
│ │ │ │ ├── AStar_1.txt
│ │ │ │ ├── AStar_2.txt
│ │ │ │ ├── AorAPlus.txt
│ │ │ │ ├── AorAStar_1.txt
│ │ │ │ ├── AorAStar_2.txt
│ │ │ │ ├── AorB.txt
│ │ │ │ ├── AorBPlus.txt
│ │ │ │ ├── AorBStar_1.txt
│ │ │ │ ├── AorBStar_2.txt
│ │ │ │ ├── Basic.txt
│ │ │ │ ├── BuildParseTree_FALSE.txt
│ │ │ │ ├── BuildParseTree_TRUE.txt
│ │ │ │ ├── IfIfElseGreedyBinding1.txt
│ │ │ │ ├── IfIfElseGreedyBinding2.txt
│ │ │ │ ├── IfIfElseNonGreedyBinding1.txt
│ │ │ │ ├── IfIfElseNonGreedyBinding2.txt
│ │ │ │ ├── Keyword_1.txt
│ │ │ │ ├── Keyword_2.txt
│ │ │ │ ├── Keyword_3.txt
│ │ │ │ ├── Keyword_4.txt
│ │ │ │ ├── Keyword_5.txt
│ │ │ │ ├── Keyword_6.txt
│ │ │ │ ├── LL1OptionalBlock_1.txt
│ │ │ │ ├── LL1OptionalBlock_2.txt
│ │ │ │ ├── LabelAliasingAcrossLabeledAlternatives.txt
│ │ │ │ ├── Labels.txt
│ │ │ │ ├── ListLabelForClosureContext.txt
│ │ │ │ ├── ListLabelsOnRuleRefStartOfAlt.txt
│ │ │ │ ├── ListLabelsOnSet.txt
│ │ │ │ ├── MultipleEOFHandling.txt
│ │ │ │ ├── OpenDeviceStatement_Case1.txt
│ │ │ │ ├── OpenDeviceStatement_Case2.txt
│ │ │ │ ├── OpenDeviceStatement_Case3.txt
│ │ │ │ ├── Optional_1.txt
│ │ │ │ ├── Optional_2.txt
│ │ │ │ ├── Optional_3.txt
│ │ │ │ ├── Optional_4.txt
│ │ │ │ ├── OrderingPredicates.txt
│ │ │ │ ├── ParserProperty.txt
│ │ │ │ ├── PredicatedIfIfElse.txt
│ │ │ │ ├── PredictionIssue334.txt
│ │ │ │ ├── PredictionMode_LL.txt
│ │ │ │ ├── PredictionMode_SLL.txt
│ │ │ │ ├── ReferenceToATN_1.txt
│ │ │ │ ├── ReferenceToATN_2.txt
│ │ │ │ ├── ReservedWordsEscaping.txt
│ │ │ │ ├── TokenOffset.txt
│ │ │ │ ├── Wildcard.txt
│ │ │ │ └── uStartingCharDoesNotCauseIllegalUnicodeEscape.txt
│ │ │ ├── Performance/
│ │ │ │ ├── DropLoopEntryBranchInLRRule_1.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_2.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_3.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_4.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_5.txt
│ │ │ │ ├── ExpressionGrammar_1.txt
│ │ │ │ └── ExpressionGrammar_2.txt
│ │ │ ├── SemPredEvalLexer/
│ │ │ │ ├── DisableRule.txt
│ │ │ │ ├── EnumNotID.txt
│ │ │ │ ├── IDnotEnum.txt
│ │ │ │ ├── IDvsEnum.txt
│ │ │ │ ├── Indent.txt
│ │ │ │ ├── LexerInputPositionSensitivePredicates.txt
│ │ │ │ ├── PredicatedKeywords.txt
│ │ │ │ └── RuleSempredFunction.txt
│ │ │ ├── SemPredEvalParser/
│ │ │ │ ├── ActionHidesPreds.txt
│ │ │ │ ├── ActionsHidePredsInGlobalFOLLOW.txt
│ │ │ │ ├── AtomWithClosureInTranslatedLRRule.txt
│ │ │ │ ├── DepedentPredsInGlobalFOLLOW.txt
│ │ │ │ ├── DependentPredNotInOuterCtxShouldBeIgnored.txt
│ │ │ │ ├── DisabledAlternative.txt
│ │ │ │ ├── IndependentPredNotPassedOuterCtxToAvoidCastException.txt
│ │ │ │ ├── NoTruePredsThrowsNoViableAlt.txt
│ │ │ │ ├── Order.txt
│ │ │ │ ├── PredFromAltTestedInLoopBack_1.txt
│ │ │ │ ├── PredFromAltTestedInLoopBack_2.txt
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_1.txt
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_2.txt
│ │ │ │ ├── PredicateDependentOnArg.txt
│ │ │ │ ├── PredicateDependentOnArg2.txt
│ │ │ │ ├── PredsInGlobalFOLLOW.txt
│ │ │ │ ├── RewindBeforePredEval.txt
│ │ │ │ ├── Simple.txt
│ │ │ │ ├── SimpleValidate.txt
│ │ │ │ ├── SimpleValidate2.txt
│ │ │ │ ├── ToLeft.txt
│ │ │ │ ├── ToLeftWithVaryingPredicate.txt
│ │ │ │ ├── TwoUnpredicatedAlts.txt
│ │ │ │ ├── TwoUnpredicatedAltsAndOneOrthogonalAlt.txt
│ │ │ │ ├── UnpredicatedPathsInAlt.txt
│ │ │ │ └── ValidateInDFA.txt
│ │ │ └── Sets/
│ │ │ ├── CharSetLiteral.txt
│ │ │ ├── ComplementSet.txt
│ │ │ ├── LexerOptionalSet.txt
│ │ │ ├── LexerPlusSet.txt
│ │ │ ├── LexerStarSet.txt
│ │ │ ├── NotChar.txt
│ │ │ ├── NotCharSet.txt
│ │ │ ├── NotCharSetWithRuleRef3.txt
│ │ │ ├── OptionalLexerSingleElement.txt
│ │ │ ├── OptionalSet.txt
│ │ │ ├── OptionalSingleElement.txt
│ │ │ ├── ParserNotSet.txt
│ │ │ ├── ParserNotToken.txt
│ │ │ ├── ParserNotTokenWithLabel.txt
│ │ │ ├── ParserSet.txt
│ │ │ ├── PlusLexerSingleElement.txt
│ │ │ ├── PlusSet.txt
│ │ │ ├── RuleAsSet.txt
│ │ │ ├── SeqDoesNotBecomeSet.txt
│ │ │ ├── StarLexerSingleElement_1.txt
│ │ │ ├── StarLexerSingleElement_2.txt
│ │ │ ├── StarSet.txt
│ │ │ ├── UnicodeEscapedBMPRangeSet.txt
│ │ │ ├── UnicodeEscapedBMPSet.txt
│ │ │ ├── UnicodeEscapedSMPRangeSet.txt
│ │ │ ├── UnicodeEscapedSMPRangeSetMismatch.txt
│ │ │ ├── UnicodeEscapedSMPSet.txt
│ │ │ ├── UnicodeNegatedBMPSetIncludesSMPCodePoints.txt
│ │ │ ├── UnicodeNegatedSMPSetIncludesBMPCodePoints.txt
│ │ │ ├── UnicodeUnescapedBMPRangeSet.txt
│ │ │ └── UnicodeUnescapedBMPSet.txt
│ │ ├── helpers/
│ │ │ ├── Antlr4.Test.csproj.stg
│ │ │ ├── Package.swift.stg
│ │ │ ├── Test.cpp.stg
│ │ │ ├── Test.cs.stg
│ │ │ ├── Test.dart.stg
│ │ │ ├── Test.go.stg
│ │ │ ├── Test.js.stg
│ │ │ ├── Test.php.stg
│ │ │ ├── Test.py.stg
│ │ │ ├── Test.ts.stg
│ │ │ ├── Test.vcxproj.stg
│ │ │ ├── main.swift.stg
│ │ │ ├── package_js.json
│ │ │ ├── package_ts.json
│ │ │ ├── pubspec.yaml.stg
│ │ │ └── tsconfig.json
│ │ └── templates/
│ │ ├── CSharp.test.stg
│ │ ├── Cpp.test.stg
│ │ ├── Dart.test.stg
│ │ ├── Go.test.stg
│ │ ├── Java.test.stg
│ │ ├── JavaScript.test.stg
│ │ ├── PHP.test.stg
│ │ ├── Python3.test.stg
│ │ ├── Swift.test.stg
│ │ └── TypeScript.test.stg
│ └── test/
│ └── org/
│ └── antlr/
│ └── v4/
│ ├── runtime/
│ │ └── TestCodePointCharStream.java
│ └── test/
│ └── runtime/
│ ├── CustomDescriptors.java
│ ├── ErrorQueue.java
│ ├── FileUtils.java
│ ├── GeneratedFile.java
│ ├── Generator.java
│ ├── GrammarType.java
│ ├── OSType.java
│ ├── Processor.java
│ ├── ProcessorResult.java
│ ├── README.md
│ ├── RunOptions.java
│ ├── RuntimeRunner.java
│ ├── RuntimeTestDescriptor.java
│ ├── RuntimeTestDescriptorParser.java
│ ├── RuntimeTestUtils.java
│ ├── RuntimeTests.java
│ ├── Stage.java
│ ├── StreamReader.java
│ ├── TraceATN.java
│ ├── cpp/
│ │ ├── CppRunner.java
│ │ └── CppRuntimeTests.java
│ ├── csharp/
│ │ ├── CSharpRunner.java
│ │ └── CSharpRuntimeTests.java
│ ├── dart/
│ │ ├── DartRunner.java
│ │ └── DartRuntimeTests.java
│ ├── go/
│ │ ├── GoRunner.java
│ │ └── GoRuntimeTests.java
│ ├── java/
│ │ ├── JavaRunner.java
│ │ ├── JavaRuntimeTests.java
│ │ ├── TestCharStreams.java
│ │ ├── TestIntegerList.java
│ │ ├── TestInterpreterDataReader.java
│ │ ├── api/
│ │ │ ├── Java.g4
│ │ │ ├── TestExpectedTokens.java
│ │ │ ├── TestTokenStream.java
│ │ │ ├── TestTokenStreamRewriter.java
│ │ │ ├── TestVisitors.java
│ │ │ ├── VisitorBasic.g4
│ │ │ ├── VisitorCalc.g4
│ │ │ └── perf/
│ │ │ ├── Instrumentor.java
│ │ │ ├── TimeLexerSpeed.java
│ │ │ ├── emoji.txt
│ │ │ ├── graphemes.g4
│ │ │ ├── udhr_hin.txt
│ │ │ └── udhr_kor.txt
│ │ └── helpers/
│ │ ├── CustomStreamErrorListener.java
│ │ ├── RuntimeTestLexer.java
│ │ ├── RuntimeTestParser.java
│ │ └── TreeShapeListener.java
│ ├── javascript/
│ │ ├── JavaScriptRuntimeTests.java
│ │ └── NodeRunner.java
│ ├── php/
│ │ ├── PHPRunner.java
│ │ └── PhpRuntimeTests.java
│ ├── python/
│ │ └── PythonRunner.java
│ ├── python3/
│ │ ├── Python3Runner.java
│ │ └── Python3RuntimeTests.java
│ ├── states/
│ │ ├── CompiledState.java
│ │ ├── ExecutedState.java
│ │ ├── GeneratedState.java
│ │ ├── JavaCompiledState.java
│ │ ├── JavaExecutedState.java
│ │ └── State.java
│ ├── swift/
│ │ ├── SwiftRunner.java
│ │ └── SwiftRuntimeTests.java
│ └── typescript/
│ ├── TsNodeRunner.java
│ └── TypeScriptRuntimeTests.java
├── scripts/
│ ├── deploy_to_website.py
│ ├── files-to-update.txt
│ ├── github_release_notes.py
│ ├── parse-extended-pictographic/
│ │ ├── ExtendedPictographic-Parsed.txt
│ │ ├── ExtendedPictographic.txt
│ │ ├── README.md
│ │ └── parse.py
│ ├── traceatn.sh
│ └── update_antlr_version.py
├── tool/
│ ├── nb-configuration.xml
│ ├── pom.xml
│ ├── resources/
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── tool/
│ │ └── templates/
│ │ ├── LeftRecursiveRules.stg
│ │ ├── codegen/
│ │ │ ├── CSharp/
│ │ │ │ └── CSharp.stg
│ │ │ ├── Cpp/
│ │ │ │ ├── Cpp.stg
│ │ │ │ └── Files.stg
│ │ │ ├── Dart/
│ │ │ │ └── Dart.stg
│ │ │ ├── Go/
│ │ │ │ └── Go.stg
│ │ │ ├── Java/
│ │ │ │ └── Java.stg
│ │ │ ├── JavaScript/
│ │ │ │ └── JavaScript.stg
│ │ │ ├── PHP/
│ │ │ │ └── PHP.stg
│ │ │ ├── Python3/
│ │ │ │ └── Python3.stg
│ │ │ ├── Swift/
│ │ │ │ └── Swift.stg
│ │ │ └── TypeScript/
│ │ │ └── TypeScript.stg
│ │ ├── depend.stg
│ │ ├── dot/
│ │ │ └── graphs.stg
│ │ ├── messages/
│ │ │ └── formats/
│ │ │ ├── antlr.stg
│ │ │ ├── gnu.stg
│ │ │ └── vs2005.stg
│ │ └── unicodedata.st
│ └── src/
│ └── org/
│ └── antlr/
│ └── v4/
│ ├── Tool.java
│ ├── analysis/
│ │ ├── AnalysisPipeline.java
│ │ ├── LeftRecursionDetector.java
│ │ ├── LeftRecursiveRuleAltInfo.java
│ │ ├── LeftRecursiveRuleAnalyzer.java
│ │ └── LeftRecursiveRuleTransformer.java
│ ├── automata/
│ │ ├── ATNFactory.java
│ │ ├── ATNOptimizer.java
│ │ ├── ATNPrinter.java
│ │ ├── ATNVisitor.java
│ │ ├── CharactersDataCheckStatus.java
│ │ ├── LexerATNFactory.java
│ │ ├── ParserATNFactory.java
│ │ ├── RangeBorderCharactersData.java
│ │ └── TailEpsilonRemover.java
│ ├── codegen/
│ │ ├── ActionTranslator.java
│ │ ├── BlankOutputModelFactory.java
│ │ ├── CodeGenPipeline.java
│ │ ├── CodeGenerator.java
│ │ ├── CodeGeneratorExtension.java
│ │ ├── DefaultOutputModelFactory.java
│ │ ├── LexerFactory.java
│ │ ├── OutputModelController.java
│ │ ├── OutputModelFactory.java
│ │ ├── OutputModelWalker.java
│ │ ├── ParserFactory.java
│ │ ├── SourceGenTriggers.g
│ │ ├── SourceType.java
│ │ ├── Target.java
│ │ ├── UnicodeEscapes.java
│ │ ├── model/
│ │ │ ├── Action.java
│ │ │ ├── AddToLabelList.java
│ │ │ ├── AltBlock.java
│ │ │ ├── ArgAction.java
│ │ │ ├── BaseListenerFile.java
│ │ │ ├── BaseVisitorFile.java
│ │ │ ├── CaptureNextToken.java
│ │ │ ├── CaptureNextTokenType.java
│ │ │ ├── Choice.java
│ │ │ ├── CodeBlockForAlt.java
│ │ │ ├── CodeBlockForOuterMostAlt.java
│ │ │ ├── DispatchMethod.java
│ │ │ ├── ElementFrequenciesVisitor.java
│ │ │ ├── ExceptionClause.java
│ │ │ ├── InvokeRule.java
│ │ │ ├── LL1AltBlock.java
│ │ │ ├── LL1Choice.java
│ │ │ ├── LL1Loop.java
│ │ │ ├── LL1OptionalBlock.java
│ │ │ ├── LL1OptionalBlockSingleAlt.java
│ │ │ ├── LL1PlusBlockSingleAlt.java
│ │ │ ├── LL1StarBlockSingleAlt.java
│ │ │ ├── LabeledOp.java
│ │ │ ├── LeftRecursiveRuleFunction.java
│ │ │ ├── Lexer.java
│ │ │ ├── LexerFile.java
│ │ │ ├── ListenerDispatchMethod.java
│ │ │ ├── ListenerFile.java
│ │ │ ├── Loop.java
│ │ │ ├── MatchNotSet.java
│ │ │ ├── MatchSet.java
│ │ │ ├── MatchToken.java
│ │ │ ├── ModelElement.java
│ │ │ ├── OptionalBlock.java
│ │ │ ├── OutputFile.java
│ │ │ ├── OutputModelObject.java
│ │ │ ├── Parser.java
│ │ │ ├── ParserFile.java
│ │ │ ├── PlusBlock.java
│ │ │ ├── Recognizer.java
│ │ │ ├── RuleActionFunction.java
│ │ │ ├── RuleElement.java
│ │ │ ├── RuleFunction.java
│ │ │ ├── RuleSempredFunction.java
│ │ │ ├── SemPred.java
│ │ │ ├── SerializedATN.java
│ │ │ ├── SerializedJavaATN.java
│ │ │ ├── SrcOp.java
│ │ │ ├── StarBlock.java
│ │ │ ├── Sync.java
│ │ │ ├── TestSetInline.java
│ │ │ ├── ThrowEarlyExitException.java
│ │ │ ├── ThrowNoViableAlt.java
│ │ │ ├── ThrowRecognitionException.java
│ │ │ ├── TokenInfo.java
│ │ │ ├── VisitorDispatchMethod.java
│ │ │ ├── VisitorFile.java
│ │ │ ├── Wildcard.java
│ │ │ ├── chunk/
│ │ │ │ ├── ActionChunk.java
│ │ │ │ ├── ActionTemplate.java
│ │ │ │ ├── ActionText.java
│ │ │ │ ├── ArgRef.java
│ │ │ │ ├── LabelRef.java
│ │ │ │ ├── ListLabelRef.java
│ │ │ │ ├── LocalRef.java
│ │ │ │ ├── NonLocalAttrRef.java
│ │ │ │ ├── QRetValueRef.java
│ │ │ │ ├── RetValueRef.java
│ │ │ │ ├── RulePropertyRef.java
│ │ │ │ ├── RulePropertyRef_ctx.java
│ │ │ │ ├── RulePropertyRef_parser.java
│ │ │ │ ├── RulePropertyRef_start.java
│ │ │ │ ├── RulePropertyRef_stop.java
│ │ │ │ ├── RulePropertyRef_text.java
│ │ │ │ ├── SetAttr.java
│ │ │ │ ├── SetNonLocalAttr.java
│ │ │ │ ├── SymbolRefChunk.java
│ │ │ │ ├── ThisRulePropertyRef_ctx.java
│ │ │ │ ├── ThisRulePropertyRef_parser.java
│ │ │ │ ├── ThisRulePropertyRef_start.java
│ │ │ │ ├── ThisRulePropertyRef_stop.java
│ │ │ │ ├── ThisRulePropertyRef_text.java
│ │ │ │ ├── TokenPropertyRef.java
│ │ │ │ ├── TokenPropertyRef_channel.java
│ │ │ │ ├── TokenPropertyRef_index.java
│ │ │ │ ├── TokenPropertyRef_int.java
│ │ │ │ ├── TokenPropertyRef_line.java
│ │ │ │ ├── TokenPropertyRef_pos.java
│ │ │ │ ├── TokenPropertyRef_text.java
│ │ │ │ ├── TokenPropertyRef_type.java
│ │ │ │ └── TokenRef.java
│ │ │ ├── dbg.java
│ │ │ └── decl/
│ │ │ ├── AltLabelStructDecl.java
│ │ │ ├── AttributeDecl.java
│ │ │ ├── CodeBlock.java
│ │ │ ├── ContextGetterDecl.java
│ │ │ ├── ContextRuleGetterDecl.java
│ │ │ ├── ContextRuleListGetterDecl.java
│ │ │ ├── ContextRuleListIndexedGetterDecl.java
│ │ │ ├── ContextTokenGetterDecl.java
│ │ │ ├── ContextTokenListGetterDecl.java
│ │ │ ├── ContextTokenListIndexedGetterDecl.java
│ │ │ ├── Decl.java
│ │ │ ├── ElementListDecl.java
│ │ │ ├── RuleContextDecl.java
│ │ │ ├── RuleContextListDecl.java
│ │ │ ├── StructDecl.java
│ │ │ ├── TokenDecl.java
│ │ │ ├── TokenListDecl.java
│ │ │ └── TokenTypeDecl.java
│ │ └── target/
│ │ ├── CSharpTarget.java
│ │ ├── CppTarget.java
│ │ ├── DartTarget.java
│ │ ├── GoTarget.java
│ │ ├── JavaScriptTarget.java
│ │ ├── JavaTarget.java
│ │ ├── PHPTarget.java
│ │ ├── Python3Target.java
│ │ ├── SwiftTarget.java
│ │ └── TypeScriptTarget.java
│ ├── gui/
│ │ ├── BasicFontMetrics.java
│ │ ├── GraphicsSupport.java
│ │ ├── Interpreter.java
│ │ ├── JFileChooserConfirmOverwrite.java
│ │ ├── PostScriptDocument.java
│ │ ├── SystemFontMetrics.java
│ │ ├── TestRig.java
│ │ ├── TreeLayoutAdaptor.java
│ │ ├── TreePostScriptGenerator.java
│ │ ├── TreeTextProvider.java
│ │ ├── TreeViewer.java
│ │ └── Trees.java
│ ├── misc/
│ │ ├── CharSupport.java
│ │ ├── EscapeSequenceParsing.java
│ │ ├── FrequencySet.java
│ │ ├── Graph.java
│ │ ├── MutableInt.java
│ │ ├── OrderedHashMap.java
│ │ └── Utils.java
│ ├── parse/
│ │ ├── ANTLRLexer.g
│ │ ├── ANTLRParser.g
│ │ ├── ATNBuilder.g
│ │ ├── ActionSplitter.g
│ │ ├── ActionSplitterListener.java
│ │ ├── BlockSetTransformer.g
│ │ ├── GrammarASTAdaptor.java
│ │ ├── GrammarToken.java
│ │ ├── GrammarTreeVisitor.g
│ │ ├── LeftRecursiveRuleWalker.g
│ │ ├── ResyncToEndOfRuleBlock.java
│ │ ├── ScopeParser.java
│ │ ├── TokenVocabParser.java
│ │ ├── ToolANTLRLexer.java
│ │ ├── ToolANTLRParser.java
│ │ └── v4ParserException.java
│ ├── semantics/
│ │ ├── ActionSniffer.java
│ │ ├── AttributeChecks.java
│ │ ├── BasicSemanticChecks.java
│ │ ├── BlankActionSplitterListener.java
│ │ ├── RuleCollector.java
│ │ ├── SemanticPipeline.java
│ │ ├── SymbolChecks.java
│ │ ├── SymbolCollector.java
│ │ └── UseDefAnalyzer.java
│ ├── tool/
│ │ ├── ANTLRMessage.java
│ │ ├── ANTLRToolListener.java
│ │ ├── Alternative.java
│ │ ├── Attribute.java
│ │ ├── AttributeDict.java
│ │ ├── AttributeResolver.java
│ │ ├── BuildDependencyGenerator.java
│ │ ├── DOTGenerator.java
│ │ ├── DefaultToolListener.java
│ │ ├── ErrorManager.java
│ │ ├── ErrorSeverity.java
│ │ ├── ErrorType.java
│ │ ├── Grammar.java
│ │ ├── GrammarInterpreterRuleContext.java
│ │ ├── GrammarParserInterpreter.java
│ │ ├── GrammarSemanticsMessage.java
│ │ ├── GrammarSyntaxMessage.java
│ │ ├── GrammarTransformPipeline.java
│ │ ├── LabelElementPair.java
│ │ ├── LabelType.java
│ │ ├── LeftRecursionCyclesMessage.java
│ │ ├── LeftRecursiveRule.java
│ │ ├── LexerGrammar.java
│ │ ├── Rule.java
│ │ ├── ToolMessage.java
│ │ └── ast/
│ │ ├── ActionAST.java
│ │ ├── AltAST.java
│ │ ├── BlockAST.java
│ │ ├── GrammarAST.java
│ │ ├── GrammarASTErrorNode.java
│ │ ├── GrammarASTVisitor.java
│ │ ├── GrammarASTWithOptions.java
│ │ ├── GrammarRootAST.java
│ │ ├── NotAST.java
│ │ ├── OptionalBlockAST.java
│ │ ├── PlusBlockAST.java
│ │ ├── PredAST.java
│ │ ├── QuantifierAST.java
│ │ ├── RangeAST.java
│ │ ├── RuleAST.java
│ │ ├── RuleElementAST.java
│ │ ├── RuleRefAST.java
│ │ ├── SetAST.java
│ │ ├── StarBlockAST.java
│ │ └── TerminalAST.java
│ └── unicode/
│ └── UnicodeDataTemplateController.java
└── tool-testsuite/
├── pom.xml
├── resources/
│ └── junit-platform.properties
└── test/
└── org/
└── antlr/
└── v4/
└── test/
└── tool/
├── ATNDescriber.java
├── InterpreterTreeTextProvider.java
├── Java.g4
├── JavaLR.g4
├── JavaUnicodeInputStream.java
├── MockIntTokenStream.java
├── ParserInterpreterForTesting.java
├── PositionAdjustingLexer.g4
├── Psl.g4
├── TestASTStructure.java
├── TestATNConstruction.java
├── TestATNDeserialization.java
├── TestATNInterpreter.java
├── TestATNLexerInterpreter.java
├── TestATNParserPrediction.java
├── TestATNSerialization.java
├── TestActionSplitter.java
├── TestActionTranslation.java
├── TestAmbigParseTrees.java
├── TestAttributeChecks.java
├── TestBasicSemanticErrors.java
├── TestBufferedTokenStream.java
├── TestCharSupport.java
├── TestCodeGeneration.java
├── TestCommonTokenStream.java
├── TestCompositeGrammars.java
├── TestDollarParser.java
├── TestErrorSets.java
├── TestEscapeSequenceParsing.java
├── TestFastQueue.java
├── TestGrammarParserInterpreter.java
├── TestGraphNodes.java
├── TestIntervalSet.java
├── TestLeftRecursionToolIssues.java
├── TestLexerActions.java
├── TestLookaheadTrees.java
├── TestParseTreeMatcher.java
├── TestParserExec.java
├── TestParserInterpreter.java
├── TestParserProfiler.java
├── TestPerformance.java
├── TestScopeParsing.java
├── TestSplitParser.java
├── TestSymbolIssues.java
├── TestTokenPositionOptions.java
├── TestTokenTypeAssignment.java
├── TestToolSyntaxErrors.java
├── TestTopologicalSort.java
├── TestUnbufferedCharStream.java
├── TestUnbufferedTokenStream.java
├── TestUnicodeData.java
├── TestUnicodeEscapes.java
├── TestUnicodeGrammar.java
├── TestUtils.java
├── TestVocabulary.java
├── TestXPath.java
└── ToolTestUtils.java
================================================
FILE CONTENTS
================================================
================================================
FILE: .clang-format
================================================
---
# This section defines defaults for all languages. Currently we derive ANTLR style from LLVM.
BasedOnStyle: LLVM
# Only use clang-format for C++ for now.
DisableFormat: true
---
# This section configures C++ formatting.
Language: Cpp
DisableFormat: false
Standard: c++17
# Prevent clang-format from attempting to pick the alignment and always use right alignment.
DerivePointerAlignment: false
# ANTLR existing style is to right align pointers and references.
PointerAlignment: Right
ReferenceAlignment: Right
# Some of ANTLR existing code is longer than the default 80, so use 100 for now.
ColumnLimit: 100
# Historically ANTLR has used indentation within namespaces, so replicate it.
NamespaceIndentation: Inner
================================================
FILE: .editorconfig
================================================
root = true
[*]
tab_width = 4
[*.{java,stg}]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
ij_java_else_on_new_line = true
[*.{h,cpp}]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = space
indent_size = 2
================================================
FILE: .gitattributes
================================================
# This rule applies to all files which don't match another line below
* text=auto
================================================
FILE: .github/ISSUE_TEMPLATE.md
================================================
<!--
All ANTLR contributors provide implementation, maintenance and support for free.
We therefore kindly ask that before submitting any issue to ANTLR, you please check off these boxes:
- [ ] I have reproduced my issue using the latest version of ANTLR
- [ ] I have asked at [stackoverflow](http://stackoverflow.com/questions/tagged/antlr4)
- [ ] Responses from the above seem to indicate that my issue could be an ANTLR bug
- [ ] I have done a search of the existing issues to make sure I'm not sending in a duplicate
Please include the following information:
- target information (Java, C++ ...)
- smallest possible grammar and code that reproduces the behavior
- description of the expected behavior and actual behavior
Pointers to suspicious code regions are also very welcome.
-->
================================================
FILE: .github/PULL_REQUEST_TEMPLATE.md
================================================
<!--
Thank you for proposing a contribution to the ANTLR project!
(Please make sure your PR is in a branch other than dev or master
and also make sure that you derive this branch from dev.)
As of 4.10, ANTLR uses the Linux Foundation's Developer
Certificate of Origin, DCO, version 1.1. See either
https://developercertificate.org/ or file
contributors-cert-of-origin.txt in the main directory.
Each commit requires a "signature", which is simple as
using `-s` (not `-S`) to the git commit command:
git commit -s -m 'This is my commit message'
Github's pull request process enforces the sig and gives
instructions on how to fix any commits that lack the sig.
See https://github.com/apps/dco for more info.
No signature is required in this file (unlike the
previous ANTLR contributor's certificate of origin.)
-->
================================================
FILE: .github/workflows/hosted.yml
================================================
name: antlr4
concurrency:
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches: [ master, dev, hostedci ]
pull_request:
branches: [ master, dev ]
permissions:
contents: read
jobs:
cpp-lib-build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
macos-15,
ubuntu-22.04,
windows-2022
]
compiler: [ clang, gcc ]
unity_build: [ ON, OFF ]
exclude:
- os: windows-2022
compiler: gcc
include:
- os: windows-2022
compiler: cl
steps:
- name: Install dependencies (Ubuntu)
if: startswith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -qq
sudo apt install -y ninja-build
- name: Install dependencies (MacOS)
if: startswith(matrix.os, 'macos')
run: brew install ninja
- name: Setup Clang
if: (matrix.compiler == 'clang') && !startswith(matrix.os, 'macos')
uses: egor-tensin/setup-clang@v1
with:
version: 13
platform: x64
cygwin: 0
- name: Check out code
uses: actions/checkout@v3
- name: Use ccache
if: startswith(matrix.os, 'macos') || startswith(matrix.os, 'ubuntu')
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.compiler }}
- name: Configure shell (Ubuntu)
if: startswith(matrix.os, 'ubuntu')
run: echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV
- name: Configure shell (MacOS)
if: startswith(matrix.os, 'macos')
run: echo "PATH=$(brew --prefix)/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
- name: Build (Windows)
if: startswith(matrix.os, 'windows')
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
if "${{ matrix.compiler }}" EQU "cl" (
set CC=cl
set CXX=cl
echo 'CC=cl' >> $GITHUB_ENV
echo 'CXX=cl' >> $GITHUB_ENV
) else (
set CC=clang
set CXX=clang++
echo 'CC=clang' >> $GITHUB_ENV
echo 'CXX=clang++' >> $GITHUB_ENV
)
set
where cmake && cmake --version
where ninja && ninja --version
where %CC% && %CC% -version
where %CXX% && %CXX% -version
cd runtime/Cpp
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DANTLR_BUILD_CPP_TESTS=OFF -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -DCMAKE_UNITY_BUILD_BATCH_SIZE=20 -S . -B out/Debug
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build out/Debug -j %NUMBER_OF_PROCESSORS%
if %errorlevel% neq 0 exit /b %errorlevel%
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DANTLR_BUILD_CPP_TESTS=OFF -S . -B out/Release
if %errorlevel% neq 0 exit /b %errorlevel%
cmake --build out/Release -j %NUMBER_OF_PROCESSORS%
if %errorlevel% neq 0 exit /b %errorlevel%
- name: Build (non-Windows)
if: startswith(matrix.os, 'macos') || startswith(matrix.os, 'ubuntu')
run: |
if [ "${{matrix.compiler}}" == "clang" ]; then
export CC=clang
export CXX=clang++
echo 'CC=clang' >> $GITHUB_ENV
echo 'CXX=clang++' >> $GITHUB_ENV
else
export CC=gcc
export CXX=g++
echo 'CC=gcc' >> $GITHUB_ENV
echo 'CXX=g++' >> $GITHUB_ENV
fi
env
which cmake && cmake --version
which ninja && ninja --version
which $CC && $CC --version
which $CXX && $CXX --version
cd runtime/Cpp
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DANTLR_BUILD_CPP_TESTS=OFF -DCMAKE_UNITY_BUILD=${{ matrix.unity_build }} -DCMAKE_UNITY_BUILD_BATCH_SIZE=20 -S . -B out/Debug
cmake --build out/Debug --parallel
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DANTLR_BUILD_CPP_TESTS=OFF -S . -B out/Release
cmake --build out/Release --parallel
- name: Prepare artifacts
if: always()
run: |
cd ${{ github.workspace }}/..
tar czfp antlr_${{ matrix.os }}_${{ matrix.compiler }}.tgz --exclude='.git' antlr4
mv antlr_${{ matrix.os }}_${{ matrix.compiler }}.tgz ${{ github.workspace }}/.
- name: Archive artifacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: antlr_${{ matrix.os }}_${{ matrix.compiler }}
path: antlr_${{ matrix.os }}_${{ matrix.compiler }}.tgz
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [
macos-15,
ubuntu-22.04,
windows-2022
]
target: [
tool,
cpp,
csharp,
dart,
go,
java,
javascript,
typescript,
php,
python3,
# swift,
]
exclude:
- os: windows-2022
target: swift
steps:
# Check out the code before setting the environment since some
# of the actions actually parse the files to figure out the
# dependencies, for instance, the setup-java actually parses
# **/pom.xml files to decide what to cache.
- name: Check out code
uses: actions/checkout@v3
- name: Checkout antlr PHP runtime
if: matrix.target == 'php'
uses: actions/checkout@v3
with:
repository: antlr/antlr-php-runtime
path: runtime/PHP
- name: Setup PHP 8.2
if: matrix.target == 'php'
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
extensions: mbstring
tools: composer
- name: Install dependencies
env:
COMPOSER_CACHE_DIR: ${{ github.workspace }}/.cache
if: matrix.target == 'php'
run: |-
cd runtime/PHP
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
- name: Install dependencies (Ubuntu)
if: startswith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -qq
sudo apt install -y ninja-build
- name: Install dependencies (MacOS)
if: startswith(matrix.os, 'macos')
run: brew install ninja
- name: Set up JDK 11
id: setup-java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 11
cache: 'maven'
- name: Set up Maven
if: steps.setup-java.outputs.cache-hit != 'true'
uses: stCarolas/setup-maven@v4.5
with:
maven-version: 3.8.5
- name: Add msbuild to PATH
if: startswith(matrix.os, 'windows') && (matrix.target == 'cpp')
uses: microsoft/setup-msbuild@v1.1
- name: Set up Python 3
if: matrix.target == 'python3'
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: 'x64'
- name: Set up Node 16
if: (matrix.target == 'javascript') || (matrix.target == 'typescript')
uses: actions/setup-node@v3.6.0
with:
node-version: '16'
- name: Setup Dotnet
if: matrix.target == 'csharp'
uses: actions/setup-dotnet@v3.0.3
with:
dotnet-version: '7.0.x'
- name: Setup Dart 2.12.1
if: matrix.target == 'dart'
uses: dart-lang/setup-dart@v1.3
with:
sdk: 2.12.1
- name: Setup Go 1.19
if: matrix.target == 'go'
uses: actions/setup-go@v3.3.1
with:
go-version: '^1.19'
- name: Setup Swift
if: matrix.target == 'swift'
uses: swift-actions/setup-swift@v1.19.0
with:
swift-version: '5.2'
- name: Use ccache
if: (startswith(matrix.os, 'macos') || startswith(matrix.os, 'ubuntu')) && (matrix.target == 'cpp')
uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ matrix.os }}-${{ matrix.target }}
- name: Configure shell (Ubuntu)
if: startswith(matrix.os, 'ubuntu') && (matrix.target == 'cpp')
run: echo 'PATH=/usr/lib/ccache:'"$PATH" >> $GITHUB_ENV
- name: Configure shell (MacOS)
if: startswith(matrix.os, 'macos') && (matrix.target == 'cpp')
run: echo "PATH=$(brew --prefix)/opt/ccache/libexec:$PATH" >> $GITHUB_ENV
- name: Build ANTLR with Maven
run: mvn install -DskipTests=true -Darguments="-Dmaven.javadoc.skip=true" -B -V
- name: Test tool
if: matrix.target == 'tool'
run: |
cd tool-testsuite
mvn test
- name: Test runtime (Windows)
if: startsWith(matrix.os, 'windows') && (matrix.target != 'tool')
run: |
gci env:* | sort-object name
cd runtime-testsuite
switch ("${{ matrix.target }}")
{
python3 { mvn -X '-Dantlr-python3-exec="${{ env.pythonLocation }}\python.exe"' '-Dtest=python3.**' test }
default { mvn -X '-Dtest=${{ matrix.target }}.**' test }
}
env:
CMAKE_GENERATOR: Ninja
- name: Test runtime (non-Windows)
if: (startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')) && (matrix.target != 'tool')
run: |
env
cd runtime-testsuite
case ${{ matrix.target }} in
python3) mvn -X '-Dantlr-python3-exec=${{ env.pythonLocation }}/bin/python' '-Dtest=python3.**' test ;;
*) mvn -X '-Dtest=${{ matrix.target }}.**' test ;;
esac
- name: Prepare artifacts
if: always()
run: |
cd ${{ github.workspace }}/..
tar czfp antlr_${{ matrix.os }}_${{ matrix.target }}.tgz --exclude='.git' antlr4
mv antlr_${{ matrix.os }}_${{ matrix.target }}.tgz ${{ github.workspace }}/.
- name: Archive artifacts
if: always()
continue-on-error: true
uses: actions/upload-artifact@v4
with:
name: antlr_${{ matrix.os }}_${{ matrix.target }}
path: antlr_${{ matrix.os }}_${{ matrix.target }}.tgz
================================================
FILE: .gitignore
================================================
# Nuget packages
*.nupkg
# Maven build folders
target/
# ... but not code generation targets
!tool/src/org/antlr/v4/codegen/target/
# Node.js (npm and typings) cached dependencies
node_modules/
typings/
# Ant build folders
build/
dist/
lib/
user.build.properties
# MacOSX files
.DS_Store
## Python, selected lines from https://raw.githubusercontent.com/github/gitignore/master/Python.gitignore
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Build results
*.egg-info/
## CSharp and VisualStudio, selected lines from https://raw.githubusercontent.com/github/gitignore/master/VisualStudio.gitignore
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio/Visual Studio)
*.userprefs
.vs/
project.lock.json
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# NetBeans user configuration files
nbactions*.xml
/nbproject/private/
*/nbproject/private/
# IntelliJ projects
*.iws
*.iml
.idea/
# Eclipse projects
.classpath
.project
.settings/
.metadata
# Profiler results
*.hprof
# parrt's bash prompt data
.fetch_time_cache
# Playground
#/tool/playground/
# Generated files
/out/
/gen/
/gen3/
/gen4/
/tool/playground/
tmp/
**/generatedCode/*.interp
**/generatedCode/*.tokens
**/generatedCode/*.bak
# Configurable build files
bilder.py
bilder.pyc
bild.log
bild_output.txt
runtime/Cpp/demo/generated
xcuserdata
*.jar
.vscode
# VSCode Java plugin temporary files
javac-services.0.log
javac-services.0.log.lck
# Don't ignore python tests
!runtime/Python3/test/
Antlr4.sln
runtime/PHP
# Swift binaries
.build/
# Code coverage reports
coverage/
# Cpp generated build files
runtime/Cpp/CMakeCache.txt
runtime/Cpp/CMakeFiles/
runtime/Cpp/CPackConfig.cmake
runtime/Cpp/CPackSourceConfig.cmake
runtime/Cpp/CTestTestfile.cmake
runtime/Cpp/Makefile
runtime/Cpp/_deps/
runtime/Cpp/cmake_install.cmake
runtime/Cpp/runtime/CMakeFiles/
runtime/Cpp/runtime/CTestTestfile.cmake
runtime/Cpp/runtime/Makefile
runtime/Cpp/runtime/antlr4_tests
runtime/Cpp/runtime/antlr4_tests\[1]_include.cmake
runtime/Cpp/runtime/antlr4_tests\[1]_tests.cmake
runtime/Cpp/runtime/cmake_install.cmake
runtime/Cpp/runtime/libantlr4-runtime.4.10.1.dylib
runtime/Cpp/runtime/libantlr4-runtime.a
runtime/Cpp/runtime/libantlr4-runtime.dylib
/runtime/Cpp/runtime/libantlr4-runtime.4.12.0.dylib
/runtime/Cpp/runtime/libantlr4-runtime.4.13.0.dylib
# Go test and performance trace files
**/*.pprof
================================================
FILE: ANTLR-HOUSE-RULES.md
================================================
# ANTLR HOUSE RULES
*Last updated: Sept 10, 2022*
This brief document describes best practices for us to all get along and for the benefit of the project. Collaborating on this project poses a number of difficulties:
* different native languages
* different time zones
* lack of common company or other organization as social glue
* we are just github userids without personal connection to most other contributors
* those developers able to contribute to such a complex project typically have a lot of experience and, consequently, strong opinions
Effective communication is difficult under the circumstances and civil discourse is a requirement to keep the project on track. Over 35 years, in-fighting between contributors has made parrt's job as supreme dictator for life much more difficult.
Rules
1. Assume good intentions of the other party.
2. Try to be welcoming and respectful of differing viewpoints experiences.
2. No personal attacks, meaning ideas can be bad in your comments but not people. Replace "You are ..." with "Your idea is ...".
3. Control your anger please. No hate speech, racism, sexism, or ethnocentrism. No trolling or insulting. See rule #1.
2. Be tolerant and understanding of non-native English speakers' word choice and phrasing. This is a huge source of misunderstandings; see rule #1. For example, to a native English speaker "I cannot *approve* this" makes it sound like the writer has control over the readers contribution. Instead, the writer likely meant "I cannot *support* this." See rule #1.
3. Soften word choice to use conditional tenses and helper words. For example, use phrases such as "I'm not sure this is a good idea because ..." or "I wonder if you'd consider this other possibility: ..." etc...
Supreme dictator for life parrt has final say. His decisions will not always be correct nor to your liking, but he has a difficult cost-benefit equation to solve for every bug fix, feature, and PR.
Any text contrary to these house rules will likely be edited and replaced with an admonishment by parrt.
Send concerns to parrt@antlr.org.
================================================
FILE: CHANGES.txt
================================================
****************************************************************************
As of ANTLR 4.2.1, March 25 2014, we are no longer updating this file. Instead,
we are using the github release mechanism. For example, here is
4.2.1 release notes:
https://github.com/antlr/antlr4/releases/tag/4.2.1
****************************************************************************
ANTLR v4 Honey Badger
January 15, 2014
* Unit tests for lexer actions from yesterday.
* Refactored TreeView so we can refresh tree externally w/o creating new one.
Needed for intellij plugin.
January 14, 2014
* Updated serialized ATN representation of lexer actions, allowing the lexer
interpreter to execute the majority of lexer commands (#408)
January 12, 2014
* Support executing precedence predicates during the SLL phase of
adaptivePredict (#401). The result is a massive performance boost for grammars
containing direct left-recursion (improvements of 5% to 1000+% have been
observed, depending on the grammar and input).
December 29, 2013
* Internal change: Tool.loadGrammar() -> parseGrammar(). Tool.load()->parse()
* Added Tool.loadGrammar(fileName) that completely parses, extracts implicit lexer,
and processes into Grammar object. Does not geneate code. Use
Grammar.getImplicitLexer() to get the lexer created during processing of
combined grammar.
* Added Grammar.load(fileName) that creates Tool object for you. loadGrammar()
lets you create your own Tool for setting error handlers etc...
final Grammar g = Grammar.load("/tmp/MyGrammar.g4");
December 19, 2013
* Sam:
Improved documentation for tree patterns classes
Refactored parts of the tree patterns API to simplify classes and improve encapsulation
Move ATN serializer to runtime
Use ATNDeserializer methods instead of ATNSimulator methods which are now deprecated
* parrt: fix null pointer bug with rule "a : a;"
November 24, 2013
* Ter adds tree pattern matching. Preferred interface:
ParseTree t = parser.expr();
ParseTreePattern p = parser.compileParseTreePattern("<ID>+0", MyParser.RULE_expr);
ParseTreeMatch m = p.match(t);
String id = m.get("ID");
or
String xpath = "//blockStatement/*";
String treePattern = "int <Identifier> = <expression>;";
ParseTreePattern p =
parser.compileParseTreePattern(treePattern,
JavaParser.RULE_localVariableDeclarationStatement);
List<ParseTreeMatch> matches = p.findAll(tree, xpath);
November 20, 2013
* Sam added method stuff like expr() that calls expr(0). Makes it possible
to call expr rule from TestRig (grun).
November 14, 2013
* Added Sam's ParserInterpreter implementation that uses ATN after
deserialization.
LexerGrammar lg = new LexerGrammar(
"lexer grammar L;\n" +
"A : 'a' ;\n" +
"B : 'b' ;\n" +
"C : 'c' ;\n");
Grammar g = new Grammar(
"parser grammar T;\n" +
"s : (A{;}|B)* C ;\n",
lg);
LexerInterpreter lexEngine = lg.createLexerInterpreter(new ANTLRInputStream(input));
CommonTokenStream tokens = new CommonTokenStream(lexEngine);
ParserInterpreter parser = g.createParserInterpreter(tokens);
ParseTree t = parser.parse(g.rules.get(startRule).index);
November 13, 2013
* move getChildren() from Tree into Trees (to avoid breaking change)
* Notation:
/prog/func, -> all funcs under prog at root
/prog/*, -> all children of prog at root
/*/func, -> all func kids of any root node
prog, -> prog must be root node
/prog, -> prog must be root node
/*, -> any root
*, -> any root
//ID, -> any ID in tree
//expr/primary/ID, -> any ID child of a primary under any expr
//body//ID, -> any ID under a body
//'return', -> any 'return' literal in tree
//primary/*, -> all kids of any primary
//func/*/stat, -> all stat nodes grandkids of any func node
/prog/func/'def', -> all def literal kids of func kid of prog
//stat/';', -> all ';' under any stat node
//expr/primary/!ID, -> anything but ID under primary under any expr node
//expr/!primary, -> anything but primary under any expr node
//!*, -> nothing anywhere
/!*, -> nothing at root
September 16, 2013
* Updated build.xml to support v4 grammars in v4 itself; compiles XPathLexer.g4
* Add to XPath:
Collection<ParseTree> findAll(String xpath);
September 11, 2013
* Add ! operator to XPath
* Use ANTLR v4 XPathLexer.g4 not regex
* Copy lots of find node stuff from v3 GrammarAST to Trees class in runtime.
September 10, 2013
* Adding in XPath stuff.
August 31, 2013
* Lots of little fixes thanks to Coverity Scan
August 7, 2013
* [BREAKING CHANGE] Altered left-recursion elimination to be simpler. Now,
we use the following patterns:
* Binary expressions are expressions which contain a recursive invocation of
the rule as the first and last element of the alternative.
* Suffix expressions contain a recursive invocation of the rule as the first
element of the alternative, but not as the last element.
* Prefix expressions contain a recursive invocation of the rule as the last
element of the alternative, but not as the first element.
There is no such thing as a "ternary" expression--they are just binary
expressions in disguise.
The right associativity specifiers no longer on the individual tokens because
it's done on alternative basis anyway. The option is now on the individual
alternative; e.g.,
e : e '*' e
| e '+' e
|<assoc=right> e '?' e ':' e
|<assoc=right> e '=' e
| INT
;
If your language uses a right-associative ternary operator, you will need
to update your grammar to include <assoc=right> on the alternative operator.
This also fixes #245 and fixes #268:
https://github.com/antlr/antlr4/issues/245
https://github.com/antlr/antlr4/issues/268
To smooth the transition, <assoc=right> is still allowed on token references
but it is ignored.
June 30, 2013 -- 4.1 release
June 24, 2013
* Resize ANTLRInputStream.data after reading a file with fewer characters than
bytes
* Fix ATN created for non-greedy optional block with multiple alternatives
* Support Unicode escape sequences with indirection in JavaUnicodeInputStream
(fixes #287)
* Remove the ParserRuleContext.altNum field (fixes #288)
* PredictionContext no longer implements Iterable<SingletonPredictionContext>
* PredictionContext no longer implements Comparable<PredictionContext>
* Add the EPSILON_CLOSURE error and EPSILON_OPTIONAL warning
* Optimized usage of closureBusy set (fixes #282)
June 9, 2013
* Add regression test for #239 (already passes)
June 8, 2013
* Support list labels on a set of tokens (fixes #270)
* Fix associativity of XOR in Java LR grammar (fixes #280)
June 1, 2013
* DiagnosticErrorListener includes rule names for each decision in its reports
* Document ANTLRErrorListener and DiagnosticErrorListener (fixes #265)
* Support '\uFFFF' (fixes #267)
* Optimize serialized ATN
May 26, 2013
* Report errors that occur while lexing a grammar (fixes #262)
* Improved error message for unterminated string literals (fixes #243)
May 24, 2013
* Significantly improve performance of JavaUnicodeInputStream.LA(1)
May 20, 2013
* Generate Javadoc for generated visitor and listener interfaces and classes
* Fix unit tests
May 18, 2013
* Group terminals in Java grammars so ATN can collapse sets
* Improved Java 7 support in Java grammars (numeric literals)
* Updated error listener interfaces
* Support detailed statistics in TestPerformance
May 17, 2013
* Add JavaUnicodeInputStream to handle Unicode escapes in Java code
* Proper Unicode identifier handling in Java grammars
* Report file names with lexer errors in TestPerformance
May 14, 2013
* Use a called rule stack to prevent stack overflow in LL1Analyzer
* Use 0-based indexing for several arrays in the tool
* Code simplification, assertions, documentation
May 13, 2013
* Unit test updates to ensure exceptions are not hidden
May 12, 2013
* Updates to TestPerformance
May 5, 2013
* Updated several classes to use MurmurHash 3 hashing
May 1, 2013
* Added parse tree JTree to TreeViewer (Bart Kiers)
April 30, 2013
* Updated TestPerformance to support parallelization across passes
April 24, 2013
* Remove unused stub class ParserATNPathFinder
* Remove ParserInterpreter.predictATN
* Remove DFA.getATNStatesAlongPath
* Encapsulate implementation methods in LexerATNSimulator and ParserATNSimulator
* Updated documentation
* Simplify creation of new DFA edges
* Fix handling of previously cached error edges
* Fix DFA created during forced-SLL parsing (PredictionMode.SLL)
* Extract methods ParserATNSimulator.getExistingTargetState and
ParserATNSimulator.computeTargetState.
April 22, 2013
* Lazy initialization of ParserATNSimulator.mergeCache
* Improved hash code for DFAState
* Improved hash code with caching for ATNConfigSet
* Add new configuration parameters to TestPerformance
* Update Java LR and Java Std to support Java 7 syntax
April 21, 2013
* Add new configuration parameters to TestPerformance
April 18, 2013
* Must check rule transition follow states before eliminating states in
the ATN (fixes #224)
* Simplify ParserATNSimulator and improve performance by combining execDFA and
execATN and using DFA edges even after edge computation is required
April 15, 2013
* Fix code in TestPerformance that clears the DFA
April 12, 2013
* Improved initialization and concurrency control in DFA updates
* Fix EOF handling in edge case (fixes #218)
April 4, 2013
* Improved testing of error reporting
* Fix NPE revealed by updated testing method
* Strict handling of redefined rules - prevents code generation (fixes #210)
* Updated documentation in Tool
March 27, 2013
* Avoid creating empty action methods in lexer (fixes #202)
* Split serialized ATN when it exceeds Java's 65535 byte limit (fixes #76)
* Fix incorrect reports of label type conflicts across separated labeled outer
alternatives (fixes #195)
* Update Maven plugin site documentation
March 26, 2013
* Fix bugs with the closureBusy set in ParserATNSimulator.closure
* Fix handling of empty options{} block (fixes #194)
* Add error 149 INVALID_LEXER_COMMAND (fixes #190)
* Add error 150 MISSING_LEXER_COMMAND_ARGUMENT
* Add error 151 UNWANTED_LEXER_COMMAND_ARGUMENT
* Updated documentation in the Parser and RecognitionException classes
* Refactored and extensively documented the ANTLRErrorStrategy interface and
DefaultErrorStrategy default implementation
* Track the number of syntax errors in Parser.notifyErrorListeners instead of in
the error strategy
* Move primary implementation of getExpectedTokens to ATN, fixes #191
* Updated ATN documentation
* Use UUID instead of incremented integer for serialized ATN versioning
March 7, 2013
* Added export to PNG feature to the parse tree viewer
March 6, 2013
* Allow direct calls to left-recursive rules (fixes #161)
* Change error type 146 (EPSILON_TOKEN) to a warning (fixes #180)
* Specify locale for all format operations (fixes #158)
* Fix generation of invalid Unicode escape sequences in Java code (fixes #164)
* Do not require escape for $ in action when not followed by an ID start char
(fixes #176)
February 23, 2013
* Refactoring Target-related classes to improve support for additional language
targets
February 22, 2013
* Do not allow raw newline characters in literals
* Pair and Triple are immutable; Triple is not a Pair
February 5, 2013
* Fix IntervalSet.add when multiple merges are required (fixes #153)
January 29, 2013
* don't call process() if args aren't specified (Dave Parfitt)
January 21, 2013 -- Release 4.0
* Updated PredictionContext Javadocs
* Updated Maven site documentation
* Minor tweaks in Java.stg
January 15, 2013
* Tweak error messages
* (Tool) Make TokenVocabParser fields `protected final`
* Fix generated escape sequences for literals containing backslashes
January 14, 2013
* Relax parser in favor of errors during semantic analysis
* Add error 145: lexer mode must contain at least one non-fragment rule
* Add error 146: non-fragment lexer rule can match the empty string
January 11, 2013
* Updated error 72, 76; added 73-74 and 136-143: detailed errors about name
conflicts
* Report exact location for parameter/retval/local name conflicts
* Add error 144: multi-character literals are not allowed in lexer sets
* Error 134 now only applies to rule references in lexer sets
* Updated error messages (cleanup)
* Reduce size of _serializedATN by adding 2 to each element: new representation
avoids embedded values 0 and 0xFFFF which are common and have multi-byte
representations in Java's modified UTF-8
January 10, 2013
* Add error 135: cannot assign a value to list label: $label
(fixes antlr/antlr4#128)
January 2, 2013
* Fix EOF handling (antlr/antlr4#110)
* Remove TREE_PARSER reference
* Additional validation checks in ATN deserialization
* Fix potential NPE in parser predicate evaluation
* Fix termination condition detection in full-context parsing
January 1, 2013
* Updated documentation
* Minor code cleanup
* Added the `-XdbgSTWait` command line option for the Tool
* Removed method override since bug was fixed in V3 runtime
December 31, 2012
* I altered Target.getTargetStringLiteralFromANTLRStringLiteral() so that
it converts \uXXXX in an ANTLR string to \\uXXXX, thus, avoiding Java's
conversion to a single character before compilation.
December 16, 2012
* Encapsulate some fields in ANTLRMessage
* Remove ErrorType.INVALID
* Update error/warning messages, show all v3 compatibility messages
December 12, 2012
* Use arrays instead of HashSet to save memory in SemanticContext.AND/OR
* Use arrays instead of HashSet to save memory in cached DFA
* Reduce single-operand SemanticContext.and/or operations
December 11, 2012
* Add -long-messages option; only show exceptions with errors when set
* "warning treated as error" is a one-off error
* Listen for issues reported by StringTemplate, report them as warnings
* Fix template issues
* GrammarASTWithOptions.getOptions never returns null
* Use EnumSet instead of HashSet
* Use new STGroup.GROUP_FILE_EXTENSION value
December 2, 2012
* Remove -Xverbose-dfa option
* Create the ParseTreeVisitor interface for all visitors, rename previous base
visitor class to AbstractParseTreeVisitor
December 1, 2012
* escape [\n\r\t] in lexical error messages; e.g,:
line 2:3 token recognition error at: '\t'
line 2:4 token recognition error at: '\n'
* added error for bad sets in lexer; e.g.:
lexer set element A is invalid (either rule ref or literal with > 1 char)
some tests in TestSets appeared to allow ~('a'|B) but it was randomly working.
('a'|B) works, though doesn't collapse to a set.
* label+='foo' wasn't generating good code. It was generating token type as
variable name. Now, I gen "s<ttype>" for implicit labels on string literals.
* tokens now have token and char source to draw from.
* remove -Xsave-lexer option; log file as implicit lexer AST.
November 30, 2012
* Maven updates (cleanup, unification, and specify Java 6 bootstrap classpath)
November 28, 2012
* Maven updates (uber-jar, manifest details)
November 27, 2012
* Maven updates (prepare for deploying to Sonatype OSS)
* Use efficient bitset tests instead of long chains of operator ==
November 26, 2012
* Maven updates (include sources and javadocs, fix warnings)
* Don't generate action methods for lexer rules not containing an action
* Generated action and sempred methods are private
* Remove unused / problematic methods:
** (unused) TerminalNodeImpl.isErrorNode
** (unused) RuleContext.conflictsWith, RuleContext.suffix.
** (problematic) RuleContext.hashCode, RuleContext.equals.
November 23, 2012
* Updated Maven build (added master POM, cleaned up module POMs)
November 22, 2012
* make sure left-recur rule translation uses token stream from correct imported file.
* actions like @after in imported rules caused inf loop.
* This misidentified scope lexer/parser: @lexer::members { } @parser::members { }
November 18, 2012
* fixed: undefined rule refs caused exception
* cleanup, rm dead etypes, add check for ids that cause code gen issues
* added notion of one-off error
* added check for v3 backward incompatibilities:
** tree grammars
** labels in lexer rules
** tokens {A;B;} syntax
** tokens {A='C';} syntax
** {...}?=> gate semantic predicates
** (...)=> syntactic predicates
* Detect EOF in lexer rule
November 17, 2012
* .tokens files goes in output dir like parser file.
* added check: action in lexer rules must be last element of outermost alt
* properly check for grammar/filename difference
* if labels, don't allow set collapse for
a : A # X | B ;
* wasn't checking soon enough for rule redef; now it sets a dead flag in
AST so no more walking dup.
error(51): T.g:7:0: rule s redefinition (ignoring); previous at line 3
November 11, 2012
* Change version to 4.0b4 (btw, forgot to push 4.0b3 in build.properties when
I made git tag 4.0b3...ooops).
November 4, 2012
* Kill box in tree dialog box makes dialog dispose of itself
October 29, 2012
* Sam fixes nongreedy more.
* -Werror added.
* Sam made speed improvement re preds in lexer.
October 20, 2012
* Merged Sam's fix for nongreedy lexer/parser. lots of unit tests. A fix in
prediction ctx merge. https://github.com/parrt/antlr4/pull/99
October 14, 2012
* Rebuild how ANTLR detects SLL conflict and failover to full LL. LL is
a bit slower but correct now. Added ability to ask for exact ambiguity
detection.
October 8, 2012
* Fixed a bug where labeling the alternatives of the start rule caused
a null pointer exception.
October 1, 2012 -- 4.0b2 release
September 30, 2012
* Fixed the unbuffered streams, which actually buffered everything
up by mistake. tweaked a few comments.
* Added a getter to IntStream for the token factory
* Added -depend cmd-line option.
September 29, 2012
* no nongreedy or wildcard in parser.
September 28, 2012
* empty "tokens {}" is ok now.
September 22, 2012
* Rule exception handlers weren't passed to the generated code
* $ruleattribute.foo weren't handled properly
* Added -package option
September 18, 2012 -- 4.0b1 release
================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to ANTLR 4
1. [Fork](https://help.github.com/articles/fork-a-repo) the [antlr/antlr4 repo](https://github.com/antlr/antlr4), which will give you both key branches, `master` and `dev`
2. Make sure to `git checkout dev` in your fork so that you are working from the latest development branch
3. Create and work from a branch derived from `dev` such as `git checkout -b your-branch-name`
4. Install and configure [EditorConfig](http://editorconfig.org/) so your text editor or IDE uses the ANTLR 4 coding style
5. [Build ANTLR 4](doc/building-antlr.md)
6. [Run the ANTLR project unit tests](doc/antlr-project-testing.md)
7. Create a [pull request](https://help.github.com/articles/using-pull-requests/) with your changes and make sure you're comparing your `dev`-derived branch in your fork to the `dev` branch from the `antlr/antlr4` repo:
<img src="doc/images/PR-on-dev.png" width="600">
**Note:** Each commit requires a "signature", which is simple as using `-s` (not
`-S`) to the git commit command:
```
git commit -s -m 'This is my commit message'
```
Github's pull request process enforces the sig and gives instructions on how to
fix any commits that lack the sig. See [Github DCO app](https://github.com/apps/dco)
for more info.
================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither name of copyright holders nor the names of its contributors
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
================================================
FILE: Package.swift
================================================
// swift-tools-version:5.6
import PackageDescription
let package = Package(
name: "Antlr4",
products: [
.library(
name: "Antlr4",
targets: ["Antlr4"]),
.library(
name: "Antlr4Static",
type: .static,
targets: ["Antlr4"]),
.library(
name: "Antlr4Dynamic",
type: .dynamic,
targets: ["Antlr4"]),
],
targets: [
.target(
name: "Antlr4",
dependencies: [],
path: "./runtime/Swift/Sources/Antlr4"),
.testTarget(
name: "Antlr4Tests",
dependencies: ["Antlr4"],
path: "./runtime/Swift/Tests/Antlr4Tests",
exclude: [
"./runtime/Swift/Tests/VisitorBasic.g4",
"./runtime/Swift/Tests/VisitorCalc.g4",
"./runtime/Swift/Tests/LexerA.g4",
"./runtime/Swift/Tests/LexerB.g4",
"./runtime/Swift/Tests/Threading.g4"
]
)
]
)
================================================
FILE: README.md
================================================
# ANTLR v4
[](http://java.oracle.com)
[](https://raw.githubusercontent.com/antlr/antlr4/master/LICENSE.txt)
**ANTLR** (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build parse trees and also generates a listener interface (or visitor) that makes it easy to respond to the recognition of phrases of interest.
**Dev branch build status**
[](https://github.com/antlr/antlr4/actions/workflows/hosted.yml) (github actions)
<!--
* [](https://github.com/antlr/antlr4/actions/workflows/windows.yml) (github actions)
* [](https://app.circleci.com/pipelines/github/antlr/antlr4) (CircleCI)
[](https://ci.appveyor.com/project/parrt/antlr4)
[](https://travis-ci.com/github/antlr/antlr4)
-->
## Versioning
ANTLR 4 supports 10 target languages
(Cpp, CSharp, Dart, Java, JavaScript, PHP, Python3, Swift, TypeScript, Go),
and ensuring consistency across these targets is a unique and highly valuable feature.
To ensure proper support of this feature, each release of ANTLR is a complete release of the tool and the 10 runtimes, all with the same version.
As such, ANTLR versioning does not strictly follow semver semantics:
* a component may be released with the latest version number even though nothing has changed within that component since the previous release
* major version is bumped only when ANTLR is rewritten for a totally new "generation", such as ANTLR3 -> ANTLR4 (LL(\*) -> ALL(\*) parsing)
* minor version updates may include minor breaking changes, the policy is to regenerate parsers with every release (4.11 -> 4.12)
* backwards compatibility is only guaranteed for patch version bumps (4.11.1 -> 4.11.2)
If you use a semver verifier in your CI, you probably want to apply special rules for ANTLR, such as treating minor change as a major change.
## Repo branch structure
The default branch for this repo is [`master`](https://github.com/antlr/antlr4/tree/master), which is the latest stable release and has tags for the various releases; e.g., see release tag [4.9.3](https://github.com/antlr/antlr4/tree/4.9.3). Branch [`dev`](https://github.com/antlr/antlr4/tree/dev) is where development occurs between releases and all pull requests should be derived from that branch. The `dev` branch is merged back into `master` to cut a release and the release state is tagged (e.g., with `4.10-rc1` or `4.10`.) Visually our process looks roughly like this:
<img src="doc/images/new-antlr-branches.png" width="500">
The Go target now has its own dedicated repo:
```bash
$ go get github.com/antlr4-go/antlr
```
**Note**
The dedicated Go repo is for `go get` and `import` only. Go runtime development is still performed in the main `antlr/antlr4` repo.
## Authors and major contributors
* [Terence Parr](http://www.cs.usfca.edu/~parrt/), parrt@cs.usfca.edu
ANTLR project lead and supreme dictator for life
[University of San Francisco](http://www.usfca.edu/)
* [Sam Harwell](http://tunnelvisionlabs.com/) (Tool co-author, Java and original C# target)
* [Eric Vergnaud](https://github.com/ericvergnaud) (Javascript, TypeScript, Python2, Python3 targets and maintenance of C# target)
* [Peter Boyer](https://github.com/pboyer) (Go target)
* [Mike Lischke](http://www.soft-gems.net/) (C++ completed target)
* Dan McLaughlin (C++ initial target)
* David Sisson (C++ initial target and test)
* [Janyou](https://github.com/janyou) (Swift target)
* [Ewan Mellor](https://github.com/ewanmellor), [Hanzhou Shi](https://github.com/hanjoes) (Swift target merging)
* [Ben Hamilton](https://github.com/bhamiltoncx) (Full Unicode support in serialized ATN and all languages' runtimes for code points > U+FFFF)
* [Marcos Passos](https://github.com/marcospassos) (PHP target)
* [Lingyu Li](https://github.com/lingyv-li) (Dart target)
* [Ivan Kochurkin](https://github.com/KvanTTT) has made major contributions to overall quality, error handling, and Target performance.
* [Justin King](https://github.com/jcking) has done a huge amount of work across multiple targets, but especially for C++.
* [Ken Domino](https://github.com/kaby76) has a knack for finding bugs/issues and analysis; also a major contributor on the [grammars-v4 repo](https://github.com/antlr/grammars-v4).
* [Jim Idle](https://github.com/jimidle) has contributed to previous versions of ANTLR and recently jumped back in to solve a major problem with the Go target.
## Useful information
* [Release notes](https://github.com/antlr/antlr4/releases)
* [Getting started with v4](https://github.com/antlr/antlr4/blob/master/doc/getting-started.md)
* [Official site](http://www.antlr.org/)
* [Documentation](https://github.com/antlr/antlr4/blob/master/doc/index.md)
* [FAQ](https://github.com/antlr/antlr4/blob/master/doc/faq/index.md)
* [ANTLR code generation targets](https://github.com/antlr/antlr4/blob/master/doc/targets.md)<br>(Currently: Java, C#, Python3, JavaScript, TypeScript, Go, C++, Swift, Dart, PHP)
* _Note: As of version 4.14, we are dropping support for Python 2. We love the Python
community, but Python 2 support was officially halted in Jan 2020. More recently,
GitHub also dropped support for Python 2, which has made it impossible for us to
maintain a consistent level of quality across targets (we use GitHub for our CI).
Long live Python 3!_
* [Java API](http://www.antlr.org/api/Java/index.html)
* [ANTLR v3](http://www.antlr3.org/)
* [v3 to v4 Migration, differences](https://github.com/antlr/antlr4/blob/master/doc/faq/general.md)
You might also find the following pages useful, particularly if you want to mess around with the various target languages.
* [How to build ANTLR itself](https://github.com/antlr/antlr4/blob/master/doc/building-antlr.md)
* [How we create and deploy an ANTLR release](https://github.com/antlr/antlr4/blob/master/doc/releasing-antlr.md)
## The Definitive ANTLR 4 Reference
Programmers run into parsing problems all the time. Whether it’s a data format like JSON, a network protocol like SMTP, a server configuration file for Apache, a PostScript/PDF file, or a simple spreadsheet macro language—ANTLR v4 and this book will demystify the process. ANTLR v4 has been rewritten from scratch to make it easier than ever to build parsers and the language applications built on top. This completely rewritten new edition of the bestselling Definitive ANTLR Reference shows you how to take advantage of these new features.
You can buy the book [The Definitive ANTLR 4 Reference](http://amzn.com/dp/1934356999) at amazon or an [electronic version at the publisher's site](https://pragprog.com/book/tpantlr2/the-definitive-antlr-4-reference).
You will find the [Book source code](http://pragprog.com/titles/tpantlr2/source_code) useful.
## Additional grammars
[This repository](https://github.com/antlr/grammars-v4) is a collection of grammars without actions where the
root directory name is the all-lowercase name of the language parsed
by the grammar. For example, java, cpp, csharp, c, etc...
================================================
FILE: antlr4-maven-plugin/nb-configuration.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project-shared-configuration>
<!--
This file contains additional configuration written by modules in the NetBeans IDE.
The configuration is intended to be shared among all the users of project and
therefore it is assumed to be part of version control checkout.
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
-->
<properties xmlns="http://www.netbeans.org/ns/maven-properties-data/1">
<!--
Properties that influence various parts of the IDE, especially code formatting and the like.
You can copy and paste the single properties, into the pom.xml file and the IDE will pick them up.
That way multiple projects can share the same settings (useful for formatting rules for example).
Any value defined here will override the pom.xml file value but is only applicable to the current project.
-->
<org-netbeans-modules-editor-indent.CodeStyle.usedProfile>project</org-netbeans-modules-editor-indent.CodeStyle.usedProfile>
<org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.CodeStyle.project.spaces-per-tab>
<org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.CodeStyle.project.tab-size>
<org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.CodeStyle.project.indent-shift-width>
<org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>true</org-netbeans-modules-editor-indent.CodeStyle.project.expand-tabs>
<org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.CodeStyle.project.text-limit-width>
<org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.CodeStyle.project.text-line-wrap>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indentCasesFromSwitch>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.spaces-per-tab>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.tab-size>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.indent-shift-width>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.expand-tabs>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width>80</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-limit-width>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>none</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.text-line-wrap>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.continuationIndentSize>4</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.continuationIndentSize>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.allowConvertToStarImport>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.allowConvertToStarImport>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.allowConvertToStaticStarImport>false</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.allowConvertToStaticStarImport>
<org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder>*;java</org-netbeans-modules-editor-indent.text.x-java.CodeStyle.project.importGroupsOrder>
<netbeans.compile.on.save>test</netbeans.compile.on.save>
</properties>
</project-shared-configuration>
================================================
FILE: antlr4-maven-plugin/pom.xml
================================================
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.antlr</groupId>
<artifactId>antlr4-master</artifactId>
<version>4.13.3-SNAPSHOT</version>
</parent>
<artifactId>antlr4-maven-plugin</artifactId>
<packaging>maven-plugin</packaging>
<name>ANTLR 4 Maven plugin</name>
<description>Maven plugin for ANTLR 4 grammars</description>
<!-- Ancillary information for completeness -->
<inceptionYear>2009</inceptionYear>
<properties>
<mavenVersion>3.8.5</mavenVersion>
</properties>
<!-- ============================================================================= -->
<!-- What are we depedent on for the Mojos to execute? We need the plugin
API itself and of course we need the ANTLR Tool and runtime and any of their
dependencies, which we inherit. The Tool itself provides us with all the
dependencies, so we need only name it here. -->
<dependencies>
<!-- The things we need to build the target language recognizer -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-plugin-api</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-compiler-api</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
<version>0.0.7</version>
</dependency>
<!-- The version of ANTLR tool that this version of the plugin controls.
We have decided that this should be in lockstep with ANTLR itself, other
than -1 -2 -3 etc patch releases. -->
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Testing requirements... -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven.plugin-tools</groupId>
<artifactId>maven-plugin-annotations</artifactId>
<version>3.6.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>io.takari.maven.plugins</groupId>
<artifactId>takari-plugin-testing</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-core</artifactId>
<version>${mavenVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-compat</artifactId>
<version>${mavenVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.4.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.0</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testSourceDirectory>src/test</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources</directory>
</testResource>
</testResources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-plugin-plugin</artifactId>
<version>3.6.2</version>
<configuration>
<!-- see http://jira.codehaus.org/browse/MNG-5346 -->
<skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
</configuration>
<executions>
<execution>
<id>mojo-descriptor</id>
<goals>
<goal>descriptor</goal>
</goals>
</execution>
<execution>
<id>help-goal</id>
<goals>
<goal>helpmojo</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.takari.maven.plugins</groupId>
<artifactId>takari-lifecycle-plugin</artifactId>
<version>2.0.7</version>
<extensions>true</extensions>
<executions>
<execution>
<id>testProperties</id>
<phase>process-test-resources</phase>
<goals>
<goal>testProperties</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<release>8</release>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
<configuration>
<quiet>true</quiet>
</configuration>
</plugin>
</plugins>
</reporting>
</project>
================================================
FILE: antlr4-maven-plugin/resources/META-INF/m2e/lifecycle-mapping-metadata.xml
================================================
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<goals>
<goal>antlr4</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
<runOnConfiguration>true</runOnConfiguration>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
================================================
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
================================================
/*
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.mojo.antlr4;
import org.antlr.v4.Tool;
import org.antlr.v4.tool.ANTLRMessage;
import org.antlr.v4.tool.ANTLRToolListener;
import org.apache.maven.plugin.logging.Log;
import org.sonatype.plexus.build.incremental.BuildContext;
import org.stringtemplate.v4.ST;
import java.io.File;
/**
* This implementation of {@link ANTLRToolListener} reports messages to the
* {@link Log} instance provided by Maven.
*
* @author Sam Harwell
*/
public class Antlr4ErrorLog implements ANTLRToolListener {
private final Tool tool;
private final BuildContext buildContext;
private final Log log;
/**
* Creates an instance of {@link Antlr4ErrorLog}.
*
* @param log The Maven log
*/
public Antlr4ErrorLog(Tool tool, BuildContext buildContext, Log log) {
this.tool = tool;
this.buildContext = buildContext;
this.log = log;
}
/**
* {@inheritDoc}
* <p>
* This implementation passes the message to the Maven log.
* </p>
* @param message The message to send to Maven
*/
@Override
public void info(String message) {
if (tool.errMgr.formatWantsSingleLineMessage()) {
message = message.replace('\n', ' ');
}
log.info(message);
}
/**
* {@inheritDoc}
* <p>
* This implementation passes the message to the Maven log.
* </p>
* @param message The message to send to Maven.
*/
@Override
public void error(ANTLRMessage message) {
ST msgST = tool.errMgr.getMessageTemplate(message);
String outputMsg = msgST.render();
if (tool.errMgr.formatWantsSingleLineMessage()) {
outputMsg = outputMsg.replace('\n', ' ');
}
log.error(outputMsg);
if (message.fileName != null) {
String text = message.getMessageTemplate(false).render();
buildContext.addMessage(new File(message.fileName), message.line, message.charPosition, text, BuildContext.SEVERITY_ERROR, message.getCause());
}
}
/**
* {@inheritDoc}
* <p>
* This implementation passes the message to the Maven log.
* </p>
* @param message
*/
@Override
public void warning(ANTLRMessage message) {
ST msgST = tool.errMgr.getMessageTemplate(message);
String outputMsg = msgST.render();
if (tool.errMgr.formatWantsSingleLineMessage()) {
outputMsg = outputMsg.replace('\n', ' ');
}
log.warn(outputMsg);
if (message.fileName != null) {
String text = message.getMessageTemplate(false).render();
buildContext.addMessage(new File(message.fileName), message.line, message.charPosition, text, BuildContext.SEVERITY_WARNING, message.getCause());
}
}
}
================================================
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
================================================
/*
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.mojo.antlr4;
import org.antlr.v4.Tool;
import org.antlr.v4.codegen.CodeGenerator;
import org.antlr.v4.runtime.misc.MultiMap;
import org.antlr.v4.runtime.misc.Utils;
import org.antlr.v4.tool.Grammar;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugin.logging.Log;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.plugins.annotations.ResolutionScope;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping;
import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
import org.sonatype.plexus.build.incremental.BuildContext;
import java.io.BufferedWriter;
import java.io.File;
import java.io.IOException;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.StringWriter;
import java.io.Writer;
import java.net.URI;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* Parses ANTLR 4 grammar files {@code *.g4} and transforms them into Java
* source files.
*
* @author Sam Harwell
*/
@Mojo(
name = "antlr4",
defaultPhase = LifecyclePhase.GENERATE_SOURCES,
requiresDependencyResolution = ResolutionScope.COMPILE,
requiresProject = true, threadSafe = true)
public class Antlr4Mojo extends AbstractMojo {
// First, let's deal with the options that the ANTLR tool itself
// can be configured by.
//
/**
* If set to true then the ANTLR tool will generate a description of the ATN
* for each rule in <a href="http://www.graphviz.org">Dot format</a>.
*/
@Parameter(property = "antlr4.atn", defaultValue = "false")
protected boolean atn;
/**
* specify grammar file encoding; e.g., euc-jp
*/
@Parameter(property = "project.build.sourceEncoding")
protected String inputEncoding;
/**
* specify output file encoding; defaults to source encoding
*/
@Parameter(property = "project.build.sourceEncoding")
protected String outputEncoding;
/**
* Generate parse tree listener interface and base class.
*/
@Parameter(property = "antlr4.listener", defaultValue = "true")
protected boolean listener;
/**
* Generate parse tree visitor interface and base class.
*/
@Parameter(property = "antlr4.visitor", defaultValue = "false")
protected boolean visitor;
/**
* Treat warnings as errors.
*/
@Parameter(property = "antlr4.treatWarningsAsErrors", defaultValue = "false")
protected boolean treatWarningsAsErrors;
/**
* Use the ATN simulator for all predictions.
*/
@Parameter(property = "antlr4.forceATN", defaultValue = "false")
protected boolean forceATN;
/**
* A list of grammar options to explicitly specify to the tool. These
* options are passed to the tool using the
* <code>-D<option>=<value></code> syntax.
*/
@Parameter
protected Map<String, String> options;
/**
* A list of additional command line arguments to pass to the ANTLR tool.
*/
@Parameter
protected List<String> arguments;
/* --------------------------------------------------------------------
* The following are Maven specific parameters, rather than specific
* options that the ANTLR tool can use.
*/
/**
* Provides an explicit list of all the grammars that should be included in
* the generate phase of the plugin. Note that the plugin is smart enough to
* realize that imported grammars should be included but not acted upon
* directly by the ANTLR Tool.
* <p>
* A set of Ant-like inclusion patterns used to select files from the source
* directory for processing. By default, the pattern
* <code>**/*.g4</code> is used to select grammar files.
* </p>
*/
@Parameter
protected Set<String> includes = new HashSet<String>();
/**
* A set of Ant-like exclusion patterns used to prevent certain files from
* being processed. By default, this set is empty such that no files are
* excluded.
*/
@Parameter
protected Set<String> excludes = new HashSet<String>();
/**
* The current Maven project.
*/
@Parameter(property = "project", required = true, readonly = true)
protected MavenProject project;
/**
* Specifies whether sources are added to the {@code compile} or
* {@code test} scope.
*/
@Parameter(property = "antlr4.generateTestSources", defaultValue = "false")
private boolean generateTestSources;
/**
* The directory where the ANTLR grammar files ({@code *.g4}) are located.
*/
@Parameter(defaultValue = "${basedir}/src/main/antlr4")
private File sourceDirectory;
/**
* Specify output directory where the Java files are generated.
*/
@Parameter(defaultValue = "${project.build.directory}/generated-sources/antlr4")
private File outputDirectory;
/**
* Specify location of imported grammars and tokens files.
*/
@Parameter(defaultValue = "${basedir}/src/main/antlr4/imports")
private File libDirectory;
/**
* The directory where build status information is located.
*/
@Parameter(defaultValue = "${project.build.directory}/maven-status/antlr4", readonly=true)
private File statusDirectory;
@Component
private BuildContext buildContext;
public File getSourceDirectory() {
return sourceDirectory;
}
public File getOutputDirectory() {
return outputDirectory;
}
public File getLibDirectory() {
return libDirectory;
}
void addSourceRoot(File outputDir) {
if (generateTestSources) {
project.addTestCompileSourceRoot(outputDir.getPath());
}
else {
project.addCompileSourceRoot(outputDir.getPath());
}
}
/**
* An instance of the ANTLR tool build
*/
protected Tool tool;
/**
* The main entry point for this Mojo, it is responsible for converting
* ANTLR 4.x grammars into the target language specified by the grammar.
*
* @exception MojoExecutionException if a configuration or grammar error causes
* the code generation process to fail
* @exception MojoFailureException if an instance of the ANTLR 4 {@link Tool}
* cannot be created
*/
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
Log log = getLog();
outputEncoding = validateEncoding(outputEncoding);
if (log.isDebugEnabled()) {
for (String e : excludes) {
log.debug("ANTLR: Exclude: " + e);
}
for (String e : includes) {
log.debug("ANTLR: Include: " + e);
}
log.debug("ANTLR: Output: " + outputDirectory);
log.debug("ANTLR: Library: " + libDirectory);
}
if (!sourceDirectory.isDirectory()) {
log.info("No ANTLR 4 grammars to compile in " + sourceDirectory.getAbsolutePath());
return;
}
// Ensure that the output directory path is all in tact so that
// ANTLR can just write into it.
//
File outputDir = getOutputDirectory();
if (!outputDir.exists()) {
outputDir.mkdirs();
}
GrammarDependencies dependencies = new GrammarDependencies(sourceDirectory, libDirectory, arguments, getDependenciesStatusFile(), getLog());
// Now pick up all the files and process them with the Tool
//
List<List<String>> argumentSets;
Set<File> grammarFiles;
Set<File> importGrammarFiles;
try {
List<String> args = getCommandArguments();
grammarFiles = getGrammarFiles(sourceDirectory);
importGrammarFiles = getImportFiles(sourceDirectory);
argumentSets = processGrammarFiles(args, grammarFiles, dependencies, sourceDirectory);
} catch (Exception e) {
log.error(e);
throw new MojoExecutionException("Fatal error occured while evaluating the names of the grammar files to analyze", e);
}
log.debug("Output directory base will be " + outputDirectory.getAbsolutePath());
log.info("ANTLR 4: Processing source directory " + sourceDirectory.getAbsolutePath());
for (List<String> args : argumentSets) {
try {
// Create an instance of the ANTLR 4 build tool
tool = new CustomTool(args.toArray(new String[0]));
} catch (Exception e) {
log.error("The attempt to create the ANTLR 4 build tool failed, see exception report for details", e);
throw new MojoFailureException("Error creating an instanceof the ANTLR tool.", e);
}
try {
dependencies.analyze(grammarFiles, importGrammarFiles, tool);
} catch (Exception e) {
log.error("Dependency analysis failed, see exception report for details",
e);
throw new MojoFailureException("Dependency analysis failed.", e);
}
// Set working directory for ANTLR to be the base source directory
tool.inputDirectory = sourceDirectory;
tool.processGrammarsOnCommandLine();
// If any of the grammar files caused errors but did nto throw exceptions
// then we should have accumulated errors in the counts
if (tool.getNumErrors() > 0) {
throw new MojoExecutionException("ANTLR 4 caught " + tool.getNumErrors() + " build errors.");
}
}
if (project != null) {
// Tell Maven that there are some new source files underneath the output directory.
addSourceRoot(this.getOutputDirectory());
}
try {
dependencies.save();
} catch (IOException ex) {
log.warn("Could not save grammar dependency status", ex);
}
}
private List<String> getCommandArguments() {
List<String> args = new ArrayList<String>();
if (getOutputDirectory() != null) {
args.add("-o");
args.add(outputDirectory.getAbsolutePath());
}
// Where do we want ANTLR to look for .tokens and import grammars?
if (getLibDirectory() != null && getLibDirectory().isDirectory()) {
args.add("-lib");
args.add(libDirectory.getAbsolutePath());
}
// Next we need to set the options given to us in the pom into the
// tool instance we have created.
if (atn) {
args.add("-atn");
}
if ( inputEncoding!=null && !inputEncoding.isEmpty()) {
args.add("-encoding");
outputEncoding = inputEncoding;
args.add(inputEncoding);
}
if (listener) {
args.add("-listener");
}
else {
args.add("-no-listener");
}
if (visitor) {
args.add("-visitor");
}
else {
args.add("-no-visitor");
}
if (treatWarningsAsErrors) {
args.add("-Werror");
}
if (forceATN) {
args.add("-Xforce-atn");
}
if (options != null) {
for (Map.Entry<String, String> option : options.entrySet()) {
args.add(String.format("-D%s=%s", option.getKey(), option.getValue()));
}
}
if (arguments != null) {
args.addAll(arguments);
}
return args;
}
/**
*
* @param sourceDirectory
* @exception InclusionScanException
*/
private List<List<String>> processGrammarFiles(
List<String> args,
Set<File> grammarFiles,
GrammarDependencies dependencies,
File sourceDirectory) throws InclusionScanException, IOException {
// We don't want the plugin to run for every grammar, regardless of whether
// it's changed since the last compilation. Check the mtime of the tokens vs
// the grammar file mtime to determine whether we even need to execute.
Set<File> grammarFilesToProcess = new HashSet<File>();
for (File grammarFile : grammarFiles) {
String tokensFileName = grammarFile.getName().split("\\.")[0] + ".tokens";
File outputFile = new File(outputDirectory, tokensFileName);
if ( (! outputFile.exists()) ||
outputFile.lastModified() <= grammarFile.lastModified() ||
dependencies.isDependencyChanged(grammarFile)) {
grammarFilesToProcess.add(grammarFile);
}
}
grammarFiles = grammarFilesToProcess;
if (grammarFiles.isEmpty()) {
getLog().info("No grammars to process");
return Collections.emptyList();
}
MultiMap<String, File> grammarFileByFolder = new MultiMap<String, File>();
// Iterate each grammar file we were given and add it into the tool's list of
// grammars to process.
for (File grammarFile : grammarFiles) {
buildContext.refresh(grammarFile);
buildContext.removeMessages(grammarFile);
getLog().debug("Grammar file '" + grammarFile.getPath() + "' detected.");
String relPathBase = MojoUtils.findSourceSubdir(sourceDirectory, grammarFile);
String relPath = relPathBase + grammarFile.getName();
getLog().debug(" ... relative path is: " + relPath);
grammarFileByFolder.map(relPathBase, grammarFile);
}
List<List<String>> result = new ArrayList<List<String>>();
for (Map.Entry<String, List<File>> entry : grammarFileByFolder.entrySet()) {
List<String> folderArgs = new ArrayList<String>(args);
if (!folderArgs.contains("-package") && !entry.getKey().isEmpty()) {
folderArgs.add("-package");
folderArgs.add(getPackageName(entry.getKey()));
}
for (File file : entry.getValue()) {
folderArgs.add(entry.getKey() + file.getName());
}
result.add(folderArgs);
}
return result;
}
private Set<File> getImportFiles(File sourceDirectory) throws InclusionScanException {
if (!libDirectory.exists()) return Collections.emptySet();
Set<String> includes = new HashSet<String>();
includes.add("*.g4");
includes.add("*.tokens");
SourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes,
Collections.<String>emptySet());
scan.addSourceMapping(new SuffixMapping("G4", "g4"));
return scan.getIncludedSources(libDirectory, null);
}
private Set<File> getGrammarFiles(File sourceDirectory) throws InclusionScanException
{
// Which files under the source set should we be looking for as grammar files
SourceMapping mapping = new SuffixMapping("g4", Collections.<String>emptySet());
// What are the sets of includes (defaulted or otherwise).
Set<String> includes = getIncludesPatterns();
// Now, to the excludes, we need to add the imports directory
// as this is autoscanned for imported grammars and so is auto-excluded from the
// set of grammar fields we should be analyzing.
excludes.add("imports/**");
SourceInclusionScanner scan = new SimpleSourceInclusionScanner(includes, excludes);
scan.addSourceMapping(mapping);
return scan.getIncludedSources(sourceDirectory, null);
}
private static String getPackageName(String relativeFolderPath) {
if (relativeFolderPath.contains("..")) {
throw new UnsupportedOperationException("Cannot handle relative paths containing '..'");
}
List<String> parts = new ArrayList<String>(Arrays.asList(relativeFolderPath.split("[/\\\\\\.]+")));
while (parts.remove("")) {
// intentionally blank
}
return Utils.join(parts.iterator(), ".");
}
public Set<String> getIncludesPatterns() {
if (includes == null || includes.isEmpty()) {
return Collections.singleton("**/*.g4");
}
return includes;
}
private File getDependenciesStatusFile() {
File statusFile = new File(statusDirectory, "dependencies.ser");
if (!statusFile.getParentFile().exists()) {
statusFile.getParentFile().mkdirs();
}
return statusFile;
}
private final class CustomTool extends Tool {
public CustomTool(String[] args) {
super(args);
addListener(new Antlr4ErrorLog(this, buildContext, getLog()));
}
@Override
public void process(Grammar g, boolean gencode) {
getLog().info("Processing grammar: " + g.fileName);
super.process(g, gencode);
}
@Override
public Writer getOutputFileWriter(Grammar g, String fileName) throws IOException {
if (outputDirectory == null) {
return new StringWriter();
}
// output directory is a function of where the grammar file lives
// for subdir/T.g4, you get subdir here. Well, depends on -o etc...
// But, if this is a .tokens file, then we force the output to
// be the base output directory (or current directory if there is not a -o)
//
File outputDir;
if ( fileName.endsWith(CodeGenerator.VOCAB_FILE_EXTENSION) ) {
outputDir = new File(outputDirectory);
}
else {
outputDir = getOutputDirectory(g.fileName);
}
File outputFile = new File(outputDir, fileName);
if (!outputDir.exists()) {
outputDir.mkdirs();
}
URI relativePath = project.getBasedir().toURI().relativize(outputFile.toURI());
getLog().debug(" Writing file: " + relativePath);
OutputStream outputStream = buildContext.newFileOutputStream(outputFile);
if ( outputEncoding!=null && !outputEncoding.isEmpty()) {
return new BufferedWriter(new OutputStreamWriter(outputStream, outputEncoding));
}
else {
return new BufferedWriter(new OutputStreamWriter(outputStream));
}
}
}
/**
* Validates the given encoding.
*
* @return the validated encoding. If {@code null} was provided, returns the platform default encoding.
*/
private String validateEncoding(String encoding) {
return (encoding == null) ? Charset.defaultCharset().name() : Charset.forName(encoding.trim()).name();
}
}
================================================
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/GrammarDependencies.java
================================================
/*
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.mojo.antlr4;
import org.antlr.runtime.tree.Tree;
import org.antlr.v4.Tool;
import org.antlr.v4.misc.Graph;
import org.antlr.v4.parse.ANTLRParser;
import org.antlr.v4.tool.ast.GrammarAST;
import org.antlr.v4.tool.ast.GrammarRootAST;
import org.apache.maven.plugin.logging.Log;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
class GrammarDependencies {
private final Graph<String> graph = new Graph<String>();
private final File sourceDirectory;
private final File libDirectory;
private final File statusFile;
private final String packageName;
/** Map grammars to their checksum and references. */
private final Map<File, Map.Entry<byte[], Collection<String>>> grammars;
private final Log log;
public GrammarDependencies(File sourceDirectory, File libDirectory,
List<String> arguments, File status, Log log) {
this.log = log;
this.sourceDirectory = sourceDirectory;
this.libDirectory = libDirectory;
this.statusFile = status;
this.grammars = loadStatus(status);
this.packageName = getPackage(arguments);
}
/**
* Determines the package to use.
*
* @param arguments the tool arguments.
*
* @return the package. Returns {@code null} to indicate that no package should be
* used.
*/
private String getPackage(List<String> arguments) {
int index = (arguments != null) ? arguments.indexOf("-package") : -1;
return (index > -1)
? (arguments.get(index + 1).replace('.', File.separatorChar) +
File.separatorChar)
: null;
}
public void save() throws IOException {
if (!grammars.isEmpty()) {
log.debug("Persisting grammars dependency status: " + statusFile);
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(
statusFile));
try {
out.writeObject(grammars);
} finally {
out.close();
}
}
}
/**
* Performs dependency analysis for the given grammar files.
*
* @param grammarFiles the grammar files.
* @param importGrammarFiles the import grammar files.
* @param tool the tool to use.
*
* @return self-reference.
*/
public GrammarDependencies analyze(Set<File> grammarFiles,
Set<File> importGrammarFiles, Tool tool) throws IOException {
log.debug("Analysing grammar dependencies " + sourceDirectory);
// for dependency analysis we require all grammars
Collection<File> grammarsAndTokens = new HashSet<File>();
grammarsAndTokens.addAll(importGrammarFiles);
grammarsAndTokens.addAll(grammarFiles);
for (File grammarFile : grammarsAndTokens) {
// .tokens files must not be parsed, they can just be referenced
if (!grammarFile.getName().endsWith(".tokens"))
analyse(grammarFile, grammarsAndTokens, tool);
}
for (File grammarFile : grammarFiles) {
Collection<String> usages = findUsages(getRelativePath(grammarFile));
if (!usages.isEmpty()) {
grammars.put(grammarFile,
new AbstractMap.SimpleImmutableEntry<byte[], Collection<String>>(
MojoUtils.checksum(grammarFile), usages));
log.debug(" " + getRelativePath(grammarFile) + " used by " + usages);
}
}
for (File grammarFile : importGrammarFiles) {
// imported files are not allowed to be qualified
Collection<String> usages = findUsages(grammarFile.getName());
if (!usages.isEmpty()) {
grammars.put(grammarFile,
new AbstractMap.SimpleImmutableEntry<byte[], Collection<String>>(
MojoUtils.checksum(grammarFile), usages));
log.debug(" " + grammarFile.getName() + " imported by " + usages);
}
}
return this;
}
/**
* Determines whether a grammar used by the given grammar was modified since the last
* build.
*
* @param grammarFile the grammar.
*
* @return {@code true} if a grammar used by the given grammar has been modified.
*/
public boolean isDependencyChanged(File grammarFile) throws IOException {
String grammarPath = getRelativePath(grammarFile);
for (Map.Entry<File, Map.Entry<byte[], Collection<String>>> e : grammars.entrySet()) {
File depGrammarFile = e.getKey();
byte[] checksum = e.getValue().getKey();
Collection<String> usages = e.getValue().getValue();
if (usages.contains(grammarPath)) {
if (!depGrammarFile.exists() || !Arrays.equals(MojoUtils.checksum(depGrammarFile), checksum)) {
log.debug(" " + grammarPath + ": dependency " +
depGrammarFile.getName() + " changed");
return true;
}
}
}
return false;
}
/**
* Determines the relative target path of the given grammar file.
*
* @param grammarFile the grammar file.
*
* @return the relative path.
*/
private String getRelativePath(File grammarFile) {
// the library directory does not allow sub-directories
if (grammarFile.getPath().startsWith(libDirectory.getPath()))
return grammarFile.getName();
// if a package is given, we have to use it
if (packageName != null)
return packageName + grammarFile.getName();
// otherwise resolve the path relative to the source directory
String path = MojoUtils.findSourceSubdir(sourceDirectory, grammarFile);
return path + grammarFile.getName();
}
/**
* Returns the grammar file names that directly or indirectly use the given grammar.
*
* @param grammarFileName the grammar file name.
*
* @return the grammar file names that use the given grammar file.
*/
private Collection<String> findUsages(String grammarFileName) {
Collection<String> result = new ArrayList<String>();
explore(grammarFileName, result);
return result;
}
private void explore(String grammarName, Collection<String> result) {
for (Graph.Node<String> node : graph.getNode(grammarName).edges) {
result.add(node.payload);
explore(node.payload, result);
}
}
private void analyse(File grammarFile, Collection<File> grammarFiles, Tool tool) {
GrammarRootAST grammar = tool.parseGrammar(grammarFile.getAbsolutePath());
if (grammar == null)
return;
for (GrammarAST importDecl : grammar.getAllChildrenWithType(ANTLRParser.IMPORT)) {
for (Tree id: importDecl.getAllChildrenWithType(ANTLRParser.ID)) {
// missing id is not valid, but we don't want to prevent the root cause from
// being reported by the ANTLR tool
if (id != null) {
String grammarPath = getRelativePath(grammarFile);
graph.addEdge(id.getText() + ".g4", grammarPath);
}
}
}
for (GrammarAST options : grammar.getAllChildrenWithType(ANTLRParser.OPTIONS)) {
for (int i = 0, count = options.getChildCount(); i < count; i++) {
Tree option = options.getChild(i);
if (option.getType() == ANTLRParser.ASSIGN) {
String key = option.getChild(0).getText();
String value = option.getChild(1).getText();
if ("tokenVocab".equals(key)) {
String name = stripQuotes(value);
// the grammar name may be qualified, but we resolve the path anyway
String grammarName = stripPath(name);
String grammarPath = MojoUtils.findSourceSubdir(sourceDirectory,
grammarFile);
File depGrammarFile = resolve(grammarName, grammarPath);
// if a package has been given, we use it instead of the file directory path
// (files probably reside in the root directory anyway with such a configuration )
if (packageName != null)
grammarPath = packageName;
graph.addEdge(getRelativePath(depGrammarFile),
grammarPath + grammarFile.getName());
}
}
}
}
}
/**
* Resolves the given grammar name.
*
* @param name the name.
* @param path the relative path.
*
* @return the grammar file.
*/
private File resolve(String name, String path) {
File file = new File(sourceDirectory, path + name + ".g4");
if (file.exists())
return file;
file = new File(libDirectory, name + ".g4");
if (file.exists())
return file;
return new File(libDirectory, name + ".tokens");
}
private Map<File, Map.Entry<byte[], Collection<String>>> loadStatus(File statusFile) {
if (statusFile.exists()) {
log.debug("Load grammars dependency status: " + statusFile);
try {
ObjectInputStream in = new ObjectInputStream(new FileInputStream(
statusFile));
try {
@SuppressWarnings("unchecked")
Map<File, Map.Entry<byte[], Collection<String>>> data =
(Map<File, Map.Entry<byte[], Collection<String>>>)
in.readObject();
return data;
} finally {
in.close();
}
} catch (Exception ex) {
log.warn("Could not load grammar dependency status information", ex);
}
}
return new HashMap<File, Map.Entry<byte[], Collection<String>>>();
}
private String stripPath(String str) {
return str.replaceAll("^.*[/\\\\]", "");
}
private String stripQuotes(String str) {
return str.replaceAll("\\A'|'\\Z", "");
}
}
================================================
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java
================================================
/*
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.mojo.antlr4;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
class MojoUtils {
/**
* Creates the MD5 checksum for the given file.
*
* @param file the file.
*
* @return the checksum.
*/
public static byte[] checksum(File file) throws IOException {
try {
InputStream in = new FileInputStream(file);
byte[] buffer = new byte[2048];
MessageDigest complete = MessageDigest.getInstance("MD5");
try {
int n;
do {
n = in.read(buffer);
if (n > 0) {
complete.update(buffer, 0, n);
}
} while (n != -1);
} finally {
in.close();
}
return complete.digest();
} catch (NoSuchAlgorithmException ex) {
throw new IOException("Could not create checksum " + file, ex);
}
}
/**
* Given the source directory File object and the full PATH to a grammar, produce the
* path to the named grammar file in relative terms to the {@code sourceDirectory}.
* This will then allow ANTLR to produce output relative to the base of the output
* directory and reflect the input organization of the grammar files.
*
* @param sourceDirectory The source directory {@link File} object
* @param grammarFileName The full path to the input grammar file
*
* @return The path to the grammar file relative to the source directory
*/
public static String findSourceSubdir(File sourceDirectory, File grammarFile) {
String srcPath = sourceDirectory.getPath() + File.separator;
String path = grammarFile.getPath();
if (!path.startsWith(srcPath)) {
throw new IllegalArgumentException("expected " + path +
" to be prefixed with " + sourceDirectory);
}
File unprefixedGrammarFileName = new File(path.substring(srcPath.length()));
if (unprefixedGrammarFileName.getParent() == null) {
return "";
}
return unprefixedGrammarFileName.getParent() + File.separator;
}
}
================================================
FILE: antlr4-maven-plugin/src/site/apt/examples/import.apt
================================================
Imported Grammar Files
In order to have the ANTLR plugin automatically locate and use grammars used
as imports in your main <<<.g4>>> files, you need to place the imported grammar
files in the <<<imports>>> directory beneath the root directory of your grammar
files (which is <<<src/main/antlr4>>> by default of course).
For a default layout, place your import grammars in the directory: <<<src/main/antlr4/imports>>>
================================================
FILE: antlr4-maven-plugin/src/site/apt/examples/libraries.apt.vm
================================================
Libraries
The introduction of the import directive in a grammar allows reuse of common grammar files
as well as the ability to divide up functional components of large grammars. However it has
caused some confusion in regard to the fact that generated vocabulary files (<<<*.tokens>>>) can also
be searched for with the <<<<libDirectory>>>> directive.
This has confused two separate functions and imposes a structure upon the layout of
your grammar files in certain cases. If you have grammars that both use the import
directive and also require the use of a vocabulary file then you will need to locate
the grammar that generates the <<<.tokens>>> file alongside the grammar that uses it. This
is because you will need to use the <<<<libDirectory>>>> directive to specify the
location of your imported grammars and ANTLR will not find any vocabulary files in
this directory.
The <<<.tokens>>> files for any grammars are generated within the same output directory structure
as the <<<.java>>> files. So, wherever the <<<.java>>> files are generated, you will also find the <<<.tokens>>>
files. ANTLR looks for <<<.tokens>>> files in both the <<<<libDirectory>>>> and the output directory
where it is placing the generated <<<.java>>> files. Hence when you locate the grammars that generate
<<<.tokens>>> files in the same source directory as the ones that use the <<<.tokens>>> files, then
the Maven plugin will find the expected <<<.tokens>>> files.
The <<<<libDirectory>>>> is specified like any other directory parameter in Maven. Here is an
example:
+--
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<configuration>
<goals>
<goal>antlr4</goal>
</goals>
<libDirectory>src/main/antlr4_imports</libDirectory>
</configuration>
</execution>
</executions>
</plugin>
+--
================================================
FILE: antlr4-maven-plugin/src/site/apt/examples/simple.apt.vm
================================================
Simple configuration
If your grammar files are organized into the default locations as described in the {{{../index.html}introduction}},
then configuring the <<<pom.xml>>> file for your project is as simple as adding this to it
+--
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
...
</plugins>
+--
When the <<<mvn>>> command is executed all grammar files under <<<src/main/antlr4>>>, except any
import grammars under <<<src/main/antlr4/imports>>> will be analyzed and converted to
Java source code in the output directory <<<target/generated-sources/antlr4>>>.
Your input files under <<<antlr4>>> should be stored in sub directories that
reflect the package structure of your java parsers. If your grammar file <<<parser.g4>>> contains:
+---
@header {
package org.jimi.themuss;
}
+---
Then the <<<.g4>>> file should be stored in: <<<src/main/antlr4/org/jimi/themuss/parser.g4>>>. This way
the generated <<<.java>>> files will correctly reflect the package structure in which they will
finally rest as classes.
================================================
FILE: antlr4-maven-plugin/src/site/apt/faq.apt.vm
================================================
FAQ
================================================
FILE: antlr4-maven-plugin/src/site/apt/index.apt
================================================
-------------
ANTLR v4 Maven Plugin
-------------
Jim Idle
-------------
March 2009
-------------
ANTLR v4 Maven plugin
The ANTLR v4 Maven plugin is completely re-written as of version 4.0; if you are familiar
with prior versions, you should note that there are some behavioral differences that make
it worthwhile reading this documentation.
The job of the plugin is essentially to tell the standard ANTLR parser generator where the
input grammar files are and where the output files should be generated. As with all Maven
plugins, there are defaults, which you are advised to comply to, but are not forced to
comply to.
This version of the plugin allows full control over ANTLR and allows configuration of all
options that are useful for a build system. The code required to calculate dependencies,
check the build order, and otherwise work with your grammar files is built into the ANTLR
tool as of version 4.0 of ANTLR and this plugin.
* Plugin Versioning
The plugin version tracks the version of the ANTLR tool that it controls. Hence if you
use version 4.0 of the plugin, you will build your grammars using version 4.0 of the
ANTLR tool, version 4.2 of the plugin will use version 4.2 of the ANTLR tool and so on.
You may also find that there are patch versions of the plugin such as 4.0-1 4.0-2 and
so on. Use the latest patch release of the plugin.
The current version of the plugin is shown at the top of this page after the <<Last Deployed>> date.
* Default directories
As with all Maven plugins, this plugin will automatically default to standard locations
for your grammar and import files. Organizing your source code to reflect this standard
layout will greatly reduce the configuration effort required. The standard layout lookd
like this:
+--
src/main/
|
+--- antlr4/... .g4 files organized in the required package structure
|
+--- imports/ .g4 files that are imported by other grammars.
+--
If your grammar is intended to be part of a package called <<<org.foo.bar>>> then you would
place it in the directory <<<src/main/antlr4/org/foo/bar>>>. The plugin will then produce
<<<.java>>> and <<<.tokens>>> files in the output directory <<<target/generated-sources/antlr4/org/foo/bar>>>
When the Java files are compiled they will be in the correct location for the Javac
compiler without any special configuration. The generated java files are automatically
submitted for compilation by the plugin.
The <<<src/main/antlr4/imports>>> directory is treated in a special way. It should contain
any grammar files that are imported by other grammar files (do not make subdirectories here.)
Such files are never built on their own, but the plugin will automatically tell the ANTLR
tool to look in this directory for library files.
================================================
FILE: antlr4-maven-plugin/src/site/apt/usage.apt.vm
================================================
Usage
The ANTLR 4 plugin for Maven can generate parsers for any number of grammars in
your project.
* Compiling Grammars into Parsers
By default, the <<<{{{./antlr4-mojo.html}antlr4}}>>> goal will search for grammar
files in the directory <<<$\{basedir\}/src/main/antlr4>>> and any additional
<<<.tokens>>> files in the directory <<<$\{basedir\}/src/main/antlr4/imports>>>.
This can be configured to search other directories using the plugin configuration
parameters as described in the <<<{{{./antlr4-mojo.html}antlr4}}>>> goal
documentation.
The following figure shows the expected layout of files for the default
configuration of this plugin.
+--
src/main/
|
+--- antlr4/... .g4 files organized in the required package structure
|
+--- imports/ user-created .tokens files and .g4 files that are imported by other grammars
+--
The next step is to configure your POM to call the plugin. The goals will
normally run during the generate-sources phase of the build. Examples of how to
configure your POM can be found on the various examples pages, reachable via
the page menu. If you stick with the default values, the snippet below will
suffice:
+--
<project>
...
<build>
<plugins>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
<version>${project.version}</version>
<executions>
<execution>
<id>antlr</id>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
...
</build>
...
</project>
+--
Note that you can create multiple executions, and thus build some grammars with
different options to others (such as setting the <<<debug>>> option for
instance).
================================================
FILE: antlr4-maven-plugin/src/site/site.xml
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project name="ANTLR v4 Maven plugin">
<publishDate position="left"/>
<version position="left"/>
<poweredBy>
<logo name="ANTLR Web Site" href="http://antlr.org/"
img="http://www.antlr.org/images/antlr-logo.png"/>
</poweredBy>
<body>
<links>
<item name="Antlr Web Site" href="http://www.antlr.org/"/>
</links>
<menu name="Overview">
<item name="Introduction" href="index.html"/>
<item name="Goals" href="plugin-info.html"/>
<item name="Usage" href="usage.html"/>
<item name="FAQ" href="faq.html"/>
</menu>
<menu name="Examples">
<item name="Simple configurations" href="examples/simple.html"/>
<item name="Using library directories" href="examples/libraries.html"/>
<item name="Using imported grammars" href="examples/import.html"/>
</menu>
<menu ref="reports" />
<menu ref="modules" />
</body>
</project>
================================================
FILE: antlr4-maven-plugin/src/test/java/org/antlr/mojo/antlr4/Antlr4MojoTest.java
================================================
/*
* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
* Use of this file is governed by the BSD 3-clause license that
* can be found in the LICENSE.txt file in the project root.
*/
package org.antlr.mojo.antlr4;
import io.takari.maven.testing.TestMavenRuntime;
import io.takari.maven.testing.TestResources;
import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.MojoExecution;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.project.MavenProject;
import org.codehaus.plexus.util.xml.Xpp3Dom;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Arrays;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class Antlr4MojoTest {
@Rule
public ExpectedException thrown = ExpectedException.none();
@Rule
public final TestResources resources = new TestResources();
@Rule
public final TestMavenRuntime maven = new TestMavenRuntime();
@Test
public void importTokens() throws Exception {
Path baseDir = resources.getBasedir("importTokens").toPath();
Path antlrDir = baseDir.resolve("src/main/antlr4");
Path generatedSources = baseDir.resolve("target/generated-sources/antlr4");
Path genParser = generatedSources.resolve("test/SimpleParser.java");
Path tokens = antlrDir.resolve("imports/SimpleLexer.tokens");
MavenProject project = maven.readMavenProject(baseDir.toFile());
MavenSession session = maven.newMavenSession(project);
MojoExecution exec = maven.newMojoExecution("antlr4");
////////////////////////////////////////////////////////////////////////
// 1st - all grammars have to be processed
////////////////////////////////////////////////////////////////////////
assertFalse(Files.exists(genParser));
maven.executeMojo(session, project, exec);
assertTrue(Files.exists(genParser));
////////////////////////////////////////////////////////////////////////
// 2nd - nothing has been modified, no grammars have to be processed
////////////////////////////////////////////////////////////////////////
{
byte[] sum = checksum(genParser);
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(sum, checksum(genParser)));
}
////////////////////////////////////////////////////////////////////////
// 3rd - the imported grammar changed, every dependency has to be processed
////////////////////////////////////////////////////////////////////////
try(Change change = Change.of(tokens, "DOT=4")) {
byte[] sum = checksum(genParser);
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(sum, checksum(genParser)));
}
}
@Test
public void importsCustomLayout() throws Exception {
Path baseDir = resources.getBasedir("importsCustom").toPath();
Path antlrDir = baseDir.resolve("src/main/antlr4");
Path generatedSources = baseDir.resolve("src/main/java");
Path genTestLexer = generatedSources.resolve("foo/TestLexer.java");
Path genTestParser = generatedSources.resolve("foo/TestParser.java");
Path genHello = generatedSources.resolve("foo/HelloParser.java");
Path baseGrammar = antlrDir.resolve("imports/TestBaseLexer.g4");
Path lexerGrammar = antlrDir.resolve("TestLexer.g4");
Path parserGrammar = antlrDir.resolve("TestParser.g4");
Xpp3Dom outputDirectory = TestMavenRuntime.newParameter("outputDirectory",
"src/main/java/foo");
Xpp3Dom arguments = new Xpp3Dom("arguments");
arguments.addChild(TestMavenRuntime.newParameter("argument", "-package"));
arguments.addChild(TestMavenRuntime.newParameter("argument", "foo"));
MavenProject project = maven.readMavenProject(baseDir.toFile());
MavenSession session = maven.newMavenSession(project);
MojoExecution exec = maven.newMojoExecution("antlr4", outputDirectory, arguments);
////////////////////////////////////////////////////////////////////////
// 1st - all grammars have to be processed
////////////////////////////////////////////////////////////////////////
assertFalse(Files.exists(genHello));
assertFalse(Files.exists(genTestParser));
assertFalse(Files.exists(genTestLexer));
maven.executeMojo(session, project, exec);
assertTrue(Files.exists(genHello));
assertTrue(Files.exists(genTestParser));
assertTrue(Files.exists(genTestLexer));
////////////////////////////////////////////////////////////////////////
// 2nd - nothing has been modified, no grammars have to be processed
////////////////////////////////////////////////////////////////////////
{
byte[] testLexerSum = checksum(genTestLexer);
byte[] testParserSum = checksum(genTestParser);
byte[] helloSum = checksum(genHello);
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(testLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(testParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(helloSum, checksum(genHello)));
}
////////////////////////////////////////////////////////////////////////
// 3rd - the imported grammar changed, every dependency has to be processed
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(baseGrammar, "DOT: '.' ;")) {
byte[] testLexerSum = checksum(genTestLexer);
byte[] testParserSum = checksum(genTestParser);
byte[] helloSum = checksum(genHello);
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(testLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(testParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(helloSum, checksum(genHello)));
}
////////////////////////////////////////////////////////////////////////
// 4th - the lexer grammar changed, the parser grammar has to be processed as well
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(lexerGrammar, "fragment DOT : '.';")) {
byte[] testLexerSum = checksum(genTestLexer);
byte[] testParserSum = checksum(genTestParser);
byte[] helloSum = checksum(genHello);
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(testLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(testParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(helloSum, checksum(genHello)));
}
////////////////////////////////////////////////////////////////////////
// 5th - the parser grammar changed, no other grammars have to be processed
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(parserGrammar, " t : WS* ;")) {
byte[] testLexerSum = checksum(genTestLexer);
byte[] testParserSum = checksum(genTestParser);
byte[] helloSum = checksum(genHello);
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(testLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(testParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(helloSum, checksum(genHello)));
}
}
@Test
public void importsStandardLayout() throws Exception {
Path baseDir = resources.getBasedir("importsStandard").toPath();
Path antlrDir = baseDir.resolve("src/main/antlr4");
Path generatedSources = baseDir.resolve("target/generated-sources/antlr4");
Path genTestLexer = generatedSources.resolve("test/TestLexer.java");
Path genTestParser = generatedSources.resolve("test/TestParser.java");
Path genHello = generatedSources.resolve("test/HelloParser.java");
Path baseGrammar = antlrDir.resolve("imports/TestBaseLexer.g4");
Path baseGrammar2 = antlrDir.resolve("imports/TestBaseLexer2.g4");
Path lexerGrammar = antlrDir.resolve("test/TestLexer.g4");
Path parserGrammar = antlrDir.resolve("test/TestParser.g4");
MavenProject project = maven.readMavenProject(baseDir.toFile());
MavenSession session = maven.newMavenSession(project);
MojoExecution exec = maven.newMojoExecution("antlr4");
////////////////////////////////////////////////////////////////////////
// 1st - all grammars have to be processed
////////////////////////////////////////////////////////////////////////
assertFalse(Files.exists(genHello));
assertFalse(Files.exists(genTestParser));
assertFalse(Files.exists(genTestLexer));
maven.executeMojo(session, project, exec);
assertTrue(Files.exists(genHello));
assertTrue(Files.exists(genTestParser));
assertTrue(Files.exists(genTestLexer));
byte[] origTestLexerSum = checksum(genTestLexer);
byte[] origTestParserSum = checksum(genTestParser);
byte[] origHelloSum = checksum(genHello);
////////////////////////////////////////////////////////////////////////
// 2nd - nothing has been modified, no grammars have to be processed
////////////////////////////////////////////////////////////////////////
{
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
////////////////////////////////////////////////////////////////////////
// 3rd - the imported grammar changed, every dependency has to be processed
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(baseGrammar, "DOT: '.' ;")) {
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
// Restore file and confirm it was restored.
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
////////////////////////////////////////////////////////////////////////
// 4th - the second imported grammar changed, every dependency has to be processed
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(baseGrammar2, "BANG: '!' ;")) {
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
// Restore file and confirm it was restored.
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
////////////////////////////////////////////////////////////////////////
// 5th - the lexer grammar changed, the parser grammar has to be processed as well
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(lexerGrammar, "FOO: 'foo' ;")) {
maven.executeMojo(session, project, exec);
assertFalse(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
// Restore file and confirm it was restored.
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
////////////////////////////////////////////////////////////////////////
// 6th - the parser grammar changed, no other grammars have to be processed
////////////////////////////////////////////////////////////////////////
// modify the grammar to make checksum comparison detect a change
try(Change change = Change.of(parserGrammar, " t : WS* ;")) {
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertFalse(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
// Restore file and confirm it was restored.
maven.executeMojo(session, project, exec);
assertTrue(Arrays.equals(origTestLexerSum, checksum(genTestLexer)));
assertTrue(Arrays.equals(origTestParserSum, checksum(genTestParser)));
assertTrue(Arrays.equals(origHelloSum, checksum(genHello)));
}
@Test
public void processWhenDependencyRemoved() throws Exception {
Path baseDir = resources.getBasedir("dependencyRemoved").toPath();
Path antlrDir = baseDir.resolve("src/main/antlr4");
Path baseGrammar = antlrDir.resolve("imports/HelloBase.g4");
MavenProject project = maven.readMavenProject(baseDir.toFile());
MavenSession session = maven.newMavenSession(project);
MojoExecution exec = maven.newMojoExecution("antlr4");
maven.executeMojo(session, project, exec);
try(Change temp = Change.of(baseGrammar)) {
// if the base grammar no longer exists, processing must be performed
Files.delete(baseGrammar);
thrown.expect(MojoExecutionException.class);
thrown.expectMessage("ANTLR 4 caught 1 build errors.");
maven.executeMojo(session, project, exec);
}
}
private byte[] checksum(Path path) throws IOException {
return MojoUtils.checksum(path.toFile());
}
private static class Change implements AutoCloseable {
final Path file;
final byte[] original;
public Change(Path file, String change) {
this.file = file;
try {
original = Files.readAllBytes(file);
} catch (IOException ex) {
throw new RuntimeException("Could not read file " + file);
}
String text = new String(original, StandardCharsets.UTF_8) + change;
write(file, text.getBytes(StandardCharsets.UTF_8));
}
private void write(Path file, byte[] data) {
try {
Files.write(file, data);
} catch (IOException ex) {
throw new RuntimeException("Could not write file " + file);
}
}
public static Change of(Path file, String change) {
return new Change(file, change);
}
public static Change of(Path file) {
return new Change(file, "\n");
}
@Override
public void close() {
write(file, original);
}
}
}
================================================
FILE: antlr4-maven-plugin/src/test/projects/dependencyRemoved/pom.xml
================================================
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>deps.removed</groupId>
<artifactId>depRemoved</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test processing after dependency removed</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>antlr4-maven-plugin</artifactId>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/imports/HelloBase.g4
================================================
lexer grammar TestBaseLexer;
tokens { Name }
// Default "mode": Everything OUTSIDE of a tag
Comment : '<!--' .*? '-->' ;
CDSect : '<![CDATA[' .*? ']]>' ;
fragment
Whitespace : ' ' | '\n' | '\t' | '\r' ;
fragment
Hexdigit : [a-fA-F0-9] ;
fragment
Digit : [0-9] ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/test/Hello.g4
================================================
grammar Hello;
import HelloBase;
r : 'hello' ID ;
ID : [a-z]+ ;
WS : [ \r\t\n]+ -> skip ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importTokens/pom.xml
================================================
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>import.tokens</groupId>
<artifactId>importTokens</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test importing tokens file</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>antlr4-maven-plugin</artifactId>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/imports/SimpleLexer.tokens
================================================
ID=1
INT=2
SEMI=3
================================================
FILE: antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/test/SimpleParser.g4
================================================
parser grammar SimpleParser;
options {
// get token types from SimpleLexer.tokens; don't name it
// SimpleParser.tokens as ANTLR will overwrite!
tokenVocab=SimpleLexer;
}
s : ( ID | INT )* SEMI ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsCustom/pom.xml
================================================
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>imports.custom</groupId>
<artifactId>importsCustom</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test importing, custom layout</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>antlr4-maven-plugin</artifactId>
<configuration>
<outputDirectory>${basedir}/src/main/java/com/foo</outputDirectory>
<arguments>
<argument>-visitor</argument>
<argument>-no-listener</argument>
<argument>-Xlog</argument>
<argument>-package</argument>
<argument>com.foo</argument>
</arguments>
</configuration>
<executions>
<execution>
<goals>
<goal>antlr4</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/Hello.g4
================================================
grammar Hello;
r : 'hello' ID ;
ID : [a-z]+ ;
WS : [ \r\t\n]+ -> skip ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestLexer.g4
================================================
lexer grammar TestLexer;
import TestBaseLexer;
WS : Whitespace+ -> skip;
TEXT : ~[<&]+ ; // match any 16 bit char other than < and &
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestParser.g4
================================================
parser grammar TestParser;
options { tokenVocab=TestLexer; }
document : (Comment | Name) EOF ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/imports/TestBaseLexer.g4
================================================
lexer grammar TestBaseLexer;
tokens { Name }
// Default "mode": Everything OUTSIDE of a tag
Comment : '<!--' .*? '-->' ;
CDSect : '<![CDATA[' .*? ']]>' ;
fragment
Whitespace : ' ' | '\n' | '\t' | '\r' ;
fragment
Hexdigit : [a-fA-F0-9] ;
fragment
Digit : [0-9] ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/pom.xml
================================================
<!--
~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
~ Use of this file is governed by the BSD 3-clause license that
~ can be found in the LICENSE.txt file in the project root.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>imports.standard</groupId>
<artifactId>importsStandard</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Test importing, standard layout</name>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>antlr4-maven-plugin</artifactId>
<configuration>
</configuration>
</plugin>
</plugins>
</build>
</project>
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4
================================================
lexer grammar TestBaseLexer;
tokens { Name }
// Default "mode": Everything OUTSIDE of a tag
Comment : '<!--' .*? '-->' ;
CDSect : '<![CDATA[' .*? ']]>' ;
fragment
Whitespace : ' ' | '\n' | '\t' | '\r' ;
fragment
Hexdigit : [a-fA-F0-9] ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer2.g4
================================================
lexer grammar TestBaseLexer2;
fragment
Digit : [0-9] ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4
================================================
grammar Hello;
r : 'hello' ID ;
ID : [a-z]+ ;
WS : [ \r\t\n]+ -> skip ;
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4
================================================
lexer grammar TestLexer;
import TestBaseLexer, TestBaseLexer2;
WS : Whitespace+ -> skip;
TEXT : ~[<&]+ ; // match any 16 bit char other than < and &
================================================
FILE: antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4
================================================
parser grammar TestParser;
options { tokenVocab=TestLexer; }
document : (Comment | Name) EOF ;
================================================
FILE: developer-cert-of-origin.txt
================================================
As of 4.10, ANTLR uses the Linux Foundation's Developer
Certificate of Origin, DCO, version 1.1. See either
https://developercertificate.org/ or the text below.
Each commit requires a "signature", which is simple as
using `-s` (not `-S`) to the git commit command:
git commit -s -m 'This is my commit message'
Github's pull request process enforces the sig and gives
instructions on how to fix any commits that lack the sig.
See https://github.com/apps/dco for more info.
No signature is required in this file (unlike the
previous ANTLR contributor's certificate of origin.)
----- https://developercertificate.org/ ------
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.
Developer's Certificate of Origin 1.1
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.
================================================
FILE: doc/IDEs.md
================================================
# Integrating ANTLR into Development Systems
The Java target is the reference implementation mirrored by other targets. The following pages help you integrate ANTLR into development environments and build systems appropriate for your target language. As of December 2016, we have Java, C#, Python 3, JavaScript, Go, C++, and Swift targets.
The easiest thing is probably just to use an [ANTLR plug-in](http://www.antlr.org/tools.html) for your favorite development environment.
================================================
FILE: doc/ace-javascript-target.md
================================================
# Integrating ANTLR JavaScript parsers with ACE editor
Having the ability to parse code other than JavaScript is great, but nowadays users expect to be able to edit code with nice edit features such as keyword highlighting, indentation and brace matching, and advanced ones such as syntax checking.
I have been through the process of integrating an ANTLR parser with ACE, the dominant code editor for web based code editing. Information about ACE can be found on their web site.
This page describes my experience, and humbly aims to help you get started. It is not however a reference guide, and no support is provided.
## Architecture
The ACE editor is organized as follows
1. The editor itself is a <div> which once initialized comprises a number of elements. This UI element is responsible for the display, and the generation of edit events.
1. The editor relies on a Session, which manages events and configuration.
1. The code itself is stored in a Document. Any insertion or deletion of text is reflected in the Document.
1. Keyword highlighting, indentation and brace matching are delegated to a mode. There is no direct equivalent of an ACE mode in ANTLR. While keywords are the equivalent of ANTLR lexer tokens, indentation and brace matching are edit tasks, not parsing ones. A given ACE editor can only have one mode, which corresponds to the language being edited. There is no need for ANTLR integration to support keyword highlighting, indentation and brace matching.
1. Syntax checking is delegated to a worker. This is where ANTLR integration is needed. If syntax checking is enabled, ACE asks the mode to create a worker. In JavaScript, workers run in complete isolation i.e. they don't share code or variables with other workers, or with the HTML page itself.
1. The below diagram describes how the whole system works. In green are the components *you* need to provide. You'll notice that there is no need to load ANTLR in the HTML page itself. You'll also notice that ACE maintains a document in each thread. This is done through low level events sent by the ACE session to the worker which describe the delta. Once applied to the worker document, a high level event is triggered, which is easy to handle since at this point the worker document is a perfect copy of the UI document.
<img src=images/ACE-Architecture.001.png>
## Step-by-step guide
The first thing to do is to create an editor in your html page. This is thoroughly described in the ACE documentation, so we'll just sum it up here:
```xml
<script src="../js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
</script>
```
This should give you a working editor. You may want to control its sizing using CSS. I personally load the editor in an iframe and set its style to position: absolute, top: 0, left: 0 etc... but I'm sure you know better than me how to achieve results.
The second thing to do is to configure the ACE editor to use your mode i.e. language configuration. A good place to start is to inherit from the built-in TextMode. The following is a very simple example, which only caters for comments, literals, and a limited subset of separators and keywords :
```javascript
ace.define('ace/mode/my-mode',["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules", "ace/worker/worker_client" ], function(require, exports, module) {
var oop = require("ace/lib/oop");
var TextMode = require("ace/mode/text").Mode;
var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules;
var MyHighlightRules = function() {
var keywordMapper = this.createKeywordMapper({
"keyword.control": "if|then|else",
"keyword.operator": "and|or|not",
"keyword.other": "class",
"storage.type": "int|float|text",
"storage.modifier": "private|public",
"support.function": "print|sort",
"constant.language": "true|false"
}, "identifier");
this.$rules = {
"start": [
{ token : "comment", regex : "//" },
{ token : "string", regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' },
{ token : "constant.numeric", regex : "0[xX][0-9a-fA-F]+\\b" },
{ token : "constant.numeric", regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" },
{ token : "keyword.operator", regex : "!|%|\\\\|/|\\*|\\-|\\+|~=|==|<>|!=|<=|>=|=|<|>|&&|\\|\\|" },
{ token : "punctuation.operator", regex : "\\?|\\:|\\,|\\;|\\." },
{ token : "paren.lparen", regex : "[[({]" },
{ token : "paren.rparen", regex : "[\\])}]" },
{ token : "text", regex : "\\s+" },
{ token: keywordMapper, regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }
]
};
};
oop.inherits(MyHighlightRules, TextHighlightRules);
var MyMode = function() {
this.HighlightRules = MyHighlightRules;
};
oop.inherits(MyMode, TextMode);
(function() {
this.$id = "ace/mode/my-mode";
}).call(MyMode.prototype);
exports.Mode = MyMode;
});
```
Now if you store the above in a file called "my-mode.js", setting the ACE Editor becomes straightforward:
```xml
<script src="../js/ace/ace.js" type="text/javascript" charset="utf-8"></script>
<script src="../js/my-mode.js" type="text/javascript" charset="utf-8"></script>
<script>
var editor = ace.edit("editor");
editor.getSession().setMode("ace/mode/my-mode");
</script>
```
At this point you should have a working editor, able to highlight keywords. You may wonder why you need to set the tokens when you have already done so in your ANTLR lexer grammar. First, ACE expects a classification (control, operator, type...) which does not exist in ANTLR. Second, there is no need for ANTLR to achieve this, since ACE comes with its own lexer.
Ok, now that we have a working editor comes the time where we need syntax validation. This is where the worker comes in the picture.
Creating the worker is the responsibility of the mode you provide. So you need to enhance it with something like the following:
```javascript
var WorkerClient = require("ace/worker/worker_client").WorkerClient;
this.createWorker = function(session) {
this.$worker = new WorkerClient(["ace"], "ace/worker/my-worker", "MyWorker", "../js/my-worker.js");
this.$worker.attachToDocument(session.getDocument());
this.$worker.on("errors", function(e) {
session.setAnnotations(e.data);
});
this.$worker.on("annotate", function(e) {
session.setAnnotations(e.data);
});
this.$worker.on("terminate", function() {
session.clearAnnotations();
});
return this.$worker;
};
```
The above code needs to be placed in the existing worker, after:
```javascript
this.$id = "ace/mode/my-mode";
```
Please note that the mode code runs on the UI side, not the worker side. The event handlers here are for events sent by the worker, not to the worker.
Obviously the above won't work out of the box, because you need to provide the "my-worker.js" file.
Creating a worker from scratch is not something I've tried. Simply put, your worker needs to handle all messages sent by ACE using the WorkerClient created by the mode. This is not a simple task, and is better delegated to existing ACE code, so we can focus on tasks specific to our language.
What I did is I started from "mode-json.js", a rather simple worker which comes with ACE, stripped out all JSON validation related stuff out of it, and saved the remaining code in a file name "worker-base.js" which you can find [here](resources/worker-base.js). Once this done, I was able to create a simple worker, as follows:
```javascript
importScripts("worker-base.js");
ace.define('ace/worker/my-worker',["require","exports","module","ace/lib/oop","ace/worker/mirror"], function(require, exports, module) {
"use strict";
var oop = require("ace/lib/oop");
var Mirror = require("ace/worker/mirror").Mirror;
var MyWorker = function(sender) {
Mirror.call(this, sender);
this.setTimeout(200);
this.$dialect = null;
};
oop.inherits(MyWorker, Mirror);
(function() {
this.onUpdate = function() {
var value = this.doc.getValue();
var annotations = validate(value);
this.sender.emit("annotate", annotations);
};
}).call(MyWorker.prototype);
exports.MyWorker = MyWorker;
});
var validate = function(input) {
return [ { row: 0, column: 0, text: "MyMode says Hello!", type: "error" } ];
};
```
At this point, you should have an editor which displays an error icon next to the first line. When you hover over the error icon, it should display: MyMode says Hello!. Is that not a friendly worker? Yum.
What remains to be done is have our validate function actually validate the input. Finally ANTLR comes in the picture!
To start with, let's load ANTLR and your parser, listener etc..
The preferred approach for loading parser code is to bundle your parser, [as described here](javascript-target.md).
You can then load it as part of the importScripts instruction at the start of your worker code.
Another approach is to load it using 'require'. Easy, since you could write:
```js
var antlr4 = require('antlr4/index');
```
This may work, but it's actually unreliable. The reason is that the 'require' function that comes with ACE uses a different syntax than the 'require' function used by ANTLR, which follows the NodeJS 'require' convention.
So we need to bring in a NodeJS compatible 'require' function that conforms to the NodeJS syntax. I personally use one that comes from Torben Haase's Honey project, which you can find in li/require.js.
But hey, now we're going to have 2 'require' functions not compatible with each other! Indeed, this is why you need to take special care, as follows:
```js
// load nodejs compatible require
var ace_require = require;
require = undefined;
var Honey = { 'requirePath': ['..'] }; // walk up to js folder, see Honey docs
importScripts("../lib/require.js");
var antlr4_require = require;
require = ace_require;
```
Now it's safe to load antlr and the parsers generated for your language.
Assuming that your language files (generated or hand-built) are in a folder with an index.js file that calls require for each file, your parser loading code can be as simple as follows:
```js
// load antlr4 and myLanguage
var antlr4, mylanguage;
try {
require = antlr4_require;
antlr4 = require('antlr4/index');
mylanguage = require('mylanguage/index');
} finally {
require = ace_require;
}
```
Please note the try-finally construct. ANTLR uses 'require' synchronously so it's perfectly safe to ignore the ACE 'require' while running ANTLR code. ACE itself does not guarantee synchronous execution, so you are much safer always switching 'require' back to 'ace_require'.
Now detecting deep syntax errors in your code is a task for your ANTLR listener or visitor or whatever piece of code you've delegated this to. We're not going to describe this here, since it would require some knowledge of your language. However, detecting grammar syntax errors is something ANTLR does beautifully (isn't that why you went for ANTLR in the first place?). So what we will illustrate here is how to report grammar syntax errors. I have no doubt that from there, you will be able to extend the validator to suit your specific needs.
Whenever ANTLR encounters an unexpected token, it fires an error. By default, the error is routed to an error listener which simply writes to the console.
What we need to do is replace this listener by our own listener, se we can route errors to the ACE editor. First, let's create such a listener:
```js
// class for gathering errors and posting them to ACE editor
var AnnotatingErrorListener = function(annotations) {
antlr4.error.ErrorListener.call(this);
this.annotations = annotations;
return this;
};
AnnotatingErrorListener.prototype = Object.create(antlr4.error.ErrorListener.prototype);
AnnotatingErrorListener.prototype.constructor = AnnotatingErrorListener;
AnnotatingErrorListener.prototype.syntaxError = function(recognizer, offendingSymbol, line, column, msg, e) {
this.annotations.push({
row: line - 1,
column: column,
text: msg,
type: "error"
});
};
```
With this, all that remains to be done is plug the listener in when we parse the code. Here is how I do it:
```js
var validate = function(input) {
var stream = CharStreams.fromString(input);
var lexer = new mylanguage.MyLexer(stream);
var tokens = new antlr4.CommonTokenStream(lexer);
var parser = new mylanguage.MyParser(tokens);
var annotations = [];
var listener = new AnnotatingErrorListener(annotations)
parser.removeErrorListeners();
parser.addErrorListener(listener);
parser.parseMyRule();
return annotations;
};
```
You know what? That's it! You now have an ACE editor that does syntax validation using ANTLR! I hope you find this useful, and simple enough to get started.
Now wait, hey! How do you debug this? Well, as usual, using Chrome, since no other browser is able to debug worker code. What a shame...
================================================
FILE: doc/actions.md
================================================
# Actions and Attributes
In Chapter 10, Attributes and Actions, we learned how to embed actions within grammars and looked at the most common token and rule attributes. This section summarizes the important syntax and semantics from that chapter and provides a complete list of all available attributes. (You can learn more about actions in the grammar from the free excerpt on listeners and actions.)
Actions are blocks of text written in the target language and enclosed in curly braces. The recognizer triggers them according to their locations within the grammar. For example, the following rule emits "found a decl" after the parser has seen a valid declaration:
```
decl: type ID ';' {System.out.println("found a decl");} ;
type: 'int' | 'float' ;
```
Most often, actions access the attributes of tokens and rule references:
```
decl: type ID ';'
{System.out.println("var "+$ID.text+":"+$type.text+";");}
| t=ID id=ID ';'
{System.out.println("var "+$id.text+":"+$t.text+";");}
;
```
## Token Attributes
All tokens have a collection of predefined, read-only attributes. The attributes include useful token properties such as the token type and text matched for a token. Actions can access these attributes via `$label.attribute` where label labels a particular instance of a token reference (`a` and `b` in the example below are used in the action code as `$a` and `$b`). Often, a particular token is only referenced once in the rule, in which case the token name itself can be used unambiguously in the action code (token `INT` can be used as `$INT` in the action). The following example illustrates token attribute expression syntax:
```
r : INT {int x = $INT.line;}
( ID {if ($INT.line == $ID.line) ...;} )?
a=FLOAT b=FLOAT {if ($a.line == $b.line) ...;}
;
```
The action within the `(...)?` subrule can see the `INT` token matched before it in the outer level.
Because there are two references to the `FLOAT` token, a reference to `$FLOAT` in an action is not unique; you must use labels to specify which token reference you’re interested in.
Token references within different alternatives are unique because only one of them can be matched for any invocation of the rule. For example, in the following rule, actions in both alternatives can reference `$ID` directly without using a label:
```
r : ... ID {System.out.println($ID.text);}
| ... ID {System.out.println($ID.text);}
;
```
To access the tokens matched for literals, you must use a label:
```
stat: r='return' expr ';' {System.out.println("line="+$r.line);} ;
```
Most of the time you access the attributes of the token, but sometimes it is useful to access the Token object itself because it aggregates all the attributes. Further, you can use it to test whether an optional subrule matched a token:
```
stat: 'if' expr 'then' stat (el='else' stat)?
{if ( $el!=null ) System.out.println("found an else");}
| ...
;
```
`$T` and `$L` evaluate to `Token` objects for token name `T` and token label `L`. `$ll` evaluates to `List<Token>` for list label `ll`. `$T.attr` evaluates to the type and value specified in the following table for attribute `attr`:
|Attribute|Type|Description|
|---------|----|-----------|
|text|String|The text matched for the token; translates to a call to getText. Example: $ID.text.|
|type|int|The token type (nonzero positive integer) of the token such as INT; translates to a call to getType. Example: $ID.type.|
|line|int|The line number on which the token occurs, counting from 1; translates to a call to getLine. Example: $ID.line.|
|pos|int|The character position within the line at which the token’s first character occurs counting from zero; translates to a call to getCharPositionInLine. Example: $ID.pos.|
|index|int|The overall index of this token in the token stream, counting from zero; translates to a call to getTokenIndex. Example: $ID.index.|
|channel|int|The token’s channel number. The parser tunes to only one channel, effectively ignoring off-channel tokens. The default channel is 0 (Token.DEFAULT_CHANNEL), and the default hidden channel is Token.HIDDEN_CHANNEL. Translates to a call to getChannel. Example: $ID.channel.|
|int|int|The integer value of the text held by this token; it assumes that the text is a valid numeric string. Handy for building calculators and so on. Translates to Integer.valueOf(text-of-token). Example: $INT.int.|
## Parser Rule Attributes
ANTLR predefines a number of read-only attributes associated with parser rule references that are available to actions. Actions can access rule attributes only for references that precede the action. The syntax is `$r.attr` for rule name `r` or a label assigned to a rule reference. For example, `$expr.text` returns the complete text matched by a preceding invocation of rule `expr`:
```
returnStat : 'return' expr {System.out.println("matched "+$expr.text);} ;
```
Using a rule label looks like this:
```
returnStat : 'return' e=expr {System.out.println("matched "+$e.text);} ;
```
You can also use `$` followed by the name of the attribute to access the value associated with the currently executing rule. For example, `$start` is the starting token of the current rule.
```
returnStat : 'return' expr {System.out.println("first token "+$start.getText());} ;
```
`$r` and `$rl` evaluate to `ParserRuleContext` objects of type `RContext` for rule name `r` and rule label `rl`. `$rll` evaluates to `List<RContext>` for rule list label `rll`. `$r.attr` evaluates to the type and value specified in the following table for attribute `attr`:
|Attribute|Type|Description|
|---------|----|-----------|
|text|String|The text matched for a rule or the text matched from the start of the rule up until the point of the `$text` expression evaluation. Note that this includes the text for all tokens including those on hidden channels, which is what you want because usually that has all the whitespace and comments. When referring to the current rule, this attribute is available in any action including any exception actions.|
|start|Token|The first token to be potentially matched by the rule that is on the main token channel; in other words, this attribute is never a hidden token. For rules that end up matching no tokens, this attribute points at the first token that could have been matched by this rule. When referring to the current rule, this attribute is available to any action within the rule.|
|stop|Token|The last nonhidden channel token to be matched by the rule. When referring to the current rule, this attribute is available only to the after and finally actions.|
|ctx|ParserRuleContext|The rule context object associated with a rule invocation. All of the other attributes are available through this attribute. For example, `$ctx.start` accesses the start field within the current rules context object. It’s the same as `$start`.|
|parser|Parser|The parser itself. This attribute can be used, for example, to invoke a method defined in the parser's `@members` section from a semantic predicate.|
## Dynamically-Scoped Attributes
You can pass information to and from rules using parameters and return values, just like functions in a general-purpose programming language. Programming languages don’t allow functions to access the local variables or parameters of invoking functions, however. For example, the following reference to local variable `x` form a nested method call is illegal in Java:
```java
void f() {
int x = 0;
g();
}
void g() {
h();
}
void h() {
int y = x; // INVALID reference to f's local variable x
}
```
Variable `x` is available only within the scope of `f`, which is the text lexically delimited by curly brackets. For this reason, Java is said to use lexical scoping. Lexical scoping is the norm for most programming languages. Languages that allow methods further down in the call chain to access local variables defined earlier are said to use dynamic scoping. The term dynamic refers to the fact that a compiler cannot statically determine the set of visible variables. This is because the set of variables visible to a method changes depending on who calls that method.
It turns out that, in the grammar realm, distant rules sometimes need to communicate with each other, mostly to provide context information to rules matched below in the rule invocation chain. (Naturally, this assumes that you are using actions directly in the grammar instead of the parse-tree listener event mechanism.) ANTLR allows dynamic scoping in that actions can access attributes from invoking rules using syntax `$r::x` where `r` is a rule name and `x` is an attribute within that rule. It is up to the programmer to ensure that `r` is in fact an invoking rule of the current rule. A runtime exception occurs if `r` is not in the current call chain when you access `$r::x`.
To illustrate the use of dynamic scoping, consider the real problem of defining variables and ensuring that variables in expressions are defined. The following grammar defines the symbols attribute where it belongs in the block rule but adds variable names to it in rule `decl`. Rule `stat` then consults the list to see whether variables have been defined.
```
grammar DynScope;
prog: block ;
block
/* List of symbols defined within this block */
locals [
List<String> symbols = new ArrayList<String>()
]
: '{' decl* stat+ '}'
// print out all symbols found in block
// $block::symbols evaluates to a List as defined in scope
{System.out.println("symbols="+$symbols);}
;
/** Match a declaration and add identifier name to list of symbols */
decl: 'int' ID {$block::symbols.add($ID.text);} ';' ;
/** Match an assignment then test list of symbols to verify
* that it contains the variable on the left side of the assignment.
* Method contains() is List.contains() because $block::symbols
* is a List.
*/
stat: ID '=' INT ';'
{
if ( !$block::symbols.contains($ID.text) ) {
System.err.println("undefined variable: "+$ID.text);
}
}
| block
;
ID : [a-z]+ ;
INT : [0-9]+ ;
WS : [ \t\r\n]+ -> skip ;
```
Here’s a simple build and test sequence:
```bash
$ antlr4 DynScope.g4
$ javac DynScope*.java
$ grun DynScope prog
=> {
=> int i;
=> i = 0;
=> j = 3;
=> }
=> EOF
<= undefined variable: j
symbols=[i]
```
There’s an important difference between a simple field declaration in a `@members` action and dynamic scoping. symbols is a local variable and so there is a copy for each invocation of rule `block`. That’s exactly what we want for nested blocks so that we can reuse the same input variable name in an inner block. For example, the following nested code block redefines `i` in the inner scope. This new definition must hide the definition in the outer scope.
```
{
int i;
int j;
i = 0;
{
int i;
int x;
x = 5;
}
x = 3;
}
```
Here’s the output generated for that input by DynScope:
```bash
$ grun DynScope prog nested-input
symbols=[i, x]
undefined variable: x
symbols=[i, j]
```
Referencing `$block::symbols` accesses the `symbols` field of the most recently invoked `block`’s rule context object. If you need access to a symbols instance from a rule invocation farther up the call chain, you can walk backwards starting at the current context, `$ctx`. Use `getParent` to walk up the chain.
================================================
FILE: doc/antlr-project-testing.md
================================================
# ANTLR project unit tests
## Introduction
Because ANTLR supports multiple target languages, the unit tests are broken into two groups:
the unit tests that test the tool itself (in `tool-testsuite`) and the unit tests that test the parser runtimes (in `antlr4/runtime-testsuite`).
The tool tests are straightforward because they are Java code testing Java code; see the section at the bottom of this file.
The runtime tests must be specified in a generic fashion to work across language targets.
Furthermore, the various targets from Java must be tested.
This usually means Java launching processes to compile, say, C++ and run parsers.
As of 4.10, a Java descriptor file held as an [RuntimeTestDescriptor.java](../runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestDescriptor.java)
is used to represent each runtime test.
Each test is described with a text file with various sections and resides in a group directory;
see [directories under descriptors' dir](../runtime-testsuite/resources/org/antlr/v4/test/runtime/descriptors).
Here is a sample test descriptor:
```
[notes]
This is a regression test for blah blah blah...
[type]
Parser
[grammar]
grammar T;
a : ID* {
<writeln("$text")>
};
ID : 'a'..'z'+;
WS : (' '|'\n') -> skip;
[start]
a
[input]
a b c
[output]
"""abc
"""
```
The grammars are strings representing StringTemplates (`ST` objects) so `<writeln("$text")>` will get replace when the unit test file is generated (`Test.java`, `Test.cs`, ...).
The `writeln` template must be defined per target.
Here are all the
[Target templates for runtime tests](../runtime-testsuite/resources/org/antlr/v4/test/runtime/templates).
Use triple-quotes `"""` when whitespace matters (usually input/output sections).
## Requirements
In order to perform the tests on all target languages, the following tools should be installed:
* dotnet
* Node.js
* Python 3
* Go
* Swift
* Clang (Linux, Mac) or MSBuild (Windows) for C++
* Dart
* PHP
To **install into local repository** `~/.m2/repository/org/antlr`, do this:
```bash
$ export MAVEN_OPTS="-Xmx1G" # don't forget this on linux
$ mvn install -DskipTests # make sure all artifacts are visible on this machine
```
## Running the runtime tests
A single test rig is sufficient to test all targets against all descriptors using the [junit dynamic tests](https://junit.org/junit5/docs/current/user-guide/#writing-tests-dynamic-tests) mechanism.
But it's often convenient to test just a single target or perhaps even just a single test within a single group of a single target.
IntelliJ automatically generates a bunch of
[Target runtime test rigs](../runtime-testsuite/test/org/antlr/v4/test/runtime) that allows developers such flexibility.
For example, here are the Python3 test rigs in IntelliJ:

And the result of testing the entire subdirectory:

All test are run in parallel both via maven and via IDE.
In IntelliJ, it's very easy to go to source by right-clicking on any test and pressing `Jump to source` (F4).
## Running test subsets
From the `runtime-testsuite` dir
### Run all tests for a single target
```bash
$ cd runtime-testsuite
$ export MAVEN_OPTS="-Xmx1G" # don't forget this on linux
$ mvn -Dtest='java.**' test
-------------------------------------------------------
T E S T S
-------------------------------------------------------
[INFO] Running org.antlr.v4.test.runtime.java.TestIntegerList
[INFO] Running org.antlr.v4.test.runtime.java.JavaRuntimeTests
...
[INFO] Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in org.antlr.v4.test.runtime.java.TestIntegerList
[INFO] Tests run: 348, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 19.269 s - in org.antlr.v4.test.runtime.java.JavaRuntimeTests
...
```
## Adding a runtime test
To add a new runtime test, first determine which [group (dir) of tests](../runtime-testsuite/resources/org/antlr/v4/test/runtime/descriptors) it belongs to.
Then, add a new descriptor file implementation by filling in one of these (omitting unused sections):
```
[notes]
[type]
[grammar]
[slaveGrammar]
[start]
[input]
[output]
[errors]
[flags]
[skip]
```
Your best bet is to find a similar test in the appropriate group and then copy and paste the descriptor file, creating a new file within the test group dir.
Modify the sections to suit your new problem.
### Ignoring tests
In order to turn off a test for a particular target, the `skip` section in the descriptor file should be used.
For example, the following skips PHP and Dart targets:
```
[skip]
PHP
Dart
```
### Target API/library testing
Some parts of the runtime API need to be tested with code written specifically in the target language.
For example, all the Java runtime API tests are placed here:
[runtime-testsuite/test/org/antlr/v4/test/runtime/java/api](../runtime-testsuite/test/org/antlr/v4/test/runtime/java/api)
Notice that it is under an `api` dir. The directory above is where all of the `*Test*` files go.
### Cross-language actions embedded within grammars
To get:
```
System.out.println($set.stop);
```
Use instead the language-neutral:
```
<writeln("$set.stop")>
```
Template file [Java.test.stg](../runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Java.test.stg) has templates like:
```
writeln(s) ::= <<System.out.println(<s>);>>
```
that translate generic operations to target-specific language statements or expressions.
## Adding an ANTLR tool unit test
Just go into the appropriate Java test class in dir [antlr4/tool-testsuite/test/org/antlr/v4/test/tool](../tool-testsuite/test/org/antlr/v4/test/tool) and add your unit test.
================================================
FILE: doc/building-antlr.md
================================================
# Building ANTLR
Most programmers do not need the information on this page because they will simply download the appropriate jar(s) or use ANTLR through maven (via ANTLR's antlr4-maven-plugin). If you would like to fork the project and fix bugs or tweak the runtime code generation, then you will almost certainly need to build ANTLR itself. There are two components:
1. the tool that compiles grammars down into parsers and lexers in one of the target languages
1. the runtime used by those generated parsers and lexers.
I will assume that the root directory is `/tmp` for the purposes of explaining how to build ANTLR in this document.
*As of 4.6, ANTLR tool and Java-target runtime requires Java 7. As of 4.10, we have verified that the tool itself builds with Java 8 and 11.*
# Get the source
The first step is to get the Java source code from the ANTLR 4 repository at github. You can download the repository from github, but the easiest thing to do is simply clone the repository on your local disk:
```bash
$ cd /tmp
/tmp $ git clone https://github.com/antlr/antlr4.git
Cloning into 'antlr4'...
remote: Counting objects: 61480, done.
remote: Total 61480 (delta 0), reused 0 (delta 0), pack-reused 61480
Receiving objects: 100% (61480/61480), 31.24 MiB | 7.18 MiB/s, done.
Resolving deltas: 100% (32970/32970), done.
Checking connectivity... done.
Checking out files: 100% (1427/1427), done.
```
# Check your environment
If you are starting from a clean, minimum Ubuntu OS, check your environment.
```bash
$ sudo apt-get update
$ # Get Java
$ java > /dev/null 2>&1
$ if [[ "$?" != "0" ]]; then sudo apt install -y openjdk-11-jre-headless; fi
$ # Get Mvn
$ mvn > /dev/null 2>&1
$ if [[ "$?" != "0" ]]; then sudo apt install -y maven; fi
```
# Compile
The current maven build seems complicated to me because there is a dependency of the project on itself. The runtime tests naturally depend on the current version being available but it won't compile without the current version. Once you have the generated/installed jar, mvn builds but otherwise there's a dependency on what you are going to build. You will get this error when you try to clean but you can ignore it:
```
[INFO] ANTLR 4 Runtime Tests (4th generation) ............. FAILURE [ 0.073 s]
...
[ERROR] Plugin org.antlr:antlr4-maven-plugin:4.10-SNAPSHOT or one of its dependencies could not be resolved: Could not find artifact org.antlr:antlr4-maven-plugin:jar:4.10-SNAPSHOT -> [Help 1]
```
To be super squeaky clean, you can wipe out the repository cache, then do the build:
```
$ export MAVEN_OPTS="-Xmx1G" # don't forget this on linux
cd /tmp/antlr4 # or wherever you have the software
rm -rf ~/.m2/repository/org/antlr*
mvn clean
mvn -DskipTests install
```
**NOTE:** We do `install` not `compile` as tool tests and such refer to modules that must be pulled from the maven install local cache.
Once you have completed this process once and there is a jar hanging around in the repository cache.
# Installing libs to mvn cache locally
To skip the tests (which require all the target languages be installed) and **install into local repository** `~/.m2/repository/org/antlr`, do this:
```bash
$ export MAVEN_OPTS="-Xmx1G" # don't forget this on linux
$ mvn install -DskipTests # make sure all artifacts are visible on this machine
```
You should see these jars (when building 4.6-SNAPSHOT):
```bash
/Users/parrt/.m2/repository/org/antlr $ find antlr4* -name '*.jar'
antlr4-maven-plugin/4.6-SNAPSHOT/antlr4-maven-plugin-4.6-SNAPSHOT.jar
antlr4-runtime-testsuite/4.6-SNAPSHOT/antlr4-runtime-testsuite-4.6-SNAPSHOT-tests.jar
antlr4-runtime-testsuite/4.6-SNAPSHOT/antlr4-runtime-testsuite-4.6-SNAPSHOT.jar
antlr4-runtime/4.6-SNAPSHOT/antlr4-runtime-4.6-SNAPSHOT.jar
antlr4-tool-testsuite/4.6-SNAPSHOT/antlr4-tool-testsuite-4.6-SNAPSHOT.jar
antlr4/4.6-SNAPSHOT/antlr4-4.6-SNAPSHOT-tests.jar
antlr4/4.6-SNAPSHOT/antlr4-4.6-SNAPSHOT.jar
```
Note that ANTLR is written in itself, which is why maven downloads antlr4-4.5.jar for boostrapping 4.6-SNAPSHOT purposes.
# Testing tool and targets
See [ANTLR project unit tests](antlr-project-testing.md).
# Building without testing
To build without running the tests (saves a lot of time), do this:
```bash
$ mvn -DskipTests install
```
## Building ANTLR in Intellij IDE
After download ANTLR source, just "import project from existing sources" and click on the "Maven Projects" tab in right gutter of IDE. It should build stuff in the background automatically and look like:
<img src=images/intellij-maven.png width=200>
================================================
FILE: doc/cpp-target.md
================================================
# C++
The C++ target supports all platforms that can either run MS Visual Studio 2017 (or newer), XCode 7 (or newer) or CMake (C++17 required). All build tools can either create static or dynamic libraries, both as 64bit or 32bit arch. Additionally, XCode can create an iOS library. Also see [Antlr4 for C++ with CMake: A practical example](http://blorente.me/beyond-the-loop/Antlr-cpp-cmake/).
## How to create a C++ lexer or parser?
This is pretty much the same as creating a Java lexer or parser, except you need to specify the language target, for example:
```
$ antlr4 -Dlanguage=Cpp MyGrammar.g4
```
You will see that there are a whole bunch of files generated by this call. If visitor or listener are not suppressed (which is the default) you'll get:
* MyGrammarLexer.h + MyGrammarLexer.cpp
* MyGrammarParser.h + MyGrammarParser.cpp
* MyGrammarVisitor.h + MyGrammarVisitor.cpp
* MyGrammarBaseVisitor.h + MyGrammarBaseVisitor.cpp
* MyGrammarListener.h + MyGrammarListener.cpp
* MyGrammarBaseListener.h + MyGrammarBaseListener.cpp
## Where can I get the runtime?
Once you've generated the lexer and/or parser code, you need to download or build the runtime. Prebuilt C++ runtime binaries for Windows (Visual Studio 2013/2015), OSX/macOS and iOS are available on the ANTLR web site:
* http://www.antlr.org
Use CMake to build a Linux library (works also on OSX, however not for the iOS library).
Instead of downloading a prebuilt binary you can also easily build your own library on OSX or Windows. Just use the provided projects for XCode or Visual Studio and build it. Should work out of the box without any additional dependency.
## How do I run the generated lexer and/or parser?
Putting it all together to get a working parser is really easy. Look in the [runtime/Cpp/demo](../runtime/Cpp/demo) folder for a simple example. The [README](../runtime/Cpp/demo/README.md) there describes shortly how to build and run the demo on OSX, Windows or Linux.
## How do I create and run a custom listener?
The generation step above created a listener and base listener class for you. The listener class is an abstract interface, which declares enter and exit methods for each of your parser rules. The base listener implements all those abstract methods with an empty body, so you don't have to do it yourself if you just want to implement a single function. Hence use this base listener as the base class for your custom listener:
```c++
#include <iostream>
#include "antlr4-runtime.h"
#include "MyGrammarLexer.h"
#include "MyGrammarParser.h"
#include "MyGrammarBaseListener.h"
using namespace antlr4;
class TreeShapeListener : public MyGrammarBaseListener {
public:
void enterKey(ParserRuleContext *ctx) override {
// Do something when entering the key rule.
}
};
int main(int argc, const char* argv[]) {
std::ifstream stream;
stream.open(argv[1]);
ANTLRInputStream input(stream);
MyGrammarLexer lexer(&input);
CommonTokenStream tokens(&lexer);
MyGrammarParser parser(&tokens);
tree::ParseTree *tree = parser.key();
TreeShapeListener listener;
tree::ParseTreeWalker::DEFAULT.walk(&listener, tree);
return 0;
}
```
This example assumes your grammar contains a parser rule named `key` for which the `enterKey` function was generated.
## Special cases for this ANTLR target
There are a couple of things that only the C++ ANTLR target has to deal with. They are described here.
### Code Generation Aspects
The code generation (by running the ANTLR4 jar) allows to specify 2 values you might find useful for better integration of the generated files into your application (both are optional):
* A **namespace**: use the **`-package`** parameter to specify the namespace you want.
* An **export macro**: especially in VC++ extra work is required to export your classes from a DLL. This is usually accomplished by a macro that has different values depending on whether you are creating the DLL or import it. The ANTLR4 runtime itself also uses one for its classes:
```c++
#ifdef ANTLR4CPP_EXPORTS
#define ANTLR4CPP_PUBLIC __declspec(dllexport)
#else
#ifdef ANTLR4CPP_STATIC
#define ANTLR4CPP_PUBLIC
#else
#define ANTLR4CPP_PUBLIC __declspec(dllimport)
#endif
#endif
```
Just like the `ANTLR4CPP_PUBLIC` macro here you can specify your own one for the generated classes using the **`-DexportMacro=...`** command-line parameter or
grammar option `options {exportMacro='...';}` in your grammar file.
In order to create a static lib in Visual Studio define the `ANTLR4CPP_STATIC` macro in addition to the project settings that must be set for a static library (if you compile the runtime yourself).
For gcc and clang it is possible to use the `-fvisibility=hidden` setting to hide all symbols except those that are made default-visible (which has been defined for all public classes in the runtime).
### Compile Aspects
When compiling generated files, you can configure a compile option according to your needs (also optional):
* A **thread local DFA macro**: Add `-DANTLR4_USE_THREAD_LOCAL_CACHE=1` to the compilation options
will enable using thread local DFA cache (disabled by default), after that, each thread uses its own DFA.
This will increase memory usage to store thread local DFAs and redundant computation to build thread local DFAs (not too much).
The benefit is that it can improve the concurrent performance running with multiple threads.
In other words, when you find your concurent throughput is not high enough, you should consider turning on this option.
### Memory Management
Since C++ has no built-in memory management we need to take extra care. For that we rely mostly on smart pointers, which however might cause time penalties or memory side effects (like cyclic references) if not used with care. Currently however the memory household looks very stable. Generally, when you see a raw pointer in code consider this as being managed elsewhere. You should never try to manage such a pointer (delete, assign to smart pointer etc.).
Accordingly a parse tree is only valid for the lifetime of its parser. The parser, in turn, is only valid for the lifetime of its token stream, and so on back to the original `ANTLRInputStream` (or equivalent). To retain a tree across function calls you'll need to create and store all of these and `delete` all but the tree when you no longer need it.
### Unicode Support
Encoding is mostly an input issue, i.e. when the lexer converts text input into lexer tokens. The parser is completely encoding unaware.
The C++ target always expects UTF-8 input (either in a string or stream) which is then converted to UTF-32 (a char32_t array) and fed to the lexer.
### Named Actions
In order to help customizing the generated files there are a number of additional so-called **named actions**. These actions are tight to specific areas in the generated code and allow to add custom (target specific) code. All targets support these actions
* @parser::header
* @parser::members
* @lexer::header
* @lexer::members
(and their scopeless alternatives `@header` and `@members`) where header doesn't mean a C/C++ header file, but the top of a code file. The content of the header action appears in all generated files at the first line. So it's good for things like license/copyright information.
The content of a *members* action is placed in the public section of lexer or parser class declarations. Hence it can be used for public variables or predicate functions used in a grammar predicate. Since all targets support *header* + *members* they are the best place for stuff that should be available also in generated files for other languages.
In addition to that the C++ target supports many more such named actions. Unfortunately, it's not possible to define new scopes (e.g. *listener* in addition to *parser*) so they had to be defined as part of the existing scopes (*lexer* or *parser*). The grammar in the demo application contains all of the named actions as well for reference. Here's the list:
* **@lexer::preinclude** - Placed right before the first #include (e.g. good for headers that must appear first, for system headers etc.). Appears in both lexer h and cpp file.
* **@lexer::postinclude** - Placed right after the last #include, but before any class code (e.g. for additional namespaces). Appears in both lexer h and cpp file.
* **@lexer::context** - Placed right before the lexer class declaration. Use for e.g. additional types, aliases, forward declarations and the like. Appears in the lexer h file.
* **@lexer::declarations** - Placed in the private section of the lexer declaration (generated sections in all classes strictly follow the pattern: public, protected, private, from top to bottom). Use this for private vars etc.
* **@lexer::definitions** - Placed before other implementations in the cpp file (but after *@postinclude*). Use this to implement e.g. private types.
For the parser there are the same actions as shown above for the lexer. In addition to that there are even more actions for visitor and listener classes:
* **@parser::listenerpreinclude**
* **@parser::listenerpostinclude**
* **@parser::listenerdeclarations**
* **@parser::listenermembers**
* **@parser::listenerdefinitions**
*
* **@parser::baselistenerpreinclude**
* **@parser::baselistenerpostinclude**
* **@parser::baselistenerdeclarations**
* **@parser::baselistenermembers**
* **@parser::baselistenerdefinitions**
*
* **@parser::visitorpreinclude**
* **@parser::visitorpostinclude**
* **@parser::visitordeclarations**
* **@parser::visitormembers**
* **@parser::visitordefinitions**
*
* **@parser::basevisitorpreinclude**
* **@parser::basevisitorpostinclude**
* **@parser::basevisitordeclarations**
* **@parser::basevisitormembers**
* **@parser::basevisitordefinitions**
and should be self explanatory now. Note: there is no *context* action for listeners or visitors, simply because they would be even less used than the other actions and there are so many already.
================================================
FILE: doc/creating-a-language-target.md
================================================
# Creating an ANTLR Language Target
This document describes how to make ANTLR generate parsers in a new language, *X*.
## Overview
Creating a new target involves the following key elements:
1. For the tool, create class *X*Target as a subclass of class `Target` in package `org.antlr.v4.codegen.target`.
This class describes language specific details about escape characters and strings and so on.
There is very little to do here typically.
2. Create `*X*.stg` in directory `tool/resources/org/antlr/v4/tool/templates/codegen/*X*/*X*.stg`.
This is a [StringTemplate](http://www.stringtemplate.org/) group file (`.stg`) that tells ANTLR how to express
all the parsing elements needed to generate code.
You will see templates called `ParserFile`, `Parser`, `Lexer`, `CodeBlockForAlt`, `AltBlock`, etc...
Each of these must be described how to build the indicated chunk of code.
Your best bet is to find the closest existing target, copy that template file, and tweak to suit.
3. Create a runtime library to support the parsers generated by ANTLR.
Under directory `runtime/*X*`, you are in complete control of the directory structure as dictated by common usage of that target language.
For example, Java has: `runtime/Java/lib` and `runtime/Java/src` directories.
Under `src`, you will find a directory structure for package `org.antlr.v4.runtime` and below.
4. Create a template file for runtime tests.
All you have to do is provide a few templates that indicate how to print values and declare variables.
Our runtime test mechanism in dir `runtime-testsuite` will automatically generate code using these templates for each target and check the test results.
It needs to know how to define various class fields, compare members and so on.
You must create a `*X*.test.stg` file underneath [runtime-testsuite/resources/org/antlr/v4/test/runtime](../runtime-testsuite/resources/org/antlr/v4/test/runtime)
and `Test.*x*.stg` underneath [runtime-testsuite/resources/org/antlr/v4/test/runtime/helpers](../runtime-testsuite/resources/org/antlr/v4/test/runtime/helpers).
Again, your best bet is to copy the templates from the closest language to your target and tweak it to suit.
6. Create test files under [/runtime-testsuite/test/org/antlr/v4/test/runtime](../runtime-testsuite/test/org/antlr/v4/test/runtime).
They will load defined test cases in each test descriptor.
Also add the `/runtime-testsuite/test/org/antlr/v4/test/runtime/X/BaseXTest.java` which defines how test cases will execute and output.
7. Create/edit shell scripts in [/.github](../.github) to run tests in CI pipelines.
## Getting started
1. Fork the `antlr/antlr4` repository at GitHub to your own user so that you have repository `username/antlr4`.
2. Clone `username/antlr4`, the forked repository, to your local disk.
Your remote `origin` will be the forked repository on GitHub.
Add a remote `upstream` to the original `antlr/antlr4` repository (URL `https://github.com/antlr/antlr4.git`).
Changes that you would like to contribute back to the project are done with [pull requests](https://help.github.com/articles/using-pull-requests/).
3. Try to build it before doing anything
```bash
$ mvn compile
```
That should proceed with success. See [Building ANTLR](building-antlr.md) for more details.
## Comparing your target's parsing decisionmaking with Java's
ANTLR's power comes from it's dynamic parsing strategy, but that means each target
must implement that complicated algorithm. You should compare your target's debug
output for ParserATNSimulator with Java's.
Run this so we get right jars before trying this script:
```
cd ANTLR-ROOT-DIR
mvn install -DskipTests=true
cd runtime-tests
mvn install -DskipTests=true # yes do it again
```
Run the script from `runtime-tests` dir with
```
../scripts/traceatn.sh /tmp/JSON.g4 json -target Go /tmp/foo.json
```
or whatever your test grammar, start rule, target, test input are.
### Debugging the PHP target
Because the PHP target is hosted in a separate repository, you will need to clone the [antlr/php-antlr-runtime](https://github.com/antlr/antlr-php-runtime)
repository into the `runtime/PHP` and install the dependencies with `composer install` before you can run the tests.
```
git clone -b dev https://github.com/antlr/antlr-php-runtime.git runtime/PHP
cd runtime/PHP
composer install
```
================================================
FILE: doc/csharp-target.md
================================================
# C♯
## Which frameworks are supported?
The C# runtime is CLS compliant, and only requires a corresponding 3.5 .Net framework.
In practice, the runtime has been extensively tested against:
* Microsoft .Net 3.5 framework
* Mono .Net 3.5 framework
No issue was found, so you should find that the runtime works pretty much against any recent .Net framework.
## How do I get started?
You will find full instructions on the [Git repo page for ANTLR C# runtime](https://github.com/antlr/antlr4/tree/master/runtime/CSharp).
## How do I use the runtime from my project?
(i.e., How do I run the generated lexer and/or parser?)
Let's suppose that your grammar is named `MyGrammar`. The tool will generate for you the following files:
* MyGrammarLexer.cs
* MyGrammarParser.cs
* MyGrammarListener.cs (if you have not activated the -no-listener option)
* MyGrammarBaseListener.cs (if you have not activated the -no-listener option)
* MyGrammarVisitor.cs (if you have activated the -visitor option)
* MyGrammarBaseVisitor.cs (if you have activated the -visitor option)
Now a fully functioning code might look like the following for start rule `StartRule`:
```csharp
using Antlr4.Runtime;
using Antlr4.Runtime.Tree;
public void MyParseMethod() {
String input = "your text to parse here";
ICharStream stream = CharStreams.fromString(input);
ITokenSource lexer = new MyGrammarLexer(stream);
ITokenStream tokens = new CommonTokenStream(lexer);
MyGrammarParser parser = new MyGrammarParser(tokens);
IParseTree tree = parser.StartRule();
}
```
This program will work. But it won't be useful unless you do one of the following:
* you visit the parse tree using a custom listener
* you visit the parse tree using a custom visitor
* your grammar comprises production code (like AntLR3)
(please note that production code is target specific, so you can't have multi target grammars that include production code)
## How do I create and run a custom listener?
Let's suppose your MyGrammar grammar comprises 2 rules: "key" and "value".
The antlr4 tool will have generated the following listener (only partial code shown here):
```csharp
interface IMyGrammarParserListener : IParseTreeListener {
void EnterKey (MyGrammarParser.KeyContext context);
void ExitKey (MyGrammarParser.KeyContext context);
void EnterValue (MyGrammarParser.ValueContext context);
void ExitValue (MyGrammarParser.ValueContext context);
}
```
In order to provide custom behavior, you might want to create the following class:
```csharp
class KeyPrinter : MyGrammarBaseListener {
// override default listener behavior
void ExitKey (MyGrammarParser.KeyContext context) {
Console.WriteLine("Oh, a key!");
}
}
```
In order to execute this listener, you would simply add the following lines to the above code:
```csharp
...
IParseTree tree = parser.StartRule() - only repeated here for reference
KeyPrinter printer = new KeyPrinter();
ParseTreeWalker.Default.Walk(printer, tree);
```
Further information can be found from The Definitive ANTLR Reference book.
The C# implementation of ANTLR is as close as possible to the Java one, so you shouldn't find it difficult to adapt the examples for C#. See also [Sam Harwell's alternative C# target](https://github.com/tunnelvisionlabs/antlr4cs)
================================================
FILE: doc/dart-target.md
================================================
# ANTLR4 Runtime for Dart
From version 4.9 onwards antlr's dart generated code is null sound safety compatible and sets the minimum dart sdk version to 2.12.0.
### First steps
#### 1. Install ANTLR4
[The getting started guide](https://github.com/antlr/antlr4/blob/master/doc/getting-started.md)
should get you started.
#### 2. Install the Dart ANTLR runtime
Each target language for ANTLR has a runtime package for running parser
generated by ANTLR4. The runtime provides a common set of tools for using your parser.
Install the runtime with the same version as the main ANTLR tool:
Add this to your package's pubspec.yaml file:
```yaml
...
dependencies:
antlr4: <ANTLR version>
...
```
#### 3. Generate your parser
You use the ANTLR4 "tool" to generate a parser. These will reference the ANTLR
runtime, installed above.
Suppose you're using a UNIX system and have set up an alias for the ANTLR4 tool
as described in [the getting started guide](https://github.com/antlr/antlr4/blob/master/doc/getting-started.md).
To generate your Dart parser, run the following command:
```shell script
antlr4 -Dlanguage=Dart MyGrammar.g4
```
For a full list of antlr4 tool options, please visit the
[tool documentation page](https://github.com/antlr/antlr4/blob/master/doc/tool-options.md).
### Complete example
Suppose you're using the JSON grammar from https://github.com/antlr/grammars-v4/tree/master/json.
Then, invoke `antlr4 -Dlanguage=Dart JSON.g4`. The result of this is a
collection of `.dart` including:
* JsonLexer.dart
* JsonParser.dart
* JsonBaseListener.dart
* JsonListener.dart (if you have not activated the -no-listener option)
* JsonVisitor.dart (if you have activated the -visitor option)
We'll write a small main func to call the generated parser/lexer
(assuming they are separate). This one writes out the encountered
`ParseTreeContext`'s:
```dart
import 'package:antlr4/antlr4.dart';
import 'package:my_project/JSONParser.dart';
import 'package:my_project/JSONLexer.dart';
class TreeShapeListener implements ParseTreeListener {
@override
void enterEveryRule(ParserRuleContext ctx) {
print(ctx.text);
}
@override
void exitEveryRule(ParserRuleContext node) {
}
@override
void visitErrorNode(ErrorNode node) {
}
@override
void visitTerminal(TerminalNode node) {
}
}
void main(List<String> args) async {
JSONLexer.checkVersion();
JSONParser.checkVersion();
final input = await InputStream.fromPath(args[0]);
final lexer = JSONLexer(input);
final tokens = CommonTokenStream(lexer);
final parser = JSONParser(tokens);
parser.addErrorListener(DiagnosticErrorListener());
final tree = parser.json();
ParseTreeWalker.DEFAULT.walk(TreeShapeListener(), tree);
}
```
Create a `example.json` file:
```json
{"a":1}
```
Parse the input file:
```shell script
dart bin/main.dart example.json
```
The expected output is:
```
{"a":1}
{"a":1}
{"a":1}
"a":1
1
```
### Debug
We have some logs in place that can ease the debugging process, in order to turn these logs on you can enable the following environment declarations:
- ANTLR_LEXER_DEBUG
- ANTLR_LEXER_DFA_DEBUG
- ANTLR_PARSER_DEBUG
- ANTLR_PARSER_LIST_ATN_DECISIONS_DEBUG
- ANTLR_PARSER_DFA_DEBUG
- ANTLR_PARSER_RETRY_DEBUG
If you're using flutter, you can define these variables by adding an `--dart-define` arguments, eg. `flutter run --dart-define LEXER_DEBUG=false`
================================================
FILE: doc/faq/actions-preds.md
================================================
# Actions and semantic predicates
## How do I test if an optional rule was matched?
For optional rule references such as the initialization clause in the following
```
decl : 'var' ID (EQUALS expr)? ;
```
testing to see if that clause was matched can be done using `$EQUALS!=null` or `$expr.ctx!=null` where `$expr.ctx` points to the context or parse tree created for that reference to rule expr.
================================================
FILE: doc/faq/error-handling.md
================================================
# Error handling
## How do I perform semantic checking with ANTLR?
See [How to implement error handling in ANTLR4](http://stackoverflow.com/questions/21613421/how-to-implement-error-handling-in-antlr4/21615751#21615751).
================================================
FILE: doc/faq/general.md
================================================
# General
## Why do we need ANTLR v4?
*Oliver Zeigermann asked me some questions about v4. Here is our conversation.*
*See the [preface from the book](http://media.pragprog.com/titles/tpantlr2/preface.pdf)*
**Q: Why is the new version of ANTLR also called “honey badger”?**
ANTLR v4 is called the honey badger release after the fearless hero of the YouTube sensation, The Crazy Nastyass Honey Badger.
**Q: Why did you create a new version of ANTLR?**
Well, I start creating a new version because v3 had gotten very messy on the inside and also relied on grammars written in ANTLR v2. Unfortunately, v2's open-source license was unclear and so projects such as Eclipse could not include v3 because of its dependency on v2. In the end, Sam Harwell converted all of the v2 grammars into v3 so that v3 was written in itself. Because v3 has a very clean BSD license, the Eclipse project okayed for inclusion in that project in the summer of 2011.
As I was rewriting ANTLR, I wanted to experiment with a new variation of the LL(\*) parsing algorithm. As luck would have it, I came up with a cool new version called adaptive LL(\*) that pushes all of the grammar analysis effort to runtime. The parser warms up like Java does with its JIT on-the-fly compiler; the code gets faster and faster the longer it runs. The benefit is that the adaptive algorithm is much stronger than the static LL(\*) grammar analysis algorithm in v3. Honey Badger takes any grammar that you give it; it just doesn't give a damn. (v4 accepts even left recursive grammars, except for indirectly left recursive grammars where x calls y which calls x).
v4 is the culmination of 25 years of research into parsers and parser generators. I think I finally know what I want to build. :)
**Q: What makes you excited about ANTLR4?**
The biggest thing is the new adaptive parsing strategy, which lets us accept any grammar we care to write. That gives us a huge productivity boost because we can now write much more natural expression rules (which occur in almost every grammar). For example, bottom-up parser generators such as yacc let you write very natural grammars like this:
```
e : e '*' e
| e '+' e
| INT
;
```
ANTLR v4 will also take that grammar now, translating it secretly to a non-left recursive version.
Another big thing with v4 is that my goal has shifted from performance to ease-of-use. For example, ANTLR automatically can build parse trees for you and generate listeners and visitors. This is not only a huge productivity win, but also an important step forward in building grammars that don't depend on embedded actions. Those embedded actions (raw Java code or whatever) locked the grammar into use with only one language. If we keep all of the actions out of the grammar and put them into external visitors, we can reuse the same grammar to generate code in any language for which we have an ANTLR target.
**Q: What do you think are the things people had problems with in ANTLR3?**
The biggest problem was figuring out why ANTLR did not like their grammar. The static analysis often could not figure out how to generate a parser for the grammar. This problem totally goes away with the honey badger because it will take just about anything you give it without a whimper.
**Q: And what with other compiler generator tools?**
The biggest problem for the average practitioner is that most parser generators do not produce code you can load into a debugger and step through. This immediately removes bottom-up parser generators and the really powerful GLR parser generators from consideration by the average programmer. There are a few other tools that generate source code like ANTLR does, but they don't have v4's adaptive LL(\*) parsers. You will be stuck with contorting your grammar to fit the needs of the tool's weaker, say, LL(k) parsing strategy. PEG-based tools have a number of weaknesses, but to mention one, they have essentially no error recovery because they cannot report an error and until they have parsed the entire input.
**Q: What are the main design decisions in ANTLR4?**
Ease-of-use over performance. I will worry about performance later. Simplicity over complexity. For example, I have taken out explicit/manual AST construction facilities and the tree grammar facilities. For 20 years I've been trying to get people to go that direction, but I've since decided that it was a mistake. It's much better to give people a parser generator that can automatically build trees and then let them use pure code to do whatever tree walking they want. People are extremely familiar and comfortable with visitors, for example.
**Q: What do you think people will like most on ANTLR4?**
The lack of errors when you run your grammar through ANTLR. The automatic tree construction and listener/visitor generation.
**What do you think are the problems people will try to solve with ANTLR4?**
In my experience, almost no one uses parser generators to build commercial compilers. So, people are using ANTLR for their everyday work, building everything from configuration files to little scripting languages.
In response to a question about this entry from stackoverflow.com: I believe that compiler developers are very concerned with parsing speed, error reporting, and error recovery. For that, they want absolute control over their parser. Also, some languages are so complicated, such as C++, that parser generators might build parsers slower than compiler developers want. The compiler developers also like the control of a recursive-descent parser for predicating the parse to handle context-sensitive constructs such as `T(i)` in C++.
There is also likely a sense that parsing is the easy part of building a compiler so they don't immediately jump automatically to parser generators. I think this is also a function of previous generation parser generators. McPeak's Elkhound GLR-based parser generator is powerful enough and fast enough, in the hands of someone that knows what they're doing, to be suitable for compilers. I can also attest to the fact that ANTLR v4 is now powerful enough and fast enough to compete well with handbuilt parse
gitextract_275zyhbd/
├── .clang-format
├── .editorconfig
├── .gitattributes
├── .github/
│ ├── ISSUE_TEMPLATE.md
│ ├── PULL_REQUEST_TEMPLATE.md
│ └── workflows/
│ └── hosted.yml
├── .gitignore
├── ANTLR-HOUSE-RULES.md
├── CHANGES.txt
├── CONTRIBUTING.md
├── LICENSE.txt
├── Package.swift
├── README.md
├── antlr4-maven-plugin/
│ ├── nb-configuration.xml
│ ├── pom.xml
│ ├── resources/
│ │ └── META-INF/
│ │ └── m2e/
│ │ └── lifecycle-mapping-metadata.xml
│ └── src/
│ ├── main/
│ │ └── java/
│ │ └── org/
│ │ └── antlr/
│ │ └── mojo/
│ │ └── antlr4/
│ │ ├── Antlr4ErrorLog.java
│ │ ├── Antlr4Mojo.java
│ │ ├── GrammarDependencies.java
│ │ └── MojoUtils.java
│ ├── site/
│ │ ├── apt/
│ │ │ ├── examples/
│ │ │ │ ├── import.apt
│ │ │ │ ├── libraries.apt.vm
│ │ │ │ └── simple.apt.vm
│ │ │ ├── faq.apt.vm
│ │ │ ├── index.apt
│ │ │ └── usage.apt.vm
│ │ └── site.xml
│ └── test/
│ ├── java/
│ │ └── org/
│ │ └── antlr/
│ │ └── mojo/
│ │ └── antlr4/
│ │ └── Antlr4MojoTest.java
│ └── projects/
│ ├── dependencyRemoved/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── imports/
│ │ │ └── HelloBase.g4
│ │ └── test/
│ │ └── Hello.g4
│ ├── importTokens/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── imports/
│ │ │ └── SimpleLexer.tokens
│ │ └── test/
│ │ └── SimpleParser.g4
│ ├── importsCustom/
│ │ ├── pom.xml
│ │ └── src/
│ │ └── main/
│ │ └── antlr4/
│ │ ├── Hello.g4
│ │ ├── TestLexer.g4
│ │ ├── TestParser.g4
│ │ └── imports/
│ │ └── TestBaseLexer.g4
│ └── importsStandard/
│ ├── pom.xml
│ └── src/
│ └── main/
│ └── antlr4/
│ ├── imports/
│ │ ├── TestBaseLexer.g4
│ │ └── TestBaseLexer2.g4
│ └── test/
│ ├── Hello.g4
│ ├── TestLexer.g4
│ └── TestParser.g4
├── developer-cert-of-origin.txt
├── doc/
│ ├── IDEs.md
│ ├── ace-javascript-target.md
│ ├── actions.md
│ ├── antlr-project-testing.md
│ ├── building-antlr.md
│ ├── cpp-target.md
│ ├── creating-a-language-target.md
│ ├── csharp-target.md
│ ├── dart-target.md
│ ├── faq/
│ │ ├── actions-preds.md
│ │ ├── error-handling.md
│ │ ├── general.md
│ │ ├── getting-started.md
│ │ ├── index.md
│ │ ├── installation.md
│ │ ├── lexical.md
│ │ ├── parse-trees.md
│ │ └── translation.md
│ ├── getting-started.md
│ ├── go-changes.md
│ ├── go-target.md
│ ├── grammars.md
│ ├── index.md
│ ├── interpreters.md
│ ├── java-target.md
│ ├── javascript-target.md
│ ├── left-recursion.md
│ ├── lexer-rules.md
│ ├── lexicon.md
│ ├── listeners.md
│ ├── options.md
│ ├── parser-rules.md
│ ├── parsing-binary-files.md
│ ├── php-target.md
│ ├── predicates.md
│ ├── python-target.md
│ ├── releasing-antlr.md
│ ├── resources.md
│ ├── swift-target.md
│ ├── target-agnostic-grammars.md
│ ├── targets.md
│ ├── tool-options.md
│ ├── tree-matching.md
│ ├── typescript-target.md
│ ├── unicode.md
│ └── wildcard.md
├── docker/
│ ├── .dockerignore
│ ├── Dockerfile
│ └── README.md
├── historical-contributors-agreement.txt
├── pom.xml
├── runtime/
│ ├── CSharp/
│ │ ├── src/
│ │ │ ├── Antlr4.csproj
│ │ │ ├── Antlr4.snk
│ │ │ ├── AntlrFileStream.cs
│ │ │ ├── AntlrInputStream.cs
│ │ │ ├── Atn/
│ │ │ │ ├── ATN.cs
│ │ │ │ ├── ATNConfig.cs
│ │ │ │ ├── ATNConfigSet.cs
│ │ │ │ ├── ATNDeserializationOptions.cs
│ │ │ │ ├── ATNDeserializer.cs
│ │ │ │ ├── ATNSimulator.cs
│ │ │ │ ├── ATNState.cs
│ │ │ │ ├── ATNType.cs
│ │ │ │ ├── AbstractPredicateTransition.cs
│ │ │ │ ├── ActionTransition.cs
│ │ │ │ ├── AmbiguityInfo.cs
│ │ │ │ ├── ArrayPredictionContext.cs
│ │ │ │ ├── AtomTransition.cs
│ │ │ │ ├── BasicBlockStartState.cs
│ │ │ │ ├── BasicState.cs
│ │ │ │ ├── BlockEndState.cs
│ │ │ │ ├── BlockStartState.cs
│ │ │ │ ├── ConflictInfo.cs
│ │ │ │ ├── ContextSensitivityInfo.cs
│ │ │ │ ├── DecisionEventInfo.cs
│ │ │ │ ├── DecisionInfo.cs
│ │ │ │ ├── DecisionState.cs
│ │ │ │ ├── EmptyPredictionContext.cs
│ │ │ │ ├── EpsilonTransition.cs
│ │ │ │ ├── ErrorInfo.cs
│ │ │ │ ├── ILexerAction.cs
│ │ │ │ ├── LL1Analyzer.cs
│ │ │ │ ├── LexerATNConfig.cs
│ │ │ │ ├── LexerATNSimulator.cs
│ │ │ │ ├── LexerActionExecutor.cs
│ │ │ │ ├── LexerActionType.cs
│ │ │ │ ├── LexerChannelAction.cs
│ │ │ │ ├── LexerCustomAction.cs
│ │ │ │ ├── LexerIndexedCustomAction.cs
│ │ │ │ ├── LexerModeAction.cs
│ │ │ │ ├── LexerMoreAction.cs
│ │ │ │ ├── LexerPopModeAction.cs
│ │ │ │ ├── LexerPushModeAction.cs
│ │ │ │ ├── LexerSkipAction.cs
│ │ │ │ ├── LexerTypeAction.cs
│ │ │ │ ├── LookaheadEventInfo.cs
│ │ │ │ ├── LoopEndState.cs
│ │ │ │ ├── MergeCache.cs
│ │ │ │ ├── NotSetTransition.cs
│ │ │ │ ├── ParseInfo.cs
│ │ │ │ ├── ParserATNSimulator.cs
│ │ │ │ ├── PlusBlockStartState.cs
│ │ │ │ ├── PlusLoopbackState.cs
│ │ │ │ ├── PrecedencePredicateTransition.cs
│ │ │ │ ├── PredicateEvalInfo.cs
│ │ │ │ ├── PredicateTransition.cs
│ │ │ │ ├── PredictionContext.cs
│ │ │ │ ├── PredictionContextCache.cs
│ │ │ │ ├── PredictionMode.cs
│ │ │ │ ├── ProfilingATNSimulator.cs
│ │ │ │ ├── RangeTransition.cs
│ │ │ │ ├── RuleStartState.cs
│ │ │ │ ├── RuleStopState.cs
│ │ │ │ ├── RuleTransition.cs
│ │ │ │ ├── SemanticContext.cs
│ │ │ │ ├── SetTransition.cs
│ │ │ │ ├── SimulatorState.cs
│ │ │ │ ├── SingletonPredictionContext.cs
│ │ │ │ ├── StarBlockStartState.cs
│ │ │ │ ├── StarLoopEntryState.cs
│ │ │ │ ├── StarLoopbackState.cs
│ │ │ │ ├── StateType.cs
│ │ │ │ ├── TokensStartState.cs
│ │ │ │ ├── Transition.cs
│ │ │ │ ├── TransitionType.cs
│ │ │ │ └── WildcardTransition.cs
│ │ │ ├── BailErrorStrategy.cs
│ │ │ ├── BaseErrorListener.cs
│ │ │ ├── BufferedTokenStream.cs
│ │ │ ├── CharStreams.cs
│ │ │ ├── CommonToken.cs
│ │ │ ├── CommonTokenFactory.cs
│ │ │ ├── CommonTokenStream.cs
│ │ │ ├── ConsoleErrorListener.cs
│ │ │ ├── DefaultErrorStrategy.cs
│ │ │ ├── Dependents.cs
│ │ │ ├── Dfa/
│ │ │ │ ├── AbstractEdgeMap.cs
│ │ │ │ ├── AcceptStateInfo.cs
│ │ │ │ ├── ArrayEdgeMap.cs
│ │ │ │ ├── DFA.cs
│ │ │ │ ├── DFASerializer.cs
│ │ │ │ ├── DFAState.cs
│ │ │ │ ├── EmptyEdgeMap.cs
│ │ │ │ ├── IEdgeMap.cs
│ │ │ │ ├── LexerDFASerializer.cs
│ │ │ │ ├── SingletonEdgeMap.cs
│ │ │ │ └── SparseEdgeMap.cs
│ │ │ ├── DiagnosticErrorListener.cs
│ │ │ ├── FailedPredicateException.cs
│ │ │ ├── IAntlrErrorListener.cs
│ │ │ ├── IAntlrErrorStrategy.cs
│ │ │ ├── ICharStream.cs
│ │ │ ├── IIntStream.cs
│ │ │ ├── IParserErrorListener.cs
│ │ │ ├── IRecognizer.cs
│ │ │ ├── IToken.cs
│ │ │ ├── ITokenFactory.cs
│ │ │ ├── ITokenSource.cs
│ │ │ ├── ITokenStream.cs
│ │ │ ├── IVocabulary.cs
│ │ │ ├── IWritableToken.cs
│ │ │ ├── InputMismatchException.cs
│ │ │ ├── InterpreterRuleContext.cs
│ │ │ ├── Lexer.cs
│ │ │ ├── LexerInterpreter.cs
│ │ │ ├── LexerNoViableAltException.cs
│ │ │ ├── ListTokenSource.cs
│ │ │ ├── Misc/
│ │ │ │ ├── Args.cs
│ │ │ │ ├── ArrayList.cs
│ │ │ │ ├── IIntSet.cs
│ │ │ │ ├── Interval.cs
│ │ │ │ ├── IntervalSet.cs
│ │ │ │ ├── MultiMap.cs
│ │ │ │ ├── MurmurHash.cs
│ │ │ │ ├── NotNullAttribute.cs
│ │ │ │ ├── NullableAttribute.cs
│ │ │ │ ├── Pair.cs
│ │ │ │ ├── ParseCanceledException.cs
│ │ │ │ ├── RuleDependencyChecker.cs
│ │ │ │ └── Utils.cs
│ │ │ ├── NoViableAltException.cs
│ │ │ ├── Parser.cs
│ │ │ ├── ParserInterpreter.cs
│ │ │ ├── ParserRuleContext.cs
│ │ │ ├── Properties/
│ │ │ │ └── AssemblyInfo.cs
│ │ │ ├── ProxyErrorListener.cs
│ │ │ ├── ProxyParserErrorListener.cs
│ │ │ ├── README.md
│ │ │ ├── RecognitionException.cs
│ │ │ ├── Recognizer.cs
│ │ │ ├── RuleContext.cs
│ │ │ ├── RuleDependencyAttribute.cs
│ │ │ ├── RuleVersionAttribute.cs
│ │ │ ├── Sharpen/
│ │ │ │ ├── Arrays.cs
│ │ │ │ ├── AtomicReference.cs
│ │ │ │ ├── BitSet.cs
│ │ │ │ ├── Collections.cs
│ │ │ │ ├── DictionaryExtensions.cs
│ │ │ │ ├── ListExtensions.cs
│ │ │ │ ├── Runtime.cs
│ │ │ │ └── SequenceEqualityComparer.cs
│ │ │ ├── TokenStreamRewriter.cs
│ │ │ ├── TokenTypes.cs
│ │ │ ├── Tree/
│ │ │ │ ├── AbstractParseTreeVisitor.cs
│ │ │ │ ├── ErrorNodeImpl.cs
│ │ │ │ ├── IErrorNode.cs
│ │ │ │ ├── IParseTree.cs
│ │ │ │ ├── IParseTreeListener.cs
│ │ │ │ ├── IParseTreeVisitor.cs
│ │ │ │ ├── IRuleNode.cs
│ │ │ │ ├── ISyntaxTree.cs
│ │ │ │ ├── ITerminalNode.cs
│ │ │ │ ├── ITree.cs
│ │ │ │ ├── ParseTreeProperty.cs
│ │ │ │ ├── ParseTreeWalker.cs
│ │ │ │ ├── Pattern/
│ │ │ │ │ ├── Chunk.cs
│ │ │ │ │ ├── ParseTreeMatch.cs
│ │ │ │ │ ├── ParseTreePattern.cs
│ │ │ │ │ ├── ParseTreePatternMatcher.cs
│ │ │ │ │ ├── RuleTagToken.cs
│ │ │ │ │ ├── TagChunk.cs
│ │ │ │ │ ├── TextChunk.cs
│ │ │ │ │ └── TokenTagToken.cs
│ │ │ │ ├── TerminalNodeImpl.cs
│ │ │ │ ├── Trees.cs
│ │ │ │ └── Xpath/
│ │ │ │ ├── XPath.cs
│ │ │ │ ├── XPathElement.cs
│ │ │ │ ├── XPathLexer.cs
│ │ │ │ ├── XPathLexer.g4
│ │ │ │ ├── XPathLexer.tokens
│ │ │ │ ├── XPathLexerErrorListener.cs
│ │ │ │ ├── XPathRuleAnywhereElement.cs
│ │ │ │ ├── XPathRuleElement.cs
│ │ │ │ ├── XPathTokenAnywhereElement.cs
│ │ │ │ ├── XPathTokenElement.cs
│ │ │ │ ├── XPathWildcardAnywhereElement.cs
│ │ │ │ └── XPathWildcardElement.cs
│ │ │ ├── UnbufferedCharStream.cs
│ │ │ ├── UnbufferedTokenStream.cs
│ │ │ └── Vocabulary.cs
│ │ └── tests/
│ │ ├── issue-2693/
│ │ │ ├── ErrorListener.cs
│ │ │ ├── Program.cs
│ │ │ ├── Test.csproj
│ │ │ ├── Test.sln
│ │ │ ├── TreeOutput.cs
│ │ │ ├── asm8080.g4
│ │ │ ├── cpm22.asm
│ │ │ └── test.sh
│ │ └── issue-3079/
│ │ ├── Arithmetic.g4
│ │ ├── ErrorListener.cs
│ │ ├── Program.cs
│ │ ├── Test.csproj
│ │ ├── Test.sln
│ │ ├── readme.md
│ │ └── test.sh
│ ├── Cpp/
│ │ ├── CMakeLists.txt
│ │ ├── CMakeSettings.json
│ │ ├── README.md
│ │ ├── VERSION
│ │ ├── cmake/
│ │ │ ├── Antlr4Package.md
│ │ │ ├── ExternalAntlr4Cpp.cmake
│ │ │ ├── FindANTLR.cmake
│ │ │ ├── README.md
│ │ │ ├── antlr4-generator.cmake.in
│ │ │ └── antlr4-runtime.cmake.in
│ │ ├── demo/
│ │ │ ├── CMakeLists.txt
│ │ │ ├── Linux/
│ │ │ │ └── main.cpp
│ │ │ ├── Mac/
│ │ │ │ ├── antlr4-cpp-demo/
│ │ │ │ │ └── main.cpp
│ │ │ │ ├── antlrcpp Tests/
│ │ │ │ │ ├── Info.plist
│ │ │ │ │ ├── InputHandlingTests.mm
│ │ │ │ │ ├── MiscClassTests.mm
│ │ │ │ │ └── antlrcpp_Tests.mm
│ │ │ │ ├── antlrcpp-demo.xcodeproj/
│ │ │ │ │ ├── project.pbxproj
│ │ │ │ │ ├── project.xcworkspace/
│ │ │ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ │ │ └── xcshareddata/
│ │ │ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ │ │ └── xcshareddata/
│ │ │ │ │ └── xcschemes/
│ │ │ │ │ ├── antlr4-cpp-demo.xcscheme
│ │ │ │ │ └── antlrcpp Tests.xcscheme
│ │ │ │ └── build.sh
│ │ │ ├── README.md
│ │ │ ├── TLexer.g4
│ │ │ ├── TParser.g4
│ │ │ ├── Windows/
│ │ │ │ ├── antlr4-cpp-demo/
│ │ │ │ │ ├── antlr4-cpp-demo-vs2022.vcxproj
│ │ │ │ │ ├── antlr4-cpp-demo-vs2022.vcxproj.filters
│ │ │ │ │ └── main.cpp
│ │ │ │ └── antlr4cpp-vs2022.sln
│ │ │ ├── generate.cmd
│ │ │ └── generate.sh
│ │ ├── deploy-macos.sh
│ │ ├── deploy-source.sh
│ │ ├── deploy-windows.cmd
│ │ └── runtime/
│ │ ├── CMakeLists.txt
│ │ ├── antlr4cpp-vs2019.vcxproj
│ │ ├── antlr4cpp-vs2019.vcxproj.filters
│ │ ├── antlr4cpp-vs2022.vcxproj
│ │ ├── antlr4cpp-vs2022.vcxproj.filters
│ │ ├── antlrcpp-ios/
│ │ │ ├── Info.plist
│ │ │ └── antlrcpp_ios.h
│ │ ├── antlrcpp.xcodeproj/
│ │ │ ├── project.pbxproj
│ │ │ ├── project.xcworkspace/
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata/
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ │ └── xcshareddata/
│ │ │ └── xcschemes/
│ │ │ ├── antlr4.xcscheme
│ │ │ ├── antlr4_ios.xcscheme
│ │ │ └── antlr4_static.xcscheme
│ │ ├── nuget/
│ │ │ ├── ANTLR4.Runtime.cpp.noarch.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.noarch.targets
│ │ │ ├── ANTLR4.Runtime.cpp.shared.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.shared.props
│ │ │ ├── ANTLR4.Runtime.cpp.shared.targets
│ │ │ ├── ANTLR4.Runtime.cpp.static.nuspec
│ │ │ ├── ANTLR4.Runtime.cpp.static.targets
│ │ │ └── pack.cmd
│ │ ├── src/
│ │ │ ├── ANTLRErrorListener.cpp
│ │ │ ├── ANTLRErrorListener.h
│ │ │ ├── ANTLRErrorStrategy.cpp
│ │ │ ├── ANTLRErrorStrategy.h
│ │ │ ├── ANTLRFileStream.cpp
│ │ │ ├── ANTLRFileStream.h
│ │ │ ├── ANTLRInputStream.cpp
│ │ │ ├── ANTLRInputStream.h
│ │ │ ├── BailErrorStrategy.cpp
│ │ │ ├── BailErrorStrategy.h
│ │ │ ├── BaseErrorListener.cpp
│ │ │ ├── BaseErrorListener.h
│ │ │ ├── BufferedTokenStream.cpp
│ │ │ ├── BufferedTokenStream.h
│ │ │ ├── CharStream.cpp
│ │ │ ├── CharStream.h
│ │ │ ├── CommonToken.cpp
│ │ │ ├── CommonToken.h
│ │ │ ├── CommonTokenFactory.cpp
│ │ │ ├── CommonTokenFactory.h
│ │ │ ├── CommonTokenStream.cpp
│ │ │ ├── CommonTokenStream.h
│ │ │ ├── ConsoleErrorListener.cpp
│ │ │ ├── ConsoleErrorListener.h
│ │ │ ├── DefaultErrorStrategy.cpp
│ │ │ ├── DefaultErrorStrategy.h
│ │ │ ├── DiagnosticErrorListener.cpp
│ │ │ ├── DiagnosticErrorListener.h
│ │ │ ├── Exceptions.cpp
│ │ │ ├── Exceptions.h
│ │ │ ├── FailedPredicateException.cpp
│ │ │ ├── FailedPredicateException.h
│ │ │ ├── FlatHashMap.h
│ │ │ ├── FlatHashSet.h
│ │ │ ├── InputMismatchException.cpp
│ │ │ ├── InputMismatchException.h
│ │ │ ├── IntStream.cpp
│ │ │ ├── IntStream.h
│ │ │ ├── InterpreterRuleContext.cpp
│ │ │ ├── InterpreterRuleContext.h
│ │ │ ├── Lexer.cpp
│ │ │ ├── Lexer.h
│ │ │ ├── LexerInterpreter.cpp
│ │ │ ├── LexerInterpreter.h
│ │ │ ├── LexerNoViableAltException.cpp
│ │ │ ├── LexerNoViableAltException.h
│ │ │ ├── ListTokenSource.cpp
│ │ │ ├── ListTokenSource.h
│ │ │ ├── NoViableAltException.cpp
│ │ │ ├── NoViableAltException.h
│ │ │ ├── Parser.cpp
│ │ │ ├── Parser.h
│ │ │ ├── ParserInterpreter.cpp
│ │ │ ├── ParserInterpreter.h
│ │ │ ├── ParserRuleContext.cpp
│ │ │ ├── ParserRuleContext.h
│ │ │ ├── ProxyErrorListener.cpp
│ │ │ ├── ProxyErrorListener.h
│ │ │ ├── RecognitionException.cpp
│ │ │ ├── RecognitionException.h
│ │ │ ├── Recognizer.cpp
│ │ │ ├── Recognizer.h
│ │ │ ├── RuleContext.cpp
│ │ │ ├── RuleContext.h
│ │ │ ├── RuleContextWithAltNum.cpp
│ │ │ ├── RuleContextWithAltNum.h
│ │ │ ├── RuntimeMetaData.cpp
│ │ │ ├── RuntimeMetaData.h
│ │ │ ├── Token.cpp
│ │ │ ├── Token.h
│ │ │ ├── TokenFactory.h
│ │ │ ├── TokenSource.cpp
│ │ │ ├── TokenSource.h
│ │ │ ├── TokenStream.cpp
│ │ │ ├── TokenStream.h
│ │ │ ├── TokenStreamRewriter.cpp
│ │ │ ├── TokenStreamRewriter.h
│ │ │ ├── UnbufferedCharStream.cpp
│ │ │ ├── UnbufferedCharStream.h
│ │ │ ├── UnbufferedTokenStream.cpp
│ │ │ ├── UnbufferedTokenStream.h
│ │ │ ├── Version.h
│ │ │ ├── Vocabulary.cpp
│ │ │ ├── Vocabulary.h
│ │ │ ├── WritableToken.cpp
│ │ │ ├── WritableToken.h
│ │ │ ├── antlr4-common.h
│ │ │ ├── antlr4-runtime.h
│ │ │ ├── atn/
│ │ │ │ ├── ATN.cpp
│ │ │ │ ├── ATN.h
│ │ │ │ ├── ATNConfig.cpp
│ │ │ │ ├── ATNConfig.h
│ │ │ │ ├── ATNConfigSet.cpp
│ │ │ │ ├── ATNConfigSet.h
│ │ │ │ ├── ATNDeserializationOptions.cpp
│ │ │ │ ├── ATNDeserializationOptions.h
│ │ │ │ ├── ATNDeserializer.cpp
│ │ │ │ ├── ATNDeserializer.h
│ │ │ │ ├── ATNSimulator.cpp
│ │ │ │ ├── ATNSimulator.h
│ │ │ │ ├── ATNState.cpp
│ │ │ │ ├── ATNState.h
│ │ │ │ ├── ATNStateType.cpp
│ │ │ │ ├── ATNStateType.h
│ │ │ │ ├── ATNType.h
│ │ │ │ ├── ActionTransition.cpp
│ │ │ │ ├── ActionTransition.h
│ │ │ │ ├── AmbiguityInfo.cpp
│ │ │ │ ├── AmbiguityInfo.h
│ │ │ │ ├── ArrayPredictionContext.cpp
│ │ │ │ ├── ArrayPredictionContext.h
│ │ │ │ ├── AtomTransition.cpp
│ │ │ │ ├── AtomTransition.h
│ │ │ │ ├── BasicBlockStartState.h
│ │ │ │ ├── BasicState.h
│ │ │ │ ├── BlockEndState.h
│ │ │ │ ├── BlockStartState.h
│ │ │ │ ├── ContextSensitivityInfo.cpp
│ │ │ │ ├── ContextSensitivityInfo.h
│ │ │ │ ├── DecisionEventInfo.cpp
│ │ │ │ ├── DecisionEventInfo.h
│ │ │ │ ├── DecisionInfo.cpp
│ │ │ │ ├── DecisionInfo.h
│ │ │ │ ├── DecisionState.cpp
│ │ │ │ ├── DecisionState.h
│ │ │ │ ├── EpsilonTransition.cpp
│ │ │ │ ├── EpsilonTransition.h
│ │ │ │ ├── ErrorInfo.cpp
│ │ │ │ ├── ErrorInfo.h
│ │ │ │ ├── HashUtils.h
│ │ │ │ ├── LL1Analyzer.cpp
│ │ │ │ ├── LL1Analyzer.h
│ │ │ │ ├── LexerATNConfig.cpp
│ │ │ │ ├── LexerATNConfig.h
│ │ │ │ ├── LexerATNSimulator.cpp
│ │ │ │ ├── LexerATNSimulator.h
│ │ │ │ ├── LexerAction.cpp
│ │ │ │ ├── LexerAction.h
│ │ │ │ ├── LexerActionExecutor.cpp
│ │ │ │ ├── LexerActionExecutor.h
│ │ │ │ ├── LexerActionType.h
│ │ │ │ ├── LexerChannelAction.cpp
│ │ │ │ ├── LexerChannelAction.h
│ │ │ │ ├── LexerCustomAction.cpp
│ │ │ │ ├── LexerCustomAction.h
│ │ │ │ ├── LexerIndexedCustomAction.cpp
│ │ │ │ ├── LexerIndexedCustomAction.h
│ │ │ │ ├── LexerModeAction.cpp
│ │ │ │ ├── LexerModeAction.h
│ │ │ │ ├── LexerMoreAction.cpp
│ │ │ │ ├── LexerMoreAction.h
│ │ │ │ ├── LexerPopModeAction.cpp
│ │ │ │ ├── LexerPopModeAction.h
│ │ │ │ ├── LexerPushModeAction.cpp
│ │ │ │ ├── LexerPushModeAction.h
│ │ │ │ ├── LexerSkipAction.cpp
│ │ │ │ ├── LexerSkipAction.h
│ │ │ │ ├── LexerTypeAction.cpp
│ │ │ │ ├── LexerTypeAction.h
│ │ │ │ ├── LookaheadEventInfo.cpp
│ │ │ │ ├── LookaheadEventInfo.h
│ │ │ │ ├── LoopEndState.h
│ │ │ │ ├── NotSetTransition.cpp
│ │ │ │ ├── NotSetTransition.h
│ │ │ │ ├── OrderedATNConfigSet.cpp
│ │ │ │ ├── OrderedATNConfigSet.h
│ │ │ │ ├── ParseInfo.cpp
│ │ │ │ ├── ParseInfo.h
│ │ │ │ ├── ParserATNSimulator.cpp
│ │ │ │ ├── ParserATNSimulator.h
│ │ │ │ ├── ParserATNSimulatorOptions.h
│ │ │ │ ├── PlusBlockStartState.h
│ │ │ │ ├── PlusLoopbackState.h
│ │ │ │ ├── PrecedencePredicateTransition.cpp
│ │ │ │ ├── PrecedencePredicateTransition.h
│ │ │ │ ├── PredicateEvalInfo.cpp
│ │ │ │ ├── PredicateEvalInfo.h
│ │ │ │ ├── PredicateTransition.cpp
│ │ │ │ ├── PredicateTransition.h
│ │ │ │ ├── PredictionContext.cpp
│ │ │ │ ├── PredictionContext.h
│ │ │ │ ├── PredictionContextCache.cpp
│ │ │ │ ├── PredictionContextCache.h
│ │ │ │ ├── PredictionContextMergeCache.cpp
│ │ │ │ ├── PredictionContextMergeCache.h
│ │ │ │ ├── PredictionContextMergeCacheOptions.h
│ │ │ │ ├── PredictionContextType.h
│ │ │ │ ├── PredictionMode.cpp
│ │ │ │ ├── PredictionMode.h
│ │ │ │ ├── ProfilingATNSimulator.cpp
│ │ │ │ ├── ProfilingATNSimulator.h
│ │ │ │ ├── RangeTransition.cpp
│ │ │ │ ├── RangeTransition.h
│ │ │ │ ├── RuleStartState.h
│ │ │ │ ├── RuleStopState.h
│ │ │ │ ├── RuleTransition.cpp
│ │ │ │ ├── RuleTransition.h
│ │ │ │ ├── SemanticContext.cpp
│ │ │ │ ├── SemanticContext.h
│ │ │ │ ├── SemanticContextType.h
│ │ │ │ ├── SerializedATNView.h
│ │ │ │ ├── SetTransition.cpp
│ │ │ │ ├── SetTransition.h
│ │ │ │ ├── SingletonPredictionContext.cpp
│ │ │ │ ├── SingletonPredictionContext.h
│ │ │ │ ├── StarBlockStartState.h
│ │ │ │ ├── StarLoopEntryState.h
│ │ │ │ ├── StarLoopbackState.cpp
│ │ │ │ ├── StarLoopbackState.h
│ │ │ │ ├── TokensStartState.h
│ │ │ │ ├── Transition.cpp
│ │ │ │ ├── Transition.h
│ │ │ │ ├── TransitionType.cpp
│ │ │ │ ├── TransitionType.h
│ │ │ │ ├── WildcardTransition.cpp
│ │ │ │ └── WildcardTransition.h
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.cpp
│ │ │ │ ├── DFA.h
│ │ │ │ ├── DFASerializer.cpp
│ │ │ │ ├── DFASerializer.h
│ │ │ │ ├── DFAState.cpp
│ │ │ │ ├── DFAState.h
│ │ │ │ ├── LexerDFASerializer.cpp
│ │ │ │ └── LexerDFASerializer.h
│ │ │ ├── internal/
│ │ │ │ ├── Synchronization.cpp
│ │ │ │ └── Synchronization.h
│ │ │ ├── misc/
│ │ │ │ ├── InterpreterDataReader.cpp
│ │ │ │ ├── InterpreterDataReader.h
│ │ │ │ ├── Interval.cpp
│ │ │ │ ├── Interval.h
│ │ │ │ ├── IntervalSet.cpp
│ │ │ │ ├── IntervalSet.h
│ │ │ │ ├── MurmurHash.cpp
│ │ │ │ ├── MurmurHash.h
│ │ │ │ ├── Predicate.cpp
│ │ │ │ └── Predicate.h
│ │ │ ├── support/
│ │ │ │ ├── Any.cpp
│ │ │ │ ├── Any.h
│ │ │ │ ├── Arrays.cpp
│ │ │ │ ├── Arrays.h
│ │ │ │ ├── BitSet.h
│ │ │ │ ├── CPPUtils.cpp
│ │ │ │ ├── CPPUtils.h
│ │ │ │ ├── Casts.h
│ │ │ │ ├── Declarations.h
│ │ │ │ ├── StringUtils.cpp
│ │ │ │ ├── StringUtils.h
│ │ │ │ ├── Unicode.h
│ │ │ │ ├── Utf8.cpp
│ │ │ │ └── Utf8.h
│ │ │ └── tree/
│ │ │ ├── AbstractParseTreeVisitor.h
│ │ │ ├── ErrorNode.h
│ │ │ ├── ErrorNodeImpl.cpp
│ │ │ ├── ErrorNodeImpl.h
│ │ │ ├── IterativeParseTreeWalker.cpp
│ │ │ ├── IterativeParseTreeWalker.h
│ │ │ ├── ParseTree.cpp
│ │ │ ├── ParseTree.h
│ │ │ ├── ParseTreeListener.cpp
│ │ │ ├── ParseTreeListener.h
│ │ │ ├── ParseTreeProperty.h
│ │ │ ├── ParseTreeType.h
│ │ │ ├── ParseTreeVisitor.cpp
│ │ │ ├── ParseTreeVisitor.h
│ │ │ ├── ParseTreeWalker.cpp
│ │ │ ├── ParseTreeWalker.h
│ │ │ ├── TerminalNode.h
│ │ │ ├── TerminalNodeImpl.cpp
│ │ │ ├── TerminalNodeImpl.h
│ │ │ ├── Trees.cpp
│ │ │ ├── Trees.h
│ │ │ ├── pattern/
│ │ │ │ ├── Chunk.cpp
│ │ │ │ ├── Chunk.h
│ │ │ │ ├── ParseTreeMatch.cpp
│ │ │ │ ├── ParseTreeMatch.h
│ │ │ │ ├── ParseTreePattern.cpp
│ │ │ │ ├── ParseTreePattern.h
│ │ │ │ ├── ParseTreePatternMatcher.cpp
│ │ │ │ ├── ParseTreePatternMatcher.h
│ │ │ │ ├── RuleTagToken.cpp
│ │ │ │ ├── RuleTagToken.h
│ │ │ │ ├── TagChunk.cpp
│ │ │ │ ├── TagChunk.h
│ │ │ │ ├── TextChunk.cpp
│ │ │ │ ├── TextChunk.h
│ │ │ │ ├── TokenTagToken.cpp
│ │ │ │ └── TokenTagToken.h
│ │ │ └── xpath/
│ │ │ ├── XPath.cpp
│ │ │ ├── XPath.h
│ │ │ ├── XPathElement.cpp
│ │ │ ├── XPathElement.h
│ │ │ ├── XPathLexer.cpp
│ │ │ ├── XPathLexer.g4
│ │ │ ├── XPathLexer.h
│ │ │ ├── XPathLexer.tokens
│ │ │ ├── XPathLexerErrorListener.cpp
│ │ │ ├── XPathLexerErrorListener.h
│ │ │ ├── XPathRuleAnywhereElement.cpp
│ │ │ ├── XPathRuleAnywhereElement.h
│ │ │ ├── XPathRuleElement.cpp
│ │ │ ├── XPathRuleElement.h
│ │ │ ├── XPathTokenAnywhereElement.cpp
│ │ │ ├── XPathTokenAnywhereElement.h
│ │ │ ├── XPathTokenElement.cpp
│ │ │ ├── XPathTokenElement.h
│ │ │ ├── XPathWildcardAnywhereElement.cpp
│ │ │ ├── XPathWildcardAnywhereElement.h
│ │ │ ├── XPathWildcardElement.cpp
│ │ │ └── XPathWildcardElement.h
│ │ └── tests/
│ │ └── Utf8Test.cpp
│ ├── Dart/
│ │ ├── .gitignore
│ │ ├── LICENSE
│ │ ├── README.md
│ │ ├── analysis_options.yaml
│ │ ├── benchmark/
│ │ │ └── src/
│ │ │ └── util/
│ │ │ └── bit_set.dart
│ │ ├── lib/
│ │ │ ├── antlr4.dart
│ │ │ └── src/
│ │ │ ├── atn/
│ │ │ │ ├── atn.dart
│ │ │ │ └── src/
│ │ │ │ ├── atn.dart
│ │ │ │ ├── atn_config.dart
│ │ │ │ ├── atn_config_set.dart
│ │ │ │ ├── atn_deserializer.dart
│ │ │ │ ├── atn_simulator.dart
│ │ │ │ ├── atn_state.dart
│ │ │ │ ├── atn_type.dart
│ │ │ │ ├── info.dart
│ │ │ │ ├── lexer_action.dart
│ │ │ │ ├── lexer_action_executor.dart
│ │ │ │ ├── lexer_atn_simulator.dart
│ │ │ │ ├── parser_atn_simulator.dart
│ │ │ │ ├── profiling_atn_simulator.dart
│ │ │ │ ├── semantic_context.dart
│ │ │ │ └── transition.dart
│ │ │ ├── dfa/
│ │ │ │ ├── dfa.dart
│ │ │ │ └── src/
│ │ │ │ ├── dfa.dart
│ │ │ │ ├── dfa_serializer.dart
│ │ │ │ └── dfa_state.dart
│ │ │ ├── error/
│ │ │ │ ├── error.dart
│ │ │ │ └── src/
│ │ │ │ ├── diagnostic_error_listener.dart
│ │ │ │ ├── error_listener.dart
│ │ │ │ ├── error_strategy.dart
│ │ │ │ └── errors.dart
│ │ │ ├── input_stream.dart
│ │ │ ├── interval_set.dart
│ │ │ ├── lexer.dart
│ │ │ ├── ll1_analyzer.dart
│ │ │ ├── misc/
│ │ │ │ ├── misc.dart
│ │ │ │ └── src/
│ │ │ │ ├── multi_map.dart
│ │ │ │ └── pair.dart
│ │ │ ├── parser.dart
│ │ │ ├── parser_interpreter.dart
│ │ │ ├── parser_rule_context.dart
│ │ │ ├── prediction_context.dart
│ │ │ ├── recognizer.dart
│ │ │ ├── rule_context.dart
│ │ │ ├── runtime_meta_data.dart
│ │ │ ├── token.dart
│ │ │ ├── token_factory.dart
│ │ │ ├── token_source.dart
│ │ │ ├── token_stream.dart
│ │ │ ├── tree/
│ │ │ │ ├── src/
│ │ │ │ │ ├── pattern/
│ │ │ │ │ │ ├── chunk.dart
│ │ │ │ │ │ └── parse_tree_match.dart
│ │ │ │ │ ├── tree.dart
│ │ │ │ │ └── trees.dart
│ │ │ │ └── tree.dart
│ │ │ ├── util/
│ │ │ │ ├── bit_operation_util.dart
│ │ │ │ ├── bit_operation_util_html.dart
│ │ │ │ ├── bit_set.dart
│ │ │ │ ├── murmur_hash.dart
│ │ │ │ ├── platform_html.dart
│ │ │ │ ├── platform_io.dart
│ │ │ │ ├── platform_stub.dart
│ │ │ │ └── utils.dart
│ │ │ └── vocabulary.dart
│ │ ├── pubspec.yaml
│ │ └── test/
│ │ └── src/
│ │ └── util/
│ │ └── bit_set_test.dart
│ ├── Go/
│ │ └── antlr/
│ │ ├── README.adoc
│ │ └── v4/
│ │ ├── LICENSE
│ │ ├── antlrdoc.go
│ │ ├── atn.go
│ │ ├── atn_config.go
│ │ ├── atn_config_set.go
│ │ ├── atn_deserialization_options.go
│ │ ├── atn_deserializer.go
│ │ ├── atn_simulator.go
│ │ ├── atn_state.go
│ │ ├── atn_type.go
│ │ ├── char_stream.go
│ │ ├── common_token_factory.go
│ │ ├── common_token_stream.go
│ │ ├── comparators.go
│ │ ├── configuration.go
│ │ ├── dfa.go
│ │ ├── dfa_serializer.go
│ │ ├── dfa_state.go
│ │ ├── diagnostic_error_listener.go
│ │ ├── error_listener.go
│ │ ├── error_strategy.go
│ │ ├── errors.go
│ │ ├── file_stream.go
│ │ ├── go.mod
│ │ ├── go.sum
│ │ ├── input_stream.go
│ │ ├── int_stream.go
│ │ ├── interval_set.go
│ │ ├── jcollect.go
│ │ ├── lexer.go
│ │ ├── lexer_action.go
│ │ ├── lexer_action_executor.go
│ │ ├── lexer_atn_simulator.go
│ │ ├── ll1_analyzer.go
│ │ ├── mutex.go
│ │ ├── mutex_nomutex.go
│ │ ├── nostatistics.go
│ │ ├── parser.go
│ │ ├── parser_atn_simulator.go
│ │ ├── parser_rule_context.go
│ │ ├── prediction_context.go
│ │ ├── prediction_context_cache.go
│ │ ├── prediction_mode.go
│ │ ├── recognizer.go
│ │ ├── rule_context.go
│ │ ├── semantic_context.go
│ │ ├── statistics.go
│ │ ├── stats_data.go
│ │ ├── token.go
│ │ ├── token_source.go
│ │ ├── token_stream.go
│ │ ├── tokenstream_rewriter.go
│ │ ├── trace_listener.go
│ │ ├── transition.go
│ │ ├── tree.go
│ │ ├── trees.go
│ │ └── utils.go
│ ├── Java/
│ │ ├── doxyfile
│ │ ├── nb-configuration.xml
│ │ ├── pom.xml
│ │ └── src/
│ │ ├── main/
│ │ │ └── dot/
│ │ │ └── org/
│ │ │ └── antlr/
│ │ │ └── v4/
│ │ │ └── runtime/
│ │ │ └── atn/
│ │ │ └── images/
│ │ │ ├── ArrayMerge_DiffTopDiffPar.dot
│ │ │ ├── ArrayMerge_EqualTop.dot
│ │ │ ├── ArrayMerge_ShareTopDiffPar.dot
│ │ │ ├── ArrayMerge_ShareTopSamePar.dot
│ │ │ ├── ArrayMerge_ShareTopSharePar.dot
│ │ │ ├── Block.dot
│ │ │ ├── ClosureGreedy.dot
│ │ │ ├── ClosureNonGreedy.dot
│ │ │ ├── FullMerge_EmptyRoot.dot
│ │ │ ├── FullMerge_EmptyRoots.dot
│ │ │ ├── FullMerge_SameRoot.dot
│ │ │ ├── LocalMerge_DiffRoots.dot
│ │ │ ├── LocalMerge_EmptyParent.dot
│ │ │ ├── LocalMerge_EmptyRoot.dot
│ │ │ ├── OptionalGreedy.dot
│ │ │ ├── OptionalNonGreedy.dot
│ │ │ ├── PositiveClosureGreedy.dot
│ │ │ ├── PositiveClosureNonGreedy.dot
│ │ │ ├── Rule.dot
│ │ │ ├── SingletonMerge_DiffRootDiffPar.dot
│ │ │ ├── SingletonMerge_DiffRootSamePar.dot
│ │ │ ├── SingletonMerge_SameRootDiffPar.dot
│ │ │ └── SingletonMerge_SameRootSamePar.dot
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── runtime/
│ │ ├── ANTLRErrorListener.java
│ │ ├── ANTLRErrorStrategy.java
│ │ ├── ANTLRFileStream.java
│ │ ├── ANTLRInputStream.java
│ │ ├── BailErrorStrategy.java
│ │ ├── BaseErrorListener.java
│ │ ├── BufferedTokenStream.java
│ │ ├── CharStream.java
│ │ ├── CharStreams.java
│ │ ├── CodePointBuffer.java
│ │ ├── CodePointCharStream.java
│ │ ├── CommonToken.java
│ │ ├── CommonTokenFactory.java
│ │ ├── CommonTokenStream.java
│ │ ├── ConsoleErrorListener.java
│ │ ├── DefaultErrorStrategy.java
│ │ ├── DiagnosticErrorListener.java
│ │ ├── FailedPredicateException.java
│ │ ├── InputMismatchException.java
│ │ ├── IntStream.java
│ │ ├── InterpreterRuleContext.java
│ │ ├── Lexer.java
│ │ ├── LexerInterpreter.java
│ │ ├── LexerNoViableAltException.java
│ │ ├── ListTokenSource.java
│ │ ├── NoViableAltException.java
│ │ ├── Parser.java
│ │ ├── ParserInterpreter.java
│ │ ├── ParserRuleContext.java
│ │ ├── ProxyErrorListener.java
│ │ ├── RecognitionException.java
│ │ ├── Recognizer.java
│ │ ├── RuleContext.java
│ │ ├── RuleContextWithAltNum.java
│ │ ├── RuntimeMetaData.java
│ │ ├── Token.java
│ │ ├── TokenFactory.java
│ │ ├── TokenSource.java
│ │ ├── TokenStream.java
│ │ ├── TokenStreamRewriter.java
│ │ ├── UnbufferedCharStream.java
│ │ ├── UnbufferedTokenStream.java
│ │ ├── Vocabulary.java
│ │ ├── VocabularyImpl.java
│ │ ├── WritableToken.java
│ │ ├── atn/
│ │ │ ├── ATN.java
│ │ │ ├── ATNConfig.java
│ │ │ ├── ATNConfigSet.java
│ │ │ ├── ATNDeserializationOptions.java
│ │ │ ├── ATNDeserializer.java
│ │ │ ├── ATNSerializer.java
│ │ │ ├── ATNSimulator.java
│ │ │ ├── ATNState.java
│ │ │ ├── ATNType.java
│ │ │ ├── AbstractPredicateTransition.java
│ │ │ ├── ActionTransition.java
│ │ │ ├── AmbiguityInfo.java
│ │ │ ├── ArrayPredictionContext.java
│ │ │ ├── AtomTransition.java
│ │ │ ├── BasicBlockStartState.java
│ │ │ ├── BasicState.java
│ │ │ ├── BlockEndState.java
│ │ │ ├── BlockStartState.java
│ │ │ ├── CodePointTransitions.java
│ │ │ ├── ContextSensitivityInfo.java
│ │ │ ├── DecisionEventInfo.java
│ │ │ ├── DecisionInfo.java
│ │ │ ├── DecisionState.java
│ │ │ ├── EmptyPredictionContext.java
│ │ │ ├── EpsilonTransition.java
│ │ │ ├── ErrorInfo.java
│ │ │ ├── LL1Analyzer.java
│ │ │ ├── LexerATNConfig.java
│ │ │ ├── LexerATNSimulator.java
│ │ │ ├── LexerAction.java
│ │ │ ├── LexerActionExecutor.java
│ │ │ ├── LexerActionType.java
│ │ │ ├── LexerChannelAction.java
│ │ │ ├── LexerCustomAction.java
│ │ │ ├── LexerIndexedCustomAction.java
│ │ │ ├── LexerModeAction.java
│ │ │ ├── LexerMoreAction.java
│ │ │ ├── LexerPopModeAction.java
│ │ │ ├── LexerPushModeAction.java
│ │ │ ├── LexerSkipAction.java
│ │ │ ├── LexerTypeAction.java
│ │ │ ├── LookaheadEventInfo.java
│ │ │ ├── LoopEndState.java
│ │ │ ├── NotSetTransition.java
│ │ │ ├── OrderedATNConfigSet.java
│ │ │ ├── ParseInfo.java
│ │ │ ├── ParserATNSimulator.java
│ │ │ ├── PlusBlockStartState.java
│ │ │ ├── PlusLoopbackState.java
│ │ │ ├── PrecedencePredicateTransition.java
│ │ │ ├── PredicateEvalInfo.java
│ │ │ ├── PredicateTransition.java
│ │ │ ├── PredictionContext.java
│ │ │ ├── PredictionContextCache.java
│ │ │ ├── PredictionMode.java
│ │ │ ├── ProfilingATNSimulator.java
│ │ │ ├── RangeTransition.java
│ │ │ ├── RuleStartState.java
│ │ │ ├── RuleStopState.java
│ │ │ ├── RuleTransition.java
│ │ │ ├── SemanticContext.java
│ │ │ ├── SetTransition.java
│ │ │ ├── SingletonPredictionContext.java
│ │ │ ├── StarBlockStartState.java
│ │ │ ├── StarLoopEntryState.java
│ │ │ ├── StarLoopbackState.java
│ │ │ ├── TokensStartState.java
│ │ │ ├── Transition.java
│ │ │ └── WildcardTransition.java
│ │ ├── dfa/
│ │ │ ├── DFA.java
│ │ │ ├── DFASerializer.java
│ │ │ ├── DFAState.java
│ │ │ └── LexerDFASerializer.java
│ │ ├── misc/
│ │ │ ├── AbstractEqualityComparator.java
│ │ │ ├── Array2DHashSet.java
│ │ │ ├── DoubleKeyMap.java
│ │ │ ├── EqualityComparator.java
│ │ │ ├── FlexibleHashMap.java
│ │ │ ├── IntSet.java
│ │ │ ├── IntegerList.java
│ │ │ ├── IntegerStack.java
│ │ │ ├── InterpreterDataReader.java
│ │ │ ├── Interval.java
│ │ │ ├── IntervalSet.java
│ │ │ ├── LogManager.java
│ │ │ ├── MultiMap.java
│ │ │ ├── MurmurHash.java
│ │ │ ├── NotNull.java
│ │ │ ├── ObjectEqualityComparator.java
│ │ │ ├── OrderedHashSet.java
│ │ │ ├── Pair.java
│ │ │ ├── ParseCancellationException.java
│ │ │ ├── Predicate.java
│ │ │ ├── TestRig.java
│ │ │ ├── Triple.java
│ │ │ └── Utils.java
│ │ └── tree/
│ │ ├── AbstractParseTreeVisitor.java
│ │ ├── ErrorNode.java
│ │ ├── ErrorNodeImpl.java
│ │ ├── IterativeParseTreeWalker.java
│ │ ├── ParseTree.java
│ │ ├── ParseTreeListener.java
│ │ ├── ParseTreeProperty.java
│ │ ├── ParseTreeVisitor.java
│ │ ├── ParseTreeWalker.java
│ │ ├── RuleNode.java
│ │ ├── SyntaxTree.java
│ │ ├── TerminalNode.java
│ │ ├── TerminalNodeImpl.java
│ │ ├── Tree.java
│ │ ├── Trees.java
│ │ ├── pattern/
│ │ │ ├── Chunk.java
│ │ │ ├── ParseTreeMatch.java
│ │ │ ├── ParseTreePattern.java
│ │ │ ├── ParseTreePatternMatcher.java
│ │ │ ├── RuleTagToken.java
│ │ │ ├── TagChunk.java
│ │ │ ├── TextChunk.java
│ │ │ └── TokenTagToken.java
│ │ └── xpath/
│ │ ├── XPath.java
│ │ ├── XPathElement.java
│ │ ├── XPathLexer.java
│ │ ├── XPathLexerErrorListener.java
│ │ ├── XPathRuleAnywhereElement.java
│ │ ├── XPathRuleElement.java
│ │ ├── XPathTokenAnywhereElement.java
│ │ ├── XPathTokenElement.java
│ │ ├── XPathWildcardAnywhereElement.java
│ │ └── XPathWildcardElement.java
│ ├── JavaScript/
│ │ ├── .babelrc
│ │ ├── .c8rc.json
│ │ ├── .eslintignore
│ │ ├── .eslintrc.yml
│ │ ├── .gitignore
│ │ ├── README.md
│ │ ├── package.json
│ │ ├── spec/
│ │ │ ├── BitSetSpec.js
│ │ │ ├── HashMapSpec.js
│ │ │ ├── HashSetSpec.js
│ │ │ ├── IntervalSetSpec.js
│ │ │ ├── helpers/
│ │ │ │ └── Reporter.js
│ │ │ ├── imports/
│ │ │ │ ├── NodeCommonJSImportSpec.cjs
│ │ │ │ ├── NodeEsmImportSpec.mjs
│ │ │ │ └── builds/
│ │ │ │ ├── node-cjs-ts/
│ │ │ │ │ ├── .gitignore
│ │ │ │ │ ├── index.ts
│ │ │ │ │ ├── package.json
│ │ │ │ │ ├── test.sh
│ │ │ │ │ └── tsconfig.node.commonjs.json
│ │ │ │ └── node-esm-ts/
│ │ │ │ ├── .gitignore
│ │ │ │ ├── index.ts
│ │ │ │ ├── package.json
│ │ │ │ ├── test.sh
│ │ │ │ ├── tsconfig.bundler.es2022.json
│ │ │ │ └── tsconfig.node16.json
│ │ │ ├── rewriter/
│ │ │ │ ├── Makefile
│ │ │ │ ├── TokenStreamRewriterSpec.js
│ │ │ │ ├── abc.g4
│ │ │ │ ├── calc.g4
│ │ │ │ └── generatedCode/
│ │ │ │ ├── abc.js
│ │ │ │ └── calc.js
│ │ │ └── support/
│ │ │ └── jasmine.json
│ │ ├── src/
│ │ │ └── antlr4/
│ │ │ ├── BufferedTokenStream.d.ts
│ │ │ ├── BufferedTokenStream.js
│ │ │ ├── CharStream.d.ts
│ │ │ ├── CharStream.js
│ │ │ ├── CharStreams.d.ts
│ │ │ ├── CharStreams.js
│ │ │ ├── CommonToken.d.ts
│ │ │ ├── CommonToken.js
│ │ │ ├── CommonTokenFactory.js
│ │ │ ├── CommonTokenStream.d.ts
│ │ │ ├── CommonTokenStream.js
│ │ │ ├── FileStream.d.ts
│ │ │ ├── FileStream.js
│ │ │ ├── InputStream.d.ts
│ │ │ ├── InputStream.js
│ │ │ ├── Lexer.d.ts
│ │ │ ├── Lexer.js
│ │ │ ├── Parser.d.ts
│ │ │ ├── Parser.js
│ │ │ ├── Recognizer.d.ts
│ │ │ ├── Recognizer.js
│ │ │ ├── Token.d.ts
│ │ │ ├── Token.js
│ │ │ ├── TokenSource.d.ts
│ │ │ ├── TokenSource.js
│ │ │ ├── TokenStream.d.ts
│ │ │ ├── TokenStream.js
│ │ │ ├── TokenStreamRewriter.d.ts
│ │ │ ├── TokenStreamRewriter.js
│ │ │ ├── TraceListener.js
│ │ │ ├── action/
│ │ │ │ ├── LexerAction.js
│ │ │ │ ├── LexerChannelAction.js
│ │ │ │ ├── LexerCustomAction.js
│ │ │ │ ├── LexerIndexedCustomAction.js
│ │ │ │ ├── LexerModeAction.js
│ │ │ │ ├── LexerMoreAction.js
│ │ │ │ ├── LexerPopModeAction.js
│ │ │ │ ├── LexerPushModeAction.js
│ │ │ │ ├── LexerSkipAction.js
│ │ │ │ └── LexerTypeAction.js
│ │ │ ├── atn/
│ │ │ │ ├── ATN.d.ts
│ │ │ │ ├── ATN.js
│ │ │ │ ├── ATNConfig.d.ts
│ │ │ │ ├── ATNConfig.js
│ │ │ │ ├── ATNConfigSet.d.ts
│ │ │ │ ├── ATNConfigSet.js
│ │ │ │ ├── ATNDeserializationOptions.d.ts
│ │ │ │ ├── ATNDeserializationOptions.js
│ │ │ │ ├── ATNDeserializer.d.ts
│ │ │ │ ├── ATNDeserializer.js
│ │ │ │ ├── ATNSimulator.d.ts
│ │ │ │ ├── ATNSimulator.js
│ │ │ │ ├── ATNType.js
│ │ │ │ ├── AbstractPredicateTransition.js
│ │ │ │ ├── LL1Analyzer.js
│ │ │ │ ├── LexerATNConfig.js
│ │ │ │ ├── LexerATNSimulator.d.ts
│ │ │ │ ├── LexerATNSimulator.js
│ │ │ │ ├── LexerActionExecutor.js
│ │ │ │ ├── LexerActionType.js
│ │ │ │ ├── OrderedATNConfigSet.js
│ │ │ │ ├── ParserATNSimulator.d.ts
│ │ │ │ ├── ParserATNSimulator.js
│ │ │ │ ├── PrecedencePredicate.js
│ │ │ │ ├── Predicate.js
│ │ │ │ ├── PredictionContextCache.d.ts
│ │ │ │ ├── PredictionContextCache.js
│ │ │ │ ├── PredictionMode.d.ts
│ │ │ │ ├── PredictionMode.js
│ │ │ │ ├── SemanticContext.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── context/
│ │ │ │ ├── ArrayPredictionContext.js
│ │ │ │ ├── EmptyPredictionContext.js
│ │ │ │ ├── InterpreterRuleContext.js
│ │ │ │ ├── ParserRuleContext.d.ts
│ │ │ │ ├── ParserRuleContext.js
│ │ │ │ ├── PredictionContext.js
│ │ │ │ ├── PredictionContextUtils.js
│ │ │ │ ├── RuleContext.d.ts
│ │ │ │ ├── RuleContext.js
│ │ │ │ ├── SingletonPredictionContext.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.d.ts
│ │ │ │ ├── DFA.js
│ │ │ │ ├── DFASerializer.js
│ │ │ │ ├── DFAState.js
│ │ │ │ ├── LexerDFASerializer.js
│ │ │ │ ├── PredPrediction.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── error/
│ │ │ │ ├── BailErrorStrategy.d.ts
│ │ │ │ ├── BailErrorStrategy.js
│ │ │ │ ├── ConsoleErrorListener.js
│ │ │ │ ├── DefaultErrorStrategy.d.ts
│ │ │ │ ├── DefaultErrorStrategy.js
│ │ │ │ ├── DiagnosticErrorListener.d.ts
│ │ │ │ ├── DiagnosticErrorListener.js
│ │ │ │ ├── ErrorListener.d.ts
│ │ │ │ ├── ErrorListener.js
│ │ │ │ ├── ErrorStrategy.d.ts
│ │ │ │ ├── ErrorStrategy.js
│ │ │ │ ├── FailedPredicateException.d.ts
│ │ │ │ ├── FailedPredicateException.js
│ │ │ │ ├── InputMismatchException.d.ts
│ │ │ │ ├── InputMismatchException.js
│ │ │ │ ├── LexerNoViableAltException.d.ts
│ │ │ │ ├── LexerNoViableAltException.js
│ │ │ │ ├── NoViableAltException.d.ts
│ │ │ │ ├── NoViableAltException.js
│ │ │ │ ├── ParseCancellationException.js
│ │ │ │ ├── ProxyErrorListener.js
│ │ │ │ ├── RecognitionException.d.ts
│ │ │ │ ├── RecognitionException.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── index.d.cts
│ │ │ ├── index.node.js
│ │ │ ├── index.web.js
│ │ │ ├── misc/
│ │ │ │ ├── AltDict.js
│ │ │ │ ├── BitSet.d.ts
│ │ │ │ ├── BitSet.js
│ │ │ │ ├── HashCode.js
│ │ │ │ ├── HashMap.js
│ │ │ │ ├── HashSet.js
│ │ │ │ ├── Interval.d.ts
│ │ │ │ ├── Interval.js
│ │ │ │ ├── IntervalSet.d.ts
│ │ │ │ ├── IntervalSet.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ ├── state/
│ │ │ │ ├── ATNState.d.ts
│ │ │ │ ├── ATNState.js
│ │ │ │ ├── BasicBlockStartState.js
│ │ │ │ ├── BasicState.js
│ │ │ │ ├── BlockEndState.js
│ │ │ │ ├── BlockStartState.js
│ │ │ │ ├── DecisionState.d.ts
│ │ │ │ ├── DecisionState.js
│ │ │ │ ├── LoopEndState.js
│ │ │ │ ├── PlusBlockStartState.js
│ │ │ │ ├── PlusLoopbackState.js
│ │ │ │ ├── RuleStartState.d.ts
│ │ │ │ ├── RuleStartState.js
│ │ │ │ ├── RuleStopState.d.ts
│ │ │ │ ├── RuleStopState.js
│ │ │ │ ├── StarBlockStartState.js
│ │ │ │ ├── StarLoopEntryState.js
│ │ │ │ ├── StarLoopbackState.js
│ │ │ │ ├── TokensStartState.js
│ │ │ │ └── index.d.ts
│ │ │ ├── transition/
│ │ │ │ ├── ActionTransition.js
│ │ │ │ ├── AtomTransition.js
│ │ │ │ ├── EpsilonTransition.js
│ │ │ │ ├── NotSetTransition.js
│ │ │ │ ├── PrecedencePredicateTransition.js
│ │ │ │ ├── PredicateTransition.js
│ │ │ │ ├── RangeTransition.js
│ │ │ │ ├── RuleTransition.js
│ │ │ │ ├── SetTransition.js
│ │ │ │ ├── Transition.js
│ │ │ │ └── WildcardTransition.js
│ │ │ ├── tree/
│ │ │ │ ├── ErrorNode.d.ts
│ │ │ │ ├── ErrorNode.js
│ │ │ │ ├── ErrorNodeImpl.js
│ │ │ │ ├── ParseTree.d.ts
│ │ │ │ ├── ParseTree.js
│ │ │ │ ├── ParseTreeListener.d.ts
│ │ │ │ ├── ParseTreeListener.js
│ │ │ │ ├── ParseTreeVisitor.d.ts
│ │ │ │ ├── ParseTreeVisitor.js
│ │ │ │ ├── ParseTreeWalker.d.ts
│ │ │ │ ├── ParseTreeWalker.js
│ │ │ │ ├── RuleNode.d.ts
│ │ │ │ ├── RuleNode.js
│ │ │ │ ├── SyntaxTree.d.ts
│ │ │ │ ├── SyntaxTree.js
│ │ │ │ ├── TerminalNode.d.ts
│ │ │ │ ├── TerminalNode.js
│ │ │ │ ├── TerminalNodeImpl.js
│ │ │ │ ├── Tree.d.ts
│ │ │ │ ├── Tree.js
│ │ │ │ ├── Trees.d.ts
│ │ │ │ ├── Trees.js
│ │ │ │ ├── index.d.ts
│ │ │ │ └── index.js
│ │ │ └── utils/
│ │ │ ├── DoubleDict.js
│ │ │ ├── Printer.d.ts
│ │ │ ├── arrayToString.d.ts
│ │ │ ├── arrayToString.js
│ │ │ ├── equalArrays.js
│ │ │ ├── escapeWhitespace.js
│ │ │ ├── index.d.ts
│ │ │ ├── index.js
│ │ │ ├── standardEqualsFunction.js
│ │ │ ├── standardHashCodeFunction.js
│ │ │ ├── stringHashCode.js
│ │ │ ├── stringToCharArray.d.ts
│ │ │ ├── stringToCharArray.js
│ │ │ ├── titleCase.js
│ │ │ └── valueToString.js
│ │ ├── test-builds.sh
│ │ ├── tsconfig.json
│ │ └── webpack.config.js
│ ├── Python3/
│ │ ├── MANIFEST.in
│ │ ├── README.txt
│ │ ├── RELEASE-4.5.txt
│ │ ├── pyproject.toml
│ │ ├── src/
│ │ │ └── antlr4/
│ │ │ ├── BufferedTokenStream.py
│ │ │ ├── CommonTokenFactory.py
│ │ │ ├── CommonTokenStream.py
│ │ │ ├── FileStream.py
│ │ │ ├── InputStream.py
│ │ │ ├── IntervalSet.py
│ │ │ ├── LL1Analyzer.py
│ │ │ ├── Lexer.py
│ │ │ ├── ListTokenSource.py
│ │ │ ├── Parser.py
│ │ │ ├── ParserInterpreter.py
│ │ │ ├── ParserRuleContext.py
│ │ │ ├── PredictionContext.py
│ │ │ ├── Recognizer.py
│ │ │ ├── RuleContext.py
│ │ │ ├── StdinStream.py
│ │ │ ├── Token.py
│ │ │ ├── TokenStreamRewriter.py
│ │ │ ├── Utils.py
│ │ │ ├── __init__.py
│ │ │ ├── _pygrun.py
│ │ │ ├── atn/
│ │ │ │ ├── ATN.py
│ │ │ │ ├── ATNConfig.py
│ │ │ │ ├── ATNConfigSet.py
│ │ │ │ ├── ATNDeserializationOptions.py
│ │ │ │ ├── ATNDeserializer.py
│ │ │ │ ├── ATNSimulator.py
│ │ │ │ ├── ATNState.py
│ │ │ │ ├── ATNType.py
│ │ │ │ ├── LexerATNSimulator.py
│ │ │ │ ├── LexerAction.py
│ │ │ │ ├── LexerActionExecutor.py
│ │ │ │ ├── ParserATNSimulator.py
│ │ │ │ ├── PredictionMode.py
│ │ │ │ ├── SemanticContext.py
│ │ │ │ ├── Transition.py
│ │ │ │ └── __init__.py
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.py
│ │ │ │ ├── DFASerializer.py
│ │ │ │ ├── DFAState.py
│ │ │ │ └── __init__.py
│ │ │ ├── error/
│ │ │ │ ├── DiagnosticErrorListener.py
│ │ │ │ ├── ErrorListener.py
│ │ │ │ ├── ErrorStrategy.py
│ │ │ │ ├── Errors.py
│ │ │ │ └── __init__.py
│ │ │ ├── tree/
│ │ │ │ ├── Chunk.py
│ │ │ │ ├── ParseTreeMatch.py
│ │ │ │ ├── ParseTreePattern.py
│ │ │ │ ├── ParseTreePatternMatcher.py
│ │ │ │ ├── RuleTagToken.py
│ │ │ │ ├── TokenTagToken.py
│ │ │ │ ├── Tree.py
│ │ │ │ ├── Trees.py
│ │ │ │ └── __init__.py
│ │ │ └── xpath/
│ │ │ ├── XPath.py
│ │ │ ├── XPathLexer.g4
│ │ │ ├── XPathLexer.py
│ │ │ └── __init__.py
│ │ └── tests/
│ │ ├── TestFileStream.py
│ │ ├── TestInputStream.py
│ │ ├── TestIntervalSet.py
│ │ ├── TestRecognizer.py
│ │ ├── TestTokenStreamRewriter.py
│ │ ├── __init__.py
│ │ ├── c.c
│ │ ├── ctest.py
│ │ ├── expr/
│ │ │ ├── Expr.g4
│ │ │ ├── ExprLexer.py
│ │ │ └── ExprParser.py
│ │ ├── mocks/
│ │ │ ├── TestLexer.py
│ │ │ └── __init__.py
│ │ ├── parser/
│ │ │ ├── __init__.py
│ │ │ ├── clexer.py
│ │ │ └── cparser.py
│ │ ├── run.py
│ │ └── xpathtest.py
│ └── Swift/
│ ├── .gitignore
│ ├── Sources/
│ │ ├── Antlr4/
│ │ │ ├── ANTLRErrorListener.swift
│ │ │ ├── ANTLRErrorStrategy.swift
│ │ │ ├── ANTLRFileStream.swift
│ │ │ ├── ANTLRInputStream.swift
│ │ │ ├── BailErrorStrategy.swift
│ │ │ ├── BaseErrorListener.swift
│ │ │ ├── BufferedTokenStream.swift
│ │ │ ├── CharStream.swift
│ │ │ ├── CommonToken.swift
│ │ │ ├── CommonTokenFactory.swift
│ │ │ ├── CommonTokenStream.swift
│ │ │ ├── ConsoleErrorListener.swift
│ │ │ ├── DefaultErrorStrategy.swift
│ │ │ ├── DiagnosticErrorListener.swift
│ │ │ ├── FailedPredicateException.swift
│ │ │ ├── InputMismatchException.swift
│ │ │ ├── IntStream.swift
│ │ │ ├── InterpreterRuleContext.swift
│ │ │ ├── Lexer.swift
│ │ │ ├── LexerInterpreter.swift
│ │ │ ├── LexerNoViableAltException.swift
│ │ │ ├── ListTokenSource.swift
│ │ │ ├── NoViableAltException.swift
│ │ │ ├── Parser.swift
│ │ │ ├── ParserInterpreter.swift
│ │ │ ├── ParserRuleContext.swift
│ │ │ ├── ProxyErrorListener.swift
│ │ │ ├── RecognitionException.swift
│ │ │ ├── Recognizer.swift
│ │ │ ├── RuleContext.swift
│ │ │ ├── RuntimeMetaData.swift
│ │ │ ├── Token.swift
│ │ │ ├── TokenFactory.swift
│ │ │ ├── TokenSource.swift
│ │ │ ├── TokenStream.swift
│ │ │ ├── TokenStreamRewriter.swift
│ │ │ ├── UnbufferedCharStream.swift
│ │ │ ├── UnbufferedTokenStream.swift
│ │ │ ├── VocabularySingle.swift
│ │ │ ├── WritableToken.swift
│ │ │ ├── atn/
│ │ │ │ ├── ATN.swift
│ │ │ │ ├── ATNConfig.swift
│ │ │ │ ├── ATNConfigSet.swift
│ │ │ │ ├── ATNDeserializationOptions.swift
│ │ │ │ ├── ATNDeserializer.swift
│ │ │ │ ├── ATNSimulator.swift
│ │ │ │ ├── ATNState.swift
│ │ │ │ ├── ATNType.swift
│ │ │ │ ├── AbstractPredicateTransition.swift
│ │ │ │ ├── ActionTransition.swift
│ │ │ │ ├── AmbiguityInfo.swift
│ │ │ │ ├── ArrayPredictionContext.swift
│ │ │ │ ├── AtomTransition.swift
│ │ │ │ ├── BasicBlockStartState.swift
│ │ │ │ ├── BasicState.swift
│ │ │ │ ├── BlockEndState.swift
│ │ │ │ ├── BlockStartState.swift
│ │ │ │ ├── ContextSensitivityInfo.swift
│ │ │ │ ├── DecisionEventInfo.swift
│ │ │ │ ├── DecisionInfo.swift
│ │ │ │ ├── DecisionState.swift
│ │ │ │ ├── DefaultATNConfig.swift
│ │ │ │ ├── EmptyPredictionContext.swift
│ │ │ │ ├── EpsilonTransition.swift
│ │ │ │ ├── ErrorInfo.swift
│ │ │ │ ├── LL1Analyzer.swift
│ │ │ │ ├── LexerATNConfig.swift
│ │ │ │ ├── LexerATNSimulator.swift
│ │ │ │ ├── LexerAction.swift
│ │ │ │ ├── LexerActionExecutor.swift
│ │ │ │ ├── LexerActionType.swift
│ │ │ │ ├── LexerChannelAction.swift
│ │ │ │ ├── LexerCustomAction.swift
│ │ │ │ ├── LexerIndexedCustomAction.swift
│ │ │ │ ├── LexerModeAction.swift
│ │ │ │ ├── LexerMoreAction.swift
│ │ │ │ ├── LexerPopModeAction.swift
│ │ │ │ ├── LexerPushModeAction.swift
│ │ │ │ ├── LexerSkipAction.swift
│ │ │ │ ├── LexerTypeAction.swift
│ │ │ │ ├── LookaheadEventInfo.swift
│ │ │ │ ├── LookupATNConfig.swift
│ │ │ │ ├── LookupDictionary.swift
│ │ │ │ ├── LoopEndState.swift
│ │ │ │ ├── NotSetTransition.swift
│ │ │ │ ├── ParseInfo.swift
│ │ │ │ ├── ParserATNSimulator.swift
│ │ │ │ ├── PlusBlockStartState.swift
│ │ │ │ ├── PlusLoopbackState.swift
│ │ │ │ ├── PrecedencePredicateTransition.swift
│ │ │ │ ├── PredicateEvalInfo.swift
│ │ │ │ ├── PredicateTransition.swift
│ │ │ │ ├── PredictionContext.swift
│ │ │ │ ├── PredictionContextCache.swift
│ │ │ │ ├── PredictionMode.swift
│ │ │ │ ├── ProfilingATNSimulator.swift
│ │ │ │ ├── RangeTransition.swift
│ │ │ │ ├── RuleStartState.swift
│ │ │ │ ├── RuleStopState.swift
│ │ │ │ ├── RuleTransition.swift
│ │ │ │ ├── SemanticContext.swift
│ │ │ │ ├── SetTransition.swift
│ │ │ │ ├── SingletonPredictionContext.swift
│ │ │ │ ├── StarBlockStartState.swift
│ │ │ │ ├── StarLoopEntryState.swift
│ │ │ │ ├── StarLoopbackState.swift
│ │ │ │ ├── TokensStartState.swift
│ │ │ │ ├── Transition.swift
│ │ │ │ └── WildcardTransition.swift
│ │ │ ├── dfa/
│ │ │ │ ├── DFA.swift
│ │ │ │ ├── DFASerializer.swift
│ │ │ │ ├── DFAState.swift
│ │ │ │ └── LexerDFASerializer.swift
│ │ │ ├── misc/
│ │ │ │ ├── BitSet.swift
│ │ │ │ ├── DoubleKeyMap.swift
│ │ │ │ ├── IntSet.swift
│ │ │ │ ├── InterpreterDataReader.swift
│ │ │ │ ├── Interval.swift
│ │ │ │ ├── IntervalSet.swift
│ │ │ │ ├── MultiMap.swift
│ │ │ │ ├── MurmurHash.swift
│ │ │ │ ├── Utils.swift
│ │ │ │ ├── exception/
│ │ │ │ │ ├── ANTLRError.swift
│ │ │ │ │ └── ANTLRException.swift
│ │ │ │ ├── extension/
│ │ │ │ │ ├── ArrayExtension.swift
│ │ │ │ │ ├── CharacterExtension.swift
│ │ │ │ │ ├── IntStreamExtension.swift
│ │ │ │ │ ├── StringExtension.swift
│ │ │ │ │ ├── TokenExtension.swift
│ │ │ │ │ └── UUIDExtension.swift
│ │ │ │ └── utils/
│ │ │ │ ├── CommonUtil.swift
│ │ │ │ ├── Mutex.swift
│ │ │ │ └── Stack.swift
│ │ │ └── tree/
│ │ │ ├── AbstractParseTreeVisitor.swift
│ │ │ ├── ErrorNode.swift
│ │ │ ├── ParseTree.swift
│ │ │ ├── ParseTreeListener.swift
│ │ │ ├── ParseTreeProperty.swift
│ │ │ ├── ParseTreeVisitor.swift
│ │ │ ├── ParseTreeWalker.swift
│ │ │ ├── RuleNode.swift
│ │ │ ├── SyntaxTree.swift
│ │ │ ├── TerminalNode.swift
│ │ │ ├── TerminalNodeImpl.swift
│ │ │ ├── Tree.swift
│ │ │ ├── Trees.swift
│ │ │ └── pattern/
│ │ │ ├── Chunk.swift
│ │ │ ├── ParseTreeMatch.swift
│ │ │ ├── ParseTreePattern.swift
│ │ │ ├── ParseTreePatternMatcher.swift
│ │ │ ├── RuleTagToken.swift
│ │ │ ├── TagChunk.swift
│ │ │ ├── TextChunk.swift
│ │ │ └── TokenTagToken.swift
│ │ ├── Info-IOS.plist
│ │ └── Info-OSX.plist
│ ├── Tests/
│ │ ├── Antlr4Tests/
│ │ │ ├── ANTLRInputStreamTests.swift
│ │ │ ├── InterpreterDataTests.swift
│ │ │ ├── LexerA.g4
│ │ │ ├── LexerB.g4
│ │ │ ├── MurmurHashTests.swift
│ │ │ ├── ParseTreePatternMatcherTests.swift
│ │ │ ├── RuntimeMetaDataTests.swift
│ │ │ ├── StringExtensionTests.swift
│ │ │ ├── Threading.g4
│ │ │ ├── ThreadingTests.swift
│ │ │ ├── TokenStreamRewriterTests.swift
│ │ │ ├── TokenStreamTests.swift
│ │ │ ├── VisitorBasic.g4
│ │ │ ├── VisitorCalc.g4
│ │ │ └── VisitorTests.swift
│ │ ├── Info.plist
│ │ └── LinuxMain.swift
│ └── boot.py
├── runtime-testsuite/
│ ├── pom.xml
│ ├── resources/
│ │ ├── junit-platform.properties
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── test/
│ │ └── runtime/
│ │ ├── descriptors/
│ │ │ ├── CompositeLexers/
│ │ │ │ ├── LexerDelegatorInvokesDelegateRule.txt
│ │ │ │ └── LexerDelegatorRuleOverridesDelegate.txt
│ │ │ ├── CompositeParsers/
│ │ │ │ ├── BringInLiteralsFromDelegate.txt
│ │ │ │ ├── CombinedImportsCombined.txt
│ │ │ │ ├── DelegatesSeeSameTokenType.txt
│ │ │ │ ├── DelegatorAccessesDelegateMembers.txt
│ │ │ │ ├── DelegatorInvokesDelegateRule.txt
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithArgs.txt
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithReturnStruct.txt
│ │ │ │ ├── DelegatorInvokesFirstVersionOfDelegateRule.txt
│ │ │ │ ├── DelegatorRuleOverridesDelegate.txt
│ │ │ │ ├── DelegatorRuleOverridesDelegates.txt
│ │ │ │ ├── DelegatorRuleOverridesLookaheadInDelegate.txt
│ │ │ │ ├── ImportLexerWithOnlyFragmentRules.txt
│ │ │ │ ├── ImportedGrammarWithEmptyOptions.txt
│ │ │ │ ├── ImportedRuleWithAction.txt
│ │ │ │ └── KeywordVSIDOrder.txt
│ │ │ ├── FullContextParsing/
│ │ │ │ ├── AmbigYieldsCtxSensitiveDFA.txt
│ │ │ │ ├── AmbiguityNoLoop.txt
│ │ │ │ ├── CtxSensitiveDFATwoDiffInput.txt
│ │ │ │ ├── CtxSensitiveDFA_1.txt
│ │ │ │ ├── CtxSensitiveDFA_2.txt
│ │ │ │ ├── ExprAmbiguity_1.txt
│ │ │ │ ├── ExprAmbiguity_2.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_1.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_2.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_3.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_4.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_5.txt
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_6.txt
│ │ │ │ ├── LoopsSimulateTailRecursion.txt
│ │ │ │ └── SLLSeesEOFInLLGrammar.txt
│ │ │ ├── LeftRecursion/
│ │ │ │ ├── AmbigLR_1.txt
│ │ │ │ ├── AmbigLR_2.txt
│ │ │ │ ├── AmbigLR_3.txt
│ │ │ │ ├── AmbigLR_4.txt
│ │ │ │ ├── AmbigLR_5.txt
│ │ │ │ ├── Declarations_1.txt
│ │ │ │ ├── Declarations_10.txt
│ │ │ │ ├── Declarations_2.txt
│ │ │ │ ├── Declarations_3.txt
│ │ │ │ ├── Declarations_4.txt
│ │ │ │ ├── Declarations_5.txt
│ │ │ │ ├── Declarations_6.txt
│ │ │ │ ├── Declarations_7.txt
│ │ │ │ ├── Declarations_8.txt
│ │ │ │ ├── Declarations_9.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_1.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_2.txt
│ │ │ │ ├── DirectCallToLeftRecursiveRule_3.txt
│ │ │ │ ├── Expressions_1.txt
│ │ │ │ ├── Expressions_2.txt
│ │ │ │ ├── Expressions_3.txt
│ │ │ │ ├── Expressions_4.txt
│ │ │ │ ├── Expressions_5.txt
│ │ │ │ ├── Expressions_6.txt
│ │ │ │ ├── Expressions_7.txt
│ │ │ │ ├── JavaExpressions_1.txt
│ │ │ │ ├── JavaExpressions_10.txt
│ │ │ │ ├── JavaExpressions_11.txt
│ │ │ │ ├── JavaExpressions_12.txt
│ │ │ │ ├── JavaExpressions_2.txt
│ │ │ │ ├── JavaExpressions_3.txt
│ │ │ │ ├── JavaExpressions_4.txt
│ │ │ │ ├── JavaExpressions_5.txt
│ │ │ │ ├── JavaExpressions_6.txt
│ │ │ │ ├── JavaExpressions_7.txt
│ │ │ │ ├── JavaExpressions_8.txt
│ │ │ │ ├── JavaExpressions_9.txt
│ │ │ │ ├── LabelsOnOpSubrule_1.txt
│ │ │ │ ├── LabelsOnOpSubrule_2.txt
│ │ │ │ ├── LabelsOnOpSubrule_3.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_1.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_2.txt
│ │ │ │ ├── MultipleActionsPredicatesOptions_3.txt
│ │ │ │ ├── MultipleActions_1.txt
│ │ │ │ ├── MultipleActions_2.txt
│ │ │ │ ├── MultipleActions_3.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_1.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_2.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_3.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_4.txt
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_5.txt
│ │ │ │ ├── PrecedenceFilterConsidersContext.txt
│ │ │ │ ├── PrefixAndOtherAlt_1.txt
│ │ │ │ ├── PrefixAndOtherAlt_2.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_1.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_2.txt
│ │ │ │ ├── PrefixOpWithActionAndLabel_3.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_1.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_2.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_3.txt
│ │ │ │ ├── ReturnValueAndActionsAndLabels_4.txt
│ │ │ │ ├── ReturnValueAndActionsList1_1.txt
│ │ │ │ ├── ReturnValueAndActionsList1_2.txt
│ │ │ │ ├── ReturnValueAndActionsList1_3.txt
│ │ │ │ ├── ReturnValueAndActionsList1_4.txt
│ │ │ │ ├── ReturnValueAndActionsList2_1.txt
│ │ │ │ ├── ReturnValueAndActionsList2_2.txt
│ │ │ │ ├── ReturnValueAndActionsList2_3.txt
│ │ │ │ ├── ReturnValueAndActionsList2_4.txt
│ │ │ │ ├── ReturnValueAndActions_1.txt
│ │ │ │ ├── ReturnValueAndActions_2.txt
│ │ │ │ ├── ReturnValueAndActions_3.txt
│ │ │ │ ├── ReturnValueAndActions_4.txt
│ │ │ │ ├── SemPred.txt
│ │ │ │ ├── SemPredFailOption.txt
│ │ │ │ ├── Simple_1.txt
│ │ │ │ ├── Simple_2.txt
│ │ │ │ ├── Simple_3.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_1.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_2.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_3.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_4.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_5.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_6.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_7.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_8.txt
│ │ │ │ ├── TernaryExprExplicitAssociativity_9.txt
│ │ │ │ ├── TernaryExpr_1.txt
│ │ │ │ ├── TernaryExpr_2.txt
│ │ │ │ ├── TernaryExpr_3.txt
│ │ │ │ ├── TernaryExpr_4.txt
│ │ │ │ ├── TernaryExpr_5.txt
│ │ │ │ ├── TernaryExpr_6.txt
│ │ │ │ ├── TernaryExpr_7.txt
│ │ │ │ ├── TernaryExpr_8.txt
│ │ │ │ ├── TernaryExpr_9.txt
│ │ │ │ ├── WhitespaceInfluence_1.txt
│ │ │ │ └── WhitespaceInfluence_2.txt
│ │ │ ├── LexerErrors/
│ │ │ │ ├── DFAToATNThatFailsBackToDFA.txt
│ │ │ │ ├── DFAToATNThatMatchesThenFailsInATN.txt
│ │ │ │ ├── EnforcedGreedyNestedBraces_1.txt
│ │ │ │ ├── EnforcedGreedyNestedBraces_2.txt
│ │ │ │ ├── ErrorInMiddle.txt
│ │ │ │ ├── InvalidCharAtStart.txt
│ │ │ │ ├── InvalidCharAtStartAfterDFACache.txt
│ │ │ │ ├── InvalidCharInToken.txt
│ │ │ │ ├── InvalidCharInTokenAfterDFACache.txt
│ │ │ │ ├── LexerExecDFA.txt
│ │ │ │ ├── StringsEmbeddedInActions_1.txt
│ │ │ │ └── StringsEmbeddedInActions_2.txt
│ │ │ ├── LexerExec/
│ │ │ │ ├── ActionPlacement.txt
│ │ │ │ ├── CharSet.txt
│ │ │ │ ├── CharSetInSet.txt
│ │ │ │ ├── CharSetNot.txt
│ │ │ │ ├── CharSetPlus.txt
│ │ │ │ ├── CharSetRange.txt
│ │ │ │ ├── CharSetWithEscapedChar.txt
│ │ │ │ ├── CharSetWithMissingEscapeChar.txt
│ │ │ │ ├── CharSetWithQuote1.txt
│ │ │ │ ├── CharSetWithQuote2.txt
│ │ │ │ ├── EOFByItself.txt
│ │ │ │ ├── EOFSuffixInFirstRule_1.txt
│ │ │ │ ├── EOFSuffixInFirstRule_2.txt
│ │ │ │ ├── EscapeTargetStringLiteral.txt
│ │ │ │ ├── EscapedCharacters.txt
│ │ │ │ ├── GreedyClosure.txt
│ │ │ │ ├── GreedyConfigs.txt
│ │ │ │ ├── GreedyOptional.txt
│ │ │ │ ├── GreedyPositiveClosure.txt
│ │ │ │ ├── HexVsID.txt
│ │ │ │ ├── KeywordID.txt
│ │ │ │ ├── NonGreedyClosure.txt
│ │ │ │ ├── NonGreedyConfigs.txt
│ │ │ │ ├── NonGreedyOptional.txt
│ │ │ │ ├── NonGreedyPositiveClosure.txt
│ │ │ │ ├── NonGreedyTermination1.txt
│ │ │ │ ├── NonGreedyTermination2.txt
│ │ │ │ ├── Parentheses.txt
│ │ │ │ ├── PositionAdjustingLexer.txt
│ │ │ │ ├── QuoteTranslation.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_1.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_2.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_1.txt
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_2.txt
│ │ │ │ ├── RefToRuleDoesNotSetTokenNorEmitAnother.txt
│ │ │ │ ├── ReservedWordsEscaping.txt
│ │ │ │ ├── ReservedWordsEscaping_NULL.txt
│ │ │ │ ├── Slashes.txt
│ │ │ │ ├── StackoverflowDueToNotEscapedHyphen.txt
│ │ │ │ ├── TokenType0xFFFF.txt
│ │ │ │ ├── UnicodeCharSet.txt
│ │ │ │ └── ZeroLengthToken.txt
│ │ │ ├── Listeners/
│ │ │ │ ├── Basic.txt
│ │ │ │ ├── LR.txt
│ │ │ │ ├── LRWithLabels.txt
│ │ │ │ ├── RuleGetters_1.txt
│ │ │ │ ├── RuleGetters_2.txt
│ │ │ │ ├── TokenGetters_1.txt
│ │ │ │ └── TokenGetters_2.txt
│ │ │ ├── ParseTrees/
│ │ │ │ ├── AltNum.txt
│ │ │ │ ├── ExtraToken.txt
│ │ │ │ ├── ExtraTokensAndAltLabels.txt
│ │ │ │ ├── NoViableAlt.txt
│ │ │ │ ├── RuleRef.txt
│ │ │ │ ├── Sync.txt
│ │ │ │ ├── Token2.txt
│ │ │ │ ├── TokenAndRuleContextString.txt
│ │ │ │ ├── TwoAltLoop.txt
│ │ │ │ └── TwoAlts.txt
│ │ │ ├── ParserErrors/
│ │ │ │ ├── ConjuringUpToken.txt
│ │ │ │ ├── ConjuringUpTokenFromSet.txt
│ │ │ │ ├── ContextListGetters.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_1.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_2.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_3.txt
│ │ │ │ ├── DuplicatedLeftRecursiveCall_4.txt
│ │ │ │ ├── ExtraneousInput.txt
│ │ │ │ ├── InvalidATNStateRemoval.txt
│ │ │ │ ├── InvalidEmptyInput.txt
│ │ │ │ ├── LL1ErrorInfo.txt
│ │ │ │ ├── LL2.txt
│ │ │ │ ├── LL3.txt
│ │ │ │ ├── LLStar.txt
│ │ │ │ ├── MultiTokenDeletionBeforeLoop.txt
│ │ │ │ ├── MultiTokenDeletionBeforeLoop2.txt
│ │ │ │ ├── MultiTokenDeletionDuringLoop.txt
│ │ │ │ ├── MultiTokenDeletionDuringLoop2.txt
│ │ │ │ ├── NoViableAltAvoidance.txt
│ │ │ │ ├── SingleSetInsertion.txt
│ │ │ │ ├── SingleSetInsertionConsumption.txt
│ │ │ │ ├── SingleTokenDeletion.txt
│ │ │ │ ├── SingleTokenDeletionBeforeAlt.txt
│ │ │ │ ├── SingleTokenDeletionBeforeLoop.txt
│ │ │ │ ├── SingleTokenDeletionBeforeLoop2.txt
│ │ │ │ ├── SingleTokenDeletionBeforePredict.txt
│ │ │ │ ├── SingleTokenDeletionConsumption.txt
│ │ │ │ ├── SingleTokenDeletionDuringLoop.txt
│ │ │ │ ├── SingleTokenDeletionDuringLoop2.txt
│ │ │ │ ├── SingleTokenDeletionExpectingSet.txt
│ │ │ │ ├── SingleTokenInsertion.txt
│ │ │ │ ├── TokenMismatch.txt
│ │ │ │ ├── TokenMismatch2.txt
│ │ │ │ └── TokenMismatch3.txt
│ │ │ ├── ParserExec/
│ │ │ │ ├── APlus.txt
│ │ │ │ ├── AStar_1.txt
│ │ │ │ ├── AStar_2.txt
│ │ │ │ ├── AorAPlus.txt
│ │ │ │ ├── AorAStar_1.txt
│ │ │ │ ├── AorAStar_2.txt
│ │ │ │ ├── AorB.txt
│ │ │ │ ├── AorBPlus.txt
│ │ │ │ ├── AorBStar_1.txt
│ │ │ │ ├── AorBStar_2.txt
│ │ │ │ ├── Basic.txt
│ │ │ │ ├── BuildParseTree_FALSE.txt
│ │ │ │ ├── BuildParseTree_TRUE.txt
│ │ │ │ ├── IfIfElseGreedyBinding1.txt
│ │ │ │ ├── IfIfElseGreedyBinding2.txt
│ │ │ │ ├── IfIfElseNonGreedyBinding1.txt
│ │ │ │ ├── IfIfElseNonGreedyBinding2.txt
│ │ │ │ ├── Keyword_1.txt
│ │ │ │ ├── Keyword_2.txt
│ │ │ │ ├── Keyword_3.txt
│ │ │ │ ├── Keyword_4.txt
│ │ │ │ ├── Keyword_5.txt
│ │ │ │ ├── Keyword_6.txt
│ │ │ │ ├── LL1OptionalBlock_1.txt
│ │ │ │ ├── LL1OptionalBlock_2.txt
│ │ │ │ ├── LabelAliasingAcrossLabeledAlternatives.txt
│ │ │ │ ├── Labels.txt
│ │ │ │ ├── ListLabelForClosureContext.txt
│ │ │ │ ├── ListLabelsOnRuleRefStartOfAlt.txt
│ │ │ │ ├── ListLabelsOnSet.txt
│ │ │ │ ├── MultipleEOFHandling.txt
│ │ │ │ ├── OpenDeviceStatement_Case1.txt
│ │ │ │ ├── OpenDeviceStatement_Case2.txt
│ │ │ │ ├── OpenDeviceStatement_Case3.txt
│ │ │ │ ├── Optional_1.txt
│ │ │ │ ├── Optional_2.txt
│ │ │ │ ├── Optional_3.txt
│ │ │ │ ├── Optional_4.txt
│ │ │ │ ├── OrderingPredicates.txt
│ │ │ │ ├── ParserProperty.txt
│ │ │ │ ├── PredicatedIfIfElse.txt
│ │ │ │ ├── PredictionIssue334.txt
│ │ │ │ ├── PredictionMode_LL.txt
│ │ │ │ ├── PredictionMode_SLL.txt
│ │ │ │ ├── ReferenceToATN_1.txt
│ │ │ │ ├── ReferenceToATN_2.txt
│ │ │ │ ├── ReservedWordsEscaping.txt
│ │ │ │ ├── TokenOffset.txt
│ │ │ │ ├── Wildcard.txt
│ │ │ │ └── uStartingCharDoesNotCauseIllegalUnicodeEscape.txt
│ │ │ ├── Performance/
│ │ │ │ ├── DropLoopEntryBranchInLRRule_1.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_2.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_3.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_4.txt
│ │ │ │ ├── DropLoopEntryBranchInLRRule_5.txt
│ │ │ │ ├── ExpressionGrammar_1.txt
│ │ │ │ └── ExpressionGrammar_2.txt
│ │ │ ├── SemPredEvalLexer/
│ │ │ │ ├── DisableRule.txt
│ │ │ │ ├── EnumNotID.txt
│ │ │ │ ├── IDnotEnum.txt
│ │ │ │ ├── IDvsEnum.txt
│ │ │ │ ├── Indent.txt
│ │ │ │ ├── LexerInputPositionSensitivePredicates.txt
│ │ │ │ ├── PredicatedKeywords.txt
│ │ │ │ └── RuleSempredFunction.txt
│ │ │ ├── SemPredEvalParser/
│ │ │ │ ├── ActionHidesPreds.txt
│ │ │ │ ├── ActionsHidePredsInGlobalFOLLOW.txt
│ │ │ │ ├── AtomWithClosureInTranslatedLRRule.txt
│ │ │ │ ├── DepedentPredsInGlobalFOLLOW.txt
│ │ │ │ ├── DependentPredNotInOuterCtxShouldBeIgnored.txt
│ │ │ │ ├── DisabledAlternative.txt
│ │ │ │ ├── IndependentPredNotPassedOuterCtxToAvoidCastException.txt
│ │ │ │ ├── NoTruePredsThrowsNoViableAlt.txt
│ │ │ │ ├── Order.txt
│ │ │ │ ├── PredFromAltTestedInLoopBack_1.txt
│ │ │ │ ├── PredFromAltTestedInLoopBack_2.txt
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_1.txt
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_2.txt
│ │ │ │ ├── PredicateDependentOnArg.txt
│ │ │ │ ├── PredicateDependentOnArg2.txt
│ │ │ │ ├── PredsInGlobalFOLLOW.txt
│ │ │ │ ├── RewindBeforePredEval.txt
│ │ │ │ ├── Simple.txt
│ │ │ │ ├── SimpleValidate.txt
│ │ │ │ ├── SimpleValidate2.txt
│ │ │ │ ├── ToLeft.txt
│ │ │ │ ├── ToLeftWithVaryingPredicate.txt
│ │ │ │ ├── TwoUnpredicatedAlts.txt
│ │ │ │ ├── TwoUnpredicatedAltsAndOneOrthogonalAlt.txt
│ │ │ │ ├── UnpredicatedPathsInAlt.txt
│ │ │ │ └── ValidateInDFA.txt
│ │ │ └── Sets/
│ │ │ ├── CharSetLiteral.txt
│ │ │ ├── ComplementSet.txt
│ │ │ ├── LexerOptionalSet.txt
│ │ │ ├── LexerPlusSet.txt
│ │ │ ├── LexerStarSet.txt
│ │ │ ├── NotChar.txt
│ │ │ ├── NotCharSet.txt
│ │ │ ├── NotCharSetWithRuleRef3.txt
│ │ │ ├── OptionalLexerSingleElement.txt
│ │ │ ├── OptionalSet.txt
│ │ │ ├── OptionalSingleElement.txt
│ │ │ ├── ParserNotSet.txt
│ │ │ ├── ParserNotToken.txt
│ │ │ ├── ParserNotTokenWithLabel.txt
│ │ │ ├── ParserSet.txt
│ │ │ ├── PlusLexerSingleElement.txt
│ │ │ ├── PlusSet.txt
│ │ │ ├── RuleAsSet.txt
│ │ │ ├── SeqDoesNotBecomeSet.txt
│ │ │ ├── StarLexerSingleElement_1.txt
│ │ │ ├── StarLexerSingleElement_2.txt
│ │ │ ├── StarSet.txt
│ │ │ ├── UnicodeEscapedBMPRangeSet.txt
│ │ │ ├── UnicodeEscapedBMPSet.txt
│ │ │ ├── UnicodeEscapedSMPRangeSet.txt
│ │ │ ├── UnicodeEscapedSMPRangeSetMismatch.txt
│ │ │ ├── UnicodeEscapedSMPSet.txt
│ │ │ ├── UnicodeNegatedBMPSetIncludesSMPCodePoints.txt
│ │ │ ├── UnicodeNegatedSMPSetIncludesBMPCodePoints.txt
│ │ │ ├── UnicodeUnescapedBMPRangeSet.txt
│ │ │ └── UnicodeUnescapedBMPSet.txt
│ │ ├── helpers/
│ │ │ ├── Antlr4.Test.csproj.stg
│ │ │ ├── Package.swift.stg
│ │ │ ├── Test.cpp.stg
│ │ │ ├── Test.cs.stg
│ │ │ ├── Test.dart.stg
│ │ │ ├── Test.go.stg
│ │ │ ├── Test.js.stg
│ │ │ ├── Test.php.stg
│ │ │ ├── Test.py.stg
│ │ │ ├── Test.ts.stg
│ │ │ ├── Test.vcxproj.stg
│ │ │ ├── main.swift.stg
│ │ │ ├── package_js.json
│ │ │ ├── package_ts.json
│ │ │ ├── pubspec.yaml.stg
│ │ │ └── tsconfig.json
│ │ └── templates/
│ │ ├── CSharp.test.stg
│ │ ├── Cpp.test.stg
│ │ ├── Dart.test.stg
│ │ ├── Go.test.stg
│ │ ├── Java.test.stg
│ │ ├── JavaScript.test.stg
│ │ ├── PHP.test.stg
│ │ ├── Python3.test.stg
│ │ ├── Swift.test.stg
│ │ └── TypeScript.test.stg
│ └── test/
│ └── org/
│ └── antlr/
│ └── v4/
│ ├── runtime/
│ │ └── TestCodePointCharStream.java
│ └── test/
│ └── runtime/
│ ├── CustomDescriptors.java
│ ├── ErrorQueue.java
│ ├── FileUtils.java
│ ├── GeneratedFile.java
│ ├── Generator.java
│ ├── GrammarType.java
│ ├── OSType.java
│ ├── Processor.java
│ ├── ProcessorResult.java
│ ├── README.md
│ ├── RunOptions.java
│ ├── RuntimeRunner.java
│ ├── RuntimeTestDescriptor.java
│ ├── RuntimeTestDescriptorParser.java
│ ├── RuntimeTestUtils.java
│ ├── RuntimeTests.java
│ ├── Stage.java
│ ├── StreamReader.java
│ ├── TraceATN.java
│ ├── cpp/
│ │ ├── CppRunner.java
│ │ └── CppRuntimeTests.java
│ ├── csharp/
│ │ ├── CSharpRunner.java
│ │ └── CSharpRuntimeTests.java
│ ├── dart/
│ │ ├── DartRunner.java
│ │ └── DartRuntimeTests.java
│ ├── go/
│ │ ├── GoRunner.java
│ │ └── GoRuntimeTests.java
│ ├── java/
│ │ ├── JavaRunner.java
│ │ ├── JavaRuntimeTests.java
│ │ ├── TestCharStreams.java
│ │ ├── TestIntegerList.java
│ │ ├── TestInterpreterDataReader.java
│ │ ├── api/
│ │ │ ├── Java.g4
│ │ │ ├── TestExpectedTokens.java
│ │ │ ├── TestTokenStream.java
│ │ │ ├── TestTokenStreamRewriter.java
│ │ │ ├── TestVisitors.java
│ │ │ ├── VisitorBasic.g4
│ │ │ ├── VisitorCalc.g4
│ │ │ └── perf/
│ │ │ ├── Instrumentor.java
│ │ │ ├── TimeLexerSpeed.java
│ │ │ ├── emoji.txt
│ │ │ ├── graphemes.g4
│ │ │ ├── udhr_hin.txt
│ │ │ └── udhr_kor.txt
│ │ └── helpers/
│ │ ├── CustomStreamErrorListener.java
│ │ ├── RuntimeTestLexer.java
│ │ ├── RuntimeTestParser.java
│ │ └── TreeShapeListener.java
│ ├── javascript/
│ │ ├── JavaScriptRuntimeTests.java
│ │ └── NodeRunner.java
│ ├── php/
│ │ ├── PHPRunner.java
│ │ └── PhpRuntimeTests.java
│ ├── python/
│ │ └── PythonRunner.java
│ ├── python3/
│ │ ├── Python3Runner.java
│ │ └── Python3RuntimeTests.java
│ ├── states/
│ │ ├── CompiledState.java
│ │ ├── ExecutedState.java
│ │ ├── GeneratedState.java
│ │ ├── JavaCompiledState.java
│ │ ├── JavaExecutedState.java
│ │ └── State.java
│ ├── swift/
│ │ ├── SwiftRunner.java
│ │ └── SwiftRuntimeTests.java
│ └── typescript/
│ ├── TsNodeRunner.java
│ └── TypeScriptRuntimeTests.java
├── scripts/
│ ├── deploy_to_website.py
│ ├── files-to-update.txt
│ ├── github_release_notes.py
│ ├── parse-extended-pictographic/
│ │ ├── ExtendedPictographic-Parsed.txt
│ │ ├── ExtendedPictographic.txt
│ │ ├── README.md
│ │ └── parse.py
│ ├── traceatn.sh
│ └── update_antlr_version.py
├── tool/
│ ├── nb-configuration.xml
│ ├── pom.xml
│ ├── resources/
│ │ └── org/
│ │ └── antlr/
│ │ └── v4/
│ │ └── tool/
│ │ └── templates/
│ │ ├── LeftRecursiveRules.stg
│ │ ├── codegen/
│ │ │ ├── CSharp/
│ │ │ │ └── CSharp.stg
│ │ │ ├── Cpp/
│ │ │ │ ├── Cpp.stg
│ │ │ │ └── Files.stg
│ │ │ ├── Dart/
│ │ │ │ └── Dart.stg
│ │ │ ├── Go/
│ │ │ │ └── Go.stg
│ │ │ ├── Java/
│ │ │ │ └── Java.stg
│ │ │ ├── JavaScript/
│ │ │ │ └── JavaScript.stg
│ │ │ ├── PHP/
│ │ │ │ └── PHP.stg
│ │ │ ├── Python3/
│ │ │ │ └── Python3.stg
│ │ │ ├── Swift/
│ │ │ │ └── Swift.stg
│ │ │ └── TypeScript/
│ │ │ └── TypeScript.stg
│ │ ├── depend.stg
│ │ ├── dot/
│ │ │ └── graphs.stg
│ │ ├── messages/
│ │ │ └── formats/
│ │ │ ├── antlr.stg
│ │ │ ├── gnu.stg
│ │ │ └── vs2005.stg
│ │ └── unicodedata.st
│ └── src/
│ └── org/
│ └── antlr/
│ └── v4/
│ ├── Tool.java
│ ├── analysis/
│ │ ├── AnalysisPipeline.java
│ │ ├── LeftRecursionDetector.java
│ │ ├── LeftRecursiveRuleAltInfo.java
│ │ ├── LeftRecursiveRuleAnalyzer.java
│ │ └── LeftRecursiveRuleTransformer.java
│ ├── automata/
│ │ ├── ATNFactory.java
│ │ ├── ATNOptimizer.java
│ │ ├── ATNPrinter.java
│ │ ├── ATNVisitor.java
│ │ ├── CharactersDataCheckStatus.java
│ │ ├── LexerATNFactory.java
│ │ ├── ParserATNFactory.java
│ │ ├── RangeBorderCharactersData.java
│ │ └── TailEpsilonRemover.java
│ ├── codegen/
│ │ ├── ActionTranslator.java
│ │ ├── BlankOutputModelFactory.java
│ │ ├── CodeGenPipeline.java
│ │ ├── CodeGenerator.java
│ │ ├── CodeGeneratorExtension.java
│ │ ├── DefaultOutputModelFactory.java
│ │ ├── LexerFactory.java
│ │ ├── OutputModelController.java
│ │ ├── OutputModelFactory.java
│ │ ├── OutputModelWalker.java
│ │ ├── ParserFactory.java
│ │ ├── SourceGenTriggers.g
│ │ ├── SourceType.java
│ │ ├── Target.java
│ │ ├── UnicodeEscapes.java
│ │ ├── model/
│ │ │ ├── Action.java
│ │ │ ├── AddToLabelList.java
│ │ │ ├── AltBlock.java
│ │ │ ├── ArgAction.java
│ │ │ ├── BaseListenerFile.java
│ │ │ ├── BaseVisitorFile.java
│ │ │ ├── CaptureNextToken.java
│ │ │ ├── CaptureNextTokenType.java
│ │ │ ├── Choice.java
│ │ │ ├── CodeBlockForAlt.java
│ │ │ ├── CodeBlockForOuterMostAlt.java
│ │ │ ├── DispatchMethod.java
│ │ │ ├── ElementFrequenciesVisitor.java
│ │ │ ├── ExceptionClause.java
│ │ │ ├── InvokeRule.java
│ │ │ ├── LL1AltBlock.java
│ │ │ ├── LL1Choice.java
│ │ │ ├── LL1Loop.java
│ │ │ ├── LL1OptionalBlock.java
│ │ │ ├── LL1OptionalBlockSingleAlt.java
│ │ │ ├── LL1PlusBlockSingleAlt.java
│ │ │ ├── LL1StarBlockSingleAlt.java
│ │ │ ├── LabeledOp.java
│ │ │ ├── LeftRecursiveRuleFunction.java
│ │ │ ├── Lexer.java
│ │ │ ├── LexerFile.java
│ │ │ ├── ListenerDispatchMethod.java
│ │ │ ├── ListenerFile.java
│ │ │ ├── Loop.java
│ │ │ ├── MatchNotSet.java
│ │ │ ├── MatchSet.java
│ │ │ ├── MatchToken.java
│ │ │ ├── ModelElement.java
│ │ │ ├── OptionalBlock.java
│ │ │ ├── OutputFile.java
│ │ │ ├── OutputModelObject.java
│ │ │ ├── Parser.java
│ │ │ ├── ParserFile.java
│ │ │ ├── PlusBlock.java
│ │ │ ├── Recognizer.java
│ │ │ ├── RuleActionFunction.java
│ │ │ ├── RuleElement.java
│ │ │ ├── RuleFunction.java
│ │ │ ├── RuleSempredFunction.java
│ │ │ ├── SemPred.java
│ │ │ ├── SerializedATN.java
│ │ │ ├── SerializedJavaATN.java
│ │ │ ├── SrcOp.java
│ │ │ ├── StarBlock.java
│ │ │ ├── Sync.java
│ │ │ ├── TestSetInline.java
│ │ │ ├── ThrowEarlyExitException.java
│ │ │ ├── ThrowNoViableAlt.java
│ │ │ ├── ThrowRecognitionException.java
│ │ │ ├── TokenInfo.java
│ │ │ ├── VisitorDispatchMethod.java
│ │ │ ├── VisitorFile.java
│ │ │ ├── Wildcard.java
│ │ │ ├── chunk/
│ │ │ │ ├── ActionChunk.java
│ │ │ │ ├── ActionTemplate.java
│ │ │ │ ├── ActionText.java
│ │ │ │ ├── ArgRef.java
│ │ │ │ ├── LabelRef.java
│ │ │ │ ├── ListLabelRef.java
│ │ │ │ ├── LocalRef.java
│ │ │ │ ├── NonLocalAttrRef.java
│ │ │ │ ├── QRetValueRef.java
│ │ │ │ ├── RetValueRef.java
│ │ │ │ ├── RulePropertyRef.java
│ │ │ │ ├── RulePropertyRef_ctx.java
│ │ │ │ ├── RulePropertyRef_parser.java
│ │ │ │ ├── RulePropertyRef_start.java
│ │ │ │ ├── RulePropertyRef_stop.java
│ │ │ │ ├── RulePropertyRef_text.java
│ │ │ │ ├── SetAttr.java
│ │ │ │ ├── SetNonLocalAttr.java
│ │ │ │ ├── SymbolRefChunk.java
│ │ │ │ ├── ThisRulePropertyRef_ctx.java
│ │ │ │ ├── ThisRulePropertyRef_parser.java
│ │ │ │ ├── ThisRulePropertyRef_start.java
│ │ │ │ ├── ThisRulePropertyRef_stop.java
│ │ │ │ ├── ThisRulePropertyRef_text.java
│ │ │ │ ├── TokenPropertyRef.java
│ │ │ │ ├── TokenPropertyRef_channel.java
│ │ │ │ ├── TokenPropertyRef_index.java
│ │ │ │ ├── TokenPropertyRef_int.java
│ │ │ │ ├── TokenPropertyRef_line.java
│ │ │ │ ├── TokenPropertyRef_pos.java
│ │ │ │ ├── TokenPropertyRef_text.java
│ │ │ │ ├── TokenPropertyRef_type.java
│ │ │ │ └── TokenRef.java
│ │ │ ├── dbg.java
│ │ │ └── decl/
│ │ │ ├── AltLabelStructDecl.java
│ │ │ ├── AttributeDecl.java
│ │ │ ├── CodeBlock.java
│ │ │ ├── ContextGetterDecl.java
│ │ │ ├── ContextRuleGetterDecl.java
│ │ │ ├── ContextRuleListGetterDecl.java
│ │ │ ├── ContextRuleListIndexedGetterDecl.java
│ │ │ ├── ContextTokenGetterDecl.java
│ │ │ ├── ContextTokenListGetterDecl.java
│ │ │ ├── ContextTokenListIndexedGetterDecl.java
│ │ │ ├── Decl.java
│ │ │ ├── ElementListDecl.java
│ │ │ ├── RuleContextDecl.java
│ │ │ ├── RuleContextListDecl.java
│ │ │ ├── StructDecl.java
│ │ │ ├── TokenDecl.java
│ │ │ ├── TokenListDecl.java
│ │ │ └── TokenTypeDecl.java
│ │ └── target/
│ │ ├── CSharpTarget.java
│ │ ├── CppTarget.java
│ │ ├── DartTarget.java
│ │ ├── GoTarget.java
│ │ ├── JavaScriptTarget.java
│ │ ├── JavaTarget.java
│ │ ├── PHPTarget.java
│ │ ├── Python3Target.java
│ │ ├── SwiftTarget.java
│ │ └── TypeScriptTarget.java
│ ├── gui/
│ │ ├── BasicFontMetrics.java
│ │ ├── GraphicsSupport.java
│ │ ├── Interpreter.java
│ │ ├── JFileChooserConfirmOverwrite.java
│ │ ├── PostScriptDocument.java
│ │ ├── SystemFontMetrics.java
│ │ ├── TestRig.java
│ │ ├── TreeLayoutAdaptor.java
│ │ ├── TreePostScriptGenerator.java
│ │ ├── TreeTextProvider.java
│ │ ├── TreeViewer.java
│ │ └── Trees.java
│ ├── misc/
│ │ ├── CharSupport.java
│ │ ├── EscapeSequenceParsing.java
│ │ ├── FrequencySet.java
│ │ ├── Graph.java
│ │ ├── MutableInt.java
│ │ ├── OrderedHashMap.java
│ │ └── Utils.java
│ ├── parse/
│ │ ├── ANTLRLexer.g
│ │ ├── ANTLRParser.g
│ │ ├── ATNBuilder.g
│ │ ├── ActionSplitter.g
│ │ ├── ActionSplitterListener.java
│ │ ├── BlockSetTransformer.g
│ │ ├── GrammarASTAdaptor.java
│ │ ├── GrammarToken.java
│ │ ├── GrammarTreeVisitor.g
│ │ ├── LeftRecursiveRuleWalker.g
│ │ ├── ResyncToEndOfRuleBlock.java
│ │ ├── ScopeParser.java
│ │ ├── TokenVocabParser.java
│ │ ├── ToolANTLRLexer.java
│ │ ├── ToolANTLRParser.java
│ │ └── v4ParserException.java
│ ├── semantics/
│ │ ├── ActionSniffer.java
│ │ ├── AttributeChecks.java
│ │ ├── BasicSemanticChecks.java
│ │ ├── BlankActionSplitterListener.java
│ │ ├── RuleCollector.java
│ │ ├── SemanticPipeline.java
│ │ ├── SymbolChecks.java
│ │ ├── SymbolCollector.java
│ │ └── UseDefAnalyzer.java
│ ├── tool/
│ │ ├── ANTLRMessage.java
│ │ ├── ANTLRToolListener.java
│ │ ├── Alternative.java
│ │ ├── Attribute.java
│ │ ├── AttributeDict.java
│ │ ├── AttributeResolver.java
│ │ ├── BuildDependencyGenerator.java
│ │ ├── DOTGenerator.java
│ │ ├── DefaultToolListener.java
│ │ ├── ErrorManager.java
│ │ ├── ErrorSeverity.java
│ │ ├── ErrorType.java
│ │ ├── Grammar.java
│ │ ├── GrammarInterpreterRuleContext.java
│ │ ├── GrammarParserInterpreter.java
│ │ ├── GrammarSemanticsMessage.java
│ │ ├── GrammarSyntaxMessage.java
│ │ ├── GrammarTransformPipeline.java
│ │ ├── LabelElementPair.java
│ │ ├── LabelType.java
│ │ ├── LeftRecursionCyclesMessage.java
│ │ ├── LeftRecursiveRule.java
│ │ ├── LexerGrammar.java
│ │ ├── Rule.java
│ │ ├── ToolMessage.java
│ │ └── ast/
│ │ ├── ActionAST.java
│ │ ├── AltAST.java
│ │ ├── BlockAST.java
│ │ ├── GrammarAST.java
│ │ ├── GrammarASTErrorNode.java
│ │ ├── GrammarASTVisitor.java
│ │ ├── GrammarASTWithOptions.java
│ │ ├── GrammarRootAST.java
│ │ ├── NotAST.java
│ │ ├── OptionalBlockAST.java
│ │ ├── PlusBlockAST.java
│ │ ├── PredAST.java
│ │ ├── QuantifierAST.java
│ │ ├── RangeAST.java
│ │ ├── RuleAST.java
│ │ ├── RuleElementAST.java
│ │ ├── RuleRefAST.java
│ │ ├── SetAST.java
│ │ ├── StarBlockAST.java
│ │ └── TerminalAST.java
│ └── unicode/
│ └── UnicodeDataTemplateController.java
└── tool-testsuite/
├── pom.xml
├── resources/
│ └── junit-platform.properties
└── test/
└── org/
└── antlr/
└── v4/
└── test/
└── tool/
├── ATNDescriber.java
├── InterpreterTreeTextProvider.java
├── Java.g4
├── JavaLR.g4
├── JavaUnicodeInputStream.java
├── MockIntTokenStream.java
├── ParserInterpreterForTesting.java
├── PositionAdjustingLexer.g4
├── Psl.g4
├── TestASTStructure.java
├── TestATNConstruction.java
├── TestATNDeserialization.java
├── TestATNInterpreter.java
├── TestATNLexerInterpreter.java
├── TestATNParserPrediction.java
├── TestATNSerialization.java
├── TestActionSplitter.java
├── TestActionTranslation.java
├── TestAmbigParseTrees.java
├── TestAttributeChecks.java
├── TestBasicSemanticErrors.java
├── TestBufferedTokenStream.java
├── TestCharSupport.java
├── TestCodeGeneration.java
├── TestCommonTokenStream.java
├── TestCompositeGrammars.java
├── TestDollarParser.java
├── TestErrorSets.java
├── TestEscapeSequenceParsing.java
├── TestFastQueue.java
├── TestGrammarParserInterpreter.java
├── TestGraphNodes.java
├── TestIntervalSet.java
├── TestLeftRecursionToolIssues.java
├── TestLexerActions.java
├── TestLookaheadTrees.java
├── TestParseTreeMatcher.java
├── TestParserExec.java
├── TestParserInterpreter.java
├── TestParserProfiler.java
├── TestPerformance.java
├── TestScopeParsing.java
├── TestSplitParser.java
├── TestSymbolIssues.java
├── TestTokenPositionOptions.java
├── TestTokenTypeAssignment.java
├── TestToolSyntaxErrors.java
├── TestTopologicalSort.java
├── TestUnbufferedCharStream.java
├── TestUnbufferedTokenStream.java
├── TestUnicodeData.java
├── TestUnicodeEscapes.java
├── TestUnicodeGrammar.java
├── TestUtils.java
├── TestVocabulary.java
├── TestXPath.java
└── ToolTestUtils.java
Showing preview only (979K chars total). Download the full file or copy to clipboard to get everything.
SYMBOL INDEX (11341 symbols across 1282 files)
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java
class Antlr4ErrorLog (line 23) | public class Antlr4ErrorLog implements ANTLRToolListener {
method Antlr4ErrorLog (line 34) | public Antlr4ErrorLog(Tool tool, BuildContext buildContext, Log log) {
method info (line 47) | @Override
method error (line 62) | @Override
method warning (line 85) | @Override
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java
class Antlr4Mojo (line 54) | @Mojo(
method getSourceDirectory (line 187) | public File getSourceDirectory() {
method getOutputDirectory (line 191) | public File getOutputDirectory() {
method getLibDirectory (line 195) | public File getLibDirectory() {
method addSourceRoot (line 199) | void addSourceRoot(File outputDir) {
method execute (line 222) | @Override
method getCommandArguments (line 317) | private List<String> getCommandArguments() {
method processGrammarFiles (line 383) | private List<List<String>> processGrammarFiles(
method getImportFiles (line 445) | private Set<File> getImportFiles(File sourceDirectory) throws Inclusio...
method getGrammarFiles (line 459) | private Set<File> getGrammarFiles(File sourceDirectory) throws Inclusi...
method getPackageName (line 478) | private static String getPackageName(String relativeFolderPath) {
method getIncludesPatterns (line 491) | public Set<String> getIncludesPatterns() {
method getDependenciesStatusFile (line 498) | private File getDependenciesStatusFile() {
class CustomTool (line 508) | private final class CustomTool extends Tool {
method CustomTool (line 510) | public CustomTool(String[] args) {
method process (line 515) | @Override
method getOutputFileWriter (line 521) | @Override
method validateEncoding (line 561) | private String validateEncoding(String encoding) {
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/GrammarDependencies.java
class GrammarDependencies (line 34) | class GrammarDependencies {
method GrammarDependencies (line 45) | public GrammarDependencies(File sourceDirectory, File libDirectory,
method getPackage (line 63) | private String getPackage(List<String> arguments) {
method save (line 72) | public void save() throws IOException {
method analyze (line 96) | public GrammarDependencies analyze(Set<File> grammarFiles,
method isDependencyChanged (line 148) | public boolean isDependencyChanged(File grammarFile) throws IOException {
method getRelativePath (line 176) | private String getRelativePath(File grammarFile) {
method findUsages (line 198) | private Collection<String> findUsages(String grammarFileName) {
method explore (line 205) | private void explore(String grammarName, Collection<String> result) {
method analyse (line 212) | private void analyse(File grammarFile, Collection<File> grammarFiles, ...
method resolve (line 267) | private File resolve(String name, String path) {
method loadStatus (line 281) | private Map<File, Map.Entry<byte[], Collection<String>>> loadStatus(Fi...
method stripPath (line 307) | private String stripPath(String str) {
method stripQuotes (line 311) | private String stripQuotes(String str) {
FILE: antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java
class MojoUtils (line 17) | class MojoUtils {
method checksum (line 25) | public static byte[] checksum(File file) throws IOException {
method findSourceSubdir (line 62) | public static String findSourceSubdir(File sourceDirectory, File gramm...
FILE: antlr4-maven-plugin/src/test/java/org/antlr/mojo/antlr4/Antlr4MojoTest.java
class Antlr4MojoTest (line 30) | public class Antlr4MojoTest {
method importTokens (line 40) | @Test
method importsCustomLayout (line 88) | @Test
method importsStandardLayout (line 194) | @Test
method processWhenDependencyRemoved (line 315) | @Test
method checksum (line 339) | private byte[] checksum(Path path) throws IOException {
class Change (line 343) | private static class Change implements AutoCloseable {
method Change (line 347) | public Change(Path file, String change) {
method write (line 361) | private void write(Path file, byte[] data) {
method of (line 369) | public static Change of(Path file, String change) {
method of (line 373) | public static Change of(Path file) {
method close (line 377) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/runtime/TestCodePointCharStream.java
class TestCodePointCharStream (line 14) | public class TestCodePointCharStream {
method emptyBytesHasSize0 (line 15) | @Test
method emptyBytesLookAheadReturnsEOF (line 23) | @Test
method consumingEmptyStreamShouldThrow (line 30) | @Test
method singleLatinCodePointHasSize1 (line 40) | @Test
method consumingSingleLatinCodePointShouldMoveIndex (line 46) | @Test
method consumingPastSingleLatinCodePointShouldThrow (line 54) | @Test
method singleLatinCodePointLookAheadShouldReturnCodePoint (line 62) | @Test
method multipleLatinCodePointsLookAheadShouldReturnCodePoints (line 69) | @Test
method singleLatinCodePointLookAheadPastEndShouldReturnEOF (line 80) | @Test
method singleCJKCodePointHasSize1 (line 86) | @Test
method consumingSingleCJKCodePointShouldMoveIndex (line 93) | @Test
method consumingPastSingleCJKCodePointShouldThrow (line 101) | @Test
method singleCJKCodePointLookAheadShouldReturnCodePoint (line 109) | @Test
method singleCJKCodePointLookAheadPastEndShouldReturnEOF (line 116) | @Test
method singleEmojiCodePointHasSize1 (line 123) | @Test
method consumingSingleEmojiCodePointShouldMoveIndex (line 131) | @Test
method consumingPastEndOfEmojiCodePointWithShouldThrow (line 140) | @Test
method singleEmojiCodePointLookAheadShouldReturnCodePoint (line 151) | @Test
method singleEmojiCodePointLookAheadPastEndShouldReturnEOF (line 159) | @Test
method getTextWithLatin (line 167) | @Test
method getTextWithCJK (line 173) | @Test
method getTextWithEmoji (line 179) | @Test
method toStringWithLatin (line 189) | @Test
method toStringWithCJK (line 195) | @Test
method toStringWithEmoji (line 201) | @Test
method lookAheadWithLatin (line 211) | @Test
method lookAheadWithCJK (line 217) | @Test
method lookAheadWithEmoji (line 223) | @Test
method seekWithLatin (line 233) | @Test
method seekWithCJK (line 240) | @Test
method seekWithEmoji (line 247) | @Test
method lookBehindWithLatin (line 258) | @Test
method lookBehindWithCJK (line 265) | @Test
method lookBehindWithEmoji (line 272) | @Test
method asciiContentsShouldUse8BitBuffer (line 283) | @Test
method bmpContentsShouldUse16BitBuffer (line 290) | @Test
method smpContentsShouldUse32BitBuffer (line 297) | @Test
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/CustomDescriptors.java
class CustomDescriptors (line 15) | public class CustomDescriptors {
method getLineSeparatorLfDescriptor (line 37) | private static RuntimeTestDescriptor getLineSeparatorLfDescriptor() {
method getLineSeparatorCrLfDescriptor (line 58) | private static RuntimeTestDescriptor getLineSeparatorCrLfDescriptor() {
method getLargeLexerDescriptor (line 79) | private static RuntimeTestDescriptor getLargeLexerDescriptor() {
method getAtnStatesSizeMoreThan65535Descriptor (line 106) | private static RuntimeTestDescriptor getAtnStatesSizeMoreThan65535Desc...
method getMultiTokenAlternativeDescriptor (line 157) | private static RuntimeTestDescriptor getMultiTokenAlternativeDescripto...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/ErrorQueue.java
class ErrorQueue (line 18) | public class ErrorQueue implements ANTLRToolListener {
method ErrorQueue (line 25) | public ErrorQueue() {
method ErrorQueue (line 29) | public ErrorQueue(Tool tool) {
method info (line 33) | @Override
method error (line 38) | @Override
method warning (line 44) | @Override
method error (line 50) | public void error(ToolMessage msg) {
method size (line 55) | public int size() {
method toString (line 59) | @Override
method toString (line 64) | public String toString(boolean rendered) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/FileUtils.java
class FileUtils (line 23) | public class FileUtils {
method writeFile (line 24) | public static void writeFile(String dir, String fileName, String conte...
method readFile (line 34) | public static String readFile(String dir, String fileName) {
method replaceInFile (line 45) | public static void replaceInFile(Path sourcePath, String target, Strin...
method replaceInFile (line 49) | public static void replaceInFile(Path sourcePath, Path destPath, Strin...
method mkdir (line 57) | public static void mkdir(String dir) {
method deleteDirectory (line 63) | public static void deleteDirectory(File f) throws IOException {
method isLink (line 75) | public static boolean isLink(Path path) throws IOException {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/GeneratedFile.java
class GeneratedFile (line 3) | public class GeneratedFile {
method GeneratedFile (line 7) | public GeneratedFile(String name, boolean isParser) {
method toString (line 12) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/Generator.java
class Generator (line 21) | public class Generator {
method antlrOnString (line 23) | public static ErrorQueue antlrOnString(String workdir,
method antlrOnString (line 36) | public static ErrorQueue antlrOnString(String workdir,
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/GrammarType.java
type GrammarType (line 9) | public enum GrammarType {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/OSType.java
type OSType (line 9) | public enum OSType {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/Processor.java
class Processor (line 16) | public class Processor {
method run (line 29) | public static ProcessorResult run(String[] arguments, String workingDi...
method run (line 35) | public static ProcessorResult run(String[] arguments, String workingDi...
method Processor (line 39) | public Processor(String[] arguments, String workingDirectory, Map<Stri...
method start (line 47) | public ProcessorResult start() throws InterruptedException, IOException {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/ProcessorResult.java
class ProcessorResult (line 9) | public class ProcessorResult {
method ProcessorResult (line 14) | public ProcessorResult(int exitCode, String output, String errors) {
method isSuccess (line 20) | public boolean isSuccess() {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RunOptions.java
class RunOptions (line 11) | public class RunOptions {
method RunOptions (line 30) | public RunOptions(String grammarFileName, String grammarStr, String pa...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeRunner.java
class RuntimeRunner (line 25) | public abstract class RuntimeRunner implements AutoCloseable {
method getLanguage (line 27) | public abstract String getLanguage();
method getExtension (line 29) | protected String getExtension() { return getLanguage().toLowerCase(); }
method getTitleName (line 31) | protected String getTitleName() { return getLanguage(); }
method getTestFileName (line 33) | protected String getTestFileName() { return "Test"; }
method getLexerSuffix (line 35) | protected String getLexerSuffix() { return "Lexer"; }
method getParserSuffix (line 37) | protected String getParserSuffix() { return "Parser"; }
method getBaseListenerSuffix (line 39) | protected String getBaseListenerSuffix() { return "BaseListener"; }
method getListenerSuffix (line 41) | protected String getListenerSuffix() { return "Listener"; }
method getBaseVisitorSuffix (line 43) | protected String getBaseVisitorSuffix() { return "BaseVisitor"; }
method getVisitorSuffix (line 45) | protected String getVisitorSuffix() { return "Visitor"; }
method grammarNameToFileName (line 47) | protected String grammarNameToFileName(String grammarName) { return gr...
method getCompilerPath (line 54) | protected final String getCompilerPath() {
method getRuntimeToolPath (line 68) | protected final String getRuntimeToolPath() {
method getCompilerName (line 82) | protected String getCompilerName() { return null; }
method getRuntimeToolName (line 84) | protected String getRuntimeToolName() { return getLanguage().toLowerCa...
method getTestFileWithExt (line 86) | protected String getTestFileWithExt() { return getTestFileName() + "."...
method getExecFileName (line 88) | protected String getExecFileName() { return getTestFileWithExt(); }
method getExtraRunArgs (line 90) | protected String[] getExtraRunArgs() { return null; }
method getExecEnvironment (line 92) | protected Map<String, String> getExecEnvironment() { return null; }
method getPropertyPrefix (line 94) | protected String getPropertyPrefix() {
method getTempDirPath (line 98) | public final String getTempDirPath() {
method RuntimeRunner (line 106) | protected RuntimeRunner() {
method RuntimeRunner (line 110) | protected RuntimeRunner(Path tempDir, boolean saveTestDir) {
method setSaveTestDir (line 121) | public void setSaveTestDir(boolean saveTestDir) {
method close (line 125) | public void close() {
class InitializationStatus (line 131) | private static class InitializationStatus {
method getCachePath (line 143) | protected final String getCachePath() {
method getCachePath (line 147) | public static String getCachePath(String language) {
method getRuntimePath (line 151) | protected final String getRuntimePath() {
method getRuntimePath (line 155) | public static String getRuntimePath(String language) {
method getTargetToolOptions (line 162) | protected List<String> getTargetToolOptions(RunOptions ro) {
method run (line 166) | public State run(RunOptions runOptions) {
method getGeneratedFiles (line 210) | protected List<GeneratedFile> getGeneratedFiles(RunOptions runOptions) {
method writeRecognizerFile (line 238) | protected void writeRecognizerFile(RunOptions runOptions) {
method grammarParseRuleToRecognizerName (line 257) | protected String grammarParseRuleToRecognizerName(String startRuleName) {
method addExtraRecognizerParameters (line 261) | protected void addExtraRecognizerParameters(ST template) {
method initAntlrRuntimeIfRequired (line 264) | private boolean initAntlrRuntimeIfRequired(RunOptions runOptions) {
method initRuntime (line 298) | protected void initRuntime(RunOptions runOptions) throws Exception {
method compile (line 301) | protected CompiledState compile(RunOptions runOptions, GeneratedState ...
method writeInputFile (line 305) | protected void writeInputFile(RunOptions runOptions) {
method execute (line 309) | protected ExecutedState execute(RunOptions runOptions, CompiledState c...
method runCommand (line 334) | protected ProcessorResult runCommand(String[] command, String workPath...
method runCommand (line 338) | protected ProcessorResult runCommand(String[] command, String workPath...
method removeTempTestDirIfRequired (line 351) | private void removeTempTestDirIfRequired() {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestDescriptor.java
class RuntimeTestDescriptor (line 19) | public class RuntimeTestDescriptor {
method RuntimeTestDescriptor (line 65) | public RuntimeTestDescriptor(GrammarType testType, String name, String...
method ignore (line 91) | public boolean ignore(String targetName) {
method toString (line 95) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestDescriptorParser.java
class RuntimeTestDescriptorParser (line 15) | public class RuntimeTestDescriptorParser {
method parse (line 67) | public static RuntimeTestDescriptor parse(String name, String text, UR...
method getGrammarName (line 186) | private static String getGrammarName(String grammarDeclLine) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTestUtils.java
class RuntimeTestUtils (line 23) | public abstract class RuntimeTestUtils {
method isWindows (line 56) | public static boolean isWindows() {
method getOS (line 64) | public static OSType getOS() {
method getTextFromResource (line 83) | public static synchronized String getTextFromResource(String name) {
method checkRuleATN (line 98) | public static void checkRuleATN(Grammar g, String ruleName, String exp...
method joinLines (line 107) | public static String joinLines(Object... args) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/RuntimeTests.java
class RuntimeTests (line 41) | public abstract class RuntimeTests {
method createRuntimeRunner (line 42) | protected abstract RuntimeRunner createRuntimeRunner();
method runtimeTests (line 90) | @TestFactory
method test (line 117) | private static String test(RuntimeTestDescriptor descriptor, RuntimeRu...
method prepareGrammars (line 179) | private static String prepareGrammars(RuntimeTestDescriptor descriptor...
method assertCorrectOutput (line 214) | public static String assertCorrectOutput(RuntimeTestDescriptor descrip...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/Stage.java
type Stage (line 9) | public enum Stage {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/StreamReader.java
class StreamReader (line 15) | public final class StreamReader implements Runnable {
method StreamReader (line 20) | public StreamReader(InputStream in) {
method start (line 25) | public void start() {
method run (line 29) | @Override
method join (line 49) | public void join() throws InterruptedException {
method toString (line 53) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/TraceATN.java
class TraceATN (line 40) | public class TraceATN {
class IgnoreTokenVocabGrammar (line 41) | protected static class IgnoreTokenVocabGrammar extends Grammar {
method IgnoreTokenVocabGrammar (line 42) | public IgnoreTokenVocabGrammar(String fileName,
method importTokensFromTokensFile (line 51) | @Override
method TraceATN (line 65) | public TraceATN(String[] args) {
method test (line 114) | public String test(RuntimeTestDescriptor descriptor, RuntimeRunner run...
method execParse (line 180) | void execParse() throws Exception {
method getRunner (line 225) | public static RuntimeRunner getRunner(String targetName) throws Except...
method main (line 231) | public static void main(String[] args) throws Exception {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/CppRunner.java
class CppRunner (line 43) | public class CppRunner extends RuntimeRunner {
method getLanguage (line 44) | @Override
method getTitleName (line 49) | @Override
method getCompilerName (line 84) | @Override
method initRuntime (line 98) | @Override
method compile (line 120) | @Override
method writeVisualStudioProjectFile (line 162) | private void writeVisualStudioProjectFile(String grammarName, String l...
method getRuntimeToolName (line 175) | @Override
method getExecFileName (line 180) | @Override
method getExecEnvironment (line 185) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/cpp/CppRuntimeTests.java
class CppRuntimeTests (line 12) | public class CppRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/CSharpRunner.java
class CSharpRunner (line 18) | public class CSharpRunner extends RuntimeRunner {
method getLanguage (line 19) | @Override
method getTitleName (line 22) | @Override
method getExtension (line 25) | @Override
method getRuntimeToolName (line 28) | @Override
method getExecFileName (line 31) | @Override
method initRuntime (line 46) | @Override
method compile (line 55) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/csharp/CSharpRuntimeTests.java
class CSharpRuntimeTests (line 12) | public class CSharpRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/dart/DartRunner.java
class DartRunner (line 19) | public class DartRunner extends RuntimeRunner {
method getLanguage (line 20) | @Override
method initRuntime (line 27) | @Override
method compile (line 42) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/dart/DartRuntimeTests.java
class DartRuntimeTests (line 12) | public class DartRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/go/GoRunner.java
class GoRunner (line 21) | public class GoRunner extends RuntimeRunner {
method getLanguage (line 22) | @Override
method getLexerSuffix (line 27) | @Override
method getParserSuffix (line 32) | @Override
method getBaseListenerSuffix (line 37) | @Override
method getListenerSuffix (line 42) | @Override
method getBaseVisitorSuffix (line 47) | @Override
method getVisitorSuffix (line 52) | @Override
method grammarNameToFileName (line 57) | @Override
method getExtraRunArgs (line 62) | @Override
method initRuntime (line 80) | @Override
method grammarParseRuleToRecognizerName (line 98) | @Override
method getTargetToolOptions (line 118) | @Override
method compile (line 131) | @Override
method getExecEnvironment (line 161) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/go/GoRuntimeTests.java
class GoRuntimeTests (line 12) | public class GoRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/JavaRunner.java
class JavaRunner (line 37) | public class JavaRunner extends RuntimeRunner {
method getLanguage (line 38) | @Override
method JavaRunner (line 55) | public JavaRunner(Path tempDir, boolean saveTestDir) {
method JavaRunner (line 59) | public JavaRunner() {
method initRuntime (line 63) | @Override
method getCompilerName (line 68) | @Override
method writeInputFile (line 73) | @Override
method writeRecognizerFile (line 76) | @Override
method compile (line 79) | @Override
method execute (line 141) | @Override
class InMemoryStreamHelper (line 230) | static class InMemoryStreamHelper {
method InMemoryStreamHelper (line 234) | private InMemoryStreamHelper(PipedOutputStream pipedOutputStream, St...
method initialize (line 239) | public static InMemoryStreamHelper initialize() throws IOException {
method close (line 247) | public String close() throws InterruptedException, IOException {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/JavaRuntimeTests.java
class JavaRuntimeTests (line 12) | public class JavaRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/TestCharStreams.java
class TestCharStreams (line 28) | public class TestCharStreams {
method fromBMPStringHasExpectedSize (line 29) | @Test
method fromSMPStringHasExpectedSize (line 37) | @Test
method fromBMPUTF8PathHasExpectedSize (line 46) | @Test
method fromSMPUTF8PathHasExpectedSize (line 57) | @Test
method fromBMPUTF8InputStreamHasExpectedSize (line 68) | @Test
method fromSMPUTF8InputStreamHasExpectedSize (line 80) | @Test
method fromBMPUTF8ChannelHasExpectedSize (line 92) | @Test
method fromSMPUTF8ChannelHasExpectedSize (line 106) | @Test
method fromInvalidUTF8BytesChannelReplacesWithSubstCharInReplaceMode (line 120) | @Test
method fromInvalidUTF8BytesThrowsInReportMode (line 135) | @Test
method fromSMPUTF8SequenceStraddlingBufferBoundary (line 148) | @Test
method fromFileName (line 166) | @Test
method fromFileNameWithLatin1 (line 178) | @Test
method fromReader (line 189) | @Test
method fromSMPUTF16LEPathSMPHasExpectedSize (line 201) | @Test
method fromSMPUTF32LEPathSMPHasExpectedSize (line 212) | @Test
method getTestFile (line 225) | private Path getTestFile(Path dir) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/TestIntegerList.java
class TestIntegerList (line 15) | public class TestIntegerList {
method emptyListToEmptyCharArray (line 16) | @Test
method negativeIntegerToCharArrayThrows (line 22) | @Test
method surrogateRangeIntegerToCharArray (line 32) | @Test
method tooLargeIntegerToCharArrayThrows (line 42) | @Test
method unicodeBMPIntegerListToCharArray (line 52) | @Test
method unicodeSMPIntegerListToCharArray (line 62) | @Test
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/TestInterpreterDataReader.java
class TestInterpreterDataReader (line 33) | public class TestInterpreterDataReader {
method testParseFile (line 34) | @Test
method castList (line 88) | private <T> List<T> castList(Object obj, Class<T> clazz) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/TestExpectedTokens.java
class TestExpectedTokens (line 19) | public class TestExpectedTokens extends JavaRunner {
method testEpsilonAltSubrule (line 20) | @Test
method testOptionalSubrule (line 45) | @Test public void testOptionalSubrule() throws Exception {
method testFollowIncluded (line 68) | @Test public void testFollowIncluded() throws Exception {
method testFollowIncludedInLeftRecursiveRule (line 105) | @Test public void testFollowIncludedInLeftRecursiveRule() throws Excep...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/TestTokenStream.java
class TestTokenStream (line 20) | public class TestTokenStream {
method testBufferedTokenStreamReuseAfterFill (line 25) | @Test
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/TestTokenStreamRewriter.java
class TestTokenStreamRewriter (line 19) | public class TestTokenStreamRewriter {
method TestTokenStreamRewriter (line 22) | public TestTokenStreamRewriter() {
method testInsertBeforeIndex0 (line 25) | @Test
method testInsertAfterLastIndex (line 42) | @Test public void testInsertAfterLastIndex() throws Exception {
method test2InsertBeforeAfterMiddleIndex (line 59) | @Test public void test2InsertBeforeAfterMiddleIndex() throws Exception {
method testReplaceIndex0 (line 77) | @Test public void testReplaceIndex0() throws Exception {
method testReplaceLastIndex (line 94) | @Test public void testReplaceLastIndex() throws Exception {
method testReplaceMiddleIndex (line 111) | @Test public void testReplaceMiddleIndex() throws Exception {
method testToStringStartStop (line 128) | @Test public void testToStringStartStop() throws Exception {
method testToStringStartStop2 (line 165) | @Test public void testToStringStartStop2() throws Exception {
method test2ReplaceMiddleIndex (line 223) | @Test public void test2ReplaceMiddleIndex() throws Exception {
method test2ReplaceMiddleIndex1InsertBefore (line 241) | @Test public void test2ReplaceMiddleIndex1InsertBefore() throws Except...
method testReplaceThenDeleteMiddleIndex (line 260) | @Test public void testReplaceThenDeleteMiddleIndex() throws Exception {
method testInsertInPriorReplace (line 278) | @Test public void testInsertInPriorReplace() throws Exception {
method testInsertThenReplaceSameIndex (line 303) | @Test public void testInsertThenReplaceSameIndex() throws Exception {
method test2InsertMiddleIndex (line 323) | @Test public void test2InsertMiddleIndex() throws Exception {
method test2InsertThenReplaceIndex0 (line 341) | @Test public void test2InsertThenReplaceIndex0() throws Exception {
method testReplaceThenInsertBeforeLastIndex (line 360) | @Test public void testReplaceThenInsertBeforeLastIndex() throws Except...
method testInsertThenReplaceLastIndex (line 378) | @Test public void testInsertThenReplaceLastIndex() throws Exception {
method testReplaceThenInsertAfterLastIndex (line 396) | @Test public void testReplaceThenInsertAfterLastIndex() throws Excepti...
method testReplaceRangeThenInsertAtLeftEdge (line 414) | @Test public void testReplaceRangeThenInsertAtLeftEdge() throws Except...
method testReplaceRangeThenInsertAtRightEdge (line 432) | @Test public void testReplaceRangeThenInsertAtRightEdge() throws Excep...
method testReplaceRangeThenInsertAfterRightEdge (line 458) | @Test public void testReplaceRangeThenInsertAfterRightEdge() throws Ex...
method testReplaceAll (line 476) | @Test public void testReplaceAll() throws Exception {
method testReplaceSubsetThenFetch (line 493) | @Test public void testReplaceSubsetThenFetch() throws Exception {
method testReplaceThenReplaceSuperset (line 510) | @Test public void testReplaceThenReplaceSuperset() throws Exception {
method testReplaceThenReplaceLowerIndexedSuperset (line 537) | @Test public void testReplaceThenReplaceLowerIndexedSuperset() throws ...
method testReplaceSingleMiddleThenOverlappingSuperset (line 564) | @Test public void testReplaceSingleMiddleThenOverlappingSuperset() thr...
method testCombineInserts (line 582) | @Test public void testCombineInserts() throws Exception {
method testCombine3Inserts (line 600) | @Test public void testCombine3Inserts() throws Exception {
method testCombineInsertOnLeftWithReplace (line 619) | @Test public void testCombineInsertOnLeftWithReplace() throws Exception {
method testCombineInsertOnLeftWithDelete (line 639) | @Test public void testCombineInsertOnLeftWithDelete() throws Exception {
method testDisjointInserts (line 661) | @Test public void testDisjointInserts() throws Exception {
method testOverlappingReplace (line 680) | @Test public void testOverlappingReplace() throws Exception {
method testOverlappingReplace2 (line 700) | @Test public void testOverlappingReplace2() throws Exception {
method testOverlappingReplace3 (line 727) | @Test public void testOverlappingReplace3() throws Exception {
method testOverlappingReplace4 (line 747) | @Test public void testOverlappingReplace4() throws Exception {
method testDropIdenticalReplace (line 767) | @Test public void testDropIdenticalReplace() throws Exception {
method testDropPrevCoveredInsert (line 787) | @Test public void testDropPrevCoveredInsert() throws Exception {
method testLeaveAloneDisjointInsert (line 807) | @Test public void testLeaveAloneDisjointInsert() throws Exception {
method testLeaveAloneDisjointInsert2 (line 825) | @Test public void testLeaveAloneDisjointInsert2() throws Exception {
method testInsertBeforeTokenThenDeleteThatToken (line 843) | @Test public void testInsertBeforeTokenThenDeleteThatToken() throws Ex...
method testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder (line 862) | @Test
method testDistinguishBetweenInsertAfterAndInsertBeforeToPreserverOrder2 (line 883) | @Test
method testPreservesOrderOfContiguousInserts (line 907) | @Test
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/TestVisitors.java
class TestVisitors (line 24) | public class TestVisitors {
method testVisitTerminalNode (line 30) | @Test
method testVisitErrorNode (line 67) | @Test
method testShouldNotVisitEOF (line 115) | @Test
method testShouldNotVisitTerminal (line 146) | @Test
method testCalculatorVisitor (line 180) | @Test
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/Instrumentor.java
class Instrumentor (line 18) | public class Instrumentor {
method premain (line 21) | public static void premain(String args, Instrumentation I) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/api/perf/TimeLexerSpeed.java
class TimeLexerSpeed (line 168) | public class TimeLexerSpeed { // don't call it Test else it'll run durin...
method main (line 177) | public static void main(String[] args) throws Exception {
method compilerWarmUp (line 231) | public void compilerWarmUp(int n) throws Exception {
method load_legacy_java_ascii_file (line 246) | public void load_legacy_java_ascii_file(String resourceName, int n) th...
method load_legacy_java_ascii (line 277) | public void load_legacy_java_ascii(String resourceName, int n) throws ...
method load_legacy_java_utf8 (line 305) | public void load_legacy_java_utf8(String resourceName, int n) throws E...
method load_new_utf8 (line 335) | public void load_new_utf8(String resourceName, int n) throws Exception {
method lex_legacy_java_utf8 (line 365) | public void lex_legacy_java_utf8(int n, boolean clearLexerDFACache) th...
method lex_new_java_utf8 (line 382) | public void lex_new_java_utf8(int n, boolean clearLexerDFACache) throw...
method lex_legacy_grapheme_utf8 (line 399) | public void lex_legacy_grapheme_utf8(String fileName, int n, boolean c...
method lex_new_grapheme_utf8 (line 417) | public void lex_new_grapheme_utf8(String fileName, int n, boolean clea...
method tokenize (line 436) | public double tokenize(Lexer lexer, int n, boolean clearLexerDFACache) {
method avg (line 459) | public double avg(long[] values) {
method std (line 467) | public double std(double mean, List<Long> values) { // unbiased std dev
method basename (line 475) | public static String basename(String fullyQualifiedFileName) {
method dirname (line 480) | public static String dirname(String fullyQualifiedFileName) {
method basename (line 485) | public static String basename(Path path) {
method dirname (line 489) | public static String dirname(Path path) {
method getResourceSize (line 493) | public static long getResourceSize(ClassLoader loader, String resource...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/helpers/CustomStreamErrorListener.java
class CustomStreamErrorListener (line 9) | public class CustomStreamErrorListener extends BaseErrorListener {
method CustomStreamErrorListener (line 12) | public CustomStreamErrorListener(PrintStream printStream){
method syntaxError (line 16) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/helpers/RuntimeTestLexer.java
class RuntimeTestLexer (line 6) | public abstract class RuntimeTestLexer extends Lexer {
method RuntimeTestLexer (line 9) | public RuntimeTestLexer(CharStream input) { super(input); }
method setOutStream (line 11) | public void setOutStream(java.io.PrintStream outStream) { this.outStre...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/helpers/RuntimeTestParser.java
class RuntimeTestParser (line 6) | public abstract class RuntimeTestParser extends Parser {
method RuntimeTestParser (line 9) | public RuntimeTestParser(TokenStream input) {
method setOutStream (line 13) | public void setOutStream(java.io.PrintStream outStream) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/java/helpers/TreeShapeListener.java
class TreeShapeListener (line 6) | public class TreeShapeListener implements ParseTreeListener {
method visitTerminal (line 9) | @Override public void visitTerminal(TerminalNode node) { }
method visitErrorNode (line 10) | @Override public void visitErrorNode(ErrorNode node) { }
method exitEveryRule (line 11) | @Override public void exitEveryRule(ParserRuleContext ctx) { }
method enterEveryRule (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/JavaScriptRuntimeTests.java
class JavaScriptRuntimeTests (line 12) | public class JavaScriptRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/javascript/NodeRunner.java
class NodeRunner (line 19) | public class NodeRunner extends RuntimeRunner {
method getLanguage (line 20) | @Override
method getExtension (line 25) | @Override
method getBaseListenerSuffix (line 28) | @Override
method getBaseVisitorSuffix (line 31) | @Override
method getRuntimeToolName (line 34) | @Override
method compile (line 41) | @Override
method addExtraRecognizerParameters (line 59) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/php/PHPRunner.java
class PHPRunner (line 14) | public class PHPRunner extends RuntimeRunner {
method getLanguage (line 22) | @Override
method getExecEnvironment (line 27) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/php/PhpRuntimeTests.java
class PhpRuntimeTests (line 12) | public class PhpRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/python/PythonRunner.java
class PythonRunner (line 11) | public abstract class PythonRunner extends RuntimeRunner {
method getExtension (line 12) | @Override
method addExtraRecognizerParameters (line 15) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/python3/Python3Runner.java
class Python3Runner (line 14) | public class Python3Runner extends PythonRunner {
method getLanguage (line 23) | @Override
method getExecEnvironment (line 28) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/python3/Python3RuntimeTests.java
class Python3RuntimeTests (line 12) | public class Python3RuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/CompiledState.java
class CompiledState (line 11) | public class CompiledState extends State {
method getStage (line 12) | @Override
method CompiledState (line 17) | public CompiledState(GeneratedState previousState, Exception exception) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/ExecutedState.java
class ExecutedState (line 11) | public class ExecutedState extends State {
method getStage (line 12) | @Override
method ExecutedState (line 21) | public ExecutedState(CompiledState previousState, String output, Strin...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/GeneratedState.java
class GeneratedState (line 17) | public class GeneratedState extends State {
method getStage (line 18) | @Override
method containsErrors (line 26) | @Override
method getErrorMessage (line 31) | public String getErrorMessage() {
method GeneratedState (line 41) | public GeneratedState(ErrorQueue errorQueue, List<GeneratedFile> gene...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/JavaCompiledState.java
class JavaCompiledState (line 15) | public class JavaCompiledState extends CompiledState {
method JavaCompiledState (line 20) | public JavaCompiledState(GeneratedState previousState,
method initializeDummyLexerAndParser (line 32) | public Pair<Lexer, Parser> initializeDummyLexerAndParser()
method initializeLexerAndParser (line 37) | public Pair<Lexer, Parser> initializeLexerAndParser(String input)
method initializeLexer (line 44) | public Lexer initializeLexer(String input)
method initializeParser (line 50) | public Parser initializeParser(CommonTokenStream tokenStream)
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/JavaExecutedState.java
class JavaExecutedState (line 11) | public class JavaExecutedState extends ExecutedState {
method JavaExecutedState (line 14) | public JavaExecutedState(JavaCompiledState previousState, String outpu...
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/states/State.java
class State (line 11) | public abstract class State {
method getStage (line 16) | public abstract Stage getStage();
method containsErrors (line 18) | public boolean containsErrors() {
method getErrorMessage (line 22) | public String getErrorMessage() {
method State (line 34) | public State(State previousState, Exception exception) {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/swift/SwiftRunner.java
class SwiftRunner (line 27) | public class SwiftRunner extends RuntimeRunner {
method getLanguage (line 28) | @Override
method getTestFileName (line 33) | @Override
method getCompilerName (line 60) | @Override
method initRuntime (line 65) | @Override
method compile (line 70) | @Override
class NoSwiftFileFilter (line 110) | static class NoSwiftFileFilter implements FilenameFilter {
method accept (line 113) | public boolean accept(File dir, String name) {
method getRuntimeToolName (line 118) | @Override
method getExecFileName (line 123) | @Override
method getExecEnvironment (line 132) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/swift/SwiftRuntimeTests.java
class SwiftRuntimeTests (line 12) | public class SwiftRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/typescript/TsNodeRunner.java
class TsNodeRunner (line 18) | public class TsNodeRunner extends RuntimeRunner {
method getLanguage (line 25) | @Override
method initRuntime (line 31) | @Override
method npmInstallTsNodeAndWebpack (line 37) | private void npmInstallTsNodeAndWebpack() throws Exception {
method npmLinkRuntime (line 41) | private void npmLinkRuntime() throws Exception {
method getExtension (line 47) | @Override
method getExecFileName (line 50) | @Override
method getBaseListenerSuffix (line 53) | @Override
method getBaseVisitorSuffix (line 56) | @Override
method getRuntimeToolName (line 59) | @Override
method compile (line 62) | @Override
method npmInstall (line 84) | private void npmInstall() throws Exception {
method npmLinkAntlr4 (line 89) | private void npmLinkAntlr4() throws Exception {
FILE: runtime-testsuite/test/org/antlr/v4/test/runtime/typescript/TypeScriptRuntimeTests.java
class TypeScriptRuntimeTests (line 12) | public class TypeScriptRuntimeTests extends RuntimeTests {
method createRuntimeRunner (line 13) | @Override
FILE: runtime/CSharp/src/AntlrFileStream.cs
class AntlrFileStream (line 17) | public class AntlrFileStream : AntlrInputStream
method AntlrFileStream (line 22) | public AntlrFileStream(string fileName)
method AntlrFileStream (line 28) | public AntlrFileStream(string fileName, Encoding encoding)
method Load (line 35) | public virtual void Load(string fileName, Encoding encoding)
FILE: runtime/CSharp/src/AntlrInputStream.cs
class BaseInputCharStream (line 14) | public abstract class BaseInputCharStream : ICharStream
method Reset (line 39) | public virtual void Reset()
method Consume (line 44) | public virtual void Consume()
method LA (line 58) | public virtual int LA(int i)
method Lt (line 85) | public virtual int Lt(int i)
method Mark (line 116) | public virtual int Mark()
method Release (line 121) | public virtual void Release(int marker)
method Seek (line 133) | public virtual void Seek(int index)
method GetText (line 149) | public virtual string GetText(Interval interval)
method ValueAt (line 165) | protected abstract int ValueAt(int i);
method ConvertDataToString (line 167) | protected abstract string ConvertDataToString(int start, int count);
method ToString (line 169) | public override sealed string ToString()
class AntlrInputStream (line 202) | public class AntlrInputStream : BaseInputCharStream
method AntlrInputStream (line 207) | public AntlrInputStream()
method AntlrInputStream (line 212) | public AntlrInputStream(string input)
method AntlrInputStream (line 219) | public AntlrInputStream(char[] data, int numberOfActualCharsInArray)
method AntlrInputStream (line 226) | public AntlrInputStream(TextReader r)
method AntlrInputStream (line 232) | public AntlrInputStream(TextReader r, int initialSize)
method AntlrInputStream (line 238) | public AntlrInputStream(TextReader r, int initialSize, int readChunkSize)
method AntlrInputStream (line 244) | public AntlrInputStream(Stream input)
method AntlrInputStream (line 250) | public AntlrInputStream(Stream input, int initialSize)
method AntlrInputStream (line 256) | public AntlrInputStream(Stream input, int initialSize, int readChunkSize)
method Load (line 262) | public virtual void Load(TextReader r, int size, int readChunkSize)
method ValueAt (line 273) | protected override int ValueAt(int i)
method ConvertDataToString (line 278) | protected override string ConvertDataToString(int start, int count)
class CodePointCharStream (line 296) | public class CodePointCharStream : BaseInputCharStream
method CodePointCharStream (line 300) | public CodePointCharStream(string input)
method ValueAt (line 315) | protected override int ValueAt(int i)
method ConvertDataToString (line 320) | protected override string ConvertDataToString(int start, int count)
FILE: runtime/CSharp/src/Atn/ATN.cs
class ATN (line 16) | public class ATN
method ATN (line 88) | public ATN(ATNType grammarType, int maxTokenType)
method GetCachedContext (line 95) | public virtual PredictionContext GetCachedContext(PredictionContext co...
method NextTokens (line 116) | [return: NotNull]
method NextTokens (line 133) | [return: NotNull]
method AddState (line 145) | public virtual void AddState(ATNState state)
method RemoveState (line 155) | public virtual void RemoveState(ATNState state)
method DefineMode (line 161) | public virtual void DefineMode(string name, TokensStartState s)
method DefineDecisionState (line 170) | public virtual int DefineDecisionState(DecisionState s)
method GetDecisionState (line 179) | public virtual DecisionState GetDecisionState(int decision)
method GetExpectedTokens (line 229) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/ATNConfig.cs
class ATNConfig (line 23) | public class ATNConfig
method ATNConfig (line 72) | public ATNConfig(ATNConfig old)
method ATNConfig (line 81) | public ATNConfig(ATNState state,
method ATNConfig (line 88) | public ATNConfig(ATNState state,
method ATNConfig (line 99) | public ATNConfig(ATNConfig c, ATNState state)
method ATNConfig (line 104) | public ATNConfig(ATNConfig c, ATNState state,
method ATNConfig (line 110) | public ATNConfig(ATNConfig c,
method ATNConfig (line 116) | public ATNConfig(ATNConfig c, ATNState state,
method ATNConfig (line 122) | public ATNConfig(ATNConfig c, ATNState state,
method SetPrecedenceFilterSuppressed (line 154) | public void SetPrecedenceFilterSuppressed(bool value)
method Equals (line 169) | public override bool Equals(Object o)
method Equals (line 178) | public virtual bool Equals(ATNConfig other)
method GetHashCode (line 196) | public override int GetHashCode()
method ToString (line 207) | public override String ToString()
method ToString (line 212) | public String ToString(IRecognizer recog, bool showAlt)
FILE: runtime/CSharp/src/Atn/ATNConfigSet.cs
class ATNConfigSet (line 14) | public class ATNConfigSet
method ATNConfigSet (line 58) | public ATNConfigSet(bool fullCtx)
method ATNConfigSet (line 64) | public ATNConfigSet()
method ATNConfigSet (line 69) | public ATNConfigSet(ATNConfigSet old)
method Add (line 79) | public bool Add(ATNConfig config)
method Add (line 94) | public bool Add(ATNConfig config, MergeCache mergeCache)
method GetStates (line 140) | public HashSet<ATNState> GetStates()
method GetAlts (line 159) | public BitSet GetAlts()
method GetPredicates (line 169) | public List<SemanticContext> GetPredicates()
method Get (line 182) | public ATNConfig Get(int i) { return configs[i]; }
method OptimizeConfigs (line 184) | public void OptimizeConfigs(ATNSimulator interpreter)
method AddAll (line 200) | public bool AddAll(ICollection<ATNConfig> coll)
method Equals (line 206) | public override bool Equals(Object o)
method GetHashCode (line 232) | public override int GetHashCode()
method Contains (line 264) | public bool Contains(Object o)
method Clear (line 275) | public void Clear()
method ToString (line 297) | public override String ToString()
class OrderedATNConfigSet (line 329) | public class OrderedATNConfigSet : ATNConfigSet
method OrderedATNConfigSet (line 332) | public OrderedATNConfigSet()
class LexerConfigHashSet (line 337) | public class LexerConfigHashSet : ConfigHashSet
method LexerConfigHashSet (line 339) | public LexerConfigHashSet()
class ObjectEqualityComparator (line 346) | public class ObjectEqualityComparator : IEqualityComparer<ATNConfig>
method GetHashCode (line 350) | public int GetHashCode(ATNConfig o)
method Equals (line 358) | public bool Equals(ATNConfig a, ATNConfig b)
class ConfigHashSet (line 373) | public class ConfigHashSet : Dictionary<ATNConfig, ATNConfig>
method ConfigHashSet (line 375) | public ConfigHashSet(IEqualityComparer<ATNConfig> comparer)
method ConfigHashSet (line 381) | public ConfigHashSet()
method GetOrAdd (line 386) | public ATNConfig GetOrAdd(ATNConfig config)
class ConfigEqualityComparator (line 400) | public class ConfigEqualityComparator : IEqualityComparer<ATNConfig>
method GetHashCode (line 404) | public int GetHashCode(ATNConfig o)
method Equals (line 413) | public bool Equals(ATNConfig a, ATNConfig b)
FILE: runtime/CSharp/src/Atn/ATNDeserializationOptions.cs
class ATNDeserializationOptions (line 12) | public class ATNDeserializationOptions
method ATNDeserializationOptions (line 16) | static ATNDeserializationOptions()
method ATNDeserializationOptions (line 30) | public ATNDeserializationOptions()
method ATNDeserializationOptions (line 37) | public ATNDeserializationOptions(Antlr4.Runtime.Atn.ATNDeserialization...
method MakeReadOnly (line 61) | public void MakeReadOnly()
method ThrowIfReadOnly (line 108) | protected internal virtual void ThrowIfReadOnly()
FILE: runtime/CSharp/src/Atn/ATNDeserializer.cs
class ATNDeserializer (line 15) | public class ATNDeserializer
method ATNDeserializer (line 22) | public ATNDeserializer()
method ATNDeserializer (line 27) | public ATNDeserializer(ATNDeserializationOptions deserializationOptions)
method Deserialize (line 39) | public virtual ATN Deserialize(int[] data)
method OptimizeATN (line 67) | protected internal virtual void OptimizeATN(ATN atn)
method GenerateRuleBypassTransitions (line 88) | protected internal virtual void GenerateRuleBypassTransitions(ATN atn)
method ReadLexerActions (line 180) | protected internal virtual void ReadLexerActions(ATN atn)
method ReadDecisions (line 199) | protected internal virtual void ReadDecisions(ATN atn)
method ReadEdges (line 219) | protected internal virtual void ReadEdges(ATN atn, IList<IntervalSet> ...
method ReadSets (line 303) | protected internal virtual void ReadSets(ATN atn, IList<IntervalSet> s...
method ReadModes (line 326) | protected internal virtual void ReadModes(ATN atn)
method ReadRules (line 345) | protected internal virtual void ReadRules(ATN atn)
method ReadStates (line 379) | protected internal virtual void ReadStates(ATN atn)
method ReadATN (line 441) | protected internal virtual ATN ReadATN()
method CheckVersion (line 448) | protected internal virtual void CheckVersion()
method MarkPrecedenceDecisions (line 468) | protected internal virtual void MarkPrecedenceDecisions(ATN atn)
method VerifyATN (line 490) | protected internal virtual void VerifyATN(ATN atn)
method CheckCondition (line 560) | protected internal virtual void CheckCondition(bool condition)
method CheckCondition (line 565) | protected internal virtual void CheckCondition(bool condition, string ...
method InlineSetRules (line 573) | private static int InlineSetRules(ATN atn)
method CombineChainedEpsilons (line 705) | private static int CombineChainedEpsilons(ATN atn)
method OptimizeSets (line 774) | private static int OptimizeSets(ATN atn, bool preserveOrder)
method IdentifyTailCalls (line 880) | private static void IdentifyTailCalls(ATN atn)
method TestTailCall (line 911) | private static bool TestTailCall(ATN atn, RuleTransition transition, b...
method ReadInt (line 953) | protected internal int ReadInt()
method EdgeFactory (line 958) | [return: NotNull]
method StateFactory (line 1034) | protected internal virtual ATNState StateFactory(StateType type, int r...
method LexerActionFactory (line 1126) | protected internal virtual ILexerAction LexerActionFactory(LexerAction...
FILE: runtime/CSharp/src/Atn/ATNSimulator.cs
class ATNSimulator (line 14) | public abstract class ATNSimulator
method InitERROR (line 22) | static DFAState InitERROR()
method ATNSimulator (line 54) | public ATNSimulator(ATN atn, PredictionContextCache sharedContextCache)
method Reset (line 60) | public abstract void Reset();
method ClearDFA (line 73) | public virtual void ClearDFA()
method getSharedContextCache (line 78) | public PredictionContextCache getSharedContextCache()
method getCachedContext (line 83) | public PredictionContext getCachedContext(PredictionContext context)
FILE: runtime/CSharp/src/Atn/ATNState.cs
class ATNState (line 13) | public abstract class ATNState
method GetHashCode (line 43) | public override int GetHashCode()
method Equals (line 48) | public override bool Equals(object o)
method ToString (line 62) | public override string ToString()
method AddTransition (line 83) | public virtual void AddTransition(Antlr4.Runtime.Atn.Transition e)
method AddTransition (line 88) | public virtual void AddTransition(int index, Antlr4.Runtime.Atn.Transi...
method Transition (line 105) | public virtual Antlr4.Runtime.Atn.Transition Transition(int i)
method SetTransition (line 110) | public virtual void SetTransition(int i, Antlr4.Runtime.Atn.Transition e)
method RemoveTransition (line 115) | public virtual void RemoveTransition(int index)
method SetRuleIndex (line 133) | public virtual void SetRuleIndex(int ruleIndex)
method GetOptimizedTransition (line 154) | public virtual Antlr4.Runtime.Atn.Transition GetOptimizedTransition(in...
method AddOptimizedTransition (line 159) | public virtual void AddOptimizedTransition(Antlr4.Runtime.Atn.Transiti...
method SetOptimizedTransition (line 168) | public virtual void SetOptimizedTransition(int i, Antlr4.Runtime.Atn.T...
method RemoveOptimizedTransition (line 177) | public virtual void RemoveOptimizedTransition(int i)
method ATNState (line 186) | public ATNState()
FILE: runtime/CSharp/src/Atn/ATNType.cs
type ATNType (line 13) | public enum ATNType
FILE: runtime/CSharp/src/Atn/AbstractPredicateTransition.cs
class AbstractPredicateTransition (line 11) | public abstract class AbstractPredicateTransition : Transition
method AbstractPredicateTransition (line 13) | public AbstractPredicateTransition(ATNState target)
FILE: runtime/CSharp/src/Atn/ActionTransition.cs
class ActionTransition (line 10) | public sealed class ActionTransition : Transition
method ActionTransition (line 18) | public ActionTransition(ATNState target, int ruleIndex)
method ActionTransition (line 23) | public ActionTransition(ATNState target, int ruleIndex, int actionInde...
method Matches (line 49) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 54) | public override string ToString()
FILE: runtime/CSharp/src/Atn/AmbiguityInfo.cs
class AmbiguityInfo (line 42) | public class AmbiguityInfo : DecisionEventInfo
method AmbiguityInfo (line 70) | public AmbiguityInfo(int decision,
FILE: runtime/CSharp/src/Atn/ArrayPredictionContext.cs
class ArrayPredictionContext (line 14) | public class ArrayPredictionContext : PredictionContext
method ArrayPredictionContext (line 27) | public ArrayPredictionContext(SingletonPredictionContext a)
method ArrayPredictionContext (line 32) | public ArrayPredictionContext(PredictionContext[] parents, int[] retur...
method GetParent (line 58) | public override PredictionContext GetParent(int index)
method GetReturnState (line 63) | public override int GetReturnState(int index)
method Equals (line 73) | public override bool Equals(Object o)
method ToString (line 95) | public override String ToString()
FILE: runtime/CSharp/src/Atn/AtomTransition.cs
class AtomTransition (line 12) | public sealed class AtomTransition : Transition
method AtomTransition (line 18) | public AtomTransition(ATNState target, int token)
method Matches (line 40) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 45) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/BasicBlockStartState.cs
class BasicBlockStartState (line 11) | public sealed class BasicBlockStartState : BlockStartState
FILE: runtime/CSharp/src/Atn/BasicState.cs
class BasicState (line 11) | public sealed class BasicState : ATNState
FILE: runtime/CSharp/src/Atn/BlockEndState.cs
class BlockEndState (line 15) | public sealed class BlockEndState : ATNState
FILE: runtime/CSharp/src/Atn/BlockStartState.cs
class BlockStartState (line 15) | public abstract class BlockStartState : DecisionState
FILE: runtime/CSharp/src/Atn/ConflictInfo.cs
class ConflictInfo (line 12) | public class ConflictInfo
method ConflictInfo (line 18) | public ConflictInfo(BitSet conflictedAlts, bool exact)
method Equals (line 58) | public override bool Equals(object obj)
method GetHashCode (line 75) | public override int GetHashCode()
FILE: runtime/CSharp/src/Atn/ContextSensitivityInfo.cs
class ContextSensitivityInfo (line 29) | public class ContextSensitivityInfo : DecisionEventInfo
method ContextSensitivityInfo (line 47) | public ContextSensitivityInfo(int decision, ATNConfigSet configs, ITok...
FILE: runtime/CSharp/src/Atn/DecisionEventInfo.cs
class DecisionEventInfo (line 21) | public class DecisionEventInfo
method DecisionEventInfo (line 64) | public DecisionEventInfo(int decision,
FILE: runtime/CSharp/src/Atn/DecisionInfo.cs
class DecisionInfo (line 25) | public class DecisionInfo
method DecisionInfo (line 227) | public DecisionInfo(int decision)
method ToString (line 232) | public override string ToString()
FILE: runtime/CSharp/src/Atn/DecisionState.cs
class DecisionState (line 10) | public abstract class DecisionState : ATNState
FILE: runtime/CSharp/src/Atn/EmptyPredictionContext.cs
class EmptyPredictionContext (line 13) | public sealed class EmptyPredictionContext : SingletonPredictionContext
method EmptyPredictionContext (line 17) | internal EmptyPredictionContext()
method GetParent (line 22) | public override PredictionContext GetParent(int index)
method GetReturnState (line 27) | public override int GetReturnState(int index)
method Equals (line 49) | public override bool Equals(object o)
method ToString (line 54) | public override string ToString()
method ToStrings (line 59) | public override string[] ToStrings(IRecognizer recognizer, int current...
method ToStrings (line 64) | public override string[] ToStrings(IRecognizer recognizer, PredictionC...
FILE: runtime/CSharp/src/Atn/EpsilonTransition.cs
class EpsilonTransition (line 11) | public sealed class EpsilonTransition : Transition
method EpsilonTransition (line 15) | public EpsilonTransition(ATNState target)
method EpsilonTransition (line 20) | public EpsilonTransition(ATNState target, int outermostPrecedenceReturn)
method Matches (line 57) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 62) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/ErrorInfo.cs
class ErrorInfo (line 24) | public class ErrorInfo : DecisionEventInfo
method ErrorInfo (line 43) | public ErrorInfo(int decision, ATNConfigSet configs, ITokenStream inpu...
FILE: runtime/CSharp/src/Atn/ILexerAction.cs
type ILexerAction (line 23) | public interface ILexerAction
method Execute (line 76) | void Execute(Lexer lexer);
FILE: runtime/CSharp/src/Atn/LL1Analyzer.cs
class LL1Analyzer (line 11) | public class LL1Analyzer
method LL1Analyzer (line 21) | public LL1Analyzer(ATN atn)
method GetDecisionLookahead (line 36) | [return: Nullable]
method Look (line 78) | [return: NotNull]
method Look (line 102) | [return: NotNull]
method Look_ (line 142) | protected internal virtual void Look_(ATNState s, ATNState stopState, ...
FILE: runtime/CSharp/src/Atn/LexerATNConfig.cs
class LexerATNConfig (line 10) | public class LexerATNConfig : ATNConfig
method LexerATNConfig (line 20) | public LexerATNConfig(ATNState state,
method LexerATNConfig (line 29) | public LexerATNConfig(ATNState state,
method LexerATNConfig (line 39) | public LexerATNConfig(LexerATNConfig c, ATNState state)
method LexerATNConfig (line 46) | public LexerATNConfig(LexerATNConfig c, ATNState state,
method LexerATNConfig (line 54) | public LexerATNConfig(LexerATNConfig c, ATNState state,
method getLexerActionExecutor (line 66) | public LexerActionExecutor getLexerActionExecutor()
method hasPassedThroughNonGreedyDecision (line 71) | public bool hasPassedThroughNonGreedyDecision()
method GetHashCode (line 76) | public override int GetHashCode()
method Equals (line 89) | public override bool Equals(ATNConfig other)
method checkNonGreedyDecision (line 114) | private static bool checkNonGreedyDecision(LexerATNConfig source, ATNS...
FILE: runtime/CSharp/src/Atn/LexerATNSimulator.cs
class LexerATNSimulator (line 13) | public class LexerATNSimulator : ATNSimulator
method LexerATNSimulator (line 48) | public LexerATNSimulator(ATN atn, DFA[] decisionToDFA,
method LexerATNSimulator (line 54) | public LexerATNSimulator(Lexer recog, ATN atn,
method CopyState (line 65) | public void CopyState(LexerATNSimulator simulator)
method Match (line 73) | public int Match(ICharStream input, int mode)
method Reset (line 97) | public override void Reset()
method ClearDFA (line 106) | public override void ClearDFA()
method MatchATN (line 114) | protected int MatchATN(ICharStream input)
method ExecATN (line 141) | protected int ExecATN(ICharStream input, DFAState ds0)
method GetExistingTargetState (line 229) | protected DFAState GetExistingTargetState(DFAState s, int t)
method ComputeTargetState (line 258) | protected DFAState ComputeTargetState(ICharStream input, DFAState s, i...
method FailOrAccept (line 283) | protected int FailOrAccept(SimState prevAccept, ICharStream input,
method GetReachableConfigSet (line 308) | protected void GetReachableConfigSet(ICharStream input, ATNConfigSet c...
method Accept (line 352) | protected void Accept(ICharStream input, LexerActionExecutor lexerActi...
method GetReachableTarget (line 372) | protected ATNState GetReachableTarget(Transition trans, int t)
method ComputeStartState (line 383) | protected ATNConfigSet ComputeStartState(ICharStream input,
method Closure (line 407) | protected bool Closure(ICharStream input, LexerATNConfig config, ATNCo...
method GetEpsilonTarget (line 482) | protected LexerATNConfig GetEpsilonTarget(ICharStream input,
method EvaluatePredicate (line 600) | protected bool EvaluatePredicate(ICharStream input, int ruleIndex, int...
method CaptureSimState (line 631) | protected void CaptureSimState(SimState settings,
method AddDFAEdge (line 642) | protected DFAState AddDFAEdge(DFAState from,
method AddDFAEdge (line 672) | protected void AddDFAEdge(DFAState p, int t, DFAState q)
method AddDFAState (line 702) | protected DFAState AddDFAState(ATNConfigSet configSet)
method GetDFA (line 743) | public DFA GetDFA(int mode)
method GetText (line 751) | public String GetText(ICharStream input)
method Consume (line 782) | public virtual void Consume(ICharStream input)
method GetTokenName (line 797) | public String GetTokenName(int t)
class SimState (line 820) | public class SimState
method Reset (line 827) | public void Reset()
FILE: runtime/CSharp/src/Atn/LexerActionExecutor.cs
class LexerActionExecutor (line 27) | public class LexerActionExecutor
method LexerActionExecutor (line 48) | public LexerActionExecutor(ILexerAction[] lexerActions)
method Append (line 94) | [return: NotNull]
method FixOffsetBeforeMatch (line 146) | public virtual Antlr4.Runtime.Atn.LexerActionExecutor FixOffsetBeforeM...
method Execute (line 214) | public virtual void Execute(Lexer lexer, ICharStream input, int startI...
method GetHashCode (line 250) | public override int GetHashCode()
method Equals (line 255) | public override bool Equals(object obj)
FILE: runtime/CSharp/src/Atn/LexerActionType.cs
type LexerActionType (line 12) | public enum LexerActionType
FILE: runtime/CSharp/src/Atn/LexerChannelAction.cs
class LexerChannelAction (line 21) | public sealed class LexerChannelAction : ILexerAction
method LexerChannelAction (line 35) | public LexerChannelAction(int channel)
method Execute (line 95) | public void Execute(Lexer lexer)
method GetHashCode (line 100) | public override int GetHashCode()
method Equals (line 108) | public override bool Equals(object obj)
method ToString (line 124) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerCustomAction.cs
class LexerCustomAction (line 27) | public sealed class LexerCustomAction : ILexerAction
method LexerCustomAction (line 51) | public LexerCustomAction(int ruleIndex, int actionIndex)
method Execute (line 130) | public void Execute(Lexer lexer)
method GetHashCode (line 135) | public override int GetHashCode()
method Equals (line 144) | public override bool Equals(object obj)
FILE: runtime/CSharp/src/Atn/LexerIndexedCustomAction.cs
class LexerIndexedCustomAction (line 30) | public sealed class LexerIndexedCustomAction : ILexerAction
method LexerIndexedCustomAction (line 60) | public LexerIndexedCustomAction(int offset, ILexerAction action)
method Execute (line 145) | public void Execute(Lexer lexer)
method GetHashCode (line 151) | public override int GetHashCode()
method Equals (line 159) | public override bool Equals(object obj)
FILE: runtime/CSharp/src/Atn/LexerModeAction.cs
class LexerModeAction (line 22) | public sealed class LexerModeAction : ILexerAction
method LexerModeAction (line 36) | public LexerModeAction(int mode)
method Execute (line 93) | public void Execute(Lexer lexer)
method GetHashCode (line 98) | public override int GetHashCode()
method Equals (line 106) | public override bool Equals(object obj)
method ToString (line 122) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerMoreAction.cs
class LexerMoreAction (line 27) | public sealed class LexerMoreAction : ILexerAction
method LexerMoreAction (line 38) | private LexerMoreAction()
method Execute (line 76) | public void Execute(Lexer lexer)
method GetHashCode (line 81) | public override int GetHashCode()
method Equals (line 88) | public override bool Equals(object obj)
method ToString (line 93) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerPopModeAction.cs
class LexerPopModeAction (line 27) | public sealed class LexerPopModeAction : ILexerAction
method LexerPopModeAction (line 38) | private LexerPopModeAction()
method Execute (line 76) | public void Execute(Lexer lexer)
method GetHashCode (line 81) | public override int GetHashCode()
method Equals (line 88) | public override bool Equals(object obj)
method ToString (line 93) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerPushModeAction.cs
class LexerPushModeAction (line 21) | public sealed class LexerPushModeAction : ILexerAction
method LexerPushModeAction (line 35) | public LexerPushModeAction(int mode)
method Execute (line 92) | public void Execute(Lexer lexer)
method GetHashCode (line 97) | public override int GetHashCode()
method Equals (line 105) | public override bool Equals(object obj)
method ToString (line 121) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerSkipAction.cs
class LexerSkipAction (line 27) | public sealed class LexerSkipAction : ILexerAction
method LexerSkipAction (line 38) | private LexerSkipAction()
method Execute (line 76) | public void Execute(Lexer lexer)
method GetHashCode (line 81) | public override int GetHashCode()
method Equals (line 88) | public override bool Equals(object obj)
method ToString (line 93) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LexerTypeAction.cs
class LexerTypeAction (line 21) | public class LexerTypeAction : ILexerAction
method LexerTypeAction (line 35) | public LexerTypeAction(int type)
method Execute (line 88) | public virtual void Execute(Lexer lexer)
method GetHashCode (line 93) | public override int GetHashCode()
method Equals (line 101) | public override bool Equals(object obj)
method ToString (line 117) | public override string ToString()
FILE: runtime/CSharp/src/Atn/LookaheadEventInfo.cs
class LookaheadEventInfo (line 20) | public class LookaheadEventInfo : DecisionEventInfo
method LookaheadEventInfo (line 52) | public LookaheadEventInfo(int decision, ATNConfigSet configs, int pred...
FILE: runtime/CSharp/src/Atn/LoopEndState.cs
class LoopEndState (line 12) | public sealed class LoopEndState : ATNState
FILE: runtime/CSharp/src/Atn/MergeCache.cs
class MergeCache (line 10) | public class MergeCache
method Get (line 14) | public PredictionContext Get(PredictionContext a, PredictionContext b)
method Put (line 27) | public void Put(PredictionContext a, PredictionContext b, PredictionCo...
FILE: runtime/CSharp/src/Atn/NotSetTransition.cs
class NotSetTransition (line 11) | public sealed class NotSetTransition : SetTransition
method NotSetTransition (line 13) | public NotSetTransition(ATNState target, IntervalSet set)
method Matches (line 26) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 31) | public override string ToString()
FILE: runtime/CSharp/src/Atn/ParseInfo.cs
class ParseInfo (line 20) | public class ParseInfo
method ParseInfo (line 24) | public ParseInfo(ProfilingATNSimulator atnSimulator)
method getDecisionInfo (line 36) | public DecisionInfo[] getDecisionInfo()
method getLLDecisions (line 49) | public List<int> getLLDecisions()
method getTotalTimeInPrediction (line 66) | public long getTotalTimeInPrediction()
method getTotalSLLLookaheadOps (line 82) | public long getTotalSLLLookaheadOps()
method getTotalLLLookaheadOps (line 98) | public long getTotalLLLookaheadOps()
method getTotalSLLATNLookaheadOps (line 113) | public long getTotalSLLATNLookaheadOps()
method getTotalLLATNLookaheadOps (line 128) | public long getTotalLLATNLookaheadOps()
method getTotalATNLookaheadOps (line 147) | public long getTotalATNLookaheadOps()
method getDFASize (line 163) | public int getDFASize()
method getDFASize (line 178) | public int getDFASize(int decision)
FILE: runtime/CSharp/src/Atn/ParserATNSimulator.cs
class ParserATNSimulator (line 241) | public class ParserATNSimulator : ATNSimulator
method ParserATNSimulator (line 273) | public ParserATNSimulator(ATN atn, DFA[] decisionToDFA,
method ParserATNSimulator (line 279) | public ParserATNSimulator(Parser parser, ATN atn,
method Reset (line 291) | public override void Reset()
method ClearDFA (line 296) | public override void ClearDFA()
method AdaptivePredict (line 304) | public virtual int AdaptivePredict(ITokenStream input, int decision,
method ExecATN (line 418) | protected int ExecATN(DFA dfa, DFAState s0,
method GetExistingTargetState (line 551) | protected virtual DFAState GetExistingTargetState(DFAState previousD, ...
method ComputeTargetState (line 574) | protected virtual DFAState ComputeTargetState(DFA dfa, DFAState previo...
method PredicateDFAState (line 629) | protected void PredicateDFAState(DFAState dfaState, DecisionState deci...
method ExecATNWithFullContext (line 652) | protected int ExecATNWithFullContext(DFA dfa,
method ComputeReachSet (line 786) | protected virtual ATNConfigSet ComputeReachSet(ATNConfigSet closure, i...
method RemoveAllConfigsNotInRuleStopState (line 954) | protected ATNConfigSet RemoveAllConfigsNotInRuleStopState(ATNConfigSet...
method ComputeStartState (line 985) | protected ATNConfigSet ComputeStartState(ATNState p,
method ApplyPrecedenceFilter (line 1173) | protected ATNConfigSet ApplyPrecedenceFilter(ATNConfigSet configSet)
method GetReachableTarget (line 1233) | protected ATNState GetReachableTarget(Transition trans, int ttype)
method GetPredsForAmbigAlts (line 1243) | protected SemanticContext[] GetPredsForAmbigAlts(BitSet ambigAlts,
method GetPredicatePredictions (line 1292) | protected PredPrediction[] GetPredicatePredictions(BitSet ambigAlts,
method GetSynValidOrSemInvalidAltThatFinishedDecisionEntryRule (line 1365) | protected int GetSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(...
method getAltThatFinishedDecisionEntryRule (line 1389) | protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configSet)
method SplitAccordingToSemanticValidity (line 1412) | protected Pair<ATNConfigSet, ATNConfigSet> SplitAccordingToSemanticVal...
method EvalSemanticContext (line 1444) | protected virtual BitSet EvalSemanticContext(PredPrediction[] predPred...
method EvalSemanticContext (line 1512) | protected virtual bool EvalSemanticContext(SemanticContext pred, Parse...
method Closure (line 1524) | protected void Closure(ATNConfig config,
method ClosureCheckingStopState (line 1537) | protected void ClosureCheckingStopState(ATNConfig config,
method Closure_ (line 1606) | protected void Closure_(ATNConfig config,
method CanDropLoopEntryEdgeInLeftRecursiveRule (line 1777) | protected bool CanDropLoopEntryEdgeInLeftRecursiveRule(ATNConfig config)
method GetRuleName (line 1854) | public string GetRuleName(int index)
method GetEpsilonTarget (line 1861) | protected ATNConfig GetEpsilonTarget(ATNConfig config,
method ActionTransition (line 1909) | protected ATNConfig ActionTransition(ATNConfig config, ActionTransitio...
method PrecedenceTransition (line 1916) | public ATNConfig PrecedenceTransition(ATNConfig config,
method PredTransition (line 1966) | protected ATNConfig PredTransition(ATNConfig config,
method RuleTransition (line 2017) | protected ATNConfig RuleTransition(ATNConfig config, RuleTransition t)
method GetConflictingAlts (line 2040) | protected BitSet GetConflictingAlts(ATNConfigSet configSet)
method GetConflictingAltsOrUniqueAlt (line 2082) | protected BitSet GetConflictingAltsOrUniqueAlt(ATNConfigSet configSet)
method GetTokenName (line 2097) | public string GetTokenName(int t)
method GetLookaheadName (line 2114) | public string GetLookaheadName(ITokenStream input)
method DumpDeadEndConfigs (line 2123) | public void DumpDeadEndConfigs(NoViableAltException nvae)
method NoViableAlt (line 2150) | protected NoViableAltException NoViableAlt(ITokenStream input,
method GetUniqueAlt (line 2161) | protected static int GetUniqueAlt(ATNConfigSet configSet)
method AddDFAEdge (line 2198) | protected DFAState AddDFAEdge(DFA dfa,
method AddDFAState (line 2252) | protected DFAState AddDFAState(DFA dfa, DFAState D)
method ReportAttemptingFullContext (line 2280) | protected virtual void ReportAttemptingFullContext(DFA dfa, BitSet con...
method ReportContextSensitivity (line 2292) | protected virtual void ReportContextSensitivity(DFA dfa, int predictio...
method ReportAmbiguity (line 2304) | protected virtual void ReportAmbiguity(DFA dfa,
method getParser (line 2335) | public Parser getParser()
FILE: runtime/CSharp/src/Atn/PlusBlockStartState.cs
class PlusBlockStartState (line 22) | public sealed class PlusBlockStartState : BlockStartState
FILE: runtime/CSharp/src/Atn/PlusLoopbackState.cs
class PlusLoopbackState (line 18) | public sealed class PlusLoopbackState : DecisionState
FILE: runtime/CSharp/src/Atn/PrecedencePredicateTransition.cs
class PrecedencePredicateTransition (line 11) | public sealed class PrecedencePredicateTransition : AbstractPredicateTra...
method PrecedencePredicateTransition (line 15) | public PrecedencePredicateTransition(ATNState target, int precedence)
method Matches (line 37) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 50) | public override string ToString()
FILE: runtime/CSharp/src/Atn/PredicateEvalInfo.cs
class PredicateEvalInfo (line 21) | public class PredicateEvalInfo : DecisionEventInfo
method PredicateEvalInfo (line 77) | public PredicateEvalInfo(int decision, ITokenStream input, int startIn...
FILE: runtime/CSharp/src/Atn/PredicateTransition.cs
class PredicateTransition (line 22) | public sealed class PredicateTransition : AbstractPredicateTransition
method PredicateTransition (line 30) | public PredicateTransition(ATNState target, int ruleIndex, int predInd...
method Matches (line 55) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 68) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/PredictionContext.cs
class PredictionContext (line 13) | public abstract class PredictionContext
method CalculateEmptyHashCode (line 19) | protected internal static int CalculateEmptyHashCode()
method CalculateHashCode (line 26) | protected internal static int CalculateHashCode(PredictionContext pare...
method CalculateHashCode (line 35) | protected internal static int CalculateHashCode(PredictionContext[] pa...
method PredictionContext (line 52) | protected internal PredictionContext(int cachedHashCode)
method FromRuleContext (line 57) | public static PredictionContext FromRuleContext(ATN atn, RuleContext o...
method GetParent (line 74) | public abstract PredictionContext GetParent(int index);
method GetReturnState (line 76) | public abstract int GetReturnState(int index);
method GetHashCode (line 94) | public sealed override int GetHashCode()
method Merge (line 101) | internal static PredictionContext Merge(PredictionContext a, Predictio...
method MergeSingletons (line 137) | public static PredictionContext MergeSingletons(
method MergeArrays (line 225) | public static PredictionContext MergeArrays(
method CombineCommonParents (line 355) | protected static void CombineCommonParents(PredictionContext[] parents)
method MergeRoot (line 376) | public static PredictionContext MergeRoot(SingletonPredictionContext a,
method GetCachedContext (line 410) | public static PredictionContext GetCachedContext(PredictionContext con...
method GetChild (line 480) | public virtual PredictionContext GetChild(int returnState)
method ToStrings (line 486) | public virtual string[] ToStrings(IRecognizer recognizer, int currentS...
method ToStrings (line 491) | public virtual string[] ToStrings(IRecognizer recognizer, PredictionCo...
class IdentityHashMap (line 563) | public sealed class IdentityHashMap : Dictionary<PredictionContext, Pr...
method IdentityHashMap (line 565) | public IdentityHashMap()
class IdentityEqualityComparator (line 571) | public sealed class IdentityEqualityComparator : EqualityComparer<Pred...
method IdentityEqualityComparator (line 575) | private IdentityEqualityComparator()
method GetHashCode (line 579) | public override int GetHashCode(PredictionContext obj)
method Equals (line 584) | public override bool Equals(PredictionContext a, PredictionContext b)
FILE: runtime/CSharp/src/Atn/PredictionContextCache.cs
class PredictionContextCache (line 11) | public class PredictionContextCache
method Add (line 20) | public PredictionContext Add(PredictionContext ctx)
method Get (line 33) | public PredictionContext Get(PredictionContext ctx)
FILE: runtime/CSharp/src/Atn/PredictionMode.cs
class PredictionMode (line 22) | [System.Serializable]
class AltAndContextMap (line 93) | internal class AltAndContextMap : Dictionary<ATNConfig, BitSet>
method AltAndContextMap (line 95) | public AltAndContextMap()
class AltAndContextConfigEqualityComparator (line 101) | private sealed class AltAndContextConfigEqualityComparator : EqualityC...
method AltAndContextConfigEqualityComparator (line 105) | private AltAndContextConfigEqualityComparator()
method GetHashCode (line 116) | public override int GetHashCode(ATNConfig o)
method Equals (line 125) | public override bool Equals(ATNConfig a, ATNConfig b)
method HasSLLConflictTerminatingPrediction (line 243) | public static bool HasSLLConflictTerminatingPrediction(PredictionMode ...
method HasConfigInRuleStopState (line 293) | public static bool HasConfigInRuleStopState(IEnumerable<ATNConfig> con...
method AllConfigsInRuleStopStates (line 325) | public static bool AllConfigsInRuleStopStates(IEnumerable<ATNConfig> c...
method ResolvesToJustOneViableAlt (line 627) | public static int ResolvesToJustOneViableAlt(IEnumerable<BitSet> altsets)
method AllSubsetsConflict (line 651) | public static bool AllSubsetsConflict(IEnumerable<BitSet> altsets)
method HasNonConflictingAltSet (line 675) | public static bool HasNonConflictingAltSet(IEnumerable<BitSet> altsets)
method HasConflictingAltSet (line 706) | public static bool HasConflictingAltSet(IEnumerable<BitSet> altsets)
method AllSubsetsEqual (line 733) | public static bool AllSubsetsEqual(IEnumerable<BitSet> altsets)
method GetUniqueAlt (line 757) | public static int GetUniqueAlt(IEnumerable<BitSet> altsets)
method GetAlts (line 784) | public static BitSet GetAlts(IEnumerable<BitSet> altsets)
method GetConflictingAltSubsets (line 809) | [return: NotNull]
method GetStateToAltMap (line 841) | [return: NotNull]
method HasStateAssociatedWithOneAlt (line 858) | public static bool HasStateAssociatedWithOneAlt(IEnumerable<ATNConfig>...
method GetSingleViableAlt (line 871) | public static int GetSingleViableAlt(IEnumerable<BitSet> altsets)
FILE: runtime/CSharp/src/Atn/ProfilingATNSimulator.cs
class ProfilingATNSimulator (line 15) | public class ProfilingATNSimulator : ParserATNSimulator
method ProfilingATNSimulator (line 39) | public ProfilingATNSimulator(Parser parser)
method AdaptivePredict (line 54) | public override int AdaptivePredict(ITokenStream input, int decision, ...
method GetExistingTargetState (line 98) | protected override DFAState GetExistingTargetState(DFAState previousD,...
method ComputeTargetState (line 120) | protected override DFAState ComputeTargetState(DFA dfa, DFAState previ...
method ComputeReachSet (line 127) | protected override ATNConfigSet ComputeReachSet(ATNConfigSet closure, ...
method EvalSemanticContext (line 164) | protected override bool EvalSemanticContext(SemanticContext pred, Pars...
method ReportAttemptingFullContext (line 178) | protected override void ReportAttemptingFullContext(DFA dfa, BitSet co...
method ReportContextSensitivity (line 191) | protected override void ReportContextSensitivity(DFA dfa, int predicti...
method ReportAmbiguity (line 202) | protected override void ReportAmbiguity(DFA dfa, DFAState D, int start...
method getDecisionInfo (line 231) | public DecisionInfo[] getDecisionInfo()
method getCurrentState (line 236) | public DFAState getCurrentState()
FILE: runtime/CSharp/src/Atn/RangeTransition.cs
class RangeTransition (line 11) | public sealed class RangeTransition : Transition
method RangeTransition (line 17) | public RangeTransition(ATNState target, int from, int to)
method Matches (line 40) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 45) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/RuleStartState.cs
class RuleStartState (line 10) | public sealed class RuleStartState : ATNState
FILE: runtime/CSharp/src/Atn/RuleStopState.cs
class RuleStopState (line 17) | public sealed class RuleStopState : ATNState
FILE: runtime/CSharp/src/Atn/RuleTransition.cs
class RuleTransition (line 10) | public sealed class RuleTransition : Transition
method RuleTransition (line 25) | [Obsolete(@"UseRuleTransition(RuleStartState, int, int, ATNState) inst...
method RuleTransition (line 31) | public RuleTransition(RuleStartState ruleStart, int ruleIndex, int pre...
method Matches (line 56) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
FILE: runtime/CSharp/src/Atn/SemanticContext.cs
class SemanticContext (line 13) | public abstract class SemanticContext
method Eval (line 15) | public abstract bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol, A...
method EvalPrecedence (line 18) | public virtual SemanticContext EvalPrecedence<Symbol, ATNInterpreter>(...
class Empty (line 24) | public class Empty : SemanticContext
method Eval (line 28) | public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol,...
class Predicate (line 34) | public class Predicate : SemanticContext
method Predicate (line 42) | protected internal Predicate()
method Predicate (line 50) | public Predicate(int ruleIndex, int predIndex, bool isCtxDependent)
method Eval (line 57) | public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol,...
method GetHashCode (line 63) | public override int GetHashCode()
method Equals (line 73) | public override bool Equals(object obj)
method ToString (line 87) | public override string ToString()
class PrecedencePredicate (line 93) | public class PrecedencePredicate : SemanticContext, IComparable<Semant...
method PrecedencePredicate (line 97) | protected internal PrecedencePredicate()
method PrecedencePredicate (line 102) | public PrecedencePredicate(int precedence)
method Eval (line 107) | public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol,...
method EvalPrecedence (line 112) | public override SemanticContext EvalPrecedence<Symbol, ATNInterprete...
method CompareTo (line 124) | public virtual int CompareTo(SemanticContext.PrecedencePredicate o)
method GetHashCode (line 129) | public override int GetHashCode()
method Equals (line 136) | public override bool Equals(object obj)
method ToString (line 150) | public override string ToString()
class Operator (line 157) | public abstract class Operator : SemanticContext
class AND (line 166) | public class AND : SemanticContext.Operator
method AND (line 171) | public AND(SemanticContext a, SemanticContext b)
method Equals (line 208) | public override bool Equals(object obj)
method GetHashCode (line 222) | public override int GetHashCode()
method Eval (line 227) | public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol,...
method EvalPrecedence (line 239) | public override SemanticContext EvalPrecedence<Symbol, ATNInterprete...
method ToString (line 278) | public override string ToString()
class OR (line 284) | public class OR : SemanticContext.Operator
method OR (line 289) | public OR(SemanticContext a, SemanticContext b)
method Equals (line 326) | public override bool Equals(object obj)
method GetHashCode (line 340) | public override int GetHashCode()
method Eval (line 345) | public override bool Eval<Symbol, ATNInterpreter>(Recognizer<Symbol,...
method EvalPrecedence (line 357) | public override SemanticContext EvalPrecedence<Symbol, ATNInterprete...
method ToString (line 396) | public override string ToString()
method AndOp (line 402) | public static SemanticContext AndOp(SemanticContext a, SemanticContext b)
method OrOp (line 420) | public static SemanticContext OrOp(SemanticContext a, SemanticContext b)
method FilterPrecedencePredicates (line 442) | private static IList<SemanticContext.PrecedencePredicate> FilterPreced...
FILE: runtime/CSharp/src/Atn/SetTransition.cs
class SetTransition (line 13) | public class SetTransition : Transition
method SetTransition (line 18) | public SetTransition(ATNState target, IntervalSet set)
method Matches (line 45) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 50) | [return: NotNull]
FILE: runtime/CSharp/src/Atn/SimulatorState.cs
class SimulatorState (line 12) | public class SimulatorState
method SimulatorState (line 22) | public SimulatorState(ParserRuleContext outerContext, DFAState s0, boo...
FILE: runtime/CSharp/src/Atn/SingletonPredictionContext.cs
class SingletonPredictionContext (line 11) | public class SingletonPredictionContext : PredictionContext
method Create (line 13) | public static PredictionContext Create(PredictionContext parent, int r...
method SingletonPredictionContext (line 28) | internal SingletonPredictionContext(PredictionContext parent, int retu...
method GetParent (line 35) | public override PredictionContext GetParent(int index)
method GetReturnState (line 41) | public override int GetReturnState(int index)
method Equals (line 64) | public override bool Equals(object o)
method ToString (line 85) | public override string ToString()
FILE: runtime/CSharp/src/Atn/StarBlockStartState.cs
class StarBlockStartState (line 12) | public sealed class StarBlockStartState : BlockStartState
FILE: runtime/CSharp/src/Atn/StarLoopEntryState.cs
class StarLoopEntryState (line 8) | public sealed class StarLoopEntryState : DecisionState
FILE: runtime/CSharp/src/Atn/StarLoopbackState.cs
class StarLoopbackState (line 8) | public sealed class StarLoopbackState : ATNState
FILE: runtime/CSharp/src/Atn/StateType.cs
type StateType (line 8) | public enum StateType
FILE: runtime/CSharp/src/Atn/TokensStartState.cs
class TokensStartState (line 9) | public sealed class TokensStartState : DecisionState
FILE: runtime/CSharp/src/Atn/Transition.cs
class Transition (line 24) | public abstract class Transition
method Transition (line 33) | protected internal Transition(ATNState target)
method Matches (line 79) | public abstract bool Matches(int symbol, int minVocabSymbol, int maxVo...
FILE: runtime/CSharp/src/Atn/TransitionType.cs
type TransitionType (line 8) | public enum TransitionType
FILE: runtime/CSharp/src/Atn/WildcardTransition.cs
class WildcardTransition (line 9) | public sealed class WildcardTransition : Transition
method WildcardTransition (line 11) | public WildcardTransition(ATNState target)
method Matches (line 24) | public override bool Matches(int symbol, int minVocabSymbol, int maxVo...
method ToString (line 29) | [return: NotNull]
FILE: runtime/CSharp/src/BailErrorStrategy.cs
class BailErrorStrategy (line 44) | public class BailErrorStrategy : DefaultErrorStrategy
method Recover (line 60) | public override void Recover(Parser recognizer, RecognitionException e)
method RecoverInline (line 78) | public override IToken RecoverInline(Parser recognizer)
method Sync (line 90) | public override void Sync(Parser recognizer)
FILE: runtime/CSharp/src/BaseErrorListener.cs
class BaseErrorListener (line 21) | public class BaseErrorListener : IParserErrorListener
method SyntaxError (line 23) | public virtual void SyntaxError(TextWriter output, IRecognizer recogni...
method ReportAmbiguity (line 27) | public virtual void ReportAmbiguity(Parser recognizer, DFA dfa, int st...
method ReportAttemptingFullContext (line 31) | public virtual void ReportAttemptingFullContext(Parser recognizer, DFA...
method ReportContextSensitivity (line 35) | public virtual void ReportContextSensitivity(Parser recognizer, DFA df...
FILE: runtime/CSharp/src/BufferedTokenStream.cs
class BufferedTokenStream (line 34) | public class BufferedTokenStream : ITokenStream
method BufferedTokenStream (line 111) | public BufferedTokenStream(ITokenSource tokenSource)
method Mark (line 136) | public virtual int Mark()
method Release (line 141) | public virtual void Release(int marker)
method Reset (line 146) | public virtual void Reset()
method Seek (line 151) | public virtual void Seek(int index)
method Consume (line 165) | public virtual void Consume()
method Sync (line 212) | protected internal virtual bool Sync(int i)
method Fetch (line 232) | protected internal virtual int Fetch(int n)
method Get (line 255) | public virtual IToken Get(int i)
method Get (line 266) | public virtual IList<IToken> Get(int start, int stop)
method LA (line 290) | public virtual int LA(int i)
method Lb (line 295) | protected internal virtual IToken Lb(int k)
method LT (line 304) | [return: NotNull]
method AdjustSeekIndex (line 348) | protected internal virtual int AdjustSeekIndex(int i)
method LazyInit (line 353) | protected internal void LazyInit()
method Setup (line 361) | protected internal virtual void Setup()
method SetTokenSource (line 369) | public virtual void SetTokenSource(ITokenSource tokenSource)
method GetTokens (line 377) | public virtual IList<IToken> GetTokens()
method GetTokens (line 382) | public virtual IList<IToken> GetTokens(int start, int stop)
method GetTokens (line 398) | public virtual IList<IToken> GetTokens(int start, int stop, BitSet types)
method GetTokens (line 426) | public virtual IList<IToken> GetTokens(int start, int stop, int ttype)
method NextTokenOnChannel (line 446) | protected internal virtual int NextTokenOnChannel(int i, int channel)
method PreviousTokenOnChannel (line 488) | protected internal virtual int PreviousTokenOnChannel(int i, int channel)
method GetHiddenTokensToRight (line 519) | public virtual IList<IToken> GetHiddenTokensToRight(int tokenIndex, in...
method GetHiddenTokensToRight (line 547) | public virtual IList<IToken> GetHiddenTokensToRight(int tokenIndex)
method GetHiddenTokensToLeft (line 563) | public virtual IList<IToken> GetHiddenTokensToLeft(int tokenIndex, int...
method GetHiddenTokensToLeft (line 592) | public virtual IList<IToken> GetHiddenTokensToLeft(int tokenIndex)
method FilterForChannel (line 597) | protected internal virtual IList<IToken> FilterForChannel(int from, in...
method GetText (line 635) | [return: NotNull]
method GetText (line 642) | [return: NotNull]
method GetText (line 669) | [return: NotNull]
method GetText (line 675) | [return: NotNull]
method Fill (line 687) | public virtual void Fill()
FILE: runtime/CSharp/src/CharStreams.cs
class CharStreams (line 21) | public static class CharStreams
method fromPath (line 28) | public static ICharStream fromPath(string path)
method fromPath (line 38) | public static ICharStream fromPath(string path, Encoding encoding)
method fromTextReader (line 51) | public static ICharStream fromTextReader(TextReader textReader)
method fromStream (line 67) | public static ICharStream fromStream(Stream stream)
method fromStream (line 79) | public static ICharStream fromStream(Stream stream, Encoding encoding)
method fromString (line 88) | public static ICharStream fromString(string s)
FILE: runtime/CSharp/src/CommonToken.cs
class CommonToken (line 12) | [System.Serializable]
method CommonToken (line 92) | public CommonToken(int type)
method CommonToken (line 99) | public CommonToken(Tuple<ITokenSource, ICharStream> source, int type, ...
method CommonToken (line 121) | public CommonToken(int type, string text)
method CommonToken (line 162) | public CommonToken(IToken oldToken)
method ToString (line 332) | public override string ToString()
FILE: runtime/CSharp/src/CommonTokenFactory.cs
class CommonTokenFactory (line 19) | public class CommonTokenFactory : ITokenFactory
method CommonTokenFactory (line 78) | public CommonTokenFactory(bool copyText)
method CommonTokenFactory (line 97) | public CommonTokenFactory()
method Create (line 102) | public virtual CommonToken Create(Tuple<ITokenSource, ICharStream> sou...
method Create (line 121) | IToken ITokenFactory.Create(Tuple<ITokenSource, ICharStream> source, i...
method Create (line 126) | public virtual CommonToken Create(int type, string text)
method Create (line 131) | IToken ITokenFactory.Create(int type, string text)
FILE: runtime/CSharp/src/CommonTokenStream.cs
class CommonTokenStream (line 49) | public class CommonTokenStream : BufferedTokenStream
method CommonTokenStream (line 71) | public CommonTokenStream(ITokenSource tokenSource)
method CommonTokenStream (line 93) | public CommonTokenStream(ITokenSource tokenSource, int channel)
method AdjustSeekIndex (line 99) | protected internal override int AdjustSeekIndex(int i)
method Lb (line 104) | protected internal override IToken Lb(int k)
method LT (line 126) | public override IToken LT(int k)
method GetNumberOfOnChannelTokens (line 157) | public virtual int GetNumberOfOnChannelTokens()
FILE: runtime/CSharp/src/ConsoleErrorListener.cs
class ConsoleErrorListener (line 11) | public class ConsoleErrorListener<Symbol> : IAntlrErrorListener<Symbol>
method SyntaxError (line 38) | public virtual void SyntaxError(TextWriter output, IRecognizer recogni...
FILE: runtime/CSharp/src/DefaultErrorStrategy.cs
class DefaultErrorStrategy (line 19) | public class DefaultErrorStrategy : IAntlrErrorStrategy
method Reset (line 67) | public virtual void Reset(Parser recognizer)
method BeginErrorCondition (line 81) | protected internal virtual void BeginErrorCondition(Parser recognizer)
method InErrorRecoveryMode (line 87) | public virtual bool InErrorRecoveryMode(Parser recognizer)
method EndErrorCondition (line 101) | protected internal virtual void EndErrorCondition(Parser recognizer)
method ReportMatch (line 114) | public virtual void ReportMatch(Parser recognizer)
method ReportError (line 149) | public virtual void ReportError(Parser recognizer, RecognitionExceptio...
method NotifyErrorListeners (line 185) | protected internal virtual void NotifyErrorListeners(Parser recognizer...
method Recover (line 196) | public virtual void Recover(Parser recognizer, RecognitionException e)
method Sync (line 269) | public virtual void Sync(Parser recognizer)
method ReportNoViableAlternative (line 344) | protected internal virtual void ReportNoViableAlternative(Parser recog...
method ReportInputMismatch (line 377) | protected internal virtual void ReportInputMismatch(Parser recognizer,...
method ReportFailedPredicate (line 393) | protected internal virtual void ReportFailedPredicate(Parser recognize...
method ReportUnwantedToken (line 427) | protected internal virtual void ReportUnwantedToken(Parser recognizer)
method ReportMissingToken (line 466) | protected internal virtual void ReportMissingToken(Parser recognizer)
method RecoverInline (line 557) | public virtual IToken RecoverInline(Parser recognizer)
method SingleTokenInsertion (line 612) | protected internal virtual bool SingleTokenInsertion(Parser recognizer)
method SingleTokenDeletion (line 662) | [return: Nullable]
method GetMissingSymbol (line 701) | [return: NotNull]
method ConstructToken (line 726) | protected internal virtual IToken ConstructToken(ITokenSource tokenSou...
method GetExpectedTokens (line 732) | [return: NotNull]
method GetTokenErrorDisplay (line 752) | protected internal virtual string GetTokenErrorDisplay(IToken t)
method GetSymbolText (line 773) | protected internal virtual string GetSymbolText(IToken symbol)
method GetSymbolType (line 778) | protected internal virtual int GetSymbolType(IToken symbol)
method EscapeWSAndQuote (line 783) | [return: NotNull]
method GetErrorRecoverySet (line 793) | [return: NotNull]
method ConsumeUntil (line 815) | protected internal virtual void ConsumeUntil(Parser recognizer, Interv...
FILE: runtime/CSharp/src/Dependents.cs
type Dependents (line 12) | [Flags]
FILE: runtime/CSharp/src/Dfa/AbstractEdgeMap.cs
class AbstractEdgeMap (line 11) | public abstract class AbstractEdgeMap<T> : IEdgeMap<T>
method AbstractEdgeMap (line 18) | protected AbstractEdgeMap(int minIndex, int maxIndex)
method Put (line 26) | public abstract Antlr4.Runtime.Dfa.AbstractEdgeMap<T> Put(int key, T v...
method Put (line 28) | IEdgeMap<T> IEdgeMap<T>.Put(int key, T value)
method PutAll (line 33) | public virtual Antlr4.Runtime.Dfa.AbstractEdgeMap<T> PutAll(IEdgeMap<T...
method PutAll (line 43) | IEdgeMap<T> IEdgeMap<T>.PutAll(IEdgeMap<T> m)
method Clear (line 48) | public abstract Antlr4.Runtime.Dfa.AbstractEdgeMap<T> Clear();
method Clear (line 50) | IEdgeMap<T> IEdgeMap<T>.Clear()
method Remove (line 55) | public abstract Antlr4.Runtime.Dfa.AbstractEdgeMap<T> Remove(int key);
method Remove (line 57) | IEdgeMap<T> IEdgeMap<T>.Remove(int key)
method ContainsKey (line 62) | public abstract bool ContainsKey(int arg1);
method ToMap (line 79) | public abstract IReadOnlyDictionary<int, T> ToMap();
method GetEnumerator (line 81) | public virtual IEnumerator<KeyValuePair<int, T>> GetEnumerator()
method GetEnumerator (line 86) | IEnumerator IEnumerable.GetEnumerator()
FILE: runtime/CSharp/src/Dfa/AcceptStateInfo.cs
class AcceptStateInfo (line 20) | public class AcceptStateInfo
method AcceptStateInfo (line 26) | public AcceptStateInfo(int prediction)
method AcceptStateInfo (line 32) | public AcceptStateInfo(int prediction, Antlr4.Runtime.Atn.LexerActionE...
FILE: runtime/CSharp/src/Dfa/ArrayEdgeMap.cs
class ArrayEdgeMap (line 15) | public sealed class ArrayEdgeMap<T> : AbstractEdgeMap<T>
method ArrayEdgeMap (line 22) | public ArrayEdgeMap(int minIndex, int maxIndex)
method ContainsKey (line 44) | public override bool ContainsKey(int key)
method Put (line 62) | public override AbstractEdgeMap<T> Put(int key, T value)
method Remove (line 82) | public override AbstractEdgeMap<T> Remove(int key)
method PutAll (line 87) | public override AbstractEdgeMap<T> PutAll(IEdgeMap<T> m)
method Clear (line 138) | public override AbstractEdgeMap<T> Clear()
method ToMap (line 143) | public override IReadOnlyDictionary<int, T> ToMap()
FILE: runtime/CSharp/src/Dfa/DFA.cs
class DFA (line 12) | public class DFA
method DFA (line 34) | public DFA(DecisionState atnStartState)
method DFA (line 39) | public DFA(DecisionState atnStartState, int decision)
method GetPrecedenceStartState (line 85) | public DFAState GetPrecedenceStartState(int precedence)
method SetPrecedenceStartState (line 111) | public void SetPrecedenceStartState(int precedence, DFAState startState)
method GetStates (line 141) | public List<DFAState> GetStates()
method ToString (line 148) | public override String ToString() { return ToString(Vocabulary.EmptyVo...
method ToString (line 151) | public String ToString(IVocabulary vocabulary)
method ToLexerString (line 162) | public String ToLexerString()
FILE: runtime/CSharp/src/Dfa/DFASerializer.cs
class DFASerializer (line 16) | public class DFASerializer
method DFASerializer (line 30) | public DFASerializer(DFA dfa, IVocabulary vocabulary)
method DFASerializer (line 35) | public DFASerializer(DFA dfa, IRecognizer parser)
method DFASerializer (line 40) | public DFASerializer(DFA dfa, IVocabulary vocabulary, string[] ruleNam...
method ToString (line 48) | public override string ToString()
method GetContextLabel (line 88) | protected internal virtual string GetContextLabel(int i)
method GetEdgeLabel (line 106) | protected internal virtual string GetEdgeLabel(int i)
method GetStateString (line 111) | internal virtual string GetStateString(DFAState s)
FILE: runtime/CSharp/src/Dfa/DFAState.cs
class DFAState (line 38) | public class DFAState
method DFAState (line 86) | public DFAState() { }
method DFAState (line 88) | public DFAState(int stateNumber) { this.stateNumber = stateNumber; }
method DFAState (line 90) | public DFAState(ATNConfigSet configs) { this.configSet = configs; }
method getAltSet (line 95) | public HashSet<int> getAltSet()
method GetHashCode (line 110) | public override int GetHashCode()
method Equals (line 131) | public override bool Equals(Object o)
method ToString (line 148) | public override String ToString()
class PredPrediction (line 168) | public class PredPrediction
method PredPrediction (line 173) | public PredPrediction(SemanticContext pred, int alt)
method ToString (line 179) | public override String ToString()
FILE: runtime/CSharp/src/Dfa/EmptyEdgeMap.cs
class EmptyEdgeMap (line 16) | public sealed class EmptyEdgeMap<T> : AbstractEdgeMap<T>
method EmptyEdgeMap (line 19) | public EmptyEdgeMap(int minIndex, int maxIndex)
method Put (line 24) | public override AbstractEdgeMap<T> Put(int key, T value)
method Clear (line 34) | public override AbstractEdgeMap<T> Clear()
method Remove (line 39) | public override AbstractEdgeMap<T> Remove(int key)
method ContainsKey (line 60) | public override bool ContainsKey(int key)
method ToMap (line 73) | public override IReadOnlyDictionary<int, T> ToMap()
FILE: runtime/CSharp/src/Dfa/IEdgeMap.cs
type IEdgeMap (line 11) | public interface IEdgeMap<T> : IEnumerable<KeyValuePair<int, T>>
method ContainsKey (line 23) | bool ContainsKey(int key);
method Put (line 30) | [return: NotNull]
method Remove (line 33) | [return: NotNull]
method PutAll (line 36) | [return: NotNull]
method Clear (line 39) | [return: NotNull]
method ToMap (line 42) | [return: NotNull]
FILE: runtime/CSharp/src/Dfa/LexerDFASerializer.cs
class LexerDFASerializer (line 9) | public class LexerDFASerializer : DFASerializer
method LexerDFASerializer (line 11) | public LexerDFASerializer(DFA dfa)
method GetEdgeLabel (line 16) | [return: NotNull]
FILE: runtime/CSharp/src/Dfa/SingletonEdgeMap.cs
class SingletonEdgeMap (line 10) | public sealed class SingletonEdgeMap<T> : AbstractEdgeMap<T>
method SingletonEdgeMap (line 17) | public SingletonEdgeMap(int minIndex, int maxIndex, int key, T value)
method ContainsKey (line 64) | public override bool ContainsKey(int key)
method Put (line 81) | public override AbstractEdgeMap<T> Put(int key, T value)
method Remove (line 107) | public override AbstractEdgeMap<T> Remove(int key)
method Clear (line 116) | public override AbstractEdgeMap<T> Clear()
method ToMap (line 125) | public override IReadOnlyDictionary<int, T> ToMap()
FILE: runtime/CSharp/src/Dfa/SparseEdgeMap.cs
class SparseEdgeMap (line 13) | public sealed class SparseEdgeMap<T> : AbstractEdgeMap<T>
method SparseEdgeMap (line 22) | public SparseEdgeMap(int minIndex, int maxIndex)
method SparseEdgeMap (line 27) | public SparseEdgeMap(int minIndex, int maxIndex, int maxSparseSize)
method SparseEdgeMap (line 34) | private SparseEdgeMap(Antlr4.Runtime.Dfa.SparseEdgeMap<T> map, int max...
method ContainsKey (line 89) | public override bool ContainsKey(int key)
method Put (line 110) | public override AbstractEdgeMap<T> Put(int key, T value)
method Remove (line 159) | public override AbstractEdgeMap<T> Remove(int key)
method Clear (line 175) | public override AbstractEdgeMap<T> Clear()
method ToMap (line 184) | public override IReadOnlyDictionary<int, T> ToMap()
FILE: runtime/CSharp/src/DiagnosticErrorListener.cs
class DiagnosticErrorListener (line 36) | public class DiagnosticErrorListener : BaseErrorListener
method DiagnosticErrorListener (line 51) | public DiagnosticErrorListener()
method DiagnosticErrorListener (line 69) | public DiagnosticErrorListener(bool exactOnly)
method ReportAmbiguity (line 74) | public override void ReportAmbiguity(Parser recognizer, DFA dfa, int s...
method ReportAttemptingFullContext (line 88) | public override void ReportAttemptingFullContext(Parser recognizer, DF...
method ReportContextSensitivity (line 97) | public override void ReportContextSensitivity(Parser recognizer, DFA d...
method GetDecisionDescription (line 106) | protected internal virtual string GetDecisionDescription(Parser recogn...
method GetConflictingAlts (line 148) | [return: NotNull]
FILE: runtime/CSharp/src/FailedPredicateException.cs
class FailedPredicateException (line 20) | [System.Serializable]
method FailedPredicateException (line 31) | public FailedPredicateException(Parser recognizer)
method FailedPredicateException (line 36) | public FailedPredicateException(Parser recognizer, string predicate)
method FailedPredicateException (line 41) | public FailedPredicateException(Parser recognizer, string predicate, s...
method FormatMessage (line 85) | [return: NotNull]
FILE: runtime/CSharp/src/IAntlrErrorListener.cs
type IAntlrErrorListener (line 12) | public interface IAntlrErrorListener<in TSymbol>
method SyntaxError (line 54) | void SyntaxError(TextWriter output, IRecognizer recognizer, TSymbol of...
FILE: runtime/CSharp/src/IAntlrErrorStrategy.cs
type IAntlrErrorStrategy (line 31) | public interface IAntlrErrorStrategy
method Reset (line 39) | void Reset(Parser recognizer);
method RecoverInline (line 63) | [return: NotNull]
method Recover (line 83) | void Recover(Parser recognizer, RecognitionException e);
method Sync (line 110) | void Sync(Parser recognizer);
method InErrorRecoveryMode (line 133) | bool InErrorRecoveryMode(Parser recognizer);
method ReportMatch (line 144) | void ReportMatch(Parser recognizer);
method ReportError (line 154) | void ReportError(Parser recognizer, RecognitionException e);
FILE: runtime/CSharp/src/ICharStream.cs
type ICharStream (line 13) | public interface ICharStream : IIntStream
method GetText (line 51) | [return: NotNull]
FILE: runtime/CSharp/src/IIntStream.cs
type IIntStream (line 33) | public interface IIntStream
method Consume (line 71) | void Consume();
method LA (line 133) | int LA(int i);
method Mark (line 198) | int Mark();
method Release (line 223) | void Release(int marker);
method Seek (line 287) | void Seek(int index);
class IntStreamConstants (line 320) | public static class IntStreamConstants
FILE: runtime/CSharp/src/IParserErrorListener.cs
type IParserErrorListener (line 14) | public interface IParserErrorListener : IAntlrErrorListener<IToken>
method ReportAmbiguity (line 91) | void ReportAmbiguity(Parser recognizer, DFA dfa, int startIndex, int s...
method ReportAttemptingFullContext (line 125) | void ReportAttemptingFullContext(Parser recognizer, DFA dfa, int start...
method ReportContextSensitivity (line 176) | void ReportContextSensitivity(Parser recognizer, DFA dfa, int startInd...
FILE: runtime/CSharp/src/IRecognizer.cs
type IRecognizer (line 10) | public interface IRecognizer
FILE: runtime/CSharp/src/IToken.cs
type IToken (line 20) | public interface IToken
class TokenConstants (line 122) | public static class TokenConstants
FILE: runtime/CSharp/src/ITokenFactory.cs
type ITokenFactory (line 18) | public interface ITokenFactory
method Create (line 29) | [return: NotNull]
method Create (line 33) | [return: NotNull]
FILE: runtime/CSharp/src/ITokenSource.cs
type ITokenSource (line 32) | public interface ITokenSource
method NextToken (line 43) | [return: NotNull]
FILE: runtime/CSharp/src/ITokenStream.cs
type ITokenStream (line 18) | public interface ITokenStream : IIntStream
method LT (line 33) | [return: NotNull]
method Get (line 71) | [return: NotNull]
method GetText (line 116) | [return: NotNull]
method GetText (line 134) | [return: NotNull]
method GetText (line 166) | [return: NotNull]
method GetText (line 212) | [return: NotNull]
FILE: runtime/CSharp/src/IVocabulary.cs
type IVocabulary (line 21) | public interface IVocabulary
method getMaxTokenType (line 28) | int getMaxTokenType();
method GetLiteralName (line 84) | [return: Nullable]
method GetSymbolicName (line 148) | [return: Nullable]
method GetDisplayName (line 177) | [return: NotNull]
FILE: runtime/CSharp/src/IWritableToken.cs
type IWritableToken (line 10) | public interface IWritableToken : IToken
FILE: runtime/CSharp/src/InputMismatchException.cs
class InputMismatchException (line 18) | [System.Serializable]
method InputMismatchException (line 23) | public InputMismatchException(Parser recognizer)
FILE: runtime/CSharp/src/InterpreterRuleContext.cs
class InterpreterRuleContext (line 26) | public class InterpreterRuleContext : ParserRuleContext
method InterpreterRuleContext (line 44) | public InterpreterRuleContext(ParserRuleContext parent, int invokingSt...
FILE: runtime/CSharp/src/Lexer.cs
class Lexer (line 23) | public abstract class Lexer : Recognizer<int, LexerATNSimulator>, IToken...
method Lexer (line 102) | public Lexer(ICharStream input) : this(input, Console.Out, Console.Err...
method Lexer (line 104) | public Lexer(ICharStream input, TextWriter output, TextWriter errorOut...
method Reset (line 112) | public virtual void Reset()
method NextToken (line 141) | public virtual IToken NextToken()
method Skip (line 224) | public virtual void Skip()
method More (line 229) | public virtual void More()
method Mode (line 234) | public virtual void Mode(int m)
method PushMode (line 239) | public virtual void PushMode(int m)
method PopMode (line 245) | public virtual int PopMode()
method SetInputStream (line 271) | public virtual void SetInputStream(ICharStream input)
method Emit (line 314) | public virtual void Emit(IToken token)
method Emit (line 331) | public virtual IToken Emit()
method EmitEOF (line 338) | public virtual IToken EmitEOF()
method GetAllTokens (line 535) | public virtual IList<IToken> GetAllTokens()
method Recover (line 547) | public virtual void Recover(LexerNoViableAltException e)
method NotifyListeners (line 556) | public virtual void NotifyListeners(LexerNoViableAltException e)
method GetErrorDisplay (line 564) | public virtual string GetErrorDisplay(string s)
method GetErrorDisplay (line 575) | public virtual string GetErrorDisplay(int c)
method GetCharErrorDisplay (line 613) | public virtual string GetCharErrorDisplay(int c)
method Recover (line 630) | public virtual void Recover(RecognitionException re)
FILE: runtime/CSharp/src/LexerInterpreter.cs
class LexerInterpreter (line 16) | public class LexerInterpreter: Lexer
method LexerInterpreter (line 34) | [Obsolete("Use constructor with channelNames argument")]
method LexerInterpreter (line 40) | public LexerInterpreter(string grammarFileName, IVocabulary vocabulary...
FILE: runtime/CSharp/src/LexerNoViableAltException.cs
class LexerNoViableAltException (line 13) | [System.Serializable]
method LexerNoViableAltException (line 25) | public LexerNoViableAltException(Lexer lexer, ICharStream input, int s...
method ToString (line 57) | public override string ToString()
FILE: runtime/CSharp/src/ListTokenSource.cs
class ListTokenSource (line 27) | public class ListTokenSource : ITokenSource
method ListTokenSource (line 93) | public ListTokenSource(IList<IToken> tokens)
method ListTokenSource (line 133) | public ListTokenSource(IList<IToken> tokens, string sourceName)
method NextToken (line 185) | public virtual IToken NextToken()
FILE: runtime/CSharp/src/Misc/Args.cs
class Args (line 10) | public static class Args
method NotNull (line 19) | public static void NotNull(string parameterName, object value)
FILE: runtime/CSharp/src/Misc/ArrayList.cs
class ArrayList (line 10) | public class ArrayList<T> : List<T>
method ArrayList (line 13) | public ArrayList()
method ArrayList (line 17) | public ArrayList(int count)
method GetHashCode (line 22) | public override int GetHashCode()
method Equals (line 31) | public override bool Equals(object o)
method Equals (line 38) | public bool Equals(List<T> o)
FILE: runtime/CSharp/src/Misc/IIntSet.cs
type IIntSet (line 12) | public interface IIntSet
method Add (line 21) | void Add(int el);
method AddAll (line 46) | [return: NotNull]
method And (line 73) | [return: Nullable]
method Complement (line 113) | [return: Nullable]
method Or (line 147) | [return: Nullable]
method Subtract (line 187) | [return: Nullable]
method Equals (line 219) | bool Equals(object obj);
method Contains (line 257) | bool Contains(int el);
method Remove (line 269) | void Remove(int el);
method ToList (line 280) | [return: NotNull]
method ToString (line 284) | string ToString();
FILE: runtime/CSharp/src/Misc/Interval.cs
type Interval (line 11) | public struct Interval
method Interval (line 23) | public Interval(int a, int b)
method Of (line 40) | public static Antlr4.Runtime.Misc.Interval Of(int a, int b)
method Equals (line 62) | public override bool Equals(object o)
method GetHashCode (line 73) | public override int GetHashCode()
method StartsBeforeDisjoint (line 82) | public bool StartsBeforeDisjoint(Antlr4.Runtime.Misc.Interval other)
method StartsBeforeNonDisjoint (line 88) | public bool StartsBeforeNonDisjoint(Antlr4.Runtime.Misc.Interval other)
method StartsAfter (line 94) | public bool StartsAfter(Antlr4.Runtime.Misc.Interval other)
method StartsAfterDisjoint (line 100) | public bool StartsAfterDisjoint(Antlr4.Runtime.Misc.Interval other)
method StartsAfterNonDisjoint (line 106) | public bool StartsAfterNonDisjoint(Antlr4.Runtime.Misc.Interval other)
method Disjoint (line 113) | public bool Disjoint(Antlr4.Runtime.Misc.Interval other)
method Adjacent (line 119) | public bool Adjacent(Antlr4.Runtime.Misc.Interval other)
method ProperlyContains (line 124) | public bool ProperlyContains(Antlr4.Runtime.Misc.Interval other)
method Union (line 130) | public Antlr4.Runtime.Misc.Interval Union(Antlr4.Runtime.Misc.Interval...
method Intersection (line 136) | public Antlr4.Runtime.Misc.Interval Intersection(Antlr4.Runtime.Misc.I...
method DifferenceNotProperlyContained (line 154) | public Antlr4.Runtime.Misc.Interval? DifferenceNotProperlyContained(An...
method ToString (line 173) | public override string ToString()
FILE: runtime/CSharp/src/Misc/IntervalSet.cs
class IntervalSet (line 28) | public class IntervalSet : IIntSet
method IntervalSet (line 34) | static IntervalSet()
method IntervalSet (line 46) | public IntervalSet(IList<Interval> intervals)
method IntervalSet (line 51) | public IntervalSet(Antlr4.Runtime.Misc.IntervalSet set)
method IntervalSet (line 57) | public IntervalSet(params int[] els)
method Of (line 76) | [return: NotNull]
method Of (line 85) | public static Antlr4.Runtime.Misc.IntervalSet Of(int a, int b)
method Clear (line 92) | public virtual void Clear()
method Add (line 106) | public virtual void Add(int el)
method Add (line 124) | public virtual void Add(int a, int b)
method Add (line 130) | protected internal virtual void Add(Interval addition)
method Or (line 190) | public static Antlr4.Runtime.Misc.IntervalSet Or(Antlr4.Runtime.Misc.I...
method AddAll (line 200) | public virtual Antlr4.Runtime.Misc.IntervalSet AddAll(IIntSet set)
method Complement (line 227) | public virtual Antlr4.Runtime.Misc.IntervalSet Complement(int minEleme...
method Complement (line 236) | public virtual Antlr4.Runtime.Misc.IntervalSet Complement(IIntSet voca...
method Subtract (line 256) | public virtual Antlr4.Runtime.Misc.IntervalSet Subtract(IIntSet a)
method Subtract (line 280) | [return: NotNull]
method Or (line 362) | public virtual Antlr4.Runtime.Misc.IntervalSet Or(IIntSet a)
method And (line 374) | public virtual Antlr4.Runtime.Misc.IntervalSet And(IIntSet other)
method Contains (line 476) | public virtual bool Contains(int el)
method GetIntervals (line 573) | public virtual IList<Interval> GetIntervals()
method GetHashCode (line 578) | public override int GetHashCode()
method Equals (line 601) | public override bool Equals(object obj)
method ToString (line 611) | public override string ToString()
method ToString (line 616) | public virtual string ToString(bool elemAreChar)
method ToString (line 674) | public virtual string ToString(IVocabulary vocabulary)
method ElementName (line 718) | [return: NotNull]
method ToIntegerList (line 758) | public virtual ArrayList<int> ToIntegerList()
method ToList (line 775) | public virtual IList<int> ToList()
method ToSet (line 792) | public virtual HashSet<int> ToSet()
method ToArray (line 807) | public virtual int[] ToArray()
method Remove (line 812) | public virtual void Remove(int el)
method SetReadonly (line 868) | public virtual void SetReadonly(bool @readonly)
method AddAll (line 877) | IIntSet IIntSet.AddAll(IIntSet set)
method And (line 882) | IIntSet IIntSet.And(IIntSet a)
method Complement (line 887) | IIntSet IIntSet.Complement(IIntSet elements)
method Or (line 892) | IIntSet IIntSet.Or(IIntSet a)
method Subtract (line 897) | IIntSet IIntSet.Subtract(IIntSet a)
FILE: runtime/CSharp/src/Misc/MultiMap.cs
class MultiMap (line 11) | [System.Serializable]
method Map (line 16) | public virtual void Map(K key, V value)
method GetPairs (line 27) | public virtual IList<Tuple<K, V>> GetPairs()
FILE: runtime/CSharp/src/Misc/MurmurHash.cs
class MurmurHash (line 9) | public sealed class MurmurHash
method Initialize (line 16) | public static int Initialize()
method Initialize (line 28) | public static int Initialize(int seed)
method Update (line 41) | public static int Update(int hash, int value)
method Update (line 67) | public static int Update(int hash, object value)
method Finish (line 80) | public static int Finish(int hash, int numberOfWords)
method HashCode (line 102) | public static int HashCode<T>(T[] data, int seed)
method MurmurHash (line 113) | private MurmurHash()
FILE: runtime/CSharp/src/Misc/NotNullAttribute.cs
class NotNullAttribute (line 9) | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | At...
FILE: runtime/CSharp/src/Misc/NullableAttribute.cs
class NullableAttribute (line 9) | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | At...
FILE: runtime/CSharp/src/Misc/Pair.cs
class Pair (line 9) | public class Pair<A, B>
method Pair (line 14) | public Pair(A a, B b)
method Equals (line 20) | public override bool Equals(Object obj)
method GetHashCode (line 36) | public override int GetHashCode()
method ToString (line 44) | public override String ToString()
FILE: runtime/CSharp/src/Misc/ParseCanceledException.cs
class ParseCanceledException (line 21) | [Serializable]
method ParseCanceledException (line 24) | public ParseCanceledException()
method ParseCanceledException (line 28) | public ParseCanceledException(string message)
method ParseCanceledException (line 33) | public ParseCanceledException(Exception cause)
method ParseCanceledException (line 38) | public ParseCanceledException(string message, Exception cause)
FILE: runtime/CSharp/src/Misc/RuleDependencyChecker.cs
class RuleDependencyChecker (line 17) | public class RuleDependencyChecker
method CheckDependencies (line 21) | public static void CheckDependencies(Assembly assembly)
method GetTypesToCheck (line 60) | private static IEnumerable<TypeInfo> GetTypesToCheck(Assembly assembly)
method IsChecked (line 65) | private static bool IsChecked(Assembly assembly)
method MarkChecked (line 73) | private static void MarkChecked(Assembly assembly)
method CheckDependencies (line 81) | private static void CheckDependencies(IList<Tuple<RuleDependencyAttrib...
method ReportUnimplementedDependents (line 178) | private static void ReportUnimplementedDependents(StringBuilder errors...
method CheckDependencyVersion (line 189) | private static int CheckDependencyVersion(StringBuilder errors, Tuple<...
method GetRuleVersions (line 213) | private static int[] GetRuleVersions(TypeInfo recognizerClass, string[...
method GetRuleMethod (line 273) | private static MethodInfo GetRuleMethod(TypeInfo recognizerClass, stri...
method GetRuleNames (line 286) | private static string[] GetRuleNames(TypeInfo recognizerClass)
method GetDependencies (line 292) | public static IList<Tuple<RuleDependencyAttribute, ICustomAttributePro...
method GetElementDependencies (line 323) | private static void GetElementDependencies(ICustomAttributeProvider an...
method ExtractRuleRelations (line 331) | private static RuleDependencyChecker.RuleRelations ExtractRuleRelation...
method GetSerializedATN (line 359) | private static int[] GetSerializedATN(TypeInfo recognizerClass)
class RuleRelations (line 371) | private sealed class RuleRelations
method RuleRelations (line 377) | public RuleRelations(int ruleCount)
method AddRuleInvocation (line 391) | public bool AddRuleInvocation(int caller, int callee)
method GetAncestors (line 408) | public BitSet GetAncestors(int rule)
method GetDescendants (line 428) | public BitSet GetDescendants(int rule)
method RuleDependencyChecker (line 449) | private RuleDependencyChecker()
type ICustomAttributeProvider (line 453) | public interface ICustomAttributeProvider
method GetCustomAttributes (line 455) | object[] GetCustomAttributes(Type attributeType, bool inherit);
method AsCustomAttributeProvider (line 458) | protected static ICustomAttributeProvider AsCustomAttributeProvider(Ty...
method AsCustomAttributeProvider (line 463) | protected static ICustomAttributeProvider AsCustomAttributeProvider(Me...
method AsCustomAttributeProvider (line 468) | protected static ICustomAttributeProvider AsCustomAttributeProvider(Pa...
method AsCustomAttributeProvider (line 473) | protected static ICustomAttributeProvider AsCustomAttributeProvider(Fi...
class TypeCustomAttributeProvider (line 478) | protected sealed class TypeCustomAttributeProvider : ICustomAttributeP...
method TypeCustomAttributeProvider (line 482) | public TypeCustomAttributeProvider(TypeInfo provider)
method GetCustomAttributes (line 487) | public object[] GetCustomAttributes(Type attributeType, bool inherit)
class MethodBaseCustomAttributeProvider (line 493) | protected sealed class MethodBaseCustomAttributeProvider : ICustomAttr...
method MethodBaseCustomAttributeProvider (line 497) | public MethodBaseCustomAttributeProvider(MethodBase provider)
method GetCustomAttributes (line 502) | public object[] GetCustomAttributes(Type attributeType, bool inherit)
class ParameterInfoCustomAttributeProvider (line 508) | protected sealed class ParameterInfoCustomAttributeProvider : ICustomA...
method ParameterInfoCustomAttributeProvider (line 512) | public ParameterInfoCustomAttributeProvider(ParameterInfo provider)
method GetCustomAttributes (line 517) | public object[] GetCustomAttributes(Type attributeType, bool inherit)
class FieldInfoCustomAttributeProvider (line 523) | protected sealed class FieldInfoCustomAttributeProvider : ICustomAttri...
method FieldInfoCustomAttributeProvider (line 527) | public FieldInfoCustomAttributeProvider(FieldInfo provider)
method GetCustomAttributes (line 532) | public object[] GetCustomAttributes(Type attributeType, bool inherit)
FILE: runtime/CSharp/src/Misc/Utils.cs
class StaticUtils (line 11) | public static class StaticUtils
method ToString (line 13) | public static string ToString<T>(this IEnumerable<T> list)
class Utils (line 19) | public class Utils
method Join (line 21) | public static string Join<T>(string separator, IEnumerable<T> items)
method NumNonnull (line 26) | public static int NumNonnull(object[] data)
method RemoveAllElements (line 43) | public static void RemoveAllElements<T>(ICollection<T> data, T value)
method EscapeWhitespace (line 55) | public static string EscapeWhitespace(string s, bool escapeSpaces)
method RemoveAll (line 93) | public static void RemoveAll<T>(IList<T> list, Predicate<T> predicate)
method ToMap (line 119) | public static IDictionary<string, int> ToMap(string[] keys)
FILE: runtime/CSharp/src/NoViableAltException.cs
class NoViableAltException (line 22) | [System.Serializable]
method NoViableAltException (line 44) | public NoViableAltException(Parser recognizer)
method NoViableAltException (line 49) | public NoViableAltException(IRecognizer recognizer, ITokenStream input...
FILE: runtime/CSharp/src/Parser.cs
class Parser (line 20) | public abstract class Parser : Recognizer<IToken, ParserATNSimulator>
class TraceListener (line 22) | public class TraceListener : IParseTreeListener
method TraceListener (line 25) | public TraceListener(TextWriter output,Parser enclosing) {
method EnterEveryRule (line 30) | public virtual void EnterEveryRule(ParserRuleContext ctx)
method ExitEveryRule (line 35) | public virtual void ExitEveryRule(ParserRuleContext ctx)
method VisitErrorNode (line 40) | public virtual void VisitErrorNode(IErrorNode node)
method VisitTerminal (line 44) | public virtual void VisitTerminal(ITerminalNode node)
method TraceListener (line 51) | internal TraceListener(Parser _enclosing)
class TrimToSizeListener (line 61) | public class TrimToSizeListener : IParseTreeListener
method VisitTerminal (line 65) | public virtual void VisitTerminal(ITerminalNode node)
method VisitErrorNode (line 69) | public virtual void VisitErrorNode(IErrorNode node)
method EnterEveryRule (line 73) | public virtual void EnterEveryRule(ParserRuleContext ctx)
method ExitEveryRule (line 77) | public virtual void ExitEveryRule(ParserRuleContext ctx)
method Parser (line 173) | public Parser(ITokenStream input) : this(input, Console.Out, Console.E...
method Parser (line 175) | public Parser(ITokenStream input, TextWriter output, TextWriter errorO...
method Reset (line 183) | public virtual void Reset()
method Match (line 235) | [return: NotNull]
method MatchWildcard (line 286) | [return: NotNull]
method AddParseListener (line 450) | public virtual void AddParseListener(IParseTreeListener listener)
method RemoveParseListener (line 476) | public virtual void RemoveParseListener(IParseTreeListener listener)
method RemoveParseListeners (line 493) | public virtual void RemoveParseListeners()
method TriggerEnterRuleEvent (line 501) | protected internal virtual void TriggerEnterRuleEvent()
method TriggerExitRuleEvent (line 513) | protected internal virtual void TriggerExitRuleEvent()
method GetATNWithBypassAlts (line 563) | [return: NotNull]
method CompileParseTreePattern (line 594) | public virtual ParseTreePattern CompileParseTreePattern(string pattern...
method CompileParseTreePattern (line 615) | public virtual ParseTreePattern CompileParseTreePattern(string pattern...
method NotifyErrorListeners (line 672) | public void NotifyErrorListeners(string msg)
method NotifyErrorListeners (line 677) | public virtual void NotifyErrorListeners(IToken offendingToken, string...
method Consume (line 724) | public virtual IToken Consume()
method AddContextToParseTree (line 760) | protected internal virtual void AddContextToParseTree()
method EnterRule (line 776) | public virtual void EnterRule(ParserRuleContext localctx, int state, i...
method EnterLeftFactoredRule (line 791) | public virtual void EnterLeftFactoredRule(ParserRuleContext localctx, ...
method ExitRule (line 813) | public virtual void ExitRule()
method EnterOuterAlt (line 825) | public virtual void EnterOuterAlt(ParserRuleContext localctx, int altNum)
method EnterRecursionRule (line 860) | [Obsolete(@"UseEnterRecursionRule(ParserRuleContext, int, int, int) in...
method EnterRecursionRule (line 866) | public virtual void EnterRecursionRule(ParserRuleContext localctx, int...
method PushNewRecursionContext (line 884) | public virtual void PushNewRecursionContext(ParserRuleContext localctx...
method UnrollRecursionContexts (line 903) | public virtual void UnrollRecursionContexts(ParserRuleContext _parentctx)
method GetInvokingContext (line 931) | public virtual ParserRuleContext GetInvokingContext(int ruleIndex)
method Precpred (line 958) | public override bool Precpred(RuleContext localctx, int precedence)
method InContext (line 971) | public virtual bool InContext(string context)
method IsExpectedToken (line 999) | public virtual bool IsExpectedToken(int symbol)
method GetExpectedTokens (line 1043) | [return: NotNull]
method GetExpectedTokensWithinCurrentRule (line 1049) | [return: NotNull]
method GetRuleIndex (line 1062) | public virtual int GetRuleIndex(string ruleName)
method GetRuleInvocationStack (line 1091) | public virtual IList<string> GetRuleInvocationStack()
method GetRuleInvocationStackAsString (line 1096) | public virtual string GetRuleInvocationStackAsString()
method GetRuleInvocationStack (line 1108) | public virtual IList<string> GetRuleInvocationStack(RuleContext p)
method GetDFAStrings (line 1131) | public virtual IList<string> GetDFAStrings()
method DumpDFA (line 1144) | public virtual void DumpDFA()
FILE: runtime/CSharp/src/ParserInterpreter.cs
class ParserInterpreter (line 29) | public class ParserInterpreter : Parser
method ParserInterpreter (line 46) | public ParserInterpreter(string grammarFileName, IVocabulary vocabular...
method Parse (line 112) | public virtual ParserRuleContext Parse(int startRuleIndex)
method EnterRecursionRule (line 170) | public override void EnterRecursionRule(ParserRuleContext localctx, in...
method VisitState (line 184) | protected internal virtual void VisitState(ATNState p)
method VisitRuleStopState (line 283) | protected internal virtual void VisitRuleStopState(ATNState p)
FILE: runtime/CSharp/src/ParserRuleContext.cs
class ParserRuleContext (line 35) | public class ParserRuleContext : RuleContext
method ParserRuleContext (line 106) | public ParserRuleContext()
method CopyFrom (line 131) | public virtual void CopyFrom(Antlr4.Runtime.ParserRuleContext ctx)
method ParserRuleContext (line 156) | public ParserRuleContext(Antlr4.Runtime.ParserRuleContext parent, int ...
method EnterRule (line 162) | public virtual void EnterRule(IParseTreeListener listener)
method ExitRule (line 166) | public virtual void ExitRule(IParseTreeListener listener)
method AddChild (line 171) | public virtual void AddChild(ITerminalNode t)
method AddChild (line 181) | public virtual void AddChild(RuleContext ruleInvocation)
method RemoveLastChild (line 200) | public virtual void RemoveLastChild()
method AddChild (line 212) | public virtual ITerminalNode AddChild(IToken matchedToken)
method AddErrorNode (line 220) | public virtual IErrorNode AddErrorNode(IToken badToken)
method GetChild (line 229) | public override IParseTree GetChild(int i)
method GetChild (line 234) | public virtual T GetChild<T>(int i)
method GetToken (line 259) | public virtual ITerminalNode GetToken(int ttype, int i)
method GetTokens (line 288) | public virtual ITerminalNode[] GetTokens(int ttype)
method GetRuleContext (line 322) | public virtual T GetRuleContext<T>(int i)
method GetRuleContexts (line 328) | public virtual T[] GetRuleContexts<T>()
method ToInfoString (line 389) | public virtual string ToInfoString(Parser recognizer)
FILE: runtime/CSharp/src/ProxyErrorListener.cs
class ProxyErrorListener (line 18) | public class ProxyErrorListener<Symbol> : IAntlrErrorListener<Symbol>
method ProxyErrorListener (line 22) | public ProxyErrorListener(IEnumerable<IAntlrErrorListener<Symbol>> del...
method SyntaxError (line 39) | public virtual void SyntaxError(TextWriter output, IRecognizer recogni...
FILE: runtime/CSharp/src/ProxyParserErrorListener.cs
class ProxyParserErrorListener (line 13) | public class ProxyParserErrorListener : ProxyErrorListener<IToken>, IPar...
method ProxyParserErrorListener (line 15) | public ProxyParserErrorListener(ICollection<IAntlrErrorListener<IToken...
method ReportAmbiguity (line 20) | public virtual void ReportAmbiguity(Parser recognizer, DFA dfa, int st...
method ReportAttemptingFullContext (line 33) | public virtual void ReportAttemptingFullContext(Parser recognizer, DFA...
method ReportContextSensitivity (line 46) | public virtual void ReportContextSensitivity(Parser recognizer, DFA df...
FILE: runtime/CSharp/src/RecognitionException.cs
class RecognitionException (line 21) | [System.Serializable]
method RecognitionException (line 52) | public RecognitionException(Lexer lexer, ICharStream input)
method RecognitionException (line 59) | public RecognitionException(IRecognizer recognizer, IIntStream input, ...
method RecognitionException (line 70) | public RecognitionException(string message, IRecognizer recognizer, II...
method GetExpectedTokens (line 129) | [return: Nullable]
FILE: runtime/CSharp/src/Recognizer.cs
class Recognizer (line 14) | public abstract class Recognizer<Symbol, ATNInterpreter> : IRecognizer
method CreateTokenTypeMap (line 75) | protected virtual IDictionary<string, int> CreateTokenTypeMap(IVocabul...
method GetTokenType (line 115) | public virtual int GetTokenType(string tokenName)
method GetErrorHeader (line 211) | [return: NotNull]
method GetTokenErrorDisplay (line 233) | [ObsoleteAttribute(@"This method is not called by the ANTLR 4 Runtime....
method AddErrorListener (line 266) | public virtual void AddErrorListener(IAntlrErrorListener<Symbol> liste...
method RemoveErrorListener (line 276) | public virtual void RemoveErrorListener(IAntlrErrorListener<Symbol> li...
method RemoveErrorListeners (line 288) | public virtual void RemoveErrorListeners()
method Sempred (line 312) | public virtual bool Sempred(RuleContext _localctx, int ruleIndex, int ...
method Precpred (line 317) | public virtual bool Precpred(RuleContext localctx, int precedence)
method Action (line 322) | public virtual void Action(RuleContext _localctx, int ruleIndex, int a...
FILE: runtime/CSharp/src/RuleContext.cs
class RuleContext (line 34) | public class RuleContext : IRuleNode
method RuleContext (line 51) | public RuleContext()
method RuleContext (line 55) | public RuleContext(Antlr4.Runtime.RuleContext parent, int invokingState)
method GetChildContext (line 62) | public static Antlr4.Runtime.RuleContext GetChildContext(Antlr4.Runtim...
method Depth (line 67) | public virtual int Depth()
method GetText (line 173) | public virtual string GetText()
method getAltNumber (line 202) | public virtual int getAltNumber() { return Atn.ATN.INVALID_ALT_NUMBER; }
method setAltNumber (line 210) | public virtual void setAltNumber(int altNumber) { }
method GetChild (line 212) | public virtual IParseTree GetChild(int i)
method GetChild (line 217) | ITree ITree.GetChild(int i)
method Accept (line 230) | public virtual T Accept<T>(IParseTreeVisitor<T> visitor)
method ToStringTree (line 244) | public virtual string ToStringTree(Parser recog)
method ToStringTree (line 257) | public virtual string ToStringTree(IList<string> ruleNames)
method ToStringTree (line 262) | public virtual string ToStringTree()
method ToString (line 267) | public override string ToString()
method ToString (line 272) | public string ToString(IRecognizer recog)
method ToString (line 277) | public string ToString(IList<string> ruleNames)
method ToString (line 283) | public virtual string ToString(IRecognizer recog, Antlr4.Runtime.RuleC...
method ToString (line 290) | public virtual string ToString(IList<string> ruleNames, Antlr4.Runtime...
FILE: runtime/CSharp/src/RuleDependencyAttribute.cs
class RuleDependencyAttribute (line 10) | [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple =...
method RuleDependencyAttribute (line 18) | public RuleDependencyAttribute(Type recognizer, int rule, int version)
method RuleDependencyAttribute (line 26) | public RuleDependencyAttribute(Type recognizer, int rule, int version,...
FILE: runtime/CSharp/src/RuleVersionAttribute.cs
class RuleVersionAttribute (line 10) | [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultipl...
method RuleVersionAttribute (line 15) | public RuleVersionAttribute(int version)
FILE: runtime/CSharp/src/Sharpen/Arrays.cs
class Arrays (line 11) | internal static class Arrays
method CopyOf (line 13) | public static T[] CopyOf<T>(T[] array, int newSize)
method AsList (line 22) | public static IList<T> AsList<T>(params T[] array)
method Fill (line 27) | public static void Fill<T>(T[] array, T value)
method HashCode (line 33) | public static int HashCode<T>(T[] array)
method Equals (line 45) | public static bool Equals<T>(T[] left, T[] right)
method ToString (line 64) | public static string ToString<T>(T[] array)
FILE: runtime/CSharp/src/Sharpen/AtomicReference.cs
class AtomicReference (line 9) | public class AtomicReference<T>
method AtomicReference (line 15) | public AtomicReference()
method AtomicReference (line 19) | public AtomicReference(T value)
method Get (line 24) | public T Get()
method Set (line 29) | public void Set(T value)
method CompareAndSet (line 34) | public bool CompareAndSet(T expect, T update)
method GetAndSet (line 39) | public T GetAndSet(T value)
FILE: runtime/CSharp/src/Sharpen/BitSet.cs
class BitSet (line 10) | public class BitSet
method BitSet (line 17) | public BitSet()
method BitSet (line 21) | public BitSet(int nbits)
method GetBitCount (line 33) | private static int GetBitCount(ulong[] value)
method BitScanForward (line 102) | private static int BitScanForward(ulong value)
method Clone (line 111) | public BitSet Clone()
method Clear (line 118) | public void Clear(int index)
method Get (line 142) | public bool Get(int index)
method Set (line 154) | public void Set(int index)
method IsEmpty (line 166) | public bool IsEmpty()
method Cardinality (line 177) | public int Cardinality()
method NextSetBit (line 182) | public int NextSetBit(int fromIndex)
method And (line 212) | public void And(BitSet set)
method Or (line 225) | public void Or(BitSet set)
method Equals (line 237) | public override bool Equals(object obj)
method GetHashCode (line 268) | public override int GetHashCode()
method ToString (line 283) | public override string ToString()
FILE: runtime/CSharp/src/Sharpen/Collections.cs
class Collections (line 10) | internal static class Collections
method EmptyList (line 16) | public static T[] EmptyList<T>()
method EmptyMap (line 21) | public static ReadOnlyDictionary<TKey, TValue> EmptyMap<TKey, TValue>()
method SingletonList (line 26) | public static ReadOnlyCollection<T> SingletonList<T>(T item)
method SingletonMap (line 31) | public static ReadOnlyDictionary<TKey, TValue> SingletonMap<TKey, TVal...
class EmptyListImpl (line 36) | private static class EmptyListImpl<T>
class EmptyMapImpl (line 44) | private static class EmptyMapImpl<TKey, TValue>
FILE: runtime/CSharp/src/Sharpen/DictionaryExtensions.cs
class DictionaryExtensions (line 9) | internal static class DictionaryExtensions
method Get (line 11) | public static TValue Get<TKey, TValue>(this IDictionary<TKey, TValue> ...
method Put (line 21) | public static TValue Put<TKey, TValue>(this IDictionary<TKey, TValue> ...
FILE: runtime/CSharp/src/Sharpen/ListExtensions.cs
class ListExtensions (line 9) | internal static class ListExtensions
method Set (line 11) | public static T Set<T>(this IList<T> list, int index, T value)
FILE: runtime/CSharp/src/Sharpen/Runtime.cs
class Runtime (line 9) | internal static class Runtime
method Substring (line 11) | public static string Substring(string str, int beginOffset, int endOff...
FILE: runtime/CSharp/src/Sharpen/SequenceEqualityComparer.cs
class SequenceEqualityComparer (line 11) | internal class SequenceEqualityComparer<T> : EqualityComparer<IEnumerabl...
method SequenceEqualityComparer (line 17) | public SequenceEqualityComparer()
method SequenceEqualityComparer (line 22) | public SequenceEqualityComparer(IEqualityComparer<T> elementComparer)
method Equals (line 35) | public override bool Equals(IEnumerable<T> x, IEnumerable<T> y)
method GetHashCode (line 45) | public override int GetHashCode(IEnumerable<T> obj)
FILE: runtime/CSharp/src/TokenStreamRewriter.cs
class TokenStreamRewriter (line 99) | public class TokenStreamRewriter
class RewriteOperation (line 107) | public class RewriteOperation
method RewriteOperation (line 120) | protected internal RewriteOperation(ITokenStream tokens, int index)
method RewriteOperation (line 127) | protected internal RewriteOperation(ITokenStream tokens, int index, ...
method Execute (line 139) | public virtual int Execute(StringBuilder buf)
method ToString (line 144) | public override string ToString()
class InsertBeforeOp (line 153) | internal class InsertBeforeOp : TokenStreamRewriter.RewriteOperation
method InsertBeforeOp (line 155) | public InsertBeforeOp(ITokenStream tokens, int index, object text)
method Execute (line 160) | public override int Execute(StringBuilder buf)
class ReplaceOp (line 179) | internal class ReplaceOp : TokenStreamRewriter.RewriteOperation
method ReplaceOp (line 183) | public ReplaceOp(ITokenStream tokens, int from, int to, object text)
method Execute (line 189) | public override int Execute(StringBuilder buf)
method ToString (line 198) | public override string ToString()
method TokenStreamRewriter (line 222) | public TokenStreamRewriter(ITokenStream tokens)
method Rollback (line 238) | public virtual void Rollback(int instructionIndex)
method Rollback (line 253) | public virtual void Rollback(string programName, int instructionIndex)
method DeleteProgram (line 262) | public virtual void DeleteProgram()
method DeleteProgram (line 268) | public virtual void DeleteProgram(string programName)
method InsertAfter (line 273) | public virtual void InsertAfter(IToken t, object text)
method InsertAfter (line 278) | public virtual void InsertAfter(int index, object text)
method InsertAfter (line 283) | public virtual void InsertAfter(string programName, IToken t, object t...
method InsertAfter (line 288) | public virtual void InsertAfter(string programName, int index, object ...
method InsertBefore (line 294) | public virtual void InsertBefore(IToken t, object text)
method InsertBefore (line 299) | public virtual void InsertBefore(int index, object text)
method InsertBefore (line 304) | public virtual void InsertBefore(string programName, IToken t, object ...
method InsertBefore (line 309) | public virtual void InsertBefore(string programName, int index, object...
method Replace (line 317) | public virtual void Replace(int index, object text)
method Replace (line 322) | public virtual void Replace(int from, int to, object text)
method Replace (line 327) | public virtual void Replace(IToken indexT, object text)
method Replace (line 332) | public virtual void Replace(IToken from, IToken to, object text)
method Replace (line 337) | public virtual void Replace(string programName, int from, int to, obje...
method Replace (line 349) | public virtual void Replace(string programName, IToken from, IToken to...
method Delete (line 354) | public virtual void Delete(int index)
method Delete (line 359) | public virtual void Delete(int from, int to)
method Delete (line 364) | public virtual void Delete(IToken indexT)
method Delete (line 369) | public virtual void Delete(IToken from, IToken to)
method Delete (line 374) | public virtual void Delete(string programName, int from, int to)
method Delete (line 379) | public virtual void Delete(string programName, IToken from, IToken to)
method GetLastRewriteTokenIndex (line 392) | protected internal virtual int GetLastRewriteTokenIndex(string program...
method SetLastRewriteTokenIndex (line 402) | protected internal virtual void SetLastRewriteTokenIndex(string progra...
method GetProgram (line 407) | protected internal virtual IList<TokenStreamRewriter.RewriteOperation>...
method InitializeProgram (line 417) | private IList<TokenStreamRewriter.RewriteOperation> InitializeProgram(...
method GetText (line 432) | public virtual string GetText()
method GetText (line 451) | public virtual string GetText(Interval interval)
method GetText (line 456) | public virtual string GetText(string programName, Interval interval)
method ReduceToSingleOperationPerIndex (line 567) | protected internal virtual IDictionary<int, TokenStreamRewriter.Rewrit...
method CatOpText (line 699) | protected internal virtual string CatOpText(object a, object b)
method GetKindOfOps (line 715) | protected internal virtual IList<T> GetKindOfOps<T>(IList<RewriteOpera...
FILE: runtime/CSharp/src/TokenTypes.cs
class TokenTypes (line 7) | public static class TokenTypes
FILE: runtime/CSharp/src/Tree/AbstractParseTreeVisitor.cs
class AbstractParseTreeVisitor (line 10) | public abstract class AbstractParseTreeVisitor<Result> : IParseTreeVisit...
method Visit (line 19) | public virtual Result Visit(IParseTree tree)
method VisitChildren (line 44) | public virtual Result VisitChildren(IRuleNode node)
method VisitTerminal (line 67) | public virtual Result VisitTerminal(ITerminalNode node)
method VisitErrorNode (line 78) | public virtual Result VisitErrorNode(IErrorNode node)
method AggregateResult (line 138) | protected internal virtual Result AggregateResult(Result aggregate, Re...
method ShouldVisitNextChild (line 185) | protected internal virtual bool ShouldVisitNextChild(IRuleNode node, R...
FILE: runtime/CSharp/src/Tree/ErrorNodeImpl.cs
class ErrorNodeImpl (line 22) | public class ErrorNodeImpl : TerminalNodeImpl, IErrorNode
method ErrorNodeImpl (line 24) | public ErrorNodeImpl(IToken token)
method Accept (line 29) | public override T Accept<T>(IParseTreeVisitor<T> visitor)
FILE: runtime/CSharp/src/Tree/IErrorNode.cs
type IErrorNode (line 8) | public interface IErrorNode : ITerminalNode
FILE: runtime/CSharp/src/Tree/IParseTree.cs
type IParseTree (line 20) | public interface IParseTree : ISyntaxTree
method GetChild (line 28) | new IParseTree GetChild(int i);
method Accept (line 35) | T Accept<T>(IParseTreeVisitor<T> visitor);
method GetText (line 43) | string GetText();
method ToStringTree (line 53) | string ToStringTree(Parser parser);
FILE: runtime/CSharp/src/Tree/IParseTreeListener.cs
type IParseTreeListener (line 8) | public interface IParseTreeListener
method VisitTerminal (line 10) | void VisitTerminal(ITerminalNode node);
method VisitErrorNode (line 12) | void VisitErrorNode(IErrorNode node);
method EnterEveryRule (line 14) | void EnterEveryRule(ParserRuleContext ctx);
method ExitEveryRule (line 16) | void ExitEveryRule(ParserRuleContext ctx);
FILE: runtime/CSharp/src/Tree/IParseTreeVisitor.cs
type IParseTreeVisitor (line 19) | public interface IParseTreeVisitor<out Result>
method Visit (line 29) | Result Visit(IParseTree tree);
method VisitChildren (line 45) | Result VisitChildren(IRuleNode node);
method VisitTerminal (line 55) | Result VisitTerminal(ITerminalNode node);
method VisitErrorNode (line 65) | Result VisitErrorNode(IErrorNode node);
FILE: runtime/CSharp/src/Tree/IRuleNode.cs
type IRuleNode (line 9) | public interface IRuleNode : IParseTree
FILE: runtime/CSharp/src/Tree/ISyntaxTree.cs
type ISyntaxTree (line 19) | public interface ISyntaxTree : ITree
FILE: runtime/CSharp/src/Tree/ITerminalNode.cs
type ITerminalNode (line 8) | public interface ITerminalNode : IParseTree
FILE: runtime/CSharp/src/Tree/ITree.cs
type ITree (line 13) | public interface ITree
method GetChild (line 48) | ITree GetChild(int i);
method ToStringTree (line 68) | string ToStringTree();
FILE: runtime/CSharp/src/Tree/ParseTreeProperty.cs
class ParseTreeProperty (line 24) | public class ParseTreeProperty<V>
method Get (line 28) | public virtual V Get(IParseTree node)
method Put (line 37) | public virtual void Put(IParseTree node, V value)
method RemoveFrom (line 42) | public virtual V RemoveFrom(IParseTree node)
FILE: runtime/CSharp/src/Tree/ParseTreeWalker.cs
class ParseTreeWalker (line 8) | public class ParseTreeWalker
method Walk (line 22) | public virtual void Walk(IParseTreeListener listener, IParseTree t)
method EnterRule (line 54) | protected internal virtual void EnterRule(IParseTreeListener listener,...
method ExitRule (line 68) | protected internal virtual void ExitRule(IParseTreeListener listener, ...
FILE: runtime/CSharp/src/Tree/Pattern/Chunk.cs
class Chunk (line 33) | internal abstract class Chunk
FILE: runtime/CSharp/src/Tree/Pattern/ParseTreeMatch.cs
class ParseTreeMatch (line 19) | public class ParseTreeMatch
method ParseTreeMatch (line 87) | public ParseTreeMatch(IParseTree tree, ParseTreePattern pattern, Multi...
method Get (line 143) | [return: Nullable]
method GetAll (line 194) | [return: NotNull]
method ToString (line 289) | public override string ToString()
FILE: runtime/CSharp/src/Tree/Pattern/ParseTreePattern.cs
class ParseTreePattern (line 23) | public class ParseTreePattern
method ParseTreePattern (line 77) | public ParseTreePattern(ParseTreePatternMatcher matcher, string patter...
method Match (line 97) | [return: NotNull]
method Matches (line 116) | public virtual bool Matches(IParseTree tree)
method FindAll (line 142) | [return: NotNull]
FILE: runtime/CSharp/src/Tree/Pattern/ParseTreePatternMatcher.cs
class ParseTreePatternMatcher (line 131) | public class ParseTreePatternMatcher
class CannotInvokeStartRule (line 133) | [System.Serializable]
method CannotInvokeStartRule (line 136) | public CannotInvokeStartRule(Exception e)
class StartRuleDoesNotConsumeFullPattern (line 142) | [System.Serializable]
method ParseTreePatternMatcher (line 180) | public ParseTreePatternMatcher(Lexer lexer, Parser parser)
method SetDelimiters (line 214) | public virtual void SetDelimiters(string start, string stop, string es...
method Matches (line 238) | public virtual bool Matches(IParseTree tree, string pattern, int patte...
method Matches (line 250) | public virtual bool Matches(IParseTree tree, ParseTreePattern pattern)
method Match (line 269) | public virtual ParseTreeMatch Match(IParseTree tree, string pattern, i...
method Match (line 286) | [return: NotNull]
method Compile (line 299) | public virtual ParseTreePattern Compile(string pattern, int patternRul...
method MatchImpl (line 390) | [return: Nullable]
method GetRuleTagToken (line 505) | protected internal virtual RuleTagToken GetRuleTagToken(IParseTree t)
method Tokenize (line 523) | public virtual IList<IToken> Tokenize(string pattern)
method Split (line 587) | internal virtual IList<Chunk> Split(string pattern)
FILE: runtime/CSharp/src/Tree/Pattern/RuleTagToken.cs
class RuleTagToken (line 22) | public class RuleTagToken : IToken
method RuleTagToken (line 61) | public RuleTagToken(string ruleName, int bypassTokenType)
method RuleTagToken (line 88) | public RuleTagToken(string ruleName, int bypassTokenType, string label)
method ToString (line 284) | public override string ToString()
FILE: runtime/CSharp/src/Tree/Pattern/TagChunk.cs
class TagChunk (line 41) | internal class TagChunk : Chunk
method TagChunk (line 76) | public TagChunk(string tag)
method TagChunk (line 107) | public TagChunk(string label, string tag)
method ToString (line 154) | public override string ToString()
FILE: runtime/CSharp/src/Tree/Pattern/TextChunk.cs
class TextChunk (line 20) | internal class TextChunk : Chunk
method TextChunk (line 44) | public TextChunk(string text)
method ToString (line 73) | public override string ToString()
FILE: runtime/CSharp/src/Tree/Pattern/TokenTagToken.cs
class TokenTagToken (line 21) | [System.Serializable]
method TokenTagToken (line 48) | public TokenTagToken(string tokenName, int type)
method TokenTagToken (line 67) | public TokenTagToken(string tokenName, int type, string label)
method ToString (line 133) | public override string ToString()
FILE: runtime/CSharp/src/Tree/TerminalNodeImpl.cs
class TerminalNodeImpl (line 9) | public class TerminalNodeImpl : ITerminalNode
method TerminalNodeImpl (line 15) | public TerminalNodeImpl(IToken symbol)
method GetChild (line 20) | public virtual IParseTree GetChild(int i)
method GetChild (line 25) | ITree ITree.GetChild(int i)
method Accept (line 103) | public virtual T Accept<T>(IParseTreeVisitor<T> visitor)
method GetText (line 108) | public virtual string GetText()
method ToStringTree (line 117) | public virtual string ToStringTree(Parser parser)
method ToString (line 122) | public override string ToString()
method ToStringTree (line 138) | public virtual string ToStringTree()
FILE: runtime/CSharp/src/Tree/Trees.cs
class Trees (line 14) | public class Trees
method ToStringTree (line 24) | public static string ToStringTree(ITree t)
method ToStringTree (line 37) | public static string ToStringTree(ITree t, Parser recog)
method ToStringTree (line 52) | public static string ToStringTree(ITree t, IList<string> ruleNames)
method GetNodeText (line 76) | public static string GetNodeText(ITree t, Parser recog)
method GetNodeText (line 83) | public static string GetNodeText(ITree t, IList<string> ruleNames)
method GetChildren (line 127) | public static IList<ITree> GetChildren(ITree t)
method GetAncestors (line 142) | [return: NotNull]
method FindAllTokenNodes (line 160) | public static ICollection<IParseTree> FindAllTokenNodes(IParseTree t, ...
method FindAllRuleNodes (line 165) | public static ICollection<IParseTree> FindAllRuleNodes(IParseTree t, i...
method FindAllNodes (line 170) | public static IList<IParseTree> FindAllNodes(IParseTree t, int index, ...
method _findAllNodes (line 177) | private static void _findAllNodes(IParseTree t, int index, bool findTo...
method Descendants (line 206) | public static IList<IParseTree> Descendants(IParseTree t)
method Trees (line 218) | private Trees()
FILE: runtime/CSharp/src/Tree/Xpath/XPath.cs
class XPath (line 68) | public class XPath
method XPath (line 80) | public XPath(Parser parser, string path)
method Split (line 91) | public virtual XPathElement[] Split(string path)
class _XPathLexer_87 (line 170) | private sealed class _XPathLexer_87 : XPathLexer
method _XPathLexer_87 (line 172) | public _XPathLexer_87(ICharStream baseArg1)
method Recover (line 177) | public override void Recover(LexerNoViableAltException e)
method GetXPathElement (line 200) | protected internal virtual XPathElement GetXPathElement(IToken wordTok...
method FindAll (line 237) | public static ICollection<IParseTree> FindAll(IParseTree tree, string ...
method Evaluate (line 253) | public virtual ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathElement.cs
class XPathElement (line 11) | public abstract class XPathElement
method XPathElement (line 27) | public XPathElement(string nodeName)
method Evaluate (line 38) | public abstract ICollection<IParseTree> Evaluate(IParseTree t);
method ToString (line 40) | public override string ToString()
FILE: runtime/CSharp/src/Tree/Xpath/XPathLexer.cs
class XPathLexer (line 30) | [System.CodeDom.Compiler.GeneratedCode("ANTLR", "4.13.1")]
method XPathLexer (line 51) | public XPathLexer(ICharStream input)
method XPathLexer (line 54) | public XPathLexer(ICharStream input, TextWriter output, TextWriter err...
method XPathLexer (line 88) | static XPathLexer() {
method Action (line 94) | public override void Action(RuleContext _localctx, int ruleIndex, int ...
method ID_action (line 99) | private void ID_action(RuleContext _localctx, int actionIndex) {
FILE: runtime/CSharp/src/Tree/Xpath/XPathLexerErrorListener.cs
class XPathLexerErrorListener (line 12) | public class XPathLexerErrorListener : IAntlrErrorListener<int>
method SyntaxError (line 14) | public virtual void SyntaxError(TextWriter output, IRecognizer recogni...
FILE: runtime/CSharp/src/Tree/Xpath/XPathRuleAnywhereElement.cs
class XPathRuleAnywhereElement (line 19) | public class XPathRuleAnywhereElement : XPathElement
method XPathRuleAnywhereElement (line 23) | public XPathRuleAnywhereElement(string ruleName, int ruleIndex)
method Evaluate (line 29) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathRuleElement.cs
class XPathRuleElement (line 13) | public class XPathRuleElement : XPathElement
method XPathRuleElement (line 17) | public XPathRuleElement(string ruleName, int ruleIndex)
method Evaluate (line 23) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathTokenAnywhereElement.cs
class XPathTokenAnywhereElement (line 12) | public class XPathTokenAnywhereElement : XPathElement
method XPathTokenAnywhereElement (line 16) | public XPathTokenAnywhereElement(string tokenName, int tokenType)
method Evaluate (line 22) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathTokenElement.cs
class XPathTokenElement (line 12) | public class XPathTokenElement : XPathElement
method XPathTokenElement (line 16) | public XPathTokenElement(string tokenName, int tokenType)
method Evaluate (line 22) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathWildcardAnywhereElement.cs
class XPathWildcardAnywhereElement (line 12) | public class XPathWildcardAnywhereElement : XPathElement
method XPathWildcardAnywhereElement (line 14) | public XPathWildcardAnywhereElement()
method Evaluate (line 19) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/Tree/Xpath/XPathWildcardElement.cs
class XPathWildcardElement (line 12) | public class XPathWildcardElement : XPathElement
method XPathWildcardElement (line 14) | public XPathWildcardElement()
method Evaluate (line 19) | public override ICollection<IParseTree> Evaluate(IParseTree t)
FILE: runtime/CSharp/src/UnbufferedCharStream.cs
class UnbufferedCharStream (line 21) | public class UnbufferedCharStream : ICharStream
method UnbufferedCharStream (line 113) | public UnbufferedCharStream()
method UnbufferedCharStream (line 120) | public UnbufferedCharStream(int bufferSize)
method UnbufferedCharStream (line 126) | public UnbufferedCharStream(Stream input)
method UnbufferedCharStream (line 131) | public UnbufferedCharStream(TextReader input)
method UnbufferedCharStream (line 136) | public UnbufferedCharStream(Stream input, int bufferSize)
method UnbufferedCharStream (line 143) | public UnbufferedCharStream(TextReader input, int bufferSize)
method Consume (line 152) | public virtual void Consume()
method Sync (line 190) | protected internal virtual void Sync(int want)
method Fill (line 211) | protected internal virtual int Fill(int n)
method NextChar (line 271) | protected internal virtual int NextChar()
method Add (line 276) | protected internal virtual void Add(int c)
method LA (line 285) | public virtual int LA(int i)
method Mark (line 315) | public virtual int Mark()
method Release (line 329) | public virtual void Release(int marker)
method Seek (line 370) | public virtual void Seek(int index)
method GetText (line 426) | public virtual string GetText(Interval interval)
FILE: runtime/CSharp/src/UnbufferedTokenStream.cs
class UnbufferedTokenStream (line 13) | public class UnbufferedTokenStream : ITokenStream
method UnbufferedTokenStream (line 103) | public UnbufferedTokenStream(ITokenSource tokenSource)
method UnbufferedTokenStream (line 108) | public UnbufferedTokenStream(ITokenSource tokenSource, int bufferSize)
method Get (line 117) | public virtual IToken Get(int i)
method LT (line 127) | public virtual IToken LT(int i)
method LA (line 147) | public virtual int LA(int i)
method GetText (line 164) | [return: NotNull]
method GetText (line 170) | [return: NotNull]
method GetText (line 176) | [return: NotNull]
method Consume (line 186) | public virtual void Consume()
method Sync (line 224) | protected internal virtual void Sync(int want)
method Fill (line 245) | protected internal virtual int Fill(int n)
method Add (line 259) | protected internal virtual void Add(IToken t)
method Mark (line 282) | public virtual int Mark()
method Release (line 293) | public virtual void Release(int marker)
method Seek (line 325) | public virtual void Seek(int index)
method GetText (line 378) | [return: NotNull]
method GetBufferStartIndex (line 400) | protected internal int GetBufferStartIndex()
FILE: runtime/CSharp/src/Vocabulary.cs
class Vocabulary (line 17) | public class Vocabulary : IVocabulary
method Vocabulary (line 65) | public Vocabulary(string[] literalNames, string[] symbolicNames)
method Vocabulary (line 101) | public Vocabulary(string[] literalNames, string[] symbolicNames, strin...
method getMaxTokenType (line 116) | public virtual int getMaxTokenType()
method GetLiteralName (line 121) | [return: Nullable]
method GetSymbolicName (line 131) | [return: Nullable]
method GetDisplayName (line 145) | [return: NotNull]
FILE: runtime/CSharp/tests/issue-2693/ErrorListener.cs
class ErrorListener (line 8) | public class ErrorListener<S> : ConsoleErrorListener<S>
method SyntaxError (line 12) | public override void SyntaxError(TextWriter output, IRecognizer recogn...
FILE: runtime/CSharp/tests/issue-2693/Program.cs
class Program (line 6) | public class Program
method Main (line 8) | static void Main(string[] args)
FILE: runtime/CSharp/tests/issue-2693/TreeOutput.cs
class TreeOutput (line 12) | public class TreeOutput
method OutputTree (line 17) | public static StringBuilder OutputTree(IParseTree tree, Lexer lexer, P...
method ParenthesizedAST (line 26) | private static void ParenthesizedAST(IParseTree tree, StringBuilder sb...
method StartLine (line 75) | private static void StartLine(StringBuilder sb, int level = 0)
method ToLiteral (line 92) | private static string ToLiteral(string input)
method PerformEscapes (line 102) | public static string PerformEscapes(string s)
FILE: runtime/CSharp/tests/issue-3079/ErrorListener.cs
class ErrorListener (line 10) | public class ErrorListener<S> : ConsoleErrorListener<S>
method SyntaxError (line 14) | public override void SyntaxError(TextWriter output, IRecognizer recogn...
FILE: runtime/CSharp/tests/issue-3079/Program.cs
class Program (line 11) | public class Program
method Parse (line 17) | public static IParseTree Parse(string input)
method Main (line 31) | static void Main(string[] args)
FILE: runtime/Cpp/demo/Linux/main.cpp
function main (line 22) | int main(int , const char **) {
FILE: runtime/Cpp/demo/Mac/antlr4-cpp-demo/main.cpp
function main (line 22) | int main(int , const char **) {
FILE: runtime/Cpp/demo/Windows/antlr4-cpp-demo/main.cpp
function main (line 26) | int main(int argc, const char * argv[]) {
FILE: runtime/Cpp/runtime/src/ANTLRErrorListener.h
function namespace (line 15) | namespace antlrcpp {
function namespace (line 19) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ANTLRErrorStrategy.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ANTLRFileStream.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ANTLRInputStream.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/BailErrorStrategy.cpp
function Token (line 38) | Token* BailErrorStrategy::recoverInline(Parser *recognizer) {
FILE: runtime/Cpp/runtime/src/BailErrorStrategy.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/BaseErrorListener.h
function namespace (line 15) | namespace antlrcpp {
function namespace (line 19) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/BufferedTokenStream.cpp
function TokenSource (line 30) | TokenSource* BufferedTokenStream::getTokenSource() const {
function Token (line 122) | Token* BufferedTokenStream::get(size_t i) const {
function Token (line 158) | Token* BufferedTokenStream::LB(size_t k) {
function Token (line 165) | Token* BufferedTokenStream::LT(ssize_t k) {
FILE: runtime/Cpp/runtime/src/BufferedTokenStream.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/CharStream.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/CommonToken.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/CommonTokenFactory.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/CommonTokenStream.cpp
function Token (line 25) | Token* CommonTokenStream::LB(size_t k) {
function Token (line 45) | Token* CommonTokenStream::LT(ssize_t k) {
FILE: runtime/Cpp/runtime/src/CommonTokenStream.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ConsoleErrorListener.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp
function Token (line 200) | Token* DefaultErrorStrategy::recoverInline(Parser *recognizer) {
function Token (line 236) | Token* DefaultErrorStrategy::singleTokenDeletion(Parser *recognizer) {
function Token (line 250) | Token* DefaultErrorStrategy::getMissingSymbol(Parser *recognizer) {
FILE: runtime/Cpp/runtime/src/DefaultErrorStrategy.h
function namespace (line 18) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/DiagnosticErrorListener.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Exceptions.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/FailedPredicateException.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/FlatHashMap.h
function namespace (line 42) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/FlatHashSet.h
function namespace (line 41) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/InputMismatchException.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/IntStream.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/InterpreterRuleContext.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Lexer.cpp
function CharStream (line 158) | CharStream* Lexer::getInputStream() {
function Token (line 166) | Token* Lexer::emit() {
function Token (line 172) | Token* Lexer::emitEOF() {
FILE: runtime/Cpp/runtime/src/Lexer.h
function namespace (line 19) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/LexerInterpreter.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/LexerNoViableAltException.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ListTokenSource.cpp
function CharStream (line 66) | CharStream *ListTokenSource::getInputStream() {
FILE: runtime/Cpp/runtime/src/ListTokenSource.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/NoViableAltException.cpp
function buildConfigsRef (line 18) | Ref<atn::ATNConfigSet> buildConfigsRef(atn::ATNConfigSet *configs, bool ...
function Token (line 42) | Token* NoViableAltException::getStartToken() const {
FILE: runtime/Cpp/runtime/src/NoViableAltException.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Parser.cpp
type BypassAltsAtnCache (line 45) | struct BypassAltsAtnCache final {
function BypassAltsAtnCache (line 54) | BypassAltsAtnCache* getBypassAltsAtnCache() {
function Token (line 133) | Token* Parser::match(size_t ttype) {
function Token (line 152) | Token* Parser::matchWildcard() {
function IntStream (line 293) | IntStream* Parser::getInputStream() {
function TokenStream (line 301) | TokenStream* Parser::getTokenStream() {
function Token (line 311) | Token* Parser::getCurrentToken() {
function Token (line 328) | Token* Parser::consume() {
function ParserRuleContext (line 470) | ParserRuleContext* Parser::getInvokingContext(size_t ruleIndex) {
function ParserRuleContext (line 483) | ParserRuleContext* Parser::getContext() {
function ParserRuleContext (line 555) | ParserRuleContext* Parser::getRuleContext() {
FILE: runtime/Cpp/runtime/src/Parser.h
function namespace (line 23) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ParserInterpreter.cpp
function ParserRuleContext (line 87) | ParserRuleContext* ParserInterpreter::parse(size_t startRuleIndex) {
function InterpreterRuleContext (line 150) | InterpreterRuleContext* ParserInterpreter::getRootContext() {
function InterpreterRuleContext (line 254) | InterpreterRuleContext* ParserInterpreter::createInterpreterRuleContext(...
function Token (line 300) | Token* ParserInterpreter::recoverInline() {
FILE: runtime/Cpp/runtime/src/ParserInterpreter.h
function namespace (line 23) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ParserRuleContext.cpp
function RuleContext (line 71) | RuleContext* ParserRuleContext::addChild(RuleContext *ruleInvocation) {
function Token (line 126) | Token* ParserRuleContext::getStart() const {
function Token (line 130) | Token* ParserRuleContext::getStop() const {
FILE: runtime/Cpp/runtime/src/ParserRuleContext.h
function namespace (line 18) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/ProxyErrorListener.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/RecognitionException.cpp
function RuleContext (line 50) | RuleContext* RecognitionException::getCtx() const {
function IntStream (line 54) | IntStream* RecognitionException::getInputStream() const {
function Token (line 58) | Token* RecognitionException::getOffendingToken() const {
function Recognizer (line 62) | Recognizer* RecognitionException::getRecognizer() const {
FILE: runtime/Cpp/runtime/src/RecognitionException.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Recognizer.cpp
function ProxyErrorListener (line 145) | ProxyErrorListener& Recognizer::getErrorListenerDispatch() {
FILE: runtime/Cpp/runtime/src/Recognizer.h
function namespace (line 22) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/RuleContext.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/RuleContextWithAltNum.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/RuntimeMetaData.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Token.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/TokenFactory.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/TokenSource.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/TokenStream.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/TokenStreamRewriter.cpp
function TokenStream (line 108) | TokenStream *TokenStreamRewriter::getTokenStream() {
FILE: runtime/Cpp/runtime/src/TokenStreamRewriter.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/UnbufferedCharStream.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp
function Token (line 38) | Token* UnbufferedTokenStream::get(size_t i) const
function Token (line 48) | Token* UnbufferedTokenStream::LT(ssize_t i)
function TokenSource (line 73) | TokenSource* UnbufferedTokenStream::getTokenSource() const
FILE: runtime/Cpp/runtime/src/UnbufferedTokenStream.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/Vocabulary.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/WritableToken.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/antlr4-common.h
type __int64 (line 49) | typedef __int64 ssize_t;
type __int32 (line 51) | typedef __int32 ssize_t;
FILE: runtime/Cpp/runtime/src/atn/ATN.cpp
function DecisionState (line 74) | DecisionState *ATN::getDecisionState(size_t decision) const {
FILE: runtime/Cpp/runtime/src/atn/ATN.h
function namespace (line 23) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNConfig.h
function namespace (line 18) | namespace antlr4 {
function virtual (line 110) | virtual size_t hashCode() const;
FILE: runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp
function BitSet (line 112) | BitSet ATNConfigSet::getAlts() const {
FILE: runtime/Cpp/runtime/src/atn/ATNConfigSet.h
function namespace (line 20) | namespace antlr4 {
function namespace (line 153) | namespace std {
FILE: runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp
function ATNDeserializationOptions (line 17) | const ATNDeserializationOptions& ATNDeserializationOptions::getDefaultOp...
FILE: runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp
function checkCondition (line 71) | void checkCondition(bool condition, std::string_view message) {
function checkCondition (line 77) | void checkCondition(bool condition) {
function markPrecedenceDecisions (line 88) | void markPrecedenceDecisions(const ATN &atn) {
function lexerActionFactory (line 109) | Ref<const LexerAction> lexerActionFactory(LexerActionType type, int data...
function ConstTransitionPtr (line 141) | ConstTransitionPtr edgeFactory(const ATN &atn, TransitionType type, size...
function ATNState (line 179) | ATNState* stateFactory(ATNStateType type, size_t ruleIndex) {
function readUnicodeInt32 (line 229) | ssize_t readUnicodeInt32(SerializedATNView data, int& p) {
function deserializeSets (line 233) | void deserializeSets(
FILE: runtime/Cpp/runtime/src/atn/ATNDeserializer.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNSimulator.cpp
function PredictionContextCache (line 29) | PredictionContextCache& ATNSimulator::getSharedContextCache() const {
FILE: runtime/Cpp/runtime/src/atn/ATNSimulator.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNState.cpp
function ConstTransitionPtr (line 55) | ConstTransitionPtr ATNState::removeTransition(size_t index) {
FILE: runtime/Cpp/runtime/src/atn/ATNState.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNStateType.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ATNType.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ActionTransition.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/AmbiguityInfo.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp
function predictionContextEqual (line 28) | bool predictionContextEqual(const Ref<const PredictionContext> &lhs, con...
FILE: runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/AtomTransition.cpp
function IntervalSet (line 21) | IntervalSet AtomTransition::label() const {
FILE: runtime/Cpp/runtime/src/atn/AtomTransition.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/BasicBlockStartState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/BasicState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/BlockEndState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/BlockStartState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/DecisionEventInfo.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/DecisionInfo.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/DecisionState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/EpsilonTransition.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ErrorInfo.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/HashUtils.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp
type ATNConfigHasher (line 33) | struct ATNConfigHasher final {
type ATNConfigComparer (line 39) | struct ATNConfigComparer final {
class LL1AnalyzerImpl (line 45) | class LL1AnalyzerImpl final {
method LL1AnalyzerImpl (line 47) | LL1AnalyzerImpl(const ATN& atn, misc::IntervalSet& look, bool seeThruP...
method LOOK (line 78) | void LOOK(ATNState *s, ATNState *stopState, Ref<const PredictionContex...
FILE: runtime/Cpp/runtime/src/atn/LL1Analyzer.h
function namespace (line 18) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerATNConfig.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerATNSimulator.h
function namespace (line 20) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerAction.h
function namespace (line 13) | namespace antlr4 {
function namespace (line 93) | namespace std {
FILE: runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp
function lexerActionEqual (line 28) | bool lexerActionEqual(const Ref<const LexerAction> &lhs, const Ref<const...
FILE: runtime/Cpp/runtime/src/atn/LexerActionExecutor.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerActionType.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerChannelAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerCustomAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerModeAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerMoreAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerPopModeAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerPushModeAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerSkipAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LexerTypeAction.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/LoopEndState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/NotSetTransition.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ParseInfo.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp
function ATNConfigSet (line 600) | ATNConfigSet* ParserATNSimulator::removeAllConfigsNotInRuleStopState(ATN...
function BitSet (line 816) | BitSet ParserATNSimulator::evalSemanticContext(const std::vector<dfa::DF...
function BitSet (line 1214) | BitSet ParserATNSimulator::getConflictingAlts(ATNConfigSet *configs) {
function BitSet (line 1219) | BitSet ParserATNSimulator::getConflictingAltsOrUniqueAlt(ATNConfigSet *c...
function NoViableAltException (line 1270) | NoViableAltException ParserATNSimulator::noViableAlt(TokenStream *input,...
function Parser (line 1401) | Parser* ParserATNSimulator::getParser() {
FILE: runtime/Cpp/runtime/src/atn/ParserATNSimulator.h
function namespace (line 24) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h
function namespace (line 32) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PlusBlockStartState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PlusLoopbackState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredicateTransition.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredictionContext.cpp
function combineCommonParents (line 38) | void combineCommonParents(std::vector<Ref<const PredictionContext>> &par...
function getCachedContextImpl (line 49) | Ref<const PredictionContext> getCachedContextImpl(const Ref<const Predic...
function getAllContextNodesImpl (line 112) | void getAllContextNodesImpl(const Ref<const PredictionContext> &context,
function insertOrAssignNodeId (line 128) | size_t insertOrAssignNodeId(std::unordered_map<const PredictionContext*,...
FILE: runtime/Cpp/runtime/src/atn/PredictionContext.h
function namespace (line 20) | namespace antlr4 {
function namespace (line 221) | namespace std {
FILE: runtime/Cpp/runtime/src/atn/PredictionContextCache.h
function namespace (line 33) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h
function namespace (line 37) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h
function namespace (line 34) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredictionContextType.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/PredictionMode.cpp
type AltAndContextConfigHasher (line 23) | struct AltAndContextConfigHasher
type AltAndContextConfigComparer (line 37) | struct AltAndContextConfigComparer {
FILE: runtime/Cpp/runtime/src/atn/PredictionMode.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp
function DFAState (line 69) | DFAState* ProfilingATNSimulator::getExistingTargetState(DFAState *previo...
function DFAState (line 88) | DFAState* ProfilingATNSimulator::computeTargetState(DFA &dfa, DFAState *...
function DFAState (line 181) | DFAState* ProfilingATNSimulator::getCurrentState() const {
FILE: runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/RangeTransition.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/RuleStartState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/RuleStopState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/RuleTransition.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/SemanticContext.cpp
type SemanticContextHasher (line 28) | struct SemanticContextHasher final {
type SemanticContextComparer (line 34) | struct SemanticContextComparer final {
function insertSemanticContext (line 41) | void insertSemanticContext(const Ref<const SemanticContext> &semanticCon...
function insertSemanticContext (line 61) | void insertSemanticContext(Ref<const SemanticContext> &&semanticContext,
function predictOperandCapacity (line 80) | size_t predictOperandCapacity(const Ref<const SemanticContext> &x) {
function predictOperandCapacity (line 91) | size_t predictOperandCapacity(const Ref<const SemanticContext> &a, const...
FILE: runtime/Cpp/runtime/src/atn/SemanticContext.h
function namespace (line 17) | namespace atn {
function is (line 112) | static bool is(const SemanticContext *semanticContext) { return semantic...
function hashCode (line 121) | size_t hashCode() const override;
function is (line 181) | static bool is(const SemanticContext *semanticContext) { return semantic...
function is (line 209) | static bool is(const SemanticContext *semanticContext) { return semantic...
function std (line 213) | const std::vector<Ref<const SemanticContext>>& getOperands() const overr...
FILE: runtime/Cpp/runtime/src/atn/SemanticContextType.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/SerializedATNView.h
function namespace (line 17) | namespace antlr4 {
function namespace (line 92) | namespace std {
FILE: runtime/Cpp/runtime/src/atn/SetTransition.h
function namespace (line 17) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/StarBlockStartState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/StarLoopEntryState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp
function StarLoopEntryState (line 15) | StarLoopEntryState *StarLoopbackState::getLoopEntryState() const {
FILE: runtime/Cpp/runtime/src/atn/StarLoopbackState.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/TokensStartState.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/Transition.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/TransitionType.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/atn/WildcardTransition.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/dfa/DFA.cpp
function DFAState (line 69) | DFAState* DFA::getPrecedenceStartState(int precedence) const {
FILE: runtime/Cpp/runtime/src/dfa/DFA.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/dfa/DFASerializer.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/dfa/DFAState.h
function namespace (line 18) | namespace antlr4 {
function namespace (line 150) | namespace std {
FILE: runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/internal/Synchronization.h
function lock (line 63) | void lock() ANTLR4CPP_NO_THREAD_SAFTEY_ANALYSIS;
FILE: runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp
function InterpreterData (line 24) | InterpreterData InterpreterDataReader::parseFile(std::string const& file...
FILE: runtime/Cpp/runtime/src/misc/InterpreterDataReader.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/misc/Interval.cpp
function Interval (line 53) | Interval Interval::Union(const Interval &other) const {
function Interval (line 57) | Interval Interval::intersection(const Interval &other) const {
FILE: runtime/Cpp/runtime/src/misc/Interval.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/misc/IntervalSet.cpp
function IntervalSet (line 42) | IntervalSet& IntervalSet::operator=(const IntervalSet& other) {
function IntervalSet (line 47) | IntervalSet& IntervalSet::operator=(IntervalSet&& other) {
function IntervalSet (line 52) | IntervalSet IntervalSet::of(ssize_t a) {
function IntervalSet (line 56) | IntervalSet IntervalSet::of(ssize_t a, ssize_t b) {
function IntervalSet (line 121) | IntervalSet IntervalSet::Or(const std::vector<IntervalSet> &sets) {
function IntervalSet (line 129) | IntervalSet& IntervalSet::addAll(const IntervalSet &set) {
function IntervalSet (line 137) | IntervalSet IntervalSet::complement(ssize_t minElement, ssize_t maxEleme...
function IntervalSet (line 141) | IntervalSet IntervalSet::complement(const IntervalSet &vocabulary) const {
function IntervalSet (line 145) | IntervalSet IntervalSet::subtract(const IntervalSet &other) const {
function IntervalSet (line 149) | IntervalSet IntervalSet::subtract(const IntervalSet &left, const Interva...
function IntervalSet (line 218) | IntervalSet IntervalSet::Or(const IntervalSet &a) const {
function IntervalSet (line 225) | IntervalSet IntervalSet::And(const IntervalSet &other) const {
FILE: runtime/Cpp/runtime/src/misc/IntervalSet.h
function namespace (line 15) | namespace antlr4 {
function namespace (line 184) | namespace std {
FILE: runtime/Cpp/runtime/src/misc/MurmurHash.cpp
function ROTL32 (line 41) | constexpr uint32_t ROTL32(uint32_t x, int r) {
function ROTL64 (line 44) | constexpr uint64_t ROTL64(uint64_t x, int r) {
FILE: runtime/Cpp/runtime/src/misc/MurmurHash.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/misc/Predicate.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/support/Any.h
function namespace (line 12) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/Arrays.h
function equals (line 22) | bool equals(const std::vector<T> &a, const std::vector<T> &b) {
function equals (line 54) | bool equals(const std::vector<Ref<T>> &a, const std::vector<Ref<T>> &b) {
function equals (line 74) | bool equals(const std::vector<std::unique_ptr<T>> &a, const std::vector<...
FILE: runtime/Cpp/runtime/src/support/BitSet.h
function namespace (line 14) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/CPPUtils.cpp
type antlrcpp (line 14) | namespace antlrcpp {
function join (line 16) | std::string join(const std::vector<std::string> &strings, const std::s...
function toMap (line 29) | std::map<std::string, size_t> toMap(const std::vector<std::string> &ke...
function escapeWhitespace (line 37) | std::string escapeWhitespace(std::string str, bool escapeSpaces) {
function toHexString (line 70) | std::string toHexString(const int t) {
function arrayToString (line 76) | std::string arrayToString(const std::vector<std::string> &data) {
function replaceString (line 89) | std::string replaceString(const std::string &s, const std::string &fro...
function split (line 108) | std::vector<std::string> split(const std::string &s, const std::string...
function indent (line 136) | std::string indent(const std::string &s, const std::string &indentatio...
function get_nested (line 153) | std::exception_ptr get_nested(const T &/*e*/) {
function get_nested (line 163) | std::exception_ptr get_nested(const T &e) {
function what (line 174) | std::string what(std::exception_ptr eptr) {
FILE: runtime/Cpp/runtime/src/support/CPPUtils.h
function _cleanUp (line 30) | FinalAction(OnEnd f) : _cleanUp { std::move(f) } {}
FILE: runtime/Cpp/runtime/src/support/Casts.h
function namespace (line 12) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/Declarations.h
function namespace (line 8) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/support/StringUtils.cpp
type antlrcpp (line 10) | namespace antlrcpp {
function escapeWhitespace (line 12) | std::string escapeWhitespace(std::string_view in) {
FILE: runtime/Cpp/runtime/src/support/StringUtils.h
function namespace (line 12) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/Unicode.h
function namespace (line 10) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/Utf8.cpp
type antlrcpp (line 22) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/support/Utf8.h
function namespace (line 17) | namespace antlrcpp {
FILE: runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h
function namespace (line 14) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ErrorNode.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp
function Token (line 18) | Token* ErrorNodeImpl::getSymbol() const {
FILE: runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h
function namespace (line 18) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h
function namespace (line 37) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTree.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTreeListener.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTreeProperty.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTreeType.h
function namespace (line 12) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/ParseTreeWalker.h
function namespace (line 10) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/TerminalNode.h
function namespace (line 13) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp
function Token (line 18) | Token* TerminalNodeImpl::getSymbol() const {
FILE: runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h
function namespace (line 15) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/Trees.cpp
function _findAllNodes (line 146) | static void _findAllNodes(ParseTree *t, size_t index, bool findTokens, s...
function ParserRuleContext (line 211) | ParserRuleContext* Trees::getRootOfSubtreeEnclosingRegion(ParseTree *t, ...
function ParseTree (line 231) | ParseTree * Trees::findNodeSuchThat(ParseTree *t, Ref<Predicate> const& ...
FILE: runtime/Cpp/runtime/src/tree/Trees.h
function namespace (line 16) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/pattern/Chunk.h
function namespace (line 11) | namespace antlr4 {
FILE: runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp
function ParseTree (line 28) | ParseTree* ParseTreeMatch::get(const std::string &label) {
function ParseTree (line 50) | ParseTree *ParseTreeMatch::getMismatchedNode() {
function ParseTre
Copy disabled (too large)
Download .json
Condensed preview — 2263 files, each showing path, character count, and a content snippet. Download the .json file for the full structured content (10,820K chars).
[
{
"path": ".clang-format",
"chars": 719,
"preview": "---\n# This section defines defaults for all languages. Currently we derive ANTLR style from LLVM.\nBasedOnStyle: LLVM\n# O"
},
{
"path": ".editorconfig",
"chars": 300,
"preview": "root = true\n\n[*]\ntab_width = 4\n\n[*.{java,stg}]\ncharset = utf-8\ninsert_final_newline = true\ntrim_trailing_whitespace = tr"
},
{
"path": ".gitattributes",
"chars": 81,
"preview": "# This rule applies to all files which don't match another line below\n* text=auto"
},
{
"path": ".github/ISSUE_TEMPLATE.md",
"chars": 792,
"preview": "<!--\nAll ANTLR contributors provide implementation, maintenance and support for free.\nWe therefore kindly ask that befor"
},
{
"path": ".github/PULL_REQUEST_TEMPLATE.md",
"chars": 822,
"preview": "<!--\nThank you for proposing a contribution to the ANTLR project!\n\n(Please make sure your PR is in a branch other than d"
},
{
"path": ".github/workflows/hosted.yml",
"chars": 9983,
"preview": "name: antlr4\n\nconcurrency:\n group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}\n cancel-in-progre"
},
{
"path": ".gitignore",
"chars": 2509,
"preview": "# Nuget packages\n*.nupkg\n\n# Maven build folders\ntarget/\n# ... but not code generation targets\n!tool/src/org/antlr/v4/cod"
},
{
"path": "ANTLR-HOUSE-RULES.md",
"chars": 2095,
"preview": "# ANTLR HOUSE RULES\n\n*Last updated: Sept 10, 2022*\n\nThis brief document describes best practices for us to all get along"
},
{
"path": "CHANGES.txt",
"chars": 18301,
"preview": "****************************************************************************\nAs of ANTLR 4.2.1, March 25 2014, we are no"
},
{
"path": "CONTRIBUTING.md",
"chars": 1257,
"preview": "# Contributing to ANTLR 4\n\n1. [Fork](https://help.github.com/articles/fork-a-repo) the [antlr/antlr4 repo](https://githu"
},
{
"path": "LICENSE.txt",
"chars": 1480,
"preview": "Copyright (c) 2012-2022 The ANTLR Project. All rights reserved.\n\nRedistribution and use in source and binary forms, with"
},
{
"path": "Package.swift",
"chars": 1042,
"preview": "// swift-tools-version:5.6\n\nimport PackageDescription\n\nlet package = Package(\n name: \"Antlr4\",\n products: [\n "
},
{
"path": "README.md",
"chars": 7778,
"preview": "# ANTLR v4\n\n[](http://java.oracle.com)\n[ 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use "
},
{
"path": "antlr4-maven-plugin/pom.xml",
"chars": 5910,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "antlr4-maven-plugin/resources/META-INF/m2e/lifecycle-mapping-metadata.xml",
"chars": 788,
"preview": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use "
},
{
"path": "antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4ErrorLog.java",
"chars": 3004,
"preview": "/*\n * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/Antlr4Mojo.java",
"chars": 18190,
"preview": "/*\n * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/GrammarDependencies.java",
"chars": 11036,
"preview": "/*\n * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "antlr4-maven-plugin/src/main/java/org/antlr/mojo/antlr4/MojoUtils.java",
"chars": 2570,
"preview": "/*\n * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "antlr4-maven-plugin/src/site/apt/examples/import.apt",
"chars": 425,
"preview": "Imported Grammar Files\n\n In order to have the ANTLR plugin automatically locate and use grammars used\n as imports in you"
},
{
"path": "antlr4-maven-plugin/src/site/apt/examples/libraries.apt.vm",
"chars": 2024,
"preview": "Libraries\n\n The introduction of the import directive in a grammar allows reuse of common grammar files\n as well as the a"
},
{
"path": "antlr4-maven-plugin/src/site/apt/examples/simple.apt.vm",
"chars": 1286,
"preview": "Simple configuration\n\n If your grammar files are organized into the default locations as described in the {{{../index.ht"
},
{
"path": "antlr4-maven-plugin/src/site/apt/faq.apt.vm",
"chars": 4,
"preview": "FAQ\n"
},
{
"path": "antlr4-maven-plugin/src/site/apt/index.apt",
"chars": 2886,
"preview": " -------------\n ANTLR v4 Maven Plugin\n -------------\n Jim Idle\n -------------\n "
},
{
"path": "antlr4-maven-plugin/src/site/apt/usage.apt.vm",
"chars": 1836,
"preview": "Usage\n\n The ANTLR 4 plugin for Maven can generate parsers for any number of grammars in\n your project.\n\n* Compiling Gram"
},
{
"path": "antlr4-maven-plugin/src/site/site.xml",
"chars": 1166,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use"
},
{
"path": "antlr4-maven-plugin/src/test/java/org/antlr/mojo/antlr4/Antlr4MojoTest.java",
"chars": 16705,
"preview": "/*\n * Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "antlr4-maven-plugin/src/test/projects/dependencyRemoved/pom.xml",
"chars": 1037,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/imports/HelloBase.g4",
"chars": 292,
"preview": "lexer grammar TestBaseLexer;\n\ntokens { Name }\n\n// Default \"mode\": Everything OUTSIDE of a tag\nComment : '<!--' .*?"
},
{
"path": "antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/test/Hello.g4",
"chars": 93,
"preview": "grammar Hello;\n\nimport HelloBase;\n\nr : 'hello' ID ;\nID : [a-z]+ ;\nWS : [ \\r\\t\\n]+ -> skip ;\n"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importTokens/pom.xml",
"chars": 1026,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/imports/SimpleLexer.tokens",
"chars": 18,
"preview": "ID=1\nINT=2\nSEMI=3\n"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/test/SimpleParser.g4",
"chars": 204,
"preview": "parser grammar SimpleParser;\noptions {\n // get token types from SimpleLexer.tokens; don't name it\n // SimpleParser.tok"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsCustom/pom.xml",
"chars": 1448,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/Hello.g4",
"chars": 72,
"preview": "grammar Hello;\nr : 'hello' ID ;\nID : [a-z]+ ;\nWS : [ \\r\\t\\n]+ -> skip ;"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestLexer.g4",
"chars": 153,
"preview": "lexer grammar TestLexer;\n\nimport TestBaseLexer;\n\nWS : Whitespace+ -> skip;\nTEXT : ~[<&]+ ; // match a"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestParser.g4",
"chars": 98,
"preview": "parser grammar TestParser;\n\noptions { tokenVocab=TestLexer; }\n\ndocument : (Comment | Name) EOF ;"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/imports/TestBaseLexer.g4",
"chars": 292,
"preview": "lexer grammar TestBaseLexer;\n\ntokens { Name }\n\n// Default \"mode\": Everything OUTSIDE of a tag\nComment : '<!--' .*?"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/pom.xml",
"chars": 1037,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4",
"chars": 258,
"preview": "lexer grammar TestBaseLexer;\n\ntokens { Name }\n\n// Default \"mode\": Everything OUTSIDE of a tag\nComment : '<!--' .*?"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer2.g4",
"chars": 63,
"preview": "lexer grammar TestBaseLexer2;\n\nfragment\nDigit : [0-9] ;\n"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4",
"chars": 72,
"preview": "grammar Hello;\nr : 'hello' ID ;\nID : [a-z]+ ;\nWS : [ \\r\\t\\n]+ -> skip ;"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4",
"chars": 170,
"preview": "lexer grammar TestLexer;\n\nimport TestBaseLexer, TestBaseLexer2;\n\nWS : Whitespace+ -> skip;\nTEXT : ~[<"
},
{
"path": "antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4",
"chars": 98,
"preview": "parser grammar TestParser;\n\noptions { tokenVocab=TestLexer; }\n\ndocument : (Comment | Name) EOF ;"
},
{
"path": "developer-cert-of-origin.txt",
"chars": 1995,
"preview": "As of 4.10, ANTLR uses the Linux Foundation's Developer\nCertificate of Origin, DCO, version 1.1. See either\nhttps://deve"
},
{
"path": "doc/IDEs.md",
"chars": 480,
"preview": "# Integrating ANTLR into Development Systems\n\nThe Java target is the reference implementation mirrored by other targets."
},
{
"path": "doc/ace-javascript-target.md",
"chars": 13355,
"preview": "# Integrating ANTLR JavaScript parsers with ACE editor\n\nHaving the ability to parse code other than JavaScript is great,"
},
{
"path": "doc/actions.md",
"chars": 11309,
"preview": "# Actions and Attributes\n\nIn Chapter 10, Attributes and Actions, we learned how to embed actions within grammars and loo"
},
{
"path": "doc/antlr-project-testing.md",
"chars": 5705,
"preview": "# ANTLR project unit tests\n\n## Introduction\n\nBecause ANTLR supports multiple target languages, the unit tests are broken"
},
{
"path": "doc/building-antlr.md",
"chars": 4573,
"preview": "# Building ANTLR\n\nMost programmers do not need the information on this page because they will simply download the approp"
},
{
"path": "doc/cpp-target.md",
"chars": 10012,
"preview": "# C++\n\nThe C++ target supports all platforms that can either run MS Visual Studio 2017 (or newer), XCode 7 (or newer) or"
},
{
"path": "doc/creating-a-language-target.md",
"chars": 4398,
"preview": "# Creating an ANTLR Language Target\n\nThis document describes how to make ANTLR generate parsers in a new language, *X*.\n"
},
{
"path": "doc/csharp-target.md",
"chars": 3378,
"preview": "# C♯\n\n## Which frameworks are supported?\n\nThe C# runtime is CLS compliant, and only requires a corresponding 3.5 ."
},
{
"path": "doc/dart-target.md",
"chars": 3403,
"preview": "# ANTLR4 Runtime for Dart\n\nFrom version 4.9 onwards antlr's dart generated code is null sound safety compatible and sets"
},
{
"path": "doc/faq/actions-preds.md",
"chars": 400,
"preview": "# Actions and semantic predicates\n\n## How do I test if an optional rule was matched?\n\nFor optional rule references such "
},
{
"path": "doc/faq/error-handling.md",
"chars": 223,
"preview": "# Error handling\n\n## How do I perform semantic checking with ANTLR?\n\nSee [How to implement error handling in ANTLR4](htt"
},
{
"path": "doc/faq/general.md",
"chars": 8494,
"preview": "# General\n\n## Why do we need ANTLR v4?\n\n*Oliver Zeigermann asked me some questions about v4. Here is our conversation.*\n"
},
{
"path": "doc/faq/getting-started.md",
"chars": 653,
"preview": "# Getting started\n\n## How to I install and run a simple grammar?\n\nSee [Getting Started with ANTLR v4](https://raw.github"
},
{
"path": "doc/faq/index.md",
"chars": 2129,
"preview": "# Frequently-Asked Questions (FAQ)\n\nThis is the main landing page for the ANTLR 4 FAQ. The links below will take you to "
},
{
"path": "doc/faq/installation.md",
"chars": 1952,
"preview": "# Installation\n\nPlease read carefully: [Getting Started with ANTLR v4](https://raw.githubusercontent.com/antlr/antlr4/ma"
},
{
"path": "doc/faq/lexical.md",
"chars": 2684,
"preview": "# Lexical analysis\n\n## How can I parse non-ASCII text and use characters in token rules?\n\nSee [Using non-ASCII character"
},
{
"path": "doc/faq/parse-trees.md",
"chars": 4405,
"preview": "# Parse Trees\n\n## How do I get the input text for a parse-tree subtree?\n\nIn ParseTree, you have this method:\n\n```java\n/*"
},
{
"path": "doc/faq/translation.md",
"chars": 1590,
"preview": "# Translation\n\n## ASTs vs parse trees\n\nI used to do specialized AST (**abstract** syntax tree) nodes rather than (concre"
},
{
"path": "doc/getting-started.md",
"chars": 10156,
"preview": "# Getting Started with ANTLR v4\n\nHi and welcome to the version 4 release of ANTLR! See [Why do we need ANTLR v4?](faq/ge"
},
{
"path": "doc/go-changes.md",
"chars": 8725,
"preview": "# Changes to the Go Runtime over time\n\n## v4.12.0 to v4.13.0\n\nStrictly speaking, if ANTLR was a go only project followin"
},
{
"path": "doc/go-target.md",
"chars": 10394,
"preview": "# ANTLR4 Language Target, Runtime for Go\n\n### Changes from ANTLR 4.12.0\n\nPlease see [Changes in ANTLR Go runtimes](go-ch"
},
{
"path": "doc/grammars.md",
"chars": 7686,
"preview": "# Grammar Structure\n\nA grammar is essentially a grammar declaration followed by a list of rules, but has the general for"
},
{
"path": "doc/index.md",
"chars": 3826,
"preview": "# ANTLR 4 Documentation\n\nPlease check [Frequently asked questions (FAQ)](faq/index.md) before asking questions on stacko"
},
{
"path": "doc/interpreters.md",
"chars": 5838,
"preview": "# Parser and Lexer Interpreters\n\n*Since ANTLR 4.2*\n\nFor small parsing tasks it is sometimes convenient to use ANTLR in i"
},
{
"path": "doc/java-target.md",
"chars": 9244,
"preview": "# Java\n\n## Development environments\n\n### Intellij\n\nThere is a very complete and useful plug-in for intellij 12-14, you c"
},
{
"path": "doc/javascript-target.md",
"chars": 7444,
"preview": "# JavaScript\n\n## Which browsers are supported?\n\nIn theory, all browsers supporting ECMAScript 5.1.\n\nIn practice, this ta"
},
{
"path": "doc/left-recursion.md",
"chars": 2514,
"preview": "# Left-recursive rules\n\nThe most natural expression of some common language constructs is left recursive. For example C "
},
{
"path": "doc/lexer-rules.md",
"chars": 13550,
"preview": "# Lexer Rules\n\nA lexer grammar is composed of lexer rules, optionally broken into multiple modes. Lexical modes allow us"
},
{
"path": "doc/lexicon.md",
"chars": 5316,
"preview": "# Grammar Lexicon\n\nThe lexicon of ANTLR is familiar to most programmers because it follows the syntax of C and its deriv"
},
{
"path": "doc/listeners.md",
"chars": 7222,
"preview": "# Parse Tree Listeners\n\n*Partially taken from publically visible [excerpt from ANTLR 4 book](http://media.pragprog.com/t"
},
{
"path": "doc/options.md",
"chars": 5546,
"preview": "# Options\n\nThere are a number of options that you can specify at the grammar and rule element level. (There are currentl"
},
{
"path": "doc/parser-rules.md",
"chars": 19720,
"preview": "# Parser Rules\n\nParsers consist of a set of parser rules either in a parser or a combined grammar. A Java application la"
},
{
"path": "doc/parsing-binary-files.md",
"chars": 5989,
"preview": "# Parsing Binary Files\n\nParsing binary files is no different than parsing character-based files except that the \"charact"
},
{
"path": "doc/php-target.md",
"chars": 3031,
"preview": "# ANTLR4 Runtime for PHP\n\n### First steps\n\n#### 1. Install ANTLR4\n\n[The getting started guide](https://github.com/antlr/"
},
{
"path": "doc/predicates.md",
"chars": 12002,
"preview": "# Semantic Predicates\n\nSemantic predicates, `{...}?`, are boolean expressions written in the target language that indica"
},
{
"path": "doc/python-target.md",
"chars": 9083,
"preview": "# Python 3\n\n## Requirements\n\nYou will need to install Python and Pip, version 3.6 or better.\nSee https://www.python.org/"
},
{
"path": "doc/releasing-antlr.md",
"chars": 17986,
"preview": "# Cutting an ANTLR Release\n\n## Github\n\n### Get dev merged into master\n\nDo this or make a PR:\n\n```bash\ncd ~/antlr/code/an"
},
{
"path": "doc/resources.md",
"chars": 1753,
"preview": "# Articles and Resources\n\n## Books\n\n<a href=\"\"><img src=images/tpantlr2.png width=120></a>\n<a href=\"\"><img src=images/tp"
},
{
"path": "doc/swift-target.md",
"chars": 6172,
"preview": "# ANTLR4 Language Target, Runtime for Swift\n\n## Performance Note\n\nTo use ANTLR4 Swift target in production environment, "
},
{
"path": "doc/target-agnostic-grammars.md",
"chars": 4373,
"preview": "# Writing target-agnostic grammars\n\nSome grammars require\n[semantic predicates](https://github.com/antlr/antlr4/blob/dev"
},
{
"path": "doc/targets.md",
"chars": 1756,
"preview": "# Runtime Libraries and Code Generation Targets\n\nThis page lists the available and upcoming ANTLR runtimes. Please note "
},
{
"path": "doc/tool-options.md",
"chars": 10959,
"preview": "# ANTLR Tool Command Line Options\n\nIf you invoke the ANTLR tool without command line arguments, you’ll get a help messag"
},
{
"path": "doc/tree-matching.md",
"chars": 8198,
"preview": "# Parse Tree Matching and XPath\n\n*Since ANTLR 4.2*\n\nANTLR 4 introduced a visitor and listener mechanism that lets you im"
},
{
"path": "doc/typescript-target.md",
"chars": 4270,
"preview": "# TypeScript\n\nAntlr4 TypeScript runtime uses the JavaScript runtime and adds type files to it.\nThis guarantees the same "
},
{
"path": "doc/unicode.md",
"chars": 8705,
"preview": "# Lexers and Unicode text\n\nPrior to ANTLR 4.7, generated lexers in most targets only supported part of the Unicode stand"
},
{
"path": "doc/wildcard.md",
"chars": 7891,
"preview": "# Wildcard Operator and Nongreedy Subrules\n\nEBNF subrules like `(...)?`, `(...)*` and `(...)+` are greedy—They consume a"
},
{
"path": "docker/.dockerignore",
"chars": 73,
"preview": "tool-testsuite\nruntime-testsuite\n.git*\nREADME.adoc\nREADME.md\ncache\ntests\n"
},
{
"path": "docker/Dockerfile",
"chars": 684,
"preview": "FROM eclipse-temurin:21 AS builder\n\nWORKDIR /opt/antlr4\n\nARG ANTLR_VERSION=\"4.13.2\"\nARG MAVEN_OPTS=\"-Xmx1G\"\n\n\nRUN apt-ge"
},
{
"path": "docker/README.md",
"chars": 1490,
"preview": "# Docker Image for ANTLR4\n\nThis Docker image wraps current version of **ANTLR4** inclusive **Java runtime environment** "
},
{
"path": "historical-contributors-agreement.txt",
"chars": 19598,
"preview": "ANTLR Project Contributors Certification of Origin and Rights\n\nAll contributors to ANTLR v4 must formally agree to abide"
},
{
"path": "pom.xml",
"chars": 4827,
"preview": "<!--\n ~ Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n ~ Use of this file is governed by the BSD 3-c"
},
{
"path": "runtime/CSharp/src/Antlr4.csproj",
"chars": 2897,
"preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n <PropertyGroup>\n <Company>The ANTLR Organization</Company>\n <Version>4.13.2</"
},
{
"path": "runtime/CSharp/src/AntlrFileStream.cs",
"chars": 1589,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/AntlrInputStream.cs",
"chars": 9783,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATN.cs",
"chars": 9767,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNConfig.cs",
"chars": 6939,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNConfigSet.cs",
"chars": 10437,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNDeserializationOptions.cs",
"chars": 2910,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNDeserializer.cs",
"chars": 40956,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNSimulator.cs",
"chars": 3209,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNState.cs",
"chars": 5084,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ATNType.cs",
"chars": 550,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/AbstractPredicateTransition.cs",
"chars": 510,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ActionTransition.cs",
"chars": 1598,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/AmbiguityInfo.cs",
"chars": 3922,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ArrayPredictionContext.cs",
"chars": 2955,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/AtomTransition.cs",
"chars": 1410,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/BasicBlockStartState.cs",
"chars": 590,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/BasicState.cs",
"chars": 568,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/BlockEndState.cs",
"chars": 690,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/BlockStartState.cs",
"chars": 500,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ConflictInfo.cs",
"chars": 2751,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ContextSensitivityInfo.cs",
"chars": 2516,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/DecisionEventInfo.cs",
"chars": 3091,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/DecisionInfo.cs",
"chars": 8972,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/DecisionState.cs",
"chars": 416,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/EmptyPredictionContext.cs",
"chars": 1675,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/EpsilonTransition.cs",
"chars": 1877,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ErrorInfo.cs",
"chars": 2150,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ILexerAction.cs",
"chars": 2820,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LL1Analyzer.cs",
"chars": 10412,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerATNConfig.cs",
"chars": 3514,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause "
},
{
"path": "runtime/CSharp/src/Atn/LexerATNSimulator.cs",
"chars": 24973,
"preview": "/*\n/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-claus"
},
{
"path": "runtime/CSharp/src/Atn/LexerActionExecutor.cs",
"chars": 10684,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerActionType.cs",
"chars": 518,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerChannelAction.cs",
"chars": 3411,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerCustomAction.cs",
"chars": 5684,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerIndexedCustomAction.cs",
"chars": 5429,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerModeAction.cs",
"chars": 3368,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerMoreAction.cs",
"chars": 2693,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerPopModeAction.cs",
"chars": 2732,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerPushModeAction.cs",
"chars": 3404,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerSkipAction.cs",
"chars": 2693,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LexerTypeAction.cs",
"chars": 3289,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LookaheadEventInfo.cs",
"chars": 2497,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/LoopEndState.cs",
"chars": 691,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/MergeCache.cs",
"chars": 1110,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause "
},
{
"path": "runtime/CSharp/src/Atn/NotSetTransition.cs",
"chars": 1050,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ParseInfo.cs",
"chars": 4799,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ParserATNSimulator.cs",
"chars": 84708,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause "
},
{
"path": "runtime/CSharp/src/Atn/PlusBlockStartState.cs",
"chars": 986,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PlusLoopbackState.cs",
"chars": 769,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PrecedencePredicateTransition.cs",
"chars": 1411,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PredicateEvalInfo.cs",
"chars": 3685,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PredicateTransition.cs",
"chars": 2185,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PredictionContext.cs",
"chars": 16910,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PredictionContextCache.cs",
"chars": 1157,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/PredictionMode.cs",
"chars": 33749,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/ProfilingATNSimulator.cs",
"chars": 8106,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/RangeTransition.cs",
"chars": 1287,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/RuleStartState.cs",
"chars": 619,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/RuleStopState.cs",
"chars": 1071,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/RuleTransition.cs",
"chars": 1765,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/SemanticContext.cs",
"chars": 15561,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/SetTransition.cs",
"chars": 1498,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/SimulatorState.cs",
"chars": 980,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/SingletonPredictionContext.cs",
"chars": 2678,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/StarBlockStartState.cs",
"chars": 686,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/StarLoopEntryState.cs",
"chars": 1240,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/StarLoopbackState.cs",
"chars": 668,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/StateType.cs",
"chars": 531,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/TokensStartState.cs",
"chars": 547,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/Transition.cs",
"chars": 2864,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/TransitionType.cs",
"chars": 447,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Atn/WildcardTransition.cs",
"chars": 925,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/BailErrorStrategy.cs",
"chars": 3779,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/BaseErrorListener.cs",
"chars": 1438,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/BufferedTokenStream.cs",
"chars": 21550,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/CharStreams.cs",
"chars": 3500,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/CommonToken.cs",
"chars": 9964,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/CommonTokenFactory.cs",
"chars": 4430,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/CommonTokenStream.cs",
"chars": 5554,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/ConsoleErrorListener.cs",
"chars": 1468,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/DefaultErrorStrategy.cs",
"chars": 35263,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dependents.cs",
"chars": 689,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/AbstractEdgeMap.cs",
"chars": 2422,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/AcceptStateInfo.cs",
"chars": 2352,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/ArrayEdgeMap.cs",
"chars": 5054,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/DFA.cs",
"chars": 4474,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/DFASerializer.cs",
"chars": 3855,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/DFAState.cs",
"chars": 6104,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/EmptyEdgeMap.cs",
"chars": 1865,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/IEdgeMap.cs",
"chars": 954,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/LexerDFASerializer.cs",
"chars": 587,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/SingletonEdgeMap.cs",
"chars": 3313,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/Dfa/SparseEdgeMap.cs",
"chars": 6186,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/DiagnosticErrorListener.cs",
"chars": 6614,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/FailedPredicateException.cs",
"chars": 2910,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/IAntlrErrorListener.cs",
"chars": 2679,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/IAntlrErrorStrategy.cs",
"chars": 6400,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/ICharStream.cs",
"chars": 1986,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/IIntStream.cs",
"chars": 12640,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/IParserErrorListener.cs",
"chars": 8652,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause l"
},
{
"path": "runtime/CSharp/src/IRecognizer.cs",
"chars": 702,
"preview": "/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.\n * Use of this file is governed by the BSD 3-clause "
}
]
// ... and 2063 more files (download for full content)
About this extraction
This page contains the full source code of the antlr/antlr4 GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 2263 files (9.6 MB), approximately 2.6M tokens, and a symbol index with 11341 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.