did_parser 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +12 -0
- data/Rakefile +28 -0
- data/did_parser.gemspec +31 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +30 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +180 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +79 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +37 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +193 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +158 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +336 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +99 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +52 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +218 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +294 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +196 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +60 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +46 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +668 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +461 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +294 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +173 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +138 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +65 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +156 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +159 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +144 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +141 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +54 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +92 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +85 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +137 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +425 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +295 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +208 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +117 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +42 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +64 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +177 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +98 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +169 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +158 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +132 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +106 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +157 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +232 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +156 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +54 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +48 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +629 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +32 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +71 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +56 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +139 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +29 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +35 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +109 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +51 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +30 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +12 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +34 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +31 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +42 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +189 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +76 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +67 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +615 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +199 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +15 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +100 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +111 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +128 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +57 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +59 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +45 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +75 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +57 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +76 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +57 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +53 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +53 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +57 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +51 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +51 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +22 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1383 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +911 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +29 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +35 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +50 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +579 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +225 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +64 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +202 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +31 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +42 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +418 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +233 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +28 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +38 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +86 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +37 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +65 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +21 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +115 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +96 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +60 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +59 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +153 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +17 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +22 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +61 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +508 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +190 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +120 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +102 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +8 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +16 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +149 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +207 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +65 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +34 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +161 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +38 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +16 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +54 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +43 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +12 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +111 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +48 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +55 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +40 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +54 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +32 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +182 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +47 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- data/ext/did_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
- data/ext/did_parser/antlrgen/DIDLexer.cpp +225 -0
- data/ext/did_parser/antlrgen/DIDLexer.h +52 -0
- data/ext/did_parser/antlrgen/DIDLexer.interp +93 -0
- data/ext/did_parser/antlrgen/DIDLexer.tokens +42 -0
- data/ext/did_parser/antlrgen/DIDParser.cpp +2042 -0
- data/ext/did_parser/antlrgen/DIDParser.h +537 -0
- data/ext/did_parser/antlrgen/DIDParser.interp +74 -0
- data/ext/did_parser/antlrgen/DIDParser.tokens +42 -0
- data/ext/did_parser/antlrgen/DIDParserBaseListener.cpp +7 -0
- data/ext/did_parser/antlrgen/DIDParserBaseListener.h +104 -0
- data/ext/did_parser/antlrgen/DIDParserBaseVisitor.cpp +7 -0
- data/ext/did_parser/antlrgen/DIDParserBaseVisitor.h +124 -0
- data/ext/did_parser/antlrgen/DIDParserListener.cpp +7 -0
- data/ext/did_parser/antlrgen/DIDParserListener.h +97 -0
- data/ext/did_parser/antlrgen/DIDParserVisitor.cpp +7 -0
- data/ext/did_parser/antlrgen/DIDParserVisitor.h +76 -0
- data/ext/did_parser/did_parser.cpp +2996 -0
- data/ext/did_parser/extconf.rb +38 -0
- data/lib/did_parser/version.rb +3 -0
- data/lib/did_parser.rb +2 -0
- metadata +382 -0
|
@@ -0,0 +1,2042 @@
|
|
|
1
|
+
|
|
2
|
+
// Generated from ./DIDParser.g4 by ANTLR 4.10.1
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#include "DIDParserListener.h"
|
|
6
|
+
#include "DIDParserVisitor.h"
|
|
7
|
+
|
|
8
|
+
#include "DIDParser.h"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
using namespace antlrcpp;
|
|
12
|
+
|
|
13
|
+
using namespace antlr4;
|
|
14
|
+
|
|
15
|
+
namespace {
|
|
16
|
+
|
|
17
|
+
struct DIDParserStaticData final {
|
|
18
|
+
DIDParserStaticData(std::vector<std::string> ruleNames,
|
|
19
|
+
std::vector<std::string> literalNames,
|
|
20
|
+
std::vector<std::string> symbolicNames)
|
|
21
|
+
: ruleNames(std::move(ruleNames)), literalNames(std::move(literalNames)),
|
|
22
|
+
symbolicNames(std::move(symbolicNames)),
|
|
23
|
+
vocabulary(this->literalNames, this->symbolicNames) {}
|
|
24
|
+
|
|
25
|
+
DIDParserStaticData(const DIDParserStaticData&) = delete;
|
|
26
|
+
DIDParserStaticData(DIDParserStaticData&&) = delete;
|
|
27
|
+
DIDParserStaticData& operator=(const DIDParserStaticData&) = delete;
|
|
28
|
+
DIDParserStaticData& operator=(DIDParserStaticData&&) = delete;
|
|
29
|
+
|
|
30
|
+
std::vector<antlr4::dfa::DFA> decisionToDFA;
|
|
31
|
+
antlr4::atn::PredictionContextCache sharedContextCache;
|
|
32
|
+
const std::vector<std::string> ruleNames;
|
|
33
|
+
const std::vector<std::string> literalNames;
|
|
34
|
+
const std::vector<std::string> symbolicNames;
|
|
35
|
+
const antlr4::dfa::Vocabulary vocabulary;
|
|
36
|
+
antlr4::atn::SerializedATNView serializedATN;
|
|
37
|
+
std::unique_ptr<antlr4::atn::ATN> atn;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
std::once_flag didparserParserOnceFlag;
|
|
41
|
+
DIDParserStaticData *didparserParserStaticData = nullptr;
|
|
42
|
+
|
|
43
|
+
void didparserParserInitialize() {
|
|
44
|
+
assert(didparserParserStaticData == nullptr);
|
|
45
|
+
auto staticData = std::make_unique<DIDParserStaticData>(
|
|
46
|
+
std::vector<std::string>{
|
|
47
|
+
"program", "defination", "actor", "actortype", "datatype", "comptype",
|
|
48
|
+
"constype", "recordfield", "variantfield", "reftype", "functype",
|
|
49
|
+
"tuptype", "argtypes", "funcann", "methodtype"
|
|
50
|
+
},
|
|
51
|
+
std::vector<std::string>{
|
|
52
|
+
"", "", "", "", "'type'", "'query'", "'oneway'", "", "", "'opt'",
|
|
53
|
+
"'vec'", "'record'", "'variant'", "'service'", "'func'", "", "'('",
|
|
54
|
+
"')'", "'{'", "'}'", "'->'", "':'", "';'", "'='", "','"
|
|
55
|
+
},
|
|
56
|
+
std::vector<std::string>{
|
|
57
|
+
"", "BlockComment", "LineComment", "S", "Type", "Query", "Oneway",
|
|
58
|
+
"PrimType", "NumType", "OPT", "VEC", "RECORD", "VARIANT", "Service",
|
|
59
|
+
"FUNC", "Name", "LeftP", "RightP", "LeftB", "RightB", "Arrow", "Colon",
|
|
60
|
+
"Semicolon", "Eq", "Comma"
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
static const int32_t serializedATNSegment[] = {
|
|
64
|
+
4,1,24,178,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,
|
|
65
|
+
7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,
|
|
66
|
+
14,1,0,5,0,32,8,0,10,0,12,0,35,9,0,1,0,3,0,38,8,0,1,1,1,1,1,1,1,1,1,1,
|
|
67
|
+
1,1,1,2,1,2,3,2,48,8,2,1,2,1,2,1,2,1,2,3,2,54,8,2,1,2,1,2,3,2,58,8,2,
|
|
68
|
+
1,3,1,3,1,3,1,3,5,3,64,8,3,10,3,12,3,67,9,3,1,3,1,3,1,4,1,4,1,4,3,4,74,
|
|
69
|
+
8,4,1,5,1,5,3,5,78,8,5,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,6,1,
|
|
70
|
+
6,5,6,92,8,6,10,6,12,6,95,9,6,1,6,3,6,98,8,6,1,6,1,6,1,6,1,6,1,6,1,6,
|
|
71
|
+
1,6,1,6,1,6,1,6,5,6,110,8,6,10,6,12,6,113,9,6,1,6,3,6,116,8,6,1,6,1,6,
|
|
72
|
+
3,6,120,8,6,1,7,1,7,1,7,1,7,3,7,126,8,7,1,8,1,8,1,8,1,8,3,8,132,8,8,1,
|
|
73
|
+
9,1,9,1,9,1,9,3,9,138,8,9,1,10,1,10,1,10,1,10,3,10,144,8,10,1,11,1,11,
|
|
74
|
+
1,11,1,11,1,11,1,11,3,11,152,8,11,1,12,1,12,1,12,5,12,157,8,12,10,12,
|
|
75
|
+
12,12,160,9,12,1,12,3,12,163,8,12,1,12,1,12,1,12,3,12,168,8,12,1,13,1,
|
|
76
|
+
13,3,13,172,8,13,1,14,1,14,1,14,1,14,1,14,0,0,15,0,2,4,6,8,10,12,14,16,
|
|
77
|
+
18,20,22,24,26,28,0,0,189,0,33,1,0,0,0,2,39,1,0,0,0,4,45,1,0,0,0,6,59,
|
|
78
|
+
1,0,0,0,8,73,1,0,0,0,10,77,1,0,0,0,12,119,1,0,0,0,14,125,1,0,0,0,16,131,
|
|
79
|
+
1,0,0,0,18,137,1,0,0,0,20,139,1,0,0,0,22,151,1,0,0,0,24,167,1,0,0,0,26,
|
|
80
|
+
171,1,0,0,0,28,173,1,0,0,0,30,32,3,2,1,0,31,30,1,0,0,0,32,35,1,0,0,0,
|
|
81
|
+
33,31,1,0,0,0,33,34,1,0,0,0,34,37,1,0,0,0,35,33,1,0,0,0,36,38,3,4,2,0,
|
|
82
|
+
37,36,1,0,0,0,37,38,1,0,0,0,38,1,1,0,0,0,39,40,5,4,0,0,40,41,5,15,0,0,
|
|
83
|
+
41,42,5,23,0,0,42,43,3,8,4,0,43,44,5,22,0,0,44,3,1,0,0,0,45,47,5,13,0,
|
|
84
|
+
0,46,48,5,15,0,0,47,46,1,0,0,0,47,48,1,0,0,0,48,49,1,0,0,0,49,53,5,21,
|
|
85
|
+
0,0,50,51,3,22,11,0,51,52,5,20,0,0,52,54,1,0,0,0,53,50,1,0,0,0,53,54,
|
|
86
|
+
1,0,0,0,54,57,1,0,0,0,55,58,3,6,3,0,56,58,5,15,0,0,57,55,1,0,0,0,57,56,
|
|
87
|
+
1,0,0,0,58,5,1,0,0,0,59,65,5,18,0,0,60,61,3,28,14,0,61,62,5,22,0,0,62,
|
|
88
|
+
64,1,0,0,0,63,60,1,0,0,0,64,67,1,0,0,0,65,63,1,0,0,0,65,66,1,0,0,0,66,
|
|
89
|
+
68,1,0,0,0,67,65,1,0,0,0,68,69,5,19,0,0,69,7,1,0,0,0,70,74,5,15,0,0,71,
|
|
90
|
+
74,5,7,0,0,72,74,3,10,5,0,73,70,1,0,0,0,73,71,1,0,0,0,73,72,1,0,0,0,74,
|
|
91
|
+
9,1,0,0,0,75,78,3,12,6,0,76,78,3,18,9,0,77,75,1,0,0,0,77,76,1,0,0,0,78,
|
|
92
|
+
11,1,0,0,0,79,80,5,9,0,0,80,120,3,8,4,0,81,82,5,10,0,0,82,120,3,8,4,0,
|
|
93
|
+
83,84,5,11,0,0,84,85,5,18,0,0,85,120,5,19,0,0,86,87,5,11,0,0,87,88,5,
|
|
94
|
+
18,0,0,88,93,3,14,7,0,89,90,5,22,0,0,90,92,3,14,7,0,91,89,1,0,0,0,92,
|
|
95
|
+
95,1,0,0,0,93,91,1,0,0,0,93,94,1,0,0,0,94,97,1,0,0,0,95,93,1,0,0,0,96,
|
|
96
|
+
98,5,22,0,0,97,96,1,0,0,0,97,98,1,0,0,0,98,99,1,0,0,0,99,100,5,19,0,0,
|
|
97
|
+
100,120,1,0,0,0,101,102,5,12,0,0,102,103,5,18,0,0,103,120,5,19,0,0,104,
|
|
98
|
+
105,5,12,0,0,105,106,5,18,0,0,106,111,3,16,8,0,107,108,5,22,0,0,108,110,
|
|
99
|
+
3,16,8,0,109,107,1,0,0,0,110,113,1,0,0,0,111,109,1,0,0,0,111,112,1,0,
|
|
100
|
+
0,0,112,115,1,0,0,0,113,111,1,0,0,0,114,116,5,22,0,0,115,114,1,0,0,0,
|
|
101
|
+
115,116,1,0,0,0,116,117,1,0,0,0,117,118,5,19,0,0,118,120,1,0,0,0,119,
|
|
102
|
+
79,1,0,0,0,119,81,1,0,0,0,119,83,1,0,0,0,119,86,1,0,0,0,119,101,1,0,0,
|
|
103
|
+
0,119,104,1,0,0,0,120,13,1,0,0,0,121,122,5,15,0,0,122,123,5,21,0,0,123,
|
|
104
|
+
126,3,8,4,0,124,126,3,8,4,0,125,121,1,0,0,0,125,124,1,0,0,0,126,15,1,
|
|
105
|
+
0,0,0,127,128,5,15,0,0,128,129,5,21,0,0,129,132,3,8,4,0,130,132,5,15,
|
|
106
|
+
0,0,131,127,1,0,0,0,131,130,1,0,0,0,132,17,1,0,0,0,133,134,5,14,0,0,134,
|
|
107
|
+
138,3,20,10,0,135,136,5,13,0,0,136,138,3,6,3,0,137,133,1,0,0,0,137,135,
|
|
108
|
+
1,0,0,0,138,19,1,0,0,0,139,140,3,22,11,0,140,141,5,20,0,0,141,143,3,22,
|
|
109
|
+
11,0,142,144,3,26,13,0,143,142,1,0,0,0,143,144,1,0,0,0,144,21,1,0,0,0,
|
|
110
|
+
145,146,5,16,0,0,146,152,5,17,0,0,147,148,5,16,0,0,148,149,3,24,12,0,
|
|
111
|
+
149,150,5,17,0,0,150,152,1,0,0,0,151,145,1,0,0,0,151,147,1,0,0,0,152,
|
|
112
|
+
23,1,0,0,0,153,158,3,8,4,0,154,155,5,24,0,0,155,157,3,8,4,0,156,154,1,
|
|
113
|
+
0,0,0,157,160,1,0,0,0,158,156,1,0,0,0,158,159,1,0,0,0,159,162,1,0,0,0,
|
|
114
|
+
160,158,1,0,0,0,161,163,5,24,0,0,162,161,1,0,0,0,162,163,1,0,0,0,163,
|
|
115
|
+
168,1,0,0,0,164,165,5,15,0,0,165,166,5,21,0,0,166,168,3,8,4,0,167,153,
|
|
116
|
+
1,0,0,0,167,164,1,0,0,0,168,25,1,0,0,0,169,172,5,5,0,0,170,172,5,6,0,
|
|
117
|
+
0,171,169,1,0,0,0,171,170,1,0,0,0,172,27,1,0,0,0,173,174,5,15,0,0,174,
|
|
118
|
+
175,5,21,0,0,175,176,3,20,10,0,176,29,1,0,0,0,22,33,37,47,53,57,65,73,
|
|
119
|
+
77,93,97,111,115,119,125,131,137,143,151,158,162,167,171
|
|
120
|
+
};
|
|
121
|
+
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
|
|
122
|
+
|
|
123
|
+
antlr4::atn::ATNDeserializer deserializer;
|
|
124
|
+
staticData->atn = deserializer.deserialize(staticData->serializedATN);
|
|
125
|
+
|
|
126
|
+
const size_t count = staticData->atn->getNumberOfDecisions();
|
|
127
|
+
staticData->decisionToDFA.reserve(count);
|
|
128
|
+
for (size_t i = 0; i < count; i++) {
|
|
129
|
+
staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
|
|
130
|
+
}
|
|
131
|
+
didparserParserStaticData = staticData.release();
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
DIDParser::DIDParser(TokenStream *input) : DIDParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}
|
|
137
|
+
|
|
138
|
+
DIDParser::DIDParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
|
|
139
|
+
DIDParser::initialize();
|
|
140
|
+
_interpreter = new atn::ParserATNSimulator(this, *didparserParserStaticData->atn, didparserParserStaticData->decisionToDFA, didparserParserStaticData->sharedContextCache, options);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
DIDParser::~DIDParser() {
|
|
144
|
+
delete _interpreter;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const atn::ATN& DIDParser::getATN() const {
|
|
148
|
+
return *didparserParserStaticData->atn;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
std::string DIDParser::getGrammarFileName() const {
|
|
152
|
+
return "DIDParser.g4";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
const std::vector<std::string>& DIDParser::getRuleNames() const {
|
|
156
|
+
return didparserParserStaticData->ruleNames;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
const dfa::Vocabulary& DIDParser::getVocabulary() const {
|
|
160
|
+
return didparserParserStaticData->vocabulary;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
antlr4::atn::SerializedATNView DIDParser::getSerializedATN() const {
|
|
164
|
+
return didparserParserStaticData->serializedATN;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
//----------------- ProgramContext ------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
DIDParser::ProgramContext::ProgramContext(ParserRuleContext *parent, size_t invokingState)
|
|
171
|
+
: ParserRuleContext(parent, invokingState) {
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
std::vector<DIDParser::DefinationContext *> DIDParser::ProgramContext::defination() {
|
|
175
|
+
return getRuleContexts<DIDParser::DefinationContext>();
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
DIDParser::DefinationContext* DIDParser::ProgramContext::defination(size_t i) {
|
|
179
|
+
return getRuleContext<DIDParser::DefinationContext>(i);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
DIDParser::ActorContext* DIDParser::ProgramContext::actor() {
|
|
183
|
+
return getRuleContext<DIDParser::ActorContext>(0);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
size_t DIDParser::ProgramContext::getRuleIndex() const {
|
|
188
|
+
return DIDParser::RuleProgram;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
void DIDParser::ProgramContext::enterRule(tree::ParseTreeListener *listener) {
|
|
192
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
193
|
+
if (parserListener != nullptr)
|
|
194
|
+
parserListener->enterProgram(this);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
void DIDParser::ProgramContext::exitRule(tree::ParseTreeListener *listener) {
|
|
198
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
199
|
+
if (parserListener != nullptr)
|
|
200
|
+
parserListener->exitProgram(this);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
std::any DIDParser::ProgramContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
205
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
206
|
+
return parserVisitor->visitProgram(this);
|
|
207
|
+
else
|
|
208
|
+
return visitor->visitChildren(this);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
DIDParser::ProgramContext* DIDParser::program() {
|
|
212
|
+
ProgramContext *_localctx = _tracker.createInstance<ProgramContext>(_ctx, getState());
|
|
213
|
+
enterRule(_localctx, 0, DIDParser::RuleProgram);
|
|
214
|
+
size_t _la = 0;
|
|
215
|
+
|
|
216
|
+
#if __cplusplus > 201703L
|
|
217
|
+
auto onExit = finally([=, this] {
|
|
218
|
+
#else
|
|
219
|
+
auto onExit = finally([=] {
|
|
220
|
+
#endif
|
|
221
|
+
exitRule();
|
|
222
|
+
});
|
|
223
|
+
try {
|
|
224
|
+
enterOuterAlt(_localctx, 1);
|
|
225
|
+
setState(33);
|
|
226
|
+
_errHandler->sync(this);
|
|
227
|
+
_la = _input->LA(1);
|
|
228
|
+
while (_la == DIDParser::Type) {
|
|
229
|
+
setState(30);
|
|
230
|
+
defination();
|
|
231
|
+
setState(35);
|
|
232
|
+
_errHandler->sync(this);
|
|
233
|
+
_la = _input->LA(1);
|
|
234
|
+
}
|
|
235
|
+
setState(37);
|
|
236
|
+
_errHandler->sync(this);
|
|
237
|
+
|
|
238
|
+
_la = _input->LA(1);
|
|
239
|
+
if (_la == DIDParser::Service) {
|
|
240
|
+
setState(36);
|
|
241
|
+
actor();
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
}
|
|
245
|
+
catch (RecognitionException &e) {
|
|
246
|
+
_errHandler->reportError(this, e);
|
|
247
|
+
_localctx->exception = std::current_exception();
|
|
248
|
+
_errHandler->recover(this, _localctx->exception);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
return _localctx;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
//----------------- DefinationContext ------------------------------------------------------------------
|
|
255
|
+
|
|
256
|
+
DIDParser::DefinationContext::DefinationContext(ParserRuleContext *parent, size_t invokingState)
|
|
257
|
+
: ParserRuleContext(parent, invokingState) {
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
tree::TerminalNode* DIDParser::DefinationContext::Type() {
|
|
261
|
+
return getToken(DIDParser::Type, 0);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
tree::TerminalNode* DIDParser::DefinationContext::Name() {
|
|
265
|
+
return getToken(DIDParser::Name, 0);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
tree::TerminalNode* DIDParser::DefinationContext::Eq() {
|
|
269
|
+
return getToken(DIDParser::Eq, 0);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
DIDParser::DatatypeContext* DIDParser::DefinationContext::datatype() {
|
|
273
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
tree::TerminalNode* DIDParser::DefinationContext::Semicolon() {
|
|
277
|
+
return getToken(DIDParser::Semicolon, 0);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
|
|
281
|
+
size_t DIDParser::DefinationContext::getRuleIndex() const {
|
|
282
|
+
return DIDParser::RuleDefination;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
void DIDParser::DefinationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
286
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
287
|
+
if (parserListener != nullptr)
|
|
288
|
+
parserListener->enterDefination(this);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
void DIDParser::DefinationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
292
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
293
|
+
if (parserListener != nullptr)
|
|
294
|
+
parserListener->exitDefination(this);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
|
|
298
|
+
std::any DIDParser::DefinationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
299
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
300
|
+
return parserVisitor->visitDefination(this);
|
|
301
|
+
else
|
|
302
|
+
return visitor->visitChildren(this);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
DIDParser::DefinationContext* DIDParser::defination() {
|
|
306
|
+
DefinationContext *_localctx = _tracker.createInstance<DefinationContext>(_ctx, getState());
|
|
307
|
+
enterRule(_localctx, 2, DIDParser::RuleDefination);
|
|
308
|
+
|
|
309
|
+
#if __cplusplus > 201703L
|
|
310
|
+
auto onExit = finally([=, this] {
|
|
311
|
+
#else
|
|
312
|
+
auto onExit = finally([=] {
|
|
313
|
+
#endif
|
|
314
|
+
exitRule();
|
|
315
|
+
});
|
|
316
|
+
try {
|
|
317
|
+
enterOuterAlt(_localctx, 1);
|
|
318
|
+
setState(39);
|
|
319
|
+
match(DIDParser::Type);
|
|
320
|
+
setState(40);
|
|
321
|
+
match(DIDParser::Name);
|
|
322
|
+
setState(41);
|
|
323
|
+
match(DIDParser::Eq);
|
|
324
|
+
setState(42);
|
|
325
|
+
datatype();
|
|
326
|
+
setState(43);
|
|
327
|
+
match(DIDParser::Semicolon);
|
|
328
|
+
|
|
329
|
+
}
|
|
330
|
+
catch (RecognitionException &e) {
|
|
331
|
+
_errHandler->reportError(this, e);
|
|
332
|
+
_localctx->exception = std::current_exception();
|
|
333
|
+
_errHandler->recover(this, _localctx->exception);
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
return _localctx;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
//----------------- ActorContext ------------------------------------------------------------------
|
|
340
|
+
|
|
341
|
+
DIDParser::ActorContext::ActorContext(ParserRuleContext *parent, size_t invokingState)
|
|
342
|
+
: ParserRuleContext(parent, invokingState) {
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
tree::TerminalNode* DIDParser::ActorContext::Service() {
|
|
346
|
+
return getToken(DIDParser::Service, 0);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
tree::TerminalNode* DIDParser::ActorContext::Colon() {
|
|
350
|
+
return getToken(DIDParser::Colon, 0);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
DIDParser::ActortypeContext* DIDParser::ActorContext::actortype() {
|
|
354
|
+
return getRuleContext<DIDParser::ActortypeContext>(0);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
std::vector<tree::TerminalNode *> DIDParser::ActorContext::Name() {
|
|
358
|
+
return getTokens(DIDParser::Name);
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
tree::TerminalNode* DIDParser::ActorContext::Name(size_t i) {
|
|
362
|
+
return getToken(DIDParser::Name, i);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
DIDParser::TuptypeContext* DIDParser::ActorContext::tuptype() {
|
|
366
|
+
return getRuleContext<DIDParser::TuptypeContext>(0);
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
tree::TerminalNode* DIDParser::ActorContext::Arrow() {
|
|
370
|
+
return getToken(DIDParser::Arrow, 0);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
size_t DIDParser::ActorContext::getRuleIndex() const {
|
|
375
|
+
return DIDParser::RuleActor;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
void DIDParser::ActorContext::enterRule(tree::ParseTreeListener *listener) {
|
|
379
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
380
|
+
if (parserListener != nullptr)
|
|
381
|
+
parserListener->enterActor(this);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
void DIDParser::ActorContext::exitRule(tree::ParseTreeListener *listener) {
|
|
385
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
386
|
+
if (parserListener != nullptr)
|
|
387
|
+
parserListener->exitActor(this);
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
|
|
391
|
+
std::any DIDParser::ActorContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
392
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
393
|
+
return parserVisitor->visitActor(this);
|
|
394
|
+
else
|
|
395
|
+
return visitor->visitChildren(this);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
DIDParser::ActorContext* DIDParser::actor() {
|
|
399
|
+
ActorContext *_localctx = _tracker.createInstance<ActorContext>(_ctx, getState());
|
|
400
|
+
enterRule(_localctx, 4, DIDParser::RuleActor);
|
|
401
|
+
size_t _la = 0;
|
|
402
|
+
|
|
403
|
+
#if __cplusplus > 201703L
|
|
404
|
+
auto onExit = finally([=, this] {
|
|
405
|
+
#else
|
|
406
|
+
auto onExit = finally([=] {
|
|
407
|
+
#endif
|
|
408
|
+
exitRule();
|
|
409
|
+
});
|
|
410
|
+
try {
|
|
411
|
+
enterOuterAlt(_localctx, 1);
|
|
412
|
+
setState(45);
|
|
413
|
+
match(DIDParser::Service);
|
|
414
|
+
setState(47);
|
|
415
|
+
_errHandler->sync(this);
|
|
416
|
+
|
|
417
|
+
_la = _input->LA(1);
|
|
418
|
+
if (_la == DIDParser::Name) {
|
|
419
|
+
setState(46);
|
|
420
|
+
match(DIDParser::Name);
|
|
421
|
+
}
|
|
422
|
+
setState(49);
|
|
423
|
+
match(DIDParser::Colon);
|
|
424
|
+
setState(53);
|
|
425
|
+
_errHandler->sync(this);
|
|
426
|
+
|
|
427
|
+
_la = _input->LA(1);
|
|
428
|
+
if (_la == DIDParser::LeftP) {
|
|
429
|
+
setState(50);
|
|
430
|
+
tuptype();
|
|
431
|
+
setState(51);
|
|
432
|
+
match(DIDParser::Arrow);
|
|
433
|
+
}
|
|
434
|
+
setState(57);
|
|
435
|
+
_errHandler->sync(this);
|
|
436
|
+
switch (_input->LA(1)) {
|
|
437
|
+
case DIDParser::LeftB: {
|
|
438
|
+
setState(55);
|
|
439
|
+
actortype();
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
case DIDParser::Name: {
|
|
444
|
+
setState(56);
|
|
445
|
+
match(DIDParser::Name);
|
|
446
|
+
break;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
default:
|
|
450
|
+
throw NoViableAltException(this);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
}
|
|
454
|
+
catch (RecognitionException &e) {
|
|
455
|
+
_errHandler->reportError(this, e);
|
|
456
|
+
_localctx->exception = std::current_exception();
|
|
457
|
+
_errHandler->recover(this, _localctx->exception);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
return _localctx;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
//----------------- ActortypeContext ------------------------------------------------------------------
|
|
464
|
+
|
|
465
|
+
DIDParser::ActortypeContext::ActortypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
466
|
+
: ParserRuleContext(parent, invokingState) {
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
tree::TerminalNode* DIDParser::ActortypeContext::LeftB() {
|
|
470
|
+
return getToken(DIDParser::LeftB, 0);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
tree::TerminalNode* DIDParser::ActortypeContext::RightB() {
|
|
474
|
+
return getToken(DIDParser::RightB, 0);
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
std::vector<DIDParser::MethodtypeContext *> DIDParser::ActortypeContext::methodtype() {
|
|
478
|
+
return getRuleContexts<DIDParser::MethodtypeContext>();
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
DIDParser::MethodtypeContext* DIDParser::ActortypeContext::methodtype(size_t i) {
|
|
482
|
+
return getRuleContext<DIDParser::MethodtypeContext>(i);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
std::vector<tree::TerminalNode *> DIDParser::ActortypeContext::Semicolon() {
|
|
486
|
+
return getTokens(DIDParser::Semicolon);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
tree::TerminalNode* DIDParser::ActortypeContext::Semicolon(size_t i) {
|
|
490
|
+
return getToken(DIDParser::Semicolon, i);
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
size_t DIDParser::ActortypeContext::getRuleIndex() const {
|
|
495
|
+
return DIDParser::RuleActortype;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
void DIDParser::ActortypeContext::enterRule(tree::ParseTreeListener *listener) {
|
|
499
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
500
|
+
if (parserListener != nullptr)
|
|
501
|
+
parserListener->enterActortype(this);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
void DIDParser::ActortypeContext::exitRule(tree::ParseTreeListener *listener) {
|
|
505
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
506
|
+
if (parserListener != nullptr)
|
|
507
|
+
parserListener->exitActortype(this);
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
|
|
511
|
+
std::any DIDParser::ActortypeContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
512
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
513
|
+
return parserVisitor->visitActortype(this);
|
|
514
|
+
else
|
|
515
|
+
return visitor->visitChildren(this);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
DIDParser::ActortypeContext* DIDParser::actortype() {
|
|
519
|
+
ActortypeContext *_localctx = _tracker.createInstance<ActortypeContext>(_ctx, getState());
|
|
520
|
+
enterRule(_localctx, 6, DIDParser::RuleActortype);
|
|
521
|
+
size_t _la = 0;
|
|
522
|
+
|
|
523
|
+
#if __cplusplus > 201703L
|
|
524
|
+
auto onExit = finally([=, this] {
|
|
525
|
+
#else
|
|
526
|
+
auto onExit = finally([=] {
|
|
527
|
+
#endif
|
|
528
|
+
exitRule();
|
|
529
|
+
});
|
|
530
|
+
try {
|
|
531
|
+
enterOuterAlt(_localctx, 1);
|
|
532
|
+
setState(59);
|
|
533
|
+
match(DIDParser::LeftB);
|
|
534
|
+
setState(65);
|
|
535
|
+
_errHandler->sync(this);
|
|
536
|
+
_la = _input->LA(1);
|
|
537
|
+
while (_la == DIDParser::Name) {
|
|
538
|
+
setState(60);
|
|
539
|
+
methodtype();
|
|
540
|
+
setState(61);
|
|
541
|
+
match(DIDParser::Semicolon);
|
|
542
|
+
setState(67);
|
|
543
|
+
_errHandler->sync(this);
|
|
544
|
+
_la = _input->LA(1);
|
|
545
|
+
}
|
|
546
|
+
setState(68);
|
|
547
|
+
match(DIDParser::RightB);
|
|
548
|
+
|
|
549
|
+
}
|
|
550
|
+
catch (RecognitionException &e) {
|
|
551
|
+
_errHandler->reportError(this, e);
|
|
552
|
+
_localctx->exception = std::current_exception();
|
|
553
|
+
_errHandler->recover(this, _localctx->exception);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
return _localctx;
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
//----------------- DatatypeContext ------------------------------------------------------------------
|
|
560
|
+
|
|
561
|
+
DIDParser::DatatypeContext::DatatypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
562
|
+
: ParserRuleContext(parent, invokingState) {
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
|
|
566
|
+
size_t DIDParser::DatatypeContext::getRuleIndex() const {
|
|
567
|
+
return DIDParser::RuleDatatype;
|
|
568
|
+
}
|
|
569
|
+
|
|
570
|
+
void DIDParser::DatatypeContext::copyFrom(DatatypeContext *ctx) {
|
|
571
|
+
ParserRuleContext::copyFrom(ctx);
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
//----------------- PrimitiveContext ------------------------------------------------------------------
|
|
575
|
+
|
|
576
|
+
tree::TerminalNode* DIDParser::PrimitiveContext::PrimType() {
|
|
577
|
+
return getToken(DIDParser::PrimType, 0);
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
DIDParser::PrimitiveContext::PrimitiveContext(DatatypeContext *ctx) { copyFrom(ctx); }
|
|
581
|
+
|
|
582
|
+
void DIDParser::PrimitiveContext::enterRule(tree::ParseTreeListener *listener) {
|
|
583
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
584
|
+
if (parserListener != nullptr)
|
|
585
|
+
parserListener->enterPrimitive(this);
|
|
586
|
+
}
|
|
587
|
+
void DIDParser::PrimitiveContext::exitRule(tree::ParseTreeListener *listener) {
|
|
588
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
589
|
+
if (parserListener != nullptr)
|
|
590
|
+
parserListener->exitPrimitive(this);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
std::any DIDParser::PrimitiveContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
594
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
595
|
+
return parserVisitor->visitPrimitive(this);
|
|
596
|
+
else
|
|
597
|
+
return visitor->visitChildren(this);
|
|
598
|
+
}
|
|
599
|
+
//----------------- ComponentContext ------------------------------------------------------------------
|
|
600
|
+
|
|
601
|
+
DIDParser::ComptypeContext* DIDParser::ComponentContext::comptype() {
|
|
602
|
+
return getRuleContext<DIDParser::ComptypeContext>(0);
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
DIDParser::ComponentContext::ComponentContext(DatatypeContext *ctx) { copyFrom(ctx); }
|
|
606
|
+
|
|
607
|
+
void DIDParser::ComponentContext::enterRule(tree::ParseTreeListener *listener) {
|
|
608
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
609
|
+
if (parserListener != nullptr)
|
|
610
|
+
parserListener->enterComponent(this);
|
|
611
|
+
}
|
|
612
|
+
void DIDParser::ComponentContext::exitRule(tree::ParseTreeListener *listener) {
|
|
613
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
614
|
+
if (parserListener != nullptr)
|
|
615
|
+
parserListener->exitComponent(this);
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
std::any DIDParser::ComponentContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
619
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
620
|
+
return parserVisitor->visitComponent(this);
|
|
621
|
+
else
|
|
622
|
+
return visitor->visitChildren(this);
|
|
623
|
+
}
|
|
624
|
+
//----------------- NameContext ------------------------------------------------------------------
|
|
625
|
+
|
|
626
|
+
tree::TerminalNode* DIDParser::NameContext::Name() {
|
|
627
|
+
return getToken(DIDParser::Name, 0);
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
DIDParser::NameContext::NameContext(DatatypeContext *ctx) { copyFrom(ctx); }
|
|
631
|
+
|
|
632
|
+
void DIDParser::NameContext::enterRule(tree::ParseTreeListener *listener) {
|
|
633
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
634
|
+
if (parserListener != nullptr)
|
|
635
|
+
parserListener->enterName(this);
|
|
636
|
+
}
|
|
637
|
+
void DIDParser::NameContext::exitRule(tree::ParseTreeListener *listener) {
|
|
638
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
639
|
+
if (parserListener != nullptr)
|
|
640
|
+
parserListener->exitName(this);
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
std::any DIDParser::NameContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
644
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
645
|
+
return parserVisitor->visitName(this);
|
|
646
|
+
else
|
|
647
|
+
return visitor->visitChildren(this);
|
|
648
|
+
}
|
|
649
|
+
DIDParser::DatatypeContext* DIDParser::datatype() {
|
|
650
|
+
DatatypeContext *_localctx = _tracker.createInstance<DatatypeContext>(_ctx, getState());
|
|
651
|
+
enterRule(_localctx, 8, DIDParser::RuleDatatype);
|
|
652
|
+
|
|
653
|
+
#if __cplusplus > 201703L
|
|
654
|
+
auto onExit = finally([=, this] {
|
|
655
|
+
#else
|
|
656
|
+
auto onExit = finally([=] {
|
|
657
|
+
#endif
|
|
658
|
+
exitRule();
|
|
659
|
+
});
|
|
660
|
+
try {
|
|
661
|
+
setState(73);
|
|
662
|
+
_errHandler->sync(this);
|
|
663
|
+
switch (_input->LA(1)) {
|
|
664
|
+
case DIDParser::Name: {
|
|
665
|
+
_localctx = _tracker.createInstance<DIDParser::NameContext>(_localctx);
|
|
666
|
+
enterOuterAlt(_localctx, 1);
|
|
667
|
+
setState(70);
|
|
668
|
+
match(DIDParser::Name);
|
|
669
|
+
break;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
case DIDParser::PrimType: {
|
|
673
|
+
_localctx = _tracker.createInstance<DIDParser::PrimitiveContext>(_localctx);
|
|
674
|
+
enterOuterAlt(_localctx, 2);
|
|
675
|
+
setState(71);
|
|
676
|
+
match(DIDParser::PrimType);
|
|
677
|
+
break;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
case DIDParser::OPT:
|
|
681
|
+
case DIDParser::VEC:
|
|
682
|
+
case DIDParser::RECORD:
|
|
683
|
+
case DIDParser::VARIANT:
|
|
684
|
+
case DIDParser::Service:
|
|
685
|
+
case DIDParser::FUNC: {
|
|
686
|
+
_localctx = _tracker.createInstance<DIDParser::ComponentContext>(_localctx);
|
|
687
|
+
enterOuterAlt(_localctx, 3);
|
|
688
|
+
setState(72);
|
|
689
|
+
comptype();
|
|
690
|
+
break;
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
default:
|
|
694
|
+
throw NoViableAltException(this);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
}
|
|
698
|
+
catch (RecognitionException &e) {
|
|
699
|
+
_errHandler->reportError(this, e);
|
|
700
|
+
_localctx->exception = std::current_exception();
|
|
701
|
+
_errHandler->recover(this, _localctx->exception);
|
|
702
|
+
}
|
|
703
|
+
|
|
704
|
+
return _localctx;
|
|
705
|
+
}
|
|
706
|
+
|
|
707
|
+
//----------------- ComptypeContext ------------------------------------------------------------------
|
|
708
|
+
|
|
709
|
+
DIDParser::ComptypeContext::ComptypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
710
|
+
: ParserRuleContext(parent, invokingState) {
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
DIDParser::ConstypeContext* DIDParser::ComptypeContext::constype() {
|
|
714
|
+
return getRuleContext<DIDParser::ConstypeContext>(0);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
DIDParser::ReftypeContext* DIDParser::ComptypeContext::reftype() {
|
|
718
|
+
return getRuleContext<DIDParser::ReftypeContext>(0);
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
size_t DIDParser::ComptypeContext::getRuleIndex() const {
|
|
723
|
+
return DIDParser::RuleComptype;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
void DIDParser::ComptypeContext::enterRule(tree::ParseTreeListener *listener) {
|
|
727
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
728
|
+
if (parserListener != nullptr)
|
|
729
|
+
parserListener->enterComptype(this);
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
void DIDParser::ComptypeContext::exitRule(tree::ParseTreeListener *listener) {
|
|
733
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
734
|
+
if (parserListener != nullptr)
|
|
735
|
+
parserListener->exitComptype(this);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
std::any DIDParser::ComptypeContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
740
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
741
|
+
return parserVisitor->visitComptype(this);
|
|
742
|
+
else
|
|
743
|
+
return visitor->visitChildren(this);
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
DIDParser::ComptypeContext* DIDParser::comptype() {
|
|
747
|
+
ComptypeContext *_localctx = _tracker.createInstance<ComptypeContext>(_ctx, getState());
|
|
748
|
+
enterRule(_localctx, 10, DIDParser::RuleComptype);
|
|
749
|
+
|
|
750
|
+
#if __cplusplus > 201703L
|
|
751
|
+
auto onExit = finally([=, this] {
|
|
752
|
+
#else
|
|
753
|
+
auto onExit = finally([=] {
|
|
754
|
+
#endif
|
|
755
|
+
exitRule();
|
|
756
|
+
});
|
|
757
|
+
try {
|
|
758
|
+
setState(77);
|
|
759
|
+
_errHandler->sync(this);
|
|
760
|
+
switch (_input->LA(1)) {
|
|
761
|
+
case DIDParser::OPT:
|
|
762
|
+
case DIDParser::VEC:
|
|
763
|
+
case DIDParser::RECORD:
|
|
764
|
+
case DIDParser::VARIANT: {
|
|
765
|
+
enterOuterAlt(_localctx, 1);
|
|
766
|
+
setState(75);
|
|
767
|
+
constype();
|
|
768
|
+
break;
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
case DIDParser::Service:
|
|
772
|
+
case DIDParser::FUNC: {
|
|
773
|
+
enterOuterAlt(_localctx, 2);
|
|
774
|
+
setState(76);
|
|
775
|
+
reftype();
|
|
776
|
+
break;
|
|
777
|
+
}
|
|
778
|
+
|
|
779
|
+
default:
|
|
780
|
+
throw NoViableAltException(this);
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
}
|
|
784
|
+
catch (RecognitionException &e) {
|
|
785
|
+
_errHandler->reportError(this, e);
|
|
786
|
+
_localctx->exception = std::current_exception();
|
|
787
|
+
_errHandler->recover(this, _localctx->exception);
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
return _localctx;
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
//----------------- ConstypeContext ------------------------------------------------------------------
|
|
794
|
+
|
|
795
|
+
DIDParser::ConstypeContext::ConstypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
796
|
+
: ParserRuleContext(parent, invokingState) {
|
|
797
|
+
}
|
|
798
|
+
|
|
799
|
+
|
|
800
|
+
size_t DIDParser::ConstypeContext::getRuleIndex() const {
|
|
801
|
+
return DIDParser::RuleConstype;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
void DIDParser::ConstypeContext::copyFrom(ConstypeContext *ctx) {
|
|
805
|
+
ParserRuleContext::copyFrom(ctx);
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
//----------------- VariantContext ------------------------------------------------------------------
|
|
809
|
+
|
|
810
|
+
tree::TerminalNode* DIDParser::VariantContext::VARIANT() {
|
|
811
|
+
return getToken(DIDParser::VARIANT, 0);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
tree::TerminalNode* DIDParser::VariantContext::LeftB() {
|
|
815
|
+
return getToken(DIDParser::LeftB, 0);
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
std::vector<DIDParser::VariantfieldContext *> DIDParser::VariantContext::variantfield() {
|
|
819
|
+
return getRuleContexts<DIDParser::VariantfieldContext>();
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
DIDParser::VariantfieldContext* DIDParser::VariantContext::variantfield(size_t i) {
|
|
823
|
+
return getRuleContext<DIDParser::VariantfieldContext>(i);
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
tree::TerminalNode* DIDParser::VariantContext::RightB() {
|
|
827
|
+
return getToken(DIDParser::RightB, 0);
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
std::vector<tree::TerminalNode *> DIDParser::VariantContext::Semicolon() {
|
|
831
|
+
return getTokens(DIDParser::Semicolon);
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
tree::TerminalNode* DIDParser::VariantContext::Semicolon(size_t i) {
|
|
835
|
+
return getToken(DIDParser::Semicolon, i);
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
DIDParser::VariantContext::VariantContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
839
|
+
|
|
840
|
+
void DIDParser::VariantContext::enterRule(tree::ParseTreeListener *listener) {
|
|
841
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
842
|
+
if (parserListener != nullptr)
|
|
843
|
+
parserListener->enterVariant(this);
|
|
844
|
+
}
|
|
845
|
+
void DIDParser::VariantContext::exitRule(tree::ParseTreeListener *listener) {
|
|
846
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
847
|
+
if (parserListener != nullptr)
|
|
848
|
+
parserListener->exitVariant(this);
|
|
849
|
+
}
|
|
850
|
+
|
|
851
|
+
std::any DIDParser::VariantContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
852
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
853
|
+
return parserVisitor->visitVariant(this);
|
|
854
|
+
else
|
|
855
|
+
return visitor->visitChildren(this);
|
|
856
|
+
}
|
|
857
|
+
//----------------- EmptyRecordContext ------------------------------------------------------------------
|
|
858
|
+
|
|
859
|
+
tree::TerminalNode* DIDParser::EmptyRecordContext::RECORD() {
|
|
860
|
+
return getToken(DIDParser::RECORD, 0);
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
tree::TerminalNode* DIDParser::EmptyRecordContext::LeftB() {
|
|
864
|
+
return getToken(DIDParser::LeftB, 0);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
tree::TerminalNode* DIDParser::EmptyRecordContext::RightB() {
|
|
868
|
+
return getToken(DIDParser::RightB, 0);
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
DIDParser::EmptyRecordContext::EmptyRecordContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
872
|
+
|
|
873
|
+
void DIDParser::EmptyRecordContext::enterRule(tree::ParseTreeListener *listener) {
|
|
874
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
875
|
+
if (parserListener != nullptr)
|
|
876
|
+
parserListener->enterEmptyRecord(this);
|
|
877
|
+
}
|
|
878
|
+
void DIDParser::EmptyRecordContext::exitRule(tree::ParseTreeListener *listener) {
|
|
879
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
880
|
+
if (parserListener != nullptr)
|
|
881
|
+
parserListener->exitEmptyRecord(this);
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
std::any DIDParser::EmptyRecordContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
885
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
886
|
+
return parserVisitor->visitEmptyRecord(this);
|
|
887
|
+
else
|
|
888
|
+
return visitor->visitChildren(this);
|
|
889
|
+
}
|
|
890
|
+
//----------------- EmptyVariantContext ------------------------------------------------------------------
|
|
891
|
+
|
|
892
|
+
tree::TerminalNode* DIDParser::EmptyVariantContext::VARIANT() {
|
|
893
|
+
return getToken(DIDParser::VARIANT, 0);
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
tree::TerminalNode* DIDParser::EmptyVariantContext::LeftB() {
|
|
897
|
+
return getToken(DIDParser::LeftB, 0);
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
tree::TerminalNode* DIDParser::EmptyVariantContext::RightB() {
|
|
901
|
+
return getToken(DIDParser::RightB, 0);
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
DIDParser::EmptyVariantContext::EmptyVariantContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
905
|
+
|
|
906
|
+
void DIDParser::EmptyVariantContext::enterRule(tree::ParseTreeListener *listener) {
|
|
907
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
908
|
+
if (parserListener != nullptr)
|
|
909
|
+
parserListener->enterEmptyVariant(this);
|
|
910
|
+
}
|
|
911
|
+
void DIDParser::EmptyVariantContext::exitRule(tree::ParseTreeListener *listener) {
|
|
912
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
913
|
+
if (parserListener != nullptr)
|
|
914
|
+
parserListener->exitEmptyVariant(this);
|
|
915
|
+
}
|
|
916
|
+
|
|
917
|
+
std::any DIDParser::EmptyVariantContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
918
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
919
|
+
return parserVisitor->visitEmptyVariant(this);
|
|
920
|
+
else
|
|
921
|
+
return visitor->visitChildren(this);
|
|
922
|
+
}
|
|
923
|
+
//----------------- OptionContext ------------------------------------------------------------------
|
|
924
|
+
|
|
925
|
+
tree::TerminalNode* DIDParser::OptionContext::OPT() {
|
|
926
|
+
return getToken(DIDParser::OPT, 0);
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
DIDParser::DatatypeContext* DIDParser::OptionContext::datatype() {
|
|
930
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
931
|
+
}
|
|
932
|
+
|
|
933
|
+
DIDParser::OptionContext::OptionContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
934
|
+
|
|
935
|
+
void DIDParser::OptionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
936
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
937
|
+
if (parserListener != nullptr)
|
|
938
|
+
parserListener->enterOption(this);
|
|
939
|
+
}
|
|
940
|
+
void DIDParser::OptionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
941
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
942
|
+
if (parserListener != nullptr)
|
|
943
|
+
parserListener->exitOption(this);
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
std::any DIDParser::OptionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
947
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
948
|
+
return parserVisitor->visitOption(this);
|
|
949
|
+
else
|
|
950
|
+
return visitor->visitChildren(this);
|
|
951
|
+
}
|
|
952
|
+
//----------------- RecordContext ------------------------------------------------------------------
|
|
953
|
+
|
|
954
|
+
tree::TerminalNode* DIDParser::RecordContext::RECORD() {
|
|
955
|
+
return getToken(DIDParser::RECORD, 0);
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
tree::TerminalNode* DIDParser::RecordContext::LeftB() {
|
|
959
|
+
return getToken(DIDParser::LeftB, 0);
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
std::vector<DIDParser::RecordfieldContext *> DIDParser::RecordContext::recordfield() {
|
|
963
|
+
return getRuleContexts<DIDParser::RecordfieldContext>();
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
DIDParser::RecordfieldContext* DIDParser::RecordContext::recordfield(size_t i) {
|
|
967
|
+
return getRuleContext<DIDParser::RecordfieldContext>(i);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
tree::TerminalNode* DIDParser::RecordContext::RightB() {
|
|
971
|
+
return getToken(DIDParser::RightB, 0);
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
std::vector<tree::TerminalNode *> DIDParser::RecordContext::Semicolon() {
|
|
975
|
+
return getTokens(DIDParser::Semicolon);
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
tree::TerminalNode* DIDParser::RecordContext::Semicolon(size_t i) {
|
|
979
|
+
return getToken(DIDParser::Semicolon, i);
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
DIDParser::RecordContext::RecordContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
983
|
+
|
|
984
|
+
void DIDParser::RecordContext::enterRule(tree::ParseTreeListener *listener) {
|
|
985
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
986
|
+
if (parserListener != nullptr)
|
|
987
|
+
parserListener->enterRecord(this);
|
|
988
|
+
}
|
|
989
|
+
void DIDParser::RecordContext::exitRule(tree::ParseTreeListener *listener) {
|
|
990
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
991
|
+
if (parserListener != nullptr)
|
|
992
|
+
parserListener->exitRecord(this);
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
std::any DIDParser::RecordContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
996
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
997
|
+
return parserVisitor->visitRecord(this);
|
|
998
|
+
else
|
|
999
|
+
return visitor->visitChildren(this);
|
|
1000
|
+
}
|
|
1001
|
+
//----------------- VectorContext ------------------------------------------------------------------
|
|
1002
|
+
|
|
1003
|
+
tree::TerminalNode* DIDParser::VectorContext::VEC() {
|
|
1004
|
+
return getToken(DIDParser::VEC, 0);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
DIDParser::DatatypeContext* DIDParser::VectorContext::datatype() {
|
|
1008
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
1009
|
+
}
|
|
1010
|
+
|
|
1011
|
+
DIDParser::VectorContext::VectorContext(ConstypeContext *ctx) { copyFrom(ctx); }
|
|
1012
|
+
|
|
1013
|
+
void DIDParser::VectorContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1014
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1015
|
+
if (parserListener != nullptr)
|
|
1016
|
+
parserListener->enterVector(this);
|
|
1017
|
+
}
|
|
1018
|
+
void DIDParser::VectorContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1019
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1020
|
+
if (parserListener != nullptr)
|
|
1021
|
+
parserListener->exitVector(this);
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
std::any DIDParser::VectorContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1025
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1026
|
+
return parserVisitor->visitVector(this);
|
|
1027
|
+
else
|
|
1028
|
+
return visitor->visitChildren(this);
|
|
1029
|
+
}
|
|
1030
|
+
DIDParser::ConstypeContext* DIDParser::constype() {
|
|
1031
|
+
ConstypeContext *_localctx = _tracker.createInstance<ConstypeContext>(_ctx, getState());
|
|
1032
|
+
enterRule(_localctx, 12, DIDParser::RuleConstype);
|
|
1033
|
+
size_t _la = 0;
|
|
1034
|
+
|
|
1035
|
+
#if __cplusplus > 201703L
|
|
1036
|
+
auto onExit = finally([=, this] {
|
|
1037
|
+
#else
|
|
1038
|
+
auto onExit = finally([=] {
|
|
1039
|
+
#endif
|
|
1040
|
+
exitRule();
|
|
1041
|
+
});
|
|
1042
|
+
try {
|
|
1043
|
+
size_t alt;
|
|
1044
|
+
setState(119);
|
|
1045
|
+
_errHandler->sync(this);
|
|
1046
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 12, _ctx)) {
|
|
1047
|
+
case 1: {
|
|
1048
|
+
_localctx = _tracker.createInstance<DIDParser::OptionContext>(_localctx);
|
|
1049
|
+
enterOuterAlt(_localctx, 1);
|
|
1050
|
+
setState(79);
|
|
1051
|
+
match(DIDParser::OPT);
|
|
1052
|
+
setState(80);
|
|
1053
|
+
datatype();
|
|
1054
|
+
break;
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
case 2: {
|
|
1058
|
+
_localctx = _tracker.createInstance<DIDParser::VectorContext>(_localctx);
|
|
1059
|
+
enterOuterAlt(_localctx, 2);
|
|
1060
|
+
setState(81);
|
|
1061
|
+
match(DIDParser::VEC);
|
|
1062
|
+
setState(82);
|
|
1063
|
+
datatype();
|
|
1064
|
+
break;
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
case 3: {
|
|
1068
|
+
_localctx = _tracker.createInstance<DIDParser::EmptyRecordContext>(_localctx);
|
|
1069
|
+
enterOuterAlt(_localctx, 3);
|
|
1070
|
+
setState(83);
|
|
1071
|
+
match(DIDParser::RECORD);
|
|
1072
|
+
setState(84);
|
|
1073
|
+
match(DIDParser::LeftB);
|
|
1074
|
+
setState(85);
|
|
1075
|
+
match(DIDParser::RightB);
|
|
1076
|
+
break;
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
case 4: {
|
|
1080
|
+
_localctx = _tracker.createInstance<DIDParser::RecordContext>(_localctx);
|
|
1081
|
+
enterOuterAlt(_localctx, 4);
|
|
1082
|
+
setState(86);
|
|
1083
|
+
match(DIDParser::RECORD);
|
|
1084
|
+
setState(87);
|
|
1085
|
+
match(DIDParser::LeftB);
|
|
1086
|
+
setState(88);
|
|
1087
|
+
recordfield();
|
|
1088
|
+
setState(93);
|
|
1089
|
+
_errHandler->sync(this);
|
|
1090
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
|
|
1091
|
+
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
|
|
1092
|
+
if (alt == 1) {
|
|
1093
|
+
setState(89);
|
|
1094
|
+
match(DIDParser::Semicolon);
|
|
1095
|
+
setState(90);
|
|
1096
|
+
recordfield();
|
|
1097
|
+
}
|
|
1098
|
+
setState(95);
|
|
1099
|
+
_errHandler->sync(this);
|
|
1100
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 8, _ctx);
|
|
1101
|
+
}
|
|
1102
|
+
setState(97);
|
|
1103
|
+
_errHandler->sync(this);
|
|
1104
|
+
|
|
1105
|
+
_la = _input->LA(1);
|
|
1106
|
+
if (_la == DIDParser::Semicolon) {
|
|
1107
|
+
setState(96);
|
|
1108
|
+
match(DIDParser::Semicolon);
|
|
1109
|
+
}
|
|
1110
|
+
setState(99);
|
|
1111
|
+
match(DIDParser::RightB);
|
|
1112
|
+
break;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
case 5: {
|
|
1116
|
+
_localctx = _tracker.createInstance<DIDParser::EmptyVariantContext>(_localctx);
|
|
1117
|
+
enterOuterAlt(_localctx, 5);
|
|
1118
|
+
setState(101);
|
|
1119
|
+
match(DIDParser::VARIANT);
|
|
1120
|
+
setState(102);
|
|
1121
|
+
match(DIDParser::LeftB);
|
|
1122
|
+
setState(103);
|
|
1123
|
+
match(DIDParser::RightB);
|
|
1124
|
+
break;
|
|
1125
|
+
}
|
|
1126
|
+
|
|
1127
|
+
case 6: {
|
|
1128
|
+
_localctx = _tracker.createInstance<DIDParser::VariantContext>(_localctx);
|
|
1129
|
+
enterOuterAlt(_localctx, 6);
|
|
1130
|
+
setState(104);
|
|
1131
|
+
match(DIDParser::VARIANT);
|
|
1132
|
+
setState(105);
|
|
1133
|
+
match(DIDParser::LeftB);
|
|
1134
|
+
setState(106);
|
|
1135
|
+
variantfield();
|
|
1136
|
+
setState(111);
|
|
1137
|
+
_errHandler->sync(this);
|
|
1138
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 10, _ctx);
|
|
1139
|
+
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
|
|
1140
|
+
if (alt == 1) {
|
|
1141
|
+
setState(107);
|
|
1142
|
+
match(DIDParser::Semicolon);
|
|
1143
|
+
setState(108);
|
|
1144
|
+
variantfield();
|
|
1145
|
+
}
|
|
1146
|
+
setState(113);
|
|
1147
|
+
_errHandler->sync(this);
|
|
1148
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 10, _ctx);
|
|
1149
|
+
}
|
|
1150
|
+
setState(115);
|
|
1151
|
+
_errHandler->sync(this);
|
|
1152
|
+
|
|
1153
|
+
_la = _input->LA(1);
|
|
1154
|
+
if (_la == DIDParser::Semicolon) {
|
|
1155
|
+
setState(114);
|
|
1156
|
+
match(DIDParser::Semicolon);
|
|
1157
|
+
}
|
|
1158
|
+
setState(117);
|
|
1159
|
+
match(DIDParser::RightB);
|
|
1160
|
+
break;
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
default:
|
|
1164
|
+
break;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
}
|
|
1168
|
+
catch (RecognitionException &e) {
|
|
1169
|
+
_errHandler->reportError(this, e);
|
|
1170
|
+
_localctx->exception = std::current_exception();
|
|
1171
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
return _localctx;
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
//----------------- RecordfieldContext ------------------------------------------------------------------
|
|
1178
|
+
|
|
1179
|
+
DIDParser::RecordfieldContext::RecordfieldContext(ParserRuleContext *parent, size_t invokingState)
|
|
1180
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
|
|
1184
|
+
size_t DIDParser::RecordfieldContext::getRuleIndex() const {
|
|
1185
|
+
return DIDParser::RuleRecordfield;
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
void DIDParser::RecordfieldContext::copyFrom(RecordfieldContext *ctx) {
|
|
1189
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1190
|
+
}
|
|
1191
|
+
|
|
1192
|
+
//----------------- RecordDataContext ------------------------------------------------------------------
|
|
1193
|
+
|
|
1194
|
+
DIDParser::DatatypeContext* DIDParser::RecordDataContext::datatype() {
|
|
1195
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
1196
|
+
}
|
|
1197
|
+
|
|
1198
|
+
DIDParser::RecordDataContext::RecordDataContext(RecordfieldContext *ctx) { copyFrom(ctx); }
|
|
1199
|
+
|
|
1200
|
+
void DIDParser::RecordDataContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1201
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1202
|
+
if (parserListener != nullptr)
|
|
1203
|
+
parserListener->enterRecordData(this);
|
|
1204
|
+
}
|
|
1205
|
+
void DIDParser::RecordDataContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1206
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1207
|
+
if (parserListener != nullptr)
|
|
1208
|
+
parserListener->exitRecordData(this);
|
|
1209
|
+
}
|
|
1210
|
+
|
|
1211
|
+
std::any DIDParser::RecordDataContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1212
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1213
|
+
return parserVisitor->visitRecordData(this);
|
|
1214
|
+
else
|
|
1215
|
+
return visitor->visitChildren(this);
|
|
1216
|
+
}
|
|
1217
|
+
//----------------- RecordKVContext ------------------------------------------------------------------
|
|
1218
|
+
|
|
1219
|
+
tree::TerminalNode* DIDParser::RecordKVContext::Name() {
|
|
1220
|
+
return getToken(DIDParser::Name, 0);
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
tree::TerminalNode* DIDParser::RecordKVContext::Colon() {
|
|
1224
|
+
return getToken(DIDParser::Colon, 0);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
DIDParser::DatatypeContext* DIDParser::RecordKVContext::datatype() {
|
|
1228
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
1229
|
+
}
|
|
1230
|
+
|
|
1231
|
+
DIDParser::RecordKVContext::RecordKVContext(RecordfieldContext *ctx) { copyFrom(ctx); }
|
|
1232
|
+
|
|
1233
|
+
void DIDParser::RecordKVContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1234
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1235
|
+
if (parserListener != nullptr)
|
|
1236
|
+
parserListener->enterRecordKV(this);
|
|
1237
|
+
}
|
|
1238
|
+
void DIDParser::RecordKVContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1239
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1240
|
+
if (parserListener != nullptr)
|
|
1241
|
+
parserListener->exitRecordKV(this);
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
std::any DIDParser::RecordKVContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1245
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1246
|
+
return parserVisitor->visitRecordKV(this);
|
|
1247
|
+
else
|
|
1248
|
+
return visitor->visitChildren(this);
|
|
1249
|
+
}
|
|
1250
|
+
DIDParser::RecordfieldContext* DIDParser::recordfield() {
|
|
1251
|
+
RecordfieldContext *_localctx = _tracker.createInstance<RecordfieldContext>(_ctx, getState());
|
|
1252
|
+
enterRule(_localctx, 14, DIDParser::RuleRecordfield);
|
|
1253
|
+
|
|
1254
|
+
#if __cplusplus > 201703L
|
|
1255
|
+
auto onExit = finally([=, this] {
|
|
1256
|
+
#else
|
|
1257
|
+
auto onExit = finally([=] {
|
|
1258
|
+
#endif
|
|
1259
|
+
exitRule();
|
|
1260
|
+
});
|
|
1261
|
+
try {
|
|
1262
|
+
setState(125);
|
|
1263
|
+
_errHandler->sync(this);
|
|
1264
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 13, _ctx)) {
|
|
1265
|
+
case 1: {
|
|
1266
|
+
_localctx = _tracker.createInstance<DIDParser::RecordKVContext>(_localctx);
|
|
1267
|
+
enterOuterAlt(_localctx, 1);
|
|
1268
|
+
setState(121);
|
|
1269
|
+
match(DIDParser::Name);
|
|
1270
|
+
setState(122);
|
|
1271
|
+
match(DIDParser::Colon);
|
|
1272
|
+
setState(123);
|
|
1273
|
+
datatype();
|
|
1274
|
+
break;
|
|
1275
|
+
}
|
|
1276
|
+
|
|
1277
|
+
case 2: {
|
|
1278
|
+
_localctx = _tracker.createInstance<DIDParser::RecordDataContext>(_localctx);
|
|
1279
|
+
enterOuterAlt(_localctx, 2);
|
|
1280
|
+
setState(124);
|
|
1281
|
+
datatype();
|
|
1282
|
+
break;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
default:
|
|
1286
|
+
break;
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
}
|
|
1290
|
+
catch (RecognitionException &e) {
|
|
1291
|
+
_errHandler->reportError(this, e);
|
|
1292
|
+
_localctx->exception = std::current_exception();
|
|
1293
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1294
|
+
}
|
|
1295
|
+
|
|
1296
|
+
return _localctx;
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
//----------------- VariantfieldContext ------------------------------------------------------------------
|
|
1300
|
+
|
|
1301
|
+
DIDParser::VariantfieldContext::VariantfieldContext(ParserRuleContext *parent, size_t invokingState)
|
|
1302
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1303
|
+
}
|
|
1304
|
+
|
|
1305
|
+
|
|
1306
|
+
size_t DIDParser::VariantfieldContext::getRuleIndex() const {
|
|
1307
|
+
return DIDParser::RuleVariantfield;
|
|
1308
|
+
}
|
|
1309
|
+
|
|
1310
|
+
void DIDParser::VariantfieldContext::copyFrom(VariantfieldContext *ctx) {
|
|
1311
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1312
|
+
}
|
|
1313
|
+
|
|
1314
|
+
//----------------- VariantNameContext ------------------------------------------------------------------
|
|
1315
|
+
|
|
1316
|
+
tree::TerminalNode* DIDParser::VariantNameContext::Name() {
|
|
1317
|
+
return getToken(DIDParser::Name, 0);
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
DIDParser::VariantNameContext::VariantNameContext(VariantfieldContext *ctx) { copyFrom(ctx); }
|
|
1321
|
+
|
|
1322
|
+
void DIDParser::VariantNameContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1323
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1324
|
+
if (parserListener != nullptr)
|
|
1325
|
+
parserListener->enterVariantName(this);
|
|
1326
|
+
}
|
|
1327
|
+
void DIDParser::VariantNameContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1328
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1329
|
+
if (parserListener != nullptr)
|
|
1330
|
+
parserListener->exitVariantName(this);
|
|
1331
|
+
}
|
|
1332
|
+
|
|
1333
|
+
std::any DIDParser::VariantNameContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1334
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1335
|
+
return parserVisitor->visitVariantName(this);
|
|
1336
|
+
else
|
|
1337
|
+
return visitor->visitChildren(this);
|
|
1338
|
+
}
|
|
1339
|
+
//----------------- VariantKVContext ------------------------------------------------------------------
|
|
1340
|
+
|
|
1341
|
+
tree::TerminalNode* DIDParser::VariantKVContext::Name() {
|
|
1342
|
+
return getToken(DIDParser::Name, 0);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
tree::TerminalNode* DIDParser::VariantKVContext::Colon() {
|
|
1346
|
+
return getToken(DIDParser::Colon, 0);
|
|
1347
|
+
}
|
|
1348
|
+
|
|
1349
|
+
DIDParser::DatatypeContext* DIDParser::VariantKVContext::datatype() {
|
|
1350
|
+
return getRuleContext<DIDParser::DatatypeContext>(0);
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
DIDParser::VariantKVContext::VariantKVContext(VariantfieldContext *ctx) { copyFrom(ctx); }
|
|
1354
|
+
|
|
1355
|
+
void DIDParser::VariantKVContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1356
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1357
|
+
if (parserListener != nullptr)
|
|
1358
|
+
parserListener->enterVariantKV(this);
|
|
1359
|
+
}
|
|
1360
|
+
void DIDParser::VariantKVContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1361
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1362
|
+
if (parserListener != nullptr)
|
|
1363
|
+
parserListener->exitVariantKV(this);
|
|
1364
|
+
}
|
|
1365
|
+
|
|
1366
|
+
std::any DIDParser::VariantKVContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1367
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1368
|
+
return parserVisitor->visitVariantKV(this);
|
|
1369
|
+
else
|
|
1370
|
+
return visitor->visitChildren(this);
|
|
1371
|
+
}
|
|
1372
|
+
DIDParser::VariantfieldContext* DIDParser::variantfield() {
|
|
1373
|
+
VariantfieldContext *_localctx = _tracker.createInstance<VariantfieldContext>(_ctx, getState());
|
|
1374
|
+
enterRule(_localctx, 16, DIDParser::RuleVariantfield);
|
|
1375
|
+
|
|
1376
|
+
#if __cplusplus > 201703L
|
|
1377
|
+
auto onExit = finally([=, this] {
|
|
1378
|
+
#else
|
|
1379
|
+
auto onExit = finally([=] {
|
|
1380
|
+
#endif
|
|
1381
|
+
exitRule();
|
|
1382
|
+
});
|
|
1383
|
+
try {
|
|
1384
|
+
setState(131);
|
|
1385
|
+
_errHandler->sync(this);
|
|
1386
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 14, _ctx)) {
|
|
1387
|
+
case 1: {
|
|
1388
|
+
_localctx = _tracker.createInstance<DIDParser::VariantKVContext>(_localctx);
|
|
1389
|
+
enterOuterAlt(_localctx, 1);
|
|
1390
|
+
setState(127);
|
|
1391
|
+
match(DIDParser::Name);
|
|
1392
|
+
setState(128);
|
|
1393
|
+
match(DIDParser::Colon);
|
|
1394
|
+
setState(129);
|
|
1395
|
+
datatype();
|
|
1396
|
+
break;
|
|
1397
|
+
}
|
|
1398
|
+
|
|
1399
|
+
case 2: {
|
|
1400
|
+
_localctx = _tracker.createInstance<DIDParser::VariantNameContext>(_localctx);
|
|
1401
|
+
enterOuterAlt(_localctx, 2);
|
|
1402
|
+
setState(130);
|
|
1403
|
+
match(DIDParser::Name);
|
|
1404
|
+
break;
|
|
1405
|
+
}
|
|
1406
|
+
|
|
1407
|
+
default:
|
|
1408
|
+
break;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
}
|
|
1412
|
+
catch (RecognitionException &e) {
|
|
1413
|
+
_errHandler->reportError(this, e);
|
|
1414
|
+
_localctx->exception = std::current_exception();
|
|
1415
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
return _localctx;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1421
|
+
//----------------- ReftypeContext ------------------------------------------------------------------
|
|
1422
|
+
|
|
1423
|
+
DIDParser::ReftypeContext::ReftypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
1424
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1425
|
+
}
|
|
1426
|
+
|
|
1427
|
+
tree::TerminalNode* DIDParser::ReftypeContext::FUNC() {
|
|
1428
|
+
return getToken(DIDParser::FUNC, 0);
|
|
1429
|
+
}
|
|
1430
|
+
|
|
1431
|
+
DIDParser::FunctypeContext* DIDParser::ReftypeContext::functype() {
|
|
1432
|
+
return getRuleContext<DIDParser::FunctypeContext>(0);
|
|
1433
|
+
}
|
|
1434
|
+
|
|
1435
|
+
tree::TerminalNode* DIDParser::ReftypeContext::Service() {
|
|
1436
|
+
return getToken(DIDParser::Service, 0);
|
|
1437
|
+
}
|
|
1438
|
+
|
|
1439
|
+
DIDParser::ActortypeContext* DIDParser::ReftypeContext::actortype() {
|
|
1440
|
+
return getRuleContext<DIDParser::ActortypeContext>(0);
|
|
1441
|
+
}
|
|
1442
|
+
|
|
1443
|
+
|
|
1444
|
+
size_t DIDParser::ReftypeContext::getRuleIndex() const {
|
|
1445
|
+
return DIDParser::RuleReftype;
|
|
1446
|
+
}
|
|
1447
|
+
|
|
1448
|
+
void DIDParser::ReftypeContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1449
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1450
|
+
if (parserListener != nullptr)
|
|
1451
|
+
parserListener->enterReftype(this);
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
void DIDParser::ReftypeContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1455
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1456
|
+
if (parserListener != nullptr)
|
|
1457
|
+
parserListener->exitReftype(this);
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
std::any DIDParser::ReftypeContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1462
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1463
|
+
return parserVisitor->visitReftype(this);
|
|
1464
|
+
else
|
|
1465
|
+
return visitor->visitChildren(this);
|
|
1466
|
+
}
|
|
1467
|
+
|
|
1468
|
+
DIDParser::ReftypeContext* DIDParser::reftype() {
|
|
1469
|
+
ReftypeContext *_localctx = _tracker.createInstance<ReftypeContext>(_ctx, getState());
|
|
1470
|
+
enterRule(_localctx, 18, DIDParser::RuleReftype);
|
|
1471
|
+
|
|
1472
|
+
#if __cplusplus > 201703L
|
|
1473
|
+
auto onExit = finally([=, this] {
|
|
1474
|
+
#else
|
|
1475
|
+
auto onExit = finally([=] {
|
|
1476
|
+
#endif
|
|
1477
|
+
exitRule();
|
|
1478
|
+
});
|
|
1479
|
+
try {
|
|
1480
|
+
setState(137);
|
|
1481
|
+
_errHandler->sync(this);
|
|
1482
|
+
switch (_input->LA(1)) {
|
|
1483
|
+
case DIDParser::FUNC: {
|
|
1484
|
+
enterOuterAlt(_localctx, 1);
|
|
1485
|
+
setState(133);
|
|
1486
|
+
match(DIDParser::FUNC);
|
|
1487
|
+
setState(134);
|
|
1488
|
+
functype();
|
|
1489
|
+
break;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
case DIDParser::Service: {
|
|
1493
|
+
enterOuterAlt(_localctx, 2);
|
|
1494
|
+
setState(135);
|
|
1495
|
+
match(DIDParser::Service);
|
|
1496
|
+
setState(136);
|
|
1497
|
+
actortype();
|
|
1498
|
+
break;
|
|
1499
|
+
}
|
|
1500
|
+
|
|
1501
|
+
default:
|
|
1502
|
+
throw NoViableAltException(this);
|
|
1503
|
+
}
|
|
1504
|
+
|
|
1505
|
+
}
|
|
1506
|
+
catch (RecognitionException &e) {
|
|
1507
|
+
_errHandler->reportError(this, e);
|
|
1508
|
+
_localctx->exception = std::current_exception();
|
|
1509
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1510
|
+
}
|
|
1511
|
+
|
|
1512
|
+
return _localctx;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
//----------------- FunctypeContext ------------------------------------------------------------------
|
|
1516
|
+
|
|
1517
|
+
DIDParser::FunctypeContext::FunctypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
1518
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1519
|
+
}
|
|
1520
|
+
|
|
1521
|
+
std::vector<DIDParser::TuptypeContext *> DIDParser::FunctypeContext::tuptype() {
|
|
1522
|
+
return getRuleContexts<DIDParser::TuptypeContext>();
|
|
1523
|
+
}
|
|
1524
|
+
|
|
1525
|
+
DIDParser::TuptypeContext* DIDParser::FunctypeContext::tuptype(size_t i) {
|
|
1526
|
+
return getRuleContext<DIDParser::TuptypeContext>(i);
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
tree::TerminalNode* DIDParser::FunctypeContext::Arrow() {
|
|
1530
|
+
return getToken(DIDParser::Arrow, 0);
|
|
1531
|
+
}
|
|
1532
|
+
|
|
1533
|
+
DIDParser::FuncannContext* DIDParser::FunctypeContext::funcann() {
|
|
1534
|
+
return getRuleContext<DIDParser::FuncannContext>(0);
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
|
|
1538
|
+
size_t DIDParser::FunctypeContext::getRuleIndex() const {
|
|
1539
|
+
return DIDParser::RuleFunctype;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
void DIDParser::FunctypeContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1543
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1544
|
+
if (parserListener != nullptr)
|
|
1545
|
+
parserListener->enterFunctype(this);
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
void DIDParser::FunctypeContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1549
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1550
|
+
if (parserListener != nullptr)
|
|
1551
|
+
parserListener->exitFunctype(this);
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1554
|
+
|
|
1555
|
+
std::any DIDParser::FunctypeContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1556
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1557
|
+
return parserVisitor->visitFunctype(this);
|
|
1558
|
+
else
|
|
1559
|
+
return visitor->visitChildren(this);
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
DIDParser::FunctypeContext* DIDParser::functype() {
|
|
1563
|
+
FunctypeContext *_localctx = _tracker.createInstance<FunctypeContext>(_ctx, getState());
|
|
1564
|
+
enterRule(_localctx, 20, DIDParser::RuleFunctype);
|
|
1565
|
+
size_t _la = 0;
|
|
1566
|
+
|
|
1567
|
+
#if __cplusplus > 201703L
|
|
1568
|
+
auto onExit = finally([=, this] {
|
|
1569
|
+
#else
|
|
1570
|
+
auto onExit = finally([=] {
|
|
1571
|
+
#endif
|
|
1572
|
+
exitRule();
|
|
1573
|
+
});
|
|
1574
|
+
try {
|
|
1575
|
+
enterOuterAlt(_localctx, 1);
|
|
1576
|
+
setState(139);
|
|
1577
|
+
tuptype();
|
|
1578
|
+
setState(140);
|
|
1579
|
+
match(DIDParser::Arrow);
|
|
1580
|
+
setState(141);
|
|
1581
|
+
tuptype();
|
|
1582
|
+
setState(143);
|
|
1583
|
+
_errHandler->sync(this);
|
|
1584
|
+
|
|
1585
|
+
_la = _input->LA(1);
|
|
1586
|
+
if (_la == DIDParser::Query
|
|
1587
|
+
|
|
1588
|
+
|| _la == DIDParser::Oneway) {
|
|
1589
|
+
setState(142);
|
|
1590
|
+
funcann();
|
|
1591
|
+
}
|
|
1592
|
+
|
|
1593
|
+
}
|
|
1594
|
+
catch (RecognitionException &e) {
|
|
1595
|
+
_errHandler->reportError(this, e);
|
|
1596
|
+
_localctx->exception = std::current_exception();
|
|
1597
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
return _localctx;
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1603
|
+
//----------------- TuptypeContext ------------------------------------------------------------------
|
|
1604
|
+
|
|
1605
|
+
DIDParser::TuptypeContext::TuptypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
1606
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
size_t DIDParser::TuptypeContext::getRuleIndex() const {
|
|
1611
|
+
return DIDParser::RuleTuptype;
|
|
1612
|
+
}
|
|
1613
|
+
|
|
1614
|
+
void DIDParser::TuptypeContext::copyFrom(TuptypeContext *ctx) {
|
|
1615
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1616
|
+
}
|
|
1617
|
+
|
|
1618
|
+
//----------------- EmptyTupleContext ------------------------------------------------------------------
|
|
1619
|
+
|
|
1620
|
+
tree::TerminalNode* DIDParser::EmptyTupleContext::LeftP() {
|
|
1621
|
+
return getToken(DIDParser::LeftP, 0);
|
|
1622
|
+
}
|
|
1623
|
+
|
|
1624
|
+
tree::TerminalNode* DIDParser::EmptyTupleContext::RightP() {
|
|
1625
|
+
return getToken(DIDParser::RightP, 0);
|
|
1626
|
+
}
|
|
1627
|
+
|
|
1628
|
+
DIDParser::EmptyTupleContext::EmptyTupleContext(TuptypeContext *ctx) { copyFrom(ctx); }
|
|
1629
|
+
|
|
1630
|
+
void DIDParser::EmptyTupleContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1631
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1632
|
+
if (parserListener != nullptr)
|
|
1633
|
+
parserListener->enterEmptyTuple(this);
|
|
1634
|
+
}
|
|
1635
|
+
void DIDParser::EmptyTupleContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1636
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1637
|
+
if (parserListener != nullptr)
|
|
1638
|
+
parserListener->exitEmptyTuple(this);
|
|
1639
|
+
}
|
|
1640
|
+
|
|
1641
|
+
std::any DIDParser::EmptyTupleContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1642
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1643
|
+
return parserVisitor->visitEmptyTuple(this);
|
|
1644
|
+
else
|
|
1645
|
+
return visitor->visitChildren(this);
|
|
1646
|
+
}
|
|
1647
|
+
//----------------- TupleContext ------------------------------------------------------------------
|
|
1648
|
+
|
|
1649
|
+
tree::TerminalNode* DIDParser::TupleContext::LeftP() {
|
|
1650
|
+
return getToken(DIDParser::LeftP, 0);
|
|
1651
|
+
}
|
|
1652
|
+
|
|
1653
|
+
DIDParser::ArgtypesContext* DIDParser::TupleContext::argtypes() {
|
|
1654
|
+
return getRuleContext<DIDParser::ArgtypesContext>(0);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
tree::TerminalNode* DIDParser::TupleContext::RightP() {
|
|
1658
|
+
return getToken(DIDParser::RightP, 0);
|
|
1659
|
+
}
|
|
1660
|
+
|
|
1661
|
+
DIDParser::TupleContext::TupleContext(TuptypeContext *ctx) { copyFrom(ctx); }
|
|
1662
|
+
|
|
1663
|
+
void DIDParser::TupleContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1664
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1665
|
+
if (parserListener != nullptr)
|
|
1666
|
+
parserListener->enterTuple(this);
|
|
1667
|
+
}
|
|
1668
|
+
void DIDParser::TupleContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1669
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1670
|
+
if (parserListener != nullptr)
|
|
1671
|
+
parserListener->exitTuple(this);
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1674
|
+
std::any DIDParser::TupleContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1675
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1676
|
+
return parserVisitor->visitTuple(this);
|
|
1677
|
+
else
|
|
1678
|
+
return visitor->visitChildren(this);
|
|
1679
|
+
}
|
|
1680
|
+
DIDParser::TuptypeContext* DIDParser::tuptype() {
|
|
1681
|
+
TuptypeContext *_localctx = _tracker.createInstance<TuptypeContext>(_ctx, getState());
|
|
1682
|
+
enterRule(_localctx, 22, DIDParser::RuleTuptype);
|
|
1683
|
+
|
|
1684
|
+
#if __cplusplus > 201703L
|
|
1685
|
+
auto onExit = finally([=, this] {
|
|
1686
|
+
#else
|
|
1687
|
+
auto onExit = finally([=] {
|
|
1688
|
+
#endif
|
|
1689
|
+
exitRule();
|
|
1690
|
+
});
|
|
1691
|
+
try {
|
|
1692
|
+
setState(151);
|
|
1693
|
+
_errHandler->sync(this);
|
|
1694
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 17, _ctx)) {
|
|
1695
|
+
case 1: {
|
|
1696
|
+
_localctx = _tracker.createInstance<DIDParser::EmptyTupleContext>(_localctx);
|
|
1697
|
+
enterOuterAlt(_localctx, 1);
|
|
1698
|
+
setState(145);
|
|
1699
|
+
match(DIDParser::LeftP);
|
|
1700
|
+
setState(146);
|
|
1701
|
+
match(DIDParser::RightP);
|
|
1702
|
+
break;
|
|
1703
|
+
}
|
|
1704
|
+
|
|
1705
|
+
case 2: {
|
|
1706
|
+
_localctx = _tracker.createInstance<DIDParser::TupleContext>(_localctx);
|
|
1707
|
+
enterOuterAlt(_localctx, 2);
|
|
1708
|
+
setState(147);
|
|
1709
|
+
match(DIDParser::LeftP);
|
|
1710
|
+
setState(148);
|
|
1711
|
+
argtypes();
|
|
1712
|
+
setState(149);
|
|
1713
|
+
match(DIDParser::RightP);
|
|
1714
|
+
break;
|
|
1715
|
+
}
|
|
1716
|
+
|
|
1717
|
+
default:
|
|
1718
|
+
break;
|
|
1719
|
+
}
|
|
1720
|
+
|
|
1721
|
+
}
|
|
1722
|
+
catch (RecognitionException &e) {
|
|
1723
|
+
_errHandler->reportError(this, e);
|
|
1724
|
+
_localctx->exception = std::current_exception();
|
|
1725
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1726
|
+
}
|
|
1727
|
+
|
|
1728
|
+
return _localctx;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
//----------------- ArgtypesContext ------------------------------------------------------------------
|
|
1732
|
+
|
|
1733
|
+
DIDParser::ArgtypesContext::ArgtypesContext(ParserRuleContext *parent, size_t invokingState)
|
|
1734
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
std::vector<DIDParser::DatatypeContext *> DIDParser::ArgtypesContext::datatype() {
|
|
1738
|
+
return getRuleContexts<DIDParser::DatatypeContext>();
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
DIDParser::DatatypeContext* DIDParser::ArgtypesContext::datatype(size_t i) {
|
|
1742
|
+
return getRuleContext<DIDParser::DatatypeContext>(i);
|
|
1743
|
+
}
|
|
1744
|
+
|
|
1745
|
+
std::vector<tree::TerminalNode *> DIDParser::ArgtypesContext::Comma() {
|
|
1746
|
+
return getTokens(DIDParser::Comma);
|
|
1747
|
+
}
|
|
1748
|
+
|
|
1749
|
+
tree::TerminalNode* DIDParser::ArgtypesContext::Comma(size_t i) {
|
|
1750
|
+
return getToken(DIDParser::Comma, i);
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
tree::TerminalNode* DIDParser::ArgtypesContext::Name() {
|
|
1754
|
+
return getToken(DIDParser::Name, 0);
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
tree::TerminalNode* DIDParser::ArgtypesContext::Colon() {
|
|
1758
|
+
return getToken(DIDParser::Colon, 0);
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
|
|
1762
|
+
size_t DIDParser::ArgtypesContext::getRuleIndex() const {
|
|
1763
|
+
return DIDParser::RuleArgtypes;
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
void DIDParser::ArgtypesContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1767
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1768
|
+
if (parserListener != nullptr)
|
|
1769
|
+
parserListener->enterArgtypes(this);
|
|
1770
|
+
}
|
|
1771
|
+
|
|
1772
|
+
void DIDParser::ArgtypesContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1773
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1774
|
+
if (parserListener != nullptr)
|
|
1775
|
+
parserListener->exitArgtypes(this);
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1778
|
+
|
|
1779
|
+
std::any DIDParser::ArgtypesContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1780
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1781
|
+
return parserVisitor->visitArgtypes(this);
|
|
1782
|
+
else
|
|
1783
|
+
return visitor->visitChildren(this);
|
|
1784
|
+
}
|
|
1785
|
+
|
|
1786
|
+
DIDParser::ArgtypesContext* DIDParser::argtypes() {
|
|
1787
|
+
ArgtypesContext *_localctx = _tracker.createInstance<ArgtypesContext>(_ctx, getState());
|
|
1788
|
+
enterRule(_localctx, 24, DIDParser::RuleArgtypes);
|
|
1789
|
+
size_t _la = 0;
|
|
1790
|
+
|
|
1791
|
+
#if __cplusplus > 201703L
|
|
1792
|
+
auto onExit = finally([=, this] {
|
|
1793
|
+
#else
|
|
1794
|
+
auto onExit = finally([=] {
|
|
1795
|
+
#endif
|
|
1796
|
+
exitRule();
|
|
1797
|
+
});
|
|
1798
|
+
try {
|
|
1799
|
+
size_t alt;
|
|
1800
|
+
setState(167);
|
|
1801
|
+
_errHandler->sync(this);
|
|
1802
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 20, _ctx)) {
|
|
1803
|
+
case 1: {
|
|
1804
|
+
enterOuterAlt(_localctx, 1);
|
|
1805
|
+
setState(153);
|
|
1806
|
+
datatype();
|
|
1807
|
+
setState(158);
|
|
1808
|
+
_errHandler->sync(this);
|
|
1809
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx);
|
|
1810
|
+
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
|
|
1811
|
+
if (alt == 1) {
|
|
1812
|
+
setState(154);
|
|
1813
|
+
match(DIDParser::Comma);
|
|
1814
|
+
setState(155);
|
|
1815
|
+
datatype();
|
|
1816
|
+
}
|
|
1817
|
+
setState(160);
|
|
1818
|
+
_errHandler->sync(this);
|
|
1819
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 18, _ctx);
|
|
1820
|
+
}
|
|
1821
|
+
setState(162);
|
|
1822
|
+
_errHandler->sync(this);
|
|
1823
|
+
|
|
1824
|
+
_la = _input->LA(1);
|
|
1825
|
+
if (_la == DIDParser::Comma) {
|
|
1826
|
+
setState(161);
|
|
1827
|
+
match(DIDParser::Comma);
|
|
1828
|
+
}
|
|
1829
|
+
break;
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1832
|
+
case 2: {
|
|
1833
|
+
enterOuterAlt(_localctx, 2);
|
|
1834
|
+
setState(164);
|
|
1835
|
+
match(DIDParser::Name);
|
|
1836
|
+
setState(165);
|
|
1837
|
+
match(DIDParser::Colon);
|
|
1838
|
+
setState(166);
|
|
1839
|
+
datatype();
|
|
1840
|
+
break;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1843
|
+
default:
|
|
1844
|
+
break;
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
}
|
|
1848
|
+
catch (RecognitionException &e) {
|
|
1849
|
+
_errHandler->reportError(this, e);
|
|
1850
|
+
_localctx->exception = std::current_exception();
|
|
1851
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1852
|
+
}
|
|
1853
|
+
|
|
1854
|
+
return _localctx;
|
|
1855
|
+
}
|
|
1856
|
+
|
|
1857
|
+
//----------------- FuncannContext ------------------------------------------------------------------
|
|
1858
|
+
|
|
1859
|
+
DIDParser::FuncannContext::FuncannContext(ParserRuleContext *parent, size_t invokingState)
|
|
1860
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1861
|
+
}
|
|
1862
|
+
|
|
1863
|
+
|
|
1864
|
+
size_t DIDParser::FuncannContext::getRuleIndex() const {
|
|
1865
|
+
return DIDParser::RuleFuncann;
|
|
1866
|
+
}
|
|
1867
|
+
|
|
1868
|
+
void DIDParser::FuncannContext::copyFrom(FuncannContext *ctx) {
|
|
1869
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1870
|
+
}
|
|
1871
|
+
|
|
1872
|
+
//----------------- QueryContext ------------------------------------------------------------------
|
|
1873
|
+
|
|
1874
|
+
tree::TerminalNode* DIDParser::QueryContext::Query() {
|
|
1875
|
+
return getToken(DIDParser::Query, 0);
|
|
1876
|
+
}
|
|
1877
|
+
|
|
1878
|
+
DIDParser::QueryContext::QueryContext(FuncannContext *ctx) { copyFrom(ctx); }
|
|
1879
|
+
|
|
1880
|
+
void DIDParser::QueryContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1881
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1882
|
+
if (parserListener != nullptr)
|
|
1883
|
+
parserListener->enterQuery(this);
|
|
1884
|
+
}
|
|
1885
|
+
void DIDParser::QueryContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1886
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1887
|
+
if (parserListener != nullptr)
|
|
1888
|
+
parserListener->exitQuery(this);
|
|
1889
|
+
}
|
|
1890
|
+
|
|
1891
|
+
std::any DIDParser::QueryContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1892
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1893
|
+
return parserVisitor->visitQuery(this);
|
|
1894
|
+
else
|
|
1895
|
+
return visitor->visitChildren(this);
|
|
1896
|
+
}
|
|
1897
|
+
//----------------- OnewayContext ------------------------------------------------------------------
|
|
1898
|
+
|
|
1899
|
+
tree::TerminalNode* DIDParser::OnewayContext::Oneway() {
|
|
1900
|
+
return getToken(DIDParser::Oneway, 0);
|
|
1901
|
+
}
|
|
1902
|
+
|
|
1903
|
+
DIDParser::OnewayContext::OnewayContext(FuncannContext *ctx) { copyFrom(ctx); }
|
|
1904
|
+
|
|
1905
|
+
void DIDParser::OnewayContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1906
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1907
|
+
if (parserListener != nullptr)
|
|
1908
|
+
parserListener->enterOneway(this);
|
|
1909
|
+
}
|
|
1910
|
+
void DIDParser::OnewayContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1911
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1912
|
+
if (parserListener != nullptr)
|
|
1913
|
+
parserListener->exitOneway(this);
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
std::any DIDParser::OnewayContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1917
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
1918
|
+
return parserVisitor->visitOneway(this);
|
|
1919
|
+
else
|
|
1920
|
+
return visitor->visitChildren(this);
|
|
1921
|
+
}
|
|
1922
|
+
DIDParser::FuncannContext* DIDParser::funcann() {
|
|
1923
|
+
FuncannContext *_localctx = _tracker.createInstance<FuncannContext>(_ctx, getState());
|
|
1924
|
+
enterRule(_localctx, 26, DIDParser::RuleFuncann);
|
|
1925
|
+
|
|
1926
|
+
#if __cplusplus > 201703L
|
|
1927
|
+
auto onExit = finally([=, this] {
|
|
1928
|
+
#else
|
|
1929
|
+
auto onExit = finally([=] {
|
|
1930
|
+
#endif
|
|
1931
|
+
exitRule();
|
|
1932
|
+
});
|
|
1933
|
+
try {
|
|
1934
|
+
setState(171);
|
|
1935
|
+
_errHandler->sync(this);
|
|
1936
|
+
switch (_input->LA(1)) {
|
|
1937
|
+
case DIDParser::Query: {
|
|
1938
|
+
_localctx = _tracker.createInstance<DIDParser::QueryContext>(_localctx);
|
|
1939
|
+
enterOuterAlt(_localctx, 1);
|
|
1940
|
+
setState(169);
|
|
1941
|
+
match(DIDParser::Query);
|
|
1942
|
+
break;
|
|
1943
|
+
}
|
|
1944
|
+
|
|
1945
|
+
case DIDParser::Oneway: {
|
|
1946
|
+
_localctx = _tracker.createInstance<DIDParser::OnewayContext>(_localctx);
|
|
1947
|
+
enterOuterAlt(_localctx, 2);
|
|
1948
|
+
setState(170);
|
|
1949
|
+
match(DIDParser::Oneway);
|
|
1950
|
+
break;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1953
|
+
default:
|
|
1954
|
+
throw NoViableAltException(this);
|
|
1955
|
+
}
|
|
1956
|
+
|
|
1957
|
+
}
|
|
1958
|
+
catch (RecognitionException &e) {
|
|
1959
|
+
_errHandler->reportError(this, e);
|
|
1960
|
+
_localctx->exception = std::current_exception();
|
|
1961
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
return _localctx;
|
|
1965
|
+
}
|
|
1966
|
+
|
|
1967
|
+
//----------------- MethodtypeContext ------------------------------------------------------------------
|
|
1968
|
+
|
|
1969
|
+
DIDParser::MethodtypeContext::MethodtypeContext(ParserRuleContext *parent, size_t invokingState)
|
|
1970
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1971
|
+
}
|
|
1972
|
+
|
|
1973
|
+
tree::TerminalNode* DIDParser::MethodtypeContext::Name() {
|
|
1974
|
+
return getToken(DIDParser::Name, 0);
|
|
1975
|
+
}
|
|
1976
|
+
|
|
1977
|
+
tree::TerminalNode* DIDParser::MethodtypeContext::Colon() {
|
|
1978
|
+
return getToken(DIDParser::Colon, 0);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
DIDParser::FunctypeContext* DIDParser::MethodtypeContext::functype() {
|
|
1982
|
+
return getRuleContext<DIDParser::FunctypeContext>(0);
|
|
1983
|
+
}
|
|
1984
|
+
|
|
1985
|
+
|
|
1986
|
+
size_t DIDParser::MethodtypeContext::getRuleIndex() const {
|
|
1987
|
+
return DIDParser::RuleMethodtype;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
void DIDParser::MethodtypeContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1991
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1992
|
+
if (parserListener != nullptr)
|
|
1993
|
+
parserListener->enterMethodtype(this);
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
void DIDParser::MethodtypeContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1997
|
+
auto parserListener = dynamic_cast<DIDParserListener *>(listener);
|
|
1998
|
+
if (parserListener != nullptr)
|
|
1999
|
+
parserListener->exitMethodtype(this);
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
|
|
2003
|
+
std::any DIDParser::MethodtypeContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2004
|
+
if (auto parserVisitor = dynamic_cast<DIDParserVisitor*>(visitor))
|
|
2005
|
+
return parserVisitor->visitMethodtype(this);
|
|
2006
|
+
else
|
|
2007
|
+
return visitor->visitChildren(this);
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
DIDParser::MethodtypeContext* DIDParser::methodtype() {
|
|
2011
|
+
MethodtypeContext *_localctx = _tracker.createInstance<MethodtypeContext>(_ctx, getState());
|
|
2012
|
+
enterRule(_localctx, 28, DIDParser::RuleMethodtype);
|
|
2013
|
+
|
|
2014
|
+
#if __cplusplus > 201703L
|
|
2015
|
+
auto onExit = finally([=, this] {
|
|
2016
|
+
#else
|
|
2017
|
+
auto onExit = finally([=] {
|
|
2018
|
+
#endif
|
|
2019
|
+
exitRule();
|
|
2020
|
+
});
|
|
2021
|
+
try {
|
|
2022
|
+
enterOuterAlt(_localctx, 1);
|
|
2023
|
+
setState(173);
|
|
2024
|
+
match(DIDParser::Name);
|
|
2025
|
+
setState(174);
|
|
2026
|
+
match(DIDParser::Colon);
|
|
2027
|
+
setState(175);
|
|
2028
|
+
functype();
|
|
2029
|
+
|
|
2030
|
+
}
|
|
2031
|
+
catch (RecognitionException &e) {
|
|
2032
|
+
_errHandler->reportError(this, e);
|
|
2033
|
+
_localctx->exception = std::current_exception();
|
|
2034
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
return _localctx;
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
void DIDParser::initialize() {
|
|
2041
|
+
std::call_once(didparserParserOnceFlag, didparserParserInitialize);
|
|
2042
|
+
}
|