expressir 0.2.4-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/rake.yml +46 -0
- data/.github/workflows/release.yml +75 -0
- data/.gitignore +15 -0
- data/.gitmodules +3 -0
- data/.rspec +2 -0
- data/.rubocop.yml +508 -0
- data/Gemfile +6 -0
- data/README.adoc +147 -0
- data/Rakefile +17 -0
- data/bin/console +12 -0
- data/bin/rspec +29 -0
- data/bin/setup +8 -0
- data/demo.rb +18 -0
- data/docs/development.md +90 -0
- data/exe/expressir +20 -0
- data/exe/generate-parser +48 -0
- data/expressir.gemspec +40 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/CMakeLists.txt +118 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj +637 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj.filters +984 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj +652 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj.filters +990 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj +652 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj.filters +990 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj +652 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters +990 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/Info.plist +26 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/antlrcpp_ios.h +17 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj +3024 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme +76 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_ios.xcscheme +80 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_static.xcscheme +80 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +34 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +155 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +69 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +37 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +195 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +158 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +333 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +99 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +51 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +218 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +295 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +196 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +75 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +52 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +648 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +467 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +306 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +179 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +141 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +66 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +167 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +164 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +143 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +137 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +53 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +92 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +85 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +137 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +425 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +293 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +211 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +123 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +104 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +193 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +137 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +167 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +209 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +112 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +113 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +148 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +228 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +110 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +64 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +50 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +758 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +85 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.cpp +621 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.h +61 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +63 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +87 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +72 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +133 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.cpp +14 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.h +24 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +82 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +43 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +31 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +22 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.cpp +15 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +24 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +17 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.cpp +35 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.h +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +35 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +158 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +109 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +84 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +628 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +210 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +66 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +107 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +115 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +55 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +55 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +63 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +62 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +87 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +63 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +82 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +56 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +61 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +47 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +57 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +47 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +57 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +56 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +61 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +47 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +55 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +56 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +55 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +22 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Makefile +67 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +20 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1366 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +904 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +22 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +29 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +34 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +662 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +254 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +201 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +29 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.cpp +16 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +37 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +40 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +377 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +222 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +81 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.cpp +15 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +35 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.cpp +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +44 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +76 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +127 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +91 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +67 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +100 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +144 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +20 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +31 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +89 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +521 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +198 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +134 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +76 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +13 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +170 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +110 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +248 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +78 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +163 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +54 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.cpp +303 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.h +112 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +128 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +19 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +71 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +15 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +102 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +49 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +31 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +32 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +57 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +371 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +173 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.g4 +64 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +56 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.tokens +12 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
- data/ext/express-parser/antlrgen/Express.interp +532 -0
- data/ext/express-parser/antlrgen/Express.tokens +190 -0
- data/ext/express-parser/antlrgen/ExpressBaseListener.cpp +7 -0
- data/ext/express-parser/antlrgen/ExpressBaseListener.h +623 -0
- data/ext/express-parser/antlrgen/ExpressBaseVisitor.cpp +7 -0
- data/ext/express-parser/antlrgen/ExpressBaseVisitor.h +816 -0
- data/ext/express-parser/antlrgen/ExpressLexer.cpp +1169 -0
- data/ext/express-parser/antlrgen/ExpressLexer.h +85 -0
- data/ext/express-parser/antlrgen/ExpressLexer.interp +534 -0
- data/ext/express-parser/antlrgen/ExpressLexer.tokens +190 -0
- data/ext/express-parser/antlrgen/ExpressListener.cpp +7 -0
- data/ext/express-parser/antlrgen/ExpressListener.h +616 -0
- data/ext/express-parser/antlrgen/ExpressParser.cpp +17284 -0
- data/ext/express-parser/antlrgen/ExpressParser.h +3696 -0
- data/ext/express-parser/antlrgen/ExpressVisitor.cpp +7 -0
- data/ext/express-parser/antlrgen/ExpressVisitor.h +422 -0
- data/ext/express-parser/express_parser.cpp +17931 -0
- data/ext/express-parser/extconf.rb +34 -0
- data/lib/express_parser.so +0 -0
- data/lib/expressir.rb +21 -0
- data/lib/expressir/cli.rb +27 -0
- data/lib/expressir/cli/ui.rb +36 -0
- data/lib/expressir/config.rb +23 -0
- data/lib/expressir/express.rb +11 -0
- data/lib/expressir/express/aggregate_dimension.rb +38 -0
- data/lib/expressir/express/attribute.rb +15 -0
- data/lib/expressir/express/comment.rb +7 -0
- data/lib/expressir/express/defined_type.rb +36 -0
- data/lib/expressir/express/derived.rb +65 -0
- data/lib/expressir/express/derived_aggregate.rb +43 -0
- data/lib/expressir/express/entity.rb +137 -0
- data/lib/expressir/express/explicit.rb +70 -0
- data/lib/expressir/express/explicit_aggregate.rb +46 -0
- data/lib/expressir/express/explicit_or_derived.rb +16 -0
- data/lib/expressir/express/global_rule.rb +44 -0
- data/lib/expressir/express/interface_specification.rb +51 -0
- data/lib/expressir/express/interfaced_item.rb +38 -0
- data/lib/expressir/express/inverse.rb +46 -0
- data/lib/expressir/express/inverse_aggregate.rb +37 -0
- data/lib/expressir/express/model_element.rb +7 -0
- data/lib/expressir/express/named_type.rb +19 -0
- data/lib/expressir/express/remark.rb +8 -0
- data/lib/expressir/express/repository.rb +306 -0
- data/lib/expressir/express/schema_definition.rb +96 -0
- data/lib/expressir/express/subtype_constraint.rb +14 -0
- data/lib/expressir/express/type.rb +26 -0
- data/lib/expressir/express/type_aggregate.rb +42 -0
- data/lib/expressir/express/type_enum.rb +29 -0
- data/lib/expressir/express/type_parser.rb +45 -0
- data/lib/expressir/express/type_select.rb +82 -0
- data/lib/expressir/express/unique_rule.rb +35 -0
- data/lib/expressir/express/where_rule.rb +32 -0
- data/lib/expressir/express_exp/formatter.rb +1450 -0
- data/lib/expressir/express_exp/parser.rb +36 -0
- data/lib/expressir/express_exp/visitor.rb +2451 -0
- data/lib/expressir/express_parser.rb +30 -0
- data/lib/expressir/model.rb +65 -0
- data/lib/expressir/model/attribute.rb +27 -0
- data/lib/expressir/model/constant.rb +17 -0
- data/lib/expressir/model/entity.rb +46 -0
- data/lib/expressir/model/enumeration_item.rb +11 -0
- data/lib/expressir/model/expressions/aggregate_initializer.rb +13 -0
- data/lib/expressir/model/expressions/aggregate_item.rb +15 -0
- data/lib/expressir/model/expressions/attribute_reference.rb +15 -0
- data/lib/expressir/model/expressions/binary_expression.rb +40 -0
- data/lib/expressir/model/expressions/call.rb +15 -0
- data/lib/expressir/model/expressions/entity_constructor.rb +15 -0
- data/lib/expressir/model/expressions/group_reference.rb +15 -0
- data/lib/expressir/model/expressions/index_reference.rb +17 -0
- data/lib/expressir/model/expressions/interval.rb +21 -0
- data/lib/expressir/model/expressions/query_expression.rb +26 -0
- data/lib/expressir/model/expressions/simple_reference.rb +13 -0
- data/lib/expressir/model/expressions/unary_expression.rb +19 -0
- data/lib/expressir/model/function.rb +62 -0
- data/lib/expressir/model/identifier.rb +9 -0
- data/lib/expressir/model/interface.rb +18 -0
- data/lib/expressir/model/literals/binary.rb +13 -0
- data/lib/expressir/model/literals/integer.rb +13 -0
- data/lib/expressir/model/literals/logical.rb +17 -0
- data/lib/expressir/model/literals/real.rb +13 -0
- data/lib/expressir/model/literals/string.rb +15 -0
- data/lib/expressir/model/parameter.rb +17 -0
- data/lib/expressir/model/procedure.rb +60 -0
- data/lib/expressir/model/renamed_ref.rb +13 -0
- data/lib/expressir/model/repository.rb +19 -0
- data/lib/expressir/model/rule.rb +62 -0
- data/lib/expressir/model/schema.rb +67 -0
- data/lib/expressir/model/scope.rb +17 -0
- data/lib/expressir/model/statements/alias.rb +26 -0
- data/lib/expressir/model/statements/assignment.rb +15 -0
- data/lib/expressir/model/statements/call.rb +15 -0
- data/lib/expressir/model/statements/case.rb +17 -0
- data/lib/expressir/model/statements/case_action.rb +15 -0
- data/lib/expressir/model/statements/compound.rb +13 -0
- data/lib/expressir/model/statements/escape.rb +8 -0
- data/lib/expressir/model/statements/if.rb +17 -0
- data/lib/expressir/model/statements/null.rb +8 -0
- data/lib/expressir/model/statements/repeat.rb +34 -0
- data/lib/expressir/model/statements/return.rb +13 -0
- data/lib/expressir/model/statements/skip.rb +8 -0
- data/lib/expressir/model/subtype_constraint.rb +27 -0
- data/lib/expressir/model/type.rb +24 -0
- data/lib/expressir/model/types/aggregate.rb +17 -0
- data/lib/expressir/model/types/array.rb +21 -0
- data/lib/expressir/model/types/bag.rb +17 -0
- data/lib/expressir/model/types/binary.rb +15 -0
- data/lib/expressir/model/types/boolean.rb +8 -0
- data/lib/expressir/model/types/enumeration.rb +19 -0
- data/lib/expressir/model/types/generic.rb +13 -0
- data/lib/expressir/model/types/generic_entity.rb +13 -0
- data/lib/expressir/model/types/integer.rb +8 -0
- data/lib/expressir/model/types/list.rb +19 -0
- data/lib/expressir/model/types/logical.rb +8 -0
- data/lib/expressir/model/types/number.rb +8 -0
- data/lib/expressir/model/types/real.rb +13 -0
- data/lib/expressir/model/types/select.rb +21 -0
- data/lib/expressir/model/types/set.rb +17 -0
- data/lib/expressir/model/types/string.rb +15 -0
- data/lib/expressir/model/unique.rb +15 -0
- data/lib/expressir/model/variable.rb +17 -0
- data/lib/expressir/model/where.rb +15 -0
- data/lib/expressir/parser.rb +6 -0
- data/lib/expressir/parser/owl_parser.rb +8 -0
- data/lib/expressir/version.rb +3 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +9589 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +36619 -0
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +13294 -0
- data/original/examples/employment/eclipse/.project +17 -0
- data/original/examples/employment/eclipse/Export/Employment.png +0 -0
- data/original/examples/employment/eclipse/Express/employment_schema.exp +33 -0
- data/original/examples/employment/eclipse/Express/employment_schema.xmi +77 -0
- data/original/examples/employment/eclipse/Express/employment_schema.xml +93 -0
- data/original/examples/employment/eclipse/Models/Employment.uml +4 -0
- data/original/examples/employment/eclipse/Models/Employment.umldi +240 -0
- data/original/examples/employment/eclipse/readme.txt +7 -0
- data/original/examples/employment/employment_schema.exp +33 -0
- data/original/examples/employment/employment_schema.rb +232 -0
- data/original/examples/employment/employment_schema.xml +93 -0
- data/original/examples/employment/employment_schema___module.rb +46 -0
- data/original/examples/employment/employment_schema___p28attr.rb +126 -0
- data/original/examples/employment/employment_schema___p28inst.rb +26 -0
- data/original/examples/employment/example_employment_data.xml +1 -0
- data/original/examples/employment/example_employment_data_copy.xml +1 -0
- data/original/examples/employment/example_employment_reader.rb +30 -0
- data/original/examples/employment/example_employment_writer.rb +51 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +3710 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +35880 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +15357 -0
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +9468 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +8404 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +43147 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +18341 -0
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +11632 -0
- data/original/examples/syntax/remark.exp +145 -0
- data/original/examples/syntax/remark_formatted.exp +174 -0
- data/original/examples/syntax/syntax.exp +310 -0
- data/original/examples/syntax/syntax_formatted.exp +1187 -0
- data/original/exp2ruby.rb +525 -0
- data/original/expsm.rb +34 -0
- data/original/mapping_owl.rb +1018 -0
- data/original/mapping_sysml.rb +2281 -0
- data/original/mapping_uml2.rb +599 -0
- data/original/mapping_uml2_eclipse.rb +433 -0
- data/original/reeper.rb +134 -0
- data/spec/acceptance/express_to_owl_spec.rb +18 -0
- data/spec/acceptance/version_spec.rb +12 -0
- data/spec/expressir/express/repository_spec.rb +25 -0
- data/spec/expressir/express_exp/ap233_spec.rb +22 -0
- data/spec/expressir/express_exp/format_remark_spec.rb +28 -0
- data/spec/expressir/express_exp/format_syntax_spec.rb +28 -0
- data/spec/expressir/express_exp/parse_remark_spec.rb +345 -0
- data/spec/expressir/express_exp/parse_syntax_spec.rb +2998 -0
- data/spec/expressir/model/find_spec.rb +110 -0
- data/spec/expressr_spec.rb +5 -0
- data/spec/spec_helper.rb +17 -0
- data/spec/support/console_helper.rb +29 -0
- metadata +695 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include "atn/DecisionState.h"
|
7
|
+
|
8
|
+
using namespace antlr4::atn;
|
9
|
+
|
10
|
+
void DecisionState::InitializeInstanceFields() {
|
11
|
+
decision = -1;
|
12
|
+
nonGreedy = false;
|
13
|
+
}
|
14
|
+
|
15
|
+
std::string DecisionState::toString() const {
|
16
|
+
return "DECISION " + ATNState::toString();
|
17
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#pragma once
|
7
|
+
|
8
|
+
#include "atn/ATNState.h"
|
9
|
+
|
10
|
+
namespace antlr4 {
|
11
|
+
namespace atn {
|
12
|
+
|
13
|
+
class ANTLR4CPP_PUBLIC DecisionState : public ATNState {
|
14
|
+
public:
|
15
|
+
int decision;
|
16
|
+
bool nonGreedy;
|
17
|
+
|
18
|
+
private:
|
19
|
+
void InitializeInstanceFields();
|
20
|
+
|
21
|
+
public:
|
22
|
+
DecisionState() {
|
23
|
+
InitializeInstanceFields();
|
24
|
+
}
|
25
|
+
|
26
|
+
virtual std::string toString() const override;
|
27
|
+
};
|
28
|
+
|
29
|
+
} // namespace atn
|
30
|
+
} // namespace antlr4
|
data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.cpp
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include "atn/EmptyPredictionContext.h"
|
7
|
+
|
8
|
+
using namespace antlr4::atn;
|
9
|
+
|
10
|
+
EmptyPredictionContext::EmptyPredictionContext() : SingletonPredictionContext(nullptr, EMPTY_RETURN_STATE) {
|
11
|
+
}
|
12
|
+
|
13
|
+
bool EmptyPredictionContext::isEmpty() const {
|
14
|
+
return true;
|
15
|
+
}
|
16
|
+
|
17
|
+
size_t EmptyPredictionContext::size() const {
|
18
|
+
return 1;
|
19
|
+
}
|
20
|
+
|
21
|
+
Ref<PredictionContext> EmptyPredictionContext::getParent(size_t /*index*/) const {
|
22
|
+
return nullptr;
|
23
|
+
}
|
24
|
+
|
25
|
+
size_t EmptyPredictionContext::getReturnState(size_t /*index*/) const {
|
26
|
+
return returnState;
|
27
|
+
}
|
28
|
+
|
29
|
+
bool EmptyPredictionContext::operator == (const PredictionContext &o) const {
|
30
|
+
return this == &o;
|
31
|
+
}
|
32
|
+
|
33
|
+
std::string EmptyPredictionContext::toString() const {
|
34
|
+
return "$";
|
35
|
+
}
|
@@ -0,0 +1,27 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#pragma once
|
7
|
+
|
8
|
+
#include "atn/SingletonPredictionContext.h"
|
9
|
+
|
10
|
+
namespace antlr4 {
|
11
|
+
namespace atn {
|
12
|
+
|
13
|
+
class ANTLR4CPP_PUBLIC EmptyPredictionContext : public SingletonPredictionContext {
|
14
|
+
public:
|
15
|
+
EmptyPredictionContext();
|
16
|
+
|
17
|
+
virtual bool isEmpty() const override;
|
18
|
+
virtual size_t size() const override;
|
19
|
+
virtual Ref<PredictionContext> getParent(size_t index) const override;
|
20
|
+
virtual size_t getReturnState(size_t index) const override;
|
21
|
+
virtual std::string toString() const override;
|
22
|
+
|
23
|
+
virtual bool operator == (const PredictionContext &o) const override;
|
24
|
+
};
|
25
|
+
|
26
|
+
} // namespace atn
|
27
|
+
} // namespace antlr4
|
@@ -0,0 +1,35 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include "atn/EpsilonTransition.h"
|
7
|
+
|
8
|
+
using namespace antlr4::atn;
|
9
|
+
|
10
|
+
EpsilonTransition::EpsilonTransition(ATNState *target) : EpsilonTransition(target, INVALID_INDEX) {
|
11
|
+
}
|
12
|
+
|
13
|
+
EpsilonTransition::EpsilonTransition(ATNState *target, size_t outermostPrecedenceReturn)
|
14
|
+
: Transition(target), _outermostPrecedenceReturn(outermostPrecedenceReturn) {
|
15
|
+
}
|
16
|
+
|
17
|
+
size_t EpsilonTransition::outermostPrecedenceReturn() {
|
18
|
+
return _outermostPrecedenceReturn;
|
19
|
+
}
|
20
|
+
|
21
|
+
Transition::SerializationType EpsilonTransition::getSerializationType() const {
|
22
|
+
return EPSILON;
|
23
|
+
}
|
24
|
+
|
25
|
+
bool EpsilonTransition::isEpsilon() const {
|
26
|
+
return true;
|
27
|
+
}
|
28
|
+
|
29
|
+
bool EpsilonTransition::matches(size_t /*symbol*/, size_t /*minVocabSymbol*/, size_t /*maxVocabSymbol*/) const {
|
30
|
+
return false;
|
31
|
+
}
|
32
|
+
|
33
|
+
std::string EpsilonTransition::toString() const {
|
34
|
+
return "EPSILON " + Transition::toString() + " {}";
|
35
|
+
}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#pragma once
|
7
|
+
|
8
|
+
#include "atn/Transition.h"
|
9
|
+
|
10
|
+
namespace antlr4 {
|
11
|
+
namespace atn {
|
12
|
+
|
13
|
+
class ANTLR4CPP_PUBLIC EpsilonTransition final : public Transition {
|
14
|
+
public:
|
15
|
+
EpsilonTransition(ATNState *target);
|
16
|
+
EpsilonTransition(ATNState *target, size_t outermostPrecedenceReturn);
|
17
|
+
|
18
|
+
/**
|
19
|
+
* @return the rule index of a precedence rule for which this transition is
|
20
|
+
* returning from, where the precedence value is 0; otherwise, INVALID_INDEX.
|
21
|
+
*
|
22
|
+
* @see ATNConfig#isPrecedenceFilterSuppressed()
|
23
|
+
* @see ParserATNSimulator#applyPrecedenceFilter(ATNConfigSet)
|
24
|
+
* @since 4.4.1
|
25
|
+
*/
|
26
|
+
size_t outermostPrecedenceReturn();
|
27
|
+
virtual SerializationType getSerializationType() const override;
|
28
|
+
|
29
|
+
virtual bool isEpsilon() const override;
|
30
|
+
virtual bool matches(size_t symbol, size_t minVocabSymbol, size_t maxVocabSymbol) const override;
|
31
|
+
|
32
|
+
virtual std::string toString() const override;
|
33
|
+
|
34
|
+
private:
|
35
|
+
const size_t _outermostPrecedenceReturn; // A rule index.
|
36
|
+
};
|
37
|
+
|
38
|
+
} // namespace atn
|
39
|
+
} // namespace antlr4
|
@@ -0,0 +1,15 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include "atn/ATNConfigSet.h"
|
7
|
+
|
8
|
+
#include "atn/ErrorInfo.h"
|
9
|
+
|
10
|
+
using namespace antlr4;
|
11
|
+
using namespace antlr4::atn;
|
12
|
+
|
13
|
+
ErrorInfo::ErrorInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, size_t stopIndex, bool fullCtx)
|
14
|
+
: DecisionEventInfo(decision, configs, input, startIndex, stopIndex, fullCtx) {
|
15
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#pragma once
|
7
|
+
|
8
|
+
#include "atn/DecisionEventInfo.h"
|
9
|
+
|
10
|
+
namespace antlr4 {
|
11
|
+
namespace atn {
|
12
|
+
|
13
|
+
/// <summary>
|
14
|
+
/// This class represents profiling event information for a syntax error
|
15
|
+
/// identified during prediction. Syntax errors occur when the prediction
|
16
|
+
/// algorithm is unable to identify an alternative which would lead to a
|
17
|
+
/// successful parse.
|
18
|
+
/// </summary>
|
19
|
+
/// <seealso cref= Parser#notifyErrorListeners(Token, String, RecognitionException) </seealso>
|
20
|
+
/// <seealso cref= ANTLRErrorListener#syntaxError
|
21
|
+
///
|
22
|
+
/// @since 4.3 </seealso>
|
23
|
+
class ANTLR4CPP_PUBLIC ErrorInfo : public DecisionEventInfo {
|
24
|
+
public:
|
25
|
+
/// <summary>
|
26
|
+
/// Constructs a new instance of the <seealso cref="ErrorInfo"/> class with the
|
27
|
+
/// specified detailed syntax error information.
|
28
|
+
/// </summary>
|
29
|
+
/// <param name="decision"> The decision number </param>
|
30
|
+
/// <param name="configs"> The final configuration set reached during prediction
|
31
|
+
/// prior to reaching the <seealso cref="ATNSimulator#ERROR"/> state </param>
|
32
|
+
/// <param name="input"> The input token stream </param>
|
33
|
+
/// <param name="startIndex"> The start index for the current prediction </param>
|
34
|
+
/// <param name="stopIndex"> The index at which the syntax error was identified </param>
|
35
|
+
/// <param name="fullCtx"> {@code true} if the syntax error was identified during LL
|
36
|
+
/// prediction; otherwise, {@code false} if the syntax error was identified
|
37
|
+
/// during SLL prediction </param>
|
38
|
+
ErrorInfo(size_t decision, ATNConfigSet *configs, TokenStream *input, size_t startIndex, size_t stopIndex,
|
39
|
+
bool fullCtx);
|
40
|
+
};
|
41
|
+
|
42
|
+
} // namespace atn
|
43
|
+
} // namespace antlr4
|
@@ -0,0 +1,158 @@
|
|
1
|
+
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
+
* Use of this file is governed by the BSD 3-clause license that
|
3
|
+
* can be found in the LICENSE.txt file in the project root.
|
4
|
+
*/
|
5
|
+
|
6
|
+
#include "atn/RuleStopState.h"
|
7
|
+
#include "atn/Transition.h"
|
8
|
+
#include "atn/RuleTransition.h"
|
9
|
+
#include "atn/SingletonPredictionContext.h"
|
10
|
+
#include "atn/AbstractPredicateTransition.h"
|
11
|
+
#include "atn/WildcardTransition.h"
|
12
|
+
#include "atn/NotSetTransition.h"
|
13
|
+
#include "misc/IntervalSet.h"
|
14
|
+
#include "atn/ATNConfig.h"
|
15
|
+
#include "atn/EmptyPredictionContext.h"
|
16
|
+
|
17
|
+
#include "support/CPPUtils.h"
|
18
|
+
|
19
|
+
#include "atn/LL1Analyzer.h"
|
20
|
+
|
21
|
+
using namespace antlr4;
|
22
|
+
using namespace antlr4::atn;
|
23
|
+
using namespace antlrcpp;
|
24
|
+
|
25
|
+
LL1Analyzer::LL1Analyzer(const ATN &atn) : _atn(atn) {
|
26
|
+
}
|
27
|
+
|
28
|
+
LL1Analyzer::~LL1Analyzer() {
|
29
|
+
}
|
30
|
+
|
31
|
+
std::vector<misc::IntervalSet> LL1Analyzer::getDecisionLookahead(ATNState *s) const {
|
32
|
+
std::vector<misc::IntervalSet> look;
|
33
|
+
|
34
|
+
if (s == nullptr) {
|
35
|
+
return look;
|
36
|
+
}
|
37
|
+
|
38
|
+
look.resize(s->transitions.size()); // Fills all interval sets with defaults.
|
39
|
+
for (size_t alt = 0; alt < s->transitions.size(); alt++) {
|
40
|
+
bool seeThruPreds = false; // fail to get lookahead upon pred
|
41
|
+
|
42
|
+
ATNConfig::Set lookBusy;
|
43
|
+
antlrcpp::BitSet callRuleStack;
|
44
|
+
_LOOK(s->transitions[alt]->target, nullptr, PredictionContext::EMPTY,
|
45
|
+
look[alt], lookBusy, callRuleStack, seeThruPreds, false);
|
46
|
+
|
47
|
+
// Wipe out lookahead for this alternative if we found nothing
|
48
|
+
// or we had a predicate when we !seeThruPreds
|
49
|
+
if (look[alt].size() == 0 || look[alt].contains(HIT_PRED)) {
|
50
|
+
look[alt].clear();
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return look;
|
54
|
+
}
|
55
|
+
|
56
|
+
misc::IntervalSet LL1Analyzer::LOOK(ATNState *s, RuleContext *ctx) const {
|
57
|
+
return LOOK(s, nullptr, ctx);
|
58
|
+
}
|
59
|
+
|
60
|
+
misc::IntervalSet LL1Analyzer::LOOK(ATNState *s, ATNState *stopState, RuleContext *ctx) const {
|
61
|
+
misc::IntervalSet r;
|
62
|
+
bool seeThruPreds = true; // ignore preds; get all lookahead
|
63
|
+
Ref<PredictionContext> lookContext = ctx != nullptr ? PredictionContext::fromRuleContext(_atn, ctx) : nullptr;
|
64
|
+
|
65
|
+
ATNConfig::Set lookBusy;
|
66
|
+
antlrcpp::BitSet callRuleStack;
|
67
|
+
_LOOK(s, stopState, lookContext, r, lookBusy, callRuleStack, seeThruPreds, true);
|
68
|
+
|
69
|
+
return r;
|
70
|
+
}
|
71
|
+
|
72
|
+
void LL1Analyzer::_LOOK(ATNState *s, ATNState *stopState, Ref<PredictionContext> const& ctx, misc::IntervalSet &look,
|
73
|
+
ATNConfig::Set &lookBusy, antlrcpp::BitSet &calledRuleStack, bool seeThruPreds, bool addEOF) const {
|
74
|
+
|
75
|
+
Ref<ATNConfig> c = std::make_shared<ATNConfig>(s, 0, ctx);
|
76
|
+
|
77
|
+
if (lookBusy.count(c) > 0) // Keep in mind comparison is based on members of the class, not the actual instance.
|
78
|
+
return;
|
79
|
+
|
80
|
+
lookBusy.insert(c);
|
81
|
+
|
82
|
+
// ml: s can never be null, hence no need to check if stopState is != null.
|
83
|
+
if (s == stopState) {
|
84
|
+
if (ctx == nullptr) {
|
85
|
+
look.add(Token::EPSILON);
|
86
|
+
return;
|
87
|
+
} else if (ctx->isEmpty() && addEOF) {
|
88
|
+
look.add(Token::EOF);
|
89
|
+
return;
|
90
|
+
}
|
91
|
+
}
|
92
|
+
|
93
|
+
if (s->getStateType() == ATNState::RULE_STOP) {
|
94
|
+
if (ctx == nullptr) {
|
95
|
+
look.add(Token::EPSILON);
|
96
|
+
return;
|
97
|
+
} else if (ctx->isEmpty() && addEOF) {
|
98
|
+
look.add(Token::EOF);
|
99
|
+
return;
|
100
|
+
}
|
101
|
+
|
102
|
+
if (ctx != PredictionContext::EMPTY) {
|
103
|
+
// run thru all possible stack tops in ctx
|
104
|
+
for (size_t i = 0; i < ctx->size(); i++) {
|
105
|
+
ATNState *returnState = _atn.states[ctx->getReturnState(i)];
|
106
|
+
|
107
|
+
bool removed = calledRuleStack.test(returnState->ruleIndex);
|
108
|
+
auto onExit = finally([removed, &calledRuleStack, returnState] {
|
109
|
+
if (removed) {
|
110
|
+
calledRuleStack.set(returnState->ruleIndex);
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
114
|
+
calledRuleStack[returnState->ruleIndex] = false;
|
115
|
+
_LOOK(returnState, stopState, ctx->getParent(i), look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
|
116
|
+
}
|
117
|
+
return;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
|
121
|
+
size_t n = s->transitions.size();
|
122
|
+
for (size_t i = 0; i < n; i++) {
|
123
|
+
Transition *t = s->transitions[i];
|
124
|
+
|
125
|
+
if (t->getSerializationType() == Transition::RULE) {
|
126
|
+
if (calledRuleStack[(static_cast<RuleTransition*>(t))->target->ruleIndex]) {
|
127
|
+
continue;
|
128
|
+
}
|
129
|
+
|
130
|
+
Ref<PredictionContext> newContext = SingletonPredictionContext::create(ctx, (static_cast<RuleTransition*>(t))->followState->stateNumber);
|
131
|
+
auto onExit = finally([t, &calledRuleStack] {
|
132
|
+
calledRuleStack[(static_cast<RuleTransition*>(t))->target->ruleIndex] = false;
|
133
|
+
});
|
134
|
+
|
135
|
+
calledRuleStack.set((static_cast<RuleTransition*>(t))->target->ruleIndex);
|
136
|
+
_LOOK(t->target, stopState, newContext, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
|
137
|
+
|
138
|
+
} else if (is<AbstractPredicateTransition *>(t)) {
|
139
|
+
if (seeThruPreds) {
|
140
|
+
_LOOK(t->target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
|
141
|
+
} else {
|
142
|
+
look.add(HIT_PRED);
|
143
|
+
}
|
144
|
+
} else if (t->isEpsilon()) {
|
145
|
+
_LOOK(t->target, stopState, ctx, look, lookBusy, calledRuleStack, seeThruPreds, addEOF);
|
146
|
+
} else if (t->getSerializationType() == Transition::WILDCARD) {
|
147
|
+
look.addAll(misc::IntervalSet::of(Token::MIN_USER_TOKEN_TYPE, static_cast<ssize_t>(_atn.maxTokenType)));
|
148
|
+
} else {
|
149
|
+
misc::IntervalSet set = t->label();
|
150
|
+
if (!set.isEmpty()) {
|
151
|
+
if (is<NotSetTransition*>(t)) {
|
152
|
+
set = set.complement(misc::IntervalSet::of(Token::MIN_USER_TOKEN_TYPE, static_cast<ssize_t>(_atn.maxTokenType)));
|
153
|
+
}
|
154
|
+
look.addAll(set);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
}
|
158
|
+
}
|
@@ -0,0 +1,109 @@
|
|
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 "Token.h"
|
9
|
+
#include "support/BitSet.h"
|
10
|
+
#include "atn/PredictionContext.h"
|
11
|
+
#include "atn/ATNConfig.h"
|
12
|
+
|
13
|
+
namespace antlr4 {
|
14
|
+
namespace atn {
|
15
|
+
|
16
|
+
class ANTLR4CPP_PUBLIC LL1Analyzer {
|
17
|
+
public:
|
18
|
+
/// Special value added to the lookahead sets to indicate that we hit
|
19
|
+
/// a predicate during analysis if {@code seeThruPreds==false}.
|
20
|
+
static const size_t HIT_PRED = Token::INVALID_TYPE;
|
21
|
+
|
22
|
+
const atn::ATN &_atn;
|
23
|
+
|
24
|
+
LL1Analyzer(const atn::ATN &atn);
|
25
|
+
virtual ~LL1Analyzer();
|
26
|
+
|
27
|
+
/// <summary>
|
28
|
+
/// Calculates the SLL(1) expected lookahead set for each outgoing transition
|
29
|
+
/// of an <seealso cref="ATNState"/>. The returned array has one element for each
|
30
|
+
/// outgoing transition in {@code s}. If the closure from transition
|
31
|
+
/// <em>i</em> leads to a semantic predicate before matching a symbol, the
|
32
|
+
/// element at index <em>i</em> of the result will be {@code null}.
|
33
|
+
/// </summary>
|
34
|
+
/// <param name="s"> the ATN state </param>
|
35
|
+
/// <returns> the expected symbols for each outgoing transition of {@code s}. </returns>
|
36
|
+
virtual std::vector<misc::IntervalSet> getDecisionLookahead(ATNState *s) const;
|
37
|
+
|
38
|
+
/// <summary>
|
39
|
+
/// Compute set of tokens that can follow {@code s} in the ATN in the
|
40
|
+
/// specified {@code ctx}.
|
41
|
+
/// <p/>
|
42
|
+
/// If {@code ctx} is {@code null} and the end of the rule containing
|
43
|
+
/// {@code s} is reached, <seealso cref="Token#EPSILON"/> is added to the result set.
|
44
|
+
/// If {@code ctx} is not {@code null} and the end of the outermost rule is
|
45
|
+
/// reached, <seealso cref="Token#EOF"/> is added to the result set.
|
46
|
+
/// </summary>
|
47
|
+
/// <param name="s"> the ATN state </param>
|
48
|
+
/// <param name="ctx"> the complete parser context, or {@code null} if the context
|
49
|
+
/// should be ignored
|
50
|
+
/// </param>
|
51
|
+
/// <returns> The set of tokens that can follow {@code s} in the ATN in the
|
52
|
+
/// specified {@code ctx}. </returns>
|
53
|
+
virtual misc::IntervalSet LOOK(ATNState *s, RuleContext *ctx) const;
|
54
|
+
|
55
|
+
/// <summary>
|
56
|
+
/// Compute set of tokens that can follow {@code s} in the ATN in the
|
57
|
+
/// specified {@code ctx}.
|
58
|
+
/// <p/>
|
59
|
+
/// If {@code ctx} is {@code null} and the end of the rule containing
|
60
|
+
/// {@code s} is reached, <seealso cref="Token#EPSILON"/> is added to the result set.
|
61
|
+
/// If {@code ctx} is not {@code null} and the end of the outermost rule is
|
62
|
+
/// reached, <seealso cref="Token#EOF"/> is added to the result set.
|
63
|
+
/// </summary>
|
64
|
+
/// <param name="s"> the ATN state </param>
|
65
|
+
/// <param name="stopState"> the ATN state to stop at. This can be a
|
66
|
+
/// <seealso cref="BlockEndState"/> to detect epsilon paths through a closure. </param>
|
67
|
+
/// <param name="ctx"> the complete parser context, or {@code null} if the context
|
68
|
+
/// should be ignored
|
69
|
+
/// </param>
|
70
|
+
/// <returns> The set of tokens that can follow {@code s} in the ATN in the
|
71
|
+
/// specified {@code ctx}. </returns>
|
72
|
+
virtual misc::IntervalSet LOOK(ATNState *s, ATNState *stopState, RuleContext *ctx) const;
|
73
|
+
|
74
|
+
/// <summary>
|
75
|
+
/// Compute set of tokens that can follow {@code s} in the ATN in the
|
76
|
+
/// specified {@code ctx}.
|
77
|
+
/// <p/>
|
78
|
+
/// If {@code ctx} is {@code null} and {@code stopState} or the end of the
|
79
|
+
/// rule containing {@code s} is reached, <seealso cref="Token#EPSILON"/> is added to
|
80
|
+
/// the result set. If {@code ctx} is not {@code null} and {@code addEOF} is
|
81
|
+
/// {@code true} and {@code stopState} or the end of the outermost rule is
|
82
|
+
/// reached, <seealso cref="Token#EOF"/> is added to the result set.
|
83
|
+
/// </summary>
|
84
|
+
/// <param name="s"> the ATN state. </param>
|
85
|
+
/// <param name="stopState"> the ATN state to stop at. This can be a
|
86
|
+
/// <seealso cref="BlockEndState"/> to detect epsilon paths through a closure. </param>
|
87
|
+
/// <param name="ctx"> The outer context, or {@code null} if the outer context should
|
88
|
+
/// not be used. </param>
|
89
|
+
/// <param name="look"> The result lookahead set. </param>
|
90
|
+
/// <param name="lookBusy"> A set used for preventing epsilon closures in the ATN
|
91
|
+
/// from causing a stack overflow. Outside code should pass
|
92
|
+
/// {@code new HashSet<ATNConfig>} for this argument. </param>
|
93
|
+
/// <param name="calledRuleStack"> A set used for preventing left recursion in the
|
94
|
+
/// ATN from causing a stack overflow. Outside code should pass
|
95
|
+
/// {@code new BitSet()} for this argument. </param>
|
96
|
+
/// <param name="seeThruPreds"> {@code true} to true semantic predicates as
|
97
|
+
/// implicitly {@code true} and "see through them", otherwise {@code false}
|
98
|
+
/// to treat semantic predicates as opaque and add <seealso cref="#HIT_PRED"/> to the
|
99
|
+
/// result if one is encountered. </param>
|
100
|
+
/// <param name="addEOF"> Add <seealso cref="Token#EOF"/> to the result if the end of the
|
101
|
+
/// outermost context is reached. This parameter has no effect if {@code ctx}
|
102
|
+
/// is {@code null}. </param>
|
103
|
+
protected:
|
104
|
+
virtual void _LOOK(ATNState *s, ATNState *stopState, Ref<PredictionContext> const& ctx, misc::IntervalSet &look,
|
105
|
+
ATNConfig::Set &lookBusy, antlrcpp::BitSet &calledRuleStack, bool seeThruPreds, bool addEOF) const;
|
106
|
+
};
|
107
|
+
|
108
|
+
} // namespace atn
|
109
|
+
} // namespace antlr4
|