expressir 0.2.4 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cross_rubies +30 -0
- data/.github/workflows/rake.yml +14 -15
- data/.github/workflows/release.yml +26 -17
- data/.gitignore +3 -1
- data/Gemfile +0 -2
- data/Rakefile +2 -17
- data/expressir.gemspec +10 -5
- 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/express_parser.cpp +12 -10
- data/ext/express-parser/extconf.rb +48 -25
- data/lib/expressir/express_exp/formatter.rb +3 -7
- data/lib/expressir/express_exp/parser.rb +20 -2
- data/lib/expressir/express_exp/visitor.rb +106 -55
- data/lib/expressir/model.rb +1 -0
- data/lib/expressir/model/entity.rb +3 -0
- data/lib/expressir/model/expressions/query_expression.rb +2 -2
- data/lib/expressir/model/identifier.rb +2 -0
- data/lib/expressir/model/informal_proposition.rb +11 -0
- data/lib/expressir/model/rule.rb +3 -0
- data/lib/expressir/model/schema.rb +2 -0
- data/lib/expressir/model/scope.rb +52 -3
- data/lib/expressir/model/type.rb +8 -0
- data/lib/expressir/version.rb +1 -1
- data/original/examples/syntax/remark.exp +64 -20
- data/original/examples/syntax/remark_formatted.exp +63 -19
- data/original/examples/syntax/source.exp +16 -0
- data/original/examples/syntax/syntax.exp +6 -1
- data/original/examples/syntax/syntax_formatted.exp +13 -0
- data/rakelib/cross-ruby.rake +308 -0
- data/spec/expressir/express_exp/head_source_spec.rb +41 -0
- data/spec/expressir/express_exp/parse_multiple_spec.rb +32 -0
- data/spec/expressir/express_exp/parse_remark_spec.rb +119 -53
- data/spec/expressir/express_exp/parse_syntax_spec.rb +47 -2
- data/spec/expressir/express_exp/source_spec.rb +32 -0
- data/spec/expressir/model/find_spec.rb +19 -6
- metadata +369 -23
@@ -0,0 +1,16 @@
|
|
1
|
+
SCHEMA entity_schema;
|
2
|
+
-- body
|
3
|
+
ENTITY empty_entity; END_ENTITY;
|
4
|
+
END_SCHEMA;
|
5
|
+
|
6
|
+
SCHEMA version_entity_schema 'version';
|
7
|
+
-- body
|
8
|
+
ENTITY empty_entity; END_ENTITY;
|
9
|
+
END_SCHEMA;
|
10
|
+
|
11
|
+
SCHEMA version_interface_entity_schema 'version';
|
12
|
+
USE FROM contract_schema;
|
13
|
+
REFERENCE FROM contract_schema;
|
14
|
+
-- body
|
15
|
+
ENTITY empty_entity; END_ENTITY;
|
16
|
+
END_SCHEMA;
|
@@ -1,11 +1,14 @@
|
|
1
|
+
-- schema
|
1
2
|
SCHEMA syntax_schema 'version';
|
2
3
|
|
3
4
|
-- interfaces
|
4
5
|
USE FROM contract_schema;
|
5
6
|
USE FROM contract_schema (contract);
|
7
|
+
USE FROM contract_schema (contract, contract2);
|
6
8
|
USE FROM contract_schema (contract AS contract2);
|
7
9
|
REFERENCE FROM contract_schema;
|
8
10
|
REFERENCE FROM contract_schema (contract);
|
11
|
+
REFERENCE FROM contract_schema (contract, contract2);
|
9
12
|
REFERENCE FROM contract_schema (contract AS contract2);
|
10
13
|
|
11
14
|
-- constants
|
@@ -14,7 +17,7 @@ CONSTANT empty_constant : BOOLEAN := TRUE; END_CONSTANT;
|
|
14
17
|
-- types
|
15
18
|
TYPE empty_type = BOOLEAN; END_TYPE;
|
16
19
|
TYPE where_type = BOOLEAN; WHERE TRUE; END_TYPE;
|
17
|
-
TYPE where_label_type = BOOLEAN; WHERE WR1 : TRUE; END_TYPE;
|
20
|
+
TYPE where_label_type = BOOLEAN; WHERE WR1 : TRUE; END_TYPE;
|
18
21
|
|
19
22
|
-- entities
|
20
23
|
ENTITY empty_entity; END_ENTITY;
|
@@ -114,6 +117,7 @@ RULE variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE;
|
|
114
117
|
RULE multiple_variable_expression_rule FOR (empty_entity); LOCAL test : BOOLEAN := TRUE; test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
115
118
|
RULE multiple_shorthand_variable_expression_rule FOR (empty_entity); LOCAL test, test2 : BOOLEAN := TRUE; END_LOCAL; WHERE TRUE; END_RULE;
|
116
119
|
RULE statement_rule FOR (empty_entity); ; WHERE TRUE; END_RULE;
|
120
|
+
RULE where_label_rule FOR (empty_entity); WHERE WR1 : TRUE; END_RULE;
|
117
121
|
|
118
122
|
-- simple types
|
119
123
|
TYPE binary_type = BINARY; END_TYPE;
|
@@ -202,6 +206,7 @@ FUNCTION false_logical_expression : BOOLEAN; RETURN (FALSE); END_FUNCTION;
|
|
202
206
|
FUNCTION unknown_logical_expression : BOOLEAN; RETURN (UNKNOWN); END_FUNCTION;
|
203
207
|
FUNCTION real_expression : BOOLEAN; RETURN (999.999); END_FUNCTION;
|
204
208
|
FUNCTION simple_string_expression : BOOLEAN; RETURN ('xxx'); END_FUNCTION;
|
209
|
+
FUNCTION utf8_simple_string_expression : BOOLEAN; RETURN ('UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.'); END_FUNCTION;
|
205
210
|
FUNCTION encoded_string_expression : BOOLEAN; RETURN ("000000780000007800000078"); END_FUNCTION;
|
206
211
|
|
207
212
|
-- constant expressions
|
@@ -2,11 +2,15 @@ SCHEMA syntax_schema 'version';
|
|
2
2
|
USE FROM contract_schema;
|
3
3
|
USE FROM contract_schema
|
4
4
|
(contract);
|
5
|
+
USE FROM contract_schema
|
6
|
+
(contract, contract2);
|
5
7
|
USE FROM contract_schema
|
6
8
|
(contract AS contract2);
|
7
9
|
REFERENCE FROM contract_schema;
|
8
10
|
REFERENCE FROM contract_schema
|
9
11
|
(contract);
|
12
|
+
REFERENCE FROM contract_schema
|
13
|
+
(contract, contract2);
|
10
14
|
REFERENCE FROM contract_schema
|
11
15
|
(contract AS contract2);
|
12
16
|
CONSTANT
|
@@ -489,6 +493,11 @@ RULE statement_rule FOR (empty_entity);
|
|
489
493
|
TRUE;
|
490
494
|
END_RULE;
|
491
495
|
|
496
|
+
RULE where_label_rule FOR (empty_entity);
|
497
|
+
WHERE
|
498
|
+
WR1 : TRUE;
|
499
|
+
END_RULE;
|
500
|
+
|
492
501
|
TYPE binary_type = BINARY;
|
493
502
|
END_TYPE;
|
494
503
|
|
@@ -829,6 +838,10 @@ FUNCTION simple_string_expression : BOOLEAN;
|
|
829
838
|
RETURN ('xxx');
|
830
839
|
END_FUNCTION;
|
831
840
|
|
841
|
+
FUNCTION utf8_simple_string_expression : BOOLEAN;
|
842
|
+
RETURN ('UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.');
|
843
|
+
END_FUNCTION;
|
844
|
+
|
832
845
|
FUNCTION encoded_string_expression : BOOLEAN;
|
833
846
|
RETURN ("000000780000007800000078");
|
834
847
|
END_FUNCTION;
|
@@ -0,0 +1,308 @@
|
|
1
|
+
require "rbconfig"
|
2
|
+
require "shellwords"
|
3
|
+
|
4
|
+
CrossRuby = Struct.new(:version, :host) do
|
5
|
+
WINDOWS_PLATFORM_REGEX = /mingw|mswin/
|
6
|
+
MINGW32_PLATFORM_REGEX = /mingw32/
|
7
|
+
LINUX_PLATFORM_REGEX = /linux/
|
8
|
+
DARWIN_PLATFORM_REGEX = /darwin/
|
9
|
+
|
10
|
+
def windows?
|
11
|
+
!!(platform =~ WINDOWS_PLATFORM_REGEX)
|
12
|
+
end
|
13
|
+
|
14
|
+
def linux?
|
15
|
+
!!(platform =~ LINUX_PLATFORM_REGEX)
|
16
|
+
end
|
17
|
+
|
18
|
+
def darwin?
|
19
|
+
!!(platform =~ DARWIN_PLATFORM_REGEX)
|
20
|
+
end
|
21
|
+
|
22
|
+
def ver
|
23
|
+
@ver ||= version[/\A[^-]+/]
|
24
|
+
end
|
25
|
+
|
26
|
+
def minor_ver
|
27
|
+
@minor_ver ||= ver[/\A\d\.\d(?=\.)/]
|
28
|
+
end
|
29
|
+
|
30
|
+
def api_ver_suffix
|
31
|
+
case minor_ver
|
32
|
+
when nil
|
33
|
+
raise "CrossRuby.api_ver_suffix: unsupported version: #{ver}"
|
34
|
+
else
|
35
|
+
minor_ver.delete(".") << "0"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def platform
|
40
|
+
@platform ||= case host
|
41
|
+
when /\Ax86_64.*mingw32/
|
42
|
+
"x64-mingw32"
|
43
|
+
when /\Ai[3-6]86.*mingw32/
|
44
|
+
"x86-mingw32"
|
45
|
+
when /\Ax86_64.*linux/
|
46
|
+
"x86_64-linux"
|
47
|
+
when /\Ai[3-6]86.*linux/
|
48
|
+
"x86-linux"
|
49
|
+
when /\Ax86_64-darwin/
|
50
|
+
"x86_64-darwin"
|
51
|
+
when /\Aarm64-darwin/
|
52
|
+
"arm64-darwin"
|
53
|
+
else
|
54
|
+
raise "CrossRuby.platform: unsupported host: #{host}"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def tool(name)
|
59
|
+
(@binutils_prefix ||= case platform
|
60
|
+
when "x64-mingw32"
|
61
|
+
"x86_64-w64-mingw32-"
|
62
|
+
when "x86-mingw32"
|
63
|
+
"i686-w64-mingw32-"
|
64
|
+
when "x86_64-linux"
|
65
|
+
"x86_64-redhat-linux-"
|
66
|
+
when "x86-linux"
|
67
|
+
"i686-redhat-linux-"
|
68
|
+
when /x86_64.*darwin/
|
69
|
+
"x86_64-apple-darwin-"
|
70
|
+
when /a.*64.*darwin/
|
71
|
+
"aarch64-apple-darwin-"
|
72
|
+
else
|
73
|
+
raise "CrossRuby.tool: unmatched platform: #{platform}"
|
74
|
+
end) + name
|
75
|
+
end
|
76
|
+
|
77
|
+
def target_file_format
|
78
|
+
case platform
|
79
|
+
when "x64-mingw32"
|
80
|
+
"pei-x86-64"
|
81
|
+
when "x86-mingw32"
|
82
|
+
"pei-i386"
|
83
|
+
when "x86_64-linux"
|
84
|
+
"elf64-x86-64"
|
85
|
+
when "x86-linux"
|
86
|
+
"elf32-i386"
|
87
|
+
when "x86_64-darwin"
|
88
|
+
"Mach-O 64-bit x86-64" # hmm
|
89
|
+
when "arm64-darwin"
|
90
|
+
"Mach-O arm64"
|
91
|
+
else
|
92
|
+
raise "CrossRuby.target_file_format: unmatched platform: #{platform}"
|
93
|
+
end
|
94
|
+
end
|
95
|
+
|
96
|
+
def dll_ext
|
97
|
+
darwin? ? "bundle" : "so"
|
98
|
+
end
|
99
|
+
|
100
|
+
def dll_staging_path
|
101
|
+
"tmp/#{platform}/stage/lib/#{GEMSPEC.name}/#{minor_ver}/#{GEMSPEC.name}.#{dll_ext}"
|
102
|
+
end
|
103
|
+
|
104
|
+
def libruby_dll
|
105
|
+
case platform
|
106
|
+
when "x64-mingw32"
|
107
|
+
"x64-msvcrt-ruby#{api_ver_suffix}.dll"
|
108
|
+
when "x86-mingw32"
|
109
|
+
"msvcrt-ruby#{api_ver_suffix}.dll"
|
110
|
+
else
|
111
|
+
raise "CrossRuby.libruby_dll: unmatched platform: #{platform}"
|
112
|
+
end
|
113
|
+
end
|
114
|
+
|
115
|
+
def allowed_dlls
|
116
|
+
case platform
|
117
|
+
when MINGW32_PLATFORM_REGEX
|
118
|
+
[
|
119
|
+
"kernel32.dll",
|
120
|
+
"msvcrt.dll",
|
121
|
+
"ws2_32.dll",
|
122
|
+
"user32.dll",
|
123
|
+
"advapi32.dll",
|
124
|
+
libruby_dll,
|
125
|
+
]
|
126
|
+
when LINUX_PLATFORM_REGEX
|
127
|
+
[
|
128
|
+
"libm.so.6",
|
129
|
+
*(case
|
130
|
+
when ver < "2.6.0"
|
131
|
+
"libpthread.so.0"
|
132
|
+
end),
|
133
|
+
"libc.so.6",
|
134
|
+
"libdl.so.2", # on old dists only - now in libc
|
135
|
+
]
|
136
|
+
when DARWIN_PLATFORM_REGEX
|
137
|
+
[
|
138
|
+
"/usr/lib/libSystem.B.dylib",
|
139
|
+
"/usr/lib/liblzma.5.dylib",
|
140
|
+
"/usr/lib/libobjc.A.dylib",
|
141
|
+
]
|
142
|
+
else
|
143
|
+
raise "CrossRuby.allowed_dlls: unmatched platform: #{platform}"
|
144
|
+
end
|
145
|
+
end
|
146
|
+
|
147
|
+
def dll_ref_versions
|
148
|
+
case platform
|
149
|
+
when LINUX_PLATFORM_REGEX
|
150
|
+
{ "GLIBC" => "2.17" }
|
151
|
+
else
|
152
|
+
raise "CrossRuby.dll_ref_versions: unmatched platform: #{platform}"
|
153
|
+
end
|
154
|
+
end
|
155
|
+
end
|
156
|
+
|
157
|
+
CROSS_RUBIES = File.read(".cross_rubies").split("\n").map do |line|
|
158
|
+
case line
|
159
|
+
when /\A([^#]+):([^#]+)/
|
160
|
+
CrossRuby.new($1, $2)
|
161
|
+
end
|
162
|
+
end.compact
|
163
|
+
|
164
|
+
ENV["RUBY_CC_VERSION"] = CROSS_RUBIES.map(&:ver).uniq.join(":")
|
165
|
+
|
166
|
+
require "rake_compiler_dock"
|
167
|
+
|
168
|
+
def verify_dll(dll, cross_ruby)
|
169
|
+
allowed_imports = cross_ruby.allowed_dlls
|
170
|
+
dump = `#{["env", "LANG=C", cross_ruby.tool("objdump"), "-p", dll].shelljoin}`
|
171
|
+
|
172
|
+
if cross_ruby.windows?
|
173
|
+
raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
|
174
|
+
raise "export function Init_nokogiri not in dll #{dll}" unless /Table.*\sInit_nokogiri\s/mi === dump
|
175
|
+
|
176
|
+
# Verify that the DLL dependencies are all allowed.
|
177
|
+
actual_imports = dump.scan(/DLL Name: (.*)$/).map(&:first).map(&:downcase).uniq
|
178
|
+
if !(actual_imports - allowed_imports).empty?
|
179
|
+
raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
|
180
|
+
end
|
181
|
+
|
182
|
+
elsif cross_ruby.linux?
|
183
|
+
nm = `#{["env", "LANG=C", cross_ruby.tool("nm"), "-D", dll].shelljoin}`
|
184
|
+
|
185
|
+
raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
|
186
|
+
raise "export function Init_nokogiri not in dll #{dll}" unless / T Init_nokogiri/ === nm
|
187
|
+
|
188
|
+
# Verify that the DLL dependencies are all allowed.
|
189
|
+
actual_imports = dump.scan(/NEEDED\s+(.*)/).map(&:first).uniq
|
190
|
+
if !(actual_imports - allowed_imports).empty?
|
191
|
+
raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
|
192
|
+
end
|
193
|
+
|
194
|
+
# Verify that the expected so version requirements match the actual dependencies.
|
195
|
+
ref_versions_data = dump.scan(/0x[\da-f]+ 0x[\da-f]+ \d+ (\w+)_([\d\.]+)$/i)
|
196
|
+
# Build a hash of library versions like {"LIBUDEV"=>"183", "GLIBC"=>"2.17"}
|
197
|
+
actual_ref_versions = ref_versions_data.each.with_object({}) do |(lib, ver), h|
|
198
|
+
if !h[lib] || ver.split(".").map(&:to_i).pack("C*") > h[lib].split(".").map(&:to_i).pack("C*")
|
199
|
+
h[lib] = ver
|
200
|
+
end
|
201
|
+
end
|
202
|
+
if actual_ref_versions != cross_ruby.dll_ref_versions
|
203
|
+
raise "unexpected so version requirements #{actual_ref_versions.inspect} in #{dll}"
|
204
|
+
end
|
205
|
+
|
206
|
+
elsif cross_ruby.darwin?
|
207
|
+
nm = `#{["env", "LANG=C", cross_ruby.tool("nm"), "-g", dll].shelljoin}`
|
208
|
+
|
209
|
+
raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
|
210
|
+
raise "export function Init_nokogiri not in dll #{dll}" unless / T _?Init_nokogiri/ === nm
|
211
|
+
|
212
|
+
# if liblzma is being referenced, let's make sure it's referring
|
213
|
+
# to the system-installed file and not the homebrew-installed file.
|
214
|
+
ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
|
215
|
+
if liblzma_refs = ldd.scan(/^\t([^ ]+) /).map(&:first).uniq.grep(/liblzma/)
|
216
|
+
liblzma_refs.each do |ref|
|
217
|
+
new_ref = File.join("/usr/lib", File.basename(ref))
|
218
|
+
sh ["env", "LANG=C", cross_ruby.tool("install_name_tool"), "-change", ref, new_ref, dll].shelljoin
|
219
|
+
end
|
220
|
+
|
221
|
+
# reload!
|
222
|
+
ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
|
223
|
+
end
|
224
|
+
|
225
|
+
# Verify that the DLL dependencies are all allowed.
|
226
|
+
ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
|
227
|
+
actual_imports = ldd.scan(/^\t([^ ]+) /).map(&:first).uniq
|
228
|
+
if !(actual_imports - allowed_imports).empty?
|
229
|
+
raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
|
230
|
+
end
|
231
|
+
end
|
232
|
+
puts "verify_dll: #{dll}: passed shared library sanity checks"
|
233
|
+
end
|
234
|
+
|
235
|
+
CROSS_RUBIES.each do |cross_ruby|
|
236
|
+
task cross_ruby.dll_staging_path do |t|
|
237
|
+
verify_dll t.name, cross_ruby
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
def gem_builder(plat)
|
242
|
+
# use Task#invoke because the pkg/*gem task is defined at runtime
|
243
|
+
Rake::Task["native:#{plat}"].invoke
|
244
|
+
Rake::Task["pkg/#{GEMSPEC.full_name}-#{Gem::Platform.new(plat).to_s}.gem"].invoke
|
245
|
+
end
|
246
|
+
|
247
|
+
namespace "gem" do
|
248
|
+
CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux? || cr.darwin? }.map(&:platform).uniq.each do |plat|
|
249
|
+
pre_req = case plat
|
250
|
+
when /\linux/
|
251
|
+
"sudo yum install -y git"
|
252
|
+
else
|
253
|
+
"sudo apt-get update -y && sudo apt-get install -y automake autoconf libtool build-essential"
|
254
|
+
end
|
255
|
+
desc "build native gem for #{plat} platform"
|
256
|
+
task plat do
|
257
|
+
RakeCompilerDock.sh <<~EOT, platform: plat
|
258
|
+
#{pre_req} &&
|
259
|
+
gem install bundler --no-document &&
|
260
|
+
bundle &&
|
261
|
+
bundle exec rake gem:#{plat}:builder MAKE='nice make -j`nproc`'
|
262
|
+
EOT
|
263
|
+
end
|
264
|
+
|
265
|
+
namespace plat do
|
266
|
+
desc "build native gem for #{plat} platform (guest container)"
|
267
|
+
task "builder" do
|
268
|
+
gem_builder(plat)
|
269
|
+
end
|
270
|
+
task "guest" => "builder" # TODO: remove me after this code is on master, temporary backwards compat for CI
|
271
|
+
end
|
272
|
+
end
|
273
|
+
|
274
|
+
desc "build native gems for windows"
|
275
|
+
multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
|
276
|
+
|
277
|
+
desc "build native gems for linux"
|
278
|
+
multitask "linux" => CROSS_RUBIES.find_all(&:linux?).map(&:platform).uniq
|
279
|
+
|
280
|
+
desc "build native gems for darwin"
|
281
|
+
multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
|
282
|
+
end
|
283
|
+
|
284
|
+
namespace "native" do
|
285
|
+
plat = "x86_64-darwin"
|
286
|
+
namespace plat do
|
287
|
+
desc "build native gem for #{plat} platform on host OS"
|
288
|
+
task "builder" do
|
289
|
+
gem_builder(plat)
|
290
|
+
end
|
291
|
+
task "guest" => "builder" # TODO: remove me after this code is on master, temporary backwards compat for CI
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
require "rake/extensiontask"
|
296
|
+
|
297
|
+
Rake::ExtensionTask.new("express_parser", GEMSPEC) do |ext|
|
298
|
+
ext.ext_dir = "ext/express-parser"
|
299
|
+
ext.lib_dir = File.join(*['lib', 'expressir', 'express_exp', ENV['FAT_DIR']].compact)
|
300
|
+
ext.config_options << ENV['EXTOPTS']
|
301
|
+
ext.cross_compile = true
|
302
|
+
ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
|
303
|
+
ext.cross_config_options << "--enable-cross-build"
|
304
|
+
ext.cross_compiling do |spec|
|
305
|
+
spec.files.reject! { |path| File.fnmatch?('ext/*', path) }
|
306
|
+
spec.dependencies.reject! { |dep| dep.name == 'rice' }
|
307
|
+
end
|
308
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "expressir/express_exp/parser"
|
3
|
+
|
4
|
+
RSpec.describe Expressir::Model::Scope do
|
5
|
+
describe ".head_source" do
|
6
|
+
it "contains original head source" do
|
7
|
+
input = File.read(sample_file)
|
8
|
+
repo = Expressir::ExpressExp::Parser.from_exp(sample_file)
|
9
|
+
|
10
|
+
expected_result = input
|
11
|
+
expect(repo.source).to eq(expected_result)
|
12
|
+
|
13
|
+
repo.schemas[0].tap do |x|
|
14
|
+
start_index = x.source.index("SCHEMA")
|
15
|
+
stop_index = x.source.index(";") + ";".length - 1
|
16
|
+
expected_result = x.source[start_index..stop_index]
|
17
|
+
expect(x.head_source).to eq(expected_result)
|
18
|
+
end
|
19
|
+
|
20
|
+
repo.schemas[1].tap do |x|
|
21
|
+
start_index = x.source.index("SCHEMA")
|
22
|
+
stop_index = x.source.index(";") + ";".length - 1
|
23
|
+
expected_result = x.source[start_index..stop_index]
|
24
|
+
expect(x.head_source).to eq(expected_result)
|
25
|
+
end
|
26
|
+
|
27
|
+
repo.schemas[2].tap do |x|
|
28
|
+
start_index = x.source.index("SCHEMA")
|
29
|
+
stop_index = x.source.index("REFERENCE FROM contract_schema;") + "REFERENCE FROM contract_schema;".length - 1
|
30
|
+
expected_result = x.source[start_index..stop_index]
|
31
|
+
expect(x.head_source).to eq(expected_result)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def sample_file
|
37
|
+
@sample_file ||= Expressir.root_path.join(
|
38
|
+
"original", "examples", "syntax", "source.exp"
|
39
|
+
)
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
require "expressir/express_exp/parser"
|
3
|
+
|
4
|
+
RSpec.describe Expressir::ExpressExp::Parser do
|
5
|
+
describe ".from_files" do
|
6
|
+
it "build an instance from multiple files file" do
|
7
|
+
repo = Expressir::ExpressExp::Parser.from_files(sample_files)
|
8
|
+
|
9
|
+
schemas = repo.schemas
|
10
|
+
expect(schemas.count).to eq(5)
|
11
|
+
expect(schemas[0].id).to eq("syntax_schema")
|
12
|
+
expect(schemas[1].id).to eq("remark_schema")
|
13
|
+
expect(schemas[2].id).to eq("entity_schema")
|
14
|
+
expect(schemas[3].id).to eq("version_entity_schema")
|
15
|
+
expect(schemas[4].id).to eq("version_interface_entity_schema")
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def sample_files
|
20
|
+
@sample_files ||= [
|
21
|
+
Expressir.root_path.join(
|
22
|
+
"original", "examples", "syntax", "syntax.exp"
|
23
|
+
),
|
24
|
+
Expressir.root_path.join(
|
25
|
+
"original", "examples", "syntax", "remark.exp"
|
26
|
+
),
|
27
|
+
Expressir.root_path.join(
|
28
|
+
"original", "examples", "syntax", "source.exp"
|
29
|
+
)
|
30
|
+
]
|
31
|
+
end
|
32
|
+
end
|