fhirpath-rb 0.1.2 → 0.1.4
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 +4 -4
- data/.rubocop.yml +4 -0
- data/CLAUDE.md +52 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +30 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +180 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +79 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +37 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +193 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +158 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +336 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +99 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +52 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +218 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +294 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +196 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +60 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +46 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +668 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +461 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +294 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +173 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +138 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +65 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +156 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +159 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +144 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +141 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +54 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +92 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +85 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +137 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +425 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +295 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +208 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +117 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +42 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +64 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +177 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +98 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +169 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +158 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +132 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +106 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +157 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +232 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +156 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +54 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +48 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +629 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +32 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +71 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +56 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +139 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +29 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +35 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +109 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +51 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +30 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +12 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +34 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +31 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +42 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +189 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +76 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +67 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +615 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +199 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +15 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +100 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +111 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +128 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +57 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +59 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +45 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +75 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +57 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +76 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +57 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +53 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +53 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +57 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +51 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +51 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +22 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1383 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +911 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +29 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +35 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +50 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +579 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +225 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +64 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +202 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +31 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +42 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +418 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +233 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +28 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +38 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +86 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +37 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +65 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +21 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +115 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +96 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +60 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +59 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +153 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +17 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +22 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +61 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +508 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +190 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +120 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +102 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +8 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +16 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +149 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +207 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +65 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +34 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +161 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +38 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +16 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +54 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +43 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +12 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +111 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +48 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +55 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +40 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +54 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +32 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +182 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +47 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- data/ext/fhir_path_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathBaseListener.cpp +7 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathBaseListener.h +149 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathBaseVisitor.cpp +7 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathBaseVisitor.h +184 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathLexer.cpp +316 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathLexer.h +59 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathListener.cpp +7 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathListener.h +142 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathParser.cpp +2517 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathParser.h +649 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathVisitor.cpp +7 -0
- data/ext/fhir_path_parser/antlrgen/FHIRPathVisitor.h +106 -0
- data/ext/fhir_path_parser/fhir_path_parser.cpp +3161 -0
- data/lib/fhirpath/version.rb +1 -1
- metadata +316 -1
|
@@ -0,0 +1,2517 @@
|
|
|
1
|
+
|
|
2
|
+
// Generated from /home/runner/work/fhirpath-ruby/fhirpath-ruby/lib/fhirpath/parser/FHIRPath.g4 by ANTLR 4.10.1
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
#include "FHIRPathListener.h"
|
|
6
|
+
#include "FHIRPathVisitor.h"
|
|
7
|
+
|
|
8
|
+
#include "FHIRPathParser.h"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
using namespace antlrcpp;
|
|
12
|
+
|
|
13
|
+
using namespace antlr4;
|
|
14
|
+
|
|
15
|
+
namespace {
|
|
16
|
+
|
|
17
|
+
struct FHIRPathParserStaticData final {
|
|
18
|
+
FHIRPathParserStaticData(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
|
+
FHIRPathParserStaticData(const FHIRPathParserStaticData&) = delete;
|
|
26
|
+
FHIRPathParserStaticData(FHIRPathParserStaticData&&) = delete;
|
|
27
|
+
FHIRPathParserStaticData& operator=(const FHIRPathParserStaticData&) = delete;
|
|
28
|
+
FHIRPathParserStaticData& operator=(FHIRPathParserStaticData&&) = 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 fhirpathParserOnceFlag;
|
|
41
|
+
FHIRPathParserStaticData *fhirpathParserStaticData = nullptr;
|
|
42
|
+
|
|
43
|
+
void fhirpathParserInitialize() {
|
|
44
|
+
assert(fhirpathParserStaticData == nullptr);
|
|
45
|
+
auto staticData = std::make_unique<FHIRPathParserStaticData>(
|
|
46
|
+
std::vector<std::string>{
|
|
47
|
+
"entireExpression", "expression", "term", "literal", "externalConstant",
|
|
48
|
+
"invocation", "functn", "paramList", "quantity", "unit", "dateTimePrecision",
|
|
49
|
+
"pluralDateTimePrecision", "typeSpecifier", "qualifiedIdentifier",
|
|
50
|
+
"identifier"
|
|
51
|
+
},
|
|
52
|
+
std::vector<std::string>{
|
|
53
|
+
"", "'.'", "'['", "']'", "'+'", "'-'", "'*'", "'/'", "'div'", "'mod'",
|
|
54
|
+
"'&'", "'|'", "'<='", "'<'", "'>'", "'>='", "'is'", "'as'", "'='",
|
|
55
|
+
"'~'", "'!='", "'!~'", "'in'", "'contains'", "'and'", "'or'", "'xor'",
|
|
56
|
+
"'implies'", "'('", "')'", "'{'", "'}'", "'true'", "'false'", "'%'",
|
|
57
|
+
"'$this'", "'$index'", "'$total'", "','", "'year'", "'month'", "'week'",
|
|
58
|
+
"'day'", "'hour'", "'minute'", "'second'", "'millisecond'", "'years'",
|
|
59
|
+
"'months'", "'weeks'", "'days'", "'hours'", "'minutes'", "'seconds'",
|
|
60
|
+
"'milliseconds'"
|
|
61
|
+
},
|
|
62
|
+
std::vector<std::string>{
|
|
63
|
+
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
64
|
+
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
65
|
+
"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "",
|
|
66
|
+
"", "", "", "", "DATETIME", "TIME", "IDENTIFIER", "DELIMITEDIDENTIFIER",
|
|
67
|
+
"STRING", "NUMBER", "WS", "COMMENT", "LINE_COMMENT"
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
static const int32_t serializedATNSegment[] = {
|
|
71
|
+
4,1,63,154,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,
|
|
72
|
+
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,
|
|
73
|
+
14,1,0,1,0,1,0,1,1,1,1,1,1,1,1,3,1,38,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
74
|
+
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,
|
|
75
|
+
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,78,8,1,10,1,
|
|
76
|
+
12,1,81,9,1,1,2,1,2,1,2,1,2,1,2,1,2,1,2,3,2,90,8,2,1,3,1,3,1,3,1,3,1,
|
|
77
|
+
3,1,3,1,3,1,3,3,3,100,8,3,1,4,1,4,1,4,3,4,105,8,4,1,5,1,5,1,5,1,5,1,5,
|
|
78
|
+
3,5,112,8,5,1,6,1,6,1,6,3,6,117,8,6,1,6,1,6,1,7,1,7,1,7,5,7,124,8,7,10,
|
|
79
|
+
7,12,7,127,9,7,1,8,1,8,3,8,131,8,8,1,9,1,9,1,9,3,9,136,8,9,1,10,1,10,
|
|
80
|
+
1,11,1,11,1,12,1,12,1,13,1,13,1,13,5,13,147,8,13,10,13,12,13,150,9,13,
|
|
81
|
+
1,14,1,14,1,14,0,1,2,15,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,0,12,
|
|
82
|
+
1,0,4,5,1,0,6,9,2,0,4,5,10,10,1,0,12,15,1,0,18,21,1,0,22,23,1,0,25,26,
|
|
83
|
+
1,0,16,17,1,0,32,33,1,0,39,46,1,0,47,54,3,0,16,17,22,23,57,58,171,0,30,
|
|
84
|
+
1,0,0,0,2,37,1,0,0,0,4,89,1,0,0,0,6,99,1,0,0,0,8,101,1,0,0,0,10,111,1,
|
|
85
|
+
0,0,0,12,113,1,0,0,0,14,120,1,0,0,0,16,128,1,0,0,0,18,135,1,0,0,0,20,
|
|
86
|
+
137,1,0,0,0,22,139,1,0,0,0,24,141,1,0,0,0,26,143,1,0,0,0,28,151,1,0,0,
|
|
87
|
+
0,30,31,3,2,1,0,31,32,5,0,0,1,32,1,1,0,0,0,33,34,6,1,-1,0,34,38,3,4,2,
|
|
88
|
+
0,35,36,7,0,0,0,36,38,3,2,1,11,37,33,1,0,0,0,37,35,1,0,0,0,38,79,1,0,
|
|
89
|
+
0,0,39,40,10,10,0,0,40,41,7,1,0,0,41,78,3,2,1,11,42,43,10,9,0,0,43,44,
|
|
90
|
+
7,2,0,0,44,78,3,2,1,10,45,46,10,8,0,0,46,47,5,11,0,0,47,78,3,2,1,9,48,
|
|
91
|
+
49,10,7,0,0,49,50,7,3,0,0,50,78,3,2,1,8,51,52,10,5,0,0,52,53,7,4,0,0,
|
|
92
|
+
53,78,3,2,1,6,54,55,10,4,0,0,55,56,7,5,0,0,56,78,3,2,1,5,57,58,10,3,0,
|
|
93
|
+
0,58,59,5,24,0,0,59,78,3,2,1,4,60,61,10,2,0,0,61,62,7,6,0,0,62,78,3,2,
|
|
94
|
+
1,3,63,64,10,1,0,0,64,65,5,27,0,0,65,78,3,2,1,2,66,67,10,13,0,0,67,68,
|
|
95
|
+
5,1,0,0,68,78,3,10,5,0,69,70,10,12,0,0,70,71,5,2,0,0,71,72,3,2,1,0,72,
|
|
96
|
+
73,5,3,0,0,73,78,1,0,0,0,74,75,10,6,0,0,75,76,7,7,0,0,76,78,3,24,12,0,
|
|
97
|
+
77,39,1,0,0,0,77,42,1,0,0,0,77,45,1,0,0,0,77,48,1,0,0,0,77,51,1,0,0,0,
|
|
98
|
+
77,54,1,0,0,0,77,57,1,0,0,0,77,60,1,0,0,0,77,63,1,0,0,0,77,66,1,0,0,0,
|
|
99
|
+
77,69,1,0,0,0,77,74,1,0,0,0,78,81,1,0,0,0,79,77,1,0,0,0,79,80,1,0,0,0,
|
|
100
|
+
80,3,1,0,0,0,81,79,1,0,0,0,82,90,3,10,5,0,83,90,3,6,3,0,84,90,3,8,4,0,
|
|
101
|
+
85,86,5,28,0,0,86,87,3,2,1,0,87,88,5,29,0,0,88,90,1,0,0,0,89,82,1,0,0,
|
|
102
|
+
0,89,83,1,0,0,0,89,84,1,0,0,0,89,85,1,0,0,0,90,5,1,0,0,0,91,92,5,30,0,
|
|
103
|
+
0,92,100,5,31,0,0,93,100,7,8,0,0,94,100,5,59,0,0,95,100,5,60,0,0,96,100,
|
|
104
|
+
5,55,0,0,97,100,5,56,0,0,98,100,3,16,8,0,99,91,1,0,0,0,99,93,1,0,0,0,
|
|
105
|
+
99,94,1,0,0,0,99,95,1,0,0,0,99,96,1,0,0,0,99,97,1,0,0,0,99,98,1,0,0,0,
|
|
106
|
+
100,7,1,0,0,0,101,104,5,34,0,0,102,105,3,28,14,0,103,105,5,59,0,0,104,
|
|
107
|
+
102,1,0,0,0,104,103,1,0,0,0,105,9,1,0,0,0,106,112,3,28,14,0,107,112,3,
|
|
108
|
+
12,6,0,108,112,5,35,0,0,109,112,5,36,0,0,110,112,5,37,0,0,111,106,1,0,
|
|
109
|
+
0,0,111,107,1,0,0,0,111,108,1,0,0,0,111,109,1,0,0,0,111,110,1,0,0,0,112,
|
|
110
|
+
11,1,0,0,0,113,114,3,28,14,0,114,116,5,28,0,0,115,117,3,14,7,0,116,115,
|
|
111
|
+
1,0,0,0,116,117,1,0,0,0,117,118,1,0,0,0,118,119,5,29,0,0,119,13,1,0,0,
|
|
112
|
+
0,120,125,3,2,1,0,121,122,5,38,0,0,122,124,3,2,1,0,123,121,1,0,0,0,124,
|
|
113
|
+
127,1,0,0,0,125,123,1,0,0,0,125,126,1,0,0,0,126,15,1,0,0,0,127,125,1,
|
|
114
|
+
0,0,0,128,130,5,60,0,0,129,131,3,18,9,0,130,129,1,0,0,0,130,131,1,0,0,
|
|
115
|
+
0,131,17,1,0,0,0,132,136,3,20,10,0,133,136,3,22,11,0,134,136,5,59,0,0,
|
|
116
|
+
135,132,1,0,0,0,135,133,1,0,0,0,135,134,1,0,0,0,136,19,1,0,0,0,137,138,
|
|
117
|
+
7,9,0,0,138,21,1,0,0,0,139,140,7,10,0,0,140,23,1,0,0,0,141,142,3,26,13,
|
|
118
|
+
0,142,25,1,0,0,0,143,148,3,28,14,0,144,145,5,1,0,0,145,147,3,28,14,0,
|
|
119
|
+
146,144,1,0,0,0,147,150,1,0,0,0,148,146,1,0,0,0,148,149,1,0,0,0,149,27,
|
|
120
|
+
1,0,0,0,150,148,1,0,0,0,151,152,7,11,0,0,152,29,1,0,0,0,12,37,77,79,89,
|
|
121
|
+
99,104,111,116,125,130,135,148
|
|
122
|
+
};
|
|
123
|
+
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
|
|
124
|
+
|
|
125
|
+
antlr4::atn::ATNDeserializer deserializer;
|
|
126
|
+
staticData->atn = deserializer.deserialize(staticData->serializedATN);
|
|
127
|
+
|
|
128
|
+
const size_t count = staticData->atn->getNumberOfDecisions();
|
|
129
|
+
staticData->decisionToDFA.reserve(count);
|
|
130
|
+
for (size_t i = 0; i < count; i++) {
|
|
131
|
+
staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
|
|
132
|
+
}
|
|
133
|
+
fhirpathParserStaticData = staticData.release();
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
FHIRPathParser::FHIRPathParser(TokenStream *input) : FHIRPathParser(input, antlr4::atn::ParserATNSimulatorOptions()) {}
|
|
139
|
+
|
|
140
|
+
FHIRPathParser::FHIRPathParser(TokenStream *input, const antlr4::atn::ParserATNSimulatorOptions &options) : Parser(input) {
|
|
141
|
+
FHIRPathParser::initialize();
|
|
142
|
+
_interpreter = new atn::ParserATNSimulator(this, *fhirpathParserStaticData->atn, fhirpathParserStaticData->decisionToDFA, fhirpathParserStaticData->sharedContextCache, options);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
FHIRPathParser::~FHIRPathParser() {
|
|
146
|
+
delete _interpreter;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
const atn::ATN& FHIRPathParser::getATN() const {
|
|
150
|
+
return *fhirpathParserStaticData->atn;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
std::string FHIRPathParser::getGrammarFileName() const {
|
|
154
|
+
return "FHIRPath.g4";
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
const std::vector<std::string>& FHIRPathParser::getRuleNames() const {
|
|
158
|
+
return fhirpathParserStaticData->ruleNames;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const dfa::Vocabulary& FHIRPathParser::getVocabulary() const {
|
|
162
|
+
return fhirpathParserStaticData->vocabulary;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
antlr4::atn::SerializedATNView FHIRPathParser::getSerializedATN() const {
|
|
166
|
+
return fhirpathParserStaticData->serializedATN;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
//----------------- EntireExpressionContext ------------------------------------------------------------------
|
|
171
|
+
|
|
172
|
+
FHIRPathParser::EntireExpressionContext::EntireExpressionContext(ParserRuleContext *parent, size_t invokingState)
|
|
173
|
+
: ParserRuleContext(parent, invokingState) {
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::EntireExpressionContext::expression() {
|
|
177
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(0);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
tree::TerminalNode* FHIRPathParser::EntireExpressionContext::EOF() {
|
|
181
|
+
return getToken(FHIRPathParser::EOF, 0);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
size_t FHIRPathParser::EntireExpressionContext::getRuleIndex() const {
|
|
186
|
+
return FHIRPathParser::RuleEntireExpression;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
void FHIRPathParser::EntireExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
190
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
191
|
+
if (parserListener != nullptr)
|
|
192
|
+
parserListener->enterEntireExpression(this);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
void FHIRPathParser::EntireExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
196
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
197
|
+
if (parserListener != nullptr)
|
|
198
|
+
parserListener->exitEntireExpression(this);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
std::any FHIRPathParser::EntireExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
203
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
204
|
+
return parserVisitor->visitEntireExpression(this);
|
|
205
|
+
else
|
|
206
|
+
return visitor->visitChildren(this);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
FHIRPathParser::EntireExpressionContext* FHIRPathParser::entireExpression() {
|
|
210
|
+
EntireExpressionContext *_localctx = _tracker.createInstance<EntireExpressionContext>(_ctx, getState());
|
|
211
|
+
enterRule(_localctx, 0, FHIRPathParser::RuleEntireExpression);
|
|
212
|
+
|
|
213
|
+
#if __cplusplus > 201703L
|
|
214
|
+
auto onExit = finally([=, this] {
|
|
215
|
+
#else
|
|
216
|
+
auto onExit = finally([=] {
|
|
217
|
+
#endif
|
|
218
|
+
exitRule();
|
|
219
|
+
});
|
|
220
|
+
try {
|
|
221
|
+
enterOuterAlt(_localctx, 1);
|
|
222
|
+
setState(30);
|
|
223
|
+
expression(0);
|
|
224
|
+
setState(31);
|
|
225
|
+
match(FHIRPathParser::EOF);
|
|
226
|
+
|
|
227
|
+
}
|
|
228
|
+
catch (RecognitionException &e) {
|
|
229
|
+
_errHandler->reportError(this, e);
|
|
230
|
+
_localctx->exception = std::current_exception();
|
|
231
|
+
_errHandler->recover(this, _localctx->exception);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
return _localctx;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
//----------------- ExpressionContext ------------------------------------------------------------------
|
|
238
|
+
|
|
239
|
+
FHIRPathParser::ExpressionContext::ExpressionContext(ParserRuleContext *parent, size_t invokingState)
|
|
240
|
+
: ParserRuleContext(parent, invokingState) {
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
size_t FHIRPathParser::ExpressionContext::getRuleIndex() const {
|
|
245
|
+
return FHIRPathParser::RuleExpression;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
void FHIRPathParser::ExpressionContext::copyFrom(ExpressionContext *ctx) {
|
|
249
|
+
ParserRuleContext::copyFrom(ctx);
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
//----------------- IndexerExpressionContext ------------------------------------------------------------------
|
|
253
|
+
|
|
254
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::IndexerExpressionContext::expression() {
|
|
255
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::IndexerExpressionContext::expression(size_t i) {
|
|
259
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
FHIRPathParser::IndexerExpressionContext::IndexerExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
263
|
+
|
|
264
|
+
void FHIRPathParser::IndexerExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
265
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
266
|
+
if (parserListener != nullptr)
|
|
267
|
+
parserListener->enterIndexerExpression(this);
|
|
268
|
+
}
|
|
269
|
+
void FHIRPathParser::IndexerExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
270
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
271
|
+
if (parserListener != nullptr)
|
|
272
|
+
parserListener->exitIndexerExpression(this);
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
std::any FHIRPathParser::IndexerExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
276
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
277
|
+
return parserVisitor->visitIndexerExpression(this);
|
|
278
|
+
else
|
|
279
|
+
return visitor->visitChildren(this);
|
|
280
|
+
}
|
|
281
|
+
//----------------- PolarityExpressionContext ------------------------------------------------------------------
|
|
282
|
+
|
|
283
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::PolarityExpressionContext::expression() {
|
|
284
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(0);
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
FHIRPathParser::PolarityExpressionContext::PolarityExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
288
|
+
|
|
289
|
+
void FHIRPathParser::PolarityExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
290
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
291
|
+
if (parserListener != nullptr)
|
|
292
|
+
parserListener->enterPolarityExpression(this);
|
|
293
|
+
}
|
|
294
|
+
void FHIRPathParser::PolarityExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
295
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
296
|
+
if (parserListener != nullptr)
|
|
297
|
+
parserListener->exitPolarityExpression(this);
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
std::any FHIRPathParser::PolarityExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
301
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
302
|
+
return parserVisitor->visitPolarityExpression(this);
|
|
303
|
+
else
|
|
304
|
+
return visitor->visitChildren(this);
|
|
305
|
+
}
|
|
306
|
+
//----------------- AdditiveExpressionContext ------------------------------------------------------------------
|
|
307
|
+
|
|
308
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::AdditiveExpressionContext::expression() {
|
|
309
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::AdditiveExpressionContext::expression(size_t i) {
|
|
313
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
FHIRPathParser::AdditiveExpressionContext::AdditiveExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
317
|
+
|
|
318
|
+
void FHIRPathParser::AdditiveExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
319
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
320
|
+
if (parserListener != nullptr)
|
|
321
|
+
parserListener->enterAdditiveExpression(this);
|
|
322
|
+
}
|
|
323
|
+
void FHIRPathParser::AdditiveExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
324
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
325
|
+
if (parserListener != nullptr)
|
|
326
|
+
parserListener->exitAdditiveExpression(this);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
std::any FHIRPathParser::AdditiveExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
330
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
331
|
+
return parserVisitor->visitAdditiveExpression(this);
|
|
332
|
+
else
|
|
333
|
+
return visitor->visitChildren(this);
|
|
334
|
+
}
|
|
335
|
+
//----------------- MultiplicativeExpressionContext ------------------------------------------------------------------
|
|
336
|
+
|
|
337
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::MultiplicativeExpressionContext::expression() {
|
|
338
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::MultiplicativeExpressionContext::expression(size_t i) {
|
|
342
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
FHIRPathParser::MultiplicativeExpressionContext::MultiplicativeExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
346
|
+
|
|
347
|
+
void FHIRPathParser::MultiplicativeExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
348
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
349
|
+
if (parserListener != nullptr)
|
|
350
|
+
parserListener->enterMultiplicativeExpression(this);
|
|
351
|
+
}
|
|
352
|
+
void FHIRPathParser::MultiplicativeExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
353
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
354
|
+
if (parserListener != nullptr)
|
|
355
|
+
parserListener->exitMultiplicativeExpression(this);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
std::any FHIRPathParser::MultiplicativeExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
359
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
360
|
+
return parserVisitor->visitMultiplicativeExpression(this);
|
|
361
|
+
else
|
|
362
|
+
return visitor->visitChildren(this);
|
|
363
|
+
}
|
|
364
|
+
//----------------- UnionExpressionContext ------------------------------------------------------------------
|
|
365
|
+
|
|
366
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::UnionExpressionContext::expression() {
|
|
367
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::UnionExpressionContext::expression(size_t i) {
|
|
371
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
FHIRPathParser::UnionExpressionContext::UnionExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
375
|
+
|
|
376
|
+
void FHIRPathParser::UnionExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
377
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
378
|
+
if (parserListener != nullptr)
|
|
379
|
+
parserListener->enterUnionExpression(this);
|
|
380
|
+
}
|
|
381
|
+
void FHIRPathParser::UnionExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
382
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
383
|
+
if (parserListener != nullptr)
|
|
384
|
+
parserListener->exitUnionExpression(this);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
std::any FHIRPathParser::UnionExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
388
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
389
|
+
return parserVisitor->visitUnionExpression(this);
|
|
390
|
+
else
|
|
391
|
+
return visitor->visitChildren(this);
|
|
392
|
+
}
|
|
393
|
+
//----------------- OrExpressionContext ------------------------------------------------------------------
|
|
394
|
+
|
|
395
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::OrExpressionContext::expression() {
|
|
396
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::OrExpressionContext::expression(size_t i) {
|
|
400
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
FHIRPathParser::OrExpressionContext::OrExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
404
|
+
|
|
405
|
+
void FHIRPathParser::OrExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
406
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
407
|
+
if (parserListener != nullptr)
|
|
408
|
+
parserListener->enterOrExpression(this);
|
|
409
|
+
}
|
|
410
|
+
void FHIRPathParser::OrExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
411
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
412
|
+
if (parserListener != nullptr)
|
|
413
|
+
parserListener->exitOrExpression(this);
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
std::any FHIRPathParser::OrExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
417
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
418
|
+
return parserVisitor->visitOrExpression(this);
|
|
419
|
+
else
|
|
420
|
+
return visitor->visitChildren(this);
|
|
421
|
+
}
|
|
422
|
+
//----------------- AndExpressionContext ------------------------------------------------------------------
|
|
423
|
+
|
|
424
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::AndExpressionContext::expression() {
|
|
425
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::AndExpressionContext::expression(size_t i) {
|
|
429
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
FHIRPathParser::AndExpressionContext::AndExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
433
|
+
|
|
434
|
+
void FHIRPathParser::AndExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
435
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
436
|
+
if (parserListener != nullptr)
|
|
437
|
+
parserListener->enterAndExpression(this);
|
|
438
|
+
}
|
|
439
|
+
void FHIRPathParser::AndExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
440
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
441
|
+
if (parserListener != nullptr)
|
|
442
|
+
parserListener->exitAndExpression(this);
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
std::any FHIRPathParser::AndExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
446
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
447
|
+
return parserVisitor->visitAndExpression(this);
|
|
448
|
+
else
|
|
449
|
+
return visitor->visitChildren(this);
|
|
450
|
+
}
|
|
451
|
+
//----------------- MembershipExpressionContext ------------------------------------------------------------------
|
|
452
|
+
|
|
453
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::MembershipExpressionContext::expression() {
|
|
454
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::MembershipExpressionContext::expression(size_t i) {
|
|
458
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
FHIRPathParser::MembershipExpressionContext::MembershipExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
462
|
+
|
|
463
|
+
void FHIRPathParser::MembershipExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
464
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
465
|
+
if (parserListener != nullptr)
|
|
466
|
+
parserListener->enterMembershipExpression(this);
|
|
467
|
+
}
|
|
468
|
+
void FHIRPathParser::MembershipExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
469
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
470
|
+
if (parserListener != nullptr)
|
|
471
|
+
parserListener->exitMembershipExpression(this);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
std::any FHIRPathParser::MembershipExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
475
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
476
|
+
return parserVisitor->visitMembershipExpression(this);
|
|
477
|
+
else
|
|
478
|
+
return visitor->visitChildren(this);
|
|
479
|
+
}
|
|
480
|
+
//----------------- InequalityExpressionContext ------------------------------------------------------------------
|
|
481
|
+
|
|
482
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::InequalityExpressionContext::expression() {
|
|
483
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::InequalityExpressionContext::expression(size_t i) {
|
|
487
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
FHIRPathParser::InequalityExpressionContext::InequalityExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
491
|
+
|
|
492
|
+
void FHIRPathParser::InequalityExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
493
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
494
|
+
if (parserListener != nullptr)
|
|
495
|
+
parserListener->enterInequalityExpression(this);
|
|
496
|
+
}
|
|
497
|
+
void FHIRPathParser::InequalityExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
498
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
499
|
+
if (parserListener != nullptr)
|
|
500
|
+
parserListener->exitInequalityExpression(this);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
std::any FHIRPathParser::InequalityExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
504
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
505
|
+
return parserVisitor->visitInequalityExpression(this);
|
|
506
|
+
else
|
|
507
|
+
return visitor->visitChildren(this);
|
|
508
|
+
}
|
|
509
|
+
//----------------- InvocationExpressionContext ------------------------------------------------------------------
|
|
510
|
+
|
|
511
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::InvocationExpressionContext::expression() {
|
|
512
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(0);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
FHIRPathParser::InvocationContext* FHIRPathParser::InvocationExpressionContext::invocation() {
|
|
516
|
+
return getRuleContext<FHIRPathParser::InvocationContext>(0);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
FHIRPathParser::InvocationExpressionContext::InvocationExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
520
|
+
|
|
521
|
+
void FHIRPathParser::InvocationExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
522
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
523
|
+
if (parserListener != nullptr)
|
|
524
|
+
parserListener->enterInvocationExpression(this);
|
|
525
|
+
}
|
|
526
|
+
void FHIRPathParser::InvocationExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
527
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
528
|
+
if (parserListener != nullptr)
|
|
529
|
+
parserListener->exitInvocationExpression(this);
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
std::any FHIRPathParser::InvocationExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
533
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
534
|
+
return parserVisitor->visitInvocationExpression(this);
|
|
535
|
+
else
|
|
536
|
+
return visitor->visitChildren(this);
|
|
537
|
+
}
|
|
538
|
+
//----------------- EqualityExpressionContext ------------------------------------------------------------------
|
|
539
|
+
|
|
540
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::EqualityExpressionContext::expression() {
|
|
541
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::EqualityExpressionContext::expression(size_t i) {
|
|
545
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
FHIRPathParser::EqualityExpressionContext::EqualityExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
549
|
+
|
|
550
|
+
void FHIRPathParser::EqualityExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
551
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
552
|
+
if (parserListener != nullptr)
|
|
553
|
+
parserListener->enterEqualityExpression(this);
|
|
554
|
+
}
|
|
555
|
+
void FHIRPathParser::EqualityExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
556
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
557
|
+
if (parserListener != nullptr)
|
|
558
|
+
parserListener->exitEqualityExpression(this);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
std::any FHIRPathParser::EqualityExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
562
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
563
|
+
return parserVisitor->visitEqualityExpression(this);
|
|
564
|
+
else
|
|
565
|
+
return visitor->visitChildren(this);
|
|
566
|
+
}
|
|
567
|
+
//----------------- ImpliesExpressionContext ------------------------------------------------------------------
|
|
568
|
+
|
|
569
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::ImpliesExpressionContext::expression() {
|
|
570
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::ImpliesExpressionContext::expression(size_t i) {
|
|
574
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
FHIRPathParser::ImpliesExpressionContext::ImpliesExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
578
|
+
|
|
579
|
+
void FHIRPathParser::ImpliesExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
580
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
581
|
+
if (parserListener != nullptr)
|
|
582
|
+
parserListener->enterImpliesExpression(this);
|
|
583
|
+
}
|
|
584
|
+
void FHIRPathParser::ImpliesExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
585
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
586
|
+
if (parserListener != nullptr)
|
|
587
|
+
parserListener->exitImpliesExpression(this);
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
std::any FHIRPathParser::ImpliesExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
591
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
592
|
+
return parserVisitor->visitImpliesExpression(this);
|
|
593
|
+
else
|
|
594
|
+
return visitor->visitChildren(this);
|
|
595
|
+
}
|
|
596
|
+
//----------------- TermExpressionContext ------------------------------------------------------------------
|
|
597
|
+
|
|
598
|
+
FHIRPathParser::TermContext* FHIRPathParser::TermExpressionContext::term() {
|
|
599
|
+
return getRuleContext<FHIRPathParser::TermContext>(0);
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
FHIRPathParser::TermExpressionContext::TermExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
603
|
+
|
|
604
|
+
void FHIRPathParser::TermExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
605
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
606
|
+
if (parserListener != nullptr)
|
|
607
|
+
parserListener->enterTermExpression(this);
|
|
608
|
+
}
|
|
609
|
+
void FHIRPathParser::TermExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
610
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
611
|
+
if (parserListener != nullptr)
|
|
612
|
+
parserListener->exitTermExpression(this);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
std::any FHIRPathParser::TermExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
616
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
617
|
+
return parserVisitor->visitTermExpression(this);
|
|
618
|
+
else
|
|
619
|
+
return visitor->visitChildren(this);
|
|
620
|
+
}
|
|
621
|
+
//----------------- TypeExpressionContext ------------------------------------------------------------------
|
|
622
|
+
|
|
623
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::TypeExpressionContext::expression() {
|
|
624
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(0);
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
FHIRPathParser::TypeSpecifierContext* FHIRPathParser::TypeExpressionContext::typeSpecifier() {
|
|
628
|
+
return getRuleContext<FHIRPathParser::TypeSpecifierContext>(0);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
FHIRPathParser::TypeExpressionContext::TypeExpressionContext(ExpressionContext *ctx) { copyFrom(ctx); }
|
|
632
|
+
|
|
633
|
+
void FHIRPathParser::TypeExpressionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
634
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
635
|
+
if (parserListener != nullptr)
|
|
636
|
+
parserListener->enterTypeExpression(this);
|
|
637
|
+
}
|
|
638
|
+
void FHIRPathParser::TypeExpressionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
639
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
640
|
+
if (parserListener != nullptr)
|
|
641
|
+
parserListener->exitTypeExpression(this);
|
|
642
|
+
}
|
|
643
|
+
|
|
644
|
+
std::any FHIRPathParser::TypeExpressionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
645
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
646
|
+
return parserVisitor->visitTypeExpression(this);
|
|
647
|
+
else
|
|
648
|
+
return visitor->visitChildren(this);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::expression() {
|
|
652
|
+
return expression(0);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::expression(int precedence) {
|
|
656
|
+
ParserRuleContext *parentContext = _ctx;
|
|
657
|
+
size_t parentState = getState();
|
|
658
|
+
FHIRPathParser::ExpressionContext *_localctx = _tracker.createInstance<ExpressionContext>(_ctx, parentState);
|
|
659
|
+
FHIRPathParser::ExpressionContext *previousContext = _localctx;
|
|
660
|
+
(void)previousContext; // Silence compiler, in case the context is not used by generated code.
|
|
661
|
+
size_t startState = 2;
|
|
662
|
+
enterRecursionRule(_localctx, 2, FHIRPathParser::RuleExpression, precedence);
|
|
663
|
+
|
|
664
|
+
size_t _la = 0;
|
|
665
|
+
|
|
666
|
+
#if __cplusplus > 201703L
|
|
667
|
+
auto onExit = finally([=, this] {
|
|
668
|
+
#else
|
|
669
|
+
auto onExit = finally([=] {
|
|
670
|
+
#endif
|
|
671
|
+
unrollRecursionContexts(parentContext);
|
|
672
|
+
});
|
|
673
|
+
try {
|
|
674
|
+
size_t alt;
|
|
675
|
+
enterOuterAlt(_localctx, 1);
|
|
676
|
+
setState(37);
|
|
677
|
+
_errHandler->sync(this);
|
|
678
|
+
switch (_input->LA(1)) {
|
|
679
|
+
case FHIRPathParser::T__15:
|
|
680
|
+
case FHIRPathParser::T__16:
|
|
681
|
+
case FHIRPathParser::T__21:
|
|
682
|
+
case FHIRPathParser::T__22:
|
|
683
|
+
case FHIRPathParser::T__27:
|
|
684
|
+
case FHIRPathParser::T__29:
|
|
685
|
+
case FHIRPathParser::T__31:
|
|
686
|
+
case FHIRPathParser::T__32:
|
|
687
|
+
case FHIRPathParser::T__33:
|
|
688
|
+
case FHIRPathParser::T__34:
|
|
689
|
+
case FHIRPathParser::T__35:
|
|
690
|
+
case FHIRPathParser::T__36:
|
|
691
|
+
case FHIRPathParser::DATETIME:
|
|
692
|
+
case FHIRPathParser::TIME:
|
|
693
|
+
case FHIRPathParser::IDENTIFIER:
|
|
694
|
+
case FHIRPathParser::DELIMITEDIDENTIFIER:
|
|
695
|
+
case FHIRPathParser::STRING:
|
|
696
|
+
case FHIRPathParser::NUMBER: {
|
|
697
|
+
_localctx = _tracker.createInstance<TermExpressionContext>(_localctx);
|
|
698
|
+
_ctx = _localctx;
|
|
699
|
+
previousContext = _localctx;
|
|
700
|
+
|
|
701
|
+
setState(34);
|
|
702
|
+
term();
|
|
703
|
+
break;
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
case FHIRPathParser::T__3:
|
|
707
|
+
case FHIRPathParser::T__4: {
|
|
708
|
+
_localctx = _tracker.createInstance<PolarityExpressionContext>(_localctx);
|
|
709
|
+
_ctx = _localctx;
|
|
710
|
+
previousContext = _localctx;
|
|
711
|
+
setState(35);
|
|
712
|
+
_la = _input->LA(1);
|
|
713
|
+
if (!(_la == FHIRPathParser::T__3
|
|
714
|
+
|
|
715
|
+
|| _la == FHIRPathParser::T__4)) {
|
|
716
|
+
_errHandler->recoverInline(this);
|
|
717
|
+
}
|
|
718
|
+
else {
|
|
719
|
+
_errHandler->reportMatch(this);
|
|
720
|
+
consume();
|
|
721
|
+
}
|
|
722
|
+
setState(36);
|
|
723
|
+
expression(11);
|
|
724
|
+
break;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
default:
|
|
728
|
+
throw NoViableAltException(this);
|
|
729
|
+
}
|
|
730
|
+
_ctx->stop = _input->LT(-1);
|
|
731
|
+
setState(79);
|
|
732
|
+
_errHandler->sync(this);
|
|
733
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 2, _ctx);
|
|
734
|
+
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
|
|
735
|
+
if (alt == 1) {
|
|
736
|
+
if (!_parseListeners.empty())
|
|
737
|
+
triggerExitRuleEvent();
|
|
738
|
+
previousContext = _localctx;
|
|
739
|
+
setState(77);
|
|
740
|
+
_errHandler->sync(this);
|
|
741
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 1, _ctx)) {
|
|
742
|
+
case 1: {
|
|
743
|
+
auto newContext = _tracker.createInstance<MultiplicativeExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
744
|
+
_localctx = newContext;
|
|
745
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
746
|
+
setState(39);
|
|
747
|
+
|
|
748
|
+
if (!(precpred(_ctx, 10))) throw FailedPredicateException(this, "precpred(_ctx, 10)");
|
|
749
|
+
setState(40);
|
|
750
|
+
_la = _input->LA(1);
|
|
751
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
752
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__5)
|
|
753
|
+
| (1ULL << FHIRPathParser::T__6)
|
|
754
|
+
| (1ULL << FHIRPathParser::T__7)
|
|
755
|
+
| (1ULL << FHIRPathParser::T__8))) != 0))) {
|
|
756
|
+
_errHandler->recoverInline(this);
|
|
757
|
+
}
|
|
758
|
+
else {
|
|
759
|
+
_errHandler->reportMatch(this);
|
|
760
|
+
consume();
|
|
761
|
+
}
|
|
762
|
+
setState(41);
|
|
763
|
+
expression(11);
|
|
764
|
+
break;
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
case 2: {
|
|
768
|
+
auto newContext = _tracker.createInstance<AdditiveExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
769
|
+
_localctx = newContext;
|
|
770
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
771
|
+
setState(42);
|
|
772
|
+
|
|
773
|
+
if (!(precpred(_ctx, 9))) throw FailedPredicateException(this, "precpred(_ctx, 9)");
|
|
774
|
+
setState(43);
|
|
775
|
+
_la = _input->LA(1);
|
|
776
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
777
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__3)
|
|
778
|
+
| (1ULL << FHIRPathParser::T__4)
|
|
779
|
+
| (1ULL << FHIRPathParser::T__9))) != 0))) {
|
|
780
|
+
_errHandler->recoverInline(this);
|
|
781
|
+
}
|
|
782
|
+
else {
|
|
783
|
+
_errHandler->reportMatch(this);
|
|
784
|
+
consume();
|
|
785
|
+
}
|
|
786
|
+
setState(44);
|
|
787
|
+
expression(10);
|
|
788
|
+
break;
|
|
789
|
+
}
|
|
790
|
+
|
|
791
|
+
case 3: {
|
|
792
|
+
auto newContext = _tracker.createInstance<UnionExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
793
|
+
_localctx = newContext;
|
|
794
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
795
|
+
setState(45);
|
|
796
|
+
|
|
797
|
+
if (!(precpred(_ctx, 8))) throw FailedPredicateException(this, "precpred(_ctx, 8)");
|
|
798
|
+
setState(46);
|
|
799
|
+
match(FHIRPathParser::T__10);
|
|
800
|
+
setState(47);
|
|
801
|
+
expression(9);
|
|
802
|
+
break;
|
|
803
|
+
}
|
|
804
|
+
|
|
805
|
+
case 4: {
|
|
806
|
+
auto newContext = _tracker.createInstance<InequalityExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
807
|
+
_localctx = newContext;
|
|
808
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
809
|
+
setState(48);
|
|
810
|
+
|
|
811
|
+
if (!(precpred(_ctx, 7))) throw FailedPredicateException(this, "precpred(_ctx, 7)");
|
|
812
|
+
setState(49);
|
|
813
|
+
_la = _input->LA(1);
|
|
814
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
815
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__11)
|
|
816
|
+
| (1ULL << FHIRPathParser::T__12)
|
|
817
|
+
| (1ULL << FHIRPathParser::T__13)
|
|
818
|
+
| (1ULL << FHIRPathParser::T__14))) != 0))) {
|
|
819
|
+
_errHandler->recoverInline(this);
|
|
820
|
+
}
|
|
821
|
+
else {
|
|
822
|
+
_errHandler->reportMatch(this);
|
|
823
|
+
consume();
|
|
824
|
+
}
|
|
825
|
+
setState(50);
|
|
826
|
+
expression(8);
|
|
827
|
+
break;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
case 5: {
|
|
831
|
+
auto newContext = _tracker.createInstance<EqualityExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
832
|
+
_localctx = newContext;
|
|
833
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
834
|
+
setState(51);
|
|
835
|
+
|
|
836
|
+
if (!(precpred(_ctx, 5))) throw FailedPredicateException(this, "precpred(_ctx, 5)");
|
|
837
|
+
setState(52);
|
|
838
|
+
_la = _input->LA(1);
|
|
839
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
840
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__17)
|
|
841
|
+
| (1ULL << FHIRPathParser::T__18)
|
|
842
|
+
| (1ULL << FHIRPathParser::T__19)
|
|
843
|
+
| (1ULL << FHIRPathParser::T__20))) != 0))) {
|
|
844
|
+
_errHandler->recoverInline(this);
|
|
845
|
+
}
|
|
846
|
+
else {
|
|
847
|
+
_errHandler->reportMatch(this);
|
|
848
|
+
consume();
|
|
849
|
+
}
|
|
850
|
+
setState(53);
|
|
851
|
+
expression(6);
|
|
852
|
+
break;
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
case 6: {
|
|
856
|
+
auto newContext = _tracker.createInstance<MembershipExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
857
|
+
_localctx = newContext;
|
|
858
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
859
|
+
setState(54);
|
|
860
|
+
|
|
861
|
+
if (!(precpred(_ctx, 4))) throw FailedPredicateException(this, "precpred(_ctx, 4)");
|
|
862
|
+
setState(55);
|
|
863
|
+
_la = _input->LA(1);
|
|
864
|
+
if (!(_la == FHIRPathParser::T__21
|
|
865
|
+
|
|
866
|
+
|| _la == FHIRPathParser::T__22)) {
|
|
867
|
+
_errHandler->recoverInline(this);
|
|
868
|
+
}
|
|
869
|
+
else {
|
|
870
|
+
_errHandler->reportMatch(this);
|
|
871
|
+
consume();
|
|
872
|
+
}
|
|
873
|
+
setState(56);
|
|
874
|
+
expression(5);
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
case 7: {
|
|
879
|
+
auto newContext = _tracker.createInstance<AndExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
880
|
+
_localctx = newContext;
|
|
881
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
882
|
+
setState(57);
|
|
883
|
+
|
|
884
|
+
if (!(precpred(_ctx, 3))) throw FailedPredicateException(this, "precpred(_ctx, 3)");
|
|
885
|
+
setState(58);
|
|
886
|
+
match(FHIRPathParser::T__23);
|
|
887
|
+
setState(59);
|
|
888
|
+
expression(4);
|
|
889
|
+
break;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
case 8: {
|
|
893
|
+
auto newContext = _tracker.createInstance<OrExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
894
|
+
_localctx = newContext;
|
|
895
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
896
|
+
setState(60);
|
|
897
|
+
|
|
898
|
+
if (!(precpred(_ctx, 2))) throw FailedPredicateException(this, "precpred(_ctx, 2)");
|
|
899
|
+
setState(61);
|
|
900
|
+
_la = _input->LA(1);
|
|
901
|
+
if (!(_la == FHIRPathParser::T__24
|
|
902
|
+
|
|
903
|
+
|| _la == FHIRPathParser::T__25)) {
|
|
904
|
+
_errHandler->recoverInline(this);
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
_errHandler->reportMatch(this);
|
|
908
|
+
consume();
|
|
909
|
+
}
|
|
910
|
+
setState(62);
|
|
911
|
+
expression(3);
|
|
912
|
+
break;
|
|
913
|
+
}
|
|
914
|
+
|
|
915
|
+
case 9: {
|
|
916
|
+
auto newContext = _tracker.createInstance<ImpliesExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
917
|
+
_localctx = newContext;
|
|
918
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
919
|
+
setState(63);
|
|
920
|
+
|
|
921
|
+
if (!(precpred(_ctx, 1))) throw FailedPredicateException(this, "precpred(_ctx, 1)");
|
|
922
|
+
setState(64);
|
|
923
|
+
match(FHIRPathParser::T__26);
|
|
924
|
+
setState(65);
|
|
925
|
+
expression(2);
|
|
926
|
+
break;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
case 10: {
|
|
930
|
+
auto newContext = _tracker.createInstance<InvocationExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
931
|
+
_localctx = newContext;
|
|
932
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
933
|
+
setState(66);
|
|
934
|
+
|
|
935
|
+
if (!(precpred(_ctx, 13))) throw FailedPredicateException(this, "precpred(_ctx, 13)");
|
|
936
|
+
setState(67);
|
|
937
|
+
match(FHIRPathParser::T__0);
|
|
938
|
+
setState(68);
|
|
939
|
+
invocation();
|
|
940
|
+
break;
|
|
941
|
+
}
|
|
942
|
+
|
|
943
|
+
case 11: {
|
|
944
|
+
auto newContext = _tracker.createInstance<IndexerExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
945
|
+
_localctx = newContext;
|
|
946
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
947
|
+
setState(69);
|
|
948
|
+
|
|
949
|
+
if (!(precpred(_ctx, 12))) throw FailedPredicateException(this, "precpred(_ctx, 12)");
|
|
950
|
+
setState(70);
|
|
951
|
+
match(FHIRPathParser::T__1);
|
|
952
|
+
setState(71);
|
|
953
|
+
expression(0);
|
|
954
|
+
setState(72);
|
|
955
|
+
match(FHIRPathParser::T__2);
|
|
956
|
+
break;
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
case 12: {
|
|
960
|
+
auto newContext = _tracker.createInstance<TypeExpressionContext>(_tracker.createInstance<ExpressionContext>(parentContext, parentState));
|
|
961
|
+
_localctx = newContext;
|
|
962
|
+
pushNewRecursionContext(newContext, startState, RuleExpression);
|
|
963
|
+
setState(74);
|
|
964
|
+
|
|
965
|
+
if (!(precpred(_ctx, 6))) throw FailedPredicateException(this, "precpred(_ctx, 6)");
|
|
966
|
+
setState(75);
|
|
967
|
+
_la = _input->LA(1);
|
|
968
|
+
if (!(_la == FHIRPathParser::T__15
|
|
969
|
+
|
|
970
|
+
|| _la == FHIRPathParser::T__16)) {
|
|
971
|
+
_errHandler->recoverInline(this);
|
|
972
|
+
}
|
|
973
|
+
else {
|
|
974
|
+
_errHandler->reportMatch(this);
|
|
975
|
+
consume();
|
|
976
|
+
}
|
|
977
|
+
setState(76);
|
|
978
|
+
typeSpecifier();
|
|
979
|
+
break;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
default:
|
|
983
|
+
break;
|
|
984
|
+
}
|
|
985
|
+
}
|
|
986
|
+
setState(81);
|
|
987
|
+
_errHandler->sync(this);
|
|
988
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 2, _ctx);
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
catch (RecognitionException &e) {
|
|
992
|
+
_errHandler->reportError(this, e);
|
|
993
|
+
_localctx->exception = std::current_exception();
|
|
994
|
+
_errHandler->recover(this, _localctx->exception);
|
|
995
|
+
}
|
|
996
|
+
return _localctx;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
//----------------- TermContext ------------------------------------------------------------------
|
|
1000
|
+
|
|
1001
|
+
FHIRPathParser::TermContext::TermContext(ParserRuleContext *parent, size_t invokingState)
|
|
1002
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1003
|
+
}
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
size_t FHIRPathParser::TermContext::getRuleIndex() const {
|
|
1007
|
+
return FHIRPathParser::RuleTerm;
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
void FHIRPathParser::TermContext::copyFrom(TermContext *ctx) {
|
|
1011
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
//----------------- ExternalConstantTermContext ------------------------------------------------------------------
|
|
1015
|
+
|
|
1016
|
+
FHIRPathParser::ExternalConstantContext* FHIRPathParser::ExternalConstantTermContext::externalConstant() {
|
|
1017
|
+
return getRuleContext<FHIRPathParser::ExternalConstantContext>(0);
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
FHIRPathParser::ExternalConstantTermContext::ExternalConstantTermContext(TermContext *ctx) { copyFrom(ctx); }
|
|
1021
|
+
|
|
1022
|
+
void FHIRPathParser::ExternalConstantTermContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1023
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1024
|
+
if (parserListener != nullptr)
|
|
1025
|
+
parserListener->enterExternalConstantTerm(this);
|
|
1026
|
+
}
|
|
1027
|
+
void FHIRPathParser::ExternalConstantTermContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1028
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1029
|
+
if (parserListener != nullptr)
|
|
1030
|
+
parserListener->exitExternalConstantTerm(this);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
1033
|
+
std::any FHIRPathParser::ExternalConstantTermContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1034
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1035
|
+
return parserVisitor->visitExternalConstantTerm(this);
|
|
1036
|
+
else
|
|
1037
|
+
return visitor->visitChildren(this);
|
|
1038
|
+
}
|
|
1039
|
+
//----------------- LiteralTermContext ------------------------------------------------------------------
|
|
1040
|
+
|
|
1041
|
+
FHIRPathParser::LiteralContext* FHIRPathParser::LiteralTermContext::literal() {
|
|
1042
|
+
return getRuleContext<FHIRPathParser::LiteralContext>(0);
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
FHIRPathParser::LiteralTermContext::LiteralTermContext(TermContext *ctx) { copyFrom(ctx); }
|
|
1046
|
+
|
|
1047
|
+
void FHIRPathParser::LiteralTermContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1048
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1049
|
+
if (parserListener != nullptr)
|
|
1050
|
+
parserListener->enterLiteralTerm(this);
|
|
1051
|
+
}
|
|
1052
|
+
void FHIRPathParser::LiteralTermContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1053
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1054
|
+
if (parserListener != nullptr)
|
|
1055
|
+
parserListener->exitLiteralTerm(this);
|
|
1056
|
+
}
|
|
1057
|
+
|
|
1058
|
+
std::any FHIRPathParser::LiteralTermContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1059
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1060
|
+
return parserVisitor->visitLiteralTerm(this);
|
|
1061
|
+
else
|
|
1062
|
+
return visitor->visitChildren(this);
|
|
1063
|
+
}
|
|
1064
|
+
//----------------- ParenthesizedTermContext ------------------------------------------------------------------
|
|
1065
|
+
|
|
1066
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::ParenthesizedTermContext::expression() {
|
|
1067
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(0);
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1070
|
+
FHIRPathParser::ParenthesizedTermContext::ParenthesizedTermContext(TermContext *ctx) { copyFrom(ctx); }
|
|
1071
|
+
|
|
1072
|
+
void FHIRPathParser::ParenthesizedTermContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1073
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1074
|
+
if (parserListener != nullptr)
|
|
1075
|
+
parserListener->enterParenthesizedTerm(this);
|
|
1076
|
+
}
|
|
1077
|
+
void FHIRPathParser::ParenthesizedTermContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1078
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1079
|
+
if (parserListener != nullptr)
|
|
1080
|
+
parserListener->exitParenthesizedTerm(this);
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
std::any FHIRPathParser::ParenthesizedTermContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1084
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1085
|
+
return parserVisitor->visitParenthesizedTerm(this);
|
|
1086
|
+
else
|
|
1087
|
+
return visitor->visitChildren(this);
|
|
1088
|
+
}
|
|
1089
|
+
//----------------- InvocationTermContext ------------------------------------------------------------------
|
|
1090
|
+
|
|
1091
|
+
FHIRPathParser::InvocationContext* FHIRPathParser::InvocationTermContext::invocation() {
|
|
1092
|
+
return getRuleContext<FHIRPathParser::InvocationContext>(0);
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
FHIRPathParser::InvocationTermContext::InvocationTermContext(TermContext *ctx) { copyFrom(ctx); }
|
|
1096
|
+
|
|
1097
|
+
void FHIRPathParser::InvocationTermContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1098
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1099
|
+
if (parserListener != nullptr)
|
|
1100
|
+
parserListener->enterInvocationTerm(this);
|
|
1101
|
+
}
|
|
1102
|
+
void FHIRPathParser::InvocationTermContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1103
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1104
|
+
if (parserListener != nullptr)
|
|
1105
|
+
parserListener->exitInvocationTerm(this);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
std::any FHIRPathParser::InvocationTermContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1109
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1110
|
+
return parserVisitor->visitInvocationTerm(this);
|
|
1111
|
+
else
|
|
1112
|
+
return visitor->visitChildren(this);
|
|
1113
|
+
}
|
|
1114
|
+
FHIRPathParser::TermContext* FHIRPathParser::term() {
|
|
1115
|
+
TermContext *_localctx = _tracker.createInstance<TermContext>(_ctx, getState());
|
|
1116
|
+
enterRule(_localctx, 4, FHIRPathParser::RuleTerm);
|
|
1117
|
+
|
|
1118
|
+
#if __cplusplus > 201703L
|
|
1119
|
+
auto onExit = finally([=, this] {
|
|
1120
|
+
#else
|
|
1121
|
+
auto onExit = finally([=] {
|
|
1122
|
+
#endif
|
|
1123
|
+
exitRule();
|
|
1124
|
+
});
|
|
1125
|
+
try {
|
|
1126
|
+
setState(89);
|
|
1127
|
+
_errHandler->sync(this);
|
|
1128
|
+
switch (_input->LA(1)) {
|
|
1129
|
+
case FHIRPathParser::T__15:
|
|
1130
|
+
case FHIRPathParser::T__16:
|
|
1131
|
+
case FHIRPathParser::T__21:
|
|
1132
|
+
case FHIRPathParser::T__22:
|
|
1133
|
+
case FHIRPathParser::T__34:
|
|
1134
|
+
case FHIRPathParser::T__35:
|
|
1135
|
+
case FHIRPathParser::T__36:
|
|
1136
|
+
case FHIRPathParser::IDENTIFIER:
|
|
1137
|
+
case FHIRPathParser::DELIMITEDIDENTIFIER: {
|
|
1138
|
+
_localctx = _tracker.createInstance<FHIRPathParser::InvocationTermContext>(_localctx);
|
|
1139
|
+
enterOuterAlt(_localctx, 1);
|
|
1140
|
+
setState(82);
|
|
1141
|
+
invocation();
|
|
1142
|
+
break;
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
case FHIRPathParser::T__29:
|
|
1146
|
+
case FHIRPathParser::T__31:
|
|
1147
|
+
case FHIRPathParser::T__32:
|
|
1148
|
+
case FHIRPathParser::DATETIME:
|
|
1149
|
+
case FHIRPathParser::TIME:
|
|
1150
|
+
case FHIRPathParser::STRING:
|
|
1151
|
+
case FHIRPathParser::NUMBER: {
|
|
1152
|
+
_localctx = _tracker.createInstance<FHIRPathParser::LiteralTermContext>(_localctx);
|
|
1153
|
+
enterOuterAlt(_localctx, 2);
|
|
1154
|
+
setState(83);
|
|
1155
|
+
literal();
|
|
1156
|
+
break;
|
|
1157
|
+
}
|
|
1158
|
+
|
|
1159
|
+
case FHIRPathParser::T__33: {
|
|
1160
|
+
_localctx = _tracker.createInstance<FHIRPathParser::ExternalConstantTermContext>(_localctx);
|
|
1161
|
+
enterOuterAlt(_localctx, 3);
|
|
1162
|
+
setState(84);
|
|
1163
|
+
externalConstant();
|
|
1164
|
+
break;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
case FHIRPathParser::T__27: {
|
|
1168
|
+
_localctx = _tracker.createInstance<FHIRPathParser::ParenthesizedTermContext>(_localctx);
|
|
1169
|
+
enterOuterAlt(_localctx, 4);
|
|
1170
|
+
setState(85);
|
|
1171
|
+
match(FHIRPathParser::T__27);
|
|
1172
|
+
setState(86);
|
|
1173
|
+
expression(0);
|
|
1174
|
+
setState(87);
|
|
1175
|
+
match(FHIRPathParser::T__28);
|
|
1176
|
+
break;
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
default:
|
|
1180
|
+
throw NoViableAltException(this);
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
}
|
|
1184
|
+
catch (RecognitionException &e) {
|
|
1185
|
+
_errHandler->reportError(this, e);
|
|
1186
|
+
_localctx->exception = std::current_exception();
|
|
1187
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1188
|
+
}
|
|
1189
|
+
|
|
1190
|
+
return _localctx;
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
//----------------- LiteralContext ------------------------------------------------------------------
|
|
1194
|
+
|
|
1195
|
+
FHIRPathParser::LiteralContext::LiteralContext(ParserRuleContext *parent, size_t invokingState)
|
|
1196
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
|
|
1200
|
+
size_t FHIRPathParser::LiteralContext::getRuleIndex() const {
|
|
1201
|
+
return FHIRPathParser::RuleLiteral;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
void FHIRPathParser::LiteralContext::copyFrom(LiteralContext *ctx) {
|
|
1205
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
//----------------- TimeLiteralContext ------------------------------------------------------------------
|
|
1209
|
+
|
|
1210
|
+
tree::TerminalNode* FHIRPathParser::TimeLiteralContext::TIME() {
|
|
1211
|
+
return getToken(FHIRPathParser::TIME, 0);
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
FHIRPathParser::TimeLiteralContext::TimeLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1215
|
+
|
|
1216
|
+
void FHIRPathParser::TimeLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1217
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1218
|
+
if (parserListener != nullptr)
|
|
1219
|
+
parserListener->enterTimeLiteral(this);
|
|
1220
|
+
}
|
|
1221
|
+
void FHIRPathParser::TimeLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1222
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1223
|
+
if (parserListener != nullptr)
|
|
1224
|
+
parserListener->exitTimeLiteral(this);
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
std::any FHIRPathParser::TimeLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1228
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1229
|
+
return parserVisitor->visitTimeLiteral(this);
|
|
1230
|
+
else
|
|
1231
|
+
return visitor->visitChildren(this);
|
|
1232
|
+
}
|
|
1233
|
+
//----------------- NullLiteralContext ------------------------------------------------------------------
|
|
1234
|
+
|
|
1235
|
+
FHIRPathParser::NullLiteralContext::NullLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1236
|
+
|
|
1237
|
+
void FHIRPathParser::NullLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1238
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1239
|
+
if (parserListener != nullptr)
|
|
1240
|
+
parserListener->enterNullLiteral(this);
|
|
1241
|
+
}
|
|
1242
|
+
void FHIRPathParser::NullLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1243
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1244
|
+
if (parserListener != nullptr)
|
|
1245
|
+
parserListener->exitNullLiteral(this);
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
std::any FHIRPathParser::NullLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1249
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1250
|
+
return parserVisitor->visitNullLiteral(this);
|
|
1251
|
+
else
|
|
1252
|
+
return visitor->visitChildren(this);
|
|
1253
|
+
}
|
|
1254
|
+
//----------------- DateTimeLiteralContext ------------------------------------------------------------------
|
|
1255
|
+
|
|
1256
|
+
tree::TerminalNode* FHIRPathParser::DateTimeLiteralContext::DATETIME() {
|
|
1257
|
+
return getToken(FHIRPathParser::DATETIME, 0);
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
FHIRPathParser::DateTimeLiteralContext::DateTimeLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1261
|
+
|
|
1262
|
+
void FHIRPathParser::DateTimeLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1263
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1264
|
+
if (parserListener != nullptr)
|
|
1265
|
+
parserListener->enterDateTimeLiteral(this);
|
|
1266
|
+
}
|
|
1267
|
+
void FHIRPathParser::DateTimeLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1268
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1269
|
+
if (parserListener != nullptr)
|
|
1270
|
+
parserListener->exitDateTimeLiteral(this);
|
|
1271
|
+
}
|
|
1272
|
+
|
|
1273
|
+
std::any FHIRPathParser::DateTimeLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1274
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1275
|
+
return parserVisitor->visitDateTimeLiteral(this);
|
|
1276
|
+
else
|
|
1277
|
+
return visitor->visitChildren(this);
|
|
1278
|
+
}
|
|
1279
|
+
//----------------- StringLiteralContext ------------------------------------------------------------------
|
|
1280
|
+
|
|
1281
|
+
tree::TerminalNode* FHIRPathParser::StringLiteralContext::STRING() {
|
|
1282
|
+
return getToken(FHIRPathParser::STRING, 0);
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
FHIRPathParser::StringLiteralContext::StringLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1286
|
+
|
|
1287
|
+
void FHIRPathParser::StringLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1288
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1289
|
+
if (parserListener != nullptr)
|
|
1290
|
+
parserListener->enterStringLiteral(this);
|
|
1291
|
+
}
|
|
1292
|
+
void FHIRPathParser::StringLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1293
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1294
|
+
if (parserListener != nullptr)
|
|
1295
|
+
parserListener->exitStringLiteral(this);
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1298
|
+
std::any FHIRPathParser::StringLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1299
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1300
|
+
return parserVisitor->visitStringLiteral(this);
|
|
1301
|
+
else
|
|
1302
|
+
return visitor->visitChildren(this);
|
|
1303
|
+
}
|
|
1304
|
+
//----------------- BooleanLiteralContext ------------------------------------------------------------------
|
|
1305
|
+
|
|
1306
|
+
FHIRPathParser::BooleanLiteralContext::BooleanLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1307
|
+
|
|
1308
|
+
void FHIRPathParser::BooleanLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1309
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1310
|
+
if (parserListener != nullptr)
|
|
1311
|
+
parserListener->enterBooleanLiteral(this);
|
|
1312
|
+
}
|
|
1313
|
+
void FHIRPathParser::BooleanLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1314
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1315
|
+
if (parserListener != nullptr)
|
|
1316
|
+
parserListener->exitBooleanLiteral(this);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
std::any FHIRPathParser::BooleanLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1320
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1321
|
+
return parserVisitor->visitBooleanLiteral(this);
|
|
1322
|
+
else
|
|
1323
|
+
return visitor->visitChildren(this);
|
|
1324
|
+
}
|
|
1325
|
+
//----------------- NumberLiteralContext ------------------------------------------------------------------
|
|
1326
|
+
|
|
1327
|
+
tree::TerminalNode* FHIRPathParser::NumberLiteralContext::NUMBER() {
|
|
1328
|
+
return getToken(FHIRPathParser::NUMBER, 0);
|
|
1329
|
+
}
|
|
1330
|
+
|
|
1331
|
+
FHIRPathParser::NumberLiteralContext::NumberLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1332
|
+
|
|
1333
|
+
void FHIRPathParser::NumberLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1334
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1335
|
+
if (parserListener != nullptr)
|
|
1336
|
+
parserListener->enterNumberLiteral(this);
|
|
1337
|
+
}
|
|
1338
|
+
void FHIRPathParser::NumberLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1339
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1340
|
+
if (parserListener != nullptr)
|
|
1341
|
+
parserListener->exitNumberLiteral(this);
|
|
1342
|
+
}
|
|
1343
|
+
|
|
1344
|
+
std::any FHIRPathParser::NumberLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1345
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1346
|
+
return parserVisitor->visitNumberLiteral(this);
|
|
1347
|
+
else
|
|
1348
|
+
return visitor->visitChildren(this);
|
|
1349
|
+
}
|
|
1350
|
+
//----------------- QuantityLiteralContext ------------------------------------------------------------------
|
|
1351
|
+
|
|
1352
|
+
FHIRPathParser::QuantityContext* FHIRPathParser::QuantityLiteralContext::quantity() {
|
|
1353
|
+
return getRuleContext<FHIRPathParser::QuantityContext>(0);
|
|
1354
|
+
}
|
|
1355
|
+
|
|
1356
|
+
FHIRPathParser::QuantityLiteralContext::QuantityLiteralContext(LiteralContext *ctx) { copyFrom(ctx); }
|
|
1357
|
+
|
|
1358
|
+
void FHIRPathParser::QuantityLiteralContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1359
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1360
|
+
if (parserListener != nullptr)
|
|
1361
|
+
parserListener->enterQuantityLiteral(this);
|
|
1362
|
+
}
|
|
1363
|
+
void FHIRPathParser::QuantityLiteralContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1364
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1365
|
+
if (parserListener != nullptr)
|
|
1366
|
+
parserListener->exitQuantityLiteral(this);
|
|
1367
|
+
}
|
|
1368
|
+
|
|
1369
|
+
std::any FHIRPathParser::QuantityLiteralContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1370
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1371
|
+
return parserVisitor->visitQuantityLiteral(this);
|
|
1372
|
+
else
|
|
1373
|
+
return visitor->visitChildren(this);
|
|
1374
|
+
}
|
|
1375
|
+
FHIRPathParser::LiteralContext* FHIRPathParser::literal() {
|
|
1376
|
+
LiteralContext *_localctx = _tracker.createInstance<LiteralContext>(_ctx, getState());
|
|
1377
|
+
enterRule(_localctx, 6, FHIRPathParser::RuleLiteral);
|
|
1378
|
+
size_t _la = 0;
|
|
1379
|
+
|
|
1380
|
+
#if __cplusplus > 201703L
|
|
1381
|
+
auto onExit = finally([=, this] {
|
|
1382
|
+
#else
|
|
1383
|
+
auto onExit = finally([=] {
|
|
1384
|
+
#endif
|
|
1385
|
+
exitRule();
|
|
1386
|
+
});
|
|
1387
|
+
try {
|
|
1388
|
+
setState(99);
|
|
1389
|
+
_errHandler->sync(this);
|
|
1390
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 4, _ctx)) {
|
|
1391
|
+
case 1: {
|
|
1392
|
+
_localctx = _tracker.createInstance<FHIRPathParser::NullLiteralContext>(_localctx);
|
|
1393
|
+
enterOuterAlt(_localctx, 1);
|
|
1394
|
+
setState(91);
|
|
1395
|
+
match(FHIRPathParser::T__29);
|
|
1396
|
+
setState(92);
|
|
1397
|
+
match(FHIRPathParser::T__30);
|
|
1398
|
+
break;
|
|
1399
|
+
}
|
|
1400
|
+
|
|
1401
|
+
case 2: {
|
|
1402
|
+
_localctx = _tracker.createInstance<FHIRPathParser::BooleanLiteralContext>(_localctx);
|
|
1403
|
+
enterOuterAlt(_localctx, 2);
|
|
1404
|
+
setState(93);
|
|
1405
|
+
_la = _input->LA(1);
|
|
1406
|
+
if (!(_la == FHIRPathParser::T__31
|
|
1407
|
+
|
|
1408
|
+
|| _la == FHIRPathParser::T__32)) {
|
|
1409
|
+
_errHandler->recoverInline(this);
|
|
1410
|
+
}
|
|
1411
|
+
else {
|
|
1412
|
+
_errHandler->reportMatch(this);
|
|
1413
|
+
consume();
|
|
1414
|
+
}
|
|
1415
|
+
break;
|
|
1416
|
+
}
|
|
1417
|
+
|
|
1418
|
+
case 3: {
|
|
1419
|
+
_localctx = _tracker.createInstance<FHIRPathParser::StringLiteralContext>(_localctx);
|
|
1420
|
+
enterOuterAlt(_localctx, 3);
|
|
1421
|
+
setState(94);
|
|
1422
|
+
match(FHIRPathParser::STRING);
|
|
1423
|
+
break;
|
|
1424
|
+
}
|
|
1425
|
+
|
|
1426
|
+
case 4: {
|
|
1427
|
+
_localctx = _tracker.createInstance<FHIRPathParser::NumberLiteralContext>(_localctx);
|
|
1428
|
+
enterOuterAlt(_localctx, 4);
|
|
1429
|
+
setState(95);
|
|
1430
|
+
match(FHIRPathParser::NUMBER);
|
|
1431
|
+
break;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
case 5: {
|
|
1435
|
+
_localctx = _tracker.createInstance<FHIRPathParser::DateTimeLiteralContext>(_localctx);
|
|
1436
|
+
enterOuterAlt(_localctx, 5);
|
|
1437
|
+
setState(96);
|
|
1438
|
+
match(FHIRPathParser::DATETIME);
|
|
1439
|
+
break;
|
|
1440
|
+
}
|
|
1441
|
+
|
|
1442
|
+
case 6: {
|
|
1443
|
+
_localctx = _tracker.createInstance<FHIRPathParser::TimeLiteralContext>(_localctx);
|
|
1444
|
+
enterOuterAlt(_localctx, 6);
|
|
1445
|
+
setState(97);
|
|
1446
|
+
match(FHIRPathParser::TIME);
|
|
1447
|
+
break;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
case 7: {
|
|
1451
|
+
_localctx = _tracker.createInstance<FHIRPathParser::QuantityLiteralContext>(_localctx);
|
|
1452
|
+
enterOuterAlt(_localctx, 7);
|
|
1453
|
+
setState(98);
|
|
1454
|
+
quantity();
|
|
1455
|
+
break;
|
|
1456
|
+
}
|
|
1457
|
+
|
|
1458
|
+
default:
|
|
1459
|
+
break;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
}
|
|
1463
|
+
catch (RecognitionException &e) {
|
|
1464
|
+
_errHandler->reportError(this, e);
|
|
1465
|
+
_localctx->exception = std::current_exception();
|
|
1466
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1467
|
+
}
|
|
1468
|
+
|
|
1469
|
+
return _localctx;
|
|
1470
|
+
}
|
|
1471
|
+
|
|
1472
|
+
//----------------- ExternalConstantContext ------------------------------------------------------------------
|
|
1473
|
+
|
|
1474
|
+
FHIRPathParser::ExternalConstantContext::ExternalConstantContext(ParserRuleContext *parent, size_t invokingState)
|
|
1475
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
FHIRPathParser::IdentifierContext* FHIRPathParser::ExternalConstantContext::identifier() {
|
|
1479
|
+
return getRuleContext<FHIRPathParser::IdentifierContext>(0);
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
tree::TerminalNode* FHIRPathParser::ExternalConstantContext::STRING() {
|
|
1483
|
+
return getToken(FHIRPathParser::STRING, 0);
|
|
1484
|
+
}
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
size_t FHIRPathParser::ExternalConstantContext::getRuleIndex() const {
|
|
1488
|
+
return FHIRPathParser::RuleExternalConstant;
|
|
1489
|
+
}
|
|
1490
|
+
|
|
1491
|
+
void FHIRPathParser::ExternalConstantContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1492
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1493
|
+
if (parserListener != nullptr)
|
|
1494
|
+
parserListener->enterExternalConstant(this);
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
void FHIRPathParser::ExternalConstantContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1498
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1499
|
+
if (parserListener != nullptr)
|
|
1500
|
+
parserListener->exitExternalConstant(this);
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
|
|
1504
|
+
std::any FHIRPathParser::ExternalConstantContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1505
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1506
|
+
return parserVisitor->visitExternalConstant(this);
|
|
1507
|
+
else
|
|
1508
|
+
return visitor->visitChildren(this);
|
|
1509
|
+
}
|
|
1510
|
+
|
|
1511
|
+
FHIRPathParser::ExternalConstantContext* FHIRPathParser::externalConstant() {
|
|
1512
|
+
ExternalConstantContext *_localctx = _tracker.createInstance<ExternalConstantContext>(_ctx, getState());
|
|
1513
|
+
enterRule(_localctx, 8, FHIRPathParser::RuleExternalConstant);
|
|
1514
|
+
|
|
1515
|
+
#if __cplusplus > 201703L
|
|
1516
|
+
auto onExit = finally([=, this] {
|
|
1517
|
+
#else
|
|
1518
|
+
auto onExit = finally([=] {
|
|
1519
|
+
#endif
|
|
1520
|
+
exitRule();
|
|
1521
|
+
});
|
|
1522
|
+
try {
|
|
1523
|
+
enterOuterAlt(_localctx, 1);
|
|
1524
|
+
setState(101);
|
|
1525
|
+
match(FHIRPathParser::T__33);
|
|
1526
|
+
setState(104);
|
|
1527
|
+
_errHandler->sync(this);
|
|
1528
|
+
switch (_input->LA(1)) {
|
|
1529
|
+
case FHIRPathParser::T__15:
|
|
1530
|
+
case FHIRPathParser::T__16:
|
|
1531
|
+
case FHIRPathParser::T__21:
|
|
1532
|
+
case FHIRPathParser::T__22:
|
|
1533
|
+
case FHIRPathParser::IDENTIFIER:
|
|
1534
|
+
case FHIRPathParser::DELIMITEDIDENTIFIER: {
|
|
1535
|
+
setState(102);
|
|
1536
|
+
identifier();
|
|
1537
|
+
break;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
case FHIRPathParser::STRING: {
|
|
1541
|
+
setState(103);
|
|
1542
|
+
match(FHIRPathParser::STRING);
|
|
1543
|
+
break;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
default:
|
|
1547
|
+
throw NoViableAltException(this);
|
|
1548
|
+
}
|
|
1549
|
+
|
|
1550
|
+
}
|
|
1551
|
+
catch (RecognitionException &e) {
|
|
1552
|
+
_errHandler->reportError(this, e);
|
|
1553
|
+
_localctx->exception = std::current_exception();
|
|
1554
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1555
|
+
}
|
|
1556
|
+
|
|
1557
|
+
return _localctx;
|
|
1558
|
+
}
|
|
1559
|
+
|
|
1560
|
+
//----------------- InvocationContext ------------------------------------------------------------------
|
|
1561
|
+
|
|
1562
|
+
FHIRPathParser::InvocationContext::InvocationContext(ParserRuleContext *parent, size_t invokingState)
|
|
1563
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
size_t FHIRPathParser::InvocationContext::getRuleIndex() const {
|
|
1568
|
+
return FHIRPathParser::RuleInvocation;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
void FHIRPathParser::InvocationContext::copyFrom(InvocationContext *ctx) {
|
|
1572
|
+
ParserRuleContext::copyFrom(ctx);
|
|
1573
|
+
}
|
|
1574
|
+
|
|
1575
|
+
//----------------- TotalInvocationContext ------------------------------------------------------------------
|
|
1576
|
+
|
|
1577
|
+
FHIRPathParser::TotalInvocationContext::TotalInvocationContext(InvocationContext *ctx) { copyFrom(ctx); }
|
|
1578
|
+
|
|
1579
|
+
void FHIRPathParser::TotalInvocationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1580
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1581
|
+
if (parserListener != nullptr)
|
|
1582
|
+
parserListener->enterTotalInvocation(this);
|
|
1583
|
+
}
|
|
1584
|
+
void FHIRPathParser::TotalInvocationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1585
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1586
|
+
if (parserListener != nullptr)
|
|
1587
|
+
parserListener->exitTotalInvocation(this);
|
|
1588
|
+
}
|
|
1589
|
+
|
|
1590
|
+
std::any FHIRPathParser::TotalInvocationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1591
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1592
|
+
return parserVisitor->visitTotalInvocation(this);
|
|
1593
|
+
else
|
|
1594
|
+
return visitor->visitChildren(this);
|
|
1595
|
+
}
|
|
1596
|
+
//----------------- ThisInvocationContext ------------------------------------------------------------------
|
|
1597
|
+
|
|
1598
|
+
FHIRPathParser::ThisInvocationContext::ThisInvocationContext(InvocationContext *ctx) { copyFrom(ctx); }
|
|
1599
|
+
|
|
1600
|
+
void FHIRPathParser::ThisInvocationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1601
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1602
|
+
if (parserListener != nullptr)
|
|
1603
|
+
parserListener->enterThisInvocation(this);
|
|
1604
|
+
}
|
|
1605
|
+
void FHIRPathParser::ThisInvocationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1606
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1607
|
+
if (parserListener != nullptr)
|
|
1608
|
+
parserListener->exitThisInvocation(this);
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
std::any FHIRPathParser::ThisInvocationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1612
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1613
|
+
return parserVisitor->visitThisInvocation(this);
|
|
1614
|
+
else
|
|
1615
|
+
return visitor->visitChildren(this);
|
|
1616
|
+
}
|
|
1617
|
+
//----------------- IndexInvocationContext ------------------------------------------------------------------
|
|
1618
|
+
|
|
1619
|
+
FHIRPathParser::IndexInvocationContext::IndexInvocationContext(InvocationContext *ctx) { copyFrom(ctx); }
|
|
1620
|
+
|
|
1621
|
+
void FHIRPathParser::IndexInvocationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1622
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1623
|
+
if (parserListener != nullptr)
|
|
1624
|
+
parserListener->enterIndexInvocation(this);
|
|
1625
|
+
}
|
|
1626
|
+
void FHIRPathParser::IndexInvocationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1627
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1628
|
+
if (parserListener != nullptr)
|
|
1629
|
+
parserListener->exitIndexInvocation(this);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
std::any FHIRPathParser::IndexInvocationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1633
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1634
|
+
return parserVisitor->visitIndexInvocation(this);
|
|
1635
|
+
else
|
|
1636
|
+
return visitor->visitChildren(this);
|
|
1637
|
+
}
|
|
1638
|
+
//----------------- FunctionInvocationContext ------------------------------------------------------------------
|
|
1639
|
+
|
|
1640
|
+
FHIRPathParser::FunctnContext* FHIRPathParser::FunctionInvocationContext::functn() {
|
|
1641
|
+
return getRuleContext<FHIRPathParser::FunctnContext>(0);
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
FHIRPathParser::FunctionInvocationContext::FunctionInvocationContext(InvocationContext *ctx) { copyFrom(ctx); }
|
|
1645
|
+
|
|
1646
|
+
void FHIRPathParser::FunctionInvocationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1647
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1648
|
+
if (parserListener != nullptr)
|
|
1649
|
+
parserListener->enterFunctionInvocation(this);
|
|
1650
|
+
}
|
|
1651
|
+
void FHIRPathParser::FunctionInvocationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1652
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1653
|
+
if (parserListener != nullptr)
|
|
1654
|
+
parserListener->exitFunctionInvocation(this);
|
|
1655
|
+
}
|
|
1656
|
+
|
|
1657
|
+
std::any FHIRPathParser::FunctionInvocationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1658
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1659
|
+
return parserVisitor->visitFunctionInvocation(this);
|
|
1660
|
+
else
|
|
1661
|
+
return visitor->visitChildren(this);
|
|
1662
|
+
}
|
|
1663
|
+
//----------------- MemberInvocationContext ------------------------------------------------------------------
|
|
1664
|
+
|
|
1665
|
+
FHIRPathParser::IdentifierContext* FHIRPathParser::MemberInvocationContext::identifier() {
|
|
1666
|
+
return getRuleContext<FHIRPathParser::IdentifierContext>(0);
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
FHIRPathParser::MemberInvocationContext::MemberInvocationContext(InvocationContext *ctx) { copyFrom(ctx); }
|
|
1670
|
+
|
|
1671
|
+
void FHIRPathParser::MemberInvocationContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1672
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1673
|
+
if (parserListener != nullptr)
|
|
1674
|
+
parserListener->enterMemberInvocation(this);
|
|
1675
|
+
}
|
|
1676
|
+
void FHIRPathParser::MemberInvocationContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1677
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1678
|
+
if (parserListener != nullptr)
|
|
1679
|
+
parserListener->exitMemberInvocation(this);
|
|
1680
|
+
}
|
|
1681
|
+
|
|
1682
|
+
std::any FHIRPathParser::MemberInvocationContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1683
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1684
|
+
return parserVisitor->visitMemberInvocation(this);
|
|
1685
|
+
else
|
|
1686
|
+
return visitor->visitChildren(this);
|
|
1687
|
+
}
|
|
1688
|
+
FHIRPathParser::InvocationContext* FHIRPathParser::invocation() {
|
|
1689
|
+
InvocationContext *_localctx = _tracker.createInstance<InvocationContext>(_ctx, getState());
|
|
1690
|
+
enterRule(_localctx, 10, FHIRPathParser::RuleInvocation);
|
|
1691
|
+
|
|
1692
|
+
#if __cplusplus > 201703L
|
|
1693
|
+
auto onExit = finally([=, this] {
|
|
1694
|
+
#else
|
|
1695
|
+
auto onExit = finally([=] {
|
|
1696
|
+
#endif
|
|
1697
|
+
exitRule();
|
|
1698
|
+
});
|
|
1699
|
+
try {
|
|
1700
|
+
setState(111);
|
|
1701
|
+
_errHandler->sync(this);
|
|
1702
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 6, _ctx)) {
|
|
1703
|
+
case 1: {
|
|
1704
|
+
_localctx = _tracker.createInstance<FHIRPathParser::MemberInvocationContext>(_localctx);
|
|
1705
|
+
enterOuterAlt(_localctx, 1);
|
|
1706
|
+
setState(106);
|
|
1707
|
+
identifier();
|
|
1708
|
+
break;
|
|
1709
|
+
}
|
|
1710
|
+
|
|
1711
|
+
case 2: {
|
|
1712
|
+
_localctx = _tracker.createInstance<FHIRPathParser::FunctionInvocationContext>(_localctx);
|
|
1713
|
+
enterOuterAlt(_localctx, 2);
|
|
1714
|
+
setState(107);
|
|
1715
|
+
functn();
|
|
1716
|
+
break;
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
case 3: {
|
|
1720
|
+
_localctx = _tracker.createInstance<FHIRPathParser::ThisInvocationContext>(_localctx);
|
|
1721
|
+
enterOuterAlt(_localctx, 3);
|
|
1722
|
+
setState(108);
|
|
1723
|
+
match(FHIRPathParser::T__34);
|
|
1724
|
+
break;
|
|
1725
|
+
}
|
|
1726
|
+
|
|
1727
|
+
case 4: {
|
|
1728
|
+
_localctx = _tracker.createInstance<FHIRPathParser::IndexInvocationContext>(_localctx);
|
|
1729
|
+
enterOuterAlt(_localctx, 4);
|
|
1730
|
+
setState(109);
|
|
1731
|
+
match(FHIRPathParser::T__35);
|
|
1732
|
+
break;
|
|
1733
|
+
}
|
|
1734
|
+
|
|
1735
|
+
case 5: {
|
|
1736
|
+
_localctx = _tracker.createInstance<FHIRPathParser::TotalInvocationContext>(_localctx);
|
|
1737
|
+
enterOuterAlt(_localctx, 5);
|
|
1738
|
+
setState(110);
|
|
1739
|
+
match(FHIRPathParser::T__36);
|
|
1740
|
+
break;
|
|
1741
|
+
}
|
|
1742
|
+
|
|
1743
|
+
default:
|
|
1744
|
+
break;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
}
|
|
1748
|
+
catch (RecognitionException &e) {
|
|
1749
|
+
_errHandler->reportError(this, e);
|
|
1750
|
+
_localctx->exception = std::current_exception();
|
|
1751
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1754
|
+
return _localctx;
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
//----------------- FunctnContext ------------------------------------------------------------------
|
|
1758
|
+
|
|
1759
|
+
FHIRPathParser::FunctnContext::FunctnContext(ParserRuleContext *parent, size_t invokingState)
|
|
1760
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1761
|
+
}
|
|
1762
|
+
|
|
1763
|
+
FHIRPathParser::IdentifierContext* FHIRPathParser::FunctnContext::identifier() {
|
|
1764
|
+
return getRuleContext<FHIRPathParser::IdentifierContext>(0);
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
FHIRPathParser::ParamListContext* FHIRPathParser::FunctnContext::paramList() {
|
|
1768
|
+
return getRuleContext<FHIRPathParser::ParamListContext>(0);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
size_t FHIRPathParser::FunctnContext::getRuleIndex() const {
|
|
1773
|
+
return FHIRPathParser::RuleFunctn;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
void FHIRPathParser::FunctnContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1777
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1778
|
+
if (parserListener != nullptr)
|
|
1779
|
+
parserListener->enterFunctn(this);
|
|
1780
|
+
}
|
|
1781
|
+
|
|
1782
|
+
void FHIRPathParser::FunctnContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1783
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1784
|
+
if (parserListener != nullptr)
|
|
1785
|
+
parserListener->exitFunctn(this);
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
|
|
1789
|
+
std::any FHIRPathParser::FunctnContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1790
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1791
|
+
return parserVisitor->visitFunctn(this);
|
|
1792
|
+
else
|
|
1793
|
+
return visitor->visitChildren(this);
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
FHIRPathParser::FunctnContext* FHIRPathParser::functn() {
|
|
1797
|
+
FunctnContext *_localctx = _tracker.createInstance<FunctnContext>(_ctx, getState());
|
|
1798
|
+
enterRule(_localctx, 12, FHIRPathParser::RuleFunctn);
|
|
1799
|
+
size_t _la = 0;
|
|
1800
|
+
|
|
1801
|
+
#if __cplusplus > 201703L
|
|
1802
|
+
auto onExit = finally([=, this] {
|
|
1803
|
+
#else
|
|
1804
|
+
auto onExit = finally([=] {
|
|
1805
|
+
#endif
|
|
1806
|
+
exitRule();
|
|
1807
|
+
});
|
|
1808
|
+
try {
|
|
1809
|
+
enterOuterAlt(_localctx, 1);
|
|
1810
|
+
setState(113);
|
|
1811
|
+
identifier();
|
|
1812
|
+
setState(114);
|
|
1813
|
+
match(FHIRPathParser::T__27);
|
|
1814
|
+
setState(116);
|
|
1815
|
+
_errHandler->sync(this);
|
|
1816
|
+
|
|
1817
|
+
_la = _input->LA(1);
|
|
1818
|
+
if ((((_la & ~ 0x3fULL) == 0) &&
|
|
1819
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__3)
|
|
1820
|
+
| (1ULL << FHIRPathParser::T__4)
|
|
1821
|
+
| (1ULL << FHIRPathParser::T__15)
|
|
1822
|
+
| (1ULL << FHIRPathParser::T__16)
|
|
1823
|
+
| (1ULL << FHIRPathParser::T__21)
|
|
1824
|
+
| (1ULL << FHIRPathParser::T__22)
|
|
1825
|
+
| (1ULL << FHIRPathParser::T__27)
|
|
1826
|
+
| (1ULL << FHIRPathParser::T__29)
|
|
1827
|
+
| (1ULL << FHIRPathParser::T__31)
|
|
1828
|
+
| (1ULL << FHIRPathParser::T__32)
|
|
1829
|
+
| (1ULL << FHIRPathParser::T__33)
|
|
1830
|
+
| (1ULL << FHIRPathParser::T__34)
|
|
1831
|
+
| (1ULL << FHIRPathParser::T__35)
|
|
1832
|
+
| (1ULL << FHIRPathParser::T__36)
|
|
1833
|
+
| (1ULL << FHIRPathParser::DATETIME)
|
|
1834
|
+
| (1ULL << FHIRPathParser::TIME)
|
|
1835
|
+
| (1ULL << FHIRPathParser::IDENTIFIER)
|
|
1836
|
+
| (1ULL << FHIRPathParser::DELIMITEDIDENTIFIER)
|
|
1837
|
+
| (1ULL << FHIRPathParser::STRING)
|
|
1838
|
+
| (1ULL << FHIRPathParser::NUMBER))) != 0)) {
|
|
1839
|
+
setState(115);
|
|
1840
|
+
paramList();
|
|
1841
|
+
}
|
|
1842
|
+
setState(118);
|
|
1843
|
+
match(FHIRPathParser::T__28);
|
|
1844
|
+
|
|
1845
|
+
}
|
|
1846
|
+
catch (RecognitionException &e) {
|
|
1847
|
+
_errHandler->reportError(this, e);
|
|
1848
|
+
_localctx->exception = std::current_exception();
|
|
1849
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1850
|
+
}
|
|
1851
|
+
|
|
1852
|
+
return _localctx;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
//----------------- ParamListContext ------------------------------------------------------------------
|
|
1856
|
+
|
|
1857
|
+
FHIRPathParser::ParamListContext::ParamListContext(ParserRuleContext *parent, size_t invokingState)
|
|
1858
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
std::vector<FHIRPathParser::ExpressionContext *> FHIRPathParser::ParamListContext::expression() {
|
|
1862
|
+
return getRuleContexts<FHIRPathParser::ExpressionContext>();
|
|
1863
|
+
}
|
|
1864
|
+
|
|
1865
|
+
FHIRPathParser::ExpressionContext* FHIRPathParser::ParamListContext::expression(size_t i) {
|
|
1866
|
+
return getRuleContext<FHIRPathParser::ExpressionContext>(i);
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
|
|
1870
|
+
size_t FHIRPathParser::ParamListContext::getRuleIndex() const {
|
|
1871
|
+
return FHIRPathParser::RuleParamList;
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
void FHIRPathParser::ParamListContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1875
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1876
|
+
if (parserListener != nullptr)
|
|
1877
|
+
parserListener->enterParamList(this);
|
|
1878
|
+
}
|
|
1879
|
+
|
|
1880
|
+
void FHIRPathParser::ParamListContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1881
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1882
|
+
if (parserListener != nullptr)
|
|
1883
|
+
parserListener->exitParamList(this);
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
std::any FHIRPathParser::ParamListContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1888
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1889
|
+
return parserVisitor->visitParamList(this);
|
|
1890
|
+
else
|
|
1891
|
+
return visitor->visitChildren(this);
|
|
1892
|
+
}
|
|
1893
|
+
|
|
1894
|
+
FHIRPathParser::ParamListContext* FHIRPathParser::paramList() {
|
|
1895
|
+
ParamListContext *_localctx = _tracker.createInstance<ParamListContext>(_ctx, getState());
|
|
1896
|
+
enterRule(_localctx, 14, FHIRPathParser::RuleParamList);
|
|
1897
|
+
size_t _la = 0;
|
|
1898
|
+
|
|
1899
|
+
#if __cplusplus > 201703L
|
|
1900
|
+
auto onExit = finally([=, this] {
|
|
1901
|
+
#else
|
|
1902
|
+
auto onExit = finally([=] {
|
|
1903
|
+
#endif
|
|
1904
|
+
exitRule();
|
|
1905
|
+
});
|
|
1906
|
+
try {
|
|
1907
|
+
enterOuterAlt(_localctx, 1);
|
|
1908
|
+
setState(120);
|
|
1909
|
+
expression(0);
|
|
1910
|
+
setState(125);
|
|
1911
|
+
_errHandler->sync(this);
|
|
1912
|
+
_la = _input->LA(1);
|
|
1913
|
+
while (_la == FHIRPathParser::T__37) {
|
|
1914
|
+
setState(121);
|
|
1915
|
+
match(FHIRPathParser::T__37);
|
|
1916
|
+
setState(122);
|
|
1917
|
+
expression(0);
|
|
1918
|
+
setState(127);
|
|
1919
|
+
_errHandler->sync(this);
|
|
1920
|
+
_la = _input->LA(1);
|
|
1921
|
+
}
|
|
1922
|
+
|
|
1923
|
+
}
|
|
1924
|
+
catch (RecognitionException &e) {
|
|
1925
|
+
_errHandler->reportError(this, e);
|
|
1926
|
+
_localctx->exception = std::current_exception();
|
|
1927
|
+
_errHandler->recover(this, _localctx->exception);
|
|
1928
|
+
}
|
|
1929
|
+
|
|
1930
|
+
return _localctx;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
//----------------- QuantityContext ------------------------------------------------------------------
|
|
1934
|
+
|
|
1935
|
+
FHIRPathParser::QuantityContext::QuantityContext(ParserRuleContext *parent, size_t invokingState)
|
|
1936
|
+
: ParserRuleContext(parent, invokingState) {
|
|
1937
|
+
}
|
|
1938
|
+
|
|
1939
|
+
tree::TerminalNode* FHIRPathParser::QuantityContext::NUMBER() {
|
|
1940
|
+
return getToken(FHIRPathParser::NUMBER, 0);
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1943
|
+
FHIRPathParser::UnitContext* FHIRPathParser::QuantityContext::unit() {
|
|
1944
|
+
return getRuleContext<FHIRPathParser::UnitContext>(0);
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1947
|
+
|
|
1948
|
+
size_t FHIRPathParser::QuantityContext::getRuleIndex() const {
|
|
1949
|
+
return FHIRPathParser::RuleQuantity;
|
|
1950
|
+
}
|
|
1951
|
+
|
|
1952
|
+
void FHIRPathParser::QuantityContext::enterRule(tree::ParseTreeListener *listener) {
|
|
1953
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1954
|
+
if (parserListener != nullptr)
|
|
1955
|
+
parserListener->enterQuantity(this);
|
|
1956
|
+
}
|
|
1957
|
+
|
|
1958
|
+
void FHIRPathParser::QuantityContext::exitRule(tree::ParseTreeListener *listener) {
|
|
1959
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
1960
|
+
if (parserListener != nullptr)
|
|
1961
|
+
parserListener->exitQuantity(this);
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
|
|
1965
|
+
std::any FHIRPathParser::QuantityContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
1966
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
1967
|
+
return parserVisitor->visitQuantity(this);
|
|
1968
|
+
else
|
|
1969
|
+
return visitor->visitChildren(this);
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
FHIRPathParser::QuantityContext* FHIRPathParser::quantity() {
|
|
1973
|
+
QuantityContext *_localctx = _tracker.createInstance<QuantityContext>(_ctx, getState());
|
|
1974
|
+
enterRule(_localctx, 16, FHIRPathParser::RuleQuantity);
|
|
1975
|
+
|
|
1976
|
+
#if __cplusplus > 201703L
|
|
1977
|
+
auto onExit = finally([=, this] {
|
|
1978
|
+
#else
|
|
1979
|
+
auto onExit = finally([=] {
|
|
1980
|
+
#endif
|
|
1981
|
+
exitRule();
|
|
1982
|
+
});
|
|
1983
|
+
try {
|
|
1984
|
+
enterOuterAlt(_localctx, 1);
|
|
1985
|
+
setState(128);
|
|
1986
|
+
match(FHIRPathParser::NUMBER);
|
|
1987
|
+
setState(130);
|
|
1988
|
+
_errHandler->sync(this);
|
|
1989
|
+
|
|
1990
|
+
switch (getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 9, _ctx)) {
|
|
1991
|
+
case 1: {
|
|
1992
|
+
setState(129);
|
|
1993
|
+
unit();
|
|
1994
|
+
break;
|
|
1995
|
+
}
|
|
1996
|
+
|
|
1997
|
+
default:
|
|
1998
|
+
break;
|
|
1999
|
+
}
|
|
2000
|
+
|
|
2001
|
+
}
|
|
2002
|
+
catch (RecognitionException &e) {
|
|
2003
|
+
_errHandler->reportError(this, e);
|
|
2004
|
+
_localctx->exception = std::current_exception();
|
|
2005
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2006
|
+
}
|
|
2007
|
+
|
|
2008
|
+
return _localctx;
|
|
2009
|
+
}
|
|
2010
|
+
|
|
2011
|
+
//----------------- UnitContext ------------------------------------------------------------------
|
|
2012
|
+
|
|
2013
|
+
FHIRPathParser::UnitContext::UnitContext(ParserRuleContext *parent, size_t invokingState)
|
|
2014
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2015
|
+
}
|
|
2016
|
+
|
|
2017
|
+
FHIRPathParser::DateTimePrecisionContext* FHIRPathParser::UnitContext::dateTimePrecision() {
|
|
2018
|
+
return getRuleContext<FHIRPathParser::DateTimePrecisionContext>(0);
|
|
2019
|
+
}
|
|
2020
|
+
|
|
2021
|
+
FHIRPathParser::PluralDateTimePrecisionContext* FHIRPathParser::UnitContext::pluralDateTimePrecision() {
|
|
2022
|
+
return getRuleContext<FHIRPathParser::PluralDateTimePrecisionContext>(0);
|
|
2023
|
+
}
|
|
2024
|
+
|
|
2025
|
+
tree::TerminalNode* FHIRPathParser::UnitContext::STRING() {
|
|
2026
|
+
return getToken(FHIRPathParser::STRING, 0);
|
|
2027
|
+
}
|
|
2028
|
+
|
|
2029
|
+
|
|
2030
|
+
size_t FHIRPathParser::UnitContext::getRuleIndex() const {
|
|
2031
|
+
return FHIRPathParser::RuleUnit;
|
|
2032
|
+
}
|
|
2033
|
+
|
|
2034
|
+
void FHIRPathParser::UnitContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2035
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2036
|
+
if (parserListener != nullptr)
|
|
2037
|
+
parserListener->enterUnit(this);
|
|
2038
|
+
}
|
|
2039
|
+
|
|
2040
|
+
void FHIRPathParser::UnitContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2041
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2042
|
+
if (parserListener != nullptr)
|
|
2043
|
+
parserListener->exitUnit(this);
|
|
2044
|
+
}
|
|
2045
|
+
|
|
2046
|
+
|
|
2047
|
+
std::any FHIRPathParser::UnitContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2048
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2049
|
+
return parserVisitor->visitUnit(this);
|
|
2050
|
+
else
|
|
2051
|
+
return visitor->visitChildren(this);
|
|
2052
|
+
}
|
|
2053
|
+
|
|
2054
|
+
FHIRPathParser::UnitContext* FHIRPathParser::unit() {
|
|
2055
|
+
UnitContext *_localctx = _tracker.createInstance<UnitContext>(_ctx, getState());
|
|
2056
|
+
enterRule(_localctx, 18, FHIRPathParser::RuleUnit);
|
|
2057
|
+
|
|
2058
|
+
#if __cplusplus > 201703L
|
|
2059
|
+
auto onExit = finally([=, this] {
|
|
2060
|
+
#else
|
|
2061
|
+
auto onExit = finally([=] {
|
|
2062
|
+
#endif
|
|
2063
|
+
exitRule();
|
|
2064
|
+
});
|
|
2065
|
+
try {
|
|
2066
|
+
setState(135);
|
|
2067
|
+
_errHandler->sync(this);
|
|
2068
|
+
switch (_input->LA(1)) {
|
|
2069
|
+
case FHIRPathParser::T__38:
|
|
2070
|
+
case FHIRPathParser::T__39:
|
|
2071
|
+
case FHIRPathParser::T__40:
|
|
2072
|
+
case FHIRPathParser::T__41:
|
|
2073
|
+
case FHIRPathParser::T__42:
|
|
2074
|
+
case FHIRPathParser::T__43:
|
|
2075
|
+
case FHIRPathParser::T__44:
|
|
2076
|
+
case FHIRPathParser::T__45: {
|
|
2077
|
+
enterOuterAlt(_localctx, 1);
|
|
2078
|
+
setState(132);
|
|
2079
|
+
dateTimePrecision();
|
|
2080
|
+
break;
|
|
2081
|
+
}
|
|
2082
|
+
|
|
2083
|
+
case FHIRPathParser::T__46:
|
|
2084
|
+
case FHIRPathParser::T__47:
|
|
2085
|
+
case FHIRPathParser::T__48:
|
|
2086
|
+
case FHIRPathParser::T__49:
|
|
2087
|
+
case FHIRPathParser::T__50:
|
|
2088
|
+
case FHIRPathParser::T__51:
|
|
2089
|
+
case FHIRPathParser::T__52:
|
|
2090
|
+
case FHIRPathParser::T__53: {
|
|
2091
|
+
enterOuterAlt(_localctx, 2);
|
|
2092
|
+
setState(133);
|
|
2093
|
+
pluralDateTimePrecision();
|
|
2094
|
+
break;
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
case FHIRPathParser::STRING: {
|
|
2098
|
+
enterOuterAlt(_localctx, 3);
|
|
2099
|
+
setState(134);
|
|
2100
|
+
match(FHIRPathParser::STRING);
|
|
2101
|
+
break;
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
default:
|
|
2105
|
+
throw NoViableAltException(this);
|
|
2106
|
+
}
|
|
2107
|
+
|
|
2108
|
+
}
|
|
2109
|
+
catch (RecognitionException &e) {
|
|
2110
|
+
_errHandler->reportError(this, e);
|
|
2111
|
+
_localctx->exception = std::current_exception();
|
|
2112
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
return _localctx;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
//----------------- DateTimePrecisionContext ------------------------------------------------------------------
|
|
2119
|
+
|
|
2120
|
+
FHIRPathParser::DateTimePrecisionContext::DateTimePrecisionContext(ParserRuleContext *parent, size_t invokingState)
|
|
2121
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
|
|
2125
|
+
size_t FHIRPathParser::DateTimePrecisionContext::getRuleIndex() const {
|
|
2126
|
+
return FHIRPathParser::RuleDateTimePrecision;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
void FHIRPathParser::DateTimePrecisionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2130
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2131
|
+
if (parserListener != nullptr)
|
|
2132
|
+
parserListener->enterDateTimePrecision(this);
|
|
2133
|
+
}
|
|
2134
|
+
|
|
2135
|
+
void FHIRPathParser::DateTimePrecisionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2136
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2137
|
+
if (parserListener != nullptr)
|
|
2138
|
+
parserListener->exitDateTimePrecision(this);
|
|
2139
|
+
}
|
|
2140
|
+
|
|
2141
|
+
|
|
2142
|
+
std::any FHIRPathParser::DateTimePrecisionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2143
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2144
|
+
return parserVisitor->visitDateTimePrecision(this);
|
|
2145
|
+
else
|
|
2146
|
+
return visitor->visitChildren(this);
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
FHIRPathParser::DateTimePrecisionContext* FHIRPathParser::dateTimePrecision() {
|
|
2150
|
+
DateTimePrecisionContext *_localctx = _tracker.createInstance<DateTimePrecisionContext>(_ctx, getState());
|
|
2151
|
+
enterRule(_localctx, 20, FHIRPathParser::RuleDateTimePrecision);
|
|
2152
|
+
size_t _la = 0;
|
|
2153
|
+
|
|
2154
|
+
#if __cplusplus > 201703L
|
|
2155
|
+
auto onExit = finally([=, this] {
|
|
2156
|
+
#else
|
|
2157
|
+
auto onExit = finally([=] {
|
|
2158
|
+
#endif
|
|
2159
|
+
exitRule();
|
|
2160
|
+
});
|
|
2161
|
+
try {
|
|
2162
|
+
enterOuterAlt(_localctx, 1);
|
|
2163
|
+
setState(137);
|
|
2164
|
+
_la = _input->LA(1);
|
|
2165
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
2166
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__38)
|
|
2167
|
+
| (1ULL << FHIRPathParser::T__39)
|
|
2168
|
+
| (1ULL << FHIRPathParser::T__40)
|
|
2169
|
+
| (1ULL << FHIRPathParser::T__41)
|
|
2170
|
+
| (1ULL << FHIRPathParser::T__42)
|
|
2171
|
+
| (1ULL << FHIRPathParser::T__43)
|
|
2172
|
+
| (1ULL << FHIRPathParser::T__44)
|
|
2173
|
+
| (1ULL << FHIRPathParser::T__45))) != 0))) {
|
|
2174
|
+
_errHandler->recoverInline(this);
|
|
2175
|
+
}
|
|
2176
|
+
else {
|
|
2177
|
+
_errHandler->reportMatch(this);
|
|
2178
|
+
consume();
|
|
2179
|
+
}
|
|
2180
|
+
|
|
2181
|
+
}
|
|
2182
|
+
catch (RecognitionException &e) {
|
|
2183
|
+
_errHandler->reportError(this, e);
|
|
2184
|
+
_localctx->exception = std::current_exception();
|
|
2185
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2186
|
+
}
|
|
2187
|
+
|
|
2188
|
+
return _localctx;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
//----------------- PluralDateTimePrecisionContext ------------------------------------------------------------------
|
|
2192
|
+
|
|
2193
|
+
FHIRPathParser::PluralDateTimePrecisionContext::PluralDateTimePrecisionContext(ParserRuleContext *parent, size_t invokingState)
|
|
2194
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2197
|
+
|
|
2198
|
+
size_t FHIRPathParser::PluralDateTimePrecisionContext::getRuleIndex() const {
|
|
2199
|
+
return FHIRPathParser::RulePluralDateTimePrecision;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
void FHIRPathParser::PluralDateTimePrecisionContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2203
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2204
|
+
if (parserListener != nullptr)
|
|
2205
|
+
parserListener->enterPluralDateTimePrecision(this);
|
|
2206
|
+
}
|
|
2207
|
+
|
|
2208
|
+
void FHIRPathParser::PluralDateTimePrecisionContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2209
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2210
|
+
if (parserListener != nullptr)
|
|
2211
|
+
parserListener->exitPluralDateTimePrecision(this);
|
|
2212
|
+
}
|
|
2213
|
+
|
|
2214
|
+
|
|
2215
|
+
std::any FHIRPathParser::PluralDateTimePrecisionContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2216
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2217
|
+
return parserVisitor->visitPluralDateTimePrecision(this);
|
|
2218
|
+
else
|
|
2219
|
+
return visitor->visitChildren(this);
|
|
2220
|
+
}
|
|
2221
|
+
|
|
2222
|
+
FHIRPathParser::PluralDateTimePrecisionContext* FHIRPathParser::pluralDateTimePrecision() {
|
|
2223
|
+
PluralDateTimePrecisionContext *_localctx = _tracker.createInstance<PluralDateTimePrecisionContext>(_ctx, getState());
|
|
2224
|
+
enterRule(_localctx, 22, FHIRPathParser::RulePluralDateTimePrecision);
|
|
2225
|
+
size_t _la = 0;
|
|
2226
|
+
|
|
2227
|
+
#if __cplusplus > 201703L
|
|
2228
|
+
auto onExit = finally([=, this] {
|
|
2229
|
+
#else
|
|
2230
|
+
auto onExit = finally([=] {
|
|
2231
|
+
#endif
|
|
2232
|
+
exitRule();
|
|
2233
|
+
});
|
|
2234
|
+
try {
|
|
2235
|
+
enterOuterAlt(_localctx, 1);
|
|
2236
|
+
setState(139);
|
|
2237
|
+
_la = _input->LA(1);
|
|
2238
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
2239
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__46)
|
|
2240
|
+
| (1ULL << FHIRPathParser::T__47)
|
|
2241
|
+
| (1ULL << FHIRPathParser::T__48)
|
|
2242
|
+
| (1ULL << FHIRPathParser::T__49)
|
|
2243
|
+
| (1ULL << FHIRPathParser::T__50)
|
|
2244
|
+
| (1ULL << FHIRPathParser::T__51)
|
|
2245
|
+
| (1ULL << FHIRPathParser::T__52)
|
|
2246
|
+
| (1ULL << FHIRPathParser::T__53))) != 0))) {
|
|
2247
|
+
_errHandler->recoverInline(this);
|
|
2248
|
+
}
|
|
2249
|
+
else {
|
|
2250
|
+
_errHandler->reportMatch(this);
|
|
2251
|
+
consume();
|
|
2252
|
+
}
|
|
2253
|
+
|
|
2254
|
+
}
|
|
2255
|
+
catch (RecognitionException &e) {
|
|
2256
|
+
_errHandler->reportError(this, e);
|
|
2257
|
+
_localctx->exception = std::current_exception();
|
|
2258
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
return _localctx;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
//----------------- TypeSpecifierContext ------------------------------------------------------------------
|
|
2265
|
+
|
|
2266
|
+
FHIRPathParser::TypeSpecifierContext::TypeSpecifierContext(ParserRuleContext *parent, size_t invokingState)
|
|
2267
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2268
|
+
}
|
|
2269
|
+
|
|
2270
|
+
FHIRPathParser::QualifiedIdentifierContext* FHIRPathParser::TypeSpecifierContext::qualifiedIdentifier() {
|
|
2271
|
+
return getRuleContext<FHIRPathParser::QualifiedIdentifierContext>(0);
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
|
|
2275
|
+
size_t FHIRPathParser::TypeSpecifierContext::getRuleIndex() const {
|
|
2276
|
+
return FHIRPathParser::RuleTypeSpecifier;
|
|
2277
|
+
}
|
|
2278
|
+
|
|
2279
|
+
void FHIRPathParser::TypeSpecifierContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2280
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2281
|
+
if (parserListener != nullptr)
|
|
2282
|
+
parserListener->enterTypeSpecifier(this);
|
|
2283
|
+
}
|
|
2284
|
+
|
|
2285
|
+
void FHIRPathParser::TypeSpecifierContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2286
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2287
|
+
if (parserListener != nullptr)
|
|
2288
|
+
parserListener->exitTypeSpecifier(this);
|
|
2289
|
+
}
|
|
2290
|
+
|
|
2291
|
+
|
|
2292
|
+
std::any FHIRPathParser::TypeSpecifierContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2293
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2294
|
+
return parserVisitor->visitTypeSpecifier(this);
|
|
2295
|
+
else
|
|
2296
|
+
return visitor->visitChildren(this);
|
|
2297
|
+
}
|
|
2298
|
+
|
|
2299
|
+
FHIRPathParser::TypeSpecifierContext* FHIRPathParser::typeSpecifier() {
|
|
2300
|
+
TypeSpecifierContext *_localctx = _tracker.createInstance<TypeSpecifierContext>(_ctx, getState());
|
|
2301
|
+
enterRule(_localctx, 24, FHIRPathParser::RuleTypeSpecifier);
|
|
2302
|
+
|
|
2303
|
+
#if __cplusplus > 201703L
|
|
2304
|
+
auto onExit = finally([=, this] {
|
|
2305
|
+
#else
|
|
2306
|
+
auto onExit = finally([=] {
|
|
2307
|
+
#endif
|
|
2308
|
+
exitRule();
|
|
2309
|
+
});
|
|
2310
|
+
try {
|
|
2311
|
+
enterOuterAlt(_localctx, 1);
|
|
2312
|
+
setState(141);
|
|
2313
|
+
qualifiedIdentifier();
|
|
2314
|
+
|
|
2315
|
+
}
|
|
2316
|
+
catch (RecognitionException &e) {
|
|
2317
|
+
_errHandler->reportError(this, e);
|
|
2318
|
+
_localctx->exception = std::current_exception();
|
|
2319
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
return _localctx;
|
|
2323
|
+
}
|
|
2324
|
+
|
|
2325
|
+
//----------------- QualifiedIdentifierContext ------------------------------------------------------------------
|
|
2326
|
+
|
|
2327
|
+
FHIRPathParser::QualifiedIdentifierContext::QualifiedIdentifierContext(ParserRuleContext *parent, size_t invokingState)
|
|
2328
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2329
|
+
}
|
|
2330
|
+
|
|
2331
|
+
std::vector<FHIRPathParser::IdentifierContext *> FHIRPathParser::QualifiedIdentifierContext::identifier() {
|
|
2332
|
+
return getRuleContexts<FHIRPathParser::IdentifierContext>();
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
FHIRPathParser::IdentifierContext* FHIRPathParser::QualifiedIdentifierContext::identifier(size_t i) {
|
|
2336
|
+
return getRuleContext<FHIRPathParser::IdentifierContext>(i);
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
|
|
2340
|
+
size_t FHIRPathParser::QualifiedIdentifierContext::getRuleIndex() const {
|
|
2341
|
+
return FHIRPathParser::RuleQualifiedIdentifier;
|
|
2342
|
+
}
|
|
2343
|
+
|
|
2344
|
+
void FHIRPathParser::QualifiedIdentifierContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2345
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2346
|
+
if (parserListener != nullptr)
|
|
2347
|
+
parserListener->enterQualifiedIdentifier(this);
|
|
2348
|
+
}
|
|
2349
|
+
|
|
2350
|
+
void FHIRPathParser::QualifiedIdentifierContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2351
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2352
|
+
if (parserListener != nullptr)
|
|
2353
|
+
parserListener->exitQualifiedIdentifier(this);
|
|
2354
|
+
}
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
std::any FHIRPathParser::QualifiedIdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2358
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2359
|
+
return parserVisitor->visitQualifiedIdentifier(this);
|
|
2360
|
+
else
|
|
2361
|
+
return visitor->visitChildren(this);
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
FHIRPathParser::QualifiedIdentifierContext* FHIRPathParser::qualifiedIdentifier() {
|
|
2365
|
+
QualifiedIdentifierContext *_localctx = _tracker.createInstance<QualifiedIdentifierContext>(_ctx, getState());
|
|
2366
|
+
enterRule(_localctx, 26, FHIRPathParser::RuleQualifiedIdentifier);
|
|
2367
|
+
|
|
2368
|
+
#if __cplusplus > 201703L
|
|
2369
|
+
auto onExit = finally([=, this] {
|
|
2370
|
+
#else
|
|
2371
|
+
auto onExit = finally([=] {
|
|
2372
|
+
#endif
|
|
2373
|
+
exitRule();
|
|
2374
|
+
});
|
|
2375
|
+
try {
|
|
2376
|
+
size_t alt;
|
|
2377
|
+
enterOuterAlt(_localctx, 1);
|
|
2378
|
+
setState(143);
|
|
2379
|
+
identifier();
|
|
2380
|
+
setState(148);
|
|
2381
|
+
_errHandler->sync(this);
|
|
2382
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx);
|
|
2383
|
+
while (alt != 2 && alt != atn::ATN::INVALID_ALT_NUMBER) {
|
|
2384
|
+
if (alt == 1) {
|
|
2385
|
+
setState(144);
|
|
2386
|
+
match(FHIRPathParser::T__0);
|
|
2387
|
+
setState(145);
|
|
2388
|
+
identifier();
|
|
2389
|
+
}
|
|
2390
|
+
setState(150);
|
|
2391
|
+
_errHandler->sync(this);
|
|
2392
|
+
alt = getInterpreter<atn::ParserATNSimulator>()->adaptivePredict(_input, 11, _ctx);
|
|
2393
|
+
}
|
|
2394
|
+
|
|
2395
|
+
}
|
|
2396
|
+
catch (RecognitionException &e) {
|
|
2397
|
+
_errHandler->reportError(this, e);
|
|
2398
|
+
_localctx->exception = std::current_exception();
|
|
2399
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
return _localctx;
|
|
2403
|
+
}
|
|
2404
|
+
|
|
2405
|
+
//----------------- IdentifierContext ------------------------------------------------------------------
|
|
2406
|
+
|
|
2407
|
+
FHIRPathParser::IdentifierContext::IdentifierContext(ParserRuleContext *parent, size_t invokingState)
|
|
2408
|
+
: ParserRuleContext(parent, invokingState) {
|
|
2409
|
+
}
|
|
2410
|
+
|
|
2411
|
+
tree::TerminalNode* FHIRPathParser::IdentifierContext::IDENTIFIER() {
|
|
2412
|
+
return getToken(FHIRPathParser::IDENTIFIER, 0);
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
tree::TerminalNode* FHIRPathParser::IdentifierContext::DELIMITEDIDENTIFIER() {
|
|
2416
|
+
return getToken(FHIRPathParser::DELIMITEDIDENTIFIER, 0);
|
|
2417
|
+
}
|
|
2418
|
+
|
|
2419
|
+
|
|
2420
|
+
size_t FHIRPathParser::IdentifierContext::getRuleIndex() const {
|
|
2421
|
+
return FHIRPathParser::RuleIdentifier;
|
|
2422
|
+
}
|
|
2423
|
+
|
|
2424
|
+
void FHIRPathParser::IdentifierContext::enterRule(tree::ParseTreeListener *listener) {
|
|
2425
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2426
|
+
if (parserListener != nullptr)
|
|
2427
|
+
parserListener->enterIdentifier(this);
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
void FHIRPathParser::IdentifierContext::exitRule(tree::ParseTreeListener *listener) {
|
|
2431
|
+
auto parserListener = dynamic_cast<FHIRPathListener *>(listener);
|
|
2432
|
+
if (parserListener != nullptr)
|
|
2433
|
+
parserListener->exitIdentifier(this);
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
|
|
2437
|
+
std::any FHIRPathParser::IdentifierContext::accept(tree::ParseTreeVisitor *visitor) {
|
|
2438
|
+
if (auto parserVisitor = dynamic_cast<FHIRPathVisitor*>(visitor))
|
|
2439
|
+
return parserVisitor->visitIdentifier(this);
|
|
2440
|
+
else
|
|
2441
|
+
return visitor->visitChildren(this);
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
FHIRPathParser::IdentifierContext* FHIRPathParser::identifier() {
|
|
2445
|
+
IdentifierContext *_localctx = _tracker.createInstance<IdentifierContext>(_ctx, getState());
|
|
2446
|
+
enterRule(_localctx, 28, FHIRPathParser::RuleIdentifier);
|
|
2447
|
+
size_t _la = 0;
|
|
2448
|
+
|
|
2449
|
+
#if __cplusplus > 201703L
|
|
2450
|
+
auto onExit = finally([=, this] {
|
|
2451
|
+
#else
|
|
2452
|
+
auto onExit = finally([=] {
|
|
2453
|
+
#endif
|
|
2454
|
+
exitRule();
|
|
2455
|
+
});
|
|
2456
|
+
try {
|
|
2457
|
+
enterOuterAlt(_localctx, 1);
|
|
2458
|
+
setState(151);
|
|
2459
|
+
_la = _input->LA(1);
|
|
2460
|
+
if (!((((_la & ~ 0x3fULL) == 0) &&
|
|
2461
|
+
((1ULL << _la) & ((1ULL << FHIRPathParser::T__15)
|
|
2462
|
+
| (1ULL << FHIRPathParser::T__16)
|
|
2463
|
+
| (1ULL << FHIRPathParser::T__21)
|
|
2464
|
+
| (1ULL << FHIRPathParser::T__22)
|
|
2465
|
+
| (1ULL << FHIRPathParser::IDENTIFIER)
|
|
2466
|
+
| (1ULL << FHIRPathParser::DELIMITEDIDENTIFIER))) != 0))) {
|
|
2467
|
+
_errHandler->recoverInline(this);
|
|
2468
|
+
}
|
|
2469
|
+
else {
|
|
2470
|
+
_errHandler->reportMatch(this);
|
|
2471
|
+
consume();
|
|
2472
|
+
}
|
|
2473
|
+
|
|
2474
|
+
}
|
|
2475
|
+
catch (RecognitionException &e) {
|
|
2476
|
+
_errHandler->reportError(this, e);
|
|
2477
|
+
_localctx->exception = std::current_exception();
|
|
2478
|
+
_errHandler->recover(this, _localctx->exception);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
return _localctx;
|
|
2482
|
+
}
|
|
2483
|
+
|
|
2484
|
+
bool FHIRPathParser::sempred(RuleContext *context, size_t ruleIndex, size_t predicateIndex) {
|
|
2485
|
+
switch (ruleIndex) {
|
|
2486
|
+
case 1: return expressionSempred(antlrcpp::downCast<ExpressionContext *>(context), predicateIndex);
|
|
2487
|
+
|
|
2488
|
+
default:
|
|
2489
|
+
break;
|
|
2490
|
+
}
|
|
2491
|
+
return true;
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
bool FHIRPathParser::expressionSempred(ExpressionContext *_localctx, size_t predicateIndex) {
|
|
2495
|
+
switch (predicateIndex) {
|
|
2496
|
+
case 0: return precpred(_ctx, 10);
|
|
2497
|
+
case 1: return precpred(_ctx, 9);
|
|
2498
|
+
case 2: return precpred(_ctx, 8);
|
|
2499
|
+
case 3: return precpred(_ctx, 7);
|
|
2500
|
+
case 4: return precpred(_ctx, 5);
|
|
2501
|
+
case 5: return precpred(_ctx, 4);
|
|
2502
|
+
case 6: return precpred(_ctx, 3);
|
|
2503
|
+
case 7: return precpred(_ctx, 2);
|
|
2504
|
+
case 8: return precpred(_ctx, 1);
|
|
2505
|
+
case 9: return precpred(_ctx, 13);
|
|
2506
|
+
case 10: return precpred(_ctx, 12);
|
|
2507
|
+
case 11: return precpred(_ctx, 6);
|
|
2508
|
+
|
|
2509
|
+
default:
|
|
2510
|
+
break;
|
|
2511
|
+
}
|
|
2512
|
+
return true;
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
void FHIRPathParser::initialize() {
|
|
2516
|
+
std::call_once(fhirpathParserOnceFlag, fhirpathParserInitialize);
|
|
2517
|
+
}
|