fhirpath-rb 0.1.2 → 0.1.3
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/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,3161 @@
|
|
|
1
|
+
#include <iostream>
|
|
2
|
+
#include <cxxabi.h>
|
|
3
|
+
#include <cstdlib>
|
|
4
|
+
|
|
5
|
+
#include <antlr4-runtime.h>
|
|
6
|
+
|
|
7
|
+
#include "antlrgen/FHIRPathParser.h"
|
|
8
|
+
#include "antlrgen/FHIRPathBaseVisitor.h"
|
|
9
|
+
#include "antlrgen/FHIRPathLexer.h"
|
|
10
|
+
|
|
11
|
+
#include <rice/rice.hpp>
|
|
12
|
+
#include <rice/stl.hpp>
|
|
13
|
+
|
|
14
|
+
#ifdef _WIN32
|
|
15
|
+
#undef OPTIONAL
|
|
16
|
+
#undef IN
|
|
17
|
+
#undef OUT
|
|
18
|
+
#endif
|
|
19
|
+
|
|
20
|
+
#undef FALSE
|
|
21
|
+
#undef TRUE
|
|
22
|
+
|
|
23
|
+
#undef TYPE
|
|
24
|
+
|
|
25
|
+
using namespace std;
|
|
26
|
+
using namespace Rice;
|
|
27
|
+
using namespace antlr4;
|
|
28
|
+
|
|
29
|
+
Class rb_cEntireExpressionContext;
|
|
30
|
+
Class rb_cExpressionContext;
|
|
31
|
+
Class rb_cIndexerExpressionContext;
|
|
32
|
+
Class rb_cPolarityExpressionContext;
|
|
33
|
+
Class rb_cAdditiveExpressionContext;
|
|
34
|
+
Class rb_cMultiplicativeExpressionContext;
|
|
35
|
+
Class rb_cUnionExpressionContext;
|
|
36
|
+
Class rb_cOrExpressionContext;
|
|
37
|
+
Class rb_cAndExpressionContext;
|
|
38
|
+
Class rb_cMembershipExpressionContext;
|
|
39
|
+
Class rb_cInequalityExpressionContext;
|
|
40
|
+
Class rb_cInvocationExpressionContext;
|
|
41
|
+
Class rb_cInvocationContext;
|
|
42
|
+
Class rb_cEqualityExpressionContext;
|
|
43
|
+
Class rb_cImpliesExpressionContext;
|
|
44
|
+
Class rb_cTermContext;
|
|
45
|
+
Class rb_cTermExpressionContext;
|
|
46
|
+
Class rb_cTypeExpressionContext;
|
|
47
|
+
Class rb_cTypeSpecifierContext;
|
|
48
|
+
Class rb_cExternalConstantContext;
|
|
49
|
+
Class rb_cExternalConstantTermContext;
|
|
50
|
+
Class rb_cLiteralContext;
|
|
51
|
+
Class rb_cLiteralTermContext;
|
|
52
|
+
Class rb_cParenthesizedTermContext;
|
|
53
|
+
Class rb_cInvocationTermContext;
|
|
54
|
+
Class rb_cTimeLiteralContext;
|
|
55
|
+
Class rb_cNullLiteralContext;
|
|
56
|
+
Class rb_cDateTimeLiteralContext;
|
|
57
|
+
Class rb_cStringLiteralContext;
|
|
58
|
+
Class rb_cBooleanLiteralContext;
|
|
59
|
+
Class rb_cNumberLiteralContext;
|
|
60
|
+
Class rb_cQuantityContext;
|
|
61
|
+
Class rb_cQuantityLiteralContext;
|
|
62
|
+
Class rb_cIdentifierContext;
|
|
63
|
+
Class rb_cTotalInvocationContext;
|
|
64
|
+
Class rb_cThisInvocationContext;
|
|
65
|
+
Class rb_cIndexInvocationContext;
|
|
66
|
+
Class rb_cFunctnContext;
|
|
67
|
+
Class rb_cFunctionInvocationContext;
|
|
68
|
+
Class rb_cMemberInvocationContext;
|
|
69
|
+
Class rb_cParamListContext;
|
|
70
|
+
Class rb_cUnitContext;
|
|
71
|
+
Class rb_cDateTimePrecisionContext;
|
|
72
|
+
Class rb_cPluralDateTimePrecisionContext;
|
|
73
|
+
Class rb_cQualifiedIdentifierContext;
|
|
74
|
+
Class rb_cToken;
|
|
75
|
+
Class rb_cParser;
|
|
76
|
+
Class rb_cParseTree;
|
|
77
|
+
Class rb_cTerminalNode;
|
|
78
|
+
Class rb_cContextProxy;
|
|
79
|
+
|
|
80
|
+
namespace Rice::detail {
|
|
81
|
+
template <>
|
|
82
|
+
class To_Ruby<Token*> {
|
|
83
|
+
public:
|
|
84
|
+
VALUE convert(Token* const &x) {
|
|
85
|
+
if (!x) return Qnil;
|
|
86
|
+
return Data_Object<Token>(x, false, rb_cToken);
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
template <>
|
|
91
|
+
class To_Ruby<tree::ParseTree*> {
|
|
92
|
+
public:
|
|
93
|
+
VALUE convert(tree::ParseTree* const &x) {
|
|
94
|
+
if (!x) return Qnil;
|
|
95
|
+
return Data_Object<tree::ParseTree>(x, false, rb_cParseTree);
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
template <>
|
|
100
|
+
class To_Ruby<tree::TerminalNode*> {
|
|
101
|
+
public:
|
|
102
|
+
VALUE convert(tree::TerminalNode* const &x) {
|
|
103
|
+
if (!x) return Qnil;
|
|
104
|
+
return Data_Object<tree::TerminalNode>(x, false, rb_cTerminalNode);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
class ContextProxy {
|
|
110
|
+
public:
|
|
111
|
+
ContextProxy(tree::ParseTree* orig) {
|
|
112
|
+
this -> orig = orig;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
tree::ParseTree* getOriginal() {
|
|
116
|
+
return orig;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
std::string getText() {
|
|
120
|
+
return orig -> getText();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
Object getStart() {
|
|
124
|
+
auto token = ((ParserRuleContext*) orig) -> getStart();
|
|
125
|
+
|
|
126
|
+
return detail::To_Ruby<Token*>().convert(token);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
Object getStop() {
|
|
130
|
+
auto token = ((ParserRuleContext*) orig) -> getStop();
|
|
131
|
+
|
|
132
|
+
return detail::To_Ruby<Token*>().convert(token);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
Array getChildren() {
|
|
136
|
+
Array children;
|
|
137
|
+
if (orig != nullptr) {
|
|
138
|
+
for (auto it = orig -> children.begin(); it != orig -> children.end(); it ++) {
|
|
139
|
+
Object parseTree = ContextProxy::wrapParseTree(*it);
|
|
140
|
+
|
|
141
|
+
if (!parseTree.is_nil()) {
|
|
142
|
+
children.push(parseTree);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return children;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
Object getParent() {
|
|
150
|
+
return orig == nullptr ? Rice::Object(Qnil) : ContextProxy::wrapParseTree(orig -> parent);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
size_t childCount() {
|
|
154
|
+
return orig == nullptr ? 0 : orig -> children.size();
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
std::string getTypeName() {
|
|
158
|
+
if (orig == nullptr) return "";
|
|
159
|
+
|
|
160
|
+
int status = 0;
|
|
161
|
+
char *demangled = abi::__cxa_demangle(typeid(*orig).name(), nullptr, nullptr, &status);
|
|
162
|
+
std::string result = (status == 0 && demangled != nullptr)
|
|
163
|
+
? std::string(demangled)
|
|
164
|
+
: std::string(typeid(*orig).name());
|
|
165
|
+
|
|
166
|
+
if (demangled != nullptr) {
|
|
167
|
+
free(demangled);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
return result;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
bool doubleEquals(Object other) {
|
|
174
|
+
if (other.is_a(rb_cContextProxy)) {
|
|
175
|
+
return detail::From_Ruby<ContextProxy*>().convert(other) -> getOriginal() == getOriginal();
|
|
176
|
+
} else {
|
|
177
|
+
return false;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
private:
|
|
182
|
+
|
|
183
|
+
static Object wrapParseTree(tree::ParseTree* node);
|
|
184
|
+
|
|
185
|
+
protected:
|
|
186
|
+
tree::ParseTree* orig = nullptr;
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
class TerminalNodeProxy : public ContextProxy {
|
|
190
|
+
public:
|
|
191
|
+
TerminalNodeProxy(tree::ParseTree* tree) : ContextProxy(tree) { }
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class EntireExpressionContextProxy : public ContextProxy {
|
|
196
|
+
public:
|
|
197
|
+
EntireExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
198
|
+
Object expression();
|
|
199
|
+
Object EOF();
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
class ExpressionContextProxy : public ContextProxy {
|
|
203
|
+
public:
|
|
204
|
+
ExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
205
|
+
|
|
206
|
+
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
class IndexerExpressionContextProxy : public ContextProxy {
|
|
210
|
+
public:
|
|
211
|
+
IndexerExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
212
|
+
Object expression();
|
|
213
|
+
Object expressionAt(size_t i);
|
|
214
|
+
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
class PolarityExpressionContextProxy : public ContextProxy {
|
|
218
|
+
public:
|
|
219
|
+
PolarityExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
220
|
+
Object expression();
|
|
221
|
+
|
|
222
|
+
};
|
|
223
|
+
|
|
224
|
+
class AdditiveExpressionContextProxy : public ContextProxy {
|
|
225
|
+
public:
|
|
226
|
+
AdditiveExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
227
|
+
Object expression();
|
|
228
|
+
Object expressionAt(size_t i);
|
|
229
|
+
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
class MultiplicativeExpressionContextProxy : public ContextProxy {
|
|
233
|
+
public:
|
|
234
|
+
MultiplicativeExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
235
|
+
Object expression();
|
|
236
|
+
Object expressionAt(size_t i);
|
|
237
|
+
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
class UnionExpressionContextProxy : public ContextProxy {
|
|
241
|
+
public:
|
|
242
|
+
UnionExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
243
|
+
Object expression();
|
|
244
|
+
Object expressionAt(size_t i);
|
|
245
|
+
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
class OrExpressionContextProxy : public ContextProxy {
|
|
249
|
+
public:
|
|
250
|
+
OrExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
251
|
+
Object expression();
|
|
252
|
+
Object expressionAt(size_t i);
|
|
253
|
+
|
|
254
|
+
};
|
|
255
|
+
|
|
256
|
+
class AndExpressionContextProxy : public ContextProxy {
|
|
257
|
+
public:
|
|
258
|
+
AndExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
259
|
+
Object expression();
|
|
260
|
+
Object expressionAt(size_t i);
|
|
261
|
+
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
class MembershipExpressionContextProxy : public ContextProxy {
|
|
265
|
+
public:
|
|
266
|
+
MembershipExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
267
|
+
Object expression();
|
|
268
|
+
Object expressionAt(size_t i);
|
|
269
|
+
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
class InequalityExpressionContextProxy : public ContextProxy {
|
|
273
|
+
public:
|
|
274
|
+
InequalityExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
275
|
+
Object expression();
|
|
276
|
+
Object expressionAt(size_t i);
|
|
277
|
+
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
class InvocationExpressionContextProxy : public ContextProxy {
|
|
281
|
+
public:
|
|
282
|
+
InvocationExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
283
|
+
Object expression();
|
|
284
|
+
Object invocation();
|
|
285
|
+
|
|
286
|
+
};
|
|
287
|
+
|
|
288
|
+
class InvocationContextProxy : public ContextProxy {
|
|
289
|
+
public:
|
|
290
|
+
InvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
};
|
|
294
|
+
|
|
295
|
+
class EqualityExpressionContextProxy : public ContextProxy {
|
|
296
|
+
public:
|
|
297
|
+
EqualityExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
298
|
+
Object expression();
|
|
299
|
+
Object expressionAt(size_t i);
|
|
300
|
+
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
class ImpliesExpressionContextProxy : public ContextProxy {
|
|
304
|
+
public:
|
|
305
|
+
ImpliesExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
306
|
+
Object expression();
|
|
307
|
+
Object expressionAt(size_t i);
|
|
308
|
+
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
class TermContextProxy : public ContextProxy {
|
|
312
|
+
public:
|
|
313
|
+
TermContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
class TermExpressionContextProxy : public ContextProxy {
|
|
319
|
+
public:
|
|
320
|
+
TermExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
321
|
+
Object term();
|
|
322
|
+
|
|
323
|
+
};
|
|
324
|
+
|
|
325
|
+
class TypeExpressionContextProxy : public ContextProxy {
|
|
326
|
+
public:
|
|
327
|
+
TypeExpressionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
328
|
+
Object expression();
|
|
329
|
+
Object typeSpecifier();
|
|
330
|
+
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
class TypeSpecifierContextProxy : public ContextProxy {
|
|
334
|
+
public:
|
|
335
|
+
TypeSpecifierContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
336
|
+
Object qualifiedIdentifier();
|
|
337
|
+
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
class ExternalConstantContextProxy : public ContextProxy {
|
|
341
|
+
public:
|
|
342
|
+
ExternalConstantContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
343
|
+
Object identifier();
|
|
344
|
+
Object STRING();
|
|
345
|
+
};
|
|
346
|
+
|
|
347
|
+
class ExternalConstantTermContextProxy : public ContextProxy {
|
|
348
|
+
public:
|
|
349
|
+
ExternalConstantTermContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
350
|
+
Object externalConstant();
|
|
351
|
+
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
class LiteralContextProxy : public ContextProxy {
|
|
355
|
+
public:
|
|
356
|
+
LiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
class LiteralTermContextProxy : public ContextProxy {
|
|
362
|
+
public:
|
|
363
|
+
LiteralTermContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
364
|
+
Object literal();
|
|
365
|
+
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
class ParenthesizedTermContextProxy : public ContextProxy {
|
|
369
|
+
public:
|
|
370
|
+
ParenthesizedTermContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
371
|
+
Object expression();
|
|
372
|
+
|
|
373
|
+
};
|
|
374
|
+
|
|
375
|
+
class InvocationTermContextProxy : public ContextProxy {
|
|
376
|
+
public:
|
|
377
|
+
InvocationTermContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
378
|
+
Object invocation();
|
|
379
|
+
|
|
380
|
+
};
|
|
381
|
+
|
|
382
|
+
class TimeLiteralContextProxy : public ContextProxy {
|
|
383
|
+
public:
|
|
384
|
+
TimeLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
385
|
+
|
|
386
|
+
Object TIME();
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
class NullLiteralContextProxy : public ContextProxy {
|
|
390
|
+
public:
|
|
391
|
+
NullLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
class DateTimeLiteralContextProxy : public ContextProxy {
|
|
397
|
+
public:
|
|
398
|
+
DateTimeLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
399
|
+
|
|
400
|
+
Object DATETIME();
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
class StringLiteralContextProxy : public ContextProxy {
|
|
404
|
+
public:
|
|
405
|
+
StringLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
406
|
+
|
|
407
|
+
Object STRING();
|
|
408
|
+
};
|
|
409
|
+
|
|
410
|
+
class BooleanLiteralContextProxy : public ContextProxy {
|
|
411
|
+
public:
|
|
412
|
+
BooleanLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
class NumberLiteralContextProxy : public ContextProxy {
|
|
418
|
+
public:
|
|
419
|
+
NumberLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
420
|
+
|
|
421
|
+
Object NUMBER();
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
class QuantityContextProxy : public ContextProxy {
|
|
425
|
+
public:
|
|
426
|
+
QuantityContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
427
|
+
Object unit();
|
|
428
|
+
Object NUMBER();
|
|
429
|
+
};
|
|
430
|
+
|
|
431
|
+
class QuantityLiteralContextProxy : public ContextProxy {
|
|
432
|
+
public:
|
|
433
|
+
QuantityLiteralContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
434
|
+
Object quantity();
|
|
435
|
+
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
class IdentifierContextProxy : public ContextProxy {
|
|
439
|
+
public:
|
|
440
|
+
IdentifierContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
441
|
+
|
|
442
|
+
Object IDENTIFIER();
|
|
443
|
+
Object DELIMITEDIDENTIFIER();
|
|
444
|
+
};
|
|
445
|
+
|
|
446
|
+
class TotalInvocationContextProxy : public ContextProxy {
|
|
447
|
+
public:
|
|
448
|
+
TotalInvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
class ThisInvocationContextProxy : public ContextProxy {
|
|
454
|
+
public:
|
|
455
|
+
ThisInvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
456
|
+
|
|
457
|
+
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
class IndexInvocationContextProxy : public ContextProxy {
|
|
461
|
+
public:
|
|
462
|
+
IndexInvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
463
|
+
|
|
464
|
+
|
|
465
|
+
};
|
|
466
|
+
|
|
467
|
+
class FunctnContextProxy : public ContextProxy {
|
|
468
|
+
public:
|
|
469
|
+
FunctnContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
470
|
+
Object identifier();
|
|
471
|
+
Object paramList();
|
|
472
|
+
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
class FunctionInvocationContextProxy : public ContextProxy {
|
|
476
|
+
public:
|
|
477
|
+
FunctionInvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
478
|
+
Object functn();
|
|
479
|
+
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
class MemberInvocationContextProxy : public ContextProxy {
|
|
483
|
+
public:
|
|
484
|
+
MemberInvocationContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
485
|
+
Object identifier();
|
|
486
|
+
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
class ParamListContextProxy : public ContextProxy {
|
|
490
|
+
public:
|
|
491
|
+
ParamListContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
492
|
+
Object expression();
|
|
493
|
+
Object expressionAt(size_t i);
|
|
494
|
+
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
class UnitContextProxy : public ContextProxy {
|
|
498
|
+
public:
|
|
499
|
+
UnitContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
500
|
+
Object dateTimePrecision();
|
|
501
|
+
Object pluralDateTimePrecision();
|
|
502
|
+
Object STRING();
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
class DateTimePrecisionContextProxy : public ContextProxy {
|
|
506
|
+
public:
|
|
507
|
+
DateTimePrecisionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
};
|
|
511
|
+
|
|
512
|
+
class PluralDateTimePrecisionContextProxy : public ContextProxy {
|
|
513
|
+
public:
|
|
514
|
+
PluralDateTimePrecisionContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
515
|
+
|
|
516
|
+
|
|
517
|
+
};
|
|
518
|
+
|
|
519
|
+
class QualifiedIdentifierContextProxy : public ContextProxy {
|
|
520
|
+
public:
|
|
521
|
+
QualifiedIdentifierContextProxy(tree::ParseTree* ctx) : ContextProxy(ctx) {};
|
|
522
|
+
Object identifier();
|
|
523
|
+
Object identifierAt(size_t i);
|
|
524
|
+
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
|
|
528
|
+
namespace Rice::detail {
|
|
529
|
+
template <>
|
|
530
|
+
class To_Ruby<FHIRPathParser::EntireExpressionContext*> {
|
|
531
|
+
public:
|
|
532
|
+
VALUE convert(FHIRPathParser::EntireExpressionContext* const &x) {
|
|
533
|
+
if (!x) return Qnil;
|
|
534
|
+
return Data_Object<FHIRPathParser::EntireExpressionContext>(x, false, rb_cEntireExpressionContext);
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
|
|
538
|
+
template <>
|
|
539
|
+
class To_Ruby<EntireExpressionContextProxy*> {
|
|
540
|
+
public:
|
|
541
|
+
VALUE convert(EntireExpressionContextProxy* const &x) {
|
|
542
|
+
if (!x) return Qnil;
|
|
543
|
+
return Data_Object<EntireExpressionContextProxy>(x, false, rb_cEntireExpressionContext);
|
|
544
|
+
}
|
|
545
|
+
};
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
namespace Rice::detail {
|
|
549
|
+
template <>
|
|
550
|
+
class To_Ruby<FHIRPathParser::ExpressionContext*> {
|
|
551
|
+
public:
|
|
552
|
+
VALUE convert(FHIRPathParser::ExpressionContext* const &x) {
|
|
553
|
+
if (!x) return Qnil;
|
|
554
|
+
return Data_Object<FHIRPathParser::ExpressionContext>(x, false, rb_cExpressionContext);
|
|
555
|
+
}
|
|
556
|
+
};
|
|
557
|
+
|
|
558
|
+
template <>
|
|
559
|
+
class To_Ruby<ExpressionContextProxy*> {
|
|
560
|
+
public:
|
|
561
|
+
VALUE convert(ExpressionContextProxy* const &x) {
|
|
562
|
+
if (!x) return Qnil;
|
|
563
|
+
return Data_Object<ExpressionContextProxy>(x, false, rb_cExpressionContext);
|
|
564
|
+
}
|
|
565
|
+
};
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
namespace Rice::detail {
|
|
569
|
+
template <>
|
|
570
|
+
class To_Ruby<FHIRPathParser::IndexerExpressionContext*> {
|
|
571
|
+
public:
|
|
572
|
+
VALUE convert(FHIRPathParser::IndexerExpressionContext* const &x) {
|
|
573
|
+
if (!x) return Qnil;
|
|
574
|
+
return Data_Object<FHIRPathParser::IndexerExpressionContext>(x, false, rb_cIndexerExpressionContext);
|
|
575
|
+
}
|
|
576
|
+
};
|
|
577
|
+
|
|
578
|
+
template <>
|
|
579
|
+
class To_Ruby<IndexerExpressionContextProxy*> {
|
|
580
|
+
public:
|
|
581
|
+
VALUE convert(IndexerExpressionContextProxy* const &x) {
|
|
582
|
+
if (!x) return Qnil;
|
|
583
|
+
return Data_Object<IndexerExpressionContextProxy>(x, false, rb_cIndexerExpressionContext);
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
namespace Rice::detail {
|
|
589
|
+
template <>
|
|
590
|
+
class To_Ruby<FHIRPathParser::PolarityExpressionContext*> {
|
|
591
|
+
public:
|
|
592
|
+
VALUE convert(FHIRPathParser::PolarityExpressionContext* const &x) {
|
|
593
|
+
if (!x) return Qnil;
|
|
594
|
+
return Data_Object<FHIRPathParser::PolarityExpressionContext>(x, false, rb_cPolarityExpressionContext);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
template <>
|
|
599
|
+
class To_Ruby<PolarityExpressionContextProxy*> {
|
|
600
|
+
public:
|
|
601
|
+
VALUE convert(PolarityExpressionContextProxy* const &x) {
|
|
602
|
+
if (!x) return Qnil;
|
|
603
|
+
return Data_Object<PolarityExpressionContextProxy>(x, false, rb_cPolarityExpressionContext);
|
|
604
|
+
}
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
namespace Rice::detail {
|
|
609
|
+
template <>
|
|
610
|
+
class To_Ruby<FHIRPathParser::AdditiveExpressionContext*> {
|
|
611
|
+
public:
|
|
612
|
+
VALUE convert(FHIRPathParser::AdditiveExpressionContext* const &x) {
|
|
613
|
+
if (!x) return Qnil;
|
|
614
|
+
return Data_Object<FHIRPathParser::AdditiveExpressionContext>(x, false, rb_cAdditiveExpressionContext);
|
|
615
|
+
}
|
|
616
|
+
};
|
|
617
|
+
|
|
618
|
+
template <>
|
|
619
|
+
class To_Ruby<AdditiveExpressionContextProxy*> {
|
|
620
|
+
public:
|
|
621
|
+
VALUE convert(AdditiveExpressionContextProxy* const &x) {
|
|
622
|
+
if (!x) return Qnil;
|
|
623
|
+
return Data_Object<AdditiveExpressionContextProxy>(x, false, rb_cAdditiveExpressionContext);
|
|
624
|
+
}
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
|
|
628
|
+
namespace Rice::detail {
|
|
629
|
+
template <>
|
|
630
|
+
class To_Ruby<FHIRPathParser::MultiplicativeExpressionContext*> {
|
|
631
|
+
public:
|
|
632
|
+
VALUE convert(FHIRPathParser::MultiplicativeExpressionContext* const &x) {
|
|
633
|
+
if (!x) return Qnil;
|
|
634
|
+
return Data_Object<FHIRPathParser::MultiplicativeExpressionContext>(x, false, rb_cMultiplicativeExpressionContext);
|
|
635
|
+
}
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
template <>
|
|
639
|
+
class To_Ruby<MultiplicativeExpressionContextProxy*> {
|
|
640
|
+
public:
|
|
641
|
+
VALUE convert(MultiplicativeExpressionContextProxy* const &x) {
|
|
642
|
+
if (!x) return Qnil;
|
|
643
|
+
return Data_Object<MultiplicativeExpressionContextProxy>(x, false, rb_cMultiplicativeExpressionContext);
|
|
644
|
+
}
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
namespace Rice::detail {
|
|
649
|
+
template <>
|
|
650
|
+
class To_Ruby<FHIRPathParser::UnionExpressionContext*> {
|
|
651
|
+
public:
|
|
652
|
+
VALUE convert(FHIRPathParser::UnionExpressionContext* const &x) {
|
|
653
|
+
if (!x) return Qnil;
|
|
654
|
+
return Data_Object<FHIRPathParser::UnionExpressionContext>(x, false, rb_cUnionExpressionContext);
|
|
655
|
+
}
|
|
656
|
+
};
|
|
657
|
+
|
|
658
|
+
template <>
|
|
659
|
+
class To_Ruby<UnionExpressionContextProxy*> {
|
|
660
|
+
public:
|
|
661
|
+
VALUE convert(UnionExpressionContextProxy* const &x) {
|
|
662
|
+
if (!x) return Qnil;
|
|
663
|
+
return Data_Object<UnionExpressionContextProxy>(x, false, rb_cUnionExpressionContext);
|
|
664
|
+
}
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
namespace Rice::detail {
|
|
669
|
+
template <>
|
|
670
|
+
class To_Ruby<FHIRPathParser::OrExpressionContext*> {
|
|
671
|
+
public:
|
|
672
|
+
VALUE convert(FHIRPathParser::OrExpressionContext* const &x) {
|
|
673
|
+
if (!x) return Qnil;
|
|
674
|
+
return Data_Object<FHIRPathParser::OrExpressionContext>(x, false, rb_cOrExpressionContext);
|
|
675
|
+
}
|
|
676
|
+
};
|
|
677
|
+
|
|
678
|
+
template <>
|
|
679
|
+
class To_Ruby<OrExpressionContextProxy*> {
|
|
680
|
+
public:
|
|
681
|
+
VALUE convert(OrExpressionContextProxy* const &x) {
|
|
682
|
+
if (!x) return Qnil;
|
|
683
|
+
return Data_Object<OrExpressionContextProxy>(x, false, rb_cOrExpressionContext);
|
|
684
|
+
}
|
|
685
|
+
};
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
namespace Rice::detail {
|
|
689
|
+
template <>
|
|
690
|
+
class To_Ruby<FHIRPathParser::AndExpressionContext*> {
|
|
691
|
+
public:
|
|
692
|
+
VALUE convert(FHIRPathParser::AndExpressionContext* const &x) {
|
|
693
|
+
if (!x) return Qnil;
|
|
694
|
+
return Data_Object<FHIRPathParser::AndExpressionContext>(x, false, rb_cAndExpressionContext);
|
|
695
|
+
}
|
|
696
|
+
};
|
|
697
|
+
|
|
698
|
+
template <>
|
|
699
|
+
class To_Ruby<AndExpressionContextProxy*> {
|
|
700
|
+
public:
|
|
701
|
+
VALUE convert(AndExpressionContextProxy* const &x) {
|
|
702
|
+
if (!x) return Qnil;
|
|
703
|
+
return Data_Object<AndExpressionContextProxy>(x, false, rb_cAndExpressionContext);
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
namespace Rice::detail {
|
|
709
|
+
template <>
|
|
710
|
+
class To_Ruby<FHIRPathParser::MembershipExpressionContext*> {
|
|
711
|
+
public:
|
|
712
|
+
VALUE convert(FHIRPathParser::MembershipExpressionContext* const &x) {
|
|
713
|
+
if (!x) return Qnil;
|
|
714
|
+
return Data_Object<FHIRPathParser::MembershipExpressionContext>(x, false, rb_cMembershipExpressionContext);
|
|
715
|
+
}
|
|
716
|
+
};
|
|
717
|
+
|
|
718
|
+
template <>
|
|
719
|
+
class To_Ruby<MembershipExpressionContextProxy*> {
|
|
720
|
+
public:
|
|
721
|
+
VALUE convert(MembershipExpressionContextProxy* const &x) {
|
|
722
|
+
if (!x) return Qnil;
|
|
723
|
+
return Data_Object<MembershipExpressionContextProxy>(x, false, rb_cMembershipExpressionContext);
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
namespace Rice::detail {
|
|
729
|
+
template <>
|
|
730
|
+
class To_Ruby<FHIRPathParser::InequalityExpressionContext*> {
|
|
731
|
+
public:
|
|
732
|
+
VALUE convert(FHIRPathParser::InequalityExpressionContext* const &x) {
|
|
733
|
+
if (!x) return Qnil;
|
|
734
|
+
return Data_Object<FHIRPathParser::InequalityExpressionContext>(x, false, rb_cInequalityExpressionContext);
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
template <>
|
|
739
|
+
class To_Ruby<InequalityExpressionContextProxy*> {
|
|
740
|
+
public:
|
|
741
|
+
VALUE convert(InequalityExpressionContextProxy* const &x) {
|
|
742
|
+
if (!x) return Qnil;
|
|
743
|
+
return Data_Object<InequalityExpressionContextProxy>(x, false, rb_cInequalityExpressionContext);
|
|
744
|
+
}
|
|
745
|
+
};
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
namespace Rice::detail {
|
|
749
|
+
template <>
|
|
750
|
+
class To_Ruby<FHIRPathParser::InvocationExpressionContext*> {
|
|
751
|
+
public:
|
|
752
|
+
VALUE convert(FHIRPathParser::InvocationExpressionContext* const &x) {
|
|
753
|
+
if (!x) return Qnil;
|
|
754
|
+
return Data_Object<FHIRPathParser::InvocationExpressionContext>(x, false, rb_cInvocationExpressionContext);
|
|
755
|
+
}
|
|
756
|
+
};
|
|
757
|
+
|
|
758
|
+
template <>
|
|
759
|
+
class To_Ruby<InvocationExpressionContextProxy*> {
|
|
760
|
+
public:
|
|
761
|
+
VALUE convert(InvocationExpressionContextProxy* const &x) {
|
|
762
|
+
if (!x) return Qnil;
|
|
763
|
+
return Data_Object<InvocationExpressionContextProxy>(x, false, rb_cInvocationExpressionContext);
|
|
764
|
+
}
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
|
|
768
|
+
namespace Rice::detail {
|
|
769
|
+
template <>
|
|
770
|
+
class To_Ruby<FHIRPathParser::InvocationContext*> {
|
|
771
|
+
public:
|
|
772
|
+
VALUE convert(FHIRPathParser::InvocationContext* const &x) {
|
|
773
|
+
if (!x) return Qnil;
|
|
774
|
+
return Data_Object<FHIRPathParser::InvocationContext>(x, false, rb_cInvocationContext);
|
|
775
|
+
}
|
|
776
|
+
};
|
|
777
|
+
|
|
778
|
+
template <>
|
|
779
|
+
class To_Ruby<InvocationContextProxy*> {
|
|
780
|
+
public:
|
|
781
|
+
VALUE convert(InvocationContextProxy* const &x) {
|
|
782
|
+
if (!x) return Qnil;
|
|
783
|
+
return Data_Object<InvocationContextProxy>(x, false, rb_cInvocationContext);
|
|
784
|
+
}
|
|
785
|
+
};
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
namespace Rice::detail {
|
|
789
|
+
template <>
|
|
790
|
+
class To_Ruby<FHIRPathParser::EqualityExpressionContext*> {
|
|
791
|
+
public:
|
|
792
|
+
VALUE convert(FHIRPathParser::EqualityExpressionContext* const &x) {
|
|
793
|
+
if (!x) return Qnil;
|
|
794
|
+
return Data_Object<FHIRPathParser::EqualityExpressionContext>(x, false, rb_cEqualityExpressionContext);
|
|
795
|
+
}
|
|
796
|
+
};
|
|
797
|
+
|
|
798
|
+
template <>
|
|
799
|
+
class To_Ruby<EqualityExpressionContextProxy*> {
|
|
800
|
+
public:
|
|
801
|
+
VALUE convert(EqualityExpressionContextProxy* const &x) {
|
|
802
|
+
if (!x) return Qnil;
|
|
803
|
+
return Data_Object<EqualityExpressionContextProxy>(x, false, rb_cEqualityExpressionContext);
|
|
804
|
+
}
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
namespace Rice::detail {
|
|
809
|
+
template <>
|
|
810
|
+
class To_Ruby<FHIRPathParser::ImpliesExpressionContext*> {
|
|
811
|
+
public:
|
|
812
|
+
VALUE convert(FHIRPathParser::ImpliesExpressionContext* const &x) {
|
|
813
|
+
if (!x) return Qnil;
|
|
814
|
+
return Data_Object<FHIRPathParser::ImpliesExpressionContext>(x, false, rb_cImpliesExpressionContext);
|
|
815
|
+
}
|
|
816
|
+
};
|
|
817
|
+
|
|
818
|
+
template <>
|
|
819
|
+
class To_Ruby<ImpliesExpressionContextProxy*> {
|
|
820
|
+
public:
|
|
821
|
+
VALUE convert(ImpliesExpressionContextProxy* const &x) {
|
|
822
|
+
if (!x) return Qnil;
|
|
823
|
+
return Data_Object<ImpliesExpressionContextProxy>(x, false, rb_cImpliesExpressionContext);
|
|
824
|
+
}
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
namespace Rice::detail {
|
|
829
|
+
template <>
|
|
830
|
+
class To_Ruby<FHIRPathParser::TermContext*> {
|
|
831
|
+
public:
|
|
832
|
+
VALUE convert(FHIRPathParser::TermContext* const &x) {
|
|
833
|
+
if (!x) return Qnil;
|
|
834
|
+
return Data_Object<FHIRPathParser::TermContext>(x, false, rb_cTermContext);
|
|
835
|
+
}
|
|
836
|
+
};
|
|
837
|
+
|
|
838
|
+
template <>
|
|
839
|
+
class To_Ruby<TermContextProxy*> {
|
|
840
|
+
public:
|
|
841
|
+
VALUE convert(TermContextProxy* const &x) {
|
|
842
|
+
if (!x) return Qnil;
|
|
843
|
+
return Data_Object<TermContextProxy>(x, false, rb_cTermContext);
|
|
844
|
+
}
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
|
|
848
|
+
namespace Rice::detail {
|
|
849
|
+
template <>
|
|
850
|
+
class To_Ruby<FHIRPathParser::TermExpressionContext*> {
|
|
851
|
+
public:
|
|
852
|
+
VALUE convert(FHIRPathParser::TermExpressionContext* const &x) {
|
|
853
|
+
if (!x) return Qnil;
|
|
854
|
+
return Data_Object<FHIRPathParser::TermExpressionContext>(x, false, rb_cTermExpressionContext);
|
|
855
|
+
}
|
|
856
|
+
};
|
|
857
|
+
|
|
858
|
+
template <>
|
|
859
|
+
class To_Ruby<TermExpressionContextProxy*> {
|
|
860
|
+
public:
|
|
861
|
+
VALUE convert(TermExpressionContextProxy* const &x) {
|
|
862
|
+
if (!x) return Qnil;
|
|
863
|
+
return Data_Object<TermExpressionContextProxy>(x, false, rb_cTermExpressionContext);
|
|
864
|
+
}
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
namespace Rice::detail {
|
|
869
|
+
template <>
|
|
870
|
+
class To_Ruby<FHIRPathParser::TypeExpressionContext*> {
|
|
871
|
+
public:
|
|
872
|
+
VALUE convert(FHIRPathParser::TypeExpressionContext* const &x) {
|
|
873
|
+
if (!x) return Qnil;
|
|
874
|
+
return Data_Object<FHIRPathParser::TypeExpressionContext>(x, false, rb_cTypeExpressionContext);
|
|
875
|
+
}
|
|
876
|
+
};
|
|
877
|
+
|
|
878
|
+
template <>
|
|
879
|
+
class To_Ruby<TypeExpressionContextProxy*> {
|
|
880
|
+
public:
|
|
881
|
+
VALUE convert(TypeExpressionContextProxy* const &x) {
|
|
882
|
+
if (!x) return Qnil;
|
|
883
|
+
return Data_Object<TypeExpressionContextProxy>(x, false, rb_cTypeExpressionContext);
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
namespace Rice::detail {
|
|
889
|
+
template <>
|
|
890
|
+
class To_Ruby<FHIRPathParser::TypeSpecifierContext*> {
|
|
891
|
+
public:
|
|
892
|
+
VALUE convert(FHIRPathParser::TypeSpecifierContext* const &x) {
|
|
893
|
+
if (!x) return Qnil;
|
|
894
|
+
return Data_Object<FHIRPathParser::TypeSpecifierContext>(x, false, rb_cTypeSpecifierContext);
|
|
895
|
+
}
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
template <>
|
|
899
|
+
class To_Ruby<TypeSpecifierContextProxy*> {
|
|
900
|
+
public:
|
|
901
|
+
VALUE convert(TypeSpecifierContextProxy* const &x) {
|
|
902
|
+
if (!x) return Qnil;
|
|
903
|
+
return Data_Object<TypeSpecifierContextProxy>(x, false, rb_cTypeSpecifierContext);
|
|
904
|
+
}
|
|
905
|
+
};
|
|
906
|
+
}
|
|
907
|
+
|
|
908
|
+
namespace Rice::detail {
|
|
909
|
+
template <>
|
|
910
|
+
class To_Ruby<FHIRPathParser::ExternalConstantContext*> {
|
|
911
|
+
public:
|
|
912
|
+
VALUE convert(FHIRPathParser::ExternalConstantContext* const &x) {
|
|
913
|
+
if (!x) return Qnil;
|
|
914
|
+
return Data_Object<FHIRPathParser::ExternalConstantContext>(x, false, rb_cExternalConstantContext);
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
|
|
918
|
+
template <>
|
|
919
|
+
class To_Ruby<ExternalConstantContextProxy*> {
|
|
920
|
+
public:
|
|
921
|
+
VALUE convert(ExternalConstantContextProxy* const &x) {
|
|
922
|
+
if (!x) return Qnil;
|
|
923
|
+
return Data_Object<ExternalConstantContextProxy>(x, false, rb_cExternalConstantContext);
|
|
924
|
+
}
|
|
925
|
+
};
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
namespace Rice::detail {
|
|
929
|
+
template <>
|
|
930
|
+
class To_Ruby<FHIRPathParser::ExternalConstantTermContext*> {
|
|
931
|
+
public:
|
|
932
|
+
VALUE convert(FHIRPathParser::ExternalConstantTermContext* const &x) {
|
|
933
|
+
if (!x) return Qnil;
|
|
934
|
+
return Data_Object<FHIRPathParser::ExternalConstantTermContext>(x, false, rb_cExternalConstantTermContext);
|
|
935
|
+
}
|
|
936
|
+
};
|
|
937
|
+
|
|
938
|
+
template <>
|
|
939
|
+
class To_Ruby<ExternalConstantTermContextProxy*> {
|
|
940
|
+
public:
|
|
941
|
+
VALUE convert(ExternalConstantTermContextProxy* const &x) {
|
|
942
|
+
if (!x) return Qnil;
|
|
943
|
+
return Data_Object<ExternalConstantTermContextProxy>(x, false, rb_cExternalConstantTermContext);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
namespace Rice::detail {
|
|
949
|
+
template <>
|
|
950
|
+
class To_Ruby<FHIRPathParser::LiteralContext*> {
|
|
951
|
+
public:
|
|
952
|
+
VALUE convert(FHIRPathParser::LiteralContext* const &x) {
|
|
953
|
+
if (!x) return Qnil;
|
|
954
|
+
return Data_Object<FHIRPathParser::LiteralContext>(x, false, rb_cLiteralContext);
|
|
955
|
+
}
|
|
956
|
+
};
|
|
957
|
+
|
|
958
|
+
template <>
|
|
959
|
+
class To_Ruby<LiteralContextProxy*> {
|
|
960
|
+
public:
|
|
961
|
+
VALUE convert(LiteralContextProxy* const &x) {
|
|
962
|
+
if (!x) return Qnil;
|
|
963
|
+
return Data_Object<LiteralContextProxy>(x, false, rb_cLiteralContext);
|
|
964
|
+
}
|
|
965
|
+
};
|
|
966
|
+
}
|
|
967
|
+
|
|
968
|
+
namespace Rice::detail {
|
|
969
|
+
template <>
|
|
970
|
+
class To_Ruby<FHIRPathParser::LiteralTermContext*> {
|
|
971
|
+
public:
|
|
972
|
+
VALUE convert(FHIRPathParser::LiteralTermContext* const &x) {
|
|
973
|
+
if (!x) return Qnil;
|
|
974
|
+
return Data_Object<FHIRPathParser::LiteralTermContext>(x, false, rb_cLiteralTermContext);
|
|
975
|
+
}
|
|
976
|
+
};
|
|
977
|
+
|
|
978
|
+
template <>
|
|
979
|
+
class To_Ruby<LiteralTermContextProxy*> {
|
|
980
|
+
public:
|
|
981
|
+
VALUE convert(LiteralTermContextProxy* const &x) {
|
|
982
|
+
if (!x) return Qnil;
|
|
983
|
+
return Data_Object<LiteralTermContextProxy>(x, false, rb_cLiteralTermContext);
|
|
984
|
+
}
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
namespace Rice::detail {
|
|
989
|
+
template <>
|
|
990
|
+
class To_Ruby<FHIRPathParser::ParenthesizedTermContext*> {
|
|
991
|
+
public:
|
|
992
|
+
VALUE convert(FHIRPathParser::ParenthesizedTermContext* const &x) {
|
|
993
|
+
if (!x) return Qnil;
|
|
994
|
+
return Data_Object<FHIRPathParser::ParenthesizedTermContext>(x, false, rb_cParenthesizedTermContext);
|
|
995
|
+
}
|
|
996
|
+
};
|
|
997
|
+
|
|
998
|
+
template <>
|
|
999
|
+
class To_Ruby<ParenthesizedTermContextProxy*> {
|
|
1000
|
+
public:
|
|
1001
|
+
VALUE convert(ParenthesizedTermContextProxy* const &x) {
|
|
1002
|
+
if (!x) return Qnil;
|
|
1003
|
+
return Data_Object<ParenthesizedTermContextProxy>(x, false, rb_cParenthesizedTermContext);
|
|
1004
|
+
}
|
|
1005
|
+
};
|
|
1006
|
+
}
|
|
1007
|
+
|
|
1008
|
+
namespace Rice::detail {
|
|
1009
|
+
template <>
|
|
1010
|
+
class To_Ruby<FHIRPathParser::InvocationTermContext*> {
|
|
1011
|
+
public:
|
|
1012
|
+
VALUE convert(FHIRPathParser::InvocationTermContext* const &x) {
|
|
1013
|
+
if (!x) return Qnil;
|
|
1014
|
+
return Data_Object<FHIRPathParser::InvocationTermContext>(x, false, rb_cInvocationTermContext);
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
|
|
1018
|
+
template <>
|
|
1019
|
+
class To_Ruby<InvocationTermContextProxy*> {
|
|
1020
|
+
public:
|
|
1021
|
+
VALUE convert(InvocationTermContextProxy* const &x) {
|
|
1022
|
+
if (!x) return Qnil;
|
|
1023
|
+
return Data_Object<InvocationTermContextProxy>(x, false, rb_cInvocationTermContext);
|
|
1024
|
+
}
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
namespace Rice::detail {
|
|
1029
|
+
template <>
|
|
1030
|
+
class To_Ruby<FHIRPathParser::TimeLiteralContext*> {
|
|
1031
|
+
public:
|
|
1032
|
+
VALUE convert(FHIRPathParser::TimeLiteralContext* const &x) {
|
|
1033
|
+
if (!x) return Qnil;
|
|
1034
|
+
return Data_Object<FHIRPathParser::TimeLiteralContext>(x, false, rb_cTimeLiteralContext);
|
|
1035
|
+
}
|
|
1036
|
+
};
|
|
1037
|
+
|
|
1038
|
+
template <>
|
|
1039
|
+
class To_Ruby<TimeLiteralContextProxy*> {
|
|
1040
|
+
public:
|
|
1041
|
+
VALUE convert(TimeLiteralContextProxy* const &x) {
|
|
1042
|
+
if (!x) return Qnil;
|
|
1043
|
+
return Data_Object<TimeLiteralContextProxy>(x, false, rb_cTimeLiteralContext);
|
|
1044
|
+
}
|
|
1045
|
+
};
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
namespace Rice::detail {
|
|
1049
|
+
template <>
|
|
1050
|
+
class To_Ruby<FHIRPathParser::NullLiteralContext*> {
|
|
1051
|
+
public:
|
|
1052
|
+
VALUE convert(FHIRPathParser::NullLiteralContext* const &x) {
|
|
1053
|
+
if (!x) return Qnil;
|
|
1054
|
+
return Data_Object<FHIRPathParser::NullLiteralContext>(x, false, rb_cNullLiteralContext);
|
|
1055
|
+
}
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
template <>
|
|
1059
|
+
class To_Ruby<NullLiteralContextProxy*> {
|
|
1060
|
+
public:
|
|
1061
|
+
VALUE convert(NullLiteralContextProxy* const &x) {
|
|
1062
|
+
if (!x) return Qnil;
|
|
1063
|
+
return Data_Object<NullLiteralContextProxy>(x, false, rb_cNullLiteralContext);
|
|
1064
|
+
}
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
|
|
1068
|
+
namespace Rice::detail {
|
|
1069
|
+
template <>
|
|
1070
|
+
class To_Ruby<FHIRPathParser::DateTimeLiteralContext*> {
|
|
1071
|
+
public:
|
|
1072
|
+
VALUE convert(FHIRPathParser::DateTimeLiteralContext* const &x) {
|
|
1073
|
+
if (!x) return Qnil;
|
|
1074
|
+
return Data_Object<FHIRPathParser::DateTimeLiteralContext>(x, false, rb_cDateTimeLiteralContext);
|
|
1075
|
+
}
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
template <>
|
|
1079
|
+
class To_Ruby<DateTimeLiteralContextProxy*> {
|
|
1080
|
+
public:
|
|
1081
|
+
VALUE convert(DateTimeLiteralContextProxy* const &x) {
|
|
1082
|
+
if (!x) return Qnil;
|
|
1083
|
+
return Data_Object<DateTimeLiteralContextProxy>(x, false, rb_cDateTimeLiteralContext);
|
|
1084
|
+
}
|
|
1085
|
+
};
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
namespace Rice::detail {
|
|
1089
|
+
template <>
|
|
1090
|
+
class To_Ruby<FHIRPathParser::StringLiteralContext*> {
|
|
1091
|
+
public:
|
|
1092
|
+
VALUE convert(FHIRPathParser::StringLiteralContext* const &x) {
|
|
1093
|
+
if (!x) return Qnil;
|
|
1094
|
+
return Data_Object<FHIRPathParser::StringLiteralContext>(x, false, rb_cStringLiteralContext);
|
|
1095
|
+
}
|
|
1096
|
+
};
|
|
1097
|
+
|
|
1098
|
+
template <>
|
|
1099
|
+
class To_Ruby<StringLiteralContextProxy*> {
|
|
1100
|
+
public:
|
|
1101
|
+
VALUE convert(StringLiteralContextProxy* const &x) {
|
|
1102
|
+
if (!x) return Qnil;
|
|
1103
|
+
return Data_Object<StringLiteralContextProxy>(x, false, rb_cStringLiteralContext);
|
|
1104
|
+
}
|
|
1105
|
+
};
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
namespace Rice::detail {
|
|
1109
|
+
template <>
|
|
1110
|
+
class To_Ruby<FHIRPathParser::BooleanLiteralContext*> {
|
|
1111
|
+
public:
|
|
1112
|
+
VALUE convert(FHIRPathParser::BooleanLiteralContext* const &x) {
|
|
1113
|
+
if (!x) return Qnil;
|
|
1114
|
+
return Data_Object<FHIRPathParser::BooleanLiteralContext>(x, false, rb_cBooleanLiteralContext);
|
|
1115
|
+
}
|
|
1116
|
+
};
|
|
1117
|
+
|
|
1118
|
+
template <>
|
|
1119
|
+
class To_Ruby<BooleanLiteralContextProxy*> {
|
|
1120
|
+
public:
|
|
1121
|
+
VALUE convert(BooleanLiteralContextProxy* const &x) {
|
|
1122
|
+
if (!x) return Qnil;
|
|
1123
|
+
return Data_Object<BooleanLiteralContextProxy>(x, false, rb_cBooleanLiteralContext);
|
|
1124
|
+
}
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
|
|
1128
|
+
namespace Rice::detail {
|
|
1129
|
+
template <>
|
|
1130
|
+
class To_Ruby<FHIRPathParser::NumberLiteralContext*> {
|
|
1131
|
+
public:
|
|
1132
|
+
VALUE convert(FHIRPathParser::NumberLiteralContext* const &x) {
|
|
1133
|
+
if (!x) return Qnil;
|
|
1134
|
+
return Data_Object<FHIRPathParser::NumberLiteralContext>(x, false, rb_cNumberLiteralContext);
|
|
1135
|
+
}
|
|
1136
|
+
};
|
|
1137
|
+
|
|
1138
|
+
template <>
|
|
1139
|
+
class To_Ruby<NumberLiteralContextProxy*> {
|
|
1140
|
+
public:
|
|
1141
|
+
VALUE convert(NumberLiteralContextProxy* const &x) {
|
|
1142
|
+
if (!x) return Qnil;
|
|
1143
|
+
return Data_Object<NumberLiteralContextProxy>(x, false, rb_cNumberLiteralContext);
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
namespace Rice::detail {
|
|
1149
|
+
template <>
|
|
1150
|
+
class To_Ruby<FHIRPathParser::QuantityContext*> {
|
|
1151
|
+
public:
|
|
1152
|
+
VALUE convert(FHIRPathParser::QuantityContext* const &x) {
|
|
1153
|
+
if (!x) return Qnil;
|
|
1154
|
+
return Data_Object<FHIRPathParser::QuantityContext>(x, false, rb_cQuantityContext);
|
|
1155
|
+
}
|
|
1156
|
+
};
|
|
1157
|
+
|
|
1158
|
+
template <>
|
|
1159
|
+
class To_Ruby<QuantityContextProxy*> {
|
|
1160
|
+
public:
|
|
1161
|
+
VALUE convert(QuantityContextProxy* const &x) {
|
|
1162
|
+
if (!x) return Qnil;
|
|
1163
|
+
return Data_Object<QuantityContextProxy>(x, false, rb_cQuantityContext);
|
|
1164
|
+
}
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
|
|
1168
|
+
namespace Rice::detail {
|
|
1169
|
+
template <>
|
|
1170
|
+
class To_Ruby<FHIRPathParser::QuantityLiteralContext*> {
|
|
1171
|
+
public:
|
|
1172
|
+
VALUE convert(FHIRPathParser::QuantityLiteralContext* const &x) {
|
|
1173
|
+
if (!x) return Qnil;
|
|
1174
|
+
return Data_Object<FHIRPathParser::QuantityLiteralContext>(x, false, rb_cQuantityLiteralContext);
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
|
|
1178
|
+
template <>
|
|
1179
|
+
class To_Ruby<QuantityLiteralContextProxy*> {
|
|
1180
|
+
public:
|
|
1181
|
+
VALUE convert(QuantityLiteralContextProxy* const &x) {
|
|
1182
|
+
if (!x) return Qnil;
|
|
1183
|
+
return Data_Object<QuantityLiteralContextProxy>(x, false, rb_cQuantityLiteralContext);
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1186
|
+
}
|
|
1187
|
+
|
|
1188
|
+
namespace Rice::detail {
|
|
1189
|
+
template <>
|
|
1190
|
+
class To_Ruby<FHIRPathParser::IdentifierContext*> {
|
|
1191
|
+
public:
|
|
1192
|
+
VALUE convert(FHIRPathParser::IdentifierContext* const &x) {
|
|
1193
|
+
if (!x) return Qnil;
|
|
1194
|
+
return Data_Object<FHIRPathParser::IdentifierContext>(x, false, rb_cIdentifierContext);
|
|
1195
|
+
}
|
|
1196
|
+
};
|
|
1197
|
+
|
|
1198
|
+
template <>
|
|
1199
|
+
class To_Ruby<IdentifierContextProxy*> {
|
|
1200
|
+
public:
|
|
1201
|
+
VALUE convert(IdentifierContextProxy* const &x) {
|
|
1202
|
+
if (!x) return Qnil;
|
|
1203
|
+
return Data_Object<IdentifierContextProxy>(x, false, rb_cIdentifierContext);
|
|
1204
|
+
}
|
|
1205
|
+
};
|
|
1206
|
+
}
|
|
1207
|
+
|
|
1208
|
+
namespace Rice::detail {
|
|
1209
|
+
template <>
|
|
1210
|
+
class To_Ruby<FHIRPathParser::TotalInvocationContext*> {
|
|
1211
|
+
public:
|
|
1212
|
+
VALUE convert(FHIRPathParser::TotalInvocationContext* const &x) {
|
|
1213
|
+
if (!x) return Qnil;
|
|
1214
|
+
return Data_Object<FHIRPathParser::TotalInvocationContext>(x, false, rb_cTotalInvocationContext);
|
|
1215
|
+
}
|
|
1216
|
+
};
|
|
1217
|
+
|
|
1218
|
+
template <>
|
|
1219
|
+
class To_Ruby<TotalInvocationContextProxy*> {
|
|
1220
|
+
public:
|
|
1221
|
+
VALUE convert(TotalInvocationContextProxy* const &x) {
|
|
1222
|
+
if (!x) return Qnil;
|
|
1223
|
+
return Data_Object<TotalInvocationContextProxy>(x, false, rb_cTotalInvocationContext);
|
|
1224
|
+
}
|
|
1225
|
+
};
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
namespace Rice::detail {
|
|
1229
|
+
template <>
|
|
1230
|
+
class To_Ruby<FHIRPathParser::ThisInvocationContext*> {
|
|
1231
|
+
public:
|
|
1232
|
+
VALUE convert(FHIRPathParser::ThisInvocationContext* const &x) {
|
|
1233
|
+
if (!x) return Qnil;
|
|
1234
|
+
return Data_Object<FHIRPathParser::ThisInvocationContext>(x, false, rb_cThisInvocationContext);
|
|
1235
|
+
}
|
|
1236
|
+
};
|
|
1237
|
+
|
|
1238
|
+
template <>
|
|
1239
|
+
class To_Ruby<ThisInvocationContextProxy*> {
|
|
1240
|
+
public:
|
|
1241
|
+
VALUE convert(ThisInvocationContextProxy* const &x) {
|
|
1242
|
+
if (!x) return Qnil;
|
|
1243
|
+
return Data_Object<ThisInvocationContextProxy>(x, false, rb_cThisInvocationContext);
|
|
1244
|
+
}
|
|
1245
|
+
};
|
|
1246
|
+
}
|
|
1247
|
+
|
|
1248
|
+
namespace Rice::detail {
|
|
1249
|
+
template <>
|
|
1250
|
+
class To_Ruby<FHIRPathParser::IndexInvocationContext*> {
|
|
1251
|
+
public:
|
|
1252
|
+
VALUE convert(FHIRPathParser::IndexInvocationContext* const &x) {
|
|
1253
|
+
if (!x) return Qnil;
|
|
1254
|
+
return Data_Object<FHIRPathParser::IndexInvocationContext>(x, false, rb_cIndexInvocationContext);
|
|
1255
|
+
}
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
template <>
|
|
1259
|
+
class To_Ruby<IndexInvocationContextProxy*> {
|
|
1260
|
+
public:
|
|
1261
|
+
VALUE convert(IndexInvocationContextProxy* const &x) {
|
|
1262
|
+
if (!x) return Qnil;
|
|
1263
|
+
return Data_Object<IndexInvocationContextProxy>(x, false, rb_cIndexInvocationContext);
|
|
1264
|
+
}
|
|
1265
|
+
};
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
namespace Rice::detail {
|
|
1269
|
+
template <>
|
|
1270
|
+
class To_Ruby<FHIRPathParser::FunctnContext*> {
|
|
1271
|
+
public:
|
|
1272
|
+
VALUE convert(FHIRPathParser::FunctnContext* const &x) {
|
|
1273
|
+
if (!x) return Qnil;
|
|
1274
|
+
return Data_Object<FHIRPathParser::FunctnContext>(x, false, rb_cFunctnContext);
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
template <>
|
|
1279
|
+
class To_Ruby<FunctnContextProxy*> {
|
|
1280
|
+
public:
|
|
1281
|
+
VALUE convert(FunctnContextProxy* const &x) {
|
|
1282
|
+
if (!x) return Qnil;
|
|
1283
|
+
return Data_Object<FunctnContextProxy>(x, false, rb_cFunctnContext);
|
|
1284
|
+
}
|
|
1285
|
+
};
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
namespace Rice::detail {
|
|
1289
|
+
template <>
|
|
1290
|
+
class To_Ruby<FHIRPathParser::FunctionInvocationContext*> {
|
|
1291
|
+
public:
|
|
1292
|
+
VALUE convert(FHIRPathParser::FunctionInvocationContext* const &x) {
|
|
1293
|
+
if (!x) return Qnil;
|
|
1294
|
+
return Data_Object<FHIRPathParser::FunctionInvocationContext>(x, false, rb_cFunctionInvocationContext);
|
|
1295
|
+
}
|
|
1296
|
+
};
|
|
1297
|
+
|
|
1298
|
+
template <>
|
|
1299
|
+
class To_Ruby<FunctionInvocationContextProxy*> {
|
|
1300
|
+
public:
|
|
1301
|
+
VALUE convert(FunctionInvocationContextProxy* const &x) {
|
|
1302
|
+
if (!x) return Qnil;
|
|
1303
|
+
return Data_Object<FunctionInvocationContextProxy>(x, false, rb_cFunctionInvocationContext);
|
|
1304
|
+
}
|
|
1305
|
+
};
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
namespace Rice::detail {
|
|
1309
|
+
template <>
|
|
1310
|
+
class To_Ruby<FHIRPathParser::MemberInvocationContext*> {
|
|
1311
|
+
public:
|
|
1312
|
+
VALUE convert(FHIRPathParser::MemberInvocationContext* const &x) {
|
|
1313
|
+
if (!x) return Qnil;
|
|
1314
|
+
return Data_Object<FHIRPathParser::MemberInvocationContext>(x, false, rb_cMemberInvocationContext);
|
|
1315
|
+
}
|
|
1316
|
+
};
|
|
1317
|
+
|
|
1318
|
+
template <>
|
|
1319
|
+
class To_Ruby<MemberInvocationContextProxy*> {
|
|
1320
|
+
public:
|
|
1321
|
+
VALUE convert(MemberInvocationContextProxy* const &x) {
|
|
1322
|
+
if (!x) return Qnil;
|
|
1323
|
+
return Data_Object<MemberInvocationContextProxy>(x, false, rb_cMemberInvocationContext);
|
|
1324
|
+
}
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
|
|
1328
|
+
namespace Rice::detail {
|
|
1329
|
+
template <>
|
|
1330
|
+
class To_Ruby<FHIRPathParser::ParamListContext*> {
|
|
1331
|
+
public:
|
|
1332
|
+
VALUE convert(FHIRPathParser::ParamListContext* const &x) {
|
|
1333
|
+
if (!x) return Qnil;
|
|
1334
|
+
return Data_Object<FHIRPathParser::ParamListContext>(x, false, rb_cParamListContext);
|
|
1335
|
+
}
|
|
1336
|
+
};
|
|
1337
|
+
|
|
1338
|
+
template <>
|
|
1339
|
+
class To_Ruby<ParamListContextProxy*> {
|
|
1340
|
+
public:
|
|
1341
|
+
VALUE convert(ParamListContextProxy* const &x) {
|
|
1342
|
+
if (!x) return Qnil;
|
|
1343
|
+
return Data_Object<ParamListContextProxy>(x, false, rb_cParamListContext);
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
1347
|
+
|
|
1348
|
+
namespace Rice::detail {
|
|
1349
|
+
template <>
|
|
1350
|
+
class To_Ruby<FHIRPathParser::UnitContext*> {
|
|
1351
|
+
public:
|
|
1352
|
+
VALUE convert(FHIRPathParser::UnitContext* const &x) {
|
|
1353
|
+
if (!x) return Qnil;
|
|
1354
|
+
return Data_Object<FHIRPathParser::UnitContext>(x, false, rb_cUnitContext);
|
|
1355
|
+
}
|
|
1356
|
+
};
|
|
1357
|
+
|
|
1358
|
+
template <>
|
|
1359
|
+
class To_Ruby<UnitContextProxy*> {
|
|
1360
|
+
public:
|
|
1361
|
+
VALUE convert(UnitContextProxy* const &x) {
|
|
1362
|
+
if (!x) return Qnil;
|
|
1363
|
+
return Data_Object<UnitContextProxy>(x, false, rb_cUnitContext);
|
|
1364
|
+
}
|
|
1365
|
+
};
|
|
1366
|
+
}
|
|
1367
|
+
|
|
1368
|
+
namespace Rice::detail {
|
|
1369
|
+
template <>
|
|
1370
|
+
class To_Ruby<FHIRPathParser::DateTimePrecisionContext*> {
|
|
1371
|
+
public:
|
|
1372
|
+
VALUE convert(FHIRPathParser::DateTimePrecisionContext* const &x) {
|
|
1373
|
+
if (!x) return Qnil;
|
|
1374
|
+
return Data_Object<FHIRPathParser::DateTimePrecisionContext>(x, false, rb_cDateTimePrecisionContext);
|
|
1375
|
+
}
|
|
1376
|
+
};
|
|
1377
|
+
|
|
1378
|
+
template <>
|
|
1379
|
+
class To_Ruby<DateTimePrecisionContextProxy*> {
|
|
1380
|
+
public:
|
|
1381
|
+
VALUE convert(DateTimePrecisionContextProxy* const &x) {
|
|
1382
|
+
if (!x) return Qnil;
|
|
1383
|
+
return Data_Object<DateTimePrecisionContextProxy>(x, false, rb_cDateTimePrecisionContext);
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
}
|
|
1387
|
+
|
|
1388
|
+
namespace Rice::detail {
|
|
1389
|
+
template <>
|
|
1390
|
+
class To_Ruby<FHIRPathParser::PluralDateTimePrecisionContext*> {
|
|
1391
|
+
public:
|
|
1392
|
+
VALUE convert(FHIRPathParser::PluralDateTimePrecisionContext* const &x) {
|
|
1393
|
+
if (!x) return Qnil;
|
|
1394
|
+
return Data_Object<FHIRPathParser::PluralDateTimePrecisionContext>(x, false, rb_cPluralDateTimePrecisionContext);
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
|
|
1398
|
+
template <>
|
|
1399
|
+
class To_Ruby<PluralDateTimePrecisionContextProxy*> {
|
|
1400
|
+
public:
|
|
1401
|
+
VALUE convert(PluralDateTimePrecisionContextProxy* const &x) {
|
|
1402
|
+
if (!x) return Qnil;
|
|
1403
|
+
return Data_Object<PluralDateTimePrecisionContextProxy>(x, false, rb_cPluralDateTimePrecisionContext);
|
|
1404
|
+
}
|
|
1405
|
+
};
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
namespace Rice::detail {
|
|
1409
|
+
template <>
|
|
1410
|
+
class To_Ruby<FHIRPathParser::QualifiedIdentifierContext*> {
|
|
1411
|
+
public:
|
|
1412
|
+
VALUE convert(FHIRPathParser::QualifiedIdentifierContext* const &x) {
|
|
1413
|
+
if (!x) return Qnil;
|
|
1414
|
+
return Data_Object<FHIRPathParser::QualifiedIdentifierContext>(x, false, rb_cQualifiedIdentifierContext);
|
|
1415
|
+
}
|
|
1416
|
+
};
|
|
1417
|
+
|
|
1418
|
+
template <>
|
|
1419
|
+
class To_Ruby<QualifiedIdentifierContextProxy*> {
|
|
1420
|
+
public:
|
|
1421
|
+
VALUE convert(QualifiedIdentifierContextProxy* const &x) {
|
|
1422
|
+
if (!x) return Qnil;
|
|
1423
|
+
return Data_Object<QualifiedIdentifierContextProxy>(x, false, rb_cQualifiedIdentifierContext);
|
|
1424
|
+
}
|
|
1425
|
+
};
|
|
1426
|
+
}
|
|
1427
|
+
|
|
1428
|
+
|
|
1429
|
+
Object EntireExpressionContextProxy::expression() {
|
|
1430
|
+
if (orig == nullptr) {
|
|
1431
|
+
return Qnil;
|
|
1432
|
+
}
|
|
1433
|
+
|
|
1434
|
+
auto ctx = ((FHIRPathParser::EntireExpressionContext*)orig) -> expression();
|
|
1435
|
+
|
|
1436
|
+
if (ctx == nullptr) {
|
|
1437
|
+
return Qnil;
|
|
1438
|
+
}
|
|
1439
|
+
|
|
1440
|
+
for (auto child : getChildren()) {
|
|
1441
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1442
|
+
return Rice::Object(child);
|
|
1443
|
+
}
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
return Qnil;
|
|
1447
|
+
}
|
|
1448
|
+
|
|
1449
|
+
Object EntireExpressionContextProxy::EOF() {
|
|
1450
|
+
if (orig == nullptr) {
|
|
1451
|
+
return Qnil;
|
|
1452
|
+
}
|
|
1453
|
+
|
|
1454
|
+
auto token = ((FHIRPathParser::EntireExpressionContext*)orig) -> EOF();
|
|
1455
|
+
|
|
1456
|
+
if (token == nullptr) {
|
|
1457
|
+
return Qnil;
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
TerminalNodeProxy proxy(token);
|
|
1461
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
1462
|
+
}
|
|
1463
|
+
|
|
1464
|
+
Object IndexerExpressionContextProxy::expression() {
|
|
1465
|
+
Array a;
|
|
1466
|
+
|
|
1467
|
+
if (orig != nullptr) {
|
|
1468
|
+
size_t count = ((FHIRPathParser::IndexerExpressionContext*)orig) -> expression().size();
|
|
1469
|
+
|
|
1470
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1471
|
+
a.push(expressionAt(i));
|
|
1472
|
+
}
|
|
1473
|
+
}
|
|
1474
|
+
|
|
1475
|
+
return std::move(a);
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
Object IndexerExpressionContextProxy::expressionAt(size_t i) {
|
|
1479
|
+
if (orig == nullptr) {
|
|
1480
|
+
return Qnil;
|
|
1481
|
+
}
|
|
1482
|
+
|
|
1483
|
+
auto ctx = ((FHIRPathParser::IndexerExpressionContext*)orig) -> expression(i);
|
|
1484
|
+
|
|
1485
|
+
if (ctx == nullptr) {
|
|
1486
|
+
return Qnil;
|
|
1487
|
+
}
|
|
1488
|
+
|
|
1489
|
+
for (auto child : getChildren()) {
|
|
1490
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1491
|
+
return Rice::Object(child);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1495
|
+
return Qnil;
|
|
1496
|
+
}
|
|
1497
|
+
|
|
1498
|
+
Object PolarityExpressionContextProxy::expression() {
|
|
1499
|
+
if (orig == nullptr) {
|
|
1500
|
+
return Qnil;
|
|
1501
|
+
}
|
|
1502
|
+
|
|
1503
|
+
auto ctx = ((FHIRPathParser::PolarityExpressionContext*)orig) -> expression();
|
|
1504
|
+
|
|
1505
|
+
if (ctx == nullptr) {
|
|
1506
|
+
return Qnil;
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
for (auto child : getChildren()) {
|
|
1510
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1511
|
+
return Rice::Object(child);
|
|
1512
|
+
}
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
return Qnil;
|
|
1516
|
+
}
|
|
1517
|
+
|
|
1518
|
+
Object AdditiveExpressionContextProxy::expression() {
|
|
1519
|
+
Array a;
|
|
1520
|
+
|
|
1521
|
+
if (orig != nullptr) {
|
|
1522
|
+
size_t count = ((FHIRPathParser::AdditiveExpressionContext*)orig) -> expression().size();
|
|
1523
|
+
|
|
1524
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1525
|
+
a.push(expressionAt(i));
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
return std::move(a);
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
Object AdditiveExpressionContextProxy::expressionAt(size_t i) {
|
|
1533
|
+
if (orig == nullptr) {
|
|
1534
|
+
return Qnil;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
auto ctx = ((FHIRPathParser::AdditiveExpressionContext*)orig) -> expression(i);
|
|
1538
|
+
|
|
1539
|
+
if (ctx == nullptr) {
|
|
1540
|
+
return Qnil;
|
|
1541
|
+
}
|
|
1542
|
+
|
|
1543
|
+
for (auto child : getChildren()) {
|
|
1544
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1545
|
+
return Rice::Object(child);
|
|
1546
|
+
}
|
|
1547
|
+
}
|
|
1548
|
+
|
|
1549
|
+
return Qnil;
|
|
1550
|
+
}
|
|
1551
|
+
|
|
1552
|
+
Object MultiplicativeExpressionContextProxy::expression() {
|
|
1553
|
+
Array a;
|
|
1554
|
+
|
|
1555
|
+
if (orig != nullptr) {
|
|
1556
|
+
size_t count = ((FHIRPathParser::MultiplicativeExpressionContext*)orig) -> expression().size();
|
|
1557
|
+
|
|
1558
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1559
|
+
a.push(expressionAt(i));
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1563
|
+
return std::move(a);
|
|
1564
|
+
}
|
|
1565
|
+
|
|
1566
|
+
Object MultiplicativeExpressionContextProxy::expressionAt(size_t i) {
|
|
1567
|
+
if (orig == nullptr) {
|
|
1568
|
+
return Qnil;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
auto ctx = ((FHIRPathParser::MultiplicativeExpressionContext*)orig) -> expression(i);
|
|
1572
|
+
|
|
1573
|
+
if (ctx == nullptr) {
|
|
1574
|
+
return Qnil;
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
for (auto child : getChildren()) {
|
|
1578
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1579
|
+
return Rice::Object(child);
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
return Qnil;
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
Object UnionExpressionContextProxy::expression() {
|
|
1587
|
+
Array a;
|
|
1588
|
+
|
|
1589
|
+
if (orig != nullptr) {
|
|
1590
|
+
size_t count = ((FHIRPathParser::UnionExpressionContext*)orig) -> expression().size();
|
|
1591
|
+
|
|
1592
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1593
|
+
a.push(expressionAt(i));
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
|
|
1597
|
+
return std::move(a);
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
Object UnionExpressionContextProxy::expressionAt(size_t i) {
|
|
1601
|
+
if (orig == nullptr) {
|
|
1602
|
+
return Qnil;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
auto ctx = ((FHIRPathParser::UnionExpressionContext*)orig) -> expression(i);
|
|
1606
|
+
|
|
1607
|
+
if (ctx == nullptr) {
|
|
1608
|
+
return Qnil;
|
|
1609
|
+
}
|
|
1610
|
+
|
|
1611
|
+
for (auto child : getChildren()) {
|
|
1612
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1613
|
+
return Rice::Object(child);
|
|
1614
|
+
}
|
|
1615
|
+
}
|
|
1616
|
+
|
|
1617
|
+
return Qnil;
|
|
1618
|
+
}
|
|
1619
|
+
|
|
1620
|
+
Object OrExpressionContextProxy::expression() {
|
|
1621
|
+
Array a;
|
|
1622
|
+
|
|
1623
|
+
if (orig != nullptr) {
|
|
1624
|
+
size_t count = ((FHIRPathParser::OrExpressionContext*)orig) -> expression().size();
|
|
1625
|
+
|
|
1626
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1627
|
+
a.push(expressionAt(i));
|
|
1628
|
+
}
|
|
1629
|
+
}
|
|
1630
|
+
|
|
1631
|
+
return std::move(a);
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
Object OrExpressionContextProxy::expressionAt(size_t i) {
|
|
1635
|
+
if (orig == nullptr) {
|
|
1636
|
+
return Qnil;
|
|
1637
|
+
}
|
|
1638
|
+
|
|
1639
|
+
auto ctx = ((FHIRPathParser::OrExpressionContext*)orig) -> expression(i);
|
|
1640
|
+
|
|
1641
|
+
if (ctx == nullptr) {
|
|
1642
|
+
return Qnil;
|
|
1643
|
+
}
|
|
1644
|
+
|
|
1645
|
+
for (auto child : getChildren()) {
|
|
1646
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1647
|
+
return Rice::Object(child);
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
|
|
1651
|
+
return Qnil;
|
|
1652
|
+
}
|
|
1653
|
+
|
|
1654
|
+
Object AndExpressionContextProxy::expression() {
|
|
1655
|
+
Array a;
|
|
1656
|
+
|
|
1657
|
+
if (orig != nullptr) {
|
|
1658
|
+
size_t count = ((FHIRPathParser::AndExpressionContext*)orig) -> expression().size();
|
|
1659
|
+
|
|
1660
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1661
|
+
a.push(expressionAt(i));
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
return std::move(a);
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
Object AndExpressionContextProxy::expressionAt(size_t i) {
|
|
1669
|
+
if (orig == nullptr) {
|
|
1670
|
+
return Qnil;
|
|
1671
|
+
}
|
|
1672
|
+
|
|
1673
|
+
auto ctx = ((FHIRPathParser::AndExpressionContext*)orig) -> expression(i);
|
|
1674
|
+
|
|
1675
|
+
if (ctx == nullptr) {
|
|
1676
|
+
return Qnil;
|
|
1677
|
+
}
|
|
1678
|
+
|
|
1679
|
+
for (auto child : getChildren()) {
|
|
1680
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1681
|
+
return Rice::Object(child);
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1685
|
+
return Qnil;
|
|
1686
|
+
}
|
|
1687
|
+
|
|
1688
|
+
Object MembershipExpressionContextProxy::expression() {
|
|
1689
|
+
Array a;
|
|
1690
|
+
|
|
1691
|
+
if (orig != nullptr) {
|
|
1692
|
+
size_t count = ((FHIRPathParser::MembershipExpressionContext*)orig) -> expression().size();
|
|
1693
|
+
|
|
1694
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1695
|
+
a.push(expressionAt(i));
|
|
1696
|
+
}
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
return std::move(a);
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
Object MembershipExpressionContextProxy::expressionAt(size_t i) {
|
|
1703
|
+
if (orig == nullptr) {
|
|
1704
|
+
return Qnil;
|
|
1705
|
+
}
|
|
1706
|
+
|
|
1707
|
+
auto ctx = ((FHIRPathParser::MembershipExpressionContext*)orig) -> expression(i);
|
|
1708
|
+
|
|
1709
|
+
if (ctx == nullptr) {
|
|
1710
|
+
return Qnil;
|
|
1711
|
+
}
|
|
1712
|
+
|
|
1713
|
+
for (auto child : getChildren()) {
|
|
1714
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1715
|
+
return Rice::Object(child);
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
|
|
1719
|
+
return Qnil;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
Object InequalityExpressionContextProxy::expression() {
|
|
1723
|
+
Array a;
|
|
1724
|
+
|
|
1725
|
+
if (orig != nullptr) {
|
|
1726
|
+
size_t count = ((FHIRPathParser::InequalityExpressionContext*)orig) -> expression().size();
|
|
1727
|
+
|
|
1728
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1729
|
+
a.push(expressionAt(i));
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1732
|
+
|
|
1733
|
+
return std::move(a);
|
|
1734
|
+
}
|
|
1735
|
+
|
|
1736
|
+
Object InequalityExpressionContextProxy::expressionAt(size_t i) {
|
|
1737
|
+
if (orig == nullptr) {
|
|
1738
|
+
return Qnil;
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
auto ctx = ((FHIRPathParser::InequalityExpressionContext*)orig) -> expression(i);
|
|
1742
|
+
|
|
1743
|
+
if (ctx == nullptr) {
|
|
1744
|
+
return Qnil;
|
|
1745
|
+
}
|
|
1746
|
+
|
|
1747
|
+
for (auto child : getChildren()) {
|
|
1748
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1749
|
+
return Rice::Object(child);
|
|
1750
|
+
}
|
|
1751
|
+
}
|
|
1752
|
+
|
|
1753
|
+
return Qnil;
|
|
1754
|
+
}
|
|
1755
|
+
|
|
1756
|
+
Object InvocationExpressionContextProxy::expression() {
|
|
1757
|
+
if (orig == nullptr) {
|
|
1758
|
+
return Qnil;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
auto ctx = ((FHIRPathParser::InvocationExpressionContext*)orig) -> expression();
|
|
1762
|
+
|
|
1763
|
+
if (ctx == nullptr) {
|
|
1764
|
+
return Qnil;
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
for (auto child : getChildren()) {
|
|
1768
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1769
|
+
return Rice::Object(child);
|
|
1770
|
+
}
|
|
1771
|
+
}
|
|
1772
|
+
|
|
1773
|
+
return Qnil;
|
|
1774
|
+
}
|
|
1775
|
+
|
|
1776
|
+
Object InvocationExpressionContextProxy::invocation() {
|
|
1777
|
+
if (orig == nullptr) {
|
|
1778
|
+
return Qnil;
|
|
1779
|
+
}
|
|
1780
|
+
|
|
1781
|
+
auto ctx = ((FHIRPathParser::InvocationExpressionContext*)orig) -> invocation();
|
|
1782
|
+
|
|
1783
|
+
if (ctx == nullptr) {
|
|
1784
|
+
return Qnil;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
for (auto child : getChildren()) {
|
|
1788
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1789
|
+
return Rice::Object(child);
|
|
1790
|
+
}
|
|
1791
|
+
}
|
|
1792
|
+
|
|
1793
|
+
return Qnil;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
Object EqualityExpressionContextProxy::expression() {
|
|
1797
|
+
Array a;
|
|
1798
|
+
|
|
1799
|
+
if (orig != nullptr) {
|
|
1800
|
+
size_t count = ((FHIRPathParser::EqualityExpressionContext*)orig) -> expression().size();
|
|
1801
|
+
|
|
1802
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1803
|
+
a.push(expressionAt(i));
|
|
1804
|
+
}
|
|
1805
|
+
}
|
|
1806
|
+
|
|
1807
|
+
return std::move(a);
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
Object EqualityExpressionContextProxy::expressionAt(size_t i) {
|
|
1811
|
+
if (orig == nullptr) {
|
|
1812
|
+
return Qnil;
|
|
1813
|
+
}
|
|
1814
|
+
|
|
1815
|
+
auto ctx = ((FHIRPathParser::EqualityExpressionContext*)orig) -> expression(i);
|
|
1816
|
+
|
|
1817
|
+
if (ctx == nullptr) {
|
|
1818
|
+
return Qnil;
|
|
1819
|
+
}
|
|
1820
|
+
|
|
1821
|
+
for (auto child : getChildren()) {
|
|
1822
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1823
|
+
return Rice::Object(child);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
return Qnil;
|
|
1828
|
+
}
|
|
1829
|
+
|
|
1830
|
+
Object ImpliesExpressionContextProxy::expression() {
|
|
1831
|
+
Array a;
|
|
1832
|
+
|
|
1833
|
+
if (orig != nullptr) {
|
|
1834
|
+
size_t count = ((FHIRPathParser::ImpliesExpressionContext*)orig) -> expression().size();
|
|
1835
|
+
|
|
1836
|
+
for (size_t i = 0; i < count; i ++) {
|
|
1837
|
+
a.push(expressionAt(i));
|
|
1838
|
+
}
|
|
1839
|
+
}
|
|
1840
|
+
|
|
1841
|
+
return std::move(a);
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
Object ImpliesExpressionContextProxy::expressionAt(size_t i) {
|
|
1845
|
+
if (orig == nullptr) {
|
|
1846
|
+
return Qnil;
|
|
1847
|
+
}
|
|
1848
|
+
|
|
1849
|
+
auto ctx = ((FHIRPathParser::ImpliesExpressionContext*)orig) -> expression(i);
|
|
1850
|
+
|
|
1851
|
+
if (ctx == nullptr) {
|
|
1852
|
+
return Qnil;
|
|
1853
|
+
}
|
|
1854
|
+
|
|
1855
|
+
for (auto child : getChildren()) {
|
|
1856
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1857
|
+
return Rice::Object(child);
|
|
1858
|
+
}
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
return Qnil;
|
|
1862
|
+
}
|
|
1863
|
+
|
|
1864
|
+
Object TermExpressionContextProxy::term() {
|
|
1865
|
+
if (orig == nullptr) {
|
|
1866
|
+
return Qnil;
|
|
1867
|
+
}
|
|
1868
|
+
|
|
1869
|
+
auto ctx = ((FHIRPathParser::TermExpressionContext*)orig) -> term();
|
|
1870
|
+
|
|
1871
|
+
if (ctx == nullptr) {
|
|
1872
|
+
return Qnil;
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
for (auto child : getChildren()) {
|
|
1876
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1877
|
+
return Rice::Object(child);
|
|
1878
|
+
}
|
|
1879
|
+
}
|
|
1880
|
+
|
|
1881
|
+
return Qnil;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
Object TypeExpressionContextProxy::expression() {
|
|
1885
|
+
if (orig == nullptr) {
|
|
1886
|
+
return Qnil;
|
|
1887
|
+
}
|
|
1888
|
+
|
|
1889
|
+
auto ctx = ((FHIRPathParser::TypeExpressionContext*)orig) -> expression();
|
|
1890
|
+
|
|
1891
|
+
if (ctx == nullptr) {
|
|
1892
|
+
return Qnil;
|
|
1893
|
+
}
|
|
1894
|
+
|
|
1895
|
+
for (auto child : getChildren()) {
|
|
1896
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1897
|
+
return Rice::Object(child);
|
|
1898
|
+
}
|
|
1899
|
+
}
|
|
1900
|
+
|
|
1901
|
+
return Qnil;
|
|
1902
|
+
}
|
|
1903
|
+
|
|
1904
|
+
Object TypeExpressionContextProxy::typeSpecifier() {
|
|
1905
|
+
if (orig == nullptr) {
|
|
1906
|
+
return Qnil;
|
|
1907
|
+
}
|
|
1908
|
+
|
|
1909
|
+
auto ctx = ((FHIRPathParser::TypeExpressionContext*)orig) -> typeSpecifier();
|
|
1910
|
+
|
|
1911
|
+
if (ctx == nullptr) {
|
|
1912
|
+
return Qnil;
|
|
1913
|
+
}
|
|
1914
|
+
|
|
1915
|
+
for (auto child : getChildren()) {
|
|
1916
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1917
|
+
return Rice::Object(child);
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
|
|
1921
|
+
return Qnil;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
Object TypeSpecifierContextProxy::qualifiedIdentifier() {
|
|
1925
|
+
if (orig == nullptr) {
|
|
1926
|
+
return Qnil;
|
|
1927
|
+
}
|
|
1928
|
+
|
|
1929
|
+
auto ctx = ((FHIRPathParser::TypeSpecifierContext*)orig) -> qualifiedIdentifier();
|
|
1930
|
+
|
|
1931
|
+
if (ctx == nullptr) {
|
|
1932
|
+
return Qnil;
|
|
1933
|
+
}
|
|
1934
|
+
|
|
1935
|
+
for (auto child : getChildren()) {
|
|
1936
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1937
|
+
return Rice::Object(child);
|
|
1938
|
+
}
|
|
1939
|
+
}
|
|
1940
|
+
|
|
1941
|
+
return Qnil;
|
|
1942
|
+
}
|
|
1943
|
+
|
|
1944
|
+
Object ExternalConstantContextProxy::identifier() {
|
|
1945
|
+
if (orig == nullptr) {
|
|
1946
|
+
return Qnil;
|
|
1947
|
+
}
|
|
1948
|
+
|
|
1949
|
+
auto ctx = ((FHIRPathParser::ExternalConstantContext*)orig) -> identifier();
|
|
1950
|
+
|
|
1951
|
+
if (ctx == nullptr) {
|
|
1952
|
+
return Qnil;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
for (auto child : getChildren()) {
|
|
1956
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1957
|
+
return Rice::Object(child);
|
|
1958
|
+
}
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1961
|
+
return Qnil;
|
|
1962
|
+
}
|
|
1963
|
+
|
|
1964
|
+
Object ExternalConstantContextProxy::STRING() {
|
|
1965
|
+
if (orig == nullptr) {
|
|
1966
|
+
return Qnil;
|
|
1967
|
+
}
|
|
1968
|
+
|
|
1969
|
+
auto token = ((FHIRPathParser::ExternalConstantContext*)orig) -> STRING();
|
|
1970
|
+
|
|
1971
|
+
if (token == nullptr) {
|
|
1972
|
+
return Qnil;
|
|
1973
|
+
}
|
|
1974
|
+
|
|
1975
|
+
TerminalNodeProxy proxy(token);
|
|
1976
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
1977
|
+
}
|
|
1978
|
+
|
|
1979
|
+
Object ExternalConstantTermContextProxy::externalConstant() {
|
|
1980
|
+
if (orig == nullptr) {
|
|
1981
|
+
return Qnil;
|
|
1982
|
+
}
|
|
1983
|
+
|
|
1984
|
+
auto ctx = ((FHIRPathParser::ExternalConstantTermContext*)orig) -> externalConstant();
|
|
1985
|
+
|
|
1986
|
+
if (ctx == nullptr) {
|
|
1987
|
+
return Qnil;
|
|
1988
|
+
}
|
|
1989
|
+
|
|
1990
|
+
for (auto child : getChildren()) {
|
|
1991
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
1992
|
+
return Rice::Object(child);
|
|
1993
|
+
}
|
|
1994
|
+
}
|
|
1995
|
+
|
|
1996
|
+
return Qnil;
|
|
1997
|
+
}
|
|
1998
|
+
|
|
1999
|
+
Object LiteralTermContextProxy::literal() {
|
|
2000
|
+
if (orig == nullptr) {
|
|
2001
|
+
return Qnil;
|
|
2002
|
+
}
|
|
2003
|
+
|
|
2004
|
+
auto ctx = ((FHIRPathParser::LiteralTermContext*)orig) -> literal();
|
|
2005
|
+
|
|
2006
|
+
if (ctx == nullptr) {
|
|
2007
|
+
return Qnil;
|
|
2008
|
+
}
|
|
2009
|
+
|
|
2010
|
+
for (auto child : getChildren()) {
|
|
2011
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2012
|
+
return Rice::Object(child);
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
|
|
2016
|
+
return Qnil;
|
|
2017
|
+
}
|
|
2018
|
+
|
|
2019
|
+
Object ParenthesizedTermContextProxy::expression() {
|
|
2020
|
+
if (orig == nullptr) {
|
|
2021
|
+
return Qnil;
|
|
2022
|
+
}
|
|
2023
|
+
|
|
2024
|
+
auto ctx = ((FHIRPathParser::ParenthesizedTermContext*)orig) -> expression();
|
|
2025
|
+
|
|
2026
|
+
if (ctx == nullptr) {
|
|
2027
|
+
return Qnil;
|
|
2028
|
+
}
|
|
2029
|
+
|
|
2030
|
+
for (auto child : getChildren()) {
|
|
2031
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2032
|
+
return Rice::Object(child);
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
|
|
2036
|
+
return Qnil;
|
|
2037
|
+
}
|
|
2038
|
+
|
|
2039
|
+
Object InvocationTermContextProxy::invocation() {
|
|
2040
|
+
if (orig == nullptr) {
|
|
2041
|
+
return Qnil;
|
|
2042
|
+
}
|
|
2043
|
+
|
|
2044
|
+
auto ctx = ((FHIRPathParser::InvocationTermContext*)orig) -> invocation();
|
|
2045
|
+
|
|
2046
|
+
if (ctx == nullptr) {
|
|
2047
|
+
return Qnil;
|
|
2048
|
+
}
|
|
2049
|
+
|
|
2050
|
+
for (auto child : getChildren()) {
|
|
2051
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2052
|
+
return Rice::Object(child);
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
|
|
2056
|
+
return Qnil;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
Object TimeLiteralContextProxy::TIME() {
|
|
2060
|
+
if (orig == nullptr) {
|
|
2061
|
+
return Qnil;
|
|
2062
|
+
}
|
|
2063
|
+
|
|
2064
|
+
auto token = ((FHIRPathParser::TimeLiteralContext*)orig) -> TIME();
|
|
2065
|
+
|
|
2066
|
+
if (token == nullptr) {
|
|
2067
|
+
return Qnil;
|
|
2068
|
+
}
|
|
2069
|
+
|
|
2070
|
+
TerminalNodeProxy proxy(token);
|
|
2071
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
Object DateTimeLiteralContextProxy::DATETIME() {
|
|
2075
|
+
if (orig == nullptr) {
|
|
2076
|
+
return Qnil;
|
|
2077
|
+
}
|
|
2078
|
+
|
|
2079
|
+
auto token = ((FHIRPathParser::DateTimeLiteralContext*)orig) -> DATETIME();
|
|
2080
|
+
|
|
2081
|
+
if (token == nullptr) {
|
|
2082
|
+
return Qnil;
|
|
2083
|
+
}
|
|
2084
|
+
|
|
2085
|
+
TerminalNodeProxy proxy(token);
|
|
2086
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2087
|
+
}
|
|
2088
|
+
|
|
2089
|
+
Object StringLiteralContextProxy::STRING() {
|
|
2090
|
+
if (orig == nullptr) {
|
|
2091
|
+
return Qnil;
|
|
2092
|
+
}
|
|
2093
|
+
|
|
2094
|
+
auto token = ((FHIRPathParser::StringLiteralContext*)orig) -> STRING();
|
|
2095
|
+
|
|
2096
|
+
if (token == nullptr) {
|
|
2097
|
+
return Qnil;
|
|
2098
|
+
}
|
|
2099
|
+
|
|
2100
|
+
TerminalNodeProxy proxy(token);
|
|
2101
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2102
|
+
}
|
|
2103
|
+
|
|
2104
|
+
Object NumberLiteralContextProxy::NUMBER() {
|
|
2105
|
+
if (orig == nullptr) {
|
|
2106
|
+
return Qnil;
|
|
2107
|
+
}
|
|
2108
|
+
|
|
2109
|
+
auto token = ((FHIRPathParser::NumberLiteralContext*)orig) -> NUMBER();
|
|
2110
|
+
|
|
2111
|
+
if (token == nullptr) {
|
|
2112
|
+
return Qnil;
|
|
2113
|
+
}
|
|
2114
|
+
|
|
2115
|
+
TerminalNodeProxy proxy(token);
|
|
2116
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2117
|
+
}
|
|
2118
|
+
|
|
2119
|
+
Object QuantityContextProxy::unit() {
|
|
2120
|
+
if (orig == nullptr) {
|
|
2121
|
+
return Qnil;
|
|
2122
|
+
}
|
|
2123
|
+
|
|
2124
|
+
auto ctx = ((FHIRPathParser::QuantityContext*)orig) -> unit();
|
|
2125
|
+
|
|
2126
|
+
if (ctx == nullptr) {
|
|
2127
|
+
return Qnil;
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
for (auto child : getChildren()) {
|
|
2131
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2132
|
+
return Rice::Object(child);
|
|
2133
|
+
}
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
return Qnil;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
Object QuantityContextProxy::NUMBER() {
|
|
2140
|
+
if (orig == nullptr) {
|
|
2141
|
+
return Qnil;
|
|
2142
|
+
}
|
|
2143
|
+
|
|
2144
|
+
auto token = ((FHIRPathParser::QuantityContext*)orig) -> NUMBER();
|
|
2145
|
+
|
|
2146
|
+
if (token == nullptr) {
|
|
2147
|
+
return Qnil;
|
|
2148
|
+
}
|
|
2149
|
+
|
|
2150
|
+
TerminalNodeProxy proxy(token);
|
|
2151
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2152
|
+
}
|
|
2153
|
+
|
|
2154
|
+
Object QuantityLiteralContextProxy::quantity() {
|
|
2155
|
+
if (orig == nullptr) {
|
|
2156
|
+
return Qnil;
|
|
2157
|
+
}
|
|
2158
|
+
|
|
2159
|
+
auto ctx = ((FHIRPathParser::QuantityLiteralContext*)orig) -> quantity();
|
|
2160
|
+
|
|
2161
|
+
if (ctx == nullptr) {
|
|
2162
|
+
return Qnil;
|
|
2163
|
+
}
|
|
2164
|
+
|
|
2165
|
+
for (auto child : getChildren()) {
|
|
2166
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2167
|
+
return Rice::Object(child);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2170
|
+
|
|
2171
|
+
return Qnil;
|
|
2172
|
+
}
|
|
2173
|
+
|
|
2174
|
+
Object IdentifierContextProxy::IDENTIFIER() {
|
|
2175
|
+
if (orig == nullptr) {
|
|
2176
|
+
return Qnil;
|
|
2177
|
+
}
|
|
2178
|
+
|
|
2179
|
+
auto token = ((FHIRPathParser::IdentifierContext*)orig) -> IDENTIFIER();
|
|
2180
|
+
|
|
2181
|
+
if (token == nullptr) {
|
|
2182
|
+
return Qnil;
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
TerminalNodeProxy proxy(token);
|
|
2186
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2189
|
+
Object IdentifierContextProxy::DELIMITEDIDENTIFIER() {
|
|
2190
|
+
if (orig == nullptr) {
|
|
2191
|
+
return Qnil;
|
|
2192
|
+
}
|
|
2193
|
+
|
|
2194
|
+
auto token = ((FHIRPathParser::IdentifierContext*)orig) -> DELIMITEDIDENTIFIER();
|
|
2195
|
+
|
|
2196
|
+
if (token == nullptr) {
|
|
2197
|
+
return Qnil;
|
|
2198
|
+
}
|
|
2199
|
+
|
|
2200
|
+
TerminalNodeProxy proxy(token);
|
|
2201
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
Object FunctnContextProxy::identifier() {
|
|
2205
|
+
if (orig == nullptr) {
|
|
2206
|
+
return Qnil;
|
|
2207
|
+
}
|
|
2208
|
+
|
|
2209
|
+
auto ctx = ((FHIRPathParser::FunctnContext*)orig) -> identifier();
|
|
2210
|
+
|
|
2211
|
+
if (ctx == nullptr) {
|
|
2212
|
+
return Qnil;
|
|
2213
|
+
}
|
|
2214
|
+
|
|
2215
|
+
for (auto child : getChildren()) {
|
|
2216
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2217
|
+
return Rice::Object(child);
|
|
2218
|
+
}
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
return Qnil;
|
|
2222
|
+
}
|
|
2223
|
+
|
|
2224
|
+
Object FunctnContextProxy::paramList() {
|
|
2225
|
+
if (orig == nullptr) {
|
|
2226
|
+
return Qnil;
|
|
2227
|
+
}
|
|
2228
|
+
|
|
2229
|
+
auto ctx = ((FHIRPathParser::FunctnContext*)orig) -> paramList();
|
|
2230
|
+
|
|
2231
|
+
if (ctx == nullptr) {
|
|
2232
|
+
return Qnil;
|
|
2233
|
+
}
|
|
2234
|
+
|
|
2235
|
+
for (auto child : getChildren()) {
|
|
2236
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2237
|
+
return Rice::Object(child);
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
|
|
2241
|
+
return Qnil;
|
|
2242
|
+
}
|
|
2243
|
+
|
|
2244
|
+
Object FunctionInvocationContextProxy::functn() {
|
|
2245
|
+
if (orig == nullptr) {
|
|
2246
|
+
return Qnil;
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
auto ctx = ((FHIRPathParser::FunctionInvocationContext*)orig) -> functn();
|
|
2250
|
+
|
|
2251
|
+
if (ctx == nullptr) {
|
|
2252
|
+
return Qnil;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
for (auto child : getChildren()) {
|
|
2256
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2257
|
+
return Rice::Object(child);
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
return Qnil;
|
|
2262
|
+
}
|
|
2263
|
+
|
|
2264
|
+
Object MemberInvocationContextProxy::identifier() {
|
|
2265
|
+
if (orig == nullptr) {
|
|
2266
|
+
return Qnil;
|
|
2267
|
+
}
|
|
2268
|
+
|
|
2269
|
+
auto ctx = ((FHIRPathParser::MemberInvocationContext*)orig) -> identifier();
|
|
2270
|
+
|
|
2271
|
+
if (ctx == nullptr) {
|
|
2272
|
+
return Qnil;
|
|
2273
|
+
}
|
|
2274
|
+
|
|
2275
|
+
for (auto child : getChildren()) {
|
|
2276
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2277
|
+
return Rice::Object(child);
|
|
2278
|
+
}
|
|
2279
|
+
}
|
|
2280
|
+
|
|
2281
|
+
return Qnil;
|
|
2282
|
+
}
|
|
2283
|
+
|
|
2284
|
+
Object ParamListContextProxy::expression() {
|
|
2285
|
+
Array a;
|
|
2286
|
+
|
|
2287
|
+
if (orig != nullptr) {
|
|
2288
|
+
size_t count = ((FHIRPathParser::ParamListContext*)orig) -> expression().size();
|
|
2289
|
+
|
|
2290
|
+
for (size_t i = 0; i < count; i ++) {
|
|
2291
|
+
a.push(expressionAt(i));
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
return std::move(a);
|
|
2296
|
+
}
|
|
2297
|
+
|
|
2298
|
+
Object ParamListContextProxy::expressionAt(size_t i) {
|
|
2299
|
+
if (orig == nullptr) {
|
|
2300
|
+
return Qnil;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2303
|
+
auto ctx = ((FHIRPathParser::ParamListContext*)orig) -> expression(i);
|
|
2304
|
+
|
|
2305
|
+
if (ctx == nullptr) {
|
|
2306
|
+
return Qnil;
|
|
2307
|
+
}
|
|
2308
|
+
|
|
2309
|
+
for (auto child : getChildren()) {
|
|
2310
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2311
|
+
return Rice::Object(child);
|
|
2312
|
+
}
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2315
|
+
return Qnil;
|
|
2316
|
+
}
|
|
2317
|
+
|
|
2318
|
+
Object UnitContextProxy::dateTimePrecision() {
|
|
2319
|
+
if (orig == nullptr) {
|
|
2320
|
+
return Qnil;
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
auto ctx = ((FHIRPathParser::UnitContext*)orig) -> dateTimePrecision();
|
|
2324
|
+
|
|
2325
|
+
if (ctx == nullptr) {
|
|
2326
|
+
return Qnil;
|
|
2327
|
+
}
|
|
2328
|
+
|
|
2329
|
+
for (auto child : getChildren()) {
|
|
2330
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2331
|
+
return Rice::Object(child);
|
|
2332
|
+
}
|
|
2333
|
+
}
|
|
2334
|
+
|
|
2335
|
+
return Qnil;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2338
|
+
Object UnitContextProxy::pluralDateTimePrecision() {
|
|
2339
|
+
if (orig == nullptr) {
|
|
2340
|
+
return Qnil;
|
|
2341
|
+
}
|
|
2342
|
+
|
|
2343
|
+
auto ctx = ((FHIRPathParser::UnitContext*)orig) -> pluralDateTimePrecision();
|
|
2344
|
+
|
|
2345
|
+
if (ctx == nullptr) {
|
|
2346
|
+
return Qnil;
|
|
2347
|
+
}
|
|
2348
|
+
|
|
2349
|
+
for (auto child : getChildren()) {
|
|
2350
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2351
|
+
return Rice::Object(child);
|
|
2352
|
+
}
|
|
2353
|
+
}
|
|
2354
|
+
|
|
2355
|
+
return Qnil;
|
|
2356
|
+
}
|
|
2357
|
+
|
|
2358
|
+
Object UnitContextProxy::STRING() {
|
|
2359
|
+
if (orig == nullptr) {
|
|
2360
|
+
return Qnil;
|
|
2361
|
+
}
|
|
2362
|
+
|
|
2363
|
+
auto token = ((FHIRPathParser::UnitContext*)orig) -> STRING();
|
|
2364
|
+
|
|
2365
|
+
if (token == nullptr) {
|
|
2366
|
+
return Qnil;
|
|
2367
|
+
}
|
|
2368
|
+
|
|
2369
|
+
TerminalNodeProxy proxy(token);
|
|
2370
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
Object QualifiedIdentifierContextProxy::identifier() {
|
|
2374
|
+
Array a;
|
|
2375
|
+
|
|
2376
|
+
if (orig != nullptr) {
|
|
2377
|
+
size_t count = ((FHIRPathParser::QualifiedIdentifierContext*)orig) -> identifier().size();
|
|
2378
|
+
|
|
2379
|
+
for (size_t i = 0; i < count; i ++) {
|
|
2380
|
+
a.push(identifierAt(i));
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
|
|
2384
|
+
return std::move(a);
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
Object QualifiedIdentifierContextProxy::identifierAt(size_t i) {
|
|
2388
|
+
if (orig == nullptr) {
|
|
2389
|
+
return Qnil;
|
|
2390
|
+
}
|
|
2391
|
+
|
|
2392
|
+
auto ctx = ((FHIRPathParser::QualifiedIdentifierContext*)orig) -> identifier(i);
|
|
2393
|
+
|
|
2394
|
+
if (ctx == nullptr) {
|
|
2395
|
+
return Qnil;
|
|
2396
|
+
}
|
|
2397
|
+
|
|
2398
|
+
for (auto child : getChildren()) {
|
|
2399
|
+
if (ctx == detail::From_Ruby<ContextProxy>().convert(child.value()).getOriginal()) {
|
|
2400
|
+
return Rice::Object(child);
|
|
2401
|
+
}
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
return Qnil;
|
|
2405
|
+
}
|
|
2406
|
+
|
|
2407
|
+
|
|
2408
|
+
class VisitorProxy : public FHIRPathBaseVisitor, public Director {
|
|
2409
|
+
public:
|
|
2410
|
+
VisitorProxy(Object self) : Director(self) { }
|
|
2411
|
+
|
|
2412
|
+
Object ruby_visit(ContextProxy* proxy) {
|
|
2413
|
+
auto result = visit(proxy -> getOriginal());
|
|
2414
|
+
try {
|
|
2415
|
+
return std::any_cast<Object>(result);
|
|
2416
|
+
} catch(std::bad_cast) {
|
|
2417
|
+
return Qnil;
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
|
|
2421
|
+
Object ruby_visitChildren(ContextProxy* proxy) {
|
|
2422
|
+
auto result = visitChildren(proxy -> getOriginal());
|
|
2423
|
+
try {
|
|
2424
|
+
return std::any_cast<Object>(result);
|
|
2425
|
+
} catch(std::bad_cast) {
|
|
2426
|
+
return Qnil;
|
|
2427
|
+
}
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
virtual antlrcpp::Any visitEntireExpression(FHIRPathParser::EntireExpressionContext *ctx) override {
|
|
2431
|
+
EntireExpressionContextProxy proxy(ctx);
|
|
2432
|
+
return getSelf().call("visit_entire_expression", &proxy);
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
virtual antlrcpp::Any visitIndexerExpression(FHIRPathParser::IndexerExpressionContext *ctx) override {
|
|
2436
|
+
IndexerExpressionContextProxy proxy(ctx);
|
|
2437
|
+
return getSelf().call("visit_indexer_expression", &proxy);
|
|
2438
|
+
}
|
|
2439
|
+
|
|
2440
|
+
virtual antlrcpp::Any visitPolarityExpression(FHIRPathParser::PolarityExpressionContext *ctx) override {
|
|
2441
|
+
PolarityExpressionContextProxy proxy(ctx);
|
|
2442
|
+
return getSelf().call("visit_polarity_expression", &proxy);
|
|
2443
|
+
}
|
|
2444
|
+
|
|
2445
|
+
virtual antlrcpp::Any visitAdditiveExpression(FHIRPathParser::AdditiveExpressionContext *ctx) override {
|
|
2446
|
+
AdditiveExpressionContextProxy proxy(ctx);
|
|
2447
|
+
return getSelf().call("visit_additive_expression", &proxy);
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
virtual antlrcpp::Any visitMultiplicativeExpression(FHIRPathParser::MultiplicativeExpressionContext *ctx) override {
|
|
2451
|
+
MultiplicativeExpressionContextProxy proxy(ctx);
|
|
2452
|
+
return getSelf().call("visit_multiplicative_expression", &proxy);
|
|
2453
|
+
}
|
|
2454
|
+
|
|
2455
|
+
virtual antlrcpp::Any visitUnionExpression(FHIRPathParser::UnionExpressionContext *ctx) override {
|
|
2456
|
+
UnionExpressionContextProxy proxy(ctx);
|
|
2457
|
+
return getSelf().call("visit_union_expression", &proxy);
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
virtual antlrcpp::Any visitOrExpression(FHIRPathParser::OrExpressionContext *ctx) override {
|
|
2461
|
+
OrExpressionContextProxy proxy(ctx);
|
|
2462
|
+
return getSelf().call("visit_or_expression", &proxy);
|
|
2463
|
+
}
|
|
2464
|
+
|
|
2465
|
+
virtual antlrcpp::Any visitAndExpression(FHIRPathParser::AndExpressionContext *ctx) override {
|
|
2466
|
+
AndExpressionContextProxy proxy(ctx);
|
|
2467
|
+
return getSelf().call("visit_and_expression", &proxy);
|
|
2468
|
+
}
|
|
2469
|
+
|
|
2470
|
+
virtual antlrcpp::Any visitMembershipExpression(FHIRPathParser::MembershipExpressionContext *ctx) override {
|
|
2471
|
+
MembershipExpressionContextProxy proxy(ctx);
|
|
2472
|
+
return getSelf().call("visit_membership_expression", &proxy);
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
virtual antlrcpp::Any visitInequalityExpression(FHIRPathParser::InequalityExpressionContext *ctx) override {
|
|
2476
|
+
InequalityExpressionContextProxy proxy(ctx);
|
|
2477
|
+
return getSelf().call("visit_inequality_expression", &proxy);
|
|
2478
|
+
}
|
|
2479
|
+
|
|
2480
|
+
virtual antlrcpp::Any visitInvocationExpression(FHIRPathParser::InvocationExpressionContext *ctx) override {
|
|
2481
|
+
InvocationExpressionContextProxy proxy(ctx);
|
|
2482
|
+
return getSelf().call("visit_invocation_expression", &proxy);
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
virtual antlrcpp::Any visitEqualityExpression(FHIRPathParser::EqualityExpressionContext *ctx) override {
|
|
2486
|
+
EqualityExpressionContextProxy proxy(ctx);
|
|
2487
|
+
return getSelf().call("visit_equality_expression", &proxy);
|
|
2488
|
+
}
|
|
2489
|
+
|
|
2490
|
+
virtual antlrcpp::Any visitImpliesExpression(FHIRPathParser::ImpliesExpressionContext *ctx) override {
|
|
2491
|
+
ImpliesExpressionContextProxy proxy(ctx);
|
|
2492
|
+
return getSelf().call("visit_implies_expression", &proxy);
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
virtual antlrcpp::Any visitTermExpression(FHIRPathParser::TermExpressionContext *ctx) override {
|
|
2496
|
+
TermExpressionContextProxy proxy(ctx);
|
|
2497
|
+
return getSelf().call("visit_term_expression", &proxy);
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
virtual antlrcpp::Any visitTypeExpression(FHIRPathParser::TypeExpressionContext *ctx) override {
|
|
2501
|
+
TypeExpressionContextProxy proxy(ctx);
|
|
2502
|
+
return getSelf().call("visit_type_expression", &proxy);
|
|
2503
|
+
}
|
|
2504
|
+
|
|
2505
|
+
virtual antlrcpp::Any visitInvocationTerm(FHIRPathParser::InvocationTermContext *ctx) override {
|
|
2506
|
+
InvocationTermContextProxy proxy(ctx);
|
|
2507
|
+
return getSelf().call("visit_invocation_term", &proxy);
|
|
2508
|
+
}
|
|
2509
|
+
|
|
2510
|
+
virtual antlrcpp::Any visitLiteralTerm(FHIRPathParser::LiteralTermContext *ctx) override {
|
|
2511
|
+
LiteralTermContextProxy proxy(ctx);
|
|
2512
|
+
return getSelf().call("visit_literal_term", &proxy);
|
|
2513
|
+
}
|
|
2514
|
+
|
|
2515
|
+
virtual antlrcpp::Any visitExternalConstantTerm(FHIRPathParser::ExternalConstantTermContext *ctx) override {
|
|
2516
|
+
ExternalConstantTermContextProxy proxy(ctx);
|
|
2517
|
+
return getSelf().call("visit_external_constant_term", &proxy);
|
|
2518
|
+
}
|
|
2519
|
+
|
|
2520
|
+
virtual antlrcpp::Any visitParenthesizedTerm(FHIRPathParser::ParenthesizedTermContext *ctx) override {
|
|
2521
|
+
ParenthesizedTermContextProxy proxy(ctx);
|
|
2522
|
+
return getSelf().call("visit_parenthesized_term", &proxy);
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
virtual antlrcpp::Any visitNullLiteral(FHIRPathParser::NullLiteralContext *ctx) override {
|
|
2526
|
+
NullLiteralContextProxy proxy(ctx);
|
|
2527
|
+
return getSelf().call("visit_null_literal", &proxy);
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
virtual antlrcpp::Any visitBooleanLiteral(FHIRPathParser::BooleanLiteralContext *ctx) override {
|
|
2531
|
+
BooleanLiteralContextProxy proxy(ctx);
|
|
2532
|
+
return getSelf().call("visit_boolean_literal", &proxy);
|
|
2533
|
+
}
|
|
2534
|
+
|
|
2535
|
+
virtual antlrcpp::Any visitStringLiteral(FHIRPathParser::StringLiteralContext *ctx) override {
|
|
2536
|
+
StringLiteralContextProxy proxy(ctx);
|
|
2537
|
+
return getSelf().call("visit_string_literal", &proxy);
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
virtual antlrcpp::Any visitNumberLiteral(FHIRPathParser::NumberLiteralContext *ctx) override {
|
|
2541
|
+
NumberLiteralContextProxy proxy(ctx);
|
|
2542
|
+
return getSelf().call("visit_number_literal", &proxy);
|
|
2543
|
+
}
|
|
2544
|
+
|
|
2545
|
+
virtual antlrcpp::Any visitDateTimeLiteral(FHIRPathParser::DateTimeLiteralContext *ctx) override {
|
|
2546
|
+
DateTimeLiteralContextProxy proxy(ctx);
|
|
2547
|
+
return getSelf().call("visit_date_time_literal", &proxy);
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
virtual antlrcpp::Any visitTimeLiteral(FHIRPathParser::TimeLiteralContext *ctx) override {
|
|
2551
|
+
TimeLiteralContextProxy proxy(ctx);
|
|
2552
|
+
return getSelf().call("visit_time_literal", &proxy);
|
|
2553
|
+
}
|
|
2554
|
+
|
|
2555
|
+
virtual antlrcpp::Any visitQuantityLiteral(FHIRPathParser::QuantityLiteralContext *ctx) override {
|
|
2556
|
+
QuantityLiteralContextProxy proxy(ctx);
|
|
2557
|
+
return getSelf().call("visit_quantity_literal", &proxy);
|
|
2558
|
+
}
|
|
2559
|
+
|
|
2560
|
+
virtual antlrcpp::Any visitExternalConstant(FHIRPathParser::ExternalConstantContext *ctx) override {
|
|
2561
|
+
ExternalConstantContextProxy proxy(ctx);
|
|
2562
|
+
return getSelf().call("visit_external_constant", &proxy);
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
virtual antlrcpp::Any visitMemberInvocation(FHIRPathParser::MemberInvocationContext *ctx) override {
|
|
2566
|
+
MemberInvocationContextProxy proxy(ctx);
|
|
2567
|
+
return getSelf().call("visit_member_invocation", &proxy);
|
|
2568
|
+
}
|
|
2569
|
+
|
|
2570
|
+
virtual antlrcpp::Any visitFunctionInvocation(FHIRPathParser::FunctionInvocationContext *ctx) override {
|
|
2571
|
+
FunctionInvocationContextProxy proxy(ctx);
|
|
2572
|
+
return getSelf().call("visit_function_invocation", &proxy);
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
virtual antlrcpp::Any visitThisInvocation(FHIRPathParser::ThisInvocationContext *ctx) override {
|
|
2576
|
+
ThisInvocationContextProxy proxy(ctx);
|
|
2577
|
+
return getSelf().call("visit_this_invocation", &proxy);
|
|
2578
|
+
}
|
|
2579
|
+
|
|
2580
|
+
virtual antlrcpp::Any visitIndexInvocation(FHIRPathParser::IndexInvocationContext *ctx) override {
|
|
2581
|
+
IndexInvocationContextProxy proxy(ctx);
|
|
2582
|
+
return getSelf().call("visit_index_invocation", &proxy);
|
|
2583
|
+
}
|
|
2584
|
+
|
|
2585
|
+
virtual antlrcpp::Any visitTotalInvocation(FHIRPathParser::TotalInvocationContext *ctx) override {
|
|
2586
|
+
TotalInvocationContextProxy proxy(ctx);
|
|
2587
|
+
return getSelf().call("visit_total_invocation", &proxy);
|
|
2588
|
+
}
|
|
2589
|
+
|
|
2590
|
+
virtual antlrcpp::Any visitFunctn(FHIRPathParser::FunctnContext *ctx) override {
|
|
2591
|
+
FunctnContextProxy proxy(ctx);
|
|
2592
|
+
return getSelf().call("visit_functn", &proxy);
|
|
2593
|
+
}
|
|
2594
|
+
|
|
2595
|
+
virtual antlrcpp::Any visitParamList(FHIRPathParser::ParamListContext *ctx) override {
|
|
2596
|
+
ParamListContextProxy proxy(ctx);
|
|
2597
|
+
return getSelf().call("visit_param_list", &proxy);
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
virtual antlrcpp::Any visitQuantity(FHIRPathParser::QuantityContext *ctx) override {
|
|
2601
|
+
QuantityContextProxy proxy(ctx);
|
|
2602
|
+
return getSelf().call("visit_quantity", &proxy);
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2605
|
+
virtual antlrcpp::Any visitUnit(FHIRPathParser::UnitContext *ctx) override {
|
|
2606
|
+
UnitContextProxy proxy(ctx);
|
|
2607
|
+
return getSelf().call("visit_unit", &proxy);
|
|
2608
|
+
}
|
|
2609
|
+
|
|
2610
|
+
virtual antlrcpp::Any visitDateTimePrecision(FHIRPathParser::DateTimePrecisionContext *ctx) override {
|
|
2611
|
+
DateTimePrecisionContextProxy proxy(ctx);
|
|
2612
|
+
return getSelf().call("visit_date_time_precision", &proxy);
|
|
2613
|
+
}
|
|
2614
|
+
|
|
2615
|
+
virtual antlrcpp::Any visitPluralDateTimePrecision(FHIRPathParser::PluralDateTimePrecisionContext *ctx) override {
|
|
2616
|
+
PluralDateTimePrecisionContextProxy proxy(ctx);
|
|
2617
|
+
return getSelf().call("visit_plural_date_time_precision", &proxy);
|
|
2618
|
+
}
|
|
2619
|
+
|
|
2620
|
+
virtual antlrcpp::Any visitTypeSpecifier(FHIRPathParser::TypeSpecifierContext *ctx) override {
|
|
2621
|
+
TypeSpecifierContextProxy proxy(ctx);
|
|
2622
|
+
return getSelf().call("visit_type_specifier", &proxy);
|
|
2623
|
+
}
|
|
2624
|
+
|
|
2625
|
+
virtual antlrcpp::Any visitQualifiedIdentifier(FHIRPathParser::QualifiedIdentifierContext *ctx) override {
|
|
2626
|
+
QualifiedIdentifierContextProxy proxy(ctx);
|
|
2627
|
+
return getSelf().call("visit_qualified_identifier", &proxy);
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
virtual antlrcpp::Any visitIdentifier(FHIRPathParser::IdentifierContext *ctx) override {
|
|
2631
|
+
IdentifierContextProxy proxy(ctx);
|
|
2632
|
+
return getSelf().call("visit_identifier", &proxy);
|
|
2633
|
+
}
|
|
2634
|
+
|
|
2635
|
+
};
|
|
2636
|
+
|
|
2637
|
+
|
|
2638
|
+
class CountingErrorListener : public BaseErrorListener {
|
|
2639
|
+
public:
|
|
2640
|
+
size_t *counter = nullptr;
|
|
2641
|
+
|
|
2642
|
+
void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line,
|
|
2643
|
+
size_t charPositionInLine, const std::string &msg,
|
|
2644
|
+
std::exception_ptr e) override {
|
|
2645
|
+
if (counter != nullptr) {
|
|
2646
|
+
(*counter)++;
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
};
|
|
2650
|
+
|
|
2651
|
+
class ParserProxy {
|
|
2652
|
+
public:
|
|
2653
|
+
size_t syntaxErrorCount() { return errorCount; }
|
|
2654
|
+
|
|
2655
|
+
static ParserProxy* parse(string code) {
|
|
2656
|
+
auto input = new ANTLRInputStream(code);
|
|
2657
|
+
return parseStream(input);
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2660
|
+
static ParserProxy* parseFile(string file) {
|
|
2661
|
+
ifstream stream;
|
|
2662
|
+
stream.open(file);
|
|
2663
|
+
|
|
2664
|
+
auto input = new ANTLRInputStream(stream);
|
|
2665
|
+
auto parser = parseStream(input);
|
|
2666
|
+
|
|
2667
|
+
stream.close();
|
|
2668
|
+
|
|
2669
|
+
return parser;
|
|
2670
|
+
}
|
|
2671
|
+
|
|
2672
|
+
Object expression() {
|
|
2673
|
+
auto ctx = this -> parser -> expression();
|
|
2674
|
+
|
|
2675
|
+
ExpressionContextProxy proxy((FHIRPathParser::ExpressionContext*) ctx);
|
|
2676
|
+
return detail::To_Ruby<ExpressionContextProxy>().convert(proxy);
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
Object visit(VisitorProxy* visitor) {
|
|
2680
|
+
auto result = visitor -> visit(this -> parser -> expression());
|
|
2681
|
+
|
|
2682
|
+
// reset for the next visit call
|
|
2683
|
+
this -> lexer -> reset();
|
|
2684
|
+
this -> parser -> reset();
|
|
2685
|
+
|
|
2686
|
+
return std::any_cast<Object>(result);
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
~ParserProxy() {
|
|
2690
|
+
delete this -> parser;
|
|
2691
|
+
delete this -> tokens;
|
|
2692
|
+
delete this -> lexer;
|
|
2693
|
+
delete this -> input;
|
|
2694
|
+
}
|
|
2695
|
+
|
|
2696
|
+
private:
|
|
2697
|
+
static ParserProxy* parseStream(ANTLRInputStream* input) {
|
|
2698
|
+
ParserProxy* parser = new ParserProxy();
|
|
2699
|
+
|
|
2700
|
+
parser -> input = input;
|
|
2701
|
+
parser -> lexer = new FHIRPathLexer(parser -> input);
|
|
2702
|
+
parser -> tokens = new CommonTokenStream(parser -> lexer);
|
|
2703
|
+
parser -> parser = new FHIRPathParser(parser -> tokens);
|
|
2704
|
+
|
|
2705
|
+
parser -> errorListener.counter = &parser -> errorCount;
|
|
2706
|
+
parser -> lexer -> removeErrorListeners();
|
|
2707
|
+
parser -> lexer -> addErrorListener(&parser -> errorListener);
|
|
2708
|
+
parser -> parser -> removeErrorListeners();
|
|
2709
|
+
parser -> parser -> addErrorListener(&parser -> errorListener);
|
|
2710
|
+
|
|
2711
|
+
return parser;
|
|
2712
|
+
}
|
|
2713
|
+
|
|
2714
|
+
ParserProxy() {};
|
|
2715
|
+
|
|
2716
|
+
ANTLRInputStream* input;
|
|
2717
|
+
FHIRPathLexer* lexer;
|
|
2718
|
+
CommonTokenStream* tokens;
|
|
2719
|
+
FHIRPathParser* parser;
|
|
2720
|
+
CountingErrorListener errorListener;
|
|
2721
|
+
size_t errorCount = 0;
|
|
2722
|
+
};
|
|
2723
|
+
|
|
2724
|
+
namespace Rice::detail {
|
|
2725
|
+
template <>
|
|
2726
|
+
struct Type<ParserProxy*> {
|
|
2727
|
+
static bool verify() {
|
|
2728
|
+
return true;
|
|
2729
|
+
}
|
|
2730
|
+
};
|
|
2731
|
+
|
|
2732
|
+
template <>
|
|
2733
|
+
class To_Ruby<ParserProxy*> {
|
|
2734
|
+
public:
|
|
2735
|
+
To_Ruby() = default;
|
|
2736
|
+
|
|
2737
|
+
explicit To_Ruby(Arg* arg) : arg_(arg) {}
|
|
2738
|
+
|
|
2739
|
+
VALUE convert(ParserProxy* const &x) {
|
|
2740
|
+
if (!x) return Qnil;
|
|
2741
|
+
return Data_Object<ParserProxy>(x, false, rb_cParser);
|
|
2742
|
+
}
|
|
2743
|
+
private:
|
|
2744
|
+
Arg* arg_ = nullptr;
|
|
2745
|
+
};
|
|
2746
|
+
}
|
|
2747
|
+
|
|
2748
|
+
|
|
2749
|
+
Object ContextProxy::wrapParseTree(tree::ParseTree* node) {
|
|
2750
|
+
if (antlrcpp::is<FHIRPathParser::EntireExpressionContext*>(node)) {
|
|
2751
|
+
EntireExpressionContextProxy proxy((FHIRPathParser::EntireExpressionContext*)node);
|
|
2752
|
+
return detail::To_Ruby<EntireExpressionContextProxy>().convert(proxy);
|
|
2753
|
+
}
|
|
2754
|
+
else if (antlrcpp::is<FHIRPathParser::ExpressionContext*>(node)) {
|
|
2755
|
+
ExpressionContextProxy proxy((FHIRPathParser::ExpressionContext*)node);
|
|
2756
|
+
return detail::To_Ruby<ExpressionContextProxy>().convert(proxy);
|
|
2757
|
+
}
|
|
2758
|
+
else if (antlrcpp::is<FHIRPathParser::IndexerExpressionContext*>(node)) {
|
|
2759
|
+
IndexerExpressionContextProxy proxy((FHIRPathParser::IndexerExpressionContext*)node);
|
|
2760
|
+
return detail::To_Ruby<IndexerExpressionContextProxy>().convert(proxy);
|
|
2761
|
+
}
|
|
2762
|
+
else if (antlrcpp::is<FHIRPathParser::PolarityExpressionContext*>(node)) {
|
|
2763
|
+
PolarityExpressionContextProxy proxy((FHIRPathParser::PolarityExpressionContext*)node);
|
|
2764
|
+
return detail::To_Ruby<PolarityExpressionContextProxy>().convert(proxy);
|
|
2765
|
+
}
|
|
2766
|
+
else if (antlrcpp::is<FHIRPathParser::AdditiveExpressionContext*>(node)) {
|
|
2767
|
+
AdditiveExpressionContextProxy proxy((FHIRPathParser::AdditiveExpressionContext*)node);
|
|
2768
|
+
return detail::To_Ruby<AdditiveExpressionContextProxy>().convert(proxy);
|
|
2769
|
+
}
|
|
2770
|
+
else if (antlrcpp::is<FHIRPathParser::MultiplicativeExpressionContext*>(node)) {
|
|
2771
|
+
MultiplicativeExpressionContextProxy proxy((FHIRPathParser::MultiplicativeExpressionContext*)node);
|
|
2772
|
+
return detail::To_Ruby<MultiplicativeExpressionContextProxy>().convert(proxy);
|
|
2773
|
+
}
|
|
2774
|
+
else if (antlrcpp::is<FHIRPathParser::UnionExpressionContext*>(node)) {
|
|
2775
|
+
UnionExpressionContextProxy proxy((FHIRPathParser::UnionExpressionContext*)node);
|
|
2776
|
+
return detail::To_Ruby<UnionExpressionContextProxy>().convert(proxy);
|
|
2777
|
+
}
|
|
2778
|
+
else if (antlrcpp::is<FHIRPathParser::OrExpressionContext*>(node)) {
|
|
2779
|
+
OrExpressionContextProxy proxy((FHIRPathParser::OrExpressionContext*)node);
|
|
2780
|
+
return detail::To_Ruby<OrExpressionContextProxy>().convert(proxy);
|
|
2781
|
+
}
|
|
2782
|
+
else if (antlrcpp::is<FHIRPathParser::AndExpressionContext*>(node)) {
|
|
2783
|
+
AndExpressionContextProxy proxy((FHIRPathParser::AndExpressionContext*)node);
|
|
2784
|
+
return detail::To_Ruby<AndExpressionContextProxy>().convert(proxy);
|
|
2785
|
+
}
|
|
2786
|
+
else if (antlrcpp::is<FHIRPathParser::MembershipExpressionContext*>(node)) {
|
|
2787
|
+
MembershipExpressionContextProxy proxy((FHIRPathParser::MembershipExpressionContext*)node);
|
|
2788
|
+
return detail::To_Ruby<MembershipExpressionContextProxy>().convert(proxy);
|
|
2789
|
+
}
|
|
2790
|
+
else if (antlrcpp::is<FHIRPathParser::InequalityExpressionContext*>(node)) {
|
|
2791
|
+
InequalityExpressionContextProxy proxy((FHIRPathParser::InequalityExpressionContext*)node);
|
|
2792
|
+
return detail::To_Ruby<InequalityExpressionContextProxy>().convert(proxy);
|
|
2793
|
+
}
|
|
2794
|
+
else if (antlrcpp::is<FHIRPathParser::InvocationExpressionContext*>(node)) {
|
|
2795
|
+
InvocationExpressionContextProxy proxy((FHIRPathParser::InvocationExpressionContext*)node);
|
|
2796
|
+
return detail::To_Ruby<InvocationExpressionContextProxy>().convert(proxy);
|
|
2797
|
+
}
|
|
2798
|
+
else if (antlrcpp::is<FHIRPathParser::InvocationContext*>(node)) {
|
|
2799
|
+
InvocationContextProxy proxy((FHIRPathParser::InvocationContext*)node);
|
|
2800
|
+
return detail::To_Ruby<InvocationContextProxy>().convert(proxy);
|
|
2801
|
+
}
|
|
2802
|
+
else if (antlrcpp::is<FHIRPathParser::EqualityExpressionContext*>(node)) {
|
|
2803
|
+
EqualityExpressionContextProxy proxy((FHIRPathParser::EqualityExpressionContext*)node);
|
|
2804
|
+
return detail::To_Ruby<EqualityExpressionContextProxy>().convert(proxy);
|
|
2805
|
+
}
|
|
2806
|
+
else if (antlrcpp::is<FHIRPathParser::ImpliesExpressionContext*>(node)) {
|
|
2807
|
+
ImpliesExpressionContextProxy proxy((FHIRPathParser::ImpliesExpressionContext*)node);
|
|
2808
|
+
return detail::To_Ruby<ImpliesExpressionContextProxy>().convert(proxy);
|
|
2809
|
+
}
|
|
2810
|
+
else if (antlrcpp::is<FHIRPathParser::TermContext*>(node)) {
|
|
2811
|
+
TermContextProxy proxy((FHIRPathParser::TermContext*)node);
|
|
2812
|
+
return detail::To_Ruby<TermContextProxy>().convert(proxy);
|
|
2813
|
+
}
|
|
2814
|
+
else if (antlrcpp::is<FHIRPathParser::TermExpressionContext*>(node)) {
|
|
2815
|
+
TermExpressionContextProxy proxy((FHIRPathParser::TermExpressionContext*)node);
|
|
2816
|
+
return detail::To_Ruby<TermExpressionContextProxy>().convert(proxy);
|
|
2817
|
+
}
|
|
2818
|
+
else if (antlrcpp::is<FHIRPathParser::TypeExpressionContext*>(node)) {
|
|
2819
|
+
TypeExpressionContextProxy proxy((FHIRPathParser::TypeExpressionContext*)node);
|
|
2820
|
+
return detail::To_Ruby<TypeExpressionContextProxy>().convert(proxy);
|
|
2821
|
+
}
|
|
2822
|
+
else if (antlrcpp::is<FHIRPathParser::TypeSpecifierContext*>(node)) {
|
|
2823
|
+
TypeSpecifierContextProxy proxy((FHIRPathParser::TypeSpecifierContext*)node);
|
|
2824
|
+
return detail::To_Ruby<TypeSpecifierContextProxy>().convert(proxy);
|
|
2825
|
+
}
|
|
2826
|
+
else if (antlrcpp::is<FHIRPathParser::ExternalConstantContext*>(node)) {
|
|
2827
|
+
ExternalConstantContextProxy proxy((FHIRPathParser::ExternalConstantContext*)node);
|
|
2828
|
+
return detail::To_Ruby<ExternalConstantContextProxy>().convert(proxy);
|
|
2829
|
+
}
|
|
2830
|
+
else if (antlrcpp::is<FHIRPathParser::ExternalConstantTermContext*>(node)) {
|
|
2831
|
+
ExternalConstantTermContextProxy proxy((FHIRPathParser::ExternalConstantTermContext*)node);
|
|
2832
|
+
return detail::To_Ruby<ExternalConstantTermContextProxy>().convert(proxy);
|
|
2833
|
+
}
|
|
2834
|
+
else if (antlrcpp::is<FHIRPathParser::LiteralContext*>(node)) {
|
|
2835
|
+
LiteralContextProxy proxy((FHIRPathParser::LiteralContext*)node);
|
|
2836
|
+
return detail::To_Ruby<LiteralContextProxy>().convert(proxy);
|
|
2837
|
+
}
|
|
2838
|
+
else if (antlrcpp::is<FHIRPathParser::LiteralTermContext*>(node)) {
|
|
2839
|
+
LiteralTermContextProxy proxy((FHIRPathParser::LiteralTermContext*)node);
|
|
2840
|
+
return detail::To_Ruby<LiteralTermContextProxy>().convert(proxy);
|
|
2841
|
+
}
|
|
2842
|
+
else if (antlrcpp::is<FHIRPathParser::ParenthesizedTermContext*>(node)) {
|
|
2843
|
+
ParenthesizedTermContextProxy proxy((FHIRPathParser::ParenthesizedTermContext*)node);
|
|
2844
|
+
return detail::To_Ruby<ParenthesizedTermContextProxy>().convert(proxy);
|
|
2845
|
+
}
|
|
2846
|
+
else if (antlrcpp::is<FHIRPathParser::InvocationTermContext*>(node)) {
|
|
2847
|
+
InvocationTermContextProxy proxy((FHIRPathParser::InvocationTermContext*)node);
|
|
2848
|
+
return detail::To_Ruby<InvocationTermContextProxy>().convert(proxy);
|
|
2849
|
+
}
|
|
2850
|
+
else if (antlrcpp::is<FHIRPathParser::TimeLiteralContext*>(node)) {
|
|
2851
|
+
TimeLiteralContextProxy proxy((FHIRPathParser::TimeLiteralContext*)node);
|
|
2852
|
+
return detail::To_Ruby<TimeLiteralContextProxy>().convert(proxy);
|
|
2853
|
+
}
|
|
2854
|
+
else if (antlrcpp::is<FHIRPathParser::NullLiteralContext*>(node)) {
|
|
2855
|
+
NullLiteralContextProxy proxy((FHIRPathParser::NullLiteralContext*)node);
|
|
2856
|
+
return detail::To_Ruby<NullLiteralContextProxy>().convert(proxy);
|
|
2857
|
+
}
|
|
2858
|
+
else if (antlrcpp::is<FHIRPathParser::DateTimeLiteralContext*>(node)) {
|
|
2859
|
+
DateTimeLiteralContextProxy proxy((FHIRPathParser::DateTimeLiteralContext*)node);
|
|
2860
|
+
return detail::To_Ruby<DateTimeLiteralContextProxy>().convert(proxy);
|
|
2861
|
+
}
|
|
2862
|
+
else if (antlrcpp::is<FHIRPathParser::StringLiteralContext*>(node)) {
|
|
2863
|
+
StringLiteralContextProxy proxy((FHIRPathParser::StringLiteralContext*)node);
|
|
2864
|
+
return detail::To_Ruby<StringLiteralContextProxy>().convert(proxy);
|
|
2865
|
+
}
|
|
2866
|
+
else if (antlrcpp::is<FHIRPathParser::BooleanLiteralContext*>(node)) {
|
|
2867
|
+
BooleanLiteralContextProxy proxy((FHIRPathParser::BooleanLiteralContext*)node);
|
|
2868
|
+
return detail::To_Ruby<BooleanLiteralContextProxy>().convert(proxy);
|
|
2869
|
+
}
|
|
2870
|
+
else if (antlrcpp::is<FHIRPathParser::NumberLiteralContext*>(node)) {
|
|
2871
|
+
NumberLiteralContextProxy proxy((FHIRPathParser::NumberLiteralContext*)node);
|
|
2872
|
+
return detail::To_Ruby<NumberLiteralContextProxy>().convert(proxy);
|
|
2873
|
+
}
|
|
2874
|
+
else if (antlrcpp::is<FHIRPathParser::QuantityContext*>(node)) {
|
|
2875
|
+
QuantityContextProxy proxy((FHIRPathParser::QuantityContext*)node);
|
|
2876
|
+
return detail::To_Ruby<QuantityContextProxy>().convert(proxy);
|
|
2877
|
+
}
|
|
2878
|
+
else if (antlrcpp::is<FHIRPathParser::QuantityLiteralContext*>(node)) {
|
|
2879
|
+
QuantityLiteralContextProxy proxy((FHIRPathParser::QuantityLiteralContext*)node);
|
|
2880
|
+
return detail::To_Ruby<QuantityLiteralContextProxy>().convert(proxy);
|
|
2881
|
+
}
|
|
2882
|
+
else if (antlrcpp::is<FHIRPathParser::IdentifierContext*>(node)) {
|
|
2883
|
+
IdentifierContextProxy proxy((FHIRPathParser::IdentifierContext*)node);
|
|
2884
|
+
return detail::To_Ruby<IdentifierContextProxy>().convert(proxy);
|
|
2885
|
+
}
|
|
2886
|
+
else if (antlrcpp::is<FHIRPathParser::TotalInvocationContext*>(node)) {
|
|
2887
|
+
TotalInvocationContextProxy proxy((FHIRPathParser::TotalInvocationContext*)node);
|
|
2888
|
+
return detail::To_Ruby<TotalInvocationContextProxy>().convert(proxy);
|
|
2889
|
+
}
|
|
2890
|
+
else if (antlrcpp::is<FHIRPathParser::ThisInvocationContext*>(node)) {
|
|
2891
|
+
ThisInvocationContextProxy proxy((FHIRPathParser::ThisInvocationContext*)node);
|
|
2892
|
+
return detail::To_Ruby<ThisInvocationContextProxy>().convert(proxy);
|
|
2893
|
+
}
|
|
2894
|
+
else if (antlrcpp::is<FHIRPathParser::IndexInvocationContext*>(node)) {
|
|
2895
|
+
IndexInvocationContextProxy proxy((FHIRPathParser::IndexInvocationContext*)node);
|
|
2896
|
+
return detail::To_Ruby<IndexInvocationContextProxy>().convert(proxy);
|
|
2897
|
+
}
|
|
2898
|
+
else if (antlrcpp::is<FHIRPathParser::FunctnContext*>(node)) {
|
|
2899
|
+
FunctnContextProxy proxy((FHIRPathParser::FunctnContext*)node);
|
|
2900
|
+
return detail::To_Ruby<FunctnContextProxy>().convert(proxy);
|
|
2901
|
+
}
|
|
2902
|
+
else if (antlrcpp::is<FHIRPathParser::FunctionInvocationContext*>(node)) {
|
|
2903
|
+
FunctionInvocationContextProxy proxy((FHIRPathParser::FunctionInvocationContext*)node);
|
|
2904
|
+
return detail::To_Ruby<FunctionInvocationContextProxy>().convert(proxy);
|
|
2905
|
+
}
|
|
2906
|
+
else if (antlrcpp::is<FHIRPathParser::MemberInvocationContext*>(node)) {
|
|
2907
|
+
MemberInvocationContextProxy proxy((FHIRPathParser::MemberInvocationContext*)node);
|
|
2908
|
+
return detail::To_Ruby<MemberInvocationContextProxy>().convert(proxy);
|
|
2909
|
+
}
|
|
2910
|
+
else if (antlrcpp::is<FHIRPathParser::ParamListContext*>(node)) {
|
|
2911
|
+
ParamListContextProxy proxy((FHIRPathParser::ParamListContext*)node);
|
|
2912
|
+
return detail::To_Ruby<ParamListContextProxy>().convert(proxy);
|
|
2913
|
+
}
|
|
2914
|
+
else if (antlrcpp::is<FHIRPathParser::UnitContext*>(node)) {
|
|
2915
|
+
UnitContextProxy proxy((FHIRPathParser::UnitContext*)node);
|
|
2916
|
+
return detail::To_Ruby<UnitContextProxy>().convert(proxy);
|
|
2917
|
+
}
|
|
2918
|
+
else if (antlrcpp::is<FHIRPathParser::DateTimePrecisionContext*>(node)) {
|
|
2919
|
+
DateTimePrecisionContextProxy proxy((FHIRPathParser::DateTimePrecisionContext*)node);
|
|
2920
|
+
return detail::To_Ruby<DateTimePrecisionContextProxy>().convert(proxy);
|
|
2921
|
+
}
|
|
2922
|
+
else if (antlrcpp::is<FHIRPathParser::PluralDateTimePrecisionContext*>(node)) {
|
|
2923
|
+
PluralDateTimePrecisionContextProxy proxy((FHIRPathParser::PluralDateTimePrecisionContext*)node);
|
|
2924
|
+
return detail::To_Ruby<PluralDateTimePrecisionContextProxy>().convert(proxy);
|
|
2925
|
+
}
|
|
2926
|
+
else if (antlrcpp::is<FHIRPathParser::QualifiedIdentifierContext*>(node)) {
|
|
2927
|
+
QualifiedIdentifierContextProxy proxy((FHIRPathParser::QualifiedIdentifierContext*)node);
|
|
2928
|
+
return detail::To_Ruby<QualifiedIdentifierContextProxy>().convert(proxy);
|
|
2929
|
+
}
|
|
2930
|
+
else if (antlrcpp::is<tree::TerminalNodeImpl*>(node)) {
|
|
2931
|
+
TerminalNodeProxy proxy(node);
|
|
2932
|
+
return detail::To_Ruby<TerminalNodeProxy>().convert(proxy);
|
|
2933
|
+
} else {
|
|
2934
|
+
return Qnil;
|
|
2935
|
+
}
|
|
2936
|
+
}
|
|
2937
|
+
|
|
2938
|
+
|
|
2939
|
+
extern "C"
|
|
2940
|
+
void Init_fhir_path_parser() {
|
|
2941
|
+
Module rb_mFHIRPathParser = define_module("FHIRPathParser");
|
|
2942
|
+
|
|
2943
|
+
rb_cToken = define_class_under<Token>(rb_mFHIRPathParser, "Token")
|
|
2944
|
+
.define_method("text", &Token::getText)
|
|
2945
|
+
.define_method("channel", &Token::getChannel)
|
|
2946
|
+
.define_method("token_index", &Token::getTokenIndex);
|
|
2947
|
+
|
|
2948
|
+
rb_cParseTree = define_class_under<tree::ParseTree>(rb_mFHIRPathParser, "ParseTree");
|
|
2949
|
+
|
|
2950
|
+
rb_cContextProxy = define_class_under<ContextProxy>(rb_mFHIRPathParser, "Context")
|
|
2951
|
+
.define_method("children", &ContextProxy::getChildren)
|
|
2952
|
+
.define_method("child_count", &ContextProxy::childCount)
|
|
2953
|
+
.define_method("text", &ContextProxy::getText)
|
|
2954
|
+
.define_method("start", &ContextProxy::getStart)
|
|
2955
|
+
.define_method("stop", &ContextProxy::getStop)
|
|
2956
|
+
.define_method("parent", &ContextProxy::getParent)
|
|
2957
|
+
.define_method("==", &ContextProxy::doubleEquals)
|
|
2958
|
+
.define_method("type_name", &ContextProxy::getTypeName);
|
|
2959
|
+
|
|
2960
|
+
rb_cTerminalNode = define_class_under<TerminalNodeProxy, ContextProxy>(rb_mFHIRPathParser, "TerminalNodeImpl");
|
|
2961
|
+
|
|
2962
|
+
define_class_under<FHIRPathBaseVisitor>(rb_mFHIRPathParser, "Visitor")
|
|
2963
|
+
.define_director<VisitorProxy>()
|
|
2964
|
+
.define_constructor(Constructor<VisitorProxy, Object>())
|
|
2965
|
+
.define_method("visit", &VisitorProxy::ruby_visit)
|
|
2966
|
+
.define_method("visit_children", &VisitorProxy::ruby_visitChildren)
|
|
2967
|
+
.define_method("visit_entire_expression", &VisitorProxy::ruby_visitChildren)
|
|
2968
|
+
.define_method("visit_indexer_expression", &VisitorProxy::ruby_visitChildren)
|
|
2969
|
+
.define_method("visit_polarity_expression", &VisitorProxy::ruby_visitChildren)
|
|
2970
|
+
.define_method("visit_additive_expression", &VisitorProxy::ruby_visitChildren)
|
|
2971
|
+
.define_method("visit_multiplicative_expression", &VisitorProxy::ruby_visitChildren)
|
|
2972
|
+
.define_method("visit_union_expression", &VisitorProxy::ruby_visitChildren)
|
|
2973
|
+
.define_method("visit_or_expression", &VisitorProxy::ruby_visitChildren)
|
|
2974
|
+
.define_method("visit_and_expression", &VisitorProxy::ruby_visitChildren)
|
|
2975
|
+
.define_method("visit_membership_expression", &VisitorProxy::ruby_visitChildren)
|
|
2976
|
+
.define_method("visit_inequality_expression", &VisitorProxy::ruby_visitChildren)
|
|
2977
|
+
.define_method("visit_invocation_expression", &VisitorProxy::ruby_visitChildren)
|
|
2978
|
+
.define_method("visit_equality_expression", &VisitorProxy::ruby_visitChildren)
|
|
2979
|
+
.define_method("visit_implies_expression", &VisitorProxy::ruby_visitChildren)
|
|
2980
|
+
.define_method("visit_term_expression", &VisitorProxy::ruby_visitChildren)
|
|
2981
|
+
.define_method("visit_type_expression", &VisitorProxy::ruby_visitChildren)
|
|
2982
|
+
.define_method("visit_invocation_term", &VisitorProxy::ruby_visitChildren)
|
|
2983
|
+
.define_method("visit_literal_term", &VisitorProxy::ruby_visitChildren)
|
|
2984
|
+
.define_method("visit_external_constant_term", &VisitorProxy::ruby_visitChildren)
|
|
2985
|
+
.define_method("visit_parenthesized_term", &VisitorProxy::ruby_visitChildren)
|
|
2986
|
+
.define_method("visit_null_literal", &VisitorProxy::ruby_visitChildren)
|
|
2987
|
+
.define_method("visit_boolean_literal", &VisitorProxy::ruby_visitChildren)
|
|
2988
|
+
.define_method("visit_string_literal", &VisitorProxy::ruby_visitChildren)
|
|
2989
|
+
.define_method("visit_number_literal", &VisitorProxy::ruby_visitChildren)
|
|
2990
|
+
.define_method("visit_date_time_literal", &VisitorProxy::ruby_visitChildren)
|
|
2991
|
+
.define_method("visit_time_literal", &VisitorProxy::ruby_visitChildren)
|
|
2992
|
+
.define_method("visit_quantity_literal", &VisitorProxy::ruby_visitChildren)
|
|
2993
|
+
.define_method("visit_external_constant", &VisitorProxy::ruby_visitChildren)
|
|
2994
|
+
.define_method("visit_member_invocation", &VisitorProxy::ruby_visitChildren)
|
|
2995
|
+
.define_method("visit_function_invocation", &VisitorProxy::ruby_visitChildren)
|
|
2996
|
+
.define_method("visit_this_invocation", &VisitorProxy::ruby_visitChildren)
|
|
2997
|
+
.define_method("visit_index_invocation", &VisitorProxy::ruby_visitChildren)
|
|
2998
|
+
.define_method("visit_total_invocation", &VisitorProxy::ruby_visitChildren)
|
|
2999
|
+
.define_method("visit_functn", &VisitorProxy::ruby_visitChildren)
|
|
3000
|
+
.define_method("visit_param_list", &VisitorProxy::ruby_visitChildren)
|
|
3001
|
+
.define_method("visit_quantity", &VisitorProxy::ruby_visitChildren)
|
|
3002
|
+
.define_method("visit_unit", &VisitorProxy::ruby_visitChildren)
|
|
3003
|
+
.define_method("visit_date_time_precision", &VisitorProxy::ruby_visitChildren)
|
|
3004
|
+
.define_method("visit_plural_date_time_precision", &VisitorProxy::ruby_visitChildren)
|
|
3005
|
+
.define_method("visit_type_specifier", &VisitorProxy::ruby_visitChildren)
|
|
3006
|
+
.define_method("visit_qualified_identifier", &VisitorProxy::ruby_visitChildren)
|
|
3007
|
+
.define_method("visit_identifier", &VisitorProxy::ruby_visitChildren);
|
|
3008
|
+
|
|
3009
|
+
rb_cParser = define_class_under<ParserProxy>(rb_mFHIRPathParser, "Parser")
|
|
3010
|
+
.define_singleton_function("parse", &ParserProxy::parse)
|
|
3011
|
+
.define_singleton_function("parse_file", &ParserProxy::parseFile)
|
|
3012
|
+
.define_method("expression", &ParserProxy::expression)
|
|
3013
|
+
.define_method("visit", &ParserProxy::visit)
|
|
3014
|
+
.define_method("syntax_error_count", &ParserProxy::syntaxErrorCount);
|
|
3015
|
+
|
|
3016
|
+
rb_cEntireExpressionContext = define_class_under<EntireExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "EntireExpressionContext")
|
|
3017
|
+
.define_method("expression", &EntireExpressionContextProxy::expression)
|
|
3018
|
+
.define_method("EOF", &EntireExpressionContextProxy::EOF);
|
|
3019
|
+
|
|
3020
|
+
rb_cExpressionContext = define_class_under<ExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "ExpressionContext");
|
|
3021
|
+
|
|
3022
|
+
rb_cIndexerExpressionContext = define_class_under<IndexerExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "IndexerExpressionContext")
|
|
3023
|
+
.define_method("expression", &IndexerExpressionContextProxy::expression)
|
|
3024
|
+
.define_method("expression_at", &IndexerExpressionContextProxy::expressionAt);
|
|
3025
|
+
|
|
3026
|
+
rb_cPolarityExpressionContext = define_class_under<PolarityExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "PolarityExpressionContext")
|
|
3027
|
+
.define_method("expression", &PolarityExpressionContextProxy::expression);
|
|
3028
|
+
|
|
3029
|
+
rb_cAdditiveExpressionContext = define_class_under<AdditiveExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "AdditiveExpressionContext")
|
|
3030
|
+
.define_method("expression", &AdditiveExpressionContextProxy::expression)
|
|
3031
|
+
.define_method("expression_at", &AdditiveExpressionContextProxy::expressionAt);
|
|
3032
|
+
|
|
3033
|
+
rb_cMultiplicativeExpressionContext = define_class_under<MultiplicativeExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "MultiplicativeExpressionContext")
|
|
3034
|
+
.define_method("expression", &MultiplicativeExpressionContextProxy::expression)
|
|
3035
|
+
.define_method("expression_at", &MultiplicativeExpressionContextProxy::expressionAt);
|
|
3036
|
+
|
|
3037
|
+
rb_cUnionExpressionContext = define_class_under<UnionExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "UnionExpressionContext")
|
|
3038
|
+
.define_method("expression", &UnionExpressionContextProxy::expression)
|
|
3039
|
+
.define_method("expression_at", &UnionExpressionContextProxy::expressionAt);
|
|
3040
|
+
|
|
3041
|
+
rb_cOrExpressionContext = define_class_under<OrExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "OrExpressionContext")
|
|
3042
|
+
.define_method("expression", &OrExpressionContextProxy::expression)
|
|
3043
|
+
.define_method("expression_at", &OrExpressionContextProxy::expressionAt);
|
|
3044
|
+
|
|
3045
|
+
rb_cAndExpressionContext = define_class_under<AndExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "AndExpressionContext")
|
|
3046
|
+
.define_method("expression", &AndExpressionContextProxy::expression)
|
|
3047
|
+
.define_method("expression_at", &AndExpressionContextProxy::expressionAt);
|
|
3048
|
+
|
|
3049
|
+
rb_cMembershipExpressionContext = define_class_under<MembershipExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "MembershipExpressionContext")
|
|
3050
|
+
.define_method("expression", &MembershipExpressionContextProxy::expression)
|
|
3051
|
+
.define_method("expression_at", &MembershipExpressionContextProxy::expressionAt);
|
|
3052
|
+
|
|
3053
|
+
rb_cInequalityExpressionContext = define_class_under<InequalityExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "InequalityExpressionContext")
|
|
3054
|
+
.define_method("expression", &InequalityExpressionContextProxy::expression)
|
|
3055
|
+
.define_method("expression_at", &InequalityExpressionContextProxy::expressionAt);
|
|
3056
|
+
|
|
3057
|
+
rb_cInvocationExpressionContext = define_class_under<InvocationExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "InvocationExpressionContext")
|
|
3058
|
+
.define_method("expression", &InvocationExpressionContextProxy::expression)
|
|
3059
|
+
.define_method("invocation", &InvocationExpressionContextProxy::invocation);
|
|
3060
|
+
|
|
3061
|
+
rb_cInvocationContext = define_class_under<InvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "InvocationContext");
|
|
3062
|
+
|
|
3063
|
+
rb_cEqualityExpressionContext = define_class_under<EqualityExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "EqualityExpressionContext")
|
|
3064
|
+
.define_method("expression", &EqualityExpressionContextProxy::expression)
|
|
3065
|
+
.define_method("expression_at", &EqualityExpressionContextProxy::expressionAt);
|
|
3066
|
+
|
|
3067
|
+
rb_cImpliesExpressionContext = define_class_under<ImpliesExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "ImpliesExpressionContext")
|
|
3068
|
+
.define_method("expression", &ImpliesExpressionContextProxy::expression)
|
|
3069
|
+
.define_method("expression_at", &ImpliesExpressionContextProxy::expressionAt);
|
|
3070
|
+
|
|
3071
|
+
rb_cTermContext = define_class_under<TermContextProxy, ContextProxy>(rb_mFHIRPathParser, "TermContext");
|
|
3072
|
+
|
|
3073
|
+
rb_cTermExpressionContext = define_class_under<TermExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "TermExpressionContext")
|
|
3074
|
+
.define_method("term", &TermExpressionContextProxy::term);
|
|
3075
|
+
|
|
3076
|
+
rb_cTypeExpressionContext = define_class_under<TypeExpressionContextProxy, ContextProxy>(rb_mFHIRPathParser, "TypeExpressionContext")
|
|
3077
|
+
.define_method("expression", &TypeExpressionContextProxy::expression)
|
|
3078
|
+
.define_method("type_specifier", &TypeExpressionContextProxy::typeSpecifier);
|
|
3079
|
+
|
|
3080
|
+
rb_cTypeSpecifierContext = define_class_under<TypeSpecifierContextProxy, ContextProxy>(rb_mFHIRPathParser, "TypeSpecifierContext")
|
|
3081
|
+
.define_method("qualified_identifier", &TypeSpecifierContextProxy::qualifiedIdentifier);
|
|
3082
|
+
|
|
3083
|
+
rb_cExternalConstantContext = define_class_under<ExternalConstantContextProxy, ContextProxy>(rb_mFHIRPathParser, "ExternalConstantContext")
|
|
3084
|
+
.define_method("identifier", &ExternalConstantContextProxy::identifier)
|
|
3085
|
+
.define_method("STRING", &ExternalConstantContextProxy::STRING);
|
|
3086
|
+
|
|
3087
|
+
rb_cExternalConstantTermContext = define_class_under<ExternalConstantTermContextProxy, ContextProxy>(rb_mFHIRPathParser, "ExternalConstantTermContext")
|
|
3088
|
+
.define_method("external_constant", &ExternalConstantTermContextProxy::externalConstant);
|
|
3089
|
+
|
|
3090
|
+
rb_cLiteralContext = define_class_under<LiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "LiteralContext");
|
|
3091
|
+
|
|
3092
|
+
rb_cLiteralTermContext = define_class_under<LiteralTermContextProxy, ContextProxy>(rb_mFHIRPathParser, "LiteralTermContext")
|
|
3093
|
+
.define_method("literal", &LiteralTermContextProxy::literal);
|
|
3094
|
+
|
|
3095
|
+
rb_cParenthesizedTermContext = define_class_under<ParenthesizedTermContextProxy, ContextProxy>(rb_mFHIRPathParser, "ParenthesizedTermContext")
|
|
3096
|
+
.define_method("expression", &ParenthesizedTermContextProxy::expression);
|
|
3097
|
+
|
|
3098
|
+
rb_cInvocationTermContext = define_class_under<InvocationTermContextProxy, ContextProxy>(rb_mFHIRPathParser, "InvocationTermContext")
|
|
3099
|
+
.define_method("invocation", &InvocationTermContextProxy::invocation);
|
|
3100
|
+
|
|
3101
|
+
rb_cTimeLiteralContext = define_class_under<TimeLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "TimeLiteralContext")
|
|
3102
|
+
.define_method("TIME", &TimeLiteralContextProxy::TIME);
|
|
3103
|
+
|
|
3104
|
+
rb_cNullLiteralContext = define_class_under<NullLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "NullLiteralContext");
|
|
3105
|
+
|
|
3106
|
+
rb_cDateTimeLiteralContext = define_class_under<DateTimeLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "DateTimeLiteralContext")
|
|
3107
|
+
.define_method("DATETIME", &DateTimeLiteralContextProxy::DATETIME);
|
|
3108
|
+
|
|
3109
|
+
rb_cStringLiteralContext = define_class_under<StringLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "StringLiteralContext")
|
|
3110
|
+
.define_method("STRING", &StringLiteralContextProxy::STRING);
|
|
3111
|
+
|
|
3112
|
+
rb_cBooleanLiteralContext = define_class_under<BooleanLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "BooleanLiteralContext");
|
|
3113
|
+
|
|
3114
|
+
rb_cNumberLiteralContext = define_class_under<NumberLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "NumberLiteralContext")
|
|
3115
|
+
.define_method("NUMBER", &NumberLiteralContextProxy::NUMBER);
|
|
3116
|
+
|
|
3117
|
+
rb_cQuantityContext = define_class_under<QuantityContextProxy, ContextProxy>(rb_mFHIRPathParser, "QuantityContext")
|
|
3118
|
+
.define_method("unit", &QuantityContextProxy::unit)
|
|
3119
|
+
.define_method("NUMBER", &QuantityContextProxy::NUMBER);
|
|
3120
|
+
|
|
3121
|
+
rb_cQuantityLiteralContext = define_class_under<QuantityLiteralContextProxy, ContextProxy>(rb_mFHIRPathParser, "QuantityLiteralContext")
|
|
3122
|
+
.define_method("quantity", &QuantityLiteralContextProxy::quantity);
|
|
3123
|
+
|
|
3124
|
+
rb_cIdentifierContext = define_class_under<IdentifierContextProxy, ContextProxy>(rb_mFHIRPathParser, "IdentifierContext")
|
|
3125
|
+
.define_method("IDENTIFIER", &IdentifierContextProxy::IDENTIFIER)
|
|
3126
|
+
.define_method("DELIMITEDIDENTIFIER", &IdentifierContextProxy::DELIMITEDIDENTIFIER);
|
|
3127
|
+
|
|
3128
|
+
rb_cTotalInvocationContext = define_class_under<TotalInvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "TotalInvocationContext");
|
|
3129
|
+
|
|
3130
|
+
rb_cThisInvocationContext = define_class_under<ThisInvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "ThisInvocationContext");
|
|
3131
|
+
|
|
3132
|
+
rb_cIndexInvocationContext = define_class_under<IndexInvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "IndexInvocationContext");
|
|
3133
|
+
|
|
3134
|
+
rb_cFunctnContext = define_class_under<FunctnContextProxy, ContextProxy>(rb_mFHIRPathParser, "FunctnContext")
|
|
3135
|
+
.define_method("identifier", &FunctnContextProxy::identifier)
|
|
3136
|
+
.define_method("param_list", &FunctnContextProxy::paramList);
|
|
3137
|
+
|
|
3138
|
+
rb_cFunctionInvocationContext = define_class_under<FunctionInvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "FunctionInvocationContext")
|
|
3139
|
+
.define_method("functn", &FunctionInvocationContextProxy::functn);
|
|
3140
|
+
|
|
3141
|
+
rb_cMemberInvocationContext = define_class_under<MemberInvocationContextProxy, ContextProxy>(rb_mFHIRPathParser, "MemberInvocationContext")
|
|
3142
|
+
.define_method("identifier", &MemberInvocationContextProxy::identifier);
|
|
3143
|
+
|
|
3144
|
+
rb_cParamListContext = define_class_under<ParamListContextProxy, ContextProxy>(rb_mFHIRPathParser, "ParamListContext")
|
|
3145
|
+
.define_method("expression", &ParamListContextProxy::expression)
|
|
3146
|
+
.define_method("expression_at", &ParamListContextProxy::expressionAt);
|
|
3147
|
+
|
|
3148
|
+
rb_cUnitContext = define_class_under<UnitContextProxy, ContextProxy>(rb_mFHIRPathParser, "UnitContext")
|
|
3149
|
+
.define_method("date_time_precision", &UnitContextProxy::dateTimePrecision)
|
|
3150
|
+
.define_method("plural_date_time_precision", &UnitContextProxy::pluralDateTimePrecision)
|
|
3151
|
+
.define_method("STRING", &UnitContextProxy::STRING);
|
|
3152
|
+
|
|
3153
|
+
rb_cDateTimePrecisionContext = define_class_under<DateTimePrecisionContextProxy, ContextProxy>(rb_mFHIRPathParser, "DateTimePrecisionContext");
|
|
3154
|
+
|
|
3155
|
+
rb_cPluralDateTimePrecisionContext = define_class_under<PluralDateTimePrecisionContextProxy, ContextProxy>(rb_mFHIRPathParser, "PluralDateTimePrecisionContext");
|
|
3156
|
+
|
|
3157
|
+
rb_cQualifiedIdentifierContext = define_class_under<QualifiedIdentifierContextProxy, ContextProxy>(rb_mFHIRPathParser, "QualifiedIdentifierContext")
|
|
3158
|
+
.define_method("identifier", &QualifiedIdentifierContextProxy::identifier)
|
|
3159
|
+
.define_method("identifier_at", &QualifiedIdentifierContextProxy::identifierAt);
|
|
3160
|
+
}
|
|
3161
|
+
|