expressir 1.4.2 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/codeql.yml +2 -14
- data/.github/workflows/rake.yml +6 -364
- data/.github/workflows/release.yml +15 -178
- data/.github/workflows/stress.yml +1 -18
- data/.rubocop.yml +1 -0
- data/.rubocop_todo.yml +7 -0
- data/Gemfile +13 -0
- data/README.adoc +6 -19
- data/Rakefile +6 -7
- data/expressir.gemspec +23 -32
- data/expressir_wrapped.txt +23068 -0
- data/lib/expressir/cli.rb +3 -2
- data/lib/expressir/express/formatter.rb +661 -661
- data/lib/expressir/express/parser.rb +299 -33
- data/lib/expressir/express/visitor.rb +238 -133
- data/lib/expressir/model/declarations/interface_item.rb +1 -1
- data/lib/expressir/version.rb +1 -1
- metadata +15 -573
- data/.cross_rubies +0 -28
- data/.gitmodules +0 -6
- data/.yardopts +0 -11
- data/exe/generate-parser +0 -51
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/CMakeLists.txt +0 -191
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj +0 -652
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters +0 -948
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2022.vcxproj +0 -652
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2022.vcxproj.filters +0 -948
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/Info.plist +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/antlrcpp_ios.h +0 -17
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj +0 -3040
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_ios.xcscheme +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_static.xcscheme +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.noarch.nuspec +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.noarch.targets +0 -8
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.nuspec +0 -30
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.props +0 -21
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.targets +0 -44
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.static.nuspec +0 -29
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.static.targets +0 -44
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/antlr4.jpg +0 -0
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/pack.cmd +0 -93
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +0 -10
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +0 -167
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +0 -10
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +0 -121
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +0 -30
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +0 -180
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +0 -79
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +0 -61
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +0 -59
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +0 -414
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +0 -200
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +0 -11
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +0 -37
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +0 -193
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +0 -158
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +0 -39
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +0 -74
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +0 -78
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +0 -79
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +0 -15
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +0 -35
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +0 -336
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +0 -466
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +0 -84
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +0 -80
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +0 -64
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +0 -99
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +0 -52
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +0 -32
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FlatHashMap.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FlatHashSet.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +0 -18
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +0 -12
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +0 -218
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +0 -19
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +0 -45
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +0 -294
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +0 -196
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +0 -60
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +0 -46
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +0 -31
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +0 -92
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +0 -88
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +0 -46
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +0 -42
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +0 -670
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +0 -461
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +0 -294
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +0 -173
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +0 -138
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +0 -147
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +0 -53
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +0 -38
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +0 -65
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +0 -98
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +0 -157
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +0 -160
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +0 -144
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +0 -141
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +0 -32
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +0 -54
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +0 -155
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +0 -92
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +0 -30
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +0 -85
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +0 -11
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +0 -137
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +0 -425
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +0 -295
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +0 -208
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +0 -117
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +0 -270
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +0 -115
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +0 -42
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +0 -64
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +0 -177
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +0 -101
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +0 -168
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +0 -159
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +0 -133
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +0 -106
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +0 -157
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +0 -233
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +0 -157
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +0 -39
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +0 -48
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +0 -628
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +0 -32
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +0 -71
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +0 -56
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +0 -139
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +0 -20
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +0 -29
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +0 -35
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +0 -16
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +0 -68
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +0 -129
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +0 -51
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +0 -30
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +0 -14
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +0 -47
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +0 -14
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +0 -70
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +0 -227
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +0 -12
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +0 -34
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +0 -31
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +0 -42
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +0 -15
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/HashUtils.h +0 -18
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +0 -189
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +0 -67
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +0 -44
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +0 -621
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +0 -199
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +0 -15
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +0 -100
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +0 -108
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +0 -128
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +0 -59
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +0 -45
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +0 -75
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +0 -50
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +0 -53
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +0 -53
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +0 -51
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +0 -51
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +0 -16
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +0 -42
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +0 -22
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +0 -16
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +0 -102
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +0 -102
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +0 -1413
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +0 -911
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +0 -50
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +0 -29
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +0 -35
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +0 -17
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +0 -62
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +0 -50
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +0 -601
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +0 -225
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +0 -56
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +0 -63
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +0 -167
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +0 -101
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +0 -71
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +0 -21
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +0 -202
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +0 -436
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +0 -179
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +0 -60
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +0 -31
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +0 -42
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +0 -418
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +0 -237
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +0 -101
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +0 -28
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +0 -38
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +0 -79
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +0 -37
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +0 -19
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +0 -65
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +0 -21
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +0 -115
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +0 -96
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +0 -60
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +0 -32
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +0 -59
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +0 -154
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +0 -17
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +0 -22
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/internal/Synchronization.cpp +0 -100
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/internal/Synchronization.h +0 -154
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +0 -124
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +0 -61
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +0 -84
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +0 -508
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +0 -190
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +0 -120
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +0 -102
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +0 -4
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +0 -21
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +0 -8
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +0 -16
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +0 -149
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +0 -76
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +0 -207
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +0 -65
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +0 -34
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +0 -161
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +0 -38
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +0 -16
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +0 -28
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +0 -242
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +0 -54
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +0 -129
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +0 -54
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +0 -43
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +0 -66
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +0 -53
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +0 -12
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +0 -111
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +0 -39
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +0 -50
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +0 -22
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +0 -57
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +0 -48
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +0 -55
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +0 -40
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +0 -54
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +0 -32
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +0 -241
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +0 -78
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +0 -9
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +0 -44
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +0 -69
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +0 -132
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +0 -64
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +0 -105
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +0 -370
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +0 -185
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +0 -77
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +0 -117
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +0 -39
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +0 -86
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +0 -28
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +0 -51
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +0 -36
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +0 -80
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +0 -154
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +0 -86
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +0 -31
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +0 -40
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +0 -180
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.g4 +0 -64
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +0 -53
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.tokens +0 -12
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +0 -13
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +0 -22
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +0 -20
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +0 -27
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +0 -30
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +0 -20
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +0 -25
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +0 -33
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +0 -26
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +0 -24
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +0 -23
- data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/tests/Utf8Test.cpp +0 -110
- data/ext/express_parser/antlrgen/Express.interp +0 -532
- data/ext/express_parser/antlrgen/Express.tokens +0 -190
- data/ext/express_parser/antlrgen/ExpressBaseListener.cpp +0 -7
- data/ext/express_parser/antlrgen/ExpressBaseListener.h +0 -623
- data/ext/express_parser/antlrgen/ExpressBaseVisitor.cpp +0 -7
- data/ext/express_parser/antlrgen/ExpressBaseVisitor.h +0 -816
- data/ext/express_parser/antlrgen/ExpressLexer.cpp +0 -685
- data/ext/express_parser/antlrgen/ExpressLexer.h +0 -78
- data/ext/express_parser/antlrgen/ExpressLexer.interp +0 -534
- data/ext/express_parser/antlrgen/ExpressLexer.tokens +0 -190
- data/ext/express_parser/antlrgen/ExpressListener.cpp +0 -7
- data/ext/express_parser/antlrgen/ExpressListener.h +0 -616
- data/ext/express_parser/antlrgen/ExpressParser.cpp +0 -17591
- data/ext/express_parser/antlrgen/ExpressParser.h +0 -3692
- data/ext/express_parser/antlrgen/ExpressVisitor.cpp +0 -7
- data/ext/express_parser/antlrgen/ExpressVisitor.h +0 -422
- data/ext/express_parser/express_parser.cpp +0 -19405
- data/ext/express_parser/extconf.rb +0 -63
- data/rakelib/antlr4-native.rake +0 -173
- data/rakelib/cross-ruby.rake +0 -403
- data/spec/acceptance/version_spec.rb +0 -30
- data/spec/expressir/express/cache_spec.rb +0 -89
- data/spec/expressir/express/formatter_spec.rb +0 -171
- data/spec/expressir/express/parser_spec.rb +0 -141
- data/spec/expressir/model/model_element_spec.rb +0 -343
- data/spec/spec_helper.rb +0 -24
- data/spec/support/console_helper.rb +0 -29
- data/spec/syntax/multiple.exp +0 -23
- data/spec/syntax/multiple.yaml +0 -198
- data/spec/syntax/multiple_formatted.exp +0 -71
- data/spec/syntax/multiple_hyperlink_formatted.exp +0 -71
- data/spec/syntax/multiple_schema_head_hyperlink_formatted.exp +0 -13
- data/spec/syntax/remark.exp +0 -193
- data/spec/syntax/remark.yaml +0 -471
- data/spec/syntax/remark_formatted.exp +0 -228
- data/spec/syntax/single.exp +0 -4
- data/spec/syntax/single.yaml +0 -18
- data/spec/syntax/single_formatted.exp +0 -10
- data/spec/syntax/single_formatted.yaml +0 -36
- data/spec/syntax/syntax.exp +0 -333
- data/spec/syntax/syntax.yaml +0 -3509
- data/spec/syntax/syntax_formatted.exp +0 -902
- data/spec/syntax/syntax_hyperlink_formatted.exp +0 -902
- data/spec/syntax/syntax_schema_head_formatted.exp +0 -18
@@ -1,86 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "antlr4-common.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
namespace xpath {
|
13
|
-
|
14
|
-
/// Represent a subset of XPath XML path syntax for use in identifying nodes in
|
15
|
-
/// parse trees.
|
16
|
-
///
|
17
|
-
/// <para>
|
18
|
-
/// Split path into words and separators {@code /} and {@code //} via ANTLR
|
19
|
-
/// itself then walk path elements from left to right. At each separator-word
|
20
|
-
/// pair, find set of nodes. Next stage uses those as work list.</para>
|
21
|
-
///
|
22
|
-
/// <para>
|
23
|
-
/// The basic interface is
|
24
|
-
/// <seealso cref="XPath#findAll ParseTree.findAll"/>{@code (tree, pathString, parser)}.
|
25
|
-
/// But that is just shorthand for:</para>
|
26
|
-
///
|
27
|
-
/// <pre>
|
28
|
-
/// <seealso cref="XPath"/> p = new <seealso cref="XPath#XPath XPath"/>(parser, pathString);
|
29
|
-
/// return p.<seealso cref="#evaluate evaluate"/>(tree);
|
30
|
-
/// </pre>
|
31
|
-
///
|
32
|
-
/// <para>
|
33
|
-
/// See {@code org.antlr.v4.test.TestXPath} for descriptions. In short, this
|
34
|
-
/// allows operators:</para>
|
35
|
-
///
|
36
|
-
/// <dl>
|
37
|
-
/// <dt>/</dt> <dd>root</dd>
|
38
|
-
/// <dt>//</dt> <dd>anywhere</dd>
|
39
|
-
/// <dt>!</dt> <dd>invert; this must appear directly after root or anywhere
|
40
|
-
/// operator</dd>
|
41
|
-
/// </dl>
|
42
|
-
///
|
43
|
-
/// <para>
|
44
|
-
/// and path elements:</para>
|
45
|
-
///
|
46
|
-
/// <dl>
|
47
|
-
/// <dt>ID</dt> <dd>token name</dd>
|
48
|
-
/// <dt>'string'</dt> <dd>any string literal token from the grammar</dd>
|
49
|
-
/// <dt>expr</dt> <dd>rule name</dd>
|
50
|
-
/// <dt>*</dt> <dd>wildcard matching any node</dd>
|
51
|
-
/// </dl>
|
52
|
-
///
|
53
|
-
/// <para>
|
54
|
-
/// Whitespace is not allowed.</para>
|
55
|
-
|
56
|
-
class ANTLR4CPP_PUBLIC XPath {
|
57
|
-
public:
|
58
|
-
static const std::string WILDCARD; // word not operator/separator
|
59
|
-
static const std::string NOT; // word for invert operator
|
60
|
-
|
61
|
-
XPath(Parser *parser, const std::string &path);
|
62
|
-
virtual ~XPath() {}
|
63
|
-
|
64
|
-
// TODO: check for invalid token/rule names, bad syntax
|
65
|
-
virtual std::vector<std::unique_ptr<XPathElement>> split(const std::string &path);
|
66
|
-
|
67
|
-
static std::vector<ParseTree *> findAll(ParseTree *tree, std::string const& xpath, Parser *parser);
|
68
|
-
|
69
|
-
/// Return a list of all nodes starting at {@code t} as root that satisfy the
|
70
|
-
/// path. The root {@code /} is relative to the node passed to
|
71
|
-
/// <seealso cref="#evaluate"/>.
|
72
|
-
virtual std::vector<ParseTree *> evaluate(ParseTree *t);
|
73
|
-
|
74
|
-
protected:
|
75
|
-
std::string _path;
|
76
|
-
Parser *_parser;
|
77
|
-
|
78
|
-
/// Convert word like {@code *} or {@code ID} or {@code expr} to a path
|
79
|
-
/// element. {@code anywhere} is {@code true} if {@code //} precedes the
|
80
|
-
/// word.
|
81
|
-
virtual std::unique_ptr<XPathElement> getXPathElement(Token *wordToken, bool anywhere);
|
82
|
-
};
|
83
|
-
|
84
|
-
} // namespace xpath
|
85
|
-
} // namespace tree
|
86
|
-
} // namespace antlr4
|
@@ -1,31 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "support/CPPUtils.h"
|
7
|
-
|
8
|
-
#include "XPathElement.h"
|
9
|
-
|
10
|
-
using namespace antlr4::tree;
|
11
|
-
using namespace antlr4::tree::xpath;
|
12
|
-
|
13
|
-
XPathElement::XPathElement(const std::string &nodeName) {
|
14
|
-
_nodeName = nodeName;
|
15
|
-
}
|
16
|
-
|
17
|
-
XPathElement::~XPathElement() {
|
18
|
-
}
|
19
|
-
|
20
|
-
std::vector<ParseTree *> XPathElement::evaluate(ParseTree * /*t*/) {
|
21
|
-
return {};
|
22
|
-
}
|
23
|
-
|
24
|
-
std::string XPathElement::toString() const {
|
25
|
-
std::string inv = _invert ? "!" : "";
|
26
|
-
return antlrcpp::toString(*this) + "[" + inv + _nodeName + "]";
|
27
|
-
}
|
28
|
-
|
29
|
-
void XPathElement::setInvert(bool value) {
|
30
|
-
_invert = value;
|
31
|
-
}
|
@@ -1,40 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "antlr4-common.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
class ParseTree;
|
13
|
-
|
14
|
-
namespace xpath {
|
15
|
-
|
16
|
-
class ANTLR4CPP_PUBLIC XPathElement {
|
17
|
-
public:
|
18
|
-
/// Construct element like {@code /ID} or {@code ID} or {@code /*} etc...
|
19
|
-
/// op is null if just node
|
20
|
-
XPathElement(const std::string &nodeName);
|
21
|
-
XPathElement(XPathElement const&) = default;
|
22
|
-
virtual ~XPathElement();
|
23
|
-
|
24
|
-
XPathElement& operator=(XPathElement const&) = default;
|
25
|
-
|
26
|
-
/// Given tree rooted at {@code t} return all nodes matched by this path
|
27
|
-
/// element.
|
28
|
-
virtual std::vector<ParseTree *> evaluate(ParseTree *t);
|
29
|
-
virtual std::string toString() const;
|
30
|
-
|
31
|
-
void setInvert(bool value);
|
32
|
-
|
33
|
-
protected:
|
34
|
-
std::string _nodeName;
|
35
|
-
bool _invert = false;
|
36
|
-
};
|
37
|
-
|
38
|
-
} // namespace xpath
|
39
|
-
} // namespace tree
|
40
|
-
} // namespace antlr4
|
@@ -1,180 +0,0 @@
|
|
1
|
-
|
2
|
-
// Generated from XPathLexer.g4 by ANTLR 4.13.0
|
3
|
-
|
4
|
-
|
5
|
-
#include "XPathLexer.h"
|
6
|
-
|
7
|
-
|
8
|
-
using namespace antlr4;
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
using namespace antlr4;
|
13
|
-
|
14
|
-
namespace {
|
15
|
-
|
16
|
-
struct XPathLexerStaticData final {
|
17
|
-
XPathLexerStaticData(std::vector<std::string> ruleNames,
|
18
|
-
std::vector<std::string> channelNames,
|
19
|
-
std::vector<std::string> modeNames,
|
20
|
-
std::vector<std::string> literalNames,
|
21
|
-
std::vector<std::string> symbolicNames)
|
22
|
-
: ruleNames(std::move(ruleNames)), channelNames(std::move(channelNames)),
|
23
|
-
modeNames(std::move(modeNames)), literalNames(std::move(literalNames)),
|
24
|
-
symbolicNames(std::move(symbolicNames)),
|
25
|
-
vocabulary(this->literalNames, this->symbolicNames) {}
|
26
|
-
|
27
|
-
XPathLexerStaticData(const XPathLexerStaticData&) = delete;
|
28
|
-
XPathLexerStaticData(XPathLexerStaticData&&) = delete;
|
29
|
-
XPathLexerStaticData& operator=(const XPathLexerStaticData&) = delete;
|
30
|
-
XPathLexerStaticData& operator=(XPathLexerStaticData&&) = delete;
|
31
|
-
|
32
|
-
std::vector<antlr4::dfa::DFA> decisionToDFA;
|
33
|
-
antlr4::atn::PredictionContextCache sharedContextCache;
|
34
|
-
const std::vector<std::string> ruleNames;
|
35
|
-
const std::vector<std::string> channelNames;
|
36
|
-
const std::vector<std::string> modeNames;
|
37
|
-
const std::vector<std::string> literalNames;
|
38
|
-
const std::vector<std::string> symbolicNames;
|
39
|
-
const antlr4::dfa::Vocabulary vocabulary;
|
40
|
-
antlr4::atn::SerializedATNView serializedATN;
|
41
|
-
std::unique_ptr<antlr4::atn::ATN> atn;
|
42
|
-
};
|
43
|
-
|
44
|
-
::antlr4::internal::OnceFlag xpathlexerLexerOnceFlag;
|
45
|
-
#if ANTLR4_USE_THREAD_LOCAL_CACHE
|
46
|
-
static thread_local
|
47
|
-
#endif
|
48
|
-
XPathLexerStaticData *xpathlexerLexerStaticData = nullptr;
|
49
|
-
|
50
|
-
void xpathlexerLexerInitialize() {
|
51
|
-
#if ANTLR4_USE_THREAD_LOCAL_CACHE
|
52
|
-
if (xpathlexerLexerStaticData != nullptr) {
|
53
|
-
return;
|
54
|
-
}
|
55
|
-
#else
|
56
|
-
assert(xpathlexerLexerStaticData == nullptr);
|
57
|
-
#endif
|
58
|
-
auto staticData = std::make_unique<XPathLexerStaticData>(
|
59
|
-
std::vector<std::string>{
|
60
|
-
"ANYWHERE", "ROOT", "WILDCARD", "BANG", "ID", "NameChar", "NameStartChar",
|
61
|
-
"STRING"
|
62
|
-
},
|
63
|
-
std::vector<std::string>{
|
64
|
-
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
65
|
-
},
|
66
|
-
std::vector<std::string>{
|
67
|
-
"DEFAULT_MODE"
|
68
|
-
},
|
69
|
-
std::vector<std::string>{
|
70
|
-
"", "", "", "'//'", "'/'", "'*'", "'!'"
|
71
|
-
},
|
72
|
-
std::vector<std::string>{
|
73
|
-
"", "TOKEN_REF", "RULE_REF", "ANYWHERE", "ROOT", "WILDCARD", "BANG",
|
74
|
-
"ID", "STRING"
|
75
|
-
}
|
76
|
-
);
|
77
|
-
static const int32_t serializedATNSegment[] = {
|
78
|
-
4,0,8,50,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,
|
79
|
-
2,7,7,7,1,0,1,0,1,0,1,1,1,1,1,2,1,2,1,3,1,3,1,4,1,4,5,4,29,8,4,10,4,12,
|
80
|
-
4,32,9,4,1,4,1,4,1,5,1,5,3,5,38,8,5,1,6,1,6,1,7,1,7,5,7,44,8,7,10,7,12,
|
81
|
-
7,47,9,7,1,7,1,7,1,45,0,8,1,3,3,4,5,5,7,6,9,7,11,0,13,0,15,8,1,0,2,5,
|
82
|
-
0,48,57,95,95,183,183,768,879,8255,8256,13,0,65,90,97,122,192,214,216,
|
83
|
-
246,248,767,880,893,895,8191,8204,8205,8304,8591,11264,12271,12289,55295,
|
84
|
-
63744,64975,65008,65535,50,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,
|
85
|
-
0,0,0,0,9,1,0,0,0,0,15,1,0,0,0,1,17,1,0,0,0,3,20,1,0,0,0,5,22,1,0,0,0,
|
86
|
-
7,24,1,0,0,0,9,26,1,0,0,0,11,37,1,0,0,0,13,39,1,0,0,0,15,41,1,0,0,0,17,
|
87
|
-
18,5,47,0,0,18,19,5,47,0,0,19,2,1,0,0,0,20,21,5,47,0,0,21,4,1,0,0,0,22,
|
88
|
-
23,5,42,0,0,23,6,1,0,0,0,24,25,5,33,0,0,25,8,1,0,0,0,26,30,3,13,6,0,27,
|
89
|
-
29,3,11,5,0,28,27,1,0,0,0,29,32,1,0,0,0,30,28,1,0,0,0,30,31,1,0,0,0,31,
|
90
|
-
33,1,0,0,0,32,30,1,0,0,0,33,34,6,4,0,0,34,10,1,0,0,0,35,38,3,13,6,0,36,
|
91
|
-
38,7,0,0,0,37,35,1,0,0,0,37,36,1,0,0,0,38,12,1,0,0,0,39,40,7,1,0,0,40,
|
92
|
-
14,1,0,0,0,41,45,5,39,0,0,42,44,9,0,0,0,43,42,1,0,0,0,44,47,1,0,0,0,45,
|
93
|
-
46,1,0,0,0,45,43,1,0,0,0,46,48,1,0,0,0,47,45,1,0,0,0,48,49,5,39,0,0,49,
|
94
|
-
16,1,0,0,0,4,0,30,37,45,1,1,4,0
|
95
|
-
};
|
96
|
-
staticData->serializedATN = antlr4::atn::SerializedATNView(serializedATNSegment, sizeof(serializedATNSegment) / sizeof(serializedATNSegment[0]));
|
97
|
-
|
98
|
-
antlr4::atn::ATNDeserializer deserializer;
|
99
|
-
staticData->atn = deserializer.deserialize(staticData->serializedATN);
|
100
|
-
|
101
|
-
const size_t count = staticData->atn->getNumberOfDecisions();
|
102
|
-
staticData->decisionToDFA.reserve(count);
|
103
|
-
for (size_t i = 0; i < count; i++) {
|
104
|
-
staticData->decisionToDFA.emplace_back(staticData->atn->getDecisionState(i), i);
|
105
|
-
}
|
106
|
-
xpathlexerLexerStaticData = staticData.release();
|
107
|
-
}
|
108
|
-
|
109
|
-
}
|
110
|
-
|
111
|
-
XPathLexer::XPathLexer(CharStream *input) : Lexer(input) {
|
112
|
-
XPathLexer::initialize();
|
113
|
-
_interpreter = new atn::LexerATNSimulator(this, *xpathlexerLexerStaticData->atn, xpathlexerLexerStaticData->decisionToDFA, xpathlexerLexerStaticData->sharedContextCache);
|
114
|
-
}
|
115
|
-
|
116
|
-
XPathLexer::~XPathLexer() {
|
117
|
-
delete _interpreter;
|
118
|
-
}
|
119
|
-
|
120
|
-
std::string XPathLexer::getGrammarFileName() const {
|
121
|
-
return "XPathLexer.g4";
|
122
|
-
}
|
123
|
-
|
124
|
-
const std::vector<std::string>& XPathLexer::getRuleNames() const {
|
125
|
-
return xpathlexerLexerStaticData->ruleNames;
|
126
|
-
}
|
127
|
-
|
128
|
-
const std::vector<std::string>& XPathLexer::getChannelNames() const {
|
129
|
-
return xpathlexerLexerStaticData->channelNames;
|
130
|
-
}
|
131
|
-
|
132
|
-
const std::vector<std::string>& XPathLexer::getModeNames() const {
|
133
|
-
return xpathlexerLexerStaticData->modeNames;
|
134
|
-
}
|
135
|
-
|
136
|
-
const dfa::Vocabulary& XPathLexer::getVocabulary() const {
|
137
|
-
return xpathlexerLexerStaticData->vocabulary;
|
138
|
-
}
|
139
|
-
|
140
|
-
antlr4::atn::SerializedATNView XPathLexer::getSerializedATN() const {
|
141
|
-
return xpathlexerLexerStaticData->serializedATN;
|
142
|
-
}
|
143
|
-
|
144
|
-
const atn::ATN& XPathLexer::getATN() const {
|
145
|
-
return *xpathlexerLexerStaticData->atn;
|
146
|
-
}
|
147
|
-
|
148
|
-
|
149
|
-
void XPathLexer::action(RuleContext *context, size_t ruleIndex, size_t actionIndex) {
|
150
|
-
switch (ruleIndex) {
|
151
|
-
case 4: IDAction(antlrcpp::downCast<antlr4::RuleContext *>(context), actionIndex); break;
|
152
|
-
|
153
|
-
default:
|
154
|
-
break;
|
155
|
-
}
|
156
|
-
}
|
157
|
-
|
158
|
-
void XPathLexer::IDAction(antlr4::RuleContext *context, size_t actionIndex) {
|
159
|
-
switch (actionIndex) {
|
160
|
-
case 0:
|
161
|
-
if (isupper(getText()[0]))
|
162
|
-
setType(TOKEN_REF);
|
163
|
-
else
|
164
|
-
setType(RULE_REF);
|
165
|
-
break;
|
166
|
-
|
167
|
-
default:
|
168
|
-
break;
|
169
|
-
}
|
170
|
-
}
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
void XPathLexer::initialize() {
|
175
|
-
#if ANTLR4_USE_THREAD_LOCAL_CACHE
|
176
|
-
xpathlexerLexerInitialize();
|
177
|
-
#else
|
178
|
-
::antlr4::internal::call_once(xpathlexerLexerOnceFlag, xpathlexerLexerInitialize);
|
179
|
-
#endif
|
180
|
-
}
|
@@ -1,64 +0,0 @@
|
|
1
|
-
lexer grammar XPathLexer;
|
2
|
-
|
3
|
-
tokens { TOKEN_REF, RULE_REF }
|
4
|
-
|
5
|
-
/*
|
6
|
-
path : separator? word (separator word)* EOF ;
|
7
|
-
|
8
|
-
separator
|
9
|
-
: '/' '!'
|
10
|
-
| '//' '!'
|
11
|
-
| '/'
|
12
|
-
| '//'
|
13
|
-
;
|
14
|
-
|
15
|
-
word: TOKEN_REF
|
16
|
-
| RULE_REF
|
17
|
-
| STRING
|
18
|
-
| '*'
|
19
|
-
;
|
20
|
-
*/
|
21
|
-
|
22
|
-
ANYWHERE : '//' ;
|
23
|
-
ROOT : '/' ;
|
24
|
-
WILDCARD : '*' ;
|
25
|
-
BANG : '!' ;
|
26
|
-
|
27
|
-
ID : NameStartChar NameChar*
|
28
|
-
{
|
29
|
-
if (isupper(getText()[0]))
|
30
|
-
setType(TOKEN_REF);
|
31
|
-
else
|
32
|
-
setType(RULE_REF);
|
33
|
-
}
|
34
|
-
;
|
35
|
-
|
36
|
-
fragment
|
37
|
-
NameChar : NameStartChar
|
38
|
-
| '0'..'9'
|
39
|
-
| '_'
|
40
|
-
| '\u00B7'
|
41
|
-
| '\u0300'..'\u036F'
|
42
|
-
| '\u203F'..'\u2040'
|
43
|
-
;
|
44
|
-
|
45
|
-
fragment
|
46
|
-
NameStartChar
|
47
|
-
: 'A'..'Z' | 'a'..'z'
|
48
|
-
| '\u00C0'..'\u00D6'
|
49
|
-
| '\u00D8'..'\u00F6'
|
50
|
-
| '\u00F8'..'\u02FF'
|
51
|
-
| '\u0370'..'\u037D'
|
52
|
-
| '\u037F'..'\u1FFF'
|
53
|
-
| '\u200C'..'\u200D'
|
54
|
-
| '\u2070'..'\u218F'
|
55
|
-
| '\u2C00'..'\u2FEF'
|
56
|
-
| '\u3001'..'\uD7FF'
|
57
|
-
| '\uF900'..'\uFDCF'
|
58
|
-
| '\uFDF0'..'\uFFFF' // implicitly includes ['\u10000-'\uEFFFF]
|
59
|
-
;
|
60
|
-
|
61
|
-
STRING : '\'' .*? '\'';
|
62
|
-
|
63
|
-
//WS : [ \t\r\n]+ -> skip ;
|
64
|
-
|
@@ -1,53 +0,0 @@
|
|
1
|
-
|
2
|
-
// Generated from XPathLexer.g4 by ANTLR 4.13.0
|
3
|
-
|
4
|
-
#pragma once
|
5
|
-
|
6
|
-
|
7
|
-
#include "antlr4-runtime.h"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
class XPathLexer : public antlr4::Lexer {
|
13
|
-
public:
|
14
|
-
enum {
|
15
|
-
TOKEN_REF = 1, RULE_REF = 2, ANYWHERE = 3, ROOT = 4, WILDCARD = 5, BANG = 6,
|
16
|
-
ID = 7, STRING = 8
|
17
|
-
};
|
18
|
-
|
19
|
-
explicit XPathLexer(antlr4::CharStream *input);
|
20
|
-
|
21
|
-
~XPathLexer() override;
|
22
|
-
|
23
|
-
|
24
|
-
std::string getGrammarFileName() const override;
|
25
|
-
|
26
|
-
const std::vector<std::string>& getRuleNames() const override;
|
27
|
-
|
28
|
-
const std::vector<std::string>& getChannelNames() const override;
|
29
|
-
|
30
|
-
const std::vector<std::string>& getModeNames() const override;
|
31
|
-
|
32
|
-
const antlr4::dfa::Vocabulary& getVocabulary() const override;
|
33
|
-
|
34
|
-
antlr4::atn::SerializedATNView getSerializedATN() const override;
|
35
|
-
|
36
|
-
const antlr4::atn::ATN& getATN() const override;
|
37
|
-
|
38
|
-
void action(antlr4::RuleContext *context, size_t ruleIndex, size_t actionIndex) override;
|
39
|
-
|
40
|
-
// By default the static state used to implement the lexer is lazily initialized during the first
|
41
|
-
// call to the constructor. You can call this function if you wish to initialize the static state
|
42
|
-
// ahead of time.
|
43
|
-
static void initialize();
|
44
|
-
|
45
|
-
private:
|
46
|
-
|
47
|
-
// Individual action functions triggered by action() above.
|
48
|
-
void IDAction(antlr4::RuleContext *context, size_t actionIndex);
|
49
|
-
|
50
|
-
// Individual semantic predicate functions triggered by sempred() above.
|
51
|
-
|
52
|
-
};
|
53
|
-
|
@@ -1,13 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "XPathLexerErrorListener.h"
|
7
|
-
|
8
|
-
using namespace antlr4;
|
9
|
-
using namespace antlr4::tree::xpath;
|
10
|
-
|
11
|
-
void XPathLexerErrorListener::syntaxError(Recognizer * /*recognizer*/, Token * /*offendingSymbol*/,
|
12
|
-
size_t /*line*/, size_t /*charPositionInLine*/, const std::string &/*msg*/, std::exception_ptr /*e*/) {
|
13
|
-
}
|
data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "BaseErrorListener.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
namespace xpath {
|
13
|
-
|
14
|
-
class ANTLR4CPP_PUBLIC XPathLexerErrorListener : public BaseErrorListener {
|
15
|
-
public:
|
16
|
-
virtual void syntaxError(Recognizer *recognizer, Token *offendingSymbol, size_t line,
|
17
|
-
size_t charPositionInLine, const std::string &msg, std::exception_ptr e) override;
|
18
|
-
};
|
19
|
-
|
20
|
-
} // namespace xpath
|
21
|
-
} // namespace tree
|
22
|
-
} // namespace antlr4
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "tree/ParseTree.h"
|
7
|
-
#include "tree/Trees.h"
|
8
|
-
|
9
|
-
#include "tree/xpath/XPathRuleAnywhereElement.h"
|
10
|
-
|
11
|
-
using namespace antlr4::tree;
|
12
|
-
using namespace antlr4::tree::xpath;
|
13
|
-
|
14
|
-
XPathRuleAnywhereElement::XPathRuleAnywhereElement(const std::string &ruleName, int ruleIndex) : XPathElement(ruleName) {
|
15
|
-
_ruleIndex = ruleIndex;
|
16
|
-
}
|
17
|
-
|
18
|
-
std::vector<ParseTree *> XPathRuleAnywhereElement::evaluate(ParseTree *t) {
|
19
|
-
return Trees::findAllRuleNodes(t, _ruleIndex);
|
20
|
-
}
|
@@ -1,27 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "XPathElement.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
namespace xpath {
|
13
|
-
|
14
|
-
/// Either {@code ID} at start of path or {@code ...//ID} in middle of path.
|
15
|
-
class ANTLR4CPP_PUBLIC XPathRuleAnywhereElement : public XPathElement {
|
16
|
-
public:
|
17
|
-
XPathRuleAnywhereElement(const std::string &ruleName, int ruleIndex);
|
18
|
-
|
19
|
-
virtual std::vector<ParseTree *> evaluate(ParseTree *t) override;
|
20
|
-
|
21
|
-
protected:
|
22
|
-
int _ruleIndex = 0;
|
23
|
-
};
|
24
|
-
|
25
|
-
} // namespace xpath
|
26
|
-
} // namespace tree
|
27
|
-
} // namespace antlr4
|
data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "tree/ParseTree.h"
|
7
|
-
#include "tree/Trees.h"
|
8
|
-
|
9
|
-
#include "XPathRuleElement.h"
|
10
|
-
|
11
|
-
using namespace antlr4::tree;
|
12
|
-
using namespace antlr4::tree::xpath;
|
13
|
-
|
14
|
-
XPathRuleElement::XPathRuleElement(const std::string &ruleName, size_t ruleIndex) : XPathElement(ruleName) {
|
15
|
-
_ruleIndex = ruleIndex;
|
16
|
-
}
|
17
|
-
|
18
|
-
std::vector<ParseTree *> XPathRuleElement::evaluate(ParseTree *t) {
|
19
|
-
// return all children of t that match nodeName
|
20
|
-
std::vector<ParseTree *> nodes;
|
21
|
-
for (auto *c : t->children) {
|
22
|
-
if (antlrcpp::is<ParserRuleContext *>(c)) {
|
23
|
-
ParserRuleContext *ctx = dynamic_cast<ParserRuleContext *>(c);
|
24
|
-
if ((ctx->getRuleIndex() == _ruleIndex && !_invert) || (ctx->getRuleIndex() != _ruleIndex && _invert)) {
|
25
|
-
nodes.push_back(ctx);
|
26
|
-
}
|
27
|
-
}
|
28
|
-
}
|
29
|
-
return nodes;
|
30
|
-
}
|
data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "XPathElement.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
namespace xpath {
|
13
|
-
|
14
|
-
class ANTLR4CPP_PUBLIC XPathRuleElement : public XPathElement {
|
15
|
-
public:
|
16
|
-
XPathRuleElement(const std::string &ruleName, size_t ruleIndex);
|
17
|
-
|
18
|
-
virtual std::vector<ParseTree *> evaluate(ParseTree *t) override;
|
19
|
-
|
20
|
-
protected:
|
21
|
-
size_t _ruleIndex = 0;
|
22
|
-
};
|
23
|
-
|
24
|
-
} // namespace xpath
|
25
|
-
} // namespace tree
|
26
|
-
} // namespace antlr4
|
@@ -1,20 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "tree/ParseTree.h"
|
7
|
-
#include "tree/Trees.h"
|
8
|
-
|
9
|
-
#include "XPathTokenAnywhereElement.h"
|
10
|
-
|
11
|
-
using namespace antlr4::tree;
|
12
|
-
using namespace antlr4::tree::xpath;
|
13
|
-
|
14
|
-
XPathTokenAnywhereElement::XPathTokenAnywhereElement(const std::string &tokenName, int tokenType) : XPathElement(tokenName) {
|
15
|
-
this->tokenType = tokenType;
|
16
|
-
}
|
17
|
-
|
18
|
-
std::vector<ParseTree *> XPathTokenAnywhereElement::evaluate(ParseTree *t) {
|
19
|
-
return Trees::findAllTokenNodes(t, tokenType);
|
20
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "XPathElement.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace tree {
|
12
|
-
namespace xpath {
|
13
|
-
|
14
|
-
class ANTLR4CPP_PUBLIC XPathTokenAnywhereElement : public XPathElement {
|
15
|
-
protected:
|
16
|
-
int tokenType = 0;
|
17
|
-
public:
|
18
|
-
XPathTokenAnywhereElement(const std::string &tokenName, int tokenType);
|
19
|
-
|
20
|
-
virtual std::vector<ParseTree *> evaluate(ParseTree *t) override;
|
21
|
-
};
|
22
|
-
|
23
|
-
} // namespace xpath
|
24
|
-
} // namespace tree
|
25
|
-
} // namespace antlr4
|