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,57 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/LexerAction.h"
|
|
9
|
+
#include "atn/LexerActionType.h"
|
|
10
|
+
|
|
11
|
+
namespace antlr4 {
|
|
12
|
+
namespace atn {
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// Implements the {@code pushMode} lexer action by calling
|
|
16
|
+
/// <seealso cref="Lexer#pushMode"/> with the assigned mode.
|
|
17
|
+
///
|
|
18
|
+
/// @author Sam Harwell
|
|
19
|
+
/// @since 4.2
|
|
20
|
+
/// </summary>
|
|
21
|
+
class ANTLR4CPP_PUBLIC LexerPushModeAction final : public LexerAction {
|
|
22
|
+
public:
|
|
23
|
+
static bool is(const LexerAction &lexerAction) { return lexerAction.getActionType() == LexerActionType::PUSH_MODE; }
|
|
24
|
+
|
|
25
|
+
static bool is(const LexerAction *lexerAction) { return lexerAction != nullptr && is(*lexerAction); }
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// Constructs a new {@code pushMode} action with the specified mode value. </summary>
|
|
29
|
+
/// <param name="mode"> The mode value to pass to <seealso cref="Lexer#pushMode"/>. </param>
|
|
30
|
+
explicit LexerPushModeAction(int mode);
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// Get the lexer mode this action should transition the lexer to.
|
|
34
|
+
/// </summary>
|
|
35
|
+
/// <returns> The lexer mode for this {@code pushMode} command. </returns>
|
|
36
|
+
int getMode() const { return _mode; }
|
|
37
|
+
|
|
38
|
+
/// <summary>
|
|
39
|
+
/// {@inheritDoc}
|
|
40
|
+
///
|
|
41
|
+
/// <para>This action is implemented by calling <seealso cref="Lexer#pushMode"/> with the
|
|
42
|
+
/// value provided by <seealso cref="#getMode"/>.</para>
|
|
43
|
+
/// </summary>
|
|
44
|
+
void execute(Lexer *lexer) const override;
|
|
45
|
+
|
|
46
|
+
bool equals(const LexerAction &obj) const override;
|
|
47
|
+
std::string toString() const override;
|
|
48
|
+
|
|
49
|
+
protected:
|
|
50
|
+
size_t hashCodeImpl() const override;
|
|
51
|
+
|
|
52
|
+
private:
|
|
53
|
+
const int _mode;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
} // namespace atn
|
|
57
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "misc/MurmurHash.h"
|
|
7
|
+
#include "Lexer.h"
|
|
8
|
+
|
|
9
|
+
#include "atn/LexerSkipAction.h"
|
|
10
|
+
|
|
11
|
+
using namespace antlr4;
|
|
12
|
+
using namespace antlr4::atn;
|
|
13
|
+
using namespace antlr4::misc;
|
|
14
|
+
|
|
15
|
+
const Ref<const LexerSkipAction>& LexerSkipAction::getInstance() {
|
|
16
|
+
static const Ref<const LexerSkipAction> instance(new LexerSkipAction());
|
|
17
|
+
return instance;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
void LexerSkipAction::execute(Lexer *lexer) const {
|
|
21
|
+
lexer->skip();
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
size_t LexerSkipAction::hashCodeImpl() const {
|
|
25
|
+
size_t hash = MurmurHash::initialize();
|
|
26
|
+
hash = MurmurHash::update(hash, static_cast<size_t>(getActionType()));
|
|
27
|
+
return MurmurHash::finish(hash, 1);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
bool LexerSkipAction::equals(const LexerAction &other) const {
|
|
31
|
+
return this == std::addressof(other);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
std::string LexerSkipAction::toString() const {
|
|
35
|
+
return "skip";
|
|
36
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/LexerAction.h"
|
|
9
|
+
#include "atn/LexerActionType.h"
|
|
10
|
+
|
|
11
|
+
namespace antlr4 {
|
|
12
|
+
namespace atn {
|
|
13
|
+
|
|
14
|
+
/// <summary>
|
|
15
|
+
/// Implements the {@code skip} lexer action by calling <seealso cref="Lexer#skip"/>.
|
|
16
|
+
///
|
|
17
|
+
/// <para>The {@code skip} command does not have any parameters, so this action is
|
|
18
|
+
/// implemented as a singleton instance exposed by <seealso cref="#INSTANCE"/>.</para>
|
|
19
|
+
///
|
|
20
|
+
/// @author Sam Harwell
|
|
21
|
+
/// @since 4.2
|
|
22
|
+
/// </summary>
|
|
23
|
+
class ANTLR4CPP_PUBLIC LexerSkipAction final : public LexerAction {
|
|
24
|
+
public:
|
|
25
|
+
static bool is(const LexerAction &lexerAction) { return lexerAction.getActionType() == LexerActionType::SKIP; }
|
|
26
|
+
|
|
27
|
+
static bool is(const LexerAction *lexerAction) { return lexerAction != nullptr && is(*lexerAction); }
|
|
28
|
+
|
|
29
|
+
/// Provides a singleton instance of this parameterless lexer action.
|
|
30
|
+
static const Ref<const LexerSkipAction>& getInstance();
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// {@inheritDoc}
|
|
34
|
+
///
|
|
35
|
+
/// <para>This action is implemented by calling <seealso cref="Lexer#skip"/>.</para>
|
|
36
|
+
/// </summary>
|
|
37
|
+
void execute(Lexer *lexer) const override;
|
|
38
|
+
|
|
39
|
+
bool equals(const LexerAction &obj) const override;
|
|
40
|
+
std::string toString() const override;
|
|
41
|
+
|
|
42
|
+
protected:
|
|
43
|
+
size_t hashCodeImpl() const override;
|
|
44
|
+
|
|
45
|
+
private:
|
|
46
|
+
/// Constructs the singleton instance of the lexer {@code skip} command.
|
|
47
|
+
LexerSkipAction() : LexerAction(LexerActionType::SKIP, false) {}
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
} // namespace atn
|
|
51
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "misc/MurmurHash.h"
|
|
7
|
+
#include "Lexer.h"
|
|
8
|
+
#include "support/Casts.h"
|
|
9
|
+
|
|
10
|
+
#include "atn/LexerTypeAction.h"
|
|
11
|
+
|
|
12
|
+
using namespace antlr4;
|
|
13
|
+
using namespace antlr4::atn;
|
|
14
|
+
using namespace antlr4::misc;
|
|
15
|
+
using namespace antlrcpp;
|
|
16
|
+
|
|
17
|
+
LexerTypeAction::LexerTypeAction(int type) : LexerAction(LexerActionType::TYPE, false), _type(type) {}
|
|
18
|
+
|
|
19
|
+
void LexerTypeAction::execute(Lexer *lexer) const {
|
|
20
|
+
lexer->setType(getType());
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
size_t LexerTypeAction::hashCodeImpl() const {
|
|
24
|
+
size_t hash = MurmurHash::initialize();
|
|
25
|
+
hash = MurmurHash::update(hash, static_cast<size_t>(getActionType()));
|
|
26
|
+
hash = MurmurHash::update(hash, getType());
|
|
27
|
+
return MurmurHash::finish(hash, 2);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
bool LexerTypeAction::equals(const LexerAction &other) const {
|
|
31
|
+
if (this == std::addressof(other)) {
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
if (getActionType() != other.getActionType()) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
const auto &lexerAction = downCast<const LexerTypeAction&>(other);
|
|
38
|
+
return getType() == lexerAction.getType();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
std::string LexerTypeAction::toString() const {
|
|
42
|
+
return "type(" + std::to_string(getType()) + ")";
|
|
43
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/LexerActionType.h"
|
|
9
|
+
#include "atn/LexerAction.h"
|
|
10
|
+
|
|
11
|
+
namespace antlr4 {
|
|
12
|
+
namespace atn {
|
|
13
|
+
|
|
14
|
+
/// Implements the {@code type} lexer action by calling <seealso cref="Lexer#setType"/>
|
|
15
|
+
/// with the assigned type.
|
|
16
|
+
class ANTLR4CPP_PUBLIC LexerTypeAction final : public LexerAction {
|
|
17
|
+
public:
|
|
18
|
+
static bool is(const LexerAction &lexerAction) { return lexerAction.getActionType() == LexerActionType::TYPE; }
|
|
19
|
+
|
|
20
|
+
static bool is(const LexerAction *lexerAction) { return lexerAction != nullptr && is(*lexerAction); }
|
|
21
|
+
|
|
22
|
+
/// <summary>
|
|
23
|
+
/// Constructs a new {@code type} action with the specified token type value. </summary>
|
|
24
|
+
/// <param name="type"> The type to assign to the token using <seealso cref="Lexer#setType"/>. </param>
|
|
25
|
+
explicit LexerTypeAction(int type);
|
|
26
|
+
|
|
27
|
+
/// <summary>
|
|
28
|
+
/// Gets the type to assign to a token created by the lexer. </summary>
|
|
29
|
+
/// <returns> The type to assign to a token created by the lexer. </returns>
|
|
30
|
+
int getType() const { return _type; }
|
|
31
|
+
|
|
32
|
+
/// <summary>
|
|
33
|
+
/// {@inheritDoc}
|
|
34
|
+
///
|
|
35
|
+
/// <para>This action is implemented by calling <seealso cref="Lexer#setType"/> with the
|
|
36
|
+
/// value provided by <seealso cref="#getType"/>.</para>
|
|
37
|
+
/// </summary>
|
|
38
|
+
void execute(Lexer *lexer) const override;
|
|
39
|
+
|
|
40
|
+
bool equals(const LexerAction &obj) const override;
|
|
41
|
+
std::string toString() const override;
|
|
42
|
+
|
|
43
|
+
protected:
|
|
44
|
+
size_t hashCodeImpl() const override;
|
|
45
|
+
|
|
46
|
+
private:
|
|
47
|
+
const int _type;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
} // namespace atn
|
|
51
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "atn/LookaheadEventInfo.h"
|
|
7
|
+
|
|
8
|
+
using namespace antlr4;
|
|
9
|
+
using namespace antlr4::atn;
|
|
10
|
+
|
|
11
|
+
LookaheadEventInfo::LookaheadEventInfo(size_t decision, ATNConfigSet *configs, size_t predictedAlt,
|
|
12
|
+
TokenStream *input, size_t startIndex, size_t stopIndex, bool fullCtx)
|
|
13
|
+
: DecisionEventInfo(decision, configs, input, startIndex, stopIndex, fullCtx) {
|
|
14
|
+
|
|
15
|
+
this->predictedAlt = predictedAlt;
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/DecisionEventInfo.h"
|
|
9
|
+
|
|
10
|
+
namespace antlr4 {
|
|
11
|
+
namespace atn {
|
|
12
|
+
|
|
13
|
+
/// This class represents profiling event information for tracking the lookahead
|
|
14
|
+
/// depth required in order to make a prediction.
|
|
15
|
+
class ANTLR4CPP_PUBLIC LookaheadEventInfo : public DecisionEventInfo {
|
|
16
|
+
public:
|
|
17
|
+
/// The alternative chosen by adaptivePredict(), not necessarily
|
|
18
|
+
/// the outermost alt shown for a rule; left-recursive rules have
|
|
19
|
+
/// user-level alts that differ from the rewritten rule with a (...) block
|
|
20
|
+
/// and a (..)* loop.
|
|
21
|
+
size_t predictedAlt = 0;
|
|
22
|
+
|
|
23
|
+
/// <summary>
|
|
24
|
+
/// Constructs a new instance of the <seealso cref="LookaheadEventInfo"/> class with
|
|
25
|
+
/// the specified detailed lookahead information.
|
|
26
|
+
/// </summary>
|
|
27
|
+
/// <param name="decision"> The decision number </param>
|
|
28
|
+
/// <param name="configs"> The final configuration set containing the necessary
|
|
29
|
+
/// information to determine the result of a prediction, or {@code null} if
|
|
30
|
+
/// the final configuration set is not available </param>
|
|
31
|
+
/// <param name="input"> The input token stream </param>
|
|
32
|
+
/// <param name="startIndex"> The start index for the current prediction </param>
|
|
33
|
+
/// <param name="stopIndex"> The index at which the prediction was finally made </param>
|
|
34
|
+
/// <param name="fullCtx"> {@code true} if the current lookahead is part of an LL
|
|
35
|
+
/// prediction; otherwise, {@code false} if the current lookahead is part of
|
|
36
|
+
/// an SLL prediction </param>
|
|
37
|
+
LookaheadEventInfo(size_t decision, ATNConfigSet *configs, size_t predictedAlt, TokenStream *input, size_t startIndex,
|
|
38
|
+
size_t stopIndex, bool fullCtx);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
} // namespace atn
|
|
42
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/ATNState.h"
|
|
9
|
+
|
|
10
|
+
namespace antlr4 {
|
|
11
|
+
namespace atn {
|
|
12
|
+
|
|
13
|
+
/// Mark the end of a * or + loop.
|
|
14
|
+
class ANTLR4CPP_PUBLIC LoopEndState final : public ATNState {
|
|
15
|
+
public:
|
|
16
|
+
static bool is(const ATNState &atnState) { return atnState.getStateType() == ATNStateType::LOOP_END; }
|
|
17
|
+
|
|
18
|
+
static bool is(const ATNState *atnState) { return atnState != nullptr && is(*atnState); }
|
|
19
|
+
|
|
20
|
+
ATNState *loopBackState = nullptr;
|
|
21
|
+
|
|
22
|
+
LoopEndState() : ATNState(ATNStateType::LOOP_END) {}
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
} // namespace atn
|
|
26
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "atn/NotSetTransition.h"
|
|
7
|
+
#include "atn/ATNState.h"
|
|
8
|
+
#include "misc/IntervalSet.h"
|
|
9
|
+
|
|
10
|
+
using namespace antlr4;
|
|
11
|
+
using namespace antlr4::atn;
|
|
12
|
+
|
|
13
|
+
NotSetTransition::NotSetTransition(ATNState *target, misc::IntervalSet set) : SetTransition(TransitionType::NOT_SET, target, std::move(set)) {}
|
|
14
|
+
|
|
15
|
+
bool NotSetTransition::matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const {
|
|
16
|
+
return symbol >= minVocabSymbol && symbol <= maxVocabSymbol
|
|
17
|
+
&& !SetTransition::matches(symbol, minVocabSymbol, maxVocabSymbol);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
std::string NotSetTransition::toString() const {
|
|
21
|
+
return "NOT_SET " + Transition::toString() + " { " + SetTransition::toString() + " }";
|
|
22
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/SetTransition.h"
|
|
9
|
+
|
|
10
|
+
namespace antlr4 {
|
|
11
|
+
namespace atn {
|
|
12
|
+
|
|
13
|
+
class ANTLR4CPP_PUBLIC NotSetTransition final : public SetTransition {
|
|
14
|
+
public:
|
|
15
|
+
static bool is(const Transition &transition) { return transition.getTransitionType() == TransitionType::NOT_SET; }
|
|
16
|
+
|
|
17
|
+
static bool is(const Transition *transition) { return transition != nullptr && is(*transition); }
|
|
18
|
+
|
|
19
|
+
NotSetTransition(ATNState *target, misc::IntervalSet set);
|
|
20
|
+
|
|
21
|
+
virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override;
|
|
22
|
+
|
|
23
|
+
virtual std::string toString() const override;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
} // namespace atn
|
|
27
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "atn/OrderedATNConfigSet.h"
|
|
7
|
+
|
|
8
|
+
using namespace antlr4::atn;
|
|
9
|
+
|
|
10
|
+
size_t OrderedATNConfigSet::hashCode(const ATNConfig &atnConfig) const {
|
|
11
|
+
return atnConfig.hashCode();
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
bool OrderedATNConfigSet::equals(const ATNConfig &lhs, const ATNConfig &rhs) const {
|
|
15
|
+
return lhs == rhs;
|
|
16
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/ATNConfigSet.h"
|
|
9
|
+
#include "atn/ATNConfig.h"
|
|
10
|
+
|
|
11
|
+
namespace antlr4 {
|
|
12
|
+
namespace atn {
|
|
13
|
+
|
|
14
|
+
class ANTLR4CPP_PUBLIC OrderedATNConfigSet final : public ATNConfigSet {
|
|
15
|
+
public:
|
|
16
|
+
OrderedATNConfigSet() = default;
|
|
17
|
+
|
|
18
|
+
private:
|
|
19
|
+
size_t hashCode(const ATNConfig &atnConfig) const override;
|
|
20
|
+
|
|
21
|
+
bool equals(const ATNConfig &lhs, const ATNConfig &rhs) const override;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
} // namespace atn
|
|
25
|
+
} // namespace antlr4
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#include "atn/ProfilingATNSimulator.h"
|
|
7
|
+
#include "dfa/DFA.h"
|
|
8
|
+
|
|
9
|
+
#include "atn/ParseInfo.h"
|
|
10
|
+
|
|
11
|
+
using namespace antlr4::atn;
|
|
12
|
+
|
|
13
|
+
ParseInfo::ParseInfo(ProfilingATNSimulator *atnSimulator) : _atnSimulator(atnSimulator) {
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
ParseInfo::~ParseInfo() {
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
std::vector<DecisionInfo> ParseInfo::getDecisionInfo() {
|
|
20
|
+
return _atnSimulator->getDecisionInfo();
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
std::vector<size_t> ParseInfo::getLLDecisions() {
|
|
24
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
25
|
+
std::vector<size_t> LL;
|
|
26
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
27
|
+
long long fallBack = decisions[i].LL_Fallback;
|
|
28
|
+
if (fallBack > 0) {
|
|
29
|
+
LL.push_back(i);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return LL;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
long long ParseInfo::getTotalTimeInPrediction() {
|
|
36
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
37
|
+
long long t = 0;
|
|
38
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
39
|
+
t += decisions[i].timeInPrediction;
|
|
40
|
+
}
|
|
41
|
+
return t;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
long long ParseInfo::getTotalSLLLookaheadOps() {
|
|
45
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
46
|
+
long long k = 0;
|
|
47
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
48
|
+
k += decisions[i].SLL_TotalLook;
|
|
49
|
+
}
|
|
50
|
+
return k;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
long long ParseInfo::getTotalLLLookaheadOps() {
|
|
54
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
55
|
+
long long k = 0;
|
|
56
|
+
for (size_t i = 0; i < decisions.size(); i++) {
|
|
57
|
+
k += decisions[i].LL_TotalLook;
|
|
58
|
+
}
|
|
59
|
+
return k;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
long long ParseInfo::getTotalSLLATNLookaheadOps() {
|
|
63
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
64
|
+
long long k = 0;
|
|
65
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
66
|
+
k += decisions[i].SLL_ATNTransitions;
|
|
67
|
+
}
|
|
68
|
+
return k;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
long long ParseInfo::getTotalLLATNLookaheadOps() {
|
|
72
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
73
|
+
long long k = 0;
|
|
74
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
75
|
+
k += decisions[i].LL_ATNTransitions;
|
|
76
|
+
}
|
|
77
|
+
return k;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
long long ParseInfo::getTotalATNLookaheadOps() {
|
|
81
|
+
std::vector<DecisionInfo> decisions = _atnSimulator->getDecisionInfo();
|
|
82
|
+
long long k = 0;
|
|
83
|
+
for (size_t i = 0; i < decisions.size(); ++i) {
|
|
84
|
+
k += decisions[i].SLL_ATNTransitions;
|
|
85
|
+
k += decisions[i].LL_ATNTransitions;
|
|
86
|
+
}
|
|
87
|
+
return k;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
size_t ParseInfo::getDFASize() {
|
|
91
|
+
size_t n = 0;
|
|
92
|
+
std::vector<dfa::DFA> &decisionToDFA = _atnSimulator->decisionToDFA;
|
|
93
|
+
for (size_t i = 0; i < decisionToDFA.size(); ++i) {
|
|
94
|
+
n += getDFASize(i);
|
|
95
|
+
}
|
|
96
|
+
return n;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
size_t ParseInfo::getDFASize(size_t decision) {
|
|
100
|
+
dfa::DFA &decisionToDFA = _atnSimulator->decisionToDFA[decision];
|
|
101
|
+
return decisionToDFA.states.size();
|
|
102
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
#pragma once
|
|
7
|
+
|
|
8
|
+
#include "atn/DecisionInfo.h"
|
|
9
|
+
|
|
10
|
+
namespace antlr4 {
|
|
11
|
+
namespace atn {
|
|
12
|
+
|
|
13
|
+
class ProfilingATNSimulator;
|
|
14
|
+
|
|
15
|
+
/// This class provides access to specific and aggregate statistics gathered
|
|
16
|
+
/// during profiling of a parser.
|
|
17
|
+
class ANTLR4CPP_PUBLIC ParseInfo {
|
|
18
|
+
public:
|
|
19
|
+
ParseInfo(ProfilingATNSimulator *atnSimulator);
|
|
20
|
+
ParseInfo(ParseInfo const&) = default;
|
|
21
|
+
virtual ~ParseInfo();
|
|
22
|
+
|
|
23
|
+
ParseInfo& operator=(ParseInfo const&) = default;
|
|
24
|
+
|
|
25
|
+
/// <summary>
|
|
26
|
+
/// Gets an array of <seealso cref="DecisionInfo"/> instances containing the profiling
|
|
27
|
+
/// information gathered for each decision in the ATN.
|
|
28
|
+
/// </summary>
|
|
29
|
+
/// <returns> An array of <seealso cref="DecisionInfo"/> instances, indexed by decision
|
|
30
|
+
/// number. </returns>
|
|
31
|
+
virtual std::vector<DecisionInfo> getDecisionInfo();
|
|
32
|
+
|
|
33
|
+
/// <summary>
|
|
34
|
+
/// Gets the decision numbers for decisions that required one or more
|
|
35
|
+
/// full-context predictions during parsing. These are decisions for which
|
|
36
|
+
/// <seealso cref="DecisionInfo#LL_Fallback"/> is non-zero.
|
|
37
|
+
/// </summary>
|
|
38
|
+
/// <returns> A list of decision numbers which required one or more
|
|
39
|
+
/// full-context predictions during parsing. </returns>
|
|
40
|
+
virtual std::vector<size_t> getLLDecisions();
|
|
41
|
+
|
|
42
|
+
/// <summary>
|
|
43
|
+
/// Gets the total time spent during prediction across all decisions made
|
|
44
|
+
/// during parsing. This value is the sum of
|
|
45
|
+
/// <seealso cref="DecisionInfo#timeInPrediction"/> for all decisions.
|
|
46
|
+
/// </summary>
|
|
47
|
+
virtual long long getTotalTimeInPrediction();
|
|
48
|
+
|
|
49
|
+
/// <summary>
|
|
50
|
+
/// Gets the total number of SLL lookahead operations across all decisions
|
|
51
|
+
/// made during parsing. This value is the sum of
|
|
52
|
+
/// <seealso cref="DecisionInfo#SLL_TotalLook"/> for all decisions.
|
|
53
|
+
/// </summary>
|
|
54
|
+
virtual long long getTotalSLLLookaheadOps();
|
|
55
|
+
|
|
56
|
+
/// <summary>
|
|
57
|
+
/// Gets the total number of LL lookahead operations across all decisions
|
|
58
|
+
/// made during parsing. This value is the sum of
|
|
59
|
+
/// <seealso cref="DecisionInfo#LL_TotalLook"/> for all decisions.
|
|
60
|
+
/// </summary>
|
|
61
|
+
virtual long long getTotalLLLookaheadOps();
|
|
62
|
+
|
|
63
|
+
/// <summary>
|
|
64
|
+
/// Gets the total number of ATN lookahead operations for SLL prediction
|
|
65
|
+
/// across all decisions made during parsing.
|
|
66
|
+
/// </summary>
|
|
67
|
+
virtual long long getTotalSLLATNLookaheadOps();
|
|
68
|
+
|
|
69
|
+
/// <summary>
|
|
70
|
+
/// Gets the total number of ATN lookahead operations for LL prediction
|
|
71
|
+
/// across all decisions made during parsing.
|
|
72
|
+
/// </summary>
|
|
73
|
+
virtual long long getTotalLLATNLookaheadOps();
|
|
74
|
+
|
|
75
|
+
/// <summary>
|
|
76
|
+
/// Gets the total number of ATN lookahead operations for SLL and LL
|
|
77
|
+
/// prediction across all decisions made during parsing.
|
|
78
|
+
///
|
|
79
|
+
/// <para>
|
|
80
|
+
/// This value is the sum of <seealso cref="#getTotalSLLATNLookaheadOps"/> and
|
|
81
|
+
/// <seealso cref="#getTotalLLATNLookaheadOps"/>.</para>
|
|
82
|
+
/// </summary>
|
|
83
|
+
virtual long long getTotalATNLookaheadOps();
|
|
84
|
+
|
|
85
|
+
/// <summary>
|
|
86
|
+
/// Gets the total number of DFA states stored in the DFA cache for all
|
|
87
|
+
/// decisions in the ATN.
|
|
88
|
+
/// </summary>
|
|
89
|
+
virtual size_t getDFASize();
|
|
90
|
+
|
|
91
|
+
/// <summary>
|
|
92
|
+
/// Gets the total number of DFA states stored in the DFA cache for a
|
|
93
|
+
/// particular decision.
|
|
94
|
+
/// </summary>
|
|
95
|
+
virtual size_t getDFASize(size_t decision);
|
|
96
|
+
|
|
97
|
+
protected:
|
|
98
|
+
const ProfilingATNSimulator *_atnSimulator; // non-owning, we are created by this simulator.
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
} // namespace atn
|
|
102
|
+
} // namespace antlr4
|