├── .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 ; 25 | a : (ID|ID)+ { 26 | 27 | }; 28 | ID : 'a'..'z'+; 29 | WS : (' '|'\n') -> skip; 30 | >> 31 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorAStar.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() ::= "" 14 | 15 | Rule() ::= "a" 16 | 17 | Output() ::= "" 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : (ID|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/AorAStar_1.stg: -------------------------------------------------------------------------------- 1 | import "AorAStar.stg" 2 | 3 | Input() ::= "" 4 | 5 | Output() ::= "<\n>" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorAStar_2.stg: -------------------------------------------------------------------------------- 1 | import "AorAStar.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/AorB.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "34" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | alt 2<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ID { 24 | 25 | } | INT { 26 | 27 | }; 28 | ID : 'a'..'z'+ ; 29 | INT : '0'..'9'+; 30 | WS : (' '|'\\n') -> skip ; 31 | >> 32 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorBPlus.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "a 34 c" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | a34c<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : (ID|INT{ 24 | })+ { 25 | 26 | }; 27 | ID : 'a'..'z'+ ; 28 | INT : '0'..'9'+; 29 | WS : (' '|'\\n') -> skip ; 30 | >> 31 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorBStar.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|INT{ 16 | })* { 17 | 18 | }; 19 | ID : 'a'..'z'+ ; 20 | INT : '0'..'9'+; 21 | WS : (' '|'\\n') -> skip ; 22 | >> 23 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorBStar_1.stg: -------------------------------------------------------------------------------- 1 | import "AorBStar.stg" 2 | 3 | Input() ::= "" 4 | 5 | Output() ::= "<\n>" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/AorBStar_2.stg: -------------------------------------------------------------------------------- 1 | import "AorBStar.stg" 2 | 3 | Input() ::= "a 34 c" 4 | 5 | Output() ::= << 6 | a34c<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Basic.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abc 34" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | abc34<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ID INT { 24 | 25 | }; 26 | ID : 'a'..'z'+ ; 27 | INT : '0'..'9'+; 28 | WS : (' '|'\n') -> skip; 29 | >> 30 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/LL1OptionalBlock.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= "" 16 | 17 | Errors() ::= "" 18 | 19 | grammar(grammarName) ::= << 20 | grammar ; 21 | a : (ID|{}INT)? { 22 | 23 | }; 24 | ID : 'a'..'z'+; 25 | INT : '0'..'9'+ ; 26 | WS : (' '|'\n') -> skip; 27 | >> 28 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/LL1OptionalBlock_1.stg: -------------------------------------------------------------------------------- 1 | import "LL1OptionalBlock.stg" 2 | 3 | Input() ::= "" 4 | 5 | Output() ::= "<\n>" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/LL1OptionalBlock_2.stg: -------------------------------------------------------------------------------- 1 | import "LL1OptionalBlock.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/ParserExec/Labels.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abc 34;" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= "" 16 | 17 | Errors() ::= "" 18 | 19 | grammar(grammarName) ::= << 20 | grammar ; 21 | a : b1=b b2+=b* b3+=';' ; 22 | b : id_=ID val+=INT*; 23 | ID : 'a'..'z'+ ; 24 | INT : '0'..'9'+; 25 | WS : (' '|'\n') -> skip ; 26 | >> 27 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/OpenDeviceStatement_1.stg: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a regression test for antlr/antlr4#1545, case 1. 3 | */ 4 | 5 | import "OpenDeviceStatement.stg" 6 | 7 | Grammar ::= [ 8 | "OpenDeviceStatement": {} 9 | ] 10 | 11 | Input() ::= "OPEN DEVICE DEVICE" 12 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/OpenDeviceStatement_2.stg: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a regression test for antlr/antlr4#1545, case 2. 3 | */ 4 | 5 | import "OpenDeviceStatement.stg" 6 | 7 | Grammar ::= [ 8 | "OpenDeviceStatement": {} 9 | ] 10 | 11 | Input() ::= "OPEN DEVICE DEVICE" 12 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/OpenDeviceStatement_3.stg: -------------------------------------------------------------------------------- 1 | /* 2 | * This is a regression test for antlr/antlr4#1545, case 3. 3 | */ 4 | 5 | import "OpenDeviceStatement.stg" 6 | 7 | Grammar ::= [ 8 | "OpenDeviceStatement": {} 9 | ] 10 | 11 | Input() ::= "OPEN DEVICE DEVICE ." 12 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Optional.stg: -------------------------------------------------------------------------------- 1 | /** 2 | * This test is meant to detect regressions of bug antlr/antlr4#41. 3 | * https://github.com/antlr/antlr4/issues/41 4 | */ 5 | 6 | TestType() ::= "Parser" 7 | 8 | Options ::= [ 9 | "Debug": false 10 | ] 11 | 12 | Grammar ::= [ 13 | "T": {} 14 | ] 15 | 16 | Rule() ::= "stat" 17 | 18 | grammar(grammarName) ::= << 19 | grammar ; 20 | stat : ifstat | 'x'; 21 | ifstat : 'if' stat ('else' stat)?; 22 | WS : [ \n\t]+ -> skip ; 23 | >> 24 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Optional_1.stg: -------------------------------------------------------------------------------- 1 | import "Optional.stg" 2 | 3 | Input() ::= "x" 4 | 5 | Output() ::= "" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Optional_2.stg: -------------------------------------------------------------------------------- 1 | import "Optional.stg" 2 | 3 | Input() ::= "if x" 4 | 5 | Output() ::= "" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Optional_3.stg: -------------------------------------------------------------------------------- 1 | import "Optional.stg" 2 | 3 | Input() ::= "if x else x" 4 | 5 | Output() ::= "" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/Optional_4.stg: -------------------------------------------------------------------------------- 1 | import "Optional.stg" 2 | 3 | Input() ::= "if if x else x" 4 | 5 | Output() ::= "" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/ReferenceToATN_1.stg: -------------------------------------------------------------------------------- 1 | import "ReferenceToATN.stg" 2 | 3 | Input() ::= "" 4 | 5 | Output() ::= "<\n>" 6 | 7 | Errors() ::= "" 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/ParserExec/ReferenceToATN_2.stg: -------------------------------------------------------------------------------- 1 | import "ReferenceToATN.stg" 2 | 3 | Input() ::= "a 34 c" 4 | 5 | Output() ::= << 6 | a34c<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Performance/DropLoopEntryBranchInLRRule_2.stg: -------------------------------------------------------------------------------- 1 | import "DropLoopEntryBranchInLRRule.stg" 2 | 3 | Input() ::= << 4 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 5 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 6 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 7 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 8 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 9 | X1 and X2 and X3 and X4 and X5 and X6 and X7 or 10 | X1 and X2 and X3 and X4 and X5 and X6 and X7 11 | . 12 | >> 13 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Performance/ExpressionGrammar_1.stg: -------------------------------------------------------------------------------- 1 | import "ExpressionGrammar.stg" 2 | 3 | Input() ::= << 4 | 5 | >> 6 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Performance/ExpressionGrammar_2.stg: -------------------------------------------------------------------------------- 1 | import "ExpressionGrammar.stg" 2 | 3 | Input() ::= << 4 | or 5 | or 6 | or 7 | or 8 | or 9 | or 10 | or 11 | or 12 | or 13 | 14 | >> 15 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Performance/Index.stg: -------------------------------------------------------------------------------- 1 | TestTemplates ::= [ 2 | "ExpressionGrammar_1": [], 3 | "ExpressionGrammar_2": [], 4 | "DropLoopEntryBranchInLRRule_1": [], 5 | "DropLoopEntryBranchInLRRule_2": [], 6 | "DropLoopEntryBranchInLRRule_3": [], 7 | "DropLoopEntryBranchInLRRule_4": [], 8 | "DropLoopEntryBranchInLRRule_5": [] 9 | ] 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalLexer/Index.stg: -------------------------------------------------------------------------------- 1 | TestTemplates ::= [ 2 | "RuleSempredFunction": [], 3 | "DisableRule": [], 4 | "IDvsEnum": [], 5 | "IDnotEnum": [], 6 | "EnumNotID": [], 7 | "Indent": [], 8 | "LexerInputPositionSensitivePredicates": [], 9 | "PredicatedKeywords": [] 10 | ] 11 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalLexer/RuleSempredFunction.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Lexer" 2 | 3 | Options ::= [ 4 | "ShowDFA": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "L": {} 9 | ] 10 | 11 | Input() ::= "aaa" 12 | 13 | Output() ::= << 14 | [@0,0:0='a',\<1>,1:0] 15 | [@1,1:1='a',\<1>,1:1] 16 | [@2,2:2='a',\<1>,1:2] 17 | [@3,3:2='\',\<-1>,1:3]<\n> 18 | >> 19 | 20 | Errors() ::= "" 21 | 22 | grammar(grammarName) ::= << 23 | lexer grammar ; 24 | T : 'a' {}? ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalParser/PredFromAltTestedInLoopBack_1.stg: -------------------------------------------------------------------------------- 1 | import "PredFromAltTestedInLoopBack.stg" 2 | 3 | Input() ::= "s<\n><\n><\n>x<\n>" 4 | 5 | Output() ::= << 6 | (file_ (para (paraContent s) \n \n) (para (paraContent \n x \n)) \)<\n> 7 | >> 8 | 9 | Errors() ::= << 10 | line 5:0 mismatched input '\' expecting ' 11 | '<\n> 12 | >> 13 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalParser/PredFromAltTestedInLoopBack_2.stg: -------------------------------------------------------------------------------- 1 | import "PredFromAltTestedInLoopBack.stg" 2 | 3 | Input() ::= "s<\n><\n><\n>x<\n><\n>" 4 | 5 | Output() ::= << 6 | (file_ (para (paraContent s) \n \n) (para (paraContent \n x) \n \n) \)<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalParser/PredTestedEvenWhenUnAmbig_1.stg: -------------------------------------------------------------------------------- 1 | import "PredTestedEvenWhenUnAmbig.stg" 2 | 3 | Input() ::= "abc" 4 | 5 | Output() ::= << 6 | ID abc<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/SemPredEvalParser/PredTestedEvenWhenUnAmbig_2.stg: -------------------------------------------------------------------------------- 1 | import "PredTestedEvenWhenUnAmbig.stg" 2 | 3 | Input() ::= "enum" 4 | 5 | Output() ::= << 6 | >> 7 | 8 | Errors() ::= << 9 | line 1:0 no viable alternative at input 'enum'<\n> 10 | >> 11 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/CharSetLiteral.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "A a B b" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | A 17 | a 18 | B 19 | b<\n> 20 | >> 21 | 22 | Errors() ::= "" 23 | 24 | grammar(grammarName) ::= << 25 | grammar ; 26 | a : (A {})+ ; 27 | A : [AaBb] ; 28 | WS : (' '|'\n')+ -> skip ; 29 | >> 30 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/ComplementSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "a" 12 | 13 | Rule() ::= "parse" 14 | 15 | Output() ::= "" 16 | 17 | Errors() ::= << 18 | line 1:0 token recognition error at: 'a' 19 | line 1:1 missing {} at '\'<\n> 20 | >> 21 | 22 | grammar(grammarName) ::= << 23 | grammar ; 24 | parse : ~NEW_LINE; 25 | NEW_LINE: '\\r'? '\\n'; 26 | >> 27 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/LexerOptionalSet.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 | ac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ('a'|'b')? 'c' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/LexerPlusSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abaac" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | abaac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ('a'|'b')+ 'c' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/LexerStarSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abaac" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | abaac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ('a'|'b')* 'c' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/NotChar.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "x" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | x<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ~'b' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/NotCharSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "x" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | x<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ~('b'|'c') ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/NotCharSetWithLabel.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "x" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | x<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : h=~('b'|'c') ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/NotCharSetWithRuleRef3.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "x" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | x<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : ('a'|B) ; // this doesn't collapse to set but works 25 | fragment 26 | B : ~('a'|'c') ; 27 | >> 28 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/OptionalLexerSingleElement.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "bc" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | bc<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : 'b'? 'c' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/OptionalSet.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 | ac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ('a'|'b')? 'c' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/OptionalSingleElement.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "bc" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | bc<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A? 'c' {} ; 24 | A : 'b' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/ParserNotSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "zz" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | z<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : t=~('x'|'y') 'z' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/ParserNotToken.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "zz" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | zz<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ~'x' 'z' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/ParserNotTokenWithLabel.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "zz" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | z<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : t=~'x' 'z' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/ParserSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "x" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | x<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : t=('x'|'y') {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/PlusLexerSingleElement.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "bbbbc" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | bbbbc<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : A {} ; 24 | A : 'b'+ 'c' ; 25 | >> 26 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/PlusSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abaac" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | abaac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ('a'|'b')+ 'c' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/RuleAsSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "b" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | b<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a @after {} : 'a' | 'b' |'c' ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/StarLexerSingleElement.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 : A {} ; 16 | A : 'b'* 'c' ; 17 | >> 18 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/StarLexerSingleElement_1.stg: -------------------------------------------------------------------------------- 1 | import "StarLexerSingleElement.stg" 2 | 3 | Input() ::= "bbbbc" 4 | 5 | Output() ::= << 6 | bbbbc<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/StarLexerSingleElement_2.stg: -------------------------------------------------------------------------------- 1 | import "StarLexerSingleElement.stg" 2 | 3 | Input() ::= "c" 4 | 5 | Output() ::= << 6 | c<\n> 7 | >> 8 | 9 | Errors() ::= "" 10 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Sets/StarSet.stg: -------------------------------------------------------------------------------- 1 | TestType() ::= "Parser" 2 | 3 | Options ::= [ 4 | "Debug": false 5 | ] 6 | 7 | Grammar ::= [ 8 | "T": {} 9 | ] 10 | 11 | Input() ::= "abaac" 12 | 13 | Rule() ::= "a" 14 | 15 | Output() ::= << 16 | abaac<\n> 17 | >> 18 | 19 | Errors() ::= "" 20 | 21 | grammar(grammarName) ::= << 22 | grammar ; 23 | a : ('a'|'b')* 'c' {} ; 24 | >> 25 | -------------------------------------------------------------------------------- /reference/antlr4/runtime-testsuite/resources/org/antlr/v4/test/runtime/templates/Visitors/Index.stg: -------------------------------------------------------------------------------- 1 | TestTemplates ::= [ 2 | "VisitTerminalNode": [], 3 | "VisitErrorNode": [], 4 | "ShouldNotVisitEOF": [], 5 | "ShouldNotVisitTerminal": [], 6 | "CalculatorVisitor": [] 7 | ] 8 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/lib/org.abego.treelayout.core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/reference/antlr4/runtime/Java/lib/org.abego.treelayout.core.jar -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/resources/META-INF/services/javax.annotation.processing.Processor: -------------------------------------------------------------------------------- 1 | org.antlr.v4.runtime.misc.RuleDependencyProcessor 2 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/main/dot/org/antlr/v4/runtime/atn/images/Rule.dot: -------------------------------------------------------------------------------- 1 | digraph "" { 2 | graph[fontname="Courier New";rankdir="LR";pad="0.25"]; 3 | node[fontname="Courier New";target="_parent"]; 4 | edge[fontname="Courier New"]; 5 | { node[shape="box"]; 6 | RuleStartState[URL="../RuleStartState.html"]; 7 | RuleStopState[URL="../RuleStopState.html"]; 8 | } 9 | { node[style="dashed"]; 10 | content; 11 | } 12 | 13 | RuleStartState -> content[label="ε"]; 14 | content -> RuleStopState[style="dashed"]; 15 | } 16 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/AbstractPredicateTransition.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** 10 | * 11 | * @author Sam Harwell 12 | */ 13 | public abstract class AbstractPredicateTransition extends Transition { 14 | 15 | public AbstractPredicateTransition(ATNState target) { 16 | super(target); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/BasicBlockStartState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** 10 | * 11 | * @author Sam Harwell 12 | */ 13 | public final class BasicBlockStartState extends BlockStartState { 14 | 15 | @Override 16 | public StateType getStateType() { 17 | return StateType.BLOCK_START; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/BasicState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** 10 | * 11 | * @author Sam Harwell 12 | */ 13 | public final class BasicState extends ATNState { 14 | 15 | @Override 16 | public StateType getStateType() { 17 | return StateType.BASIC; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/BlockEndState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** Terminal node of a simple {@code (a|b|c)} block. */ 10 | public final class BlockEndState extends ATNState { 11 | public BlockStartState startState; 12 | 13 | @Override 14 | public StateType getStateType() { 15 | return StateType.BLOCK_END; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/BlockStartState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** The start of a regular {@code (...)} block. */ 10 | public abstract class BlockStartState extends DecisionState { 11 | public BlockEndState endState; 12 | } 13 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/DecisionState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | public abstract class DecisionState extends ATNState { 10 | public int decision = -1; 11 | public boolean nonGreedy; 12 | public boolean sll; 13 | } 14 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/LoopEndState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** Mark the end of a * or + loop. */ 10 | public final class LoopEndState extends ATNState { 11 | public ATNState loopBackState; 12 | 13 | @Override 14 | public StateType getStateType() { 15 | return StateType.LOOP_END; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/StarBlockStartState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** The block that begins a closure loop. */ 10 | public final class StarBlockStartState extends BlockStartState { 11 | 12 | @Override 13 | public StateType getStateType() { 14 | return StateType.STAR_BLOCK_START; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/atn/TokensStartState.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.atn; 8 | 9 | /** The Tokens rule start state linking to each lexer rule start state */ 10 | public final class TokensStartState extends DecisionState { 11 | 12 | @Override 13 | public StateType getStateType() { 14 | return StateType.TOKEN_START; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/misc/Func0.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.runtime.misc; 7 | 8 | /** 9 | * @sharpen.ignore 10 | * @author Sam Harwell 11 | */ 12 | public interface Func0 { 13 | 14 | Result eval(); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/misc/Func1.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.runtime.misc; 7 | 8 | /** 9 | * @sharpen.ignore 10 | * @author Sam Harwell 11 | */ 12 | public interface Func1 { 13 | 14 | Result eval(T1 arg1); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/misc/Predicate.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.misc; 8 | 9 | /** 10 | * @sharpen.ignore 11 | * @author Sam Harwell 12 | */ 13 | public interface Predicate { 14 | 15 | boolean eval(T arg); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/tree/ErrorNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.tree; 8 | 9 | public interface ErrorNode extends TerminalNode { 10 | } 11 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/tree/RuleNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.tree; 8 | 9 | import org.antlr.v4.runtime.RuleContext; 10 | 11 | public interface RuleNode extends ParseTree { 12 | /** 13 | * @sharpen.property RuleContext 14 | */ 15 | RuleContext getRuleContext(); 16 | 17 | @Override 18 | RuleNode getParent(); 19 | } 20 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/Java/src/org/antlr/v4/runtime/tree/TerminalNode.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.runtime.tree; 8 | 9 | import org.antlr.v4.runtime.Token; 10 | 11 | public interface TerminalNode extends ParseTree { 12 | /** 13 | * @sharpen.property Symbol 14 | */ 15 | Token getSymbol(); 16 | 17 | @Override 18 | RuleNode getParent(); 19 | } 20 | -------------------------------------------------------------------------------- /reference/antlr4/runtime/JavaAnnotations/resources/META-INF/services/javax.annotation.processing.Processor: -------------------------------------------------------------------------------- 1 | org.antlr.v4.runtime.misc.NullUsageProcessor -------------------------------------------------------------------------------- /reference/antlr4/tool/MIGRATION.txt: -------------------------------------------------------------------------------- 1 | Parsers 2 | 3 | * Full context LL(*) not SLL(*) 4 | * Adaptive, takes all but indirect left-recursion 5 | 6 | Actions/scopes 7 | 8 | * no global scopes. no scope[n]. 9 | 10 | Trees 11 | 12 | * no ASTs 13 | * no tree grammars 14 | * parse trees created by default 15 | * moved methods to Trees 16 | 17 | Lexers 18 | 19 | * Added [Abc] notation 20 | 21 | * unicode rule/token names 22 | 23 | * -> skip notation -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/LexerFactory.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen; 8 | 9 | /** */ 10 | public class LexerFactory extends DefaultOutputModelFactory { 11 | public LexerFactory(CodeGenerator gen) { super(gen); } 12 | } 13 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/BaseListenerFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.codegen.model; 7 | 8 | import org.antlr.v4.codegen.OutputModelFactory; 9 | 10 | public class BaseListenerFile extends ListenerFile { 11 | public BaseListenerFile(OutputModelFactory factory, String fileName) { 12 | super(factory, fileName); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/BaseVisitorFile.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.codegen.model; 7 | 8 | import org.antlr.v4.codegen.OutputModelFactory; 9 | 10 | public class BaseVisitorFile extends VisitorFile { 11 | public BaseVisitorFile(OutputModelFactory factory, String fileName) { 12 | super(factory, fileName); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/DispatchMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.codegen.model; 7 | 8 | import org.antlr.v4.codegen.OutputModelFactory; 9 | 10 | public class DispatchMethod extends OutputModelObject { 11 | public DispatchMethod(OutputModelFactory factory) { 12 | super(factory); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/LabeledOp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model; 8 | 9 | import org.antlr.v4.codegen.model.decl.Decl; 10 | 11 | import java.util.List; 12 | 13 | /** All the rule elements we can label like tokens, rules, sets, wildcard. */ 14 | public interface LabeledOp { 15 | public List getLabels(); 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/VisitorDispatchMethod.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | package org.antlr.v4.codegen.model; 7 | 8 | import org.antlr.v4.codegen.OutputModelFactory; 9 | 10 | public class VisitorDispatchMethod extends DispatchMethod { 11 | public VisitorDispatchMethod(OutputModelFactory factory) { 12 | super(factory); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/Wildcard.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model; 8 | 9 | import org.antlr.v4.codegen.OutputModelFactory; 10 | import org.antlr.v4.tool.ast.GrammarAST; 11 | 12 | public class Wildcard extends MatchToken { 13 | public Wildcard(OutputModelFactory factory, GrammarAST ast) { 14 | super(factory, ast); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/ArgRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class ArgRef extends LocalRef { 13 | public ArgRef(StructDecl ctx, String name) { 14 | super(ctx, name); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/LabelRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | public class LabelRef extends ActionChunk { 12 | public String name; 13 | 14 | public LabelRef(StructDecl ctx, String name) { 15 | super(ctx); 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/ListLabelRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | public class ListLabelRef extends LabelRef { 12 | public ListLabelRef(StructDecl ctx, String name) { super(ctx, name); } 13 | } 14 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/LocalRef.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | public class LocalRef extends ActionChunk { 12 | public String name; 13 | 14 | public LocalRef(StructDecl ctx, String name) { 15 | super(ctx); 16 | this.name = name; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/RulePropertyRef_ctx.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | public class RulePropertyRef_ctx extends RulePropertyRef { 12 | public RulePropertyRef_ctx(StructDecl ctx, String label) { 13 | super(ctx, label); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/RulePropertyRef_parser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class RulePropertyRef_parser extends RulePropertyRef { 13 | public RulePropertyRef_parser(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/RulePropertyRef_start.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class RulePropertyRef_start extends RulePropertyRef { 13 | public RulePropertyRef_start(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/RulePropertyRef_stop.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class RulePropertyRef_stop extends RulePropertyRef { 13 | public RulePropertyRef_stop(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/RulePropertyRef_text.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class RulePropertyRef_text extends RulePropertyRef { 13 | public RulePropertyRef_text(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_index.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_index extends TokenPropertyRef { 13 | public TokenPropertyRef_index(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_int.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_int extends TokenPropertyRef { 13 | public TokenPropertyRef_int(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_line.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_line extends TokenPropertyRef { 13 | public TokenPropertyRef_line(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_pos.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_pos extends TokenPropertyRef { 13 | public TokenPropertyRef_pos(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_text.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_text extends TokenPropertyRef { 13 | public TokenPropertyRef_text(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/chunk/TokenPropertyRef_type.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.chunk; 8 | 9 | import org.antlr.v4.codegen.model.decl.StructDecl; 10 | 11 | /** */ 12 | public class TokenPropertyRef_type extends TokenPropertyRef { 13 | public TokenPropertyRef_type(StructDecl ctx, String label) { 14 | super(ctx, label); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/dbg.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model; 8 | 9 | /** */ 10 | public class dbg extends OutputModelObject { 11 | } 12 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/decl/ElementListDecl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.decl; 8 | 9 | import org.antlr.v4.codegen.OutputModelFactory; 10 | 11 | public class ElementListDecl extends Decl { 12 | public ElementListDecl(OutputModelFactory factory, String name) { 13 | super(factory, name); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/decl/TokenListDecl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.decl; 8 | 9 | import org.antlr.v4.codegen.OutputModelFactory; 10 | 11 | /** */ 12 | public class TokenListDecl extends TokenDecl { 13 | public TokenListDecl(OutputModelFactory factory, String varName) { 14 | super(factory, varName); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/codegen/model/decl/TokenTypeDecl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.codegen.model.decl; 8 | 9 | import org.antlr.v4.codegen.OutputModelFactory; 10 | 11 | /** */ 12 | public class TokenTypeDecl extends Decl { 13 | public TokenTypeDecl(OutputModelFactory factory, String name) { 14 | super(factory, name); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/gui/TreeTextProvider.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.gui; 8 | 9 | import org.antlr.v4.runtime.tree.Tree; 10 | 11 | /** 12 | * @sharpen.ignore 13 | */ 14 | public interface TreeTextProvider { 15 | String getText(Tree node); 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/tool/LabelType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.tool; 8 | 9 | /** the various kinds of labels. t=type, id=ID, types+=type ids+=ID */ 10 | public enum LabelType { 11 | RULE_LABEL, 12 | TOKEN_LABEL, 13 | RULE_LIST_LABEL, 14 | TOKEN_LIST_LABEL, 15 | LEXER_STRING_LABEL; // used in lexer for x='a' 16 | } 17 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/tool/ast/QuantifierAST.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.tool.ast; 8 | 9 | /** 10 | * 11 | * @author Sam Harwell 12 | */ 13 | public interface QuantifierAST { 14 | 15 | boolean isGreedy(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /reference/antlr4/tool/src/org/antlr/v4/tool/ast/RuleElementAST.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2012 The ANTLR Project. All rights reserved. 3 | * Use of this file is governed by the BSD-3-Clause license that 4 | * can be found in the LICENSE.txt file in the project root. 5 | */ 6 | 7 | package org.antlr.v4.tool.ast; 8 | 9 | /** Tag indicated AST node is a rule element like token or rule ref. */ 10 | public interface RuleElementAST { 11 | } 12 | -------------------------------------------------------------------------------- /reference/sharpen-header.txt: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | -------------------------------------------------------------------------------- /runtime/CSharp/.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /runtime/CSharp/.nuget/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime.Test/Sharpen/Checksum.cs: -------------------------------------------------------------------------------- 1 | namespace Antlr4.Runtime.Sharpen 2 | { 3 | internal interface Checksum 4 | { 5 | long Value 6 | { 7 | get; 8 | } 9 | 10 | void Reset(); 11 | 12 | void Update(byte[] buffer, int offset, int length); 13 | 14 | void Update(int byteValue); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/ATNType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | /// Represents the type of recognizer an ATN applies to. 9 | /// Sam Harwell 10 | public enum ATNType 11 | { 12 | Lexer, 13 | Parser 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/AbstractPredicateTransition.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | /// Sam Harwell 9 | public abstract class AbstractPredicateTransition : Transition 10 | { 11 | public AbstractPredicateTransition(ATNState target) 12 | : base(target) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/BlockStartState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | /// 9 | /// The start of a regular 10 | /// (...) 11 | /// block. 12 | /// 13 | public abstract class BlockStartState : DecisionState 14 | { 15 | public BlockEndState endState; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/DecisionState.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | public abstract class DecisionState : ATNState 9 | { 10 | public int decision = -1; 11 | 12 | public bool nonGreedy; 13 | 14 | public bool sll; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/LexerActionType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | /// Sam Harwell 9 | /// 4.2 10 | public enum LexerActionType 11 | { 12 | Channel, 13 | Custom, 14 | Mode, 15 | More, 16 | PopMode, 17 | PushMode, 18 | Skip, 19 | Type 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Atn/TransitionType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Atn 7 | { 8 | public enum TransitionType 9 | { 10 | Invalid, 11 | Epsilon, 12 | Range, 13 | Rule, 14 | Predicate, 15 | Atom, 16 | Action, 17 | Set, 18 | NotSet, 19 | Wildcard, 20 | Precedence 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Misc/NotNullAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Runtime.Misc 5 | { 6 | using System; 7 | 8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.Property, Inherited = true, AllowMultiple = false)] 9 | public sealed class NotNullAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Misc/NullableAttribute.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Runtime.Misc 5 | { 6 | using System; 7 | 8 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.Property, Inherited = true, AllowMultiple = false)] 9 | public sealed class NullableAttribute : Attribute 10 | { 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Sharpen/Compat/ExtensionAttribute.cs: -------------------------------------------------------------------------------- 1 | #if !NET35PLUS 2 | 3 | namespace System.Runtime.CompilerServices 4 | { 5 | internal sealed class ExtensionAttribute : Attribute 6 | { 7 | } 8 | } 9 | 10 | #endif 11 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Sharpen/Compat/IStructuralComparable.cs: -------------------------------------------------------------------------------- 1 | #if !NET40PLUS 2 | 3 | // ==++== 4 | // 5 | // Copyright (c) Microsoft Corporation. All rights reserved. 6 | // 7 | // ==--== 8 | 9 | namespace System.Collections 10 | { 11 | internal interface IStructuralComparable { 12 | Int32 CompareTo(Object other, IComparer comparer); 13 | } 14 | } 15 | 16 | #endif 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Sharpen/Compat/IStructuralEquatable.cs: -------------------------------------------------------------------------------- 1 | #if !NET40PLUS 2 | 3 | // ==++== 4 | // 5 | // Copyright (c) Microsoft Corporation. All rights reserved. 6 | // 7 | // ==--== 8 | 9 | namespace System.Collections { 10 | 11 | public interface IStructuralEquatable { 12 | Boolean Equals(Object other, IEqualityComparer comparer); 13 | int GetHashCode(IEqualityComparer comparer); 14 | } 15 | } 16 | 17 | #endif 18 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Sharpen/Compat/SerializableAttribute.cs: -------------------------------------------------------------------------------- 1 | #if PORTABLE && !NETSTANDARD2_0 2 | 3 | namespace System 4 | { 5 | [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Delegate, Inherited = false)] 6 | internal sealed class SerializableAttribute : Attribute 7 | { 8 | } 9 | } 10 | 11 | #endif 12 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/TokenTypes.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Runtime 5 | { 6 | public static class TokenTypes 7 | { 8 | public const int More = -2; 9 | 10 | public const int Skip = -3; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Tree/IErrorNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Tree 7 | { 8 | public interface IErrorNode : ITerminalNode 9 | { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Tree/IRuleNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime.Sharpen; 5 | 6 | namespace Antlr4.Runtime.Tree 7 | { 8 | public interface IRuleNode : IParseTree 9 | { 10 | Antlr4.Runtime.RuleContext RuleContext 11 | { 12 | get; 13 | } 14 | 15 | new IRuleNode Parent 16 | { 17 | get; 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Runtime/Tree/ITerminalNode.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | using Antlr4.Runtime; 5 | using Antlr4.Runtime.Sharpen; 6 | 7 | namespace Antlr4.Runtime.Tree 8 | { 9 | public interface ITerminalNode : IParseTree 10 | { 11 | IToken Symbol 12 | { 13 | get; 14 | } 15 | 16 | new IRuleNode Parent 17 | { 18 | get; 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/LexerFactory.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen 5 | { 6 | /** */ 7 | public class LexerFactory : DefaultOutputModelFactory 8 | { 9 | public LexerFactory(CodeGenerator gen) 10 | : base(gen) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/BaseListenerFile.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class BaseListenerFile : ListenerFile 7 | { 8 | public BaseListenerFile(OutputModelFactory factory, string fileName) 9 | : base(factory, fileName) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/BaseVisitorFile.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class BaseVisitorFile : VisitorFile 7 | { 8 | public BaseVisitorFile(OutputModelFactory factory, string fileName) 9 | : base(factory, fileName) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/CaptureNextToken.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class CaptureNextToken : SrcOp 7 | { 8 | public string varName; 9 | 10 | public CaptureNextToken(OutputModelFactory factory, string varName) 11 | : base(factory) 12 | { 13 | this.varName = varName; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/CaptureNextTokenType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | /** */ 7 | public class CaptureNextTokenType : SrcOp 8 | { 9 | public string varName; 10 | 11 | public CaptureNextTokenType(OutputModelFactory factory, string varName) 12 | : base(factory) 13 | { 14 | this.varName = varName; 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ArgRef.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class ArgRef : LocalRef 10 | { 11 | public ArgRef(StructDecl ctx, string name) 12 | : base(ctx, name) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/LabelRef.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | public class LabelRef : ActionChunk 9 | { 10 | public string name; 11 | 12 | public LabelRef(StructDecl ctx, string name) 13 | : base(ctx) 14 | { 15 | this.name = name; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ListLabelRef.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | public class ListLabelRef : LabelRef 9 | { 10 | public ListLabelRef(StructDecl ctx, string name) 11 | : base(ctx, name) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/LocalRef.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | public class LocalRef : ActionChunk 9 | { 10 | public string name; 11 | 12 | public LocalRef(StructDecl ctx, string name) 13 | : base(ctx) 14 | { 15 | this.name = name; 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/RulePropertyRef_ctx.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | public class RulePropertyRef_ctx : RulePropertyRef 9 | { 10 | public RulePropertyRef_ctx(StructDecl ctx, string label) 11 | : base(ctx, label) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/RulePropertyRef_parser.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class RulePropertyRef_parser : RulePropertyRef 10 | { 11 | public RulePropertyRef_parser(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/RulePropertyRef_start.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class RulePropertyRef_start : RulePropertyRef 10 | { 11 | public RulePropertyRef_start(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/RulePropertyRef_stop.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class RulePropertyRef_stop : RulePropertyRef 10 | { 11 | public RulePropertyRef_stop(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/RulePropertyRef_text.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class RulePropertyRef_text : RulePropertyRef 10 | { 11 | public RulePropertyRef_text(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ThisRulePropertyRef_ctx.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | public class ThisRulePropertyRef_ctx : RulePropertyRef 9 | { 10 | public ThisRulePropertyRef_ctx(StructDecl ctx, string label) 11 | : base(ctx, label) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ThisRulePropertyRef_parser.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class ThisRulePropertyRef_parser : RulePropertyRef 10 | { 11 | public ThisRulePropertyRef_parser(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ThisRulePropertyRef_start.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class ThisRulePropertyRef_start : RulePropertyRef 10 | { 11 | public ThisRulePropertyRef_start(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ThisRulePropertyRef_stop.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class ThisRulePropertyRef_stop : RulePropertyRef 10 | { 11 | public ThisRulePropertyRef_stop(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/ThisRulePropertyRef_text.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class ThisRulePropertyRef_text : RulePropertyRef 10 | { 11 | public ThisRulePropertyRef_text(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_channel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_channel : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_channel(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_index.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_index : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_index(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_int.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_int : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_int(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_line.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_line : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_line(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_pos.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_pos : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_pos(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_text.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_text : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_text(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenPropertyRef_type.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenPropertyRef_type : TokenPropertyRef 10 | { 11 | public TokenPropertyRef_type(StructDecl ctx, string label) 12 | : base(ctx, label) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Chunk/TokenRef.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Chunk 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** */ 9 | public class TokenRef : ActionChunk 10 | { 11 | public string name; 12 | 13 | public TokenRef(StructDecl ctx, string name) 14 | : base(ctx) 15 | { 16 | this.name = name; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/CodeBlockForAlt.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using Antlr4.Codegen.Model.Decl; 7 | 8 | /** Contains Rewrite block (usually as last op) */ 9 | public class CodeBlockForAlt : CodeBlock 10 | { 11 | public CodeBlockForAlt(OutputModelFactory factory) 12 | : base(factory) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Decl/ElementListDecl.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Decl 5 | { 6 | public class ElementListDecl : Decl 7 | { 8 | public ElementListDecl(OutputModelFactory factory, string name) 9 | : base(factory, name) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Decl/RuleContextListDecl.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Decl 5 | { 6 | public class RuleContextListDecl : RuleContextDecl 7 | { 8 | public RuleContextListDecl(OutputModelFactory factory, string name, string ctxName) 9 | : base(factory, name, ctxName) 10 | { 11 | isImplicit = false; 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Decl/TokenDecl.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Decl 5 | { 6 | /** x=ID or implicit _tID label */ 7 | public class TokenDecl : Decl 8 | { 9 | public bool isImplicit; 10 | 11 | public TokenDecl(OutputModelFactory factory, string varName) 12 | : base(factory, varName) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Decl/TokenListDecl.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Decl 5 | { 6 | /** */ 7 | public class TokenListDecl : TokenDecl 8 | { 9 | public TokenListDecl(OutputModelFactory factory, string varName) 10 | : base(factory, varName) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Decl/TokenTypeDecl.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model.Decl 5 | { 6 | /** */ 7 | public class TokenTypeDecl : Decl 8 | { 9 | public TokenTypeDecl(OutputModelFactory factory, string name) 10 | : base(factory, name) 11 | { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/DispatchMethod.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class DispatchMethod : OutputModelObject 7 | { 8 | public DispatchMethod(OutputModelFactory factory) 9 | : base(factory) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/LabeledOp.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using System.Collections.Generic; 7 | 8 | /** All the rule elements we can label like tokens, rules, sets, wildcard. */ 9 | public interface LabeledOp 10 | { 11 | IList GetLabels(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/ListenerDispatchMethod.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class ListenerDispatchMethod : DispatchMethod 7 | { 8 | public bool isEnter; 9 | 10 | public ListenerDispatchMethod(OutputModelFactory factory, bool isEnter) 11 | : base(factory) 12 | { 13 | this.isEnter = isEnter; 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/MatchNotSet.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using Antlr4.Tool.Ast; 7 | 8 | public class MatchNotSet : MatchSet 9 | { 10 | public string varName = "_la"; 11 | 12 | public MatchNotSet(OutputModelFactory factory, GrammarAST ast) 13 | : base(factory, ast) 14 | { 15 | } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/ModelElement.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using System; 7 | 8 | /** Indicate field of OutputModelObject is an element to be walked by 9 | * OutputModelWalker. 10 | */ 11 | [AttributeUsage(AttributeTargets.All, Inherited = true, AllowMultiple = false)] 12 | public sealed class ModelElementAttribute : Attribute 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/RuleSempredFunction.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using Antlr4.Tool; 7 | 8 | public class RuleSempredFunction : RuleActionFunction 9 | { 10 | public RuleSempredFunction(OutputModelFactory factory, Rule r, string ctxType) 11 | : base(factory, r, ctxType) 12 | { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/VisitorDispatchMethod.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | public class VisitorDispatchMethod : DispatchMethod 7 | { 8 | public VisitorDispatchMethod(OutputModelFactory factory) 9 | : base(factory) 10 | { 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/Wildcard.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | using Antlr4.Codegen.Model; 7 | using Antlr4.Tool.Ast; 8 | 9 | public class Wildcard : MatchToken 10 | { 11 | public Wildcard(OutputModelFactory factory, GrammarAST ast) 12 | : base(factory, ast) 13 | { 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Codegen/Model/dbg.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Codegen.Model 5 | { 6 | /** */ 7 | public class dbg : OutputModelObject 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Tool/Ast/QuantifierAST.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Tool.Ast 5 | { 6 | /** 7 | * 8 | * @author Sam Harwell 9 | */ 10 | public interface QuantifierAST 11 | { 12 | bool GetGreedy(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Tool/Ast/RuleElementAST.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Tool.Ast 5 | { 6 | /** Tag indicated AST node is a rule element like token or rule ref. */ 7 | public interface RuleElementAST 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4.Tool/Tool/LabelType.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | namespace Antlr4.Tool 5 | { 6 | /** the various kinds of labels. t=type, id=ID, types+=type ids+=ID */ 7 | public enum LabelType 8 | { 9 | RULE_LABEL, 10 | TOKEN_LABEL, 11 | RULE_LIST_LABEL, 12 | TOKEN_LIST_LABEL, 13 | LEXER_STRING_LABEL // used in lexer for x='a' 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4BuildTasks/Antlr4.ProjectItemsSchema.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4BuildTasks/GlobalSuppressions.cs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/runtime/CSharp/Antlr4BuildTasks/GlobalSuppressions.cs -------------------------------------------------------------------------------- /runtime/CSharp/Antlr4BuildTasks/TraceLevel.cs: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | #if NETSTANDARD1_5 5 | 6 | namespace Antlr4.Build.Tasks 7 | { 8 | internal enum TraceLevel 9 | { 10 | Off, 11 | Error, 12 | Warning, 13 | Info, 14 | Verbose 15 | } 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /runtime/CSharp/build/CustomDictionary.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Antlr 6 | Atn 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /runtime/CSharp/build/ReferenceAssemblies/System.Core.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/runtime/CSharp/build/ReferenceAssemblies/System.Core.dll -------------------------------------------------------------------------------- /runtime/CSharp/build/ReferenceAssemblies/System.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/runtime/CSharp/build/ReferenceAssemblies/System.dll -------------------------------------------------------------------------------- /runtime/CSharp/build/ReferenceAssemblies/mscorlib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tunnelvisionlabs/antlr4cs/bc7fb74f3cf64f656cf2c9c1e05d71386e580a41/runtime/CSharp/build/ReferenceAssemblies/mscorlib.dll -------------------------------------------------------------------------------- /tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp_v2_0.stg: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | import "CSharp.stg" 5 | -------------------------------------------------------------------------------- /tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp_v3_0.stg: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | import "CSharp.stg" 5 | -------------------------------------------------------------------------------- /tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp_v3_5.stg: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | import "CSharp.stg" 5 | -------------------------------------------------------------------------------- /tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp_v4_0.stg: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | import "CSharp.stg" 5 | -------------------------------------------------------------------------------- /tool/resources/org/antlr/v4/tool/templates/codegen/CSharp/CSharp_v4_5.stg: -------------------------------------------------------------------------------- 1 | // Copyright (c) Terence Parr, Sam Harwell. All Rights Reserved. 2 | // Licensed under the BSD License. See LICENSE.txt in the project root for license information. 3 | 4 | import "CSharp.stg" 5 | --------------------------------------------------------------------------------