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
data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.h
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "atn/Transition.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace atn {
|
12
|
-
|
13
|
-
class ANTState;
|
14
|
-
|
15
|
-
class ANTLR4CPP_PUBLIC AbstractPredicateTransition : public Transition {
|
16
|
-
|
17
|
-
public:
|
18
|
-
AbstractPredicateTransition(ATNState *target);
|
19
|
-
~AbstractPredicateTransition();
|
20
|
-
|
21
|
-
};
|
22
|
-
|
23
|
-
} // namespace atn
|
24
|
-
} // namespace antlr4
|
data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.cpp
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/BasicBlockStartState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t BasicBlockStartState::getStateType() {
|
11
|
-
return BLOCK_START;
|
12
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/BasicState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t BasicState::getStateType() {
|
11
|
-
return BASIC;
|
12
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/BlockEndState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
BlockEndState::BlockEndState() : startState(nullptr) {
|
11
|
-
}
|
12
|
-
|
13
|
-
size_t BlockEndState::getStateType() {
|
14
|
-
return BLOCK_END;
|
15
|
-
}
|
@@ -1,9 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "BlockStartState.h"
|
7
|
-
|
8
|
-
antlr4::atn::BlockStartState::~BlockStartState() {
|
9
|
-
}
|
data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.cpp
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/EmptyPredictionContext.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
EmptyPredictionContext::EmptyPredictionContext() : SingletonPredictionContext(nullptr, EMPTY_RETURN_STATE) {
|
11
|
-
}
|
12
|
-
|
13
|
-
bool EmptyPredictionContext::isEmpty() const {
|
14
|
-
return true;
|
15
|
-
}
|
16
|
-
|
17
|
-
size_t EmptyPredictionContext::size() const {
|
18
|
-
return 1;
|
19
|
-
}
|
20
|
-
|
21
|
-
Ref<PredictionContext> EmptyPredictionContext::getParent(size_t /*index*/) const {
|
22
|
-
return nullptr;
|
23
|
-
}
|
24
|
-
|
25
|
-
size_t EmptyPredictionContext::getReturnState(size_t /*index*/) const {
|
26
|
-
return returnState;
|
27
|
-
}
|
28
|
-
|
29
|
-
bool EmptyPredictionContext::operator == (const PredictionContext &o) const {
|
30
|
-
return this == &o;
|
31
|
-
}
|
32
|
-
|
33
|
-
std::string EmptyPredictionContext::toString() const {
|
34
|
-
return "$";
|
35
|
-
}
|
data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.h
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#pragma once
|
7
|
-
|
8
|
-
#include "atn/SingletonPredictionContext.h"
|
9
|
-
|
10
|
-
namespace antlr4 {
|
11
|
-
namespace atn {
|
12
|
-
|
13
|
-
class ANTLR4CPP_PUBLIC EmptyPredictionContext : public SingletonPredictionContext {
|
14
|
-
public:
|
15
|
-
EmptyPredictionContext();
|
16
|
-
|
17
|
-
virtual bool isEmpty() const override;
|
18
|
-
virtual size_t size() const override;
|
19
|
-
virtual Ref<PredictionContext> getParent(size_t index) const override;
|
20
|
-
virtual size_t getReturnState(size_t index) const override;
|
21
|
-
virtual std::string toString() const override;
|
22
|
-
|
23
|
-
virtual bool operator == (const PredictionContext &o) const override;
|
24
|
-
};
|
25
|
-
|
26
|
-
} // namespace atn
|
27
|
-
} // namespace antlr4
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/LoopEndState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t LoopEndState::getStateType() {
|
11
|
-
return LOOP_END;
|
12
|
-
}
|
@@ -1,67 +0,0 @@
|
|
1
|
-
|
2
|
-
CXXFLAGS += -g -std=c++0x -Wall #-Wextra
|
3
|
-
CXXFLAGS += -I. -I../ -I../misc/ -I../tree/ -I../dfa/ \
|
4
|
-
-I../../../../../antlrcpp/
|
5
|
-
|
6
|
-
#TODO LDFLAGS += ?
|
7
|
-
|
8
|
-
ALL_CXXFLAGS = $(CPPFLAGS) $(CXXFLAGS)
|
9
|
-
ALL_LDFLAGS = $(LDFLAGS)
|
10
|
-
|
11
|
-
# Escote's files
|
12
|
-
SRCS = \
|
13
|
-
AbstractPredicateTransition.cpp \
|
14
|
-
ActionTransition.cpp \
|
15
|
-
ArrayPredictionContext.cpp \
|
16
|
-
ATNDeserializationOptions.cpp \
|
17
|
-
ATNDeserializer.cpp \
|
18
|
-
ATNState.cpp \
|
19
|
-
ATNType.cpp \
|
20
|
-
AtomTransition.cpp \
|
21
|
-
BasicBlockStartState.cpp \
|
22
|
-
BasicState.cpp \
|
23
|
-
BlockEndState.cpp \
|
24
|
-
BlockStartState.cpp \
|
25
|
-
DecisionState.cpp \
|
26
|
-
EmptyPredictionContext.cpp \
|
27
|
-
EpsilonTransition.cpp \
|
28
|
-
LexerATNConfig.cpp \
|
29
|
-
LoopEndState.cpp
|
30
|
-
# Escote's TODO: LL1Analyzer.cpp LexerATNSimulator.cpp ATNSimulator.cpp \
|
31
|
-
ATNSerializer.cpp ATNConfigSet.cpp ATNConfig.cpp \
|
32
|
-
ATN.cpp
|
33
|
-
|
34
|
-
# Alejandro's files
|
35
|
-
SRCS += \
|
36
|
-
NotSetTransition.cpp \
|
37
|
-
OrderedATNConfigSet.cpp \
|
38
|
-
PlusBlockStartState.cpp \
|
39
|
-
PlusLoopbackState.cpp \
|
40
|
-
PredicateTransition.cpp \
|
41
|
-
PredictionMode.cpp \
|
42
|
-
RangeTransition.cpp \
|
43
|
-
RuleStartState.cpp \
|
44
|
-
RuleStopState.cpp \
|
45
|
-
RuleTransition.cpp \
|
46
|
-
SemanticContext.cpp \
|
47
|
-
SetTransition.cpp \
|
48
|
-
SingletonPredictionContext.cpp \
|
49
|
-
StarBlockStartState.cpp \
|
50
|
-
StarLoopbackState.cpp \
|
51
|
-
StarLoopEntryState.cpp \
|
52
|
-
TokensStartState.cpp \
|
53
|
-
Transition.cpp \
|
54
|
-
WildcardTransition.cpp
|
55
|
-
# Alejandro's TODO: PredictionContext.cpp PredictionContextCache.cpp \
|
56
|
-
PrecedencePredicateTransition.cpp ParserATNSimulator.cpp
|
57
|
-
|
58
|
-
OBJS = $(SRCS:.cpp=.o)
|
59
|
-
|
60
|
-
all: $(OBJS)
|
61
|
-
|
62
|
-
%.o: %.cpp
|
63
|
-
$(CXX) -c $(ALL_CXXFLAGS) $< -o $@
|
64
|
-
|
65
|
-
clean:
|
66
|
-
$(RM) $(OBJS)
|
67
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/PlusBlockStartState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t PlusBlockStartState::getStateType() {
|
11
|
-
return PLUS_BLOCK_START;
|
12
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/PlusLoopbackState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t PlusLoopbackState::getStateType() {
|
11
|
-
return PLUS_LOOP_BACK;
|
12
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/RuleStartState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
RuleStartState::RuleStartState() {
|
11
|
-
isLeftRecursiveRule = false;
|
12
|
-
}
|
13
|
-
|
14
|
-
size_t RuleStartState::getStateType() {
|
15
|
-
return RULE_START;
|
16
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/RuleStopState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t RuleStopState::getStateType() {
|
11
|
-
return RULE_STOP;
|
12
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/StarBlockStartState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t StarBlockStartState::getStateType() {
|
11
|
-
return STAR_BLOCK_START;
|
12
|
-
}
|
@@ -1,15 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/StarLoopEntryState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
StarLoopEntryState::StarLoopEntryState() : DecisionState(), isPrecedenceDecision(false) {
|
11
|
-
}
|
12
|
-
|
13
|
-
size_t StarLoopEntryState::getStateType() {
|
14
|
-
return STAR_LOOP_ENTRY;
|
15
|
-
}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/* Copyright (c) 2012-2017 The ANTLR Project. All rights reserved.
|
2
|
-
* Use of this file is governed by the BSD 3-clause license that
|
3
|
-
* can be found in the LICENSE.txt file in the project root.
|
4
|
-
*/
|
5
|
-
|
6
|
-
#include "atn/TokensStartState.h"
|
7
|
-
|
8
|
-
using namespace antlr4::atn;
|
9
|
-
|
10
|
-
size_t TokensStartState::getStateType() {
|
11
|
-
return TOKEN_START;
|
12
|
-
}
|
@@ -1,303 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
The MIT License (MIT)
|
3
|
-
|
4
|
-
Copyright (c) 2014 Graeme Hill (http://graemehill.ca)
|
5
|
-
|
6
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
7
|
-
of this software and associated documentation files (the "Software"), to deal
|
8
|
-
in the Software without restriction, including without limitation the rights
|
9
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
10
|
-
copies of the Software, and to permit persons to whom the Software is
|
11
|
-
furnished to do so, subject to the following conditions:
|
12
|
-
|
13
|
-
The above copyright notice and this permission notice shall be included in
|
14
|
-
all copies or substantial portions of the Software.
|
15
|
-
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
17
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
18
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
19
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
20
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
21
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
22
|
-
THE SOFTWARE.
|
23
|
-
*/
|
24
|
-
|
25
|
-
#include "guid.h"
|
26
|
-
|
27
|
-
#ifdef GUID_LIBUUID
|
28
|
-
#include <uuid/uuid.h>
|
29
|
-
#endif
|
30
|
-
|
31
|
-
#ifdef GUID_CFUUID
|
32
|
-
#include <CoreFoundation/CFUUID.h>
|
33
|
-
#endif
|
34
|
-
|
35
|
-
#ifdef GUID_WINDOWS
|
36
|
-
#include <objbase.h>
|
37
|
-
#endif
|
38
|
-
|
39
|
-
#ifdef GUID_ANDROID
|
40
|
-
#include <jni.h>
|
41
|
-
#endif
|
42
|
-
|
43
|
-
using namespace std;
|
44
|
-
|
45
|
-
// overload << so that it's easy to convert to a string
|
46
|
-
ostream &operator<<(ostream &s, const Guid &guid)
|
47
|
-
{
|
48
|
-
return s << hex << setfill('0')
|
49
|
-
<< setw(2) << (int)guid._bytes[0]
|
50
|
-
<< setw(2) << (int)guid._bytes[1]
|
51
|
-
<< setw(2) << (int)guid._bytes[2]
|
52
|
-
<< setw(2) << (int)guid._bytes[3]
|
53
|
-
<< "-"
|
54
|
-
<< setw(2) << (int)guid._bytes[4]
|
55
|
-
<< setw(2) << (int)guid._bytes[5]
|
56
|
-
<< "-"
|
57
|
-
<< setw(2) << (int)guid._bytes[6]
|
58
|
-
<< setw(2) << (int)guid._bytes[7]
|
59
|
-
<< "-"
|
60
|
-
<< setw(2) << (int)guid._bytes[8]
|
61
|
-
<< setw(2) << (int)guid._bytes[9]
|
62
|
-
<< "-"
|
63
|
-
<< setw(2) << (int)guid._bytes[10]
|
64
|
-
<< setw(2) << (int)guid._bytes[11]
|
65
|
-
<< setw(2) << (int)guid._bytes[12]
|
66
|
-
<< setw(2) << (int)guid._bytes[13]
|
67
|
-
<< setw(2) << (int)guid._bytes[14]
|
68
|
-
<< setw(2) << (int)guid._bytes[15];
|
69
|
-
}
|
70
|
-
|
71
|
-
// create a guid from vector of bytes
|
72
|
-
Guid::Guid(const vector<unsigned char> &bytes)
|
73
|
-
{
|
74
|
-
_bytes = bytes;
|
75
|
-
}
|
76
|
-
|
77
|
-
// create a guid from array of bytes
|
78
|
-
Guid::Guid(const unsigned char *bytes)
|
79
|
-
{
|
80
|
-
_bytes.assign(bytes, bytes + 16);
|
81
|
-
}
|
82
|
-
|
83
|
-
// create a guid from array of words
|
84
|
-
Guid::Guid(const uint16_t *bytes, bool reverse)
|
85
|
-
{
|
86
|
-
if (reverse) {
|
87
|
-
for (size_t i = 8; i > 0; --i)
|
88
|
-
{
|
89
|
-
_bytes.push_back(bytes[i - 1] >> 8);
|
90
|
-
_bytes.push_back(bytes[i - 1] & 0xFF);
|
91
|
-
}
|
92
|
-
} else {
|
93
|
-
for (size_t i = 0; i < 8; ++i)
|
94
|
-
{
|
95
|
-
_bytes.push_back(bytes[i] & 0xFF);
|
96
|
-
_bytes.push_back(bytes[i] >> 8);
|
97
|
-
}
|
98
|
-
}
|
99
|
-
}
|
100
|
-
|
101
|
-
// converts a single hex char to a number (0 - 15)
|
102
|
-
static unsigned char hexDigitToChar(char ch)
|
103
|
-
{
|
104
|
-
if (ch > 47 && ch < 58)
|
105
|
-
return (unsigned char)(ch - 48);
|
106
|
-
|
107
|
-
if (ch > 96 && ch < 103)
|
108
|
-
return (unsigned char)(ch - 87);
|
109
|
-
|
110
|
-
if (ch > 64 && ch < 71)
|
111
|
-
return (unsigned char)(ch - 55);
|
112
|
-
|
113
|
-
return 0;
|
114
|
-
}
|
115
|
-
|
116
|
-
// converts the two hexadecimal characters to an unsigned char (a byte)
|
117
|
-
static unsigned char hexPairToChar(char a, char b)
|
118
|
-
{
|
119
|
-
return hexDigitToChar(a) * 16 + hexDigitToChar(b);
|
120
|
-
}
|
121
|
-
|
122
|
-
// create a guid from string
|
123
|
-
Guid::Guid(const string &fromString)
|
124
|
-
{
|
125
|
-
_bytes.clear();
|
126
|
-
|
127
|
-
char charOne = 0, charTwo;
|
128
|
-
bool lookingForFirstChar = true;
|
129
|
-
|
130
|
-
for (const char &ch : fromString)
|
131
|
-
{
|
132
|
-
if (ch == '-')
|
133
|
-
continue;
|
134
|
-
|
135
|
-
if (lookingForFirstChar)
|
136
|
-
{
|
137
|
-
charOne = ch;
|
138
|
-
lookingForFirstChar = false;
|
139
|
-
}
|
140
|
-
else
|
141
|
-
{
|
142
|
-
charTwo = ch;
|
143
|
-
auto byte = hexPairToChar(charOne, charTwo);
|
144
|
-
_bytes.push_back(byte);
|
145
|
-
lookingForFirstChar = true;
|
146
|
-
}
|
147
|
-
}
|
148
|
-
|
149
|
-
}
|
150
|
-
|
151
|
-
// create empty guid
|
152
|
-
Guid::Guid()
|
153
|
-
{
|
154
|
-
_bytes = vector<unsigned char>(16, 0);
|
155
|
-
}
|
156
|
-
|
157
|
-
// copy constructor
|
158
|
-
Guid::Guid(const Guid &other)
|
159
|
-
{
|
160
|
-
_bytes = other._bytes;
|
161
|
-
}
|
162
|
-
|
163
|
-
// overload assignment operator
|
164
|
-
Guid &Guid::operator=(const Guid &other)
|
165
|
-
{
|
166
|
-
_bytes = other._bytes;
|
167
|
-
return *this;
|
168
|
-
}
|
169
|
-
|
170
|
-
// overload equality operator
|
171
|
-
bool Guid::operator==(const Guid &other) const
|
172
|
-
{
|
173
|
-
return _bytes == other._bytes;
|
174
|
-
}
|
175
|
-
|
176
|
-
// overload inequality operator
|
177
|
-
bool Guid::operator!=(const Guid &other) const
|
178
|
-
{
|
179
|
-
return !((*this) == other);
|
180
|
-
}
|
181
|
-
|
182
|
-
const std::string Guid::toString() const
|
183
|
-
{
|
184
|
-
std::stringstream os;
|
185
|
-
os << *this;
|
186
|
-
return os.str();
|
187
|
-
}
|
188
|
-
|
189
|
-
// This is the linux friendly implementation, but it could work on other
|
190
|
-
// systems that have libuuid available
|
191
|
-
#ifdef GUID_LIBUUID
|
192
|
-
Guid GuidGenerator::newGuid()
|
193
|
-
{
|
194
|
-
uuid_t id;
|
195
|
-
uuid_generate(id);
|
196
|
-
return id;
|
197
|
-
}
|
198
|
-
#endif
|
199
|
-
|
200
|
-
// this is the mac and ios version
|
201
|
-
#ifdef GUID_CFUUID
|
202
|
-
Guid GuidGenerator::newGuid()
|
203
|
-
{
|
204
|
-
auto newId = CFUUIDCreate(NULL);
|
205
|
-
auto bytes = CFUUIDGetUUIDBytes(newId);
|
206
|
-
CFRelease(newId);
|
207
|
-
|
208
|
-
const unsigned char byteArray[16] =
|
209
|
-
{
|
210
|
-
bytes.byte0,
|
211
|
-
bytes.byte1,
|
212
|
-
bytes.byte2,
|
213
|
-
bytes.byte3,
|
214
|
-
bytes.byte4,
|
215
|
-
bytes.byte5,
|
216
|
-
bytes.byte6,
|
217
|
-
bytes.byte7,
|
218
|
-
bytes.byte8,
|
219
|
-
bytes.byte9,
|
220
|
-
bytes.byte10,
|
221
|
-
bytes.byte11,
|
222
|
-
bytes.byte12,
|
223
|
-
bytes.byte13,
|
224
|
-
bytes.byte14,
|
225
|
-
bytes.byte15
|
226
|
-
};
|
227
|
-
return byteArray;
|
228
|
-
}
|
229
|
-
#endif
|
230
|
-
|
231
|
-
// obviously this is the windows version
|
232
|
-
#ifdef GUID_WINDOWS
|
233
|
-
Guid GuidGenerator::newGuid()
|
234
|
-
{
|
235
|
-
GUID newId;
|
236
|
-
CoCreateGuid(&newId);
|
237
|
-
|
238
|
-
const unsigned char bytes[16] =
|
239
|
-
{
|
240
|
-
(newId.Data1 >> 24) & 0xFF,
|
241
|
-
(newId.Data1 >> 16) & 0xFF,
|
242
|
-
(newId.Data1 >> 8) & 0xFF,
|
243
|
-
(newId.Data1) & 0xff,
|
244
|
-
|
245
|
-
(newId.Data2 >> 8) & 0xFF,
|
246
|
-
(newId.Data2) & 0xff,
|
247
|
-
|
248
|
-
(newId.Data3 >> 8) & 0xFF,
|
249
|
-
(newId.Data3) & 0xFF,
|
250
|
-
|
251
|
-
newId.Data4[0],
|
252
|
-
newId.Data4[1],
|
253
|
-
newId.Data4[2],
|
254
|
-
newId.Data4[3],
|
255
|
-
newId.Data4[4],
|
256
|
-
newId.Data4[5],
|
257
|
-
newId.Data4[6],
|
258
|
-
newId.Data4[7]
|
259
|
-
};
|
260
|
-
|
261
|
-
return bytes;
|
262
|
-
}
|
263
|
-
#endif
|
264
|
-
|
265
|
-
// android version that uses a call to a java api
|
266
|
-
#ifdef GUID_ANDROID
|
267
|
-
GuidGenerator::GuidGenerator(JNIEnv *env)
|
268
|
-
{
|
269
|
-
_env = env;
|
270
|
-
_uuidClass = env->FindClass("java/util/UUID");
|
271
|
-
_newGuidMethod = env->GetStaticMethodID(_uuidClass, "randomUUID", "()Ljava/util/UUID;");
|
272
|
-
_mostSignificantBitsMethod = env->GetMethodID(_uuidClass, "getMostSignificantBits", "()J");
|
273
|
-
_leastSignificantBitsMethod = env->GetMethodID(_uuidClass, "getLeastSignificantBits", "()J");
|
274
|
-
}
|
275
|
-
|
276
|
-
Guid GuidGenerator::newGuid()
|
277
|
-
{
|
278
|
-
jobject javaUuid = _env->CallStaticObjectMethod(_uuidClass, _newGuidMethod);
|
279
|
-
jlong mostSignificant = _env->CallLongMethod(javaUuid, _mostSignificantBitsMethod);
|
280
|
-
jlong leastSignificant = _env->CallLongMethod(javaUuid, _leastSignificantBitsMethod);
|
281
|
-
|
282
|
-
unsigned char bytes[16] =
|
283
|
-
{
|
284
|
-
(mostSignificant >> 56) & 0xFF,
|
285
|
-
(mostSignificant >> 48) & 0xFF,
|
286
|
-
(mostSignificant >> 40) & 0xFF,
|
287
|
-
(mostSignificant >> 32) & 0xFF,
|
288
|
-
(mostSignificant >> 24) & 0xFF,
|
289
|
-
(mostSignificant >> 16) & 0xFF,
|
290
|
-
(mostSignificant >> 8) & 0xFF,
|
291
|
-
(mostSignificant) & 0xFF,
|
292
|
-
(leastSignificant >> 56) & 0xFF,
|
293
|
-
(leastSignificant >> 48) & 0xFF,
|
294
|
-
(leastSignificant >> 40) & 0xFF,
|
295
|
-
(leastSignificant >> 32) & 0xFF,
|
296
|
-
(leastSignificant >> 24) & 0xFF,
|
297
|
-
(leastSignificant >> 16) & 0xFF,
|
298
|
-
(leastSignificant >> 8) & 0xFF,
|
299
|
-
(leastSignificant) & 0xFF,
|
300
|
-
};
|
301
|
-
return bytes;
|
302
|
-
}
|
303
|
-
#endif
|