├── .editorconfig
├── .gitattributes
├── .gitignore
├── .gitmodules
├── CONTRIBUTING.md
├── CreatingTargets.md
├── LICENSE.txt
├── Readme.md
├── THIRD-PARTY-NOTICES.txt
├── appveyor.yml
├── build
├── Antlr4.CodeGenerator.nuspec
├── Antlr4.Runtime.nuspec
├── Antlr4.nuspec
├── DotnetValidation
│ ├── DotnetValidation.csproj
│ ├── DotnetValidation.sln
│ ├── Grammar.g4
│ ├── NuGet.config
│ ├── Program.cs
│ └── SubFolder
│ │ └── SubGrammar.g4
├── DotnetValidationJavaCodegen
│ ├── DotnetValidation.csproj
│ ├── DotnetValidation.sln
│ ├── Grammar.g4
│ ├── NuGet.config
│ ├── Program.cs
│ └── SubFolder
│ │ └── SubGrammar.g4
├── DotnetValidationSingleTarget
│ ├── DotnetValidation.csproj
│ ├── DotnetValidation.sln
│ ├── Grammar.g4
│ ├── NuGet.config
│ ├── Program.cs
│ └── SubFolder
│ │ └── SubGrammar.g4
├── build.ps1
├── check-key.ps1
├── keys.ps1
├── keys
│ ├── Antlr4.dev.snk
│ ├── Antlr4.snk
│ └── TestingKey.snk
├── push.ps1
└── version.ps1
├── images
└── FrameworkCompatibility.png
├── reference
├── antlr4
│ ├── .editorconfig
│ ├── .gitattributes
│ ├── .github
│ │ ├── ISSUE_TEMPLATE.md
│ │ └── PULL_REQUEST_TEMPLATE.md
│ ├── .gitignore
│ ├── .travis.yml
│ ├── CHANGES.txt
│ ├── LICENSE.txt
│ ├── 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
│ │ │ └── test
│ │ │ ├── Hello.g4
│ │ │ ├── TestLexer.g4
│ │ │ └── TestParser.g4
│ ├── antlr4-testgen-maven-plugin
│ │ ├── nb-configuration.xml
│ │ ├── pom.xml
│ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── m2e
│ │ │ │ └── lifecycle-mapping-metadata.xml
│ │ └── src
│ │ │ ├── main
│ │ │ └── java
│ │ │ │ └── org
│ │ │ │ └── antlr
│ │ │ │ └── mojo
│ │ │ │ └── antlr4
│ │ │ │ └── testgen
│ │ │ │ └── Antlr4TestGeneratorMojo.java
│ │ │ └── site
│ │ │ ├── apt
│ │ │ ├── examples
│ │ │ │ ├── import.apt
│ │ │ │ ├── libraries.apt.vm
│ │ │ │ └── simple.apt.vm
│ │ │ ├── faq.apt.vm
│ │ │ ├── index.apt
│ │ │ └── usage.apt.vm
│ │ │ └── site.xml
│ ├── appveyor.yml
│ ├── contributors.txt
│ ├── doc
│ │ ├── IDEs.md
│ │ ├── actions.md
│ │ ├── antlr-project-testing.md
│ │ ├── building-antlr.md
│ │ ├── creating-a-language-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
│ │ ├── grammars.md
│ │ ├── images
│ │ │ ├── combined.png
│ │ │ ├── foreign.png
│ │ │ ├── hello-parrt.png
│ │ │ ├── idea-prefs-after-install.png
│ │ │ ├── idea-prefs.png
│ │ │ ├── intellij-maven.png
│ │ │ ├── nested-fuzzy.png
│ │ │ ├── nested.png
│ │ │ ├── nonascii.png
│ │ │ ├── nonnested-fuzzy.png
│ │ │ ├── process.png
│ │ │ ├── teronbook.png
│ │ │ ├── tertalk.png
│ │ │ ├── tpantlr2.png
│ │ │ ├── tpdsl.png
│ │ │ ├── xyz.png
│ │ │ ├── xyz_opt.png
│ │ │ ├── xyz_plus.png
│ │ │ └── xyz_star.png
│ │ ├── index.md
│ │ ├── interpreters.md
│ │ ├── java-target.md
│ │ ├── left-recursion.md
│ │ ├── lexer-rules.md
│ │ ├── lexicon.md
│ │ ├── listeners.md
│ │ ├── optimized-fork.md
│ │ ├── options.md
│ │ ├── parser-rules.md
│ │ ├── parsing-binary-files.md
│ │ ├── predicates.md
│ │ ├── releasing-antlr.md
│ │ ├── resources.md
│ │ ├── resources
│ │ │ └── worker-base.js
│ │ ├── runtimetests-overview.md
│ │ ├── targets.md
│ │ ├── tool-options.md
│ │ ├── tree-matching.md
│ │ └── wildcard.md
│ ├── pom.xml
│ ├── runtime-testsuite
│ │ ├── pom.xml
│ │ ├── resources
│ │ │ └── org
│ │ │ │ └── antlr
│ │ │ │ └── v4
│ │ │ │ └── test
│ │ │ │ └── runtime
│ │ │ │ └── templates
│ │ │ │ ├── CompositeLexers
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LexerDelegatorInvokesDelegateRule.stg
│ │ │ │ └── LexerDelegatorRuleOverridesDelegate.stg
│ │ │ │ ├── CompositeParsers
│ │ │ │ ├── BringInLiteralsFromDelegate.stg
│ │ │ │ ├── CombinedImportsCombined.stg
│ │ │ │ ├── DelegatesSeeSameTokenType.stg
│ │ │ │ ├── DelegatorAccessesDelegateMembers.stg
│ │ │ │ ├── DelegatorInvokesDelegateRule.stg
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithArgs.stg
│ │ │ │ ├── DelegatorInvokesDelegateRuleWithReturnStruct.stg
│ │ │ │ ├── DelegatorInvokesFirstVersionOfDelegateRule.stg
│ │ │ │ ├── DelegatorRuleOverridesDelegate.stg
│ │ │ │ ├── DelegatorRuleOverridesDelegates.stg
│ │ │ │ ├── DelegatorRuleOverridesLookaheadInDelegate.stg
│ │ │ │ ├── ImportLexerWithOnlyFragmentRules.stg
│ │ │ │ ├── ImportedGrammarWithEmptyOptions.stg
│ │ │ │ ├── ImportedRuleWithAction.stg
│ │ │ │ ├── Index.stg
│ │ │ │ └── KeywordVSIDOrder.stg
│ │ │ │ ├── FullContextParsing
│ │ │ │ ├── AmbigYieldsCtxSensitiveDFA.stg
│ │ │ │ ├── AmbiguityNoLoop.stg
│ │ │ │ ├── CtxSensitiveDFATwoDiffInputWithDFA.stg
│ │ │ │ ├── CtxSensitiveDFATwoDiffInputWithoutDFA.stg
│ │ │ │ ├── CtxSensitiveWithDFA.stg
│ │ │ │ ├── CtxSensitiveWithDFA_1.stg
│ │ │ │ ├── CtxSensitiveWithDFA_2.stg
│ │ │ │ ├── CtxSensitiveWithoutDFA.stg
│ │ │ │ ├── CtxSensitiveWithoutDFA_1.stg
│ │ │ │ ├── CtxSensitiveWithoutDFA_2.stg
│ │ │ │ ├── ExprAmbiguity.stg
│ │ │ │ ├── ExprAmbiguity_1.stg
│ │ │ │ ├── ExprAmbiguity_2.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_1.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_2.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_3.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_4.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_5.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithDFA_6.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_1.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_2.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_3.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_4.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_5.stg
│ │ │ │ ├── FullContextIF_THEN_ELSEParse_WithoutDFA_6.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LoopsSimulateTailRecursion.stg
│ │ │ │ ├── SLLSeesEOFInLLGrammarWithDFA.stg
│ │ │ │ └── SLLSeesEOFInLLGrammarWithoutDFA.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LeftRecursion
│ │ │ │ ├── AmbigLR.stg
│ │ │ │ ├── AmbigLR_1.stg
│ │ │ │ ├── AmbigLR_2.stg
│ │ │ │ ├── AmbigLR_3.stg
│ │ │ │ ├── AmbigLR_4.stg
│ │ │ │ ├── AmbigLR_5.stg
│ │ │ │ ├── Declarations.stg
│ │ │ │ ├── Declarations_1.stg
│ │ │ │ ├── Declarations_10.stg
│ │ │ │ ├── Declarations_2.stg
│ │ │ │ ├── Declarations_3.stg
│ │ │ │ ├── Declarations_4.stg
│ │ │ │ ├── Declarations_5.stg
│ │ │ │ ├── Declarations_6.stg
│ │ │ │ ├── Declarations_7.stg
│ │ │ │ ├── Declarations_8.stg
│ │ │ │ ├── Declarations_9.stg
│ │ │ │ ├── DirectCallToLeftRecursiveRule.stg
│ │ │ │ ├── DirectCallToLeftRecursiveRule_1.stg
│ │ │ │ ├── DirectCallToLeftRecursiveRule_2.stg
│ │ │ │ ├── DirectCallToLeftRecursiveRule_3.stg
│ │ │ │ ├── Expressions.stg
│ │ │ │ ├── Expressions_1.stg
│ │ │ │ ├── Expressions_2.stg
│ │ │ │ ├── Expressions_3.stg
│ │ │ │ ├── Expressions_4.stg
│ │ │ │ ├── Expressions_5.stg
│ │ │ │ ├── Expressions_6.stg
│ │ │ │ ├── Expressions_7.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── JavaExpressions.stg
│ │ │ │ ├── JavaExpressions_1.stg
│ │ │ │ ├── JavaExpressions_10.stg
│ │ │ │ ├── JavaExpressions_11.stg
│ │ │ │ ├── JavaExpressions_12.stg
│ │ │ │ ├── JavaExpressions_2.stg
│ │ │ │ ├── JavaExpressions_3.stg
│ │ │ │ ├── JavaExpressions_4.stg
│ │ │ │ ├── JavaExpressions_5.stg
│ │ │ │ ├── JavaExpressions_6.stg
│ │ │ │ ├── JavaExpressions_7.stg
│ │ │ │ ├── JavaExpressions_8.stg
│ │ │ │ ├── JavaExpressions_9.stg
│ │ │ │ ├── LabelsOnOpSubrule.stg
│ │ │ │ ├── LabelsOnOpSubrule_1.stg
│ │ │ │ ├── LabelsOnOpSubrule_2.stg
│ │ │ │ ├── LabelsOnOpSubrule_3.stg
│ │ │ │ ├── MultipleActions.stg
│ │ │ │ ├── MultipleActionsPredicatesOptions.stg
│ │ │ │ ├── MultipleActionsPredicatesOptions_1.stg
│ │ │ │ ├── MultipleActionsPredicatesOptions_2.stg
│ │ │ │ ├── MultipleActionsPredicatesOptions_3.stg
│ │ │ │ ├── MultipleActions_1.stg
│ │ │ │ ├── MultipleActions_2.stg
│ │ │ │ ├── MultipleActions_3.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_1.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_2.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_3.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_4.stg
│ │ │ │ ├── MultipleAlternativesWithCommonLabel_5.stg
│ │ │ │ ├── PrecedenceFilterConsidersContext.stg
│ │ │ │ ├── PrefixAndOtherAlt.stg
│ │ │ │ ├── PrefixAndOtherAlt_1.stg
│ │ │ │ ├── PrefixAndOtherAlt_2.stg
│ │ │ │ ├── PrefixOpWithActionAndLabel.stg
│ │ │ │ ├── PrefixOpWithActionAndLabel_1.stg
│ │ │ │ ├── PrefixOpWithActionAndLabel_2.stg
│ │ │ │ ├── PrefixOpWithActionAndLabel_3.stg
│ │ │ │ ├── ReturnValueAndActions.stg
│ │ │ │ ├── ReturnValueAndActionsAndLabels.stg
│ │ │ │ ├── ReturnValueAndActionsAndLabels_1.stg
│ │ │ │ ├── ReturnValueAndActionsAndLabels_2.stg
│ │ │ │ ├── ReturnValueAndActionsAndLabels_3.stg
│ │ │ │ ├── ReturnValueAndActionsAndLabels_4.stg
│ │ │ │ ├── ReturnValueAndActionsList1.stg
│ │ │ │ ├── ReturnValueAndActionsList1_1.stg
│ │ │ │ ├── ReturnValueAndActionsList1_2.stg
│ │ │ │ ├── ReturnValueAndActionsList1_3.stg
│ │ │ │ ├── ReturnValueAndActionsList1_4.stg
│ │ │ │ ├── ReturnValueAndActionsList2.stg
│ │ │ │ ├── ReturnValueAndActionsList2_1.stg
│ │ │ │ ├── ReturnValueAndActionsList2_2.stg
│ │ │ │ ├── ReturnValueAndActionsList2_3.stg
│ │ │ │ ├── ReturnValueAndActionsList2_4.stg
│ │ │ │ ├── ReturnValueAndActions_1.stg
│ │ │ │ ├── ReturnValueAndActions_2.stg
│ │ │ │ ├── ReturnValueAndActions_3.stg
│ │ │ │ ├── ReturnValueAndActions_4.stg
│ │ │ │ ├── SemPred.stg
│ │ │ │ ├── SemPredFailOption.stg
│ │ │ │ ├── Simple.stg
│ │ │ │ ├── Simple_1.stg
│ │ │ │ ├── Simple_2.stg
│ │ │ │ ├── Simple_3.stg
│ │ │ │ ├── TernaryExpr.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_1.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_2.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_3.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_4.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_5.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_6.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_7.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_8.stg
│ │ │ │ ├── TernaryExprExplicitAssociativity_9.stg
│ │ │ │ ├── TernaryExpr_1.stg
│ │ │ │ ├── TernaryExpr_2.stg
│ │ │ │ ├── TernaryExpr_3.stg
│ │ │ │ ├── TernaryExpr_4.stg
│ │ │ │ ├── TernaryExpr_5.stg
│ │ │ │ ├── TernaryExpr_6.stg
│ │ │ │ ├── TernaryExpr_7.stg
│ │ │ │ ├── TernaryExpr_8.stg
│ │ │ │ ├── TernaryExpr_9.stg
│ │ │ │ ├── WhitespaceInfluence.stg
│ │ │ │ ├── WhitespaceInfluence_1.stg
│ │ │ │ └── WhitespaceInfluence_2.stg
│ │ │ │ ├── LexerErrors
│ │ │ │ ├── DFAToATNThatFailsBackToDFA.stg
│ │ │ │ ├── DFAToATNThatMatchesThenFailsInATN.stg
│ │ │ │ ├── EnforcedGreedyNestedBrances.stg
│ │ │ │ ├── EnforcedGreedyNestedBrances_1.stg
│ │ │ │ ├── EnforcedGreedyNestedBrances_2.stg
│ │ │ │ ├── ErrorInMiddle.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── InvalidCharAtStart.stg
│ │ │ │ ├── InvalidCharAtStartAfterDFACache.stg
│ │ │ │ ├── InvalidCharInToken.stg
│ │ │ │ ├── InvalidCharInTokenAfterDFACache.stg
│ │ │ │ ├── LexerExecDFA.stg
│ │ │ │ ├── StringsEmbeddedInActions.stg
│ │ │ │ ├── StringsEmbeddedInActions_1.stg
│ │ │ │ └── StringsEmbeddedInActions_2.stg
│ │ │ │ ├── LexerExec
│ │ │ │ ├── ActionPlacement.stg
│ │ │ │ ├── CharSet.stg
│ │ │ │ ├── CharSetInSet.stg
│ │ │ │ ├── CharSetNot.stg
│ │ │ │ ├── CharSetPlus.stg
│ │ │ │ ├── CharSetRange.stg
│ │ │ │ ├── CharSetWithEscapedChar.stg
│ │ │ │ ├── CharSetWithMissingEndRange.stg
│ │ │ │ ├── CharSetWithMissingEscapeChar.stg
│ │ │ │ ├── CharSetWithQuote1.stg
│ │ │ │ ├── CharSetWithQuote2.stg
│ │ │ │ ├── EOFByItself.stg
│ │ │ │ ├── EOFSuffixInFirstRule.stg
│ │ │ │ ├── EOFSuffixInFirstRule_1.stg
│ │ │ │ ├── EOFSuffixInFirstRule_2.stg
│ │ │ │ ├── GreedyClosure.stg
│ │ │ │ ├── GreedyConfigs.stg
│ │ │ │ ├── GreedyOptional.stg
│ │ │ │ ├── GreedyPositiveClosure.stg
│ │ │ │ ├── HexVsID.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── KeywordID.stg
│ │ │ │ ├── LargeLexer.stg
│ │ │ │ ├── NonGreedyClosure.stg
│ │ │ │ ├── NonGreedyConfigs.stg
│ │ │ │ ├── NonGreedyOptional.stg
│ │ │ │ ├── NonGreedyPositiveClosure.stg
│ │ │ │ ├── NonGreedyTermination1.stg
│ │ │ │ ├── NonGreedyTermination2.stg
│ │ │ │ ├── Parentheses.stg
│ │ │ │ ├── PositionAdjustingLexer.stg
│ │ │ │ ├── QuoteTranslation.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_1.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardPlus_2.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_1.stg
│ │ │ │ ├── RecursiveLexerRuleRefWithWildcardStar_2.stg
│ │ │ │ ├── RefToRuleDoesNotSetTokenNorEmitAnother.stg
│ │ │ │ ├── Slashes.stg
│ │ │ │ └── ZeroLengthToken.stg
│ │ │ │ ├── Listeners
│ │ │ │ ├── Basic.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LR.stg
│ │ │ │ ├── LRWithLabels.stg
│ │ │ │ ├── RuleGetters.stg
│ │ │ │ ├── RuleGetters_1.stg
│ │ │ │ ├── RuleGetters_2.stg
│ │ │ │ ├── TokenGetters.stg
│ │ │ │ ├── TokenGetters_1.stg
│ │ │ │ └── TokenGetters_2.stg
│ │ │ │ ├── ParseTrees
│ │ │ │ ├── 2AltLoop.stg
│ │ │ │ ├── 2Alts.stg
│ │ │ │ ├── AltNum.stg
│ │ │ │ ├── ExtraToken.stg
│ │ │ │ ├── ExtraTokensAndAltLabels.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── NoViableAlt.stg
│ │ │ │ ├── RuleRef.stg
│ │ │ │ ├── Sync.stg
│ │ │ │ ├── Token2.stg
│ │ │ │ └── TokenAndRuleContextString.stg
│ │ │ │ ├── ParserErrors
│ │ │ │ ├── ConjuringUpToken.stg
│ │ │ │ ├── ConjuringUpTokenFromSet.stg
│ │ │ │ ├── ContextListGetters.stg
│ │ │ │ ├── DuplicatedLeftRecursiveCall.stg
│ │ │ │ ├── DuplicatedLeftRecursiveCall_1.stg
│ │ │ │ ├── DuplicatedLeftRecursiveCall_2.stg
│ │ │ │ ├── DuplicatedLeftRecursiveCall_3.stg
│ │ │ │ ├── DuplicatedLeftRecursiveCall_4.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── InvalidATNStateRemoval.stg
│ │ │ │ ├── InvalidEmptyInput.stg
│ │ │ │ ├── LL1ErrorInfo.stg
│ │ │ │ ├── LL2.stg
│ │ │ │ ├── LL3.stg
│ │ │ │ ├── LLStar.stg
│ │ │ │ ├── MultiTokenDeletionBeforeLoop.stg
│ │ │ │ ├── MultiTokenDeletionBeforeLoop2.stg
│ │ │ │ ├── MultiTokenDeletionDuringLoop.stg
│ │ │ │ ├── MultiTokenDeletionDuringLoop2.stg
│ │ │ │ ├── NoViableAltAvoidance.stg
│ │ │ │ ├── SingleSetInsertion.stg
│ │ │ │ ├── SingleSetInsertionConsumption.stg
│ │ │ │ ├── SingleTokenDeletion.stg
│ │ │ │ ├── SingleTokenDeletionBeforeAlt.stg
│ │ │ │ ├── SingleTokenDeletionBeforeLoop.stg
│ │ │ │ ├── SingleTokenDeletionBeforeLoop2.stg
│ │ │ │ ├── SingleTokenDeletionBeforePredict.stg
│ │ │ │ ├── SingleTokenDeletionConsumption.stg
│ │ │ │ ├── SingleTokenDeletionDuringLoop.stg
│ │ │ │ ├── SingleTokenDeletionDuringLoop2.stg
│ │ │ │ ├── SingleTokenDeletionExpectingSet.stg
│ │ │ │ ├── SingleTokenInsertion.stg
│ │ │ │ ├── TokenMismatch.stg
│ │ │ │ └── TokenMismatch2.stg
│ │ │ │ ├── ParserExec
│ │ │ │ ├── APlus.stg
│ │ │ │ ├── AStar.stg
│ │ │ │ ├── AStar_1.stg
│ │ │ │ ├── AStar_2.stg
│ │ │ │ ├── AlternateQuotes.stg
│ │ │ │ ├── AorAPlus.stg
│ │ │ │ ├── AorAStar.stg
│ │ │ │ ├── AorAStar_1.stg
│ │ │ │ ├── AorAStar_2.stg
│ │ │ │ ├── AorB.stg
│ │ │ │ ├── AorBPlus.stg
│ │ │ │ ├── AorBStar.stg
│ │ │ │ ├── AorBStar_1.stg
│ │ │ │ ├── AorBStar_2.stg
│ │ │ │ ├── Basic.stg
│ │ │ │ ├── EOFInClosure.stg
│ │ │ │ ├── IfIfElseGreedyBinding1.stg
│ │ │ │ ├── IfIfElseGreedyBinding2.stg
│ │ │ │ ├── IfIfElseNonGreedyBinding1.stg
│ │ │ │ ├── IfIfElseNonGreedyBinding2.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LL1OptionalBlock.stg
│ │ │ │ ├── LL1OptionalBlock_1.stg
│ │ │ │ ├── LL1OptionalBlock_2.stg
│ │ │ │ ├── LabelAliasingAcrossLabeledAlternatives.stg
│ │ │ │ ├── Labels.stg
│ │ │ │ ├── ListLabelForClosureContext.stg
│ │ │ │ ├── ListLabelsOnSet.stg
│ │ │ │ ├── MultipleEOFHandling.stg
│ │ │ │ ├── OpenDeviceStatement.stg
│ │ │ │ ├── OpenDeviceStatement_1.stg
│ │ │ │ ├── OpenDeviceStatement_2.stg
│ │ │ │ ├── OpenDeviceStatement_3.stg
│ │ │ │ ├── Optional.stg
│ │ │ │ ├── Optional_1.stg
│ │ │ │ ├── Optional_2.stg
│ │ │ │ ├── Optional_3.stg
│ │ │ │ ├── Optional_4.stg
│ │ │ │ ├── ParserProperty.stg
│ │ │ │ ├── PredicatedIfIfElse.stg
│ │ │ │ ├── PredictionIssue334.stg
│ │ │ │ ├── ReferenceToATN.stg
│ │ │ │ ├── ReferenceToATN_1.stg
│ │ │ │ ├── ReferenceToATN_2.stg
│ │ │ │ └── StartRuleWithoutEOF.stg
│ │ │ │ ├── Performance
│ │ │ │ ├── DropLoopEntryBranchInLRRule.stg
│ │ │ │ ├── DropLoopEntryBranchInLRRule_1.stg
│ │ │ │ ├── DropLoopEntryBranchInLRRule_2.stg
│ │ │ │ ├── DropLoopEntryBranchInLRRule_3.stg
│ │ │ │ ├── DropLoopEntryBranchInLRRule_4.stg
│ │ │ │ ├── DropLoopEntryBranchInLRRule_5.stg
│ │ │ │ ├── ExpressionGrammar.stg
│ │ │ │ ├── ExpressionGrammar_1.stg
│ │ │ │ ├── ExpressionGrammar_2.stg
│ │ │ │ └── Index.stg
│ │ │ │ ├── SemPredEvalLexer
│ │ │ │ ├── DisableRule.stg
│ │ │ │ ├── EnumNotID.stg
│ │ │ │ ├── IDnotEnum.stg
│ │ │ │ ├── IDvsEnum.stg
│ │ │ │ ├── Indent.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LexerInputPositionSensitivePredicates.stg
│ │ │ │ ├── PredicatedKeywords.stg
│ │ │ │ └── RuleSempredFunction.stg
│ │ │ │ ├── SemPredEvalParser
│ │ │ │ ├── 2UnpredicatedAlts.stg
│ │ │ │ ├── 2UnpredicatedAltsAndOneOrthogonalAlt.stg
│ │ │ │ ├── ActionHidesPreds.stg
│ │ │ │ ├── ActionsHidePredsInGlobalFOLLOW.stg
│ │ │ │ ├── AtomWithClosureInTranslatedLRRule.stg
│ │ │ │ ├── DepedentPredsInGlobalFOLLOW.stg
│ │ │ │ ├── DependentPredNotInOuterCtxShouldBeIgnored.stg
│ │ │ │ ├── DisabledAlternative.stg
│ │ │ │ ├── IndependentPredNotPassedOuterCtxToAvoidCastException.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── NoTruePredsThrowsNoViableAlt.stg
│ │ │ │ ├── Order.stg
│ │ │ │ ├── PredFromAltTestedInLoopBack.stg
│ │ │ │ ├── PredFromAltTestedInLoopBack_1.stg
│ │ │ │ ├── PredFromAltTestedInLoopBack_2.stg
│ │ │ │ ├── PredTestedEvenWhenUnAmbig.stg
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_1.stg
│ │ │ │ ├── PredTestedEvenWhenUnAmbig_2.stg
│ │ │ │ ├── PredicateDependentOnArg.stg
│ │ │ │ ├── PredicateDependentOnArg2.stg
│ │ │ │ ├── PredsInGlobalFOLLOW.stg
│ │ │ │ ├── RewindBeforePredEval.stg
│ │ │ │ ├── Simple.stg
│ │ │ │ ├── SimpleValidate.stg
│ │ │ │ ├── SimpleValidate2.stg
│ │ │ │ ├── ToLeft.stg
│ │ │ │ ├── ToLeftWithVaryingPredicate.stg
│ │ │ │ ├── UnpredicatedPathsInAlt.stg
│ │ │ │ └── ValidateInDFA.stg
│ │ │ │ ├── Sets
│ │ │ │ ├── CharSetLiteral.stg
│ │ │ │ ├── ComplementSet.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── LexerOptionalSet.stg
│ │ │ │ ├── LexerPlusSet.stg
│ │ │ │ ├── LexerStarSet.stg
│ │ │ │ ├── NotChar.stg
│ │ │ │ ├── NotCharSet.stg
│ │ │ │ ├── NotCharSetWithLabel.stg
│ │ │ │ ├── NotCharSetWithRuleRef3.stg
│ │ │ │ ├── OptionalLexerSingleElement.stg
│ │ │ │ ├── OptionalSet.stg
│ │ │ │ ├── OptionalSingleElement.stg
│ │ │ │ ├── ParserNotSet.stg
│ │ │ │ ├── ParserNotToken.stg
│ │ │ │ ├── ParserNotTokenWithLabel.stg
│ │ │ │ ├── ParserSet.stg
│ │ │ │ ├── PlusLexerSingleElement.stg
│ │ │ │ ├── PlusSet.stg
│ │ │ │ ├── RuleAsSet.stg
│ │ │ │ ├── SeqDoesNotBecomeSet.stg
│ │ │ │ ├── StarLexerSingleElement.stg
│ │ │ │ ├── StarLexerSingleElement_1.stg
│ │ │ │ ├── StarLexerSingleElement_2.stg
│ │ │ │ └── StarSet.stg
│ │ │ │ └── Visitors
│ │ │ │ ├── CalculatorVisitor.stg
│ │ │ │ ├── Index.stg
│ │ │ │ ├── ShouldNotVisitEOF.stg
│ │ │ │ ├── ShouldNotVisitTerminal.stg
│ │ │ │ ├── VisitErrorNode.stg
│ │ │ │ └── VisitTerminalNode.stg
│ │ └── src
│ │ │ └── org
│ │ │ └── antlr
│ │ │ └── v4
│ │ │ └── testgen
│ │ │ ├── JavaEscapeStringMap.java
│ │ │ ├── LinesStringMap.java
│ │ │ ├── STGroupModelAdaptor.java
│ │ │ ├── StrlenStringMap.java
│ │ │ └── TestGenerator.java
│ ├── runtime
│ │ ├── Java
│ │ │ ├── doxyfile
│ │ │ ├── lib
│ │ │ │ └── org.abego.treelayout.core.jar
│ │ │ ├── nb-configuration.xml
│ │ │ ├── pom.xml
│ │ │ ├── resources
│ │ │ │ └── META-INF
│ │ │ │ │ └── services
│ │ │ │ │ └── javax.annotation.processing.Processor
│ │ │ └── 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
│ │ │ │ ├── CommonToken.java
│ │ │ │ ├── CommonTokenFactory.java
│ │ │ │ ├── CommonTokenStream.java
│ │ │ │ ├── ConsoleErrorListener.java
│ │ │ │ ├── DefaultErrorStrategy.java
│ │ │ │ ├── Dependents.java
│ │ │ │ ├── DiagnosticErrorListener.java
│ │ │ │ ├── FailedPredicateException.java
│ │ │ │ ├── InputMismatchException.java
│ │ │ │ ├── IntStream.java
│ │ │ │ ├── InterpreterRuleContext.java
│ │ │ │ ├── Lexer.java
│ │ │ │ ├── LexerInterpreter.java
│ │ │ │ ├── LexerNoViableAltException.java
│ │ │ │ ├── ListTokenSource.java
│ │ │ │ ├── NoViableAltException.java
│ │ │ │ ├── Parser.java
│ │ │ │ ├── ParserErrorListener.java
│ │ │ │ ├── ParserInterpreter.java
│ │ │ │ ├── ParserRuleContext.java
│ │ │ │ ├── ProxyErrorListener.java
│ │ │ │ ├── ProxyParserErrorListener.java
│ │ │ │ ├── RecognitionException.java
│ │ │ │ ├── Recognizer.java
│ │ │ │ ├── RuleContext.java
│ │ │ │ ├── RuleContextWithAltNum.java
│ │ │ │ ├── RuleDependencies.java
│ │ │ │ ├── RuleDependency.java
│ │ │ │ ├── RuleVersion.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
│ │ │ │ ├── ConflictInfo.java
│ │ │ │ ├── ContextSensitivityInfo.java
│ │ │ │ ├── DecisionEventInfo.java
│ │ │ │ ├── DecisionInfo.java
│ │ │ │ ├── DecisionState.java
│ │ │ │ ├── EmptyPredictionContext.java
│ │ │ │ ├── EpsilonTransition.java
│ │ │ │ ├── ErrorInfo.java
│ │ │ │ ├── LL1Analyzer.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
│ │ │ │ ├── SimulatorState.java
│ │ │ │ ├── SingletonPredictionContext.java
│ │ │ │ ├── StarBlockStartState.java
│ │ │ │ ├── StarLoopEntryState.java
│ │ │ │ ├── StarLoopbackState.java
│ │ │ │ ├── StateType.java
│ │ │ │ ├── TokensStartState.java
│ │ │ │ ├── Transition.java
│ │ │ │ ├── TransitionType.java
│ │ │ │ └── WildcardTransition.java
│ │ │ │ ├── dfa
│ │ │ │ ├── AbstractEdgeMap.java
│ │ │ │ ├── AcceptStateInfo.java
│ │ │ │ ├── ArrayEdgeMap.java
│ │ │ │ ├── DFA.java
│ │ │ │ ├── DFASerializer.java
│ │ │ │ ├── DFAState.java
│ │ │ │ ├── EdgeMap.java
│ │ │ │ ├── EmptyEdgeMap.java
│ │ │ │ ├── LexerDFASerializer.java
│ │ │ │ ├── SingletonEdgeMap.java
│ │ │ │ └── SparseEdgeMap.java
│ │ │ │ ├── misc
│ │ │ │ ├── AbstractEqualityComparator.java
│ │ │ │ ├── Args.java
│ │ │ │ ├── Array2DHashSet.java
│ │ │ │ ├── DoubleKeyMap.java
│ │ │ │ ├── EqualityComparator.java
│ │ │ │ ├── FlexibleHashMap.java
│ │ │ │ ├── Func0.java
│ │ │ │ ├── Func1.java
│ │ │ │ ├── IntSet.java
│ │ │ │ ├── IntegerList.java
│ │ │ │ ├── IntegerStack.java
│ │ │ │ ├── Interval.java
│ │ │ │ ├── IntervalSet.java
│ │ │ │ ├── LogManager.java
│ │ │ │ ├── MultiMap.java
│ │ │ │ ├── MurmurHash.java
│ │ │ │ ├── ObjectEqualityComparator.java
│ │ │ │ ├── OrderedHashSet.java
│ │ │ │ ├── ParseCancellationException.java
│ │ │ │ ├── Predicate.java
│ │ │ │ ├── RuleDependencyChecker.java
│ │ │ │ ├── RuleDependencyProcessor.java
│ │ │ │ ├── TestRig.java
│ │ │ │ ├── Tuple.java
│ │ │ │ ├── Tuple2.java
│ │ │ │ ├── Tuple3.java
│ │ │ │ └── Utils.java
│ │ │ │ └── tree
│ │ │ │ ├── AbstractParseTreeVisitor.java
│ │ │ │ ├── ErrorNode.java
│ │ │ │ ├── ErrorNodeImpl.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.g4
│ │ │ │ ├── XPathLexer.java
│ │ │ │ ├── XPathLexerErrorListener.java
│ │ │ │ ├── XPathRuleAnywhereElement.java
│ │ │ │ ├── XPathRuleElement.java
│ │ │ │ ├── XPathTokenAnywhereElement.java
│ │ │ │ ├── XPathTokenElement.java
│ │ │ │ ├── XPathWildcardAnywhereElement.java
│ │ │ │ └── XPathWildcardElement.java
│ │ └── JavaAnnotations
│ │ │ ├── nb-configuration.xml
│ │ │ ├── pom.xml
│ │ │ ├── resources
│ │ │ └── META-INF
│ │ │ │ └── services
│ │ │ │ └── javax.annotation.processing.Processor
│ │ │ └── src
│ │ │ └── org
│ │ │ └── antlr
│ │ │ └── v4
│ │ │ └── runtime
│ │ │ └── misc
│ │ │ ├── NotNull.java
│ │ │ ├── NullUsageProcessor.java
│ │ │ └── Nullable.java
│ └── tool
│ │ ├── MIGRATION.txt
│ │ ├── nb-configuration.xml
│ │ ├── pom.xml
│ │ ├── resources
│ │ └── org
│ │ │ └── antlr
│ │ │ └── v4
│ │ │ └── tool
│ │ │ └── templates
│ │ │ ├── LeftRecursiveRules.stg
│ │ │ ├── codegen
│ │ │ └── Java
│ │ │ │ └── Java.stg
│ │ │ ├── depend.stg
│ │ │ ├── dot
│ │ │ └── graphs.stg
│ │ │ └── messages
│ │ │ └── formats
│ │ │ ├── antlr.stg
│ │ │ ├── gnu.stg
│ │ │ └── vs2005.stg
│ │ ├── src
│ │ └── org
│ │ │ └── antlr
│ │ │ └── v4
│ │ │ ├── Tool.java
│ │ │ ├── analysis
│ │ │ ├── AnalysisPipeline.java
│ │ │ ├── LeftFactoringRuleTransformer.java
│ │ │ ├── LeftRecursionDetector.java
│ │ │ ├── LeftRecursiveRuleAltInfo.java
│ │ │ ├── LeftRecursiveRuleAnalyzer.java
│ │ │ └── LeftRecursiveRuleTransformer.java
│ │ │ ├── automata
│ │ │ ├── ATNFactory.java
│ │ │ ├── ATNOptimizer.java
│ │ │ ├── ATNPrinter.java
│ │ │ ├── ATNVisitor.java
│ │ │ ├── LexerATNFactory.java
│ │ │ ├── ParserATNFactory.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
│ │ │ ├── Target.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
│ │ │ │ ├── LeftFactoredRuleFunction.java
│ │ │ │ ├── LeftRecursiveRuleFunction.java
│ │ │ │ ├── LeftUnfactoredRuleFunction.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
│ │ │ │ ├── SrcOp.java
│ │ │ │ ├── StarBlock.java
│ │ │ │ ├── Sync.java
│ │ │ │ ├── TestSetInline.java
│ │ │ │ ├── ThrowEarlyExitException.java
│ │ │ │ ├── ThrowNoViableAlt.java
│ │ │ │ ├── ThrowRecognitionException.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
│ │ │ │ │ ├── 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
│ │ │ │ └── JavaTarget.java
│ │ │ ├── gui
│ │ │ ├── BasicFontMetrics.java
│ │ │ ├── GraphicsSupport.java
│ │ │ ├── JFileChooserConfirmOverwrite.java
│ │ │ ├── PostScriptDocument.java
│ │ │ ├── SystemFontMetrics.java
│ │ │ ├── TestRig.java
│ │ │ ├── TreeLayoutAdaptor.java
│ │ │ ├── TreePostScriptGenerator.java
│ │ │ ├── TreeTextProvider.java
│ │ │ ├── TreeViewer.java
│ │ │ └── Trees.java
│ │ │ ├── misc
│ │ │ ├── CharSupport.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
│ │ │ ├── v3TreeGrammarException.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
│ │ └── test
│ │ └── org
│ │ └── antlr
│ │ └── v4
│ │ └── test
│ │ ├── runtime
│ │ └── java
│ │ │ └── Java.test.stg
│ │ └── tool
│ │ ├── BaseTest.java
│ │ ├── ErrorQueue.java
│ │ ├── InterpreterTreeTextProvider.java
│ │ ├── Java.g4
│ │ ├── JavaLR.g4
│ │ ├── JavaUnicodeInputStream.java
│ │ ├── ParserInterpreterForTesting.java
│ │ ├── PositionAdjustingLexer.g4
│ │ ├── Psl.g4
│ │ ├── TestASTStructure.gunit
│ │ ├── 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
│ │ ├── TestCodeGeneration.java
│ │ ├── TestCommonTokenStream.java
│ │ ├── TestCompositeGrammars.java
│ │ ├── TestDollarParser.java
│ │ ├── TestExpectedTokens.java
│ │ ├── TestFastQueue.java
│ │ ├── TestFullContextParsing.java
│ │ ├── TestGrammarParserInterpreter.java
│ │ ├── TestGraphNodes.java
│ │ ├── TestIntervalSet.java
│ │ ├── TestLeftRecursionToolIssues.java
│ │ ├── TestLexerActions.java
│ │ ├── TestLexerErrors.java
│ │ ├── TestLexerExec.java
│ │ ├── TestListeners.java
│ │ ├── TestLookaheadTrees.java
│ │ ├── TestParseErrors.java
│ │ ├── TestParseTreeMatcher.java
│ │ ├── TestParseTrees.java
│ │ ├── TestParserExec.java
│ │ ├── TestParserInterpreter.java
│ │ ├── TestParserProfiler.java
│ │ ├── TestPerformance.java
│ │ ├── TestRuleVersioning.java
│ │ ├── TestRuleVersioningGrammars.properties
│ │ ├── TestScopeParsing.java
│ │ ├── TestSemPredEvalLexer.java
│ │ ├── TestSemPredEvalParser.java
│ │ ├── TestSets.java
│ │ ├── TestSymbolIssues.java
│ │ ├── TestTokenPositionOptions.java
│ │ ├── TestTokenStreamRewriter.java
│ │ ├── TestTokenTypeAssignment.java
│ │ ├── TestToolSyntaxErrors.java
│ │ ├── TestTopologicalSort.java
│ │ ├── TestUnbufferedCharStream.java
│ │ ├── TestUnbufferedTokenStream.java
│ │ ├── TestVocabulary.java
│ │ └── TestXPath.java
├── run-sharpen.ps1
├── sharpen-all-options.txt
├── sharpen-header.txt
└── sharpen.md
├── runtime
└── CSharp
│ ├── .nuget
│ ├── NuGet.Config
│ └── packages.config
│ ├── Antlr4.Runtime.Test
│ ├── Antlr4.Runtime.Test.csproj
│ ├── BaseTest.cs
│ ├── Java-LR.g4
│ ├── Java.g4
│ ├── JavaUnicodeInputStream.cs
│ ├── LexerTestOptions.cs
│ ├── ParserTestOptions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Sharpen
│ │ ├── CRC32.cs
│ │ └── Checksum.cs
│ ├── TaskSchedulers
│ │ └── QueuedTaskScheduler.cs
│ ├── TestBitSet.cs
│ ├── TestGraphNodes.cs
│ ├── TestIntervalSet.cs
│ └── TestPerformance.cs
│ ├── Antlr4.Runtime
│ ├── Antlr4.Runtime.csproj
│ ├── AntlrFileStream.cs
│ ├── AntlrInputStream.cs
│ ├── Atn
│ │ ├── ATN.cs
│ │ ├── ATNConfig.cs
│ │ ├── ATNConfigSet.cs
│ │ ├── ATNDeserializationOptions.cs
│ │ ├── ATNDeserializer.cs
│ │ ├── ATNSerializer.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
│ │ ├── 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
│ │ ├── NotSetTransition.cs
│ │ ├── OrderedATNConfigSet.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
│ ├── CommonToken.cs
│ ├── CommonTokenFactory.cs
│ ├── CommonTokenStream.cs
│ ├── ConsoleErrorListener.cs
│ ├── DefaultErrorStrategy.cs
│ ├── Dependents.cs
│ ├── Dfa
│ │ ├── AbstractEdgeMap`1.cs
│ │ ├── AcceptStateInfo.cs
│ │ ├── ArrayEdgeMap`1.cs
│ │ ├── DFA.cs
│ │ ├── DFASerializer.cs
│ │ ├── DFAState.cs
│ │ ├── EmptyEdgeMap`1.cs
│ │ ├── IEdgeMap`1.cs
│ │ ├── LexerDFASerializer.cs
│ │ ├── SingletonEdgeMap`1.cs
│ │ └── SparseEdgeMap`1.cs
│ ├── DiagnosticErrorListener.cs
│ ├── FailedPredicateException.cs
│ ├── IAntlrErrorListener`1.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
│ │ ├── Array2DHashSet`1.cs
│ │ ├── DoubleKeyMap`3.cs
│ │ ├── IIntSet.cs
│ │ ├── Interval.cs
│ │ ├── IntervalSet.cs
│ │ ├── MultiMap`2.cs
│ │ ├── MurmurHash.cs
│ │ ├── NotNullAttribute.cs
│ │ ├── NullableAttribute.cs
│ │ ├── ParseCanceledException.cs
│ │ ├── RuleDependencyChecker.cs
│ │ ├── RuleDependencyProcessor.cs
│ │ ├── TestRig.cs
│ │ └── Utils.cs
│ ├── NoViableAltException.cs
│ ├── Parser.cs
│ ├── ParserInterpreter.cs
│ ├── ParserRuleContext.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ProxyErrorListener`1.cs
│ ├── ProxyParserErrorListener.cs
│ ├── RecognitionException.cs
│ ├── Recognizer`2.cs
│ ├── RuleContext.cs
│ ├── RuleContextWithAltNum.cs
│ ├── RuleDependencyAttribute.cs
│ ├── RuleVersionAttribute.cs
│ ├── Sharpen
│ │ ├── Arrays.cs
│ │ ├── AtomicReference`1.cs
│ │ ├── BitSet.cs
│ │ ├── Collections.cs
│ │ ├── Compat
│ │ │ ├── CollectionDebuggerView`2.cs
│ │ │ ├── ConcurrentDictionary`2.cs
│ │ │ ├── Enumerable.cs
│ │ │ ├── ExtensionAttribute.cs
│ │ │ ├── Funcs.cs
│ │ │ ├── HashSet`1.cs
│ │ │ ├── IReadOnlyCollection`1.cs
│ │ │ ├── IReadOnlyDictionary`2.cs
│ │ │ ├── IStructuralComparable.cs
│ │ │ ├── IStructuralEquatable.cs
│ │ │ ├── NonSerializedAttribute.cs
│ │ │ ├── ReadOnlyDictionary`2.cs
│ │ │ ├── SerializableAttribute.cs
│ │ │ ├── SplitOrderedList`2.cs
│ │ │ └── Tuple.cs
│ │ ├── DictionaryExtensions.cs
│ │ ├── ListExtensions.cs
│ │ ├── Runtime.cs
│ │ └── SequenceEqualityComparer`1.cs
│ ├── TokenStreamRewriter.cs
│ ├── TokenTypes.cs
│ ├── Tree
│ │ ├── AbstractParseTreeVisitor`1.cs
│ │ ├── ErrorNodeImpl.cs
│ │ ├── IErrorNode.cs
│ │ ├── IParseTree.cs
│ │ ├── IParseTreeListener.cs
│ │ ├── IParseTreeVisitor`1.cs
│ │ ├── IRuleNode.cs
│ │ ├── ISyntaxTree.cs
│ │ ├── ITerminalNode.cs
│ │ ├── ITree.cs
│ │ ├── ParseTreeProperty`1.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.g4
│ │ │ ├── XPathLexerErrorListener.cs
│ │ │ ├── XPathRuleAnywhereElement.cs
│ │ │ ├── XPathRuleElement.cs
│ │ │ ├── XPathTokenAnywhereElement.cs
│ │ │ ├── XPathTokenElement.cs
│ │ │ ├── XPathWildcardAnywhereElement.cs
│ │ │ └── XPathWildcardElement.cs
│ ├── UnbufferedCharStream.cs
│ ├── UnbufferedTokenStream.cs
│ └── Vocabulary.cs
│ ├── Antlr4.Tool
│ ├── Analysis
│ │ ├── AnalysisPipeline.cs
│ │ ├── LeftFactoringRuleTransformer.cs
│ │ ├── LeftRecursionDetector.cs
│ │ ├── LeftRecursiveRuleAltInfo.cs
│ │ ├── LeftRecursiveRuleAnalyzer.cs
│ │ └── LeftRecursiveRuleTransformer.cs
│ ├── Antlr4.Tool.csproj
│ ├── AntlrTool.cs
│ ├── Automata
│ │ ├── ATNFactory.cs
│ │ ├── ATNOptimizer.cs
│ │ ├── ATNPrinter.cs
│ │ ├── ATNVisitor.cs
│ │ ├── LexerATNFactory.cs
│ │ ├── ParserATNFactory.cs
│ │ └── TailEpsilonRemover.cs
│ ├── Codegen
│ │ ├── ActionTranslator.cs
│ │ ├── BlankOutputModelFactory.cs
│ │ ├── CodeGenPipeline.cs
│ │ ├── CodeGenerator.cs
│ │ ├── CodeGeneratorExtension.cs
│ │ ├── DefaultOutputModelFactory.cs
│ │ ├── LexerFactory.cs
│ │ ├── Model
│ │ │ ├── Action.cs
│ │ │ ├── AddToLabelList.cs
│ │ │ ├── AltBlock.cs
│ │ │ ├── ArgAction.cs
│ │ │ ├── BaseListenerFile.cs
│ │ │ ├── BaseVisitorFile.cs
│ │ │ ├── CaptureNextToken.cs
│ │ │ ├── CaptureNextTokenType.cs
│ │ │ ├── Choice.cs
│ │ │ ├── Chunk
│ │ │ │ ├── ActionChunk.cs
│ │ │ │ ├── ActionTemplate.cs
│ │ │ │ ├── ActionText.cs
│ │ │ │ ├── ArgRef.cs
│ │ │ │ ├── LabelRef.cs
│ │ │ │ ├── ListLabelRef.cs
│ │ │ │ ├── LocalRef.cs
│ │ │ │ ├── NonLocalAttrRef.cs
│ │ │ │ ├── QRetValueRef.cs
│ │ │ │ ├── RetValueRef.cs
│ │ │ │ ├── RulePropertyRef.cs
│ │ │ │ ├── RulePropertyRef_ctx.cs
│ │ │ │ ├── RulePropertyRef_parser.cs
│ │ │ │ ├── RulePropertyRef_start.cs
│ │ │ │ ├── RulePropertyRef_stop.cs
│ │ │ │ ├── RulePropertyRef_text.cs
│ │ │ │ ├── SetAttr.cs
│ │ │ │ ├── SetNonLocalAttr.cs
│ │ │ │ ├── ThisRulePropertyRef_ctx.cs
│ │ │ │ ├── ThisRulePropertyRef_parser.cs
│ │ │ │ ├── ThisRulePropertyRef_start.cs
│ │ │ │ ├── ThisRulePropertyRef_stop.cs
│ │ │ │ ├── ThisRulePropertyRef_text.cs
│ │ │ │ ├── TokenPropertyRef.cs
│ │ │ │ ├── TokenPropertyRef_channel.cs
│ │ │ │ ├── TokenPropertyRef_index.cs
│ │ │ │ ├── TokenPropertyRef_int.cs
│ │ │ │ ├── TokenPropertyRef_line.cs
│ │ │ │ ├── TokenPropertyRef_pos.cs
│ │ │ │ ├── TokenPropertyRef_text.cs
│ │ │ │ ├── TokenPropertyRef_type.cs
│ │ │ │ └── TokenRef.cs
│ │ │ ├── CodeBlockForAlt.cs
│ │ │ ├── CodeBlockForOuterMostAlt.cs
│ │ │ ├── Decl
│ │ │ │ ├── AltLabelStructDecl.cs
│ │ │ │ ├── AttributeDecl.cs
│ │ │ │ ├── CodeBlock.cs
│ │ │ │ ├── ContextGetterDecl.cs
│ │ │ │ ├── ContextRuleGetterDecl.cs
│ │ │ │ ├── ContextRuleListGetterDecl.cs
│ │ │ │ ├── ContextRuleListIndexedGetterDecl.cs
│ │ │ │ ├── ContextTokenGetterDecl.cs
│ │ │ │ ├── ContextTokenListGetterDecl.cs
│ │ │ │ ├── ContextTokenListIndexedGetterDecl.cs
│ │ │ │ ├── Decl.cs
│ │ │ │ ├── ElementListDecl.cs
│ │ │ │ ├── RuleContextDecl.cs
│ │ │ │ ├── RuleContextListDecl.cs
│ │ │ │ ├── StructDecl.cs
│ │ │ │ ├── TokenDecl.cs
│ │ │ │ ├── TokenListDecl.cs
│ │ │ │ └── TokenTypeDecl.cs
│ │ │ ├── DispatchMethod.cs
│ │ │ ├── ElementFrequenciesVisitor.cs
│ │ │ ├── ExceptionClause.cs
│ │ │ ├── InvokeRule.cs
│ │ │ ├── LL1AltBlock.cs
│ │ │ ├── LL1Choice.cs
│ │ │ ├── LL1Loop.cs
│ │ │ ├── LL1OptionalBlock.cs
│ │ │ ├── LL1OptionalBlockSingleAlt.cs
│ │ │ ├── LL1PlusBlockSingleAlt.cs
│ │ │ ├── LL1StarBlockSingleAlt.cs
│ │ │ ├── LabeledOp.cs
│ │ │ ├── LeftFactoredRuleFunction.cs
│ │ │ ├── LeftRecursiveRuleFunction.cs
│ │ │ ├── LeftUnfactoredRuleFunction.cs
│ │ │ ├── Lexer.cs
│ │ │ ├── LexerFile.cs
│ │ │ ├── ListenerDispatchMethod.cs
│ │ │ ├── ListenerFile.cs
│ │ │ ├── Loop.cs
│ │ │ ├── MatchNotSet.cs
│ │ │ ├── MatchSet.cs
│ │ │ ├── MatchToken.cs
│ │ │ ├── ModelElement.cs
│ │ │ ├── OptionalBlock.cs
│ │ │ ├── OutputFile.cs
│ │ │ ├── OutputModelObject.cs
│ │ │ ├── Parser.cs
│ │ │ ├── ParserFile.cs
│ │ │ ├── PlusBlock.cs
│ │ │ ├── Recognizer.cs
│ │ │ ├── RuleActionFunction.cs
│ │ │ ├── RuleElement.cs
│ │ │ ├── RuleFunction.cs
│ │ │ ├── RuleSempredFunction.cs
│ │ │ ├── SemPred.cs
│ │ │ ├── SerializedATN.cs
│ │ │ ├── SrcOp.cs
│ │ │ ├── StarBlock.cs
│ │ │ ├── Sync.cs
│ │ │ ├── TestSetInline.cs
│ │ │ ├── ThrowEarlyExitException.cs
│ │ │ ├── ThrowNoViableAlt.cs
│ │ │ ├── ThrowRecognitionException.cs
│ │ │ ├── VisitorDispatchMethod.cs
│ │ │ ├── VisitorFile.cs
│ │ │ ├── Wildcard.cs
│ │ │ └── dbg.cs
│ │ ├── OutputModelController.cs
│ │ ├── OutputModelFactory.cs
│ │ ├── OutputModelWalker.cs
│ │ ├── ParserFactory.cs
│ │ ├── SourceGenTriggers.g3
│ │ ├── Target.cs
│ │ └── Target
│ │ │ ├── CSharpTarget.cs
│ │ │ ├── CSharp_v2_0Target.cs
│ │ │ ├── CSharp_v3_0Target.cs
│ │ │ ├── CSharp_v3_5Target.cs
│ │ │ ├── CSharp_v4_0Target.cs
│ │ │ ├── CSharp_v4_5Target.cs
│ │ │ └── JavaTarget.cs
│ ├── Gui
│ │ ├── BasicFontMetrics.java
│ │ ├── GraphicsSupport.java
│ │ ├── JFileChooserConfirmOverwrite.java
│ │ ├── PostScriptDocument.java
│ │ ├── SystemFontMetrics.java
│ │ ├── TestRig.java
│ │ ├── TreeLayoutAdaptor.java
│ │ ├── TreePostScriptGenerator.java
│ │ ├── TreeTextProvider.java
│ │ ├── TreeViewer.java
│ │ └── Trees.java
│ ├── Misc
│ │ ├── CharSupport.cs
│ │ ├── FrequencySet`1.cs
│ │ ├── Graph`1.cs
│ │ ├── LinkedHashMap`2.cs
│ │ ├── LinkedHashSet`1.cs
│ │ ├── LogManager.cs
│ │ ├── MutableInt.java
│ │ ├── OrderedHashMap`2.cs
│ │ ├── OrderedHashSet`1.cs
│ │ ├── TreeParserExtensions.cs
│ │ └── Utils.cs
│ ├── Parse
│ │ ├── ANTLRLexer.g3
│ │ ├── ANTLRParser.g3
│ │ ├── ATNBuilder.g3
│ │ ├── ActionSplitter.g3
│ │ ├── ActionSplitterListener.cs
│ │ ├── BlockSetTransformer.g3
│ │ ├── GrammarASTAdaptor.cs
│ │ ├── GrammarToken.cs
│ │ ├── GrammarTreeVisitor.g3
│ │ ├── LeftRecursiveRuleWalker.g3
│ │ ├── ResyncToEndOfRuleBlock.cs
│ │ ├── ScopeParser.cs
│ │ ├── TokenVocabParser.cs
│ │ ├── ToolANTLRLexer.cs
│ │ ├── ToolANTLRParser.cs
│ │ ├── v3TreeGrammarException.cs
│ │ └── v4ParserException.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Semantics
│ │ ├── ActionSniffer.cs
│ │ ├── AttributeChecks.cs
│ │ ├── BasicSemanticChecks.cs
│ │ ├── BlankActionSplitterListener.cs
│ │ ├── RuleCollector.cs
│ │ ├── SemanticPipeline.cs
│ │ ├── SymbolChecks.cs
│ │ ├── SymbolCollector.cs
│ │ └── UseDefAnalyzer.cs
│ └── Tool
│ │ ├── ANTLRMessage.cs
│ │ ├── ANTLRToolListener.cs
│ │ ├── Alternative.cs
│ │ ├── Ast
│ │ ├── ActionAST.cs
│ │ ├── AltAST.cs
│ │ ├── BlockAST.cs
│ │ ├── GrammarAST.cs
│ │ ├── GrammarASTErrorNode.cs
│ │ ├── GrammarASTVisitor.cs
│ │ ├── GrammarASTWithOptions.cs
│ │ ├── GrammarRootAST.cs
│ │ ├── NotAST.cs
│ │ ├── OptionalBlockAST.cs
│ │ ├── PlusBlockAST.cs
│ │ ├── PredAST.cs
│ │ ├── QuantifierAST.cs
│ │ ├── RangeAST.cs
│ │ ├── RuleAST.cs
│ │ ├── RuleElementAST.cs
│ │ ├── RuleRefAST.cs
│ │ ├── SetAST.cs
│ │ ├── StarBlockAST.cs
│ │ └── TerminalAST.cs
│ │ ├── Attribute.cs
│ │ ├── AttributeDict.cs
│ │ ├── AttributeResolver.cs
│ │ ├── BuildDependencyGenerator.cs
│ │ ├── DOTGenerator.cs
│ │ ├── DefaultToolListener.cs
│ │ ├── ErrorManager.cs
│ │ ├── ErrorSeverity.cs
│ │ ├── ErrorType.cs
│ │ ├── Grammar.cs
│ │ ├── GrammarInterpreterRuleContext.cs
│ │ ├── GrammarParserInterpreter.cs
│ │ ├── GrammarSemanticsMessage.cs
│ │ ├── GrammarSyntaxMessage.cs
│ │ ├── GrammarTransformPipeline.cs
│ │ ├── LabelElementPair.cs
│ │ ├── LabelType.cs
│ │ ├── LeftRecursionCyclesMessage.cs
│ │ ├── LeftRecursiveRule.cs
│ │ ├── LexerGrammar.cs
│ │ ├── Rule.cs
│ │ └── ToolMessage.cs
│ ├── Antlr4.sln
│ ├── Antlr4BuildTasks
│ ├── Antlr4.CodeGenerator.DefaultItems.props
│ ├── Antlr4.CodeGenerator.DefaultItems.targets
│ ├── Antlr4.CodeGenerator.props
│ ├── Antlr4.CodeGenerator.targets
│ ├── Antlr4.ProjectItemsSchema.xml
│ ├── Antlr4.xml
│ ├── Antlr4BuildTasks.csproj
│ ├── Antlr4ClassGenerationTask.cs
│ ├── Antlr4ClassGenerationTaskInternal.cs
│ ├── BuildMessage.cs
│ ├── GlobalSuppressions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── TraceLevel.cs
│ └── build
│ ├── CodeAnalysisDictionary.xsd
│ ├── CustomDictionary.xml
│ └── ReferenceAssemblies
│ ├── System.Core.dll
│ ├── System.dll
│ └── mscorlib.dll
└── tool
├── pom.xml
├── resources
└── org
│ └── antlr
│ └── v4
│ └── tool
│ └── templates
│ └── codegen
│ └── CSharp
│ ├── CSharp.stg
│ ├── CSharp_v2_0.stg
│ ├── CSharp_v3_0.stg
│ ├── CSharp_v3_5.stg
│ ├── CSharp_v4_0.stg
│ └── CSharp_v4_5.stg
├── src
└── org
│ └── antlr
│ └── v4
│ ├── CSharpTool.java
│ └── codegen
│ └── target
│ ├── CSharpTarget.java
│ ├── CSharp_v2_0Target.java
│ ├── CSharp_v3_0Target.java
│ ├── CSharp_v3_5Target.java
│ ├── CSharp_v4_0Target.java
│ └── CSharp_v4_5Target.java
└── test
└── org
└── antlr
└── v4
└── test
└── runtime
└── csharp
├── BaseTest.java
├── CSharp.test.stg
└── ErrorQueue.java
/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.ps1]
4 | indent_style = tab
5 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
3 | # Due to a limitation in Sharpen...
4 | /reference/sharpen-header.txt eol=lf
5 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
1 | [submodule "reference/sharpen"]
2 | path = reference/sharpen
3 | url = git://github.com/sharwell/sharpen.git
4 |
--------------------------------------------------------------------------------
/build/DotnetValidation/Grammar.g4:
--------------------------------------------------------------------------------
1 | grammar Grammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | keys : 'keys';
8 | values : 'values';
9 |
10 | WS
11 | : [ \t\r\n]+ -> skip
12 | ;
13 |
--------------------------------------------------------------------------------
/build/DotnetValidation/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/build/DotnetValidation/SubFolder/SubGrammar.g4:
--------------------------------------------------------------------------------
1 | grammar SubGrammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | WS
8 | : [ \t\r\n]+ -> skip
9 | ;
10 |
--------------------------------------------------------------------------------
/build/DotnetValidationJavaCodegen/Grammar.g4:
--------------------------------------------------------------------------------
1 | grammar Grammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | keys : 'keys';
8 | values : 'values';
9 |
10 | WS
11 | : [ \t\r\n]+ -> skip
12 | ;
13 |
--------------------------------------------------------------------------------
/build/DotnetValidationJavaCodegen/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/build/DotnetValidationJavaCodegen/SubFolder/SubGrammar.g4:
--------------------------------------------------------------------------------
1 | grammar SubGrammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | WS
8 | : [ \t\r\n]+ -> skip
9 | ;
10 |
--------------------------------------------------------------------------------
/build/DotnetValidationSingleTarget/Grammar.g4:
--------------------------------------------------------------------------------
1 | grammar Grammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | keys : 'keys';
8 | values : 'values';
9 |
10 | WS
11 | : [ \t\r\n]+ -> skip
12 | ;
13 |
--------------------------------------------------------------------------------
/build/DotnetValidationSingleTarget/NuGet.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/build/DotnetValidationSingleTarget/SubFolder/SubGrammar.g4:
--------------------------------------------------------------------------------
1 | grammar SubGrammar;
2 |
3 | compilationUnit
4 | : 'text' EOF
5 | ;
6 |
7 | WS
8 | : [ \t\r\n]+ -> skip
9 | ;
10 |
--------------------------------------------------------------------------------
/build/keys/Antlr4.dev.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/build/keys/Antlr4.dev.snk
--------------------------------------------------------------------------------
/build/keys/Antlr4.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/build/keys/Antlr4.snk
--------------------------------------------------------------------------------
/build/keys/TestingKey.snk:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/build/keys/TestingKey.snk
--------------------------------------------------------------------------------
/build/version.ps1:
--------------------------------------------------------------------------------
1 | $AntlrVersion = "4.6.7-dev"
2 |
--------------------------------------------------------------------------------
/images/FrameworkCompatibility.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/images/FrameworkCompatibility.png
--------------------------------------------------------------------------------
/reference/antlr4/.editorconfig:
--------------------------------------------------------------------------------
1 | root = true
2 |
3 | [*.{java,stg}]
4 | charset = utf-8
5 | insert_final_newline = true
6 | trim_trailing_whitespace = true
7 | indent_style = tab
8 |
--------------------------------------------------------------------------------
/reference/antlr4/.gitattributes:
--------------------------------------------------------------------------------
1 | # This rule applies to all files which don't match another line below
2 | * text=auto
3 |
--------------------------------------------------------------------------------
/reference/antlr4/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | [cut]
2 | Please include information about the expected behavior, actual behavior, and the smallest grammar or code that reproduces the behavior. Pointers into offending code regions are also very welcome.
3 | [/cut]
4 |
--------------------------------------------------------------------------------
/reference/antlr4/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | [cut]
2 | Thank you for proposing a contribution to the ANTLR project. In order to accept changes from the outside world, all contributors must "sign" the [contributors.txt](https://github.com/antlr/antlr4/blob/master/contributors.txt) contributors certificate of origin. It's an unfortunate reality of today's fuzzy and bizarre world of open-source ownership.
3 |
4 | Make sure you are already in the contributors.txt file or add a commit to this pull request with the appropriate change. Thanks!
5 | [/cut]
6 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/site/apt/examples/import.apt:
--------------------------------------------------------------------------------
1 | Imported Grammar Files
2 |
3 | In order to have the ANTLR plugin automatically locate and use grammars used
4 | as imports in your main <<<.g4>>> files, you need to place the imported grammar
5 | files in the <<>> directory beneath the root directory of your grammar
6 | files (which is <<>> by default of course).
7 |
8 | For a default layout, place your import grammars in the directory: <<>>
9 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/site/apt/faq.apt.vm:
--------------------------------------------------------------------------------
1 | FAQ
2 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/imports/HelloBase.g4:
--------------------------------------------------------------------------------
1 | lexer grammar TestBaseLexer;
2 |
3 | tokens { Name }
4 |
5 | // Default "mode": Everything OUTSIDE of a tag
6 | Comment : '' ;
7 | CDSect : '' ;
8 |
9 | fragment
10 | Whitespace : ' ' | '\n' | '\t' | '\r' ;
11 |
12 | fragment
13 | Hexdigit : [a-fA-F0-9] ;
14 |
15 | fragment
16 | Digit : [0-9] ;
17 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/dependencyRemoved/src/main/antlr4/test/Hello.g4:
--------------------------------------------------------------------------------
1 | grammar Hello;
2 |
3 | import HelloBase;
4 |
5 | r : 'hello' ID ;
6 | ID : [a-z]+ ;
7 | WS : [ \r\t\n]+ -> skip ;
8 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/imports/SimpleLexer.tokens:
--------------------------------------------------------------------------------
1 | ID=1
2 | INT=2
3 | SEMI=3
4 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importTokens/src/main/antlr4/test/SimpleParser.g4:
--------------------------------------------------------------------------------
1 | parser grammar SimpleParser;
2 | options {
3 | // get token types from SimpleLexer.tokens; don't name it
4 | // SimpleParser.tokens as ANTLR will overwrite!
5 | tokenVocab=SimpleLexer;
6 | }
7 |
8 | s : ( ID | INT )* SEMI ;
9 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/Hello.g4:
--------------------------------------------------------------------------------
1 | grammar Hello;
2 | r : 'hello' ID ;
3 | ID : [a-z]+ ;
4 | WS : [ \r\t\n]+ -> skip ;
5 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestLexer.g4:
--------------------------------------------------------------------------------
1 | lexer grammar TestLexer;
2 |
3 | import TestBaseLexer;
4 |
5 | WS : Whitespace+ -> skip;
6 | TEXT : ~[<&]+ ; // match any 16 bit char other than < and &
7 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/TestParser.g4:
--------------------------------------------------------------------------------
1 | parser grammar TestParser;
2 |
3 | options { tokenVocab=TestLexer; }
4 |
5 | document : (Comment | Name) EOF ;
6 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsCustom/src/main/antlr4/imports/TestBaseLexer.g4:
--------------------------------------------------------------------------------
1 | lexer grammar TestBaseLexer;
2 |
3 | tokens { Name }
4 |
5 | // Default "mode": Everything OUTSIDE of a tag
6 | Comment : '' ;
7 | CDSect : '' ;
8 |
9 | fragment
10 | Whitespace : ' ' | '\n' | '\t' | '\r' ;
11 |
12 | fragment
13 | Hexdigit : [a-fA-F0-9] ;
14 |
15 | fragment
16 | Digit : [0-9] ;
17 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/imports/TestBaseLexer.g4:
--------------------------------------------------------------------------------
1 | lexer grammar TestBaseLexer;
2 |
3 | tokens { Name }
4 |
5 | // Default "mode": Everything OUTSIDE of a tag
6 | Comment : '' ;
7 | CDSect : '' ;
8 |
9 | fragment
10 | Whitespace : ' ' | '\n' | '\t' | '\r' ;
11 |
12 | fragment
13 | Hexdigit : [a-fA-F0-9] ;
14 |
15 | fragment
16 | Digit : [0-9] ;
17 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/Hello.g4:
--------------------------------------------------------------------------------
1 | grammar Hello;
2 | r : 'hello' ID ;
3 | ID : [a-z]+ ;
4 | WS : [ \r\t\n]+ -> skip ;
5 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestLexer.g4:
--------------------------------------------------------------------------------
1 | lexer grammar TestLexer;
2 |
3 | import TestBaseLexer;
4 |
5 | WS : Whitespace+ -> skip;
6 | TEXT : ~[<&]+ ; // match any 16 bit char other than < and &
7 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-maven-plugin/src/test/projects/importsStandard/src/main/antlr4/test/TestParser.g4:
--------------------------------------------------------------------------------
1 | parser grammar TestParser;
2 |
3 | options { tokenVocab=TestLexer; }
4 |
5 | document : (Comment | Name) EOF ;
6 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-testgen-maven-plugin/src/site/apt/examples/import.apt:
--------------------------------------------------------------------------------
1 | Imported Grammar Files
2 |
3 | In order to have the ANTLR plugin automatically locate and use grammars used
4 | as imports in your main <<<.g4>>> files, you need to place the imported grammar
5 | files in the <<>> directory beneath the root directory of your grammar
6 | files (which is <<>> by default of course).
7 |
8 | For a default layout, place your import grammars in the directory: <<>>
9 |
--------------------------------------------------------------------------------
/reference/antlr4/antlr4-testgen-maven-plugin/src/site/apt/faq.apt.vm:
--------------------------------------------------------------------------------
1 | FAQ
2 |
--------------------------------------------------------------------------------
/reference/antlr4/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: '4.6.1-SNAPSHOT+AppVeyor.{build}'
2 | os: Visual Studio 2015
3 | build_script:
4 | - mvn -DskipTests install -q --batch-mode
5 | test_script:
6 | - mvn test -Dantlr.testinprocess=true -DJDK_SOURCE_ROOT=../runtime/Java/src -Dperformance.package= -q --batch-mode
7 | build:
8 | verbosity: minimal
9 |
--------------------------------------------------------------------------------
/reference/antlr4/doc/faq/actions-preds.md:
--------------------------------------------------------------------------------
1 | # Actions and semantic predicates
2 |
3 | ## How do I test if an optional rule was matched?
4 |
5 | For optional rule references such as the initialization clause in the following
6 |
7 | ```
8 | decl : 'var' ID (EQUALS expr)? ;
9 | ```
10 |
11 | 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.
--------------------------------------------------------------------------------
/reference/antlr4/doc/faq/error-handling.md:
--------------------------------------------------------------------------------
1 | # Error handling
2 |
3 | ## How do I perform semantic checking with ANTLR?
4 |
5 | See [How to implement error handling in ANTLR4](http://stackoverflow.com/questions/21613421/how-to-implement-error-handling-in-antlr4/21615751#21615751).
6 |
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/combined.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/combined.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/foreign.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/foreign.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/hello-parrt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/hello-parrt.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/idea-prefs-after-install.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/idea-prefs-after-install.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/idea-prefs.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/idea-prefs.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/intellij-maven.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/intellij-maven.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/nested-fuzzy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/nested-fuzzy.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/nested.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/nested.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/nonascii.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/nonascii.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/nonnested-fuzzy.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/nonnested-fuzzy.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/process.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/process.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/teronbook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/teronbook.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/tertalk.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/tertalk.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/tpantlr2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/tpantlr2.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/tpdsl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/tpdsl.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/xyz.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/xyz.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/xyz_opt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/xyz_opt.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/xyz_plus.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/xyz_plus.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/images/xyz_star.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/doc/images/xyz_star.png
--------------------------------------------------------------------------------
/reference/antlr4/doc/targets.md:
--------------------------------------------------------------------------------
1 | # Runtime Libraries and Code Generation Targets
2 |
3 | This page lists the available and upcoming optimized ANTLR runtimes. Note that each optimized runtime is developed as an independent project with its own instructions for releases, installation, and use.
4 |
5 | * [Java (included in this repository)](java-target.md)
6 | * [C#](https://github.com/tunnelvisionlabs/antlr4cs)
7 | * [TypeScript](https://github.com/tunnelvisionlabs/antlr4ts)
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/CompositeLexers/Index.stg:
--------------------------------------------------------------------------------
1 | TestTemplates ::= [
2 | "LexerDelegatorInvokesDelegateRule": [],
3 | "LexerDelegatorRuleOverridesDelegate": []
4 | ]
5 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithDFA.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": true
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "s"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | s @init{} @after {}
16 | : '$' a | '@' b ;
17 | a : e ID ;
18 | b : e INT ID ;
19 | e : INT | ;
20 | ID : 'a'..'z'+ ;
21 | INT : '0'..'9'+ ;
22 | WS : (' '|'\t'|'\n')+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithDFA_1.stg:
--------------------------------------------------------------------------------
1 | import "CtxSensitiveWithDFA.stg"
2 |
3 | Input() ::= "$ 34 abc"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-INT->s1
8 | s1-ID->:s2=>1
9 | s3**-ctx:15(a)->s4
10 | s4-INT->:s5=>1<\n>
11 | >>
12 |
13 | Errors() ::= <<
14 | line 1:5 reportAttemptingFullContext d=1 (e), input='34abc'
15 | line 1:2 reportContextSensitivity d=1 (e), input='34'<\n>
16 | >>
17 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithDFA_2.stg:
--------------------------------------------------------------------------------
1 | import "CtxSensitiveWithDFA.stg"
2 |
3 | Input() ::= "@ 34 abc"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-INT->s1
8 | s1-ID->:s2=>1
9 | s3**-ctx:18(b)->s4
10 | s4-INT->s5
11 | s5-ID->:s6=>2<\n>
12 | >>
13 |
14 | Errors() ::= <<
15 | line 1:5 reportAttemptingFullContext d=1 (e), input='34abc'
16 | line 1:5 reportContextSensitivity d=1 (e), input='34abc'<\n>
17 | >>
18 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithoutDFA.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": true
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "s"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | s @after {}
16 | : '$' a | '@' b ;
17 | a : e ID ;
18 | b : e INT ID ;
19 | e : INT | ;
20 | ID : 'a'..'z'+ ;
21 | INT : '0'..'9'+ ;
22 | WS : (' '|'\t'|'\n')+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithoutDFA_1.stg:
--------------------------------------------------------------------------------
1 | import "CtxSensitiveWithoutDFA.stg"
2 |
3 | Input() ::= "$ 34 abc"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-INT->s1
8 | s1-ID->:s2=>1<\n>
9 | >>
10 |
11 | Errors() ::= <<
12 | line 1:5 reportAttemptingFullContext d=1 (e), input='34abc'
13 | line 1:2 reportContextSensitivity d=1 (e), input='34'<\n>
14 | >>
15 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/CtxSensitiveWithoutDFA_2.stg:
--------------------------------------------------------------------------------
1 | import "CtxSensitiveWithoutDFA.stg"
2 |
3 | Input() ::= "@ 34 abc"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-INT->s1
8 | s1-ID->:s2=>1<\n>
9 | >>
10 |
11 | Errors() ::= <<
12 | line 1:5 reportAttemptingFullContext d=1 (e), input='34abc'
13 | line 1:5 reportContextSensitivity d=1 (e), input='34abc'<\n>
14 | >>
15 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/ExprAmbiguity_1.stg:
--------------------------------------------------------------------------------
1 | import "ExprAmbiguity.stg"
2 |
3 | Input() ::= "a+b"
4 |
5 | Output() ::= <<
6 | (expr a + (expr b))<\n>
7 | >>
8 |
9 | Errors() ::= <<
10 | line 1:1 reportAttemptingFullContext d=1 (expr), input='+'
11 | line 1:2 reportContextSensitivity d=1 (expr), input='+b'<\n>
12 | >>
13 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/ExprAmbiguity_2.stg:
--------------------------------------------------------------------------------
1 | import "ExprAmbiguity.stg"
2 |
3 | Input() ::= "a+b*c"
4 |
5 | Output() ::= <<
6 | (expr a + (expr b * (expr c)))<\n>
7 | >>
8 |
9 | Errors() ::= <<
10 | line 1:1 reportAttemptingFullContext d=1 (expr), input='+'
11 | line 1:2 reportContextSensitivity d=1 (expr), input='+b'
12 | line 1:3 reportAttemptingFullContext d=1 (expr), input='*'
13 | line 1:5 reportAmbiguity d=1 (expr): ambigAlts={1, 2}, input='*c'<\n>
14 | >>
15 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/FullContextIF_THEN_ELSEParse_WithDFA_1.stg:
--------------------------------------------------------------------------------
1 | import "FullContextIF_THEN_ELSEParse_WithDFA.stg"
2 |
3 | Input() ::= "{ if x then return }"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-'}'->:s1=>2<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/FullContextIF_THEN_ELSEParse_WithDFA_2.stg:
--------------------------------------------------------------------------------
1 | import "FullContextIF_THEN_ELSEParse_WithDFA.stg"
2 |
3 | Input() ::= "{ if x then return else foo }"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-'else'->:s1=>1
8 | s2**-ctx:7(s)->s3
9 | s3-'else'->:s4=>1<\n>
10 | >>
11 |
12 | Errors() ::= <<
13 | line 1:19 reportAttemptingFullContext d=1 (stat), input='else'
14 | line 1:19 reportContextSensitivity d=1 (stat), input='else'<\n>
15 | >>
16 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/FullContextIF_THEN_ELSEParse_WithoutDFA_1.stg:
--------------------------------------------------------------------------------
1 | import "FullContextIF_THEN_ELSEParse_WithoutDFA.stg"
2 |
3 | Input() ::= "{ if x then return }"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-'}'->:s1=>2<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/FullContextParsing/FullContextIF_THEN_ELSEParse_WithoutDFA_3.stg:
--------------------------------------------------------------------------------
1 | import "FullContextIF_THEN_ELSEParse_WithoutDFA.stg"
2 |
3 | Input() ::= "{ if x then if y then return else foo }"
4 |
5 | Output() ::= <<
6 | Decision 1:
7 | s0-'}'->:s2=>2
8 | s0-'else'->:s1=>1<\n>
9 | >>
10 |
11 | Errors() ::= <<
12 | line 1:29 reportAttemptingFullContext d=1 (stat), input='else'
13 | line 1:38 reportAmbiguity d=1 (stat): ambigAlts={1, 2}, input='elsefoo}'<\n>
14 | >>
15 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Index.stg:
--------------------------------------------------------------------------------
1 | TestFolders ::= [
2 | "CompositeLexers": [],
3 | "CompositeParsers": [],
4 | "FullContextParsing": [],
5 | "LeftRecursion": [],
6 | "LexerErrors": [],
7 | "LexerExec": [],
8 | "Listeners": [],
9 | "ParserErrors": [],
10 | "ParserExec": [],
11 | "ParseTrees": [],
12 | "Performance": [],
13 | "SemPredEvalLexer": [],
14 | "SemPredEvalParser": [],
15 | "Sets": [],
16 | "Visitors": []
17 | ]
18 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/AmbigLR_1.stg:
--------------------------------------------------------------------------------
1 | import "AmbigLR.stg"
2 |
3 | Input() ::= "1<\n>"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/AmbigLR_2.stg:
--------------------------------------------------------------------------------
1 | import "AmbigLR.stg"
2 |
3 | Input() ::= "a = 5<\n>"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/AmbigLR_3.stg:
--------------------------------------------------------------------------------
1 | import "AmbigLR.stg"
2 |
3 | Input() ::= "b = 6<\n>"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/AmbigLR_4.stg:
--------------------------------------------------------------------------------
1 | import "AmbigLR.stg"
2 |
3 | Input() ::= "a+b*2<\n>"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/AmbigLR_5.stg:
--------------------------------------------------------------------------------
1 | import "AmbigLR.stg"
2 |
3 | Input() ::= "(1+2)*3<\n>"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_1.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "a"
4 |
5 | Output() ::= <<
6 | (s (declarator a) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_10.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "(*a)[]"
4 |
5 | Output() ::= <<
6 | (s (declarator (declarator ( (declarator * (declarator a)) )) [ ]) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_2.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "*a"
4 |
5 | Output() ::= <<
6 | (s (declarator * (declarator a)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_3.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "**a"
4 |
5 | Output() ::= <<
6 | (s (declarator * (declarator * (declarator a))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_4.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "a[3]"
4 |
5 | Output() ::= <<
6 | (s (declarator (declarator a) [ (e 3) ]) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_5.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "b[]"
4 |
5 | Output() ::= <<
6 | (s (declarator (declarator b) [ ]) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_6.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "(a)"
4 |
5 | Output() ::= <<
6 | (s (declarator ( (declarator a) )) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_7.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "a[]()"
4 |
5 | Output() ::= <<
6 | (s (declarator (declarator (declarator a) [ ]) ( )) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_8.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "a[][]"
4 |
5 | Output() ::= <<
6 | (s (declarator (declarator (declarator a) [ ]) [ ]) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Declarations_9.stg:
--------------------------------------------------------------------------------
1 | import "Declarations.stg"
2 |
3 | Input() ::= "*a[]"
4 |
5 | Output() ::= <<
6 | (s (declarator * (declarator (declarator a) [ ])) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/DirectCallToLeftRecursiveRule_1.stg:
--------------------------------------------------------------------------------
1 | import "DirectCallToLeftRecursiveRule.stg"
2 |
3 | Input() ::= "x"
4 |
5 | Output() ::= <<
6 | (a x)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/DirectCallToLeftRecursiveRule_2.stg:
--------------------------------------------------------------------------------
1 | import "DirectCallToLeftRecursiveRule.stg"
2 |
3 | Input() ::= "x y"
4 |
5 | Output() ::= <<
6 | (a (a x) y)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/DirectCallToLeftRecursiveRule_3.stg:
--------------------------------------------------------------------------------
1 | import "DirectCallToLeftRecursiveRule.stg"
2 |
3 | Input() ::= "x y z"
4 |
5 | Output() ::= <<
6 | (a (a (a x) y) z)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_1.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "a"
4 |
5 | Output() ::= <<
6 | (s (e a) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_2.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "1"
4 |
5 | Output() ::= <<
6 | (s (e 1) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_3.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "a-1"
4 |
5 | Output() ::= <<
6 | (s (e (e a) - (e 1)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_4.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "a.b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) . b) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_5.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "a.this"
4 |
5 | Output() ::= <<
6 | (s (e (e a) . this) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_6.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "-a"
4 |
5 | Output() ::= <<
6 | (s (e - (e a)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Expressions_7.stg:
--------------------------------------------------------------------------------
1 | import "Expressions.stg"
2 |
3 | Input() ::= "-a+b"
4 |
5 | Output() ::= <<
6 | (s (e (e - (e a)) + (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_1.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a|b&c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) | (e (e b) & (e c))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_10.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a.f(x)==T.c"
4 |
5 | Output() ::= <<
6 | (s (e (e (e (e a) . f) ( (expressionList (e x)) )) == (e (e T) . c)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_11.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a.f().g(x,1)"
4 |
5 | Output() ::= <<
6 | (s (e (e (e (e (e a) . f) ( )) . g) ( (expressionList (e x) , (e 1)) )) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_12.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "new T[((n-1) * x) + 1]"
4 |
5 | Output() ::= <<
6 | (s (e new (typespec T) [ (e (e ( (e (e ( (e (e n) - (e 1)) )) * (e x)) )) + (e 1)) ]) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_2.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "(a|b)&c"
4 |
5 | Output() ::= <<
6 | (s (e (e ( (e (e a) | (e b)) )) & (e c)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_3.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a > b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) > (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_4.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a >> b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) \>> (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_5.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a=b=c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) = (e (e b) = (e c))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_6.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "a^b^c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ^ (e (e b) ^ (e c))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_7.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "(T)x"
4 |
5 | Output() ::= <<
6 | (s (e ( (typespec T) ) (e x)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_8.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "new A().b"
4 |
5 | Output() ::= <<
6 | (s (e (e new (typespec A) ( )) . b) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/JavaExpressions_9.stg:
--------------------------------------------------------------------------------
1 | import "JavaExpressions.stg"
2 |
3 | Input() ::= "(T)t.f()"
4 |
5 | Output() ::= <<
6 | (s (e (e ( (typespec T) ) (e (e t) . f)) ( )) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/LabelsOnOpSubrule.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "s"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | s @after {} : e;
16 | e : a=e op=('*'|'/') b=e {}
17 | | INT {}
18 | | '(' x=e ')' {}
19 | ;
20 | INT : '0'..'9'+ ;
21 | WS : (' '|'\n') -> skip ;
22 | >>
23 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/LabelsOnOpSubrule_1.stg:
--------------------------------------------------------------------------------
1 | import "LabelsOnOpSubrule.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | (s (e 4))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/LabelsOnOpSubrule_2.stg:
--------------------------------------------------------------------------------
1 | import "LabelsOnOpSubrule.stg"
2 |
3 | Input() ::= "1*2/3"
4 |
5 | Output() ::= <<
6 | (s (e (e (e 1) * (e 2)) / (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/LabelsOnOpSubrule_3.stg:
--------------------------------------------------------------------------------
1 | import "LabelsOnOpSubrule.stg"
2 |
3 | Input() ::= "(1/2)*3"
4 |
5 | Output() ::= <<
6 | (s (e (e ( (e (e 1) / (e 2)) )) * (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActionsPredicatesOptions_1.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActionsPredicatesOptions.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | (s (e 4))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActionsPredicatesOptions_2.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActionsPredicatesOptions.stg"
2 |
3 | Input() ::= "1*2/3"
4 |
5 | Output() ::= <<
6 | (s (e (e (e 1) * (e 2)) / (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActionsPredicatesOptions_3.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActionsPredicatesOptions.stg"
2 |
3 | Input() ::= "(1/2)*3"
4 |
5 | Output() ::= <<
6 | (s (e (e ( (e (e 1) / (e 2)) )) * (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActions_1.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActions.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | (s (e 4))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActions_2.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActions.stg"
2 |
3 | Input() ::= "1*2/3"
4 |
5 | Output() ::= <<
6 | (s (e (e (e 1) * (e 2)) / (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleActions_3.stg:
--------------------------------------------------------------------------------
1 | import "MultipleActions.stg"
2 |
3 | Input() ::= "(1/2)*3"
4 |
5 | Output() ::= <<
6 | (s (e (e ( (e (e 1) / (e 2)) )) * (e 3)))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleAlternativesWithCommonLabel_1.stg:
--------------------------------------------------------------------------------
1 | import "MultipleAlternativesWithCommonLabel.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | 4<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleAlternativesWithCommonLabel_2.stg:
--------------------------------------------------------------------------------
1 | import "MultipleAlternativesWithCommonLabel.stg"
2 |
3 | Input() ::= "1+2"
4 |
5 | Output() ::= <<
6 | 3<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleAlternativesWithCommonLabel_3.stg:
--------------------------------------------------------------------------------
1 | import "MultipleAlternativesWithCommonLabel.stg"
2 |
3 | Input() ::= "1+2*3"
4 |
5 | Output() ::= <<
6 | 7<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleAlternativesWithCommonLabel_4.stg:
--------------------------------------------------------------------------------
1 | import "MultipleAlternativesWithCommonLabel.stg"
2 |
3 | Input() ::= "i++*3"
4 |
5 | Output() ::= <<
6 | 12<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/MultipleAlternativesWithCommonLabel_5.stg:
--------------------------------------------------------------------------------
1 | /*
2 | * Test for https://github.com/antlr/antlr4/issues/1295 in addition to #433.
3 | */
4 |
5 | import "MultipleAlternativesWithCommonLabel.stg"
6 |
7 | Input() ::= "(99)+3"
8 |
9 | Output() ::= <<
10 | 102<\n>
11 | >>
12 |
13 | Errors() ::= ""
14 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixAndOtherAlt.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "s"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | s @after {} : expr EOF ;
16 | expr : literal
17 | | op expr
18 | | expr op expr
19 | ;
20 | literal : '-'? Integer ;
21 | op : '+' | '-' ;
22 | Integer : [0-9]+ ;
23 | WS : (' '|'\n') -> skip ;
24 | >>
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixAndOtherAlt_1.stg:
--------------------------------------------------------------------------------
1 | import "PrefixAndOtherAlt.stg"
2 |
3 | Input() ::= "-1"
4 |
5 | Output() ::= <<
6 | (s (expr (literal - 1)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixAndOtherAlt_2.stg:
--------------------------------------------------------------------------------
1 | import "PrefixAndOtherAlt.stg"
2 |
3 | Input() ::= "-1 + -1"
4 |
5 | Output() ::= <<
6 | (s (expr (expr (literal - 1)) (op +) (expr (literal - 1))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixOpWithActionAndLabel_1.stg:
--------------------------------------------------------------------------------
1 | import "PrefixOpWithActionAndLabel.stg"
2 |
3 | Input() ::= "a"
4 |
5 | Output() ::= <<
6 | a<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixOpWithActionAndLabel_2.stg:
--------------------------------------------------------------------------------
1 | import "PrefixOpWithActionAndLabel.stg"
2 |
3 | Input() ::= "a+b"
4 |
5 | Output() ::= <<
6 | (a+b)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/PrefixOpWithActionAndLabel_3.stg:
--------------------------------------------------------------------------------
1 | import "PrefixOpWithActionAndLabel.stg"
2 |
3 | Input() ::= "a=b+c"
4 |
5 | Output() ::= <<
6 | ((a=b)+c)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsAndLabels_1.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsAndLabels.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | 4<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsAndLabels_2.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsAndLabels.stg"
2 |
3 | Input() ::= "1+2"
4 |
5 | Output() ::= <<
6 | 3<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsAndLabels_3.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsAndLabels.stg"
2 |
3 | Input() ::= "1+2*3"
4 |
5 | Output() ::= <<
6 | 7<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsAndLabels_4.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsAndLabels.stg"
2 |
3 | Input() ::= "i++*3"
4 |
5 | Output() ::= <<
6 | 12<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList1_1.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList1.stg"
2 |
3 | Input() ::= "a*b"
4 |
5 | Output() ::= <<
6 | (s (expr (expr a) * (expr b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList1_2.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList1.stg"
2 |
3 | Input() ::= "a,c>>x"
4 |
5 | Output() ::= <<
6 | (s (expr (expr a) , (expr c) \>> (expr x)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList1_3.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList1.stg"
2 |
3 | Input() ::= "x"
4 |
5 | Output() ::= <<
6 | (s (expr x) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList1_4.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList1.stg"
2 |
3 | Input() ::= "a*b,c,x*y>>r"
4 |
5 | Output() ::= <<
6 | (s (expr (expr (expr a) * (expr b)) , (expr c) , (expr (expr x) * (expr y)) \>> (expr r)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList2_1.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList2.stg"
2 |
3 | Input() ::= "a*b"
4 |
5 | Output() ::= <<
6 | (s (expr (expr a) * (expr b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList2_2.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList2.stg"
2 |
3 | Input() ::= "a,c>>x"
4 |
5 | Output() ::= <<
6 | (s (expr (expr (expr a) , (expr c)) \>> (expr x)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList2_3.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList2.stg"
2 |
3 | Input() ::= "x"
4 |
5 | Output() ::= <<
6 | (s (expr x) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActionsList2_4.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActionsList2.stg"
2 |
3 | Input() ::= "a*b,c,x*y>>r"
4 |
5 | Output() ::= <<
6 | (s (expr (expr (expr (expr (expr a) * (expr b)) , (expr c)) , (expr (expr x) * (expr y))) \>> (expr r)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActions_1.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActions.stg"
2 |
3 | Input() ::= "4"
4 |
5 | Output() ::= <<
6 | 4<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActions_2.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActions.stg"
2 |
3 | Input() ::= "1+2"
4 |
5 | Output() ::= <<
6 | 3<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActions_3.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActions.stg"
2 |
3 | Input() ::= "1+2*3"
4 |
5 | Output() ::= <<
6 | 7<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/ReturnValueAndActions_4.stg:
--------------------------------------------------------------------------------
1 | import "ReturnValueAndActions.stg"
2 |
3 | Input() ::= "(1+2)*3"
4 |
5 | Output() ::= <<
6 | 9<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Simple.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "s"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | s @after {} : a ;
16 | a : a ID
17 | | ID
18 | ;
19 | ID : 'a'..'z'+ ;
20 | WS : (' '|'\n') -> skip ;
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Simple_1.stg:
--------------------------------------------------------------------------------
1 | import "Simple.stg"
2 |
3 | Input() ::= "x"
4 |
5 | Output() ::= <<
6 | (s (a x))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Simple_2.stg:
--------------------------------------------------------------------------------
1 | import "Simple.stg"
2 |
3 | Input() ::= "x y"
4 |
5 | Output() ::= <<
6 | (s (a (a x) y))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/Simple_3.stg:
--------------------------------------------------------------------------------
1 | import "Simple.stg"
2 |
3 | Input() ::= "x y z"
4 |
5 | Output() ::= <<
6 | (s (a (a (a x) y) z))<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_1.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a"
4 |
5 | Output() ::= <<
6 | (s (e a) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_2.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a+b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) + (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_3.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a*b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) * (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_4.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a?b:c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e b) : (e c)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_5.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a=b=c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) = (e (e b) = (e c))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_6.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a?b+c:d"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) + (e c)) : (e d)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_7.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a?b=c:d"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) = (e c)) : (e d)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_8.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a? b?c:d : e"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) ? (e c) : (e d)) : (e e)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExprExplicitAssociativity_9.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExprExplicitAssociativity.stg"
2 |
3 | Input() ::= "a?b: c?d:e"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e b) : (e (e c) ? (e d) : (e e))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_1.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a"
4 |
5 | Output() ::= <<
6 | (s (e a) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_2.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a+b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) + (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_3.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a*b"
4 |
5 | Output() ::= <<
6 | (s (e (e a) * (e b)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_4.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a?b:c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e b) : (e c)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_5.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a=b=c"
4 |
5 | Output() ::= <<
6 | (s (e (e a) = (e (e b) = (e c))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_6.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a?b+c:d"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) + (e c)) : (e d)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_7.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a?b=c:d"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) = (e c)) : (e d)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_8.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a? b?c:d : e"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e (e b) ? (e c) : (e d)) : (e e)) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/TernaryExpr_9.stg:
--------------------------------------------------------------------------------
1 | import "TernaryExpr.stg"
2 |
3 | Input() ::= "a?b: c?d:e"
4 |
5 | Output() ::= <<
6 | (s (e (e a) ? (e b) : (e (e c) ? (e d) : (e e))) \)<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/WhitespaceInfluence_1.stg:
--------------------------------------------------------------------------------
1 | import "WhitespaceInfluence.stg"
2 |
3 | Input() ::= "Test(1,3)"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LeftRecursion/WhitespaceInfluence_2.stg:
--------------------------------------------------------------------------------
1 | import "WhitespaceInfluence.stg"
2 |
3 | Input() ::= "Test(1, 3)"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/EnforcedGreedyNestedBrances.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | grammar(grammarName) ::= <<
8 | lexer grammar ;
9 | ACTION : '{' (ACTION | ~[{}])* '}';
10 | WS : [ \r\n\t]+ -> skip;
11 | >>
12 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/EnforcedGreedyNestedBrances_1.stg:
--------------------------------------------------------------------------------
1 | import "EnforcedGreedyNestedBrances.stg"
2 |
3 | Input() ::= "{ { } }"
4 |
5 | Output() ::= <<
6 | [@0,0:6='{ { } }',\<1>,1:0]
7 | [@1,7:6='\',\<-1>,1:7]<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/EnforcedGreedyNestedBrances_2.stg:
--------------------------------------------------------------------------------
1 | import "EnforcedGreedyNestedBrances.stg"
2 |
3 | Input() ::= "{ { }"
4 |
5 | Output() ::= <<
6 | [@0,5:4='\',\<-1>,1:5]<\n>
7 | >>
8 |
9 | Errors() ::= <<
10 | line 1:0 token recognition error at: '{ { }'<\n>
11 | >>
12 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/ErrorInMiddle.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "abx"
8 |
9 | Output() ::= <<
10 | [@0,3:2='\',\<-1>,1:3]<\n>
11 | >>
12 |
13 | Errors() ::= <<
14 | line 1:0 token recognition error at: 'abx'<\n>
15 | >>
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | A : 'abc' ;
20 | >>
21 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/Index.stg:
--------------------------------------------------------------------------------
1 | TestTemplates ::= [
2 | "InvalidCharAtStart": [],
3 | "StringsEmbeddedInActions_1": [],
4 | "StringsEmbeddedInActions_2": [],
5 | "EnforcedGreedyNestedBrances_1": [],
6 | "EnforcedGreedyNestedBrances_2": [],
7 | "InvalidCharAtStartAfterDFACache": [],
8 | "InvalidCharInToken": [],
9 | "InvalidCharInTokenAfterDFACache": [],
10 | "DFAToATNThatFailsBackToDFA": [],
11 | "DFAToATNThatMatchesThenFailsInATN": [],
12 | "ErrorInMiddle": [],
13 | "LexerExecDFA": []
14 | ]
15 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/InvalidCharAtStart.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "x"
8 |
9 | Output() ::= <<
10 | [@0,1:0='\',\<-1>,1:1]<\n>
11 | >>
12 |
13 | Errors() ::= <<
14 | line 1:0 token recognition error at: 'x'<\n>
15 | >>
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | A : 'a' 'b' ;
20 | >>
21 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/InvalidCharAtStartAfterDFACache.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "abx"
8 |
9 | Output() ::= <<
10 | [@0,0:1='ab',\<1>,1:0]
11 | [@1,3:2='\',\<-1>,1:3]<\n>
12 | >>
13 |
14 | Errors() ::= <<
15 | line 1:2 token recognition error at: 'x'<\n>
16 | >>
17 |
18 | grammar(grammarName) ::= <<
19 | lexer grammar ;
20 | A : 'a' 'b' ;
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/InvalidCharInToken.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "ax"
8 |
9 | Output() ::= <<
10 | [@0,2:1='\',\<-1>,1:2]<\n>
11 | >>
12 |
13 | Errors() ::= <<
14 | line 1:0 token recognition error at: 'ax'<\n>
15 | >>
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | A : 'a' 'b' ;
20 | >>
21 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/InvalidCharInTokenAfterDFACache.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "abax"
8 |
9 | Output() ::= <<
10 | [@0,0:1='ab',\<1>,1:0]
11 | [@1,4:3='\',\<-1>,1:4]<\n>
12 | >>
13 |
14 | Errors() ::= <<
15 | line 1:2 token recognition error at: 'ax'<\n>
16 | >>
17 |
18 | grammar(grammarName) ::= <<
19 | lexer grammar ;
20 | A : 'a' 'b' ;
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/StringsEmbeddedInActions.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | grammar(grammarName) ::= <<
8 | lexer grammar ;
9 | ACTION2 : '[' (STRING | ~'"')*? ']';
10 | STRING : '"' ('\\"' | .)*? '"';
11 | WS : [ \t\r\n]+ -> skip;
12 | >>
13 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/StringsEmbeddedInActions_1.stg:
--------------------------------------------------------------------------------
1 | import "StringsEmbeddedInActions.stg"
2 |
3 | Input() ::= <<
4 | ["foo"]
5 | >>
6 |
7 | Output() ::= <<
8 | [@0,0:6='["foo"]',\<1>,1:0]
9 | [@1,7:6='\',\<-1>,1:7]<\n>
10 | >>
11 |
12 | Errors() ::= ""
13 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerErrors/StringsEmbeddedInActions_2.stg:
--------------------------------------------------------------------------------
1 | import "StringsEmbeddedInActions.stg"
2 |
3 | Input() ::= <<
4 | ["foo]
5 | >>
6 |
7 | Output() ::= <<
8 | [@0,6:5='\',\<-1>,1:6]<\n>
9 | >>
10 |
11 | Errors() ::= <<
12 | line 1:0 token recognition error at: '["foo]'<\n>
13 | >>
14 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSet.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "34<\n> 34"
8 |
9 | Output() ::= <<
10 | I
11 | I
12 | [@0,0:1='34',\<1>,1:0]
13 | [@1,4:5='34',\<1>,2:1]
14 | [@2,6:5='\',\<-1>,2:3]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | I : '0'..'9'+ {} ;
22 | WS : [ \n\u000D] -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetInSet.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | a x
9 | %>
10 |
11 | Output() ::= <<
12 | I
13 | I
14 | [@0,0:0='a',\<1>,1:0]
15 | [@1,2:2='x',\<1>,1:2]
16 | [@2,3:2='\',\<-1>,1:3]<\n>
17 | >>
18 |
19 | Errors() ::= ""
20 |
21 | grammar(grammarName) ::= <<
22 | lexer grammar ;
23 | I : (~[ab \\n]|'a') {} ;
24 | WS : [ \n\u000D]+ -> skip ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetNot.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | xaf
9 | %>
10 |
11 | Output() ::= <<
12 | I
13 | [@0,0:2='xaf',\<1>,1:0]
14 | [@1,3:2='\',\<-1>,1:3]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | I : ~[ab \n] ~[ \ncd]* {} ;
22 | WS : [ \n\u000D]+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetPlus.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "34<\n> 34"
8 |
9 | Output() ::= <<
10 | I
11 | I
12 | [@0,0:1='34',\<1>,1:0]
13 | [@1,4:5='34',\<1>,2:1]
14 | [@2,6:5='\',\<-1>,2:3]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | I : '0'..'9'+ {} ;
22 | WS : [ \n\u000D]+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetWithEscapedChar.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "- ] "
8 |
9 | Output() ::= <<
10 | DASHBRACK
11 | DASHBRACK
12 | [@0,0:0='-',\<1>,1:0]
13 | [@1,2:2=']',\<1>,1:2]
14 | [@2,4:3='\',\<-1>,1:4]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | DASHBRACK : [\\-\]]+ {} ;
22 | WS : [ \n]+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetWithMissingEndRange.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "00<\n>"
8 |
9 | Output() ::= <<
10 | I
11 | [@0,0:1='00',\<1>,1:0]
12 | [@1,3:2='\',\<-1>,2:0]<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | I : [0-]+ {} ;
20 | WS : [ \n\u000D]+ -> skip ;
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetWithMissingEscapeChar.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= "34 "
8 |
9 | Output() ::= <<
10 | I
11 | [@0,0:1='34',\<1>,1:0]
12 | [@1,3:2='\',\<-1>,1:3]<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | I : [0-9]+ {} ;
20 | WS : [ \n]+ -> skip ;
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetWithQuote1.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | b"a
9 | %>
10 |
11 | Output() ::= <<
12 | A
13 | [@0,0:2='b"a',\<1>,1:0]
14 | [@1,3:2='\',\<-1>,1:3]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | A : ["a-z]+ {} ;
22 | WS : [ \n\t]+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/CharSetWithQuote2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | b"\a
9 | %>
10 |
11 | Output() ::= <<
12 | A
13 | [@0,0:3='b"\a',\<1>,1:0]
14 | [@1,4:3='\',\<-1>,1:4]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | A : ["\\\\ab]+ {} ;
22 | WS : [ \n\t]+ -> skip ;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/EOFByItself.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= ""
8 |
9 | // must get DONE EOF
10 | Output() ::= <<
11 | [@0,0:-1='\',\<1>,1:0]
12 | [@1,0:-1='\',\<-1>,1:0]<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | lexer grammar ;
19 | DONE : EOF ;
20 | A : 'a';
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/EOFSuffixInFirstRule.stg:
--------------------------------------------------------------------------------
1 | grammar(grammarName) ::= <<
2 | lexer grammar ;
3 | A : 'a' EOF ;
4 | B : 'a';
5 | C : 'c';
6 | >>
7 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/EOFSuffixInFirstRule_1.stg:
--------------------------------------------------------------------------------
1 | import "EOFSuffixInFirstRule.stg"
2 |
3 | TestType() ::= "Lexer"
4 |
5 | Grammar ::= [
6 | "L": {}
7 | ]
8 |
9 | Input() ::= ""
10 |
11 | Output() ::= <<
12 | [@0,0:-1='\',\<-1>,1:0]<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/EOFSuffixInFirstRule_2.stg:
--------------------------------------------------------------------------------
1 | import "EOFSuffixInFirstRule.stg"
2 |
3 | TestType() ::= "Lexer"
4 |
5 | Grammar ::= [
6 | "L": {}
7 | ]
8 |
9 | Input() ::= "a"
10 |
11 | Output() ::= <<
12 | [@0,0:0='a',\<1>,1:0]
13 | [@1,1:0='\',\<-1>,1:1]<\n>
14 | >>
15 |
16 | Errors() ::= ""
17 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/GreedyClosure.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:13='//blah\n//blah\n',\<1>,1:0]
14 | [@1,14:13='\',\<-1>,3:0]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | CMT : '//' .*? '\n' CMT*;
22 | WS : (' '|'\t')+;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/GreedyConfigs.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | ab
9 | %>
10 |
11 | Output() ::= <<
12 | ab
13 | [@0,0:1='ab',\<1>,1:0]
14 | [@1,2:1='\',\<-1>,1:2]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | I : ('a' | 'ab') {} ;
22 | WS : (' '|'\n') -> skip ;
23 | J : .;
24 | >>
25 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/GreedyOptional.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:13='//blah\n//blah\n',\<1>,1:0]
14 | [@1,14:13='\',\<-1>,3:0]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | CMT : '//' .*? '\n' CMT?;
22 | WS : (' '|'\t')+;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/GreedyPositiveClosure.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:13='//blah\n//blah\n',\<1>,1:0]
14 | [@1,14:13='\',\<-1>,3:0]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | CMT : ('//' .*? '\n')+;
22 | WS : (' '|'\t')+;
23 | >>
24 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyClosure.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:6='//blah\n',\<1>,1:0]
14 | [@1,7:13='//blah\n',\<1>,2:0]
15 | [@2,14:13='\',\<-1>,3:0]<\n>
16 | >>
17 |
18 | Errors() ::= ""
19 |
20 | grammar(grammarName) ::= <<
21 | lexer grammar ;
22 | CMT : '//' .*? '\n' CMT*?;
23 | WS : (' '|'\t')+;
24 | >>
25 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyConfigs.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | ab
9 | %>
10 |
11 | Output() ::= <<
12 | a
13 | b
14 | [@0,0:0='a',\<1>,1:0]
15 | [@1,1:1='b',\<3>,1:1]
16 | [@2,2:1='\',\<-1>,1:2]<\n>
17 | >>
18 |
19 | Errors() ::= ""
20 |
21 | grammar(grammarName) ::= <<
22 | lexer grammar ;
23 | I : .*? ('a' | 'ab') {} ;
24 | WS : (' '|'\n') -> skip ;
25 | J : . {};
26 | >>
27 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyOptional.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:6='//blah\n',\<1>,1:0]
14 | [@1,7:13='//blah\n',\<1>,2:0]
15 | [@2,14:13='\',\<-1>,3:0]<\n>
16 | >>
17 |
18 | Errors() ::= ""
19 |
20 | grammar(grammarName) ::= <<
21 | lexer grammar ;
22 | CMT : '//' .*? '\n' CMT??;
23 | WS : (' '|'\t')+;
24 | >>
25 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyPositiveClosure.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <<
8 | //blah
9 | //blah<\n>
10 | >>
11 |
12 | Output() ::= <<
13 | [@0,0:6='//blah\n',\<1>,1:0]
14 | [@1,7:13='//blah\n',\<1>,2:0]
15 | [@2,14:13='\',\<-1>,3:0]<\n>
16 | >>
17 |
18 | Errors() ::= ""
19 |
20 | grammar(grammarName) ::= <<
21 | lexer grammar ;
22 | CMT : ('//' .*? '\n')+?;
23 | WS : (' '|'\t')+;
24 | >>
25 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyTermination1.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | "hi""mom"
9 | %>
10 |
11 | Output() ::= <<
12 | [@0,0:3='"hi"',\<1>,1:0]
13 | [@1,4:8='"mom"',\<1>,1:4]
14 | [@2,9:8='\',\<-1>,1:9]<\n>
15 | >>
16 |
17 | Errors() ::= ""
18 |
19 | grammar(grammarName) ::= <<
20 | lexer grammar ;
21 | STRING : '"' ('""' | .)*? '"';
22 | >>
23 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/NonGreedyTermination2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | """mom"
9 | %>
10 |
11 | Output() ::= <<
12 | [@0,0:6='"""mom"',\<1>,1:0]
13 | [@1,7:6='\',\<-1>,1:7]<\n>
14 | >>
15 |
16 | Errors() ::= ""
17 |
18 | grammar(grammarName) ::= <<
19 | lexer grammar ;
20 | STRING : '"' ('""' | .)+? '"';
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/QuoteTranslation.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Lexer"
2 |
3 | Grammar ::= [
4 | "L": {}
5 | ]
6 |
7 | Input() ::= <%
8 | "
9 | %>
10 |
11 | Output() ::= <<
12 | [@0,0:0='"',\<1>,1:0]
13 | [@1,1:0='\',\<-1>,1:1]<\n>
14 | >>
15 |
16 | Errors() ::= ""
17 |
18 | grammar(grammarName) ::= <<
19 | lexer grammar ;
20 | QUOTE : '"' ; // make sure this compiles
21 | >>
22 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/RecursiveLexerRuleRefWithWildcardPlus.stg:
--------------------------------------------------------------------------------
1 | grammar(grammarName) ::= <<
2 | lexer grammar ;
3 | CMT : '/*' (CMT | .)+? '*/' ;
4 | WS : (' '|'\n')+;
5 | >>
6 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/LexerExec/RecursiveLexerRuleRefWithWildcardStar.stg:
--------------------------------------------------------------------------------
1 | grammar(grammarName) ::= <<
2 | lexer grammar ;
3 | CMT : '/*' (CMT | .)*? '*/' ;
4 | WS : (' '|'\n')+;
5 | >>
6 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Listeners/Index.stg:
--------------------------------------------------------------------------------
1 | TestTemplates ::= [
2 | "Basic": [],
3 | "TokenGetters_1": [],
4 | "TokenGetters_2": [],
5 | "RuleGetters_1": [],
6 | "RuleGetters_2": [],
7 | "LR": [],
8 | "LRWithLabels": []
9 | ]
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Listeners/RuleGetters_1.stg:
--------------------------------------------------------------------------------
1 | import "RuleGetters.stg"
2 |
3 | Input() ::= "1 2"
4 |
5 | Output() ::= <<
6 | (a (b 1) (b 2))
7 | 1 2 1<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Listeners/RuleGetters_2.stg:
--------------------------------------------------------------------------------
1 | import "RuleGetters.stg"
2 |
3 | Input() ::= "abc"
4 |
5 | Output() ::= <<
6 | (a (b abc))
7 | abc<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Listeners/TokenGetters_1.stg:
--------------------------------------------------------------------------------
1 | import "TokenGetters.stg"
2 |
3 | Input() ::= "1 2"
4 |
5 | Output() ::= <<
6 | (a 1 2)
7 | 1 2 [1, 2]<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Listeners/TokenGetters_2.stg:
--------------------------------------------------------------------------------
1 | import "TokenGetters.stg"
2 |
3 | Input() ::= "abc"
4 |
5 | Output() ::= <<
6 | (a abc)
7 | [@0,0:2='abc',\<4>,1:0]<\n>
8 | >>
9 |
10 | Errors() ::= ""
11 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/2AltLoop.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Grammar ::= [
4 | "T": {}
5 | ]
6 |
7 | Input() ::= "xyyxyxz"
8 |
9 | Rule() ::= "s"
10 |
11 | Output() ::= <<
12 | (a x y y x y x z)<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | grammar ;
19 | s
20 | @init {
21 |
22 | }
23 | @after {
24 |
25 | }
26 | : r=a ;
27 | a : ('x' | 'y')* 'z'
28 | ;
29 | >>
30 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/2Alts.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Grammar ::= [
4 | "T": {}
5 | ]
6 |
7 | Input() ::= "y"
8 |
9 | Rule() ::= "s"
10 |
11 | Output() ::= <<
12 | (a y)<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | grammar ;
19 | s
20 | @init {
21 |
22 | }
23 | @after {
24 |
25 | }
26 | : r=a ;
27 | a : 'x' | 'y'
28 | ;
29 | >>
30 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/Index.stg:
--------------------------------------------------------------------------------
1 | TestTemplates ::= [
2 | "TokenAndRuleContextString": [],
3 | "Token2": [],
4 | "2Alts": [],
5 | "2AltLoop": [],
6 | "RuleRef": [],
7 | "ExtraToken": [],
8 | "ExtraTokensAndAltLabels": [],
9 | "NoViableAlt": [],
10 | "Sync": [],
11 | "AltNum": []
12 | ]
13 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/RuleRef.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Grammar ::= [
4 | "T": {}
5 | ]
6 |
7 | Input() ::= "yx"
8 |
9 | Rule() ::= "s"
10 |
11 | Output() ::= <<
12 | (a (b y) x)<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | grammar ;
19 | s
20 | @init {
21 |
22 | }
23 | @after {
24 |
25 | }
26 | : r=a ;
27 | a : b 'x'
28 | ;
29 | b : 'y'
30 | ;
31 | >>
32 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/Token2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Grammar ::= [
4 | "T": {}
5 | ]
6 |
7 | Input() ::= "xy"
8 |
9 | Rule() ::= "s"
10 |
11 | Output() ::= <<
12 | (a x y)<\n>
13 | >>
14 |
15 | Errors() ::= ""
16 |
17 | grammar(grammarName) ::= <<
18 | grammar ;
19 | s
20 | @init {
21 |
22 | }
23 | @after {
24 |
25 | }
26 | : r=a ;
27 | a : 'x' 'y'
28 | ;
29 | >>
30 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParseTrees/TokenAndRuleContextString.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Grammar ::= [
4 | "T": {}
5 | ]
6 |
7 | Input() ::= "x"
8 |
9 | Rule() ::= "s"
10 |
11 | Output() ::= <<
12 | [a, s]
13 | (a x)<\n>
14 | >>
15 |
16 | Errors() ::= ""
17 |
18 | grammar(grammarName) ::= <<
19 | grammar ;
20 | s
21 | @init {
22 |
23 | }
24 | @after {
25 |
26 | }
27 | : r=a ;
28 | a : 'x' {
29 |
30 | } ;
31 | >>
32 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/ConjuringUpToken.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ac"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | conjured=[@-1,-1:-1='\',\<2>,1:1]<\n>
17 | >>
18 |
19 | Errors() ::= <<
20 | line 1:1 missing 'b' at 'c'<\n>
21 | >>
22 |
23 | grammar(grammarName) ::= <<
24 | grammar ;
25 | a : 'a' x='b' {} 'c' ;
26 | >>
27 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/DuplicatedLeftRecursiveCall.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": true
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "start"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | start : expr EOF;
16 | expr : 'x'
17 | | expr expr
18 | ;
19 | >>
20 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/DuplicatedLeftRecursiveCall_1.stg:
--------------------------------------------------------------------------------
1 | import "DuplicatedLeftRecursiveCall.stg"
2 |
3 | Input() ::= "x"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/DuplicatedLeftRecursiveCall_2.stg:
--------------------------------------------------------------------------------
1 | import "DuplicatedLeftRecursiveCall.stg"
2 |
3 | Input() ::= "xx"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/DuplicatedLeftRecursiveCall_3.stg:
--------------------------------------------------------------------------------
1 | import "DuplicatedLeftRecursiveCall.stg"
2 |
3 | Input() ::= "xxx"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/DuplicatedLeftRecursiveCall_4.stg:
--------------------------------------------------------------------------------
1 | import "DuplicatedLeftRecursiveCall.stg"
2 |
3 | Input() ::= "xxxx"
4 |
5 | Output() ::= ""
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/LL2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ae"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 no viable alternative at input 'ae'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b'
25 | | 'a' 'c'
26 | ;
27 | q : 'e' ;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/LL3.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "abe"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:2 no viable alternative at input 'abe'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b'* 'c'
25 | | 'a' 'b' 'd'
26 | ;
27 | q : 'e' ;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/LLStar.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aaae"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:3 no viable alternative at input 'aaae'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a'+ 'b'
25 | | 'a'+ 'c'
26 | ;
27 | q : 'e' ;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/MultiTokenDeletionBeforeLoop.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aacabc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 extraneous input 'a' expecting {'b', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b'* 'c';
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/MultiTokenDeletionBeforeLoop2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aacabc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 extraneous input 'a' expecting {'b', 'z', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' ('b'|'z'{})* 'c';
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/MultiTokenDeletionDuringLoop.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "abaaababc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:2 extraneous input 'a' expecting {'b', 'c'}
20 | line 1:6 extraneous input 'a' expecting {'b', 'c'}<\n>
21 | >>
22 |
23 | grammar(grammarName) ::= <<
24 | grammar ;
25 | a : 'a' 'b'* 'c' ;
26 | >>
27 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleSetInsertion.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ad"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 missing {'b', 'c'} at 'd'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' ('b'|'c') 'd' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletion.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aab"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 extraneous input 'a' expecting 'b'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionBeforeAlt.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ac"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:0 extraneous input 'a' expecting {'b', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : ('b' | 'c')
25 | ;
26 | q : 'a'
27 | ;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionBeforeLoop.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aabc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 extraneous input 'a' expecting {\, 'b'}
20 | line 1:3 token recognition error at: 'c'<\n>
21 | >>
22 |
23 | grammar(grammarName) ::= <<
24 | grammar ;
25 | a : 'a' 'b'* EOF ;
26 | >>
27 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionBeforePredict.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "caaab"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:0 extraneous input 'c' expecting 'a'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a'+ 'b'
25 | | 'a'+ 'c'
26 | ;
27 | q : 'e' ;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionDuringLoop.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ababbc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:2 extraneous input 'a' expecting {'b', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b'* 'c' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionDuringLoop2.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ababbc"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:2 extraneous input 'a' expecting {'b', 'z', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' ('b'|'z'{})* 'c' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenDeletionExpectingSet.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aab"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 extraneous input 'a' expecting {'b', 'c'}<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' ('b'|'c') ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/SingleTokenInsertion.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "ac"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 missing 'b' at 'c'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b' 'c' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserErrors/TokenMismatch.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "aa"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | >>
17 |
18 | Errors() ::= <<
19 | line 1:1 mismatched input 'a' expecting 'b'<\n>
20 | >>
21 |
22 | grammar(grammarName) ::= <<
23 | grammar ;
24 | a : 'a' 'b' ;
25 | >>
26 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/APlus.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Input() ::= "a b c"
12 |
13 | Rule() ::= "a"
14 |
15 | Output() ::= <<
16 | abc<\n>
17 | >>
18 |
19 | Errors() ::= ""
20 |
21 | grammar(grammarName) ::= <<
22 | grammar ;
23 | a : ID+ {
24 |
25 | };
26 | ID : 'a'..'z'+;
27 | WS : (' '|'\n') -> skip;
28 | >>
29 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AStar.stg:
--------------------------------------------------------------------------------
1 | TestType() ::= "Parser"
2 |
3 | Options ::= [
4 | "Debug": false
5 | ]
6 |
7 | Grammar ::= [
8 | "T": {}
9 | ]
10 |
11 | Rule() ::= "a"
12 |
13 | grammar(grammarName) ::= <<
14 | grammar ;
15 | a : ID* {
16 |
17 | };
18 | ID : 'a'..'z'+;
19 | WS : (' '|'\n') -> skip;
20 | >>
21 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AStar_1.stg:
--------------------------------------------------------------------------------
1 | import "AStar.stg"
2 |
3 | Input() ::= ""
4 |
5 | Output() ::= "<\n>"
6 |
7 | Errors() ::= ""
8 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AStar_2.stg:
--------------------------------------------------------------------------------
1 | import "AStar.stg"
2 |
3 | Input() ::= "a b c"
4 |
5 | Output() ::= <<
6 | abc<\n>
7 | >>
8 |
9 | Errors() ::= ""
10 |
--------------------------------------------------------------------------------
/reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorAPlus.stg:
--------------------------------------------------------------------------------
1 | // force complex decision
2 |
3 | TestType() ::= "Parser"
4 |
5 | Options ::= [
6 | "Debug": false
7 | ]
8 |
9 | Grammar ::= [
10 | "T": {}
11 | ]
12 |
13 | Input() ::= "a b c"
14 |
15 | Rule() ::= "a"
16 |
17 | Output() ::= <<
18 | abc<\n>
19 | >>
20 |
21 | Errors() ::= ""
22 |
23 | grammar(grammarName) ::= <<
24 | grammar