expressir 1.2.3 → 1.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.cross_rubies +0 -6
- data/.github/workflows/rake.yml +223 -31
- data/.gitignore +7 -1
- data/.gitmodules +3 -0
- data/.rubocop.yml +13 -4
- data/README.adoc +8 -0
- data/Rakefile +4 -1
- data/bin/console +0 -1
- data/bin/rspec +3 -3
- data/exe/expressir +4 -2
- data/exe/format +1 -1
- data/exe/format-test +25 -25
- data/exe/generate-parser +16 -13
- data/expressir.gemspec +11 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/CMakeLists.txt +44 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj +11 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj.filters +0 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj +11 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj.filters +0 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj +11 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj.filters +0 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj +19 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters +0 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj +51 -35
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_ios.xcscheme +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_static.xcscheme +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +1 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +9 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +43 -18
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +16 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +2 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +16 -13
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +5 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +2 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +9 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +0 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +1 -7
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +51 -31
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +1 -7
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +27 -39
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +1 -7
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +20 -23
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +21 -21
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +4 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +0 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +16 -27
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +12 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +4 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +5 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +2 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +7 -7
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +6 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +15 -18
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +12 -18
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +42 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +13 -53
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +11 -27
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +19 -58
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +7 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +6 -57
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +35 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +29 -36
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +36 -27
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +58 -54
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +77 -31
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +22 -32
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +22 -24
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +335 -464
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +9 -62
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +9 -39
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +6 -22
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +10 -26
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +42 -36
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +36 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +2 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +49 -22
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +20 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +5 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +5 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +10 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +0 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +12 -8
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +2 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +6 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +139 -108
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +10 -43
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +16 -33
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +12 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +69 -82
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +17 -28
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +12 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +45 -11
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +48 -44
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +31 -18
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +3 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +14 -26
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +12 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +15 -32
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +12 -24
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +23 -29
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +13 -19
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +13 -26
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +12 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +6 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +12 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +6 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +12 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +13 -26
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +12 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +6 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +11 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +13 -26
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +13 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +5 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +1 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +6 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +8 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +169 -152
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +26 -19
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +5 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +5 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +2 -11
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +15 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +4 -14
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +22 -11
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +255 -338
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +87 -116
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +56 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +64 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +101 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +21 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +18 -17
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +4 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +5 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +197 -156
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +92 -81
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +23 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +101 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +2 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +11 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +39 -34
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +17 -10
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +5 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +6 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +6 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +5 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +1 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +11 -22
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +27 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +33 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +1 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +4 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +11 -23
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +20 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +2 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +4 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +9 -50
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +57 -48
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +1 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +3 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +3 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +1 -29
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +10 -10
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +15 -28
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +1 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +54 -68
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +35 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +0 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +1 -155
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +2 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +39 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +13 -54
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +16 -29
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +34 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +0 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +25 -23
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +2 -40
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +28 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +242 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +54 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +13 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +7 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +36 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +14 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +14 -19
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +0 -3
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +14 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +22 -0
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +4 -4
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +8 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +30 -6
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +10 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +2 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +4 -5
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +1 -2
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +128 -119
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +18 -27
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +1 -1
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/tests/Utf8Test.cpp +110 -0
- data/ext/express-parser/antlrgen/Express.interp +1 -1
- data/ext/express-parser/antlrgen/ExpressBaseListener.cpp +1 -1
- data/ext/express-parser/antlrgen/ExpressBaseListener.h +1 -1
- data/ext/express-parser/antlrgen/ExpressBaseVisitor.cpp +1 -1
- data/ext/express-parser/antlrgen/ExpressBaseVisitor.h +200 -200
- data/ext/express-parser/antlrgen/ExpressLexer.cpp +645 -1129
- data/ext/express-parser/antlrgen/ExpressLexer.h +20 -27
- data/ext/express-parser/antlrgen/ExpressLexer.interp +1 -1
- data/ext/express-parser/antlrgen/ExpressListener.cpp +1 -1
- data/ext/express-parser/antlrgen/ExpressListener.h +1 -1
- data/ext/express-parser/antlrgen/ExpressParser.cpp +1754 -1447
- data/ext/express-parser/antlrgen/ExpressParser.h +219 -223
- data/ext/express-parser/antlrgen/ExpressVisitor.cpp +1 -1
- data/ext/express-parser/antlrgen/ExpressVisitor.h +200 -200
- data/ext/express-parser/express_parser.cpp +165 -101
- data/ext/express-parser/extconf.rb +14 -14
- data/lib/expressir/config.rb +1 -1
- data/lib/expressir/express/parser.rb +17 -15
- data/lib/expressir/express/visitor.rb +7 -3
- data/lib/expressir/model.rb +78 -78
- data/lib/expressir/version.rb +1 -1
- data/rakelib/antlr4-native.rake +161 -0
- data/rakelib/cross-ruby.rake +213 -162
- data/spec/acceptance/version_spec.rb +17 -2
- data/spec/expressir/express/cache_spec.rb +23 -5
- data/spec/expressir/express/formatter_spec.rb +54 -8
- data/spec/expressir/express/parser_spec.rb +47 -11
- data/spec/expressir/model/model_element_spec.rb +198 -146
- data/spec/spec_helper.rb +7 -0
- metadata +79 -91
- data/demo.rb +0 -18
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.cpp +0 -621
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.h +0 -61
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.cpp +0 -14
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.h +0 -24
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.cpp +0 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.cpp +0 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.cpp +0 -35
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.h +0 -27
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Makefile +0 -67
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.cpp +0 -16
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.cpp +0 -15
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.cpp +0 -12
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.cpp +0 -303
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.h +0 -112
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.cpp +0 -9
- data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.cpp +0 -9
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.exp +0 -9589
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.owl +0 -36619
- data/original/examples/ap233/ap233e1_arm_lf_stepmod-2010-11-12.xml +0 -13294
- data/original/examples/employment/eclipse/.project +0 -17
- data/original/examples/employment/eclipse/Export/Employment.png +0 -0
- data/original/examples/employment/eclipse/Express/employment_schema.exp +0 -33
- data/original/examples/employment/eclipse/Express/employment_schema.xmi +0 -77
- data/original/examples/employment/eclipse/Express/employment_schema.xml +0 -93
- data/original/examples/employment/eclipse/Models/Employment.uml +0 -4
- data/original/examples/employment/eclipse/Models/Employment.umldi +0 -240
- data/original/examples/employment/eclipse/readme.txt +0 -7
- data/original/examples/employment/employment_schema.exp +0 -33
- data/original/examples/employment/employment_schema.rb +0 -232
- data/original/examples/employment/employment_schema.xml +0 -93
- data/original/examples/employment/employment_schema___module.rb +0 -46
- data/original/examples/employment/employment_schema___p28attr.rb +0 -126
- data/original/examples/employment/employment_schema___p28inst.rb +0 -26
- data/original/examples/employment/example_employment_data.xml +0 -1
- data/original/examples/employment/example_employment_data_copy.xml +0 -1
- data/original/examples/employment/example_employment_reader.rb +0 -30
- data/original/examples/employment/example_employment_writer.rb +0 -51
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.exp +0 -3710
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.owl +0 -35880
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xmi +0 -15357
- data/original/examples/plcs/ap239e1_arm_lf_dexlib_2010-01-06.xml +0 -9468
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.exp +0 -8404
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.owl +0 -43147
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xmi +0 -18341
- data/original/examples/plcs/ap239e2_arm_lf_stepmod-2010-01-25.xml +0 -11632
- data/original/exp2ruby.rb +0 -525
- data/original/expsm.rb +0 -34
- data/original/mapping_owl.rb +0 -1018
- data/original/mapping_sysml.rb +0 -2281
- data/original/mapping_uml2.rb +0 -599
- data/original/mapping_uml2_eclipse.rb +0 -433
- data/original/reeper.rb +0 -134
- data/spec/expressr_spec.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be523698bc4b0f210e3beb5e8eaa2b05b5ab33b8c5c32762a269759d6d3f6fd7
|
4
|
+
data.tar.gz: f49b97df3c0fce460a9d5374cff70d6f29b0ada6e972619230398d653e489385
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b816ba44ca7dba9ea6f1186c0ed714255947d52b1412e97109e6b094c8d51234e8fb87b5a24971f68915e5d0180b8dfd8e560910e5994428cd7a18ba8c8c3090
|
7
|
+
data.tar.gz: 3509a1d1edd20451ccb18a7d3bf3fb0e74ea9fad1285fe7c83de32684e9bb117f7509e1f7e8a382215f00ab37f94d4e1c9688171edece8270a37eedb4a77bafb
|
data/.cross_rubies
CHANGED
@@ -1,20 +1,14 @@
|
|
1
|
-
3.1.0:i686-w64-mingw32
|
2
1
|
3.1.0:x86_64-w64-mingw32
|
3
|
-
3.1.0:i686-linux-gnu
|
4
2
|
3.1.0:x86_64-linux-gnu
|
5
3
|
3.1.0:aarch64-linux-gnu
|
6
4
|
3.1.0:x86_64-darwin
|
7
5
|
3.1.0:arm64-darwin
|
8
|
-
3.0.0:i686-w64-mingw32
|
9
6
|
3.0.0:x86_64-w64-mingw32
|
10
|
-
3.0.0:i686-linux-gnu
|
11
7
|
3.0.0:x86_64-linux-gnu
|
12
8
|
3.0.0:aarch64-linux-gnu
|
13
9
|
3.0.0:x86_64-darwin
|
14
10
|
3.0.0:arm64-darwin
|
15
|
-
2.7.0:i686-w64-mingw32
|
16
11
|
2.7.0:x86_64-w64-mingw32
|
17
|
-
2.7.0:i686-linux-gnu
|
18
12
|
2.7.0:x86_64-linux-gnu
|
19
13
|
2.7.0:aarch64-linux-gnu
|
20
14
|
2.7.0:x86_64-darwin
|
data/.github/workflows/rake.yml
CHANGED
@@ -6,79 +6,119 @@ on:
|
|
6
6
|
pull_request:
|
7
7
|
|
8
8
|
jobs:
|
9
|
+
rubocop:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
steps:
|
12
|
+
- name: Checkout
|
13
|
+
uses: actions/checkout@v3
|
14
|
+
with:
|
15
|
+
submodules: recursive
|
16
|
+
|
17
|
+
- name: Install Ruby
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 3.0
|
21
|
+
bundler-cache: true
|
22
|
+
|
23
|
+
- name: Bundle
|
24
|
+
run: bundle install --jobs 4 --retry 3
|
25
|
+
|
26
|
+
- name: Rubocop
|
27
|
+
run: bundle exec rake rubocop
|
28
|
+
|
9
29
|
rake:
|
10
30
|
name: test on ruby-${{ matrix.ruby }} ${{ matrix.os }}
|
11
31
|
runs-on: ${{ matrix.os }}
|
12
|
-
continue-on-error: ${{ matrix.experimental }}
|
13
32
|
strategy:
|
14
33
|
fail-fast: false
|
15
34
|
matrix:
|
16
35
|
ruby: [ '3.1', '3.0', '2.7' ]
|
17
36
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
18
|
-
experimental: [ false ]
|
19
|
-
include:
|
20
|
-
- ruby: 'head'
|
21
|
-
os: 'ubuntu-latest'
|
22
|
-
experimental: true
|
23
|
-
- ruby: 'head'
|
24
|
-
os: 'windows-latest'
|
25
|
-
experimental: true
|
26
|
-
- ruby: 'head'
|
27
|
-
os: 'macos-latest'
|
28
|
-
experimental: true
|
29
37
|
|
30
38
|
steps:
|
31
|
-
-
|
39
|
+
- name: Checkout
|
40
|
+
uses: actions/checkout@v3
|
32
41
|
with:
|
33
42
|
submodules: recursive
|
34
43
|
|
35
|
-
-
|
44
|
+
- name: Setup packages
|
45
|
+
if: startsWith(matrix.os, 'macos')
|
36
46
|
run: brew install autoconf automake libtool
|
37
47
|
|
38
|
-
-
|
48
|
+
- name: Install Ruby
|
49
|
+
uses: ruby/setup-ruby@v1
|
39
50
|
with:
|
40
51
|
ruby-version: ${{ matrix.ruby }}
|
41
52
|
bundler-cache: true
|
42
53
|
|
43
|
-
-
|
54
|
+
- name: Process cache
|
55
|
+
uses: actions/cache@v2
|
56
|
+
id: cache
|
44
57
|
with:
|
45
58
|
path: lib/expressir/express/express_parser.*
|
46
59
|
key: v4-${{ runner.os }}-${{ matrix.ruby }}-${{ hashFiles('ext/express-parser/extconf.rb', 'ext/express-parser/antlrgen/**', 'ext/express-parser/express_parser.cpp', '.git/modules/ext/express-parser/antlr4-upstream/HEAD') }}
|
47
60
|
|
48
|
-
-
|
61
|
+
- name: Build native extension
|
62
|
+
if: steps.cache.outputs.cache-hit != 'true'
|
49
63
|
run: bundle exec rake compile
|
50
64
|
|
51
|
-
-
|
65
|
+
- name: Run tests
|
66
|
+
run: |
|
67
|
+
bundle exec rake
|
68
|
+
cat .rspec_status
|
52
69
|
|
53
70
|
# test release workflow
|
54
|
-
pack:
|
55
|
-
runs-on: ubuntu-
|
71
|
+
pack-ruby:
|
72
|
+
runs-on: ubuntu-latest
|
56
73
|
strategy:
|
57
74
|
fail-fast: false
|
58
|
-
matrix:
|
59
|
-
host: [ linux, windows, darwin ]
|
60
75
|
steps:
|
61
|
-
-
|
76
|
+
- name: Checkout
|
77
|
+
uses: actions/checkout@v3
|
62
78
|
with:
|
63
79
|
submodules: recursive
|
64
80
|
|
65
|
-
-
|
81
|
+
- name: Setup Ruby
|
82
|
+
uses: ruby/setup-ruby@v1
|
66
83
|
with:
|
67
84
|
ruby-version: '3.0'
|
68
85
|
# bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
|
69
86
|
# more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
|
70
87
|
|
71
|
-
-
|
88
|
+
- name: Bundle
|
89
|
+
run: bundle install --jobs 4 --retry 3
|
72
90
|
|
73
|
-
|
74
|
-
|
91
|
+
- name: Build gem without native extension
|
92
|
+
run: gem build expressir.gemspec
|
75
93
|
|
76
|
-
-
|
94
|
+
- name: Package gem without native extension
|
77
95
|
uses: actions/upload-artifact@v2
|
78
96
|
with:
|
79
97
|
name: pkg-ruby
|
80
98
|
path: expressir-*.gem
|
81
99
|
|
100
|
+
pack:
|
101
|
+
runs-on: ubuntu-latest
|
102
|
+
strategy:
|
103
|
+
fail-fast: false
|
104
|
+
matrix:
|
105
|
+
host: [ linux, windows, darwin ]
|
106
|
+
steps:
|
107
|
+
- name: Checkout
|
108
|
+
uses: actions/checkout@v3
|
109
|
+
with:
|
110
|
+
submodules: recursive
|
111
|
+
|
112
|
+
- name: Setup Ruby
|
113
|
+
uses: ruby/setup-ruby@v1
|
114
|
+
with:
|
115
|
+
ruby-version: '3.0'
|
116
|
+
# bundler-cache: true important to not use cache because it leads to "cannot find -lrice"
|
117
|
+
# more info https://github.com/lutaml/expressir/runs/2097658383?check_suite_focus=true#step:7:2126
|
118
|
+
|
119
|
+
- name: Bundle
|
120
|
+
run: bundle install --jobs 4 --retry 3
|
121
|
+
|
82
122
|
- name: Enable swap
|
83
123
|
run: |
|
84
124
|
sudo fallocate -l 15g /compile.swap
|
@@ -87,10 +127,162 @@ jobs:
|
|
87
127
|
sudo swapon /compile.swap
|
88
128
|
sudo swapon --all --verbose
|
89
129
|
|
90
|
-
|
91
|
-
|
130
|
+
- name: Build gem with native extension
|
131
|
+
run: bundle exec rake gem:${{ matrix.host }}
|
92
132
|
|
93
|
-
-
|
133
|
+
- name: Package gem with native extension
|
134
|
+
uses: actions/upload-artifact@v2
|
94
135
|
with:
|
95
136
|
name: pkg-${{ matrix.host }}
|
96
137
|
path: pkg/*.gem
|
138
|
+
|
139
|
+
verify-ruby:
|
140
|
+
name: verify ruby gem on ruby-${{ matrix.ruby }} ${{ matrix.os }}
|
141
|
+
needs: pack-ruby
|
142
|
+
runs-on: ${{ matrix.os }}
|
143
|
+
strategy:
|
144
|
+
fail-fast: false
|
145
|
+
matrix:
|
146
|
+
ruby: [ '3.1', '3.0', '2.7' ]
|
147
|
+
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
148
|
+
steps:
|
149
|
+
- name: Install Ruby
|
150
|
+
uses: ruby/setup-ruby@v1
|
151
|
+
with:
|
152
|
+
ruby-version: ${{ matrix.ruby }}
|
153
|
+
bundler-cache: true
|
154
|
+
|
155
|
+
- name: Checkout
|
156
|
+
uses: actions/checkout@v3
|
157
|
+
with:
|
158
|
+
submodules: recursive
|
159
|
+
|
160
|
+
- name: Bundle
|
161
|
+
run: bundle install --jobs 4 --retry 3
|
162
|
+
|
163
|
+
- name: Download packaged gem
|
164
|
+
uses: actions/download-artifact@v2
|
165
|
+
with:
|
166
|
+
name: pkg-ruby
|
167
|
+
path: pkg
|
168
|
+
|
169
|
+
- name: Install gem
|
170
|
+
run: gem install -l pkg/expressir-*.gem
|
171
|
+
|
172
|
+
- name: Verify
|
173
|
+
run: |
|
174
|
+
cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
|
175
|
+
ruby bin/rspec
|
176
|
+
cat .rspec_status || echo ".rspec_status was not found"
|
177
|
+
|
178
|
+
verify-darwin:
|
179
|
+
name: verify MacOS binary gem on ruby-${{ matrix.ruby }}
|
180
|
+
needs: pack
|
181
|
+
runs-on: macos-latest
|
182
|
+
strategy:
|
183
|
+
fail-fast: false
|
184
|
+
matrix:
|
185
|
+
ruby: [ '3.1', '3.0', '2.7' ]
|
186
|
+
steps:
|
187
|
+
- name: Install Ruby
|
188
|
+
uses: ruby/setup-ruby@v1
|
189
|
+
with:
|
190
|
+
ruby-version: ${{ matrix.ruby }}
|
191
|
+
bundler-cache: true
|
192
|
+
|
193
|
+
- name: Checkout
|
194
|
+
uses: actions/checkout@v3
|
195
|
+
|
196
|
+
- name: Bundle
|
197
|
+
run: bundle install --jobs 4 --retry 3
|
198
|
+
|
199
|
+
- name: Download packaged gem
|
200
|
+
uses: actions/download-artifact@v2
|
201
|
+
with:
|
202
|
+
name: pkg-darwin
|
203
|
+
path: pkg
|
204
|
+
|
205
|
+
- name: Install binary gem
|
206
|
+
run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM.sub(/darwin\d{2}$/, 'darwin')").gem
|
207
|
+
# MacOS with have something like x86_64-darwin19, others just x86_64-linux
|
208
|
+
|
209
|
+
- name: Verify
|
210
|
+
run: |
|
211
|
+
cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
|
212
|
+
ruby bin/rspec
|
213
|
+
cat .rspec_status || echo ".rspec_status was not found"
|
214
|
+
|
215
|
+
verify-linux:
|
216
|
+
name: verify Linux binary gem on ruby-${{ matrix.ruby }}
|
217
|
+
needs: pack
|
218
|
+
runs-on: ubuntu-latest
|
219
|
+
strategy:
|
220
|
+
fail-fast: false
|
221
|
+
matrix:
|
222
|
+
ruby: [ '3.1', '3.0', '2.7' ]
|
223
|
+
steps:
|
224
|
+
- name: Install Ruby
|
225
|
+
uses: ruby/setup-ruby@v1
|
226
|
+
with:
|
227
|
+
ruby-version: ${{ matrix.ruby }}
|
228
|
+
bundler-cache: true
|
229
|
+
|
230
|
+
- name: Checkout
|
231
|
+
uses: actions/checkout@v3
|
232
|
+
|
233
|
+
- name: Bundle
|
234
|
+
run: bundle install --jobs 4 --retry 3
|
235
|
+
|
236
|
+
- name: Download packaged gem
|
237
|
+
uses: actions/download-artifact@v2
|
238
|
+
with:
|
239
|
+
name: pkg-linux
|
240
|
+
path: pkg
|
241
|
+
|
242
|
+
- name: Install binary gem
|
243
|
+
run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
|
244
|
+
|
245
|
+
- name: Verify
|
246
|
+
run: |
|
247
|
+
cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
|
248
|
+
ruby bin/rspec
|
249
|
+
cat .rspec_status || echo ".rspec_status was not found"
|
250
|
+
|
251
|
+
verify-windows:
|
252
|
+
name: verify Windows binary gem on ruby-${{ matrix.ruby }}
|
253
|
+
needs: pack
|
254
|
+
continue-on-error: true
|
255
|
+
runs-on: windows-latest
|
256
|
+
strategy:
|
257
|
+
fail-fast: false
|
258
|
+
# Ruby 3.1 fails
|
259
|
+
# https://github.com/lutaml/expressir/issues/103
|
260
|
+
matrix:
|
261
|
+
ruby: [ '3.1', '3.0', '2.7' ]
|
262
|
+
steps:
|
263
|
+
- name: Install Ruby
|
264
|
+
uses: ruby/setup-ruby@v1
|
265
|
+
with:
|
266
|
+
ruby-version: ${{ matrix.ruby }}
|
267
|
+
bundler-cache: true
|
268
|
+
|
269
|
+
- name: Checkout
|
270
|
+
uses: actions/checkout@v3
|
271
|
+
|
272
|
+
- name: Bundle
|
273
|
+
run: bundle install --jobs 4 --retry 3
|
274
|
+
|
275
|
+
- name: Download packaged gem
|
276
|
+
uses: actions/download-artifact@v2
|
277
|
+
with:
|
278
|
+
name: pkg-windows
|
279
|
+
path: pkg
|
280
|
+
|
281
|
+
- name: Install binary gem
|
282
|
+
run: gem install -l pkg/expressir-*-$(ruby -e "puts RUBY_PLATFORM").gem
|
283
|
+
|
284
|
+
- name: Verify
|
285
|
+
run: |
|
286
|
+
cd $(ruby -e "puts RbConfig::TOPDIR + '\/lib\/ruby\/gems\/' + RbConfig::CONFIG['ruby_version'] + '\/gems\/expressir*'")
|
287
|
+
ruby bin/rspec
|
288
|
+
cat .rspec_status || echo ".rspec_status was not found"
|
data/.gitignore
CHANGED
@@ -8,10 +8,16 @@
|
|
8
8
|
/tmp/
|
9
9
|
/Gemfile.lock
|
10
10
|
/.idea
|
11
|
+
/.vscode
|
11
12
|
/lib/expressir/express/express_parser.bundle
|
13
|
+
/lib/expressir/express/express_parser.so
|
14
|
+
/lib/expressir/express/*/express_parser.bundle
|
15
|
+
/lib/expressir/express/*/express_parser.so
|
12
16
|
/spec/syntax/*-pretty.exp
|
17
|
+
/ext/express-parser/rice-embed
|
13
18
|
|
14
19
|
# rspec failure tracking
|
15
20
|
.rspec_status
|
16
21
|
|
17
|
-
|
22
|
+
# rubocop guide
|
23
|
+
.rubocop-https---*
|
data/.gitmodules
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,8 +1,17 @@
|
|
1
1
|
inherit_from:
|
2
2
|
- https://raw.githubusercontent.com/riboseinc/oss-guides/master/ci/rubocop.yml
|
3
3
|
|
4
|
-
# local repo-specific modifications
|
5
|
-
# ...
|
6
|
-
|
7
4
|
AllCops:
|
8
|
-
TargetRubyVersion: 2.
|
5
|
+
TargetRubyVersion: 2.6
|
6
|
+
SuggestExtensions: false
|
7
|
+
Exclude:
|
8
|
+
- 'vendor/**/*'
|
9
|
+
- 'expressir.gemspec'
|
10
|
+
- 'tmp/**/*'
|
11
|
+
- 'pkg/**/*'
|
12
|
+
- 'exe/format-test'
|
13
|
+
- 'lib/expressir/express/**/*'
|
14
|
+
- 'lib/expressir/model/**/*'
|
15
|
+
|
16
|
+
Layout/LineLength:
|
17
|
+
Max: 160
|
data/README.adoc
CHANGED
@@ -75,6 +75,14 @@ Run the test suite
|
|
75
75
|
bin/rspec
|
76
76
|
----
|
77
77
|
|
78
|
+
=== Grammar updates
|
79
|
+
EXPRESS grammar is lined as git submodule to ext/express-grammar
|
80
|
+
Shoudl you update it, run ```rake generate```. This command will generate source code for updated native extension using antlr4-native gem.
|
81
|
+
Please note that we create several classes on top of antlr4-native output so using embedded rake task is a real requirement.
|
82
|
+
|
83
|
+
When new extension is gnerated and tested plase check in updated C++ files to git (```rake generate``` is NOT a CI step,
|
84
|
+
extension source files are pulled from the repo).
|
85
|
+
|
78
86
|
== Installation
|
79
87
|
|
80
88
|
Add this line to your application's `Gemfile`:
|
data/Rakefile
CHANGED
@@ -1,14 +1,17 @@
|
|
1
1
|
require "bundler/gem_tasks"
|
2
2
|
require "rspec/core/rake_task"
|
3
3
|
require "rake/extensiontask"
|
4
|
+
require "rubocop/rake_task"
|
4
5
|
require "yard"
|
5
6
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
7
8
|
|
8
|
-
task :
|
9
|
+
task default: :spec
|
9
10
|
|
10
11
|
GEMSPEC = Gem::Specification.load("expressir.gemspec")
|
11
12
|
|
13
|
+
RuboCop::RakeTask.new
|
14
|
+
|
12
15
|
Gem::PackageTask.new(GEMSPEC).define
|
13
16
|
|
14
17
|
YARD::Rake::YardocTask.new
|
data/bin/console
CHANGED
data/bin/rspec
CHANGED
@@ -10,12 +10,12 @@
|
|
10
10
|
|
11
11
|
require "pathname"
|
12
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
13
|
-
|
13
|
+
Pathname.new(__FILE__).realpath)
|
14
14
|
|
15
|
-
bundle_binstub = File.expand_path("
|
15
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
16
16
|
|
17
17
|
if File.file?(bundle_binstub)
|
18
|
-
if
|
18
|
+
if /This file was generated by Bundler/.match?(File.read(bundle_binstub, 300))
|
19
19
|
load(bundle_binstub)
|
20
20
|
else
|
21
21
|
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
data/exe/expressir
CHANGED
@@ -11,8 +11,10 @@ $:.unshift File.expand_path("../../lib", bin_file)
|
|
11
11
|
# Fixes https://github.com/rubygems/rubygems/issues/1420
|
12
12
|
require "rubygems/specification"
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
module Gem
|
15
|
+
class Specification
|
16
|
+
def this; self; end
|
17
|
+
end
|
16
18
|
end
|
17
19
|
|
18
20
|
# start up the CLI
|
data/exe/format
CHANGED
data/exe/format-test
CHANGED
@@ -24,30 +24,30 @@ exp_files = [
|
|
24
24
|
# '../iso-10303-stepmod/data/resources/iso13584_expressions_schema/iso13584_expressions_schema.exp',
|
25
25
|
# annotated-express test (12s)
|
26
26
|
# see https://github.com/metanorma/annotated-express/blob/master/data/documents/resources/fundamentals_of_product_description_and_support/sections/04-schemas.adoc
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
27
|
+
"../iso-10303-stepmod/data/resources/action_schema/action_schema_annotated.exp",
|
28
|
+
"../iso-10303-stepmod/data/resources/application_context_schema/application_context_schema_annotated.exp",
|
29
|
+
"../iso-10303-stepmod/data/resources/approval_schema/approval_schema_annotated.exp",
|
30
|
+
"../iso-10303-stepmod/data/resources/basic_attribute_schema/basic_attribute_schema_annotated.exp",
|
31
|
+
"../iso-10303-stepmod/data/resources/certification_schema/certification_schema_annotated.exp",
|
32
|
+
"../iso-10303-stepmod/data/resources/contract_schema/contract_schema_annotated.exp",
|
33
|
+
"../iso-10303-stepmod/data/resources/date_time_schema/date_time_schema_annotated.exp",
|
34
|
+
"../iso-10303-stepmod/data/resources/document_schema/document_schema.exp",
|
35
|
+
"../iso-10303-stepmod/data/resources/effectivity_schema/effectivity_schema_annotated.exp",
|
36
|
+
"../iso-10303-stepmod/data/resources/experience_schema/experience_schema_annotated.exp",
|
37
|
+
"../iso-10303-stepmod/data/resources/external_reference_schema/external_reference_schema_annotated.exp",
|
38
|
+
"../iso-10303-stepmod/data/resources/group_schema/group_schema_annotated.exp",
|
39
|
+
"../iso-10303-stepmod/data/resources/language_schema/language_schema_annotated.exp",
|
40
|
+
"../iso-10303-stepmod/data/resources/location_schema/location_schema_annotated.exp",
|
41
|
+
"../iso-10303-stepmod/data/resources/management_resources_schema/management_resources_schema_annotated.exp",
|
42
|
+
"../iso-10303-stepmod/data/resources/measure_schema/measure_schema_annotated.exp",
|
43
|
+
"../iso-10303-stepmod/data/resources/person_organization_schema/person_organization_schema_annotated.exp",
|
44
|
+
"../iso-10303-stepmod/data/resources/process_property_schema/process_property_schema_annotated.exp",
|
45
|
+
"../iso-10303-stepmod/data/resources/product_definition_schema/product_definition_schema_annotated.exp",
|
46
|
+
"../iso-10303-stepmod/data/resources/product_property_definition_schema/product_property_definition_schema_annotated.exp",
|
47
|
+
"../iso-10303-stepmod/data/resources/product_property_representation_schema/product_property_representation_schema_annotated.exp",
|
48
|
+
"../iso-10303-stepmod/data/resources/qualifications_schema/qualifications_schema_annotated.exp",
|
49
|
+
"../iso-10303-stepmod/data/resources/security_classification_schema/security_classification_schema_annotated.exp",
|
50
|
+
"../iso-10303-stepmod/data/resources/support_resource_schema/support_resource_schema_annotated.exp",
|
51
51
|
# full test (6m18s + 8s = 6m26s)
|
52
52
|
# *`bundle exec ../stepmod-utils/exe/stepmod-find-express-files ../iso-10303-stepmod`.strip.split("\n").map{|file| File.exists?(file.sub(/\.exp$/, '_annotated.exp')) ? file.sub(/\.exp$/, '_annotated.exp') : file}
|
53
53
|
]
|
@@ -78,4 +78,4 @@ end
|
|
78
78
|
result = repository.to_hash(formatter: formatter, skip_empty: true)
|
79
79
|
puts "Repository.to_hash time: #{(Time.now - start).round(2)}s"
|
80
80
|
|
81
|
-
# puts YAML.dump(result)
|
81
|
+
# puts YAML.dump(result)
|
data/exe/generate-parser
CHANGED
@@ -1,29 +1,30 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "fileutils"
|
4
|
+
require "antlr4-native"
|
5
5
|
|
6
6
|
grammar_file = ARGV.shift
|
7
7
|
|
8
8
|
# ANTLR does weird things if the grammar file isn't in the current working directory
|
9
|
-
temp_grammar_file = File.join(FileUtils.pwd
|
9
|
+
temp_grammar_file = File.join(FileUtils.pwd, File.basename(grammar_file))
|
10
10
|
FileUtils.cp(grammar_file, temp_grammar_file)
|
11
11
|
|
12
12
|
# generate parser
|
13
13
|
generator = Antlr4Native::Generator.new(
|
14
14
|
grammar_files: [File.basename(temp_grammar_file)],
|
15
|
-
output_dir:
|
16
|
-
parser_root_method:
|
15
|
+
output_dir: "ext",
|
16
|
+
parser_root_method: "syntax",
|
17
17
|
)
|
18
18
|
generator.generate
|
19
19
|
|
20
20
|
# fix issues with generated parser
|
21
|
-
parser_source_file = File.join(
|
22
|
-
parser_source_lines = File.read(parser_source_file).split(
|
21
|
+
parser_source_file = File.join("ext", "express-parser", "express_parser.cpp")
|
22
|
+
parser_source_lines = File.read(parser_source_file).split("\n")
|
23
23
|
|
24
24
|
# - add ParserProxy tokens method, simple compensation for missing exposed BufferedTokenStream
|
25
|
-
i = parser_source_lines.index{|x| x ==
|
26
|
-
parser_source_lines[i + 6] +=
|
25
|
+
i = parser_source_lines.index { |x| x == " Object syntax() {" }
|
26
|
+
parser_source_lines[i + 6] += <<~CPP.split("\n").map { |x| x == "" ? x : " #{x}" }.join("\n")
|
27
|
+
|
27
28
|
Array getTokens() {
|
28
29
|
Array a;
|
29
30
|
|
@@ -35,14 +36,16 @@ parser_source_lines[i + 6] += "\n" + <<~CPP.split(/\n/).map{|x| x != "" ? " " +
|
|
35
36
|
|
36
37
|
return a;
|
37
38
|
}
|
39
|
+
|
38
40
|
CPP
|
39
|
-
i = parser_source_lines.index{|x| x == ' .define_method("syntax", &ParserProxy::syntax)'}
|
40
|
-
parser_source_lines[i] +=
|
41
|
+
i = parser_source_lines.index { |x| x == ' .define_method("syntax", &ParserProxy::syntax, Return().keepAlive())' }
|
42
|
+
parser_source_lines[i] += <<~CPP.split("\n").map { |x| x == "" ? x : " #{x}" }.join("\n")
|
43
|
+
|
41
44
|
.define_method("tokens", &ParserProxy::getTokens)
|
42
45
|
CPP
|
43
46
|
|
44
47
|
# write fixed parser file
|
45
|
-
File.write(parser_source_file, parser_source_lines.join("\n")
|
48
|
+
File.write(parser_source_file, "#{parser_source_lines.join("\n")}\n")
|
46
49
|
|
47
50
|
# cleanup
|
48
|
-
FileUtils.rm(temp_grammar_file)
|
51
|
+
FileUtils.rm(temp_grammar_file)
|
data/expressir.gemspec
CHANGED
@@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.metadata["source_code_uri"] = spec.homepage
|
18
18
|
spec.metadata["changelog_uri"] = "https://github.com/lutaml/expressir/releases"
|
19
19
|
|
20
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
20
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
|
21
21
|
|
22
22
|
spec.files = `git ls-files`.split("\n")\
|
23
|
-
+ Dir.glob(
|
23
|
+
+ Dir.glob("ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/**/*")
|
24
24
|
|
25
25
|
spec.test_files = `git ls-files -- {spec}/*`.split("\n")
|
26
26
|
|
@@ -30,17 +30,19 @@ Gem::Specification.new do |spec|
|
|
30
30
|
|
31
31
|
spec.extensions = File.join(*%w(ext express-parser extconf.rb))
|
32
32
|
|
33
|
-
spec.add_runtime_dependency "thor", "~> 1.0"
|
34
33
|
spec.add_runtime_dependency "rice", "~> 4.0.3"
|
34
|
+
spec.add_runtime_dependency "thor", "~> 1.0"
|
35
|
+
spec.add_development_dependency "antlr4-native", "~> 2.1.0"
|
35
36
|
spec.add_development_dependency "asciidoctor", "~> 2.0.13"
|
36
|
-
spec.add_development_dependency "antlr4-native", "~> 1.1.0"
|
37
37
|
spec.add_development_dependency "bundler", "~> 2.0"
|
38
|
-
spec.add_development_dependency "pry", "~> 0.12.2"
|
39
38
|
spec.add_development_dependency "byebug", "~> 11.1"
|
39
|
+
spec.add_development_dependency "pry", "~> 0.12.2"
|
40
40
|
spec.add_development_dependency "rake", "~> 13.0"
|
41
|
-
spec.add_development_dependency "rake-compiler", "~> 1.
|
42
|
-
spec.add_development_dependency "rake-compiler-dock", "~> 1.1"
|
43
|
-
spec.add_development_dependency "rspec", "~> 3.
|
44
|
-
spec.add_development_dependency "
|
41
|
+
spec.add_development_dependency "rake-compiler", "~> 1.2"
|
42
|
+
spec.add_development_dependency "rake-compiler-dock", "~> 1.2.1"
|
43
|
+
spec.add_development_dependency "rspec", "~> 3.11"
|
44
|
+
spec.add_development_dependency "rubocop", "1.5.2"
|
45
|
+
spec.add_development_dependency "rubocop-performance", "~> 1.0"
|
45
46
|
spec.add_development_dependency "webrick", "~> 1.7.0"
|
47
|
+
spec.add_development_dependency "yard", "~> 0.9.26"
|
46
48
|
end
|