expressir 0.2.2 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (450) hide show
  1. checksums.yaml +4 -4
  2. data/.cross_rubies +30 -0
  3. data/.github/workflows/rake.yml +45 -0
  4. data/.github/workflows/release.yml +84 -0
  5. data/.gitignore +4 -2
  6. data/.gitmodules +3 -0
  7. data/Rakefile +5 -0
  8. data/exe/generate-parser +48 -0
  9. data/expressir.gemspec +12 -4
  10. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/CMakeLists.txt +118 -0
  11. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj +637 -0
  12. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2013.vcxproj.filters +984 -0
  13. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj +652 -0
  14. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2015.vcxproj.filters +990 -0
  15. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj +652 -0
  16. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2017.vcxproj.filters +990 -0
  17. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj +652 -0
  18. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters +990 -0
  19. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/Info.plist +26 -0
  20. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/antlrcpp_ios.h +17 -0
  21. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj +3024 -0
  22. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  23. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  24. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme +76 -0
  25. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_ios.xcscheme +80 -0
  26. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_static.xcscheme +80 -0
  27. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +10 -0
  28. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +167 -0
  29. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +10 -0
  30. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +121 -0
  31. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +34 -0
  32. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +27 -0
  33. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +155 -0
  34. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +69 -0
  35. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +61 -0
  36. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +59 -0
  37. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +25 -0
  38. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +36 -0
  39. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +414 -0
  40. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +200 -0
  41. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +11 -0
  42. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +37 -0
  43. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +195 -0
  44. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +158 -0
  45. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +39 -0
  46. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +74 -0
  47. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +78 -0
  48. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +79 -0
  49. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +15 -0
  50. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +35 -0
  51. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +333 -0
  52. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +466 -0
  53. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +84 -0
  54. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +80 -0
  55. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +64 -0
  56. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +99 -0
  57. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +51 -0
  58. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +32 -0
  59. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +18 -0
  60. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +24 -0
  61. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +12 -0
  62. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +218 -0
  63. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +19 -0
  64. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +45 -0
  65. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +295 -0
  66. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +196 -0
  67. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +75 -0
  68. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +52 -0
  69. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +36 -0
  70. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +31 -0
  71. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +92 -0
  72. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +88 -0
  73. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +46 -0
  74. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +42 -0
  75. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +648 -0
  76. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +467 -0
  77. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +306 -0
  78. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +179 -0
  79. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +141 -0
  80. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +147 -0
  81. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +53 -0
  82. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +38 -0
  83. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +66 -0
  84. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +98 -0
  85. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +167 -0
  86. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +164 -0
  87. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +143 -0
  88. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +137 -0
  89. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +27 -0
  90. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +32 -0
  91. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +53 -0
  92. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +155 -0
  93. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +9 -0
  94. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +92 -0
  95. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +30 -0
  96. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +9 -0
  97. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +85 -0
  98. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +11 -0
  99. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +137 -0
  100. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +425 -0
  101. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +293 -0
  102. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +211 -0
  103. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +123 -0
  104. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +270 -0
  105. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +115 -0
  106. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +104 -0
  107. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +193 -0
  108. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +9 -0
  109. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +23 -0
  110. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +137 -0
  111. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +167 -0
  112. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +209 -0
  113. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +112 -0
  114. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +113 -0
  115. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +148 -0
  116. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +228 -0
  117. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +110 -0
  118. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +64 -0
  119. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +50 -0
  120. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +758 -0
  121. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +85 -0
  122. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.cpp +621 -0
  123. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSerializer.h +61 -0
  124. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +63 -0
  125. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +87 -0
  126. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +72 -0
  127. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +133 -0
  128. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +20 -0
  129. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.cpp +14 -0
  130. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AbstractPredicateTransition.h +24 -0
  131. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +33 -0
  132. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +33 -0
  133. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +16 -0
  134. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +68 -0
  135. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +82 -0
  136. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +43 -0
  137. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +31 -0
  138. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +30 -0
  139. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.cpp +12 -0
  140. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +22 -0
  141. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.cpp +12 -0
  142. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +21 -0
  143. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.cpp +15 -0
  144. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +24 -0
  145. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.cpp +9 -0
  146. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +21 -0
  147. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
  148. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +47 -0
  149. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +14 -0
  150. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +70 -0
  151. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +25 -0
  152. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +227 -0
  153. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +17 -0
  154. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +30 -0
  155. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.cpp +35 -0
  156. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EmptyPredictionContext.h +27 -0
  157. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +35 -0
  158. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +39 -0
  159. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +15 -0
  160. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +43 -0
  161. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +158 -0
  162. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +109 -0
  163. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +84 -0
  164. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +44 -0
  165. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +628 -0
  166. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +210 -0
  167. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +9 -0
  168. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +66 -0
  169. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +107 -0
  170. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +115 -0
  171. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +55 -0
  172. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +55 -0
  173. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +63 -0
  174. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +62 -0
  175. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +87 -0
  176. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +63 -0
  177. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +82 -0
  178. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +56 -0
  179. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +61 -0
  180. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +47 -0
  181. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +57 -0
  182. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +47 -0
  183. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +57 -0
  184. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +56 -0
  185. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +61 -0
  186. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +47 -0
  187. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +55 -0
  188. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +56 -0
  189. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +55 -0
  190. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +16 -0
  191. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +42 -0
  192. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.cpp +12 -0
  193. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +22 -0
  194. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Makefile +67 -0
  195. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +27 -0
  196. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +25 -0
  197. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +12 -0
  198. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +20 -0
  199. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +102 -0
  200. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +102 -0
  201. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +1366 -0
  202. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +904 -0
  203. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.cpp +12 -0
  204. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +25 -0
  205. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.cpp +12 -0
  206. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +22 -0
  207. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +32 -0
  208. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +29 -0
  209. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +17 -0
  210. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +62 -0
  211. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +34 -0
  212. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +39 -0
  213. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +662 -0
  214. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +254 -0
  215. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +201 -0
  216. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +436 -0
  217. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
  218. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +60 -0
  219. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +30 -0
  220. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +29 -0
  221. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.cpp +16 -0
  222. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +25 -0
  223. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.cpp +12 -0
  224. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +25 -0
  225. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +37 -0
  226. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +40 -0
  227. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +377 -0
  228. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +222 -0
  229. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +32 -0
  230. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +30 -0
  231. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +81 -0
  232. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +36 -0
  233. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.cpp +12 -0
  234. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +21 -0
  235. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.cpp +15 -0
  236. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +35 -0
  237. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +19 -0
  238. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +21 -0
  239. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.cpp +12 -0
  240. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +21 -0
  241. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +44 -0
  242. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +76 -0
  243. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +25 -0
  244. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +25 -0
  245. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +127 -0
  246. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +91 -0
  247. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +67 -0
  248. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +32 -0
  249. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +100 -0
  250. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +144 -0
  251. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +20 -0
  252. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +23 -0
  253. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +124 -0
  254. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +31 -0
  255. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +89 -0
  256. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +84 -0
  257. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +521 -0
  258. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +198 -0
  259. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +134 -0
  260. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +76 -0
  261. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +4 -0
  262. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +21 -0
  263. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +13 -0
  264. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +170 -0
  265. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +43 -0
  266. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +110 -0
  267. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +76 -0
  268. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +248 -0
  269. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +78 -0
  270. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +163 -0
  271. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +36 -0
  272. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +54 -0
  273. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.cpp +303 -0
  274. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/support/guid.h +112 -0
  275. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +128 -0
  276. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.cpp +9 -0
  277. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +19 -0
  278. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +23 -0
  279. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +33 -0
  280. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +71 -0
  281. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +53 -0
  282. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +15 -0
  283. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +102 -0
  284. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +9 -0
  285. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +39 -0
  286. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +50 -0
  287. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +9 -0
  288. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +57 -0
  289. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +49 -0
  290. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +31 -0
  291. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.cpp +9 -0
  292. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +32 -0
  293. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +57 -0
  294. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +33 -0
  295. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +241 -0
  296. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +78 -0
  297. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +9 -0
  298. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +44 -0
  299. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
  300. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
  301. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
  302. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +105 -0
  303. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +371 -0
  304. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
  305. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
  306. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +117 -0
  307. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +39 -0
  308. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +86 -0
  309. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +28 -0
  310. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +51 -0
  311. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
  312. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +80 -0
  313. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +154 -0
  314. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +86 -0
  315. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +31 -0
  316. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +40 -0
  317. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +173 -0
  318. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.g4 +64 -0
  319. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +56 -0
  320. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.tokens +12 -0
  321. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
  322. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
  323. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
  324. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
  325. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
  326. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +26 -0
  327. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
  328. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
  329. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
  330. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +26 -0
  331. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
  332. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
  333. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
  334. data/ext/express-parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
  335. data/ext/express-parser/antlrgen/Express.interp +532 -0
  336. data/ext/express-parser/antlrgen/Express.tokens +190 -0
  337. data/ext/express-parser/antlrgen/ExpressBaseListener.cpp +7 -0
  338. data/ext/express-parser/antlrgen/ExpressBaseListener.h +623 -0
  339. data/ext/express-parser/antlrgen/ExpressBaseVisitor.cpp +7 -0
  340. data/ext/express-parser/antlrgen/ExpressBaseVisitor.h +816 -0
  341. data/ext/express-parser/antlrgen/ExpressLexer.cpp +1169 -0
  342. data/ext/express-parser/antlrgen/ExpressLexer.h +85 -0
  343. data/ext/express-parser/antlrgen/ExpressLexer.interp +534 -0
  344. data/ext/express-parser/antlrgen/ExpressLexer.tokens +190 -0
  345. data/ext/express-parser/antlrgen/ExpressListener.cpp +7 -0
  346. data/ext/express-parser/antlrgen/ExpressListener.h +616 -0
  347. data/ext/express-parser/antlrgen/ExpressParser.cpp +17284 -0
  348. data/ext/express-parser/antlrgen/ExpressParser.h +3696 -0
  349. data/ext/express-parser/antlrgen/ExpressVisitor.cpp +7 -0
  350. data/ext/express-parser/antlrgen/ExpressVisitor.h +422 -0
  351. data/ext/express-parser/express_parser.cpp +17933 -0
  352. data/ext/express-parser/extconf.rb +57 -0
  353. data/lib/expressir/express_exp/formatter.rb +1450 -0
  354. data/lib/expressir/express_exp/parser.rb +17 -6
  355. data/lib/expressir/express_exp/visitor.rb +1527 -1197
  356. data/lib/expressir/model.rb +16 -42
  357. data/lib/expressir/model/{derived.rb → attribute.rb} +12 -4
  358. data/lib/expressir/model/constant.rb +3 -3
  359. data/lib/expressir/model/entity.rb +24 -19
  360. data/lib/expressir/model/enumeration_item.rb +1 -3
  361. data/lib/expressir/model/expressions/aggregate_initializer.rb +9 -9
  362. data/lib/expressir/model/expressions/aggregate_item.rb +15 -0
  363. data/lib/expressir/model/expressions/{attribute_qualifier.rb → attribute_reference.rb} +3 -1
  364. data/lib/expressir/model/expressions/binary_expression.rb +40 -0
  365. data/lib/expressir/model/expressions/{function_call.rb → call.rb} +3 -3
  366. data/lib/expressir/model/expressions/entity_constructor.rb +11 -11
  367. data/lib/expressir/model/expressions/{group_qualifier.rb → group_reference.rb} +3 -1
  368. data/lib/expressir/model/expressions/{index_qualifier.rb → index_reference.rb} +3 -1
  369. data/lib/expressir/model/expressions/interval.rb +17 -17
  370. data/lib/expressir/model/expressions/query_expression.rb +26 -0
  371. data/lib/expressir/model/expressions/simple_reference.rb +13 -0
  372. data/lib/expressir/model/expressions/{expression.rb → unary_expression.rb} +7 -3
  373. data/lib/expressir/model/function.rb +16 -8
  374. data/lib/expressir/model/identifier.rb +10 -0
  375. data/lib/expressir/model/{reference.rb → interface.rb} +6 -1
  376. data/lib/expressir/model/literals/logical.rb +4 -0
  377. data/lib/expressir/model/parameter.rb +5 -5
  378. data/lib/expressir/model/procedure.rb +16 -8
  379. data/lib/expressir/model/repository.rb +3 -1
  380. data/lib/expressir/model/rule.rb +18 -10
  381. data/lib/expressir/model/schema.rb +24 -8
  382. data/lib/expressir/model/scope.rb +17 -0
  383. data/lib/expressir/model/statements/alias.rb +5 -4
  384. data/lib/expressir/model/statements/{procedure_call.rb → call.rb} +3 -3
  385. data/lib/expressir/model/statements/case.rb +2 -2
  386. data/lib/expressir/model/statements/case_action.rb +2 -2
  387. data/lib/expressir/model/statements/repeat.rb +5 -4
  388. data/lib/expressir/model/subtype_constraint.rb +13 -7
  389. data/lib/expressir/model/type.rb +5 -4
  390. data/lib/expressir/model/types/aggregate.rb +4 -4
  391. data/lib/expressir/model/types/generic.rb +2 -4
  392. data/lib/expressir/model/types/generic_entity.rb +2 -4
  393. data/lib/expressir/model/unique.rb +3 -3
  394. data/lib/expressir/model/{local.rb → variable.rb} +4 -4
  395. data/lib/expressir/model/where.rb +3 -3
  396. data/lib/expressir/version.rb +1 -1
  397. data/original/examples/syntax/remark.exp +127 -108
  398. data/original/examples/syntax/remark_formatted.exp +175 -0
  399. data/original/examples/syntax/syntax.exp +288 -277
  400. data/original/examples/syntax/syntax_formatted.exp +1191 -0
  401. data/rakelib/cross-ruby.rake +308 -0
  402. data/spec/expressir/express_exp/ap233_spec.rb +1 -1
  403. data/spec/expressir/express_exp/format_remark_spec.rb +28 -0
  404. data/spec/expressir/express_exp/format_syntax_spec.rb +28 -0
  405. data/spec/expressir/express_exp/{remark_spec.rb → parse_remark_spec.rb} +81 -36
  406. data/spec/expressir/express_exp/parse_syntax_spec.rb +3003 -0
  407. data/spec/expressir/model/find_spec.rb +110 -0
  408. metadata +429 -66
  409. data/.github/workflows/macos.yml +0 -38
  410. data/.github/workflows/ubuntu.yml +0 -56
  411. data/.github/workflows/windows.yml +0 -40
  412. data/generate-parser.sh +0 -29
  413. data/lib/expressir/express_exp/generated/ExpressBaseVisitor.rb +0 -779
  414. data/lib/expressir/express_exp/generated/ExpressLexer.rb +0 -844
  415. data/lib/expressir/express_exp/generated/ExpressParser.rb +0 -12162
  416. data/lib/expressir/express_exp/generated/ExpressVisitor.rb +0 -394
  417. data/lib/expressir/model/explicit.rb +0 -19
  418. data/lib/expressir/model/expressions/aggregate_element.rb +0 -15
  419. data/lib/expressir/model/expressions/qualified_ref.rb +0 -15
  420. data/lib/expressir/model/expressions/query.rb +0 -25
  421. data/lib/expressir/model/inverse.rb +0 -19
  422. data/lib/expressir/model/operators/addition.rb +0 -8
  423. data/lib/expressir/model/operators/and.rb +0 -8
  424. data/lib/expressir/model/operators/andor.rb +0 -8
  425. data/lib/expressir/model/operators/combine.rb +0 -8
  426. data/lib/expressir/model/operators/equal.rb +0 -8
  427. data/lib/expressir/model/operators/exponentiation.rb +0 -8
  428. data/lib/expressir/model/operators/greater_than.rb +0 -8
  429. data/lib/expressir/model/operators/greater_than_or_equal.rb +0 -8
  430. data/lib/expressir/model/operators/in.rb +0 -8
  431. data/lib/expressir/model/operators/instance_equal.rb +0 -8
  432. data/lib/expressir/model/operators/instance_not_equal.rb +0 -8
  433. data/lib/expressir/model/operators/integer_division.rb +0 -8
  434. data/lib/expressir/model/operators/less_than.rb +0 -8
  435. data/lib/expressir/model/operators/less_than_or_equal.rb +0 -8
  436. data/lib/expressir/model/operators/like.rb +0 -8
  437. data/lib/expressir/model/operators/modulo.rb +0 -8
  438. data/lib/expressir/model/operators/multiplication.rb +0 -8
  439. data/lib/expressir/model/operators/not.rb +0 -8
  440. data/lib/expressir/model/operators/not_equal.rb +0 -8
  441. data/lib/expressir/model/operators/oneof.rb +0 -8
  442. data/lib/expressir/model/operators/or.rb +0 -8
  443. data/lib/expressir/model/operators/real_division.rb +0 -8
  444. data/lib/expressir/model/operators/subtraction.rb +0 -8
  445. data/lib/expressir/model/operators/unary_minus.rb +0 -8
  446. data/lib/expressir/model/operators/unary_plus.rb +0 -8
  447. data/lib/expressir/model/operators/xor.rb +0 -8
  448. data/lib/expressir/model/ref.rb +0 -11
  449. data/lib/expressir/model/use.rb +0 -13
  450. data/spec/expressir/express_exp/syntax_spec.rb +0 -2992
@@ -0,0 +1,308 @@
1
+ require "rbconfig"
2
+ require "shellwords"
3
+
4
+ CrossRuby = Struct.new(:version, :host) do
5
+ WINDOWS_PLATFORM_REGEX = /mingw|mswin/
6
+ MINGW32_PLATFORM_REGEX = /mingw32/
7
+ LINUX_PLATFORM_REGEX = /linux/
8
+ DARWIN_PLATFORM_REGEX = /darwin/
9
+
10
+ def windows?
11
+ !!(platform =~ WINDOWS_PLATFORM_REGEX)
12
+ end
13
+
14
+ def linux?
15
+ !!(platform =~ LINUX_PLATFORM_REGEX)
16
+ end
17
+
18
+ def darwin?
19
+ !!(platform =~ DARWIN_PLATFORM_REGEX)
20
+ end
21
+
22
+ def ver
23
+ @ver ||= version[/\A[^-]+/]
24
+ end
25
+
26
+ def minor_ver
27
+ @minor_ver ||= ver[/\A\d\.\d(?=\.)/]
28
+ end
29
+
30
+ def api_ver_suffix
31
+ case minor_ver
32
+ when nil
33
+ raise "CrossRuby.api_ver_suffix: unsupported version: #{ver}"
34
+ else
35
+ minor_ver.delete(".") << "0"
36
+ end
37
+ end
38
+
39
+ def platform
40
+ @platform ||= case host
41
+ when /\Ax86_64.*mingw32/
42
+ "x64-mingw32"
43
+ when /\Ai[3-6]86.*mingw32/
44
+ "x86-mingw32"
45
+ when /\Ax86_64.*linux/
46
+ "x86_64-linux"
47
+ when /\Ai[3-6]86.*linux/
48
+ "x86-linux"
49
+ when /\Ax86_64-darwin/
50
+ "x86_64-darwin"
51
+ when /\Aarm64-darwin/
52
+ "arm64-darwin"
53
+ else
54
+ raise "CrossRuby.platform: unsupported host: #{host}"
55
+ end
56
+ end
57
+
58
+ def tool(name)
59
+ (@binutils_prefix ||= case platform
60
+ when "x64-mingw32"
61
+ "x86_64-w64-mingw32-"
62
+ when "x86-mingw32"
63
+ "i686-w64-mingw32-"
64
+ when "x86_64-linux"
65
+ "x86_64-redhat-linux-"
66
+ when "x86-linux"
67
+ "i686-redhat-linux-"
68
+ when /x86_64.*darwin/
69
+ "x86_64-apple-darwin-"
70
+ when /a.*64.*darwin/
71
+ "aarch64-apple-darwin-"
72
+ else
73
+ raise "CrossRuby.tool: unmatched platform: #{platform}"
74
+ end) + name
75
+ end
76
+
77
+ def target_file_format
78
+ case platform
79
+ when "x64-mingw32"
80
+ "pei-x86-64"
81
+ when "x86-mingw32"
82
+ "pei-i386"
83
+ when "x86_64-linux"
84
+ "elf64-x86-64"
85
+ when "x86-linux"
86
+ "elf32-i386"
87
+ when "x86_64-darwin"
88
+ "Mach-O 64-bit x86-64" # hmm
89
+ when "arm64-darwin"
90
+ "Mach-O arm64"
91
+ else
92
+ raise "CrossRuby.target_file_format: unmatched platform: #{platform}"
93
+ end
94
+ end
95
+
96
+ def dll_ext
97
+ darwin? ? "bundle" : "so"
98
+ end
99
+
100
+ def dll_staging_path
101
+ "tmp/#{platform}/stage/lib/#{GEMSPEC.name}/#{minor_ver}/#{GEMSPEC.name}.#{dll_ext}"
102
+ end
103
+
104
+ def libruby_dll
105
+ case platform
106
+ when "x64-mingw32"
107
+ "x64-msvcrt-ruby#{api_ver_suffix}.dll"
108
+ when "x86-mingw32"
109
+ "msvcrt-ruby#{api_ver_suffix}.dll"
110
+ else
111
+ raise "CrossRuby.libruby_dll: unmatched platform: #{platform}"
112
+ end
113
+ end
114
+
115
+ def allowed_dlls
116
+ case platform
117
+ when MINGW32_PLATFORM_REGEX
118
+ [
119
+ "kernel32.dll",
120
+ "msvcrt.dll",
121
+ "ws2_32.dll",
122
+ "user32.dll",
123
+ "advapi32.dll",
124
+ libruby_dll,
125
+ ]
126
+ when LINUX_PLATFORM_REGEX
127
+ [
128
+ "libm.so.6",
129
+ *(case
130
+ when ver < "2.6.0"
131
+ "libpthread.so.0"
132
+ end),
133
+ "libc.so.6",
134
+ "libdl.so.2", # on old dists only - now in libc
135
+ ]
136
+ when DARWIN_PLATFORM_REGEX
137
+ [
138
+ "/usr/lib/libSystem.B.dylib",
139
+ "/usr/lib/liblzma.5.dylib",
140
+ "/usr/lib/libobjc.A.dylib",
141
+ ]
142
+ else
143
+ raise "CrossRuby.allowed_dlls: unmatched platform: #{platform}"
144
+ end
145
+ end
146
+
147
+ def dll_ref_versions
148
+ case platform
149
+ when LINUX_PLATFORM_REGEX
150
+ { "GLIBC" => "2.17" }
151
+ else
152
+ raise "CrossRuby.dll_ref_versions: unmatched platform: #{platform}"
153
+ end
154
+ end
155
+ end
156
+
157
+ CROSS_RUBIES = File.read(".cross_rubies").split("\n").map do |line|
158
+ case line
159
+ when /\A([^#]+):([^#]+)/
160
+ CrossRuby.new($1, $2)
161
+ end
162
+ end.compact
163
+
164
+ ENV["RUBY_CC_VERSION"] = CROSS_RUBIES.map(&:ver).uniq.join(":")
165
+
166
+ require "rake_compiler_dock"
167
+
168
+ def verify_dll(dll, cross_ruby)
169
+ allowed_imports = cross_ruby.allowed_dlls
170
+ dump = `#{["env", "LANG=C", cross_ruby.tool("objdump"), "-p", dll].shelljoin}`
171
+
172
+ if cross_ruby.windows?
173
+ raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
174
+ raise "export function Init_nokogiri not in dll #{dll}" unless /Table.*\sInit_nokogiri\s/mi === dump
175
+
176
+ # Verify that the DLL dependencies are all allowed.
177
+ actual_imports = dump.scan(/DLL Name: (.*)$/).map(&:first).map(&:downcase).uniq
178
+ if !(actual_imports - allowed_imports).empty?
179
+ raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
180
+ end
181
+
182
+ elsif cross_ruby.linux?
183
+ nm = `#{["env", "LANG=C", cross_ruby.tool("nm"), "-D", dll].shelljoin}`
184
+
185
+ raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
186
+ raise "export function Init_nokogiri not in dll #{dll}" unless / T Init_nokogiri/ === nm
187
+
188
+ # Verify that the DLL dependencies are all allowed.
189
+ actual_imports = dump.scan(/NEEDED\s+(.*)/).map(&:first).uniq
190
+ if !(actual_imports - allowed_imports).empty?
191
+ raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
192
+ end
193
+
194
+ # Verify that the expected so version requirements match the actual dependencies.
195
+ ref_versions_data = dump.scan(/0x[\da-f]+ 0x[\da-f]+ \d+ (\w+)_([\d\.]+)$/i)
196
+ # Build a hash of library versions like {"LIBUDEV"=>"183", "GLIBC"=>"2.17"}
197
+ actual_ref_versions = ref_versions_data.each.with_object({}) do |(lib, ver), h|
198
+ if !h[lib] || ver.split(".").map(&:to_i).pack("C*") > h[lib].split(".").map(&:to_i).pack("C*")
199
+ h[lib] = ver
200
+ end
201
+ end
202
+ if actual_ref_versions != cross_ruby.dll_ref_versions
203
+ raise "unexpected so version requirements #{actual_ref_versions.inspect} in #{dll}"
204
+ end
205
+
206
+ elsif cross_ruby.darwin?
207
+ nm = `#{["env", "LANG=C", cross_ruby.tool("nm"), "-g", dll].shelljoin}`
208
+
209
+ raise "unexpected file format for generated dll #{dll}" unless /file format #{Regexp.quote(cross_ruby.target_file_format)}\s/ === dump
210
+ raise "export function Init_nokogiri not in dll #{dll}" unless / T _?Init_nokogiri/ === nm
211
+
212
+ # if liblzma is being referenced, let's make sure it's referring
213
+ # to the system-installed file and not the homebrew-installed file.
214
+ ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
215
+ if liblzma_refs = ldd.scan(/^\t([^ ]+) /).map(&:first).uniq.grep(/liblzma/)
216
+ liblzma_refs.each do |ref|
217
+ new_ref = File.join("/usr/lib", File.basename(ref))
218
+ sh ["env", "LANG=C", cross_ruby.tool("install_name_tool"), "-change", ref, new_ref, dll].shelljoin
219
+ end
220
+
221
+ # reload!
222
+ ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
223
+ end
224
+
225
+ # Verify that the DLL dependencies are all allowed.
226
+ ldd = `#{["env", "LANG=C", cross_ruby.tool("otool"), "-L", dll].shelljoin}`
227
+ actual_imports = ldd.scan(/^\t([^ ]+) /).map(&:first).uniq
228
+ if !(actual_imports - allowed_imports).empty?
229
+ raise "unallowed so imports #{actual_imports.inspect} in #{dll} (allowed #{allowed_imports.inspect})"
230
+ end
231
+ end
232
+ puts "verify_dll: #{dll}: passed shared library sanity checks"
233
+ end
234
+
235
+ CROSS_RUBIES.each do |cross_ruby|
236
+ task cross_ruby.dll_staging_path do |t|
237
+ verify_dll t.name, cross_ruby
238
+ end
239
+ end
240
+
241
+ def gem_builder(plat)
242
+ # use Task#invoke because the pkg/*gem task is defined at runtime
243
+ Rake::Task["native:#{plat}"].invoke
244
+ Rake::Task["pkg/#{GEMSPEC.full_name}-#{Gem::Platform.new(plat).to_s}.gem"].invoke
245
+ end
246
+
247
+ namespace "gem" do
248
+ CROSS_RUBIES.find_all { |cr| cr.windows? || cr.linux? || cr.darwin? }.map(&:platform).uniq.each do |plat|
249
+ pre_req = case plat
250
+ when /\linux/
251
+ "sudo yum install -y git"
252
+ else
253
+ "sudo apt-get update -y && sudo apt-get install -y automake autoconf libtool build-essential"
254
+ end
255
+ desc "build native gem for #{plat} platform"
256
+ task plat do
257
+ RakeCompilerDock.sh <<~EOT, platform: plat
258
+ #{pre_req} &&
259
+ gem install bundler --no-document &&
260
+ bundle &&
261
+ bundle exec rake gem:#{plat}:builder MAKE='nice make -j`nproc`'
262
+ EOT
263
+ end
264
+
265
+ namespace plat do
266
+ desc "build native gem for #{plat} platform (guest container)"
267
+ task "builder" do
268
+ gem_builder(plat)
269
+ end
270
+ task "guest" => "builder" # TODO: remove me after this code is on master, temporary backwards compat for CI
271
+ end
272
+ end
273
+
274
+ desc "build native gems for windows"
275
+ multitask "windows" => CROSS_RUBIES.find_all(&:windows?).map(&:platform).uniq
276
+
277
+ desc "build native gems for linux"
278
+ multitask "linux" => CROSS_RUBIES.find_all(&:linux?).map(&:platform).uniq
279
+
280
+ desc "build native gems for darwin"
281
+ multitask "darwin" => CROSS_RUBIES.find_all(&:darwin?).map(&:platform).uniq
282
+ end
283
+
284
+ namespace "native" do
285
+ plat = "x86_64-darwin"
286
+ namespace plat do
287
+ desc "build native gem for #{plat} platform on host OS"
288
+ task "builder" do
289
+ gem_builder(plat)
290
+ end
291
+ task "guest" => "builder" # TODO: remove me after this code is on master, temporary backwards compat for CI
292
+ end
293
+ end
294
+
295
+ require "rake/extensiontask"
296
+
297
+ Rake::ExtensionTask.new("express_parser", GEMSPEC) do |ext|
298
+ ext.ext_dir = "ext/express-parser"
299
+ ext.lib_dir = File.join(*['lib', 'expressir', 'express_exp', ENV['FAT_DIR']].compact)
300
+ ext.config_options << ENV['EXTOPTS']
301
+ ext.cross_compile = true
302
+ ext.cross_platform = CROSS_RUBIES.map(&:platform).uniq
303
+ ext.cross_config_options << "--enable-cross-build"
304
+ ext.cross_compiling do |spec|
305
+ spec.files.reject! { |path| File.fnmatch?('ext/*', path) }
306
+ spec.dependencies.reject! { |dep| dep.name == 'rice' }
307
+ end
308
+ end
@@ -1,5 +1,5 @@
1
1
  require "spec_helper"
2
- require_relative "../../../lib/expressir/express_exp/parser"
2
+ require "expressir/express_exp/parser"
3
3
 
4
4
  RSpec.describe Expressir::ExpressExp::Parser do
5
5
  describe ".from_file" do
@@ -0,0 +1,28 @@
1
+ require "spec_helper"
2
+ require "expressir/express_exp/parser"
3
+ require "expressir/express_exp/formatter"
4
+
5
+ RSpec.describe Expressir::ExpressExp::Formatter do
6
+ describe ".format" do
7
+ it "formats a file" do
8
+ repo = Expressir::ExpressExp::Parser.from_exp(input_file)
9
+
10
+ result = Expressir::ExpressExp::Formatter.format(repo)
11
+ expected_result = File.read(output_file)
12
+
13
+ expect(result).to eq(expected_result)
14
+ end
15
+ end
16
+
17
+ def input_file
18
+ @input_file ||= Expressir.root_path.join(
19
+ "original", "examples", "syntax", "remark.exp"
20
+ )
21
+ end
22
+
23
+ def output_file
24
+ @output_file ||= Expressir.root_path.join(
25
+ "original", "examples", "syntax", "remark_formatted.exp"
26
+ )
27
+ end
28
+ end
@@ -0,0 +1,28 @@
1
+ require "spec_helper"
2
+ require "expressir/express_exp/parser"
3
+ require "expressir/express_exp/formatter"
4
+
5
+ RSpec.describe Expressir::ExpressExp::Formatter do
6
+ describe ".format" do
7
+ it "formats a file" do
8
+ repo = Expressir::ExpressExp::Parser.from_exp(input_file)
9
+
10
+ result = Expressir::ExpressExp::Formatter.format(repo)
11
+ expected_result = File.read(output_file)
12
+
13
+ expect(result).to eq(expected_result)
14
+ end
15
+ end
16
+
17
+ def input_file
18
+ @input_file ||= Expressir.root_path.join(
19
+ "original", "examples", "syntax", "syntax.exp"
20
+ )
21
+ end
22
+
23
+ def output_file
24
+ @output_file ||= Expressir.root_path.join(
25
+ "original", "examples", "syntax", "syntax_formatted.exp"
26
+ )
27
+ end
28
+ end
@@ -11,9 +11,12 @@ RSpec.describe Expressir::ExpressExp::Parser do
11
11
  schema.tap do |x|
12
12
  expect(x).to be_instance_of(Expressir::Model::Schema)
13
13
  expect(x.remarks).to be_instance_of(Array)
14
- expect(x.remarks.count).to eq(2)
15
- expect(x.remarks[0]).to eq("universal scope - schema before")
16
- expect(x.remarks[1]).to eq("universal scope - schema")
14
+ expect(x.remarks.count).to eq(5)
15
+ expect(x.remarks[0]).to eq("Any character within the EXPRESS character set may occur between the start and end of\nan embedded remark including the newline character; therefore, embedded remarks can span\nseveral physical lines.")
16
+ expect(x.remarks[1]).to eq("The tail remark is written at the end of a physical line.")
17
+ expect(x.remarks[2]).to eq("UTF8 test: Příliš žluťoučký kůň úpěl ďábelské ódy.")
18
+ expect(x.remarks[3]).to eq("universal scope - schema before")
19
+ expect(x.remarks[4]).to eq("universal scope - schema")
17
20
  end
18
21
 
19
22
  schema.constants.first.tap do |x|
@@ -30,6 +33,15 @@ RSpec.describe Expressir::ExpressExp::Parser do
30
33
  expect(x.remarks.count).to eq(2)
31
34
  expect(x.remarks[0]).to eq("schema scope - type")
32
35
  expect(x.remarks[1]).to eq("universal scope - type")
36
+
37
+ expect(x.type).to be_instance_of(Expressir::Model::Types::Enumeration)
38
+ x.type.items.first.tap do |x|
39
+ expect(x).to be_instance_of(Expressir::Model::EnumerationItem)
40
+ expect(x.remarks).to be_instance_of(Array)
41
+ expect(x.remarks.count).to eq(2)
42
+ expect(x.remarks[0]).to eq("schema scope - enumeration item")
43
+ expect(x.remarks[1]).to eq("universal scope - enumeration item")
44
+ end
33
45
  end
34
46
 
35
47
  schema.entities.first.tap do |x|
@@ -40,31 +52,34 @@ RSpec.describe Expressir::ExpressExp::Parser do
40
52
  expect(x.remarks[1]).to eq("universal scope - entity")
41
53
  end
42
54
 
43
- schema.entities.first.explicit.first.tap do |x|
44
- expect(x).to be_instance_of(Expressir::Model::Explicit)
55
+ schema.entities.first.explicit_attributes.first.tap do |x|
56
+ expect(x).to be_instance_of(Expressir::Model::Attribute)
57
+ expect(x.kind).to eq(Expressir::Model::Attribute::EXPLICIT)
45
58
  expect(x.remarks).to be_instance_of(Array)
46
59
  expect(x.remarks.count).to eq(3)
47
- expect(x.remarks[0]).to eq("entity scope - entity explicit")
48
- expect(x.remarks[1]).to eq("schema scope - entity explicit")
49
- expect(x.remarks[2]).to eq("universal scope - entity explicit")
60
+ expect(x.remarks[0]).to eq("entity scope - entity attribute")
61
+ expect(x.remarks[1]).to eq("schema scope - entity attribute")
62
+ expect(x.remarks[2]).to eq("universal scope - entity attribute")
50
63
  end
51
64
 
52
- schema.entities.first.derived.first.tap do |x|
53
- expect(x).to be_instance_of(Expressir::Model::Derived)
65
+ schema.entities.first.derived_attributes.first.tap do |x|
66
+ expect(x).to be_instance_of(Expressir::Model::Attribute)
67
+ expect(x.kind).to eq(Expressir::Model::Attribute::DERIVED)
54
68
  expect(x.remarks).to be_instance_of(Array)
55
69
  expect(x.remarks.count).to eq(3)
56
- expect(x.remarks[0]).to eq("entity scope - entity derived")
57
- expect(x.remarks[1]).to eq("schema scope - entity derived")
58
- expect(x.remarks[2]).to eq("universal scope - entity derived")
70
+ expect(x.remarks[0]).to eq("entity scope - entity derived attribute")
71
+ expect(x.remarks[1]).to eq("schema scope - entity derived attribute")
72
+ expect(x.remarks[2]).to eq("universal scope - entity derived attribute")
59
73
  end
60
74
 
61
- schema.entities.first.inverse.first.tap do |x|
62
- expect(x).to be_instance_of(Expressir::Model::Inverse)
75
+ schema.entities.first.inverse_attributes.first.tap do |x|
76
+ expect(x).to be_instance_of(Expressir::Model::Attribute)
77
+ expect(x.kind).to eq(Expressir::Model::Attribute::INVERSE)
63
78
  expect(x.remarks).to be_instance_of(Array)
64
79
  expect(x.remarks.count).to eq(3)
65
- expect(x.remarks[0]).to eq("entity scope - entity inverse")
66
- expect(x.remarks[1]).to eq("schema scope - entity inverse")
67
- expect(x.remarks[2]).to eq("universal scope - entity inverse")
80
+ expect(x.remarks[0]).to eq("entity scope - entity inverse attribute")
81
+ expect(x.remarks[1]).to eq("schema scope - entity inverse attribute")
82
+ expect(x.remarks[2]).to eq("universal scope - entity inverse attribute")
68
83
  end
69
84
 
70
85
  schema.entities.first.unique.first.tap do |x|
@@ -117,6 +132,16 @@ RSpec.describe Expressir::ExpressExp::Parser do
117
132
  expect(x.remarks[0]).to eq("function scope - function type")
118
133
  expect(x.remarks[1]).to eq("schema scope - function type")
119
134
  expect(x.remarks[2]).to eq("universal scope - function type")
135
+
136
+ expect(x.type).to be_instance_of(Expressir::Model::Types::Enumeration)
137
+ x.type.items.first.tap do |x|
138
+ expect(x).to be_instance_of(Expressir::Model::EnumerationItem)
139
+ expect(x.remarks).to be_instance_of(Array)
140
+ expect(x.remarks.count).to eq(3)
141
+ expect(x.remarks[0]).to eq("function scope - function enumeration item")
142
+ expect(x.remarks[1]).to eq("schema scope - function enumeration item")
143
+ expect(x.remarks[2]).to eq("universal scope - function enumeration item")
144
+ end
120
145
  end
121
146
 
122
147
  schema.functions.first.constants.first.tap do |x|
@@ -128,13 +153,13 @@ RSpec.describe Expressir::ExpressExp::Parser do
128
153
  expect(x.remarks[2]).to eq("universal scope - function constant")
129
154
  end
130
155
 
131
- schema.functions.first.locals.first.tap do |x|
132
- expect(x).to be_instance_of(Expressir::Model::Local)
156
+ schema.functions.first.variables.first.tap do |x|
157
+ expect(x).to be_instance_of(Expressir::Model::Variable)
133
158
  expect(x.remarks).to be_instance_of(Array)
134
159
  expect(x.remarks.count).to eq(3)
135
- expect(x.remarks[0]).to eq("function scope - function local")
136
- expect(x.remarks[1]).to eq("schema scope - function local")
137
- expect(x.remarks[2]).to eq("universal scope - function local")
160
+ expect(x.remarks[0]).to eq("function scope - function variable")
161
+ expect(x.remarks[1]).to eq("schema scope - function variable")
162
+ expect(x.remarks[2]).to eq("universal scope - function variable")
138
163
  end
139
164
 
140
165
  schema.functions.first.statements[0].tap do |x|
@@ -153,7 +178,7 @@ RSpec.describe Expressir::ExpressExp::Parser do
153
178
 
154
179
  schema.functions.first.statements[2].tap do |x|
155
180
  expect(x).to be_instance_of(Expressir::Model::Statements::Assignment)
156
- expect(x.expression).to be_instance_of(Expressir::Model::Expressions::Query)
181
+ expect(x.expression).to be_instance_of(Expressir::Model::Expressions::QueryExpression)
157
182
  expect(x.expression.remarks).to be_instance_of(Array)
158
183
  expect(x.expression.remarks.count).to eq(1)
159
184
  expect(x.expression.remarks[0]).to eq("function query scope - function query")
@@ -183,6 +208,16 @@ RSpec.describe Expressir::ExpressExp::Parser do
183
208
  expect(x.remarks[0]).to eq("procedure scope - procedure type")
184
209
  expect(x.remarks[1]).to eq("schema scope - procedure type")
185
210
  expect(x.remarks[2]).to eq("universal scope - procedure type")
211
+
212
+ expect(x.type).to be_instance_of(Expressir::Model::Types::Enumeration)
213
+ x.type.items.first.tap do |x|
214
+ expect(x).to be_instance_of(Expressir::Model::EnumerationItem)
215
+ expect(x.remarks).to be_instance_of(Array)
216
+ expect(x.remarks.count).to eq(3)
217
+ expect(x.remarks[0]).to eq("procedure scope - procedure enumeration item")
218
+ expect(x.remarks[1]).to eq("schema scope - procedure enumeration item")
219
+ expect(x.remarks[2]).to eq("universal scope - procedure enumeration item")
220
+ end
186
221
  end
187
222
 
188
223
  schema.procedures.first.constants.first.tap do |x|
@@ -194,13 +229,13 @@ RSpec.describe Expressir::ExpressExp::Parser do
194
229
  expect(x.remarks[2]).to eq("universal scope - procedure constant")
195
230
  end
196
231
 
197
- schema.procedures.first.locals.first.tap do |x|
198
- expect(x).to be_instance_of(Expressir::Model::Local)
232
+ schema.procedures.first.variables.first.tap do |x|
233
+ expect(x).to be_instance_of(Expressir::Model::Variable)
199
234
  expect(x.remarks).to be_instance_of(Array)
200
235
  expect(x.remarks.count).to eq(3)
201
- expect(x.remarks[0]).to eq("procedure scope - procedure local")
202
- expect(x.remarks[1]).to eq("schema scope - procedure local")
203
- expect(x.remarks[2]).to eq("universal scope - procedure local")
236
+ expect(x.remarks[0]).to eq("procedure scope - procedure variable")
237
+ expect(x.remarks[1]).to eq("schema scope - procedure variable")
238
+ expect(x.remarks[2]).to eq("universal scope - procedure variable")
204
239
  end
205
240
 
206
241
  schema.procedures.first.statements[0].tap do |x|
@@ -219,7 +254,7 @@ RSpec.describe Expressir::ExpressExp::Parser do
219
254
 
220
255
  schema.procedures.first.statements[2].tap do |x|
221
256
  expect(x).to be_instance_of(Expressir::Model::Statements::Assignment)
222
- expect(x.expression).to be_instance_of(Expressir::Model::Expressions::Query)
257
+ expect(x.expression).to be_instance_of(Expressir::Model::Expressions::QueryExpression)
223
258
  expect(x.expression.remarks).to be_instance_of(Array)
224
259
  expect(x.expression.remarks.count).to eq(1)
225
260
  expect(x.expression.remarks[0]).to eq("procedure query scope - procedure query")
@@ -240,6 +275,16 @@ RSpec.describe Expressir::ExpressExp::Parser do
240
275
  expect(x.remarks[0]).to eq("rule scope - rule type")
241
276
  expect(x.remarks[1]).to eq("schema scope - rule type")
242
277
  expect(x.remarks[2]).to eq("universal scope - rule type")
278
+
279
+ expect(x.type).to be_instance_of(Expressir::Model::Types::Enumeration)
280
+ x.type.items.first.tap do |x|
281
+ expect(x).to be_instance_of(Expressir::Model::EnumerationItem)
282
+ expect(x.remarks).to be_instance_of(Array)
283
+ expect(x.remarks.count).to eq(3)
284
+ expect(x.remarks[0]).to eq("rule scope - rule enumeration item")
285
+ expect(x.remarks[1]).to eq("schema scope - rule enumeration item")
286
+ expect(x.remarks[2]).to eq("universal scope - rule enumeration item")
287
+ end
243
288
  end
244
289
 
245
290
  schema.rules.first.constants.first.tap do |x|
@@ -251,13 +296,13 @@ RSpec.describe Expressir::ExpressExp::Parser do
251
296
  expect(x.remarks[2]).to eq("universal scope - rule constant")
252
297
  end
253
298
 
254
- schema.rules.first.locals.first.tap do |x|
255
- expect(x).to be_instance_of(Expressir::Model::Local)
299
+ schema.rules.first.variables.first.tap do |x|
300
+ expect(x).to be_instance_of(Expressir::Model::Variable)
256
301
  expect(x.remarks).to be_instance_of(Array)
257
302
  expect(x.remarks.count).to eq(3)
258
- expect(x.remarks[0]).to eq("rule scope - rule local")
259
- expect(x.remarks[1]).to eq("schema scope - rule local")
260
- expect(x.remarks[2]).to eq("universal scope - rule local")
303
+ expect(x.remarks[0]).to eq("rule scope - rule variable")
304
+ expect(x.remarks[1]).to eq("schema scope - rule variable")
305
+ expect(x.remarks[2]).to eq("universal scope - rule variable")
261
306
  end
262
307
 
263
308
  schema.rules.first.statements[0].tap do |x|
@@ -276,7 +321,7 @@ RSpec.describe Expressir::ExpressExp::Parser do
276
321
 
277
322
  schema.rules.first.statements[2].tap do |x|
278
323
  expect(x).to be_instance_of(Expressir::Model::Statements::Assignment)
279
- expect(x.expression).to be_instance_of(Expressir::Model::Expressions::Query)
324
+ expect(x.expression).to be_instance_of(Expressir::Model::Expressions::QueryExpression)
280
325
  expect(x.expression.remarks).to be_instance_of(Array)
281
326
  expect(x.expression.remarks.count).to eq(1)
282
327
  expect(x.expression.remarks[0]).to eq("rule query scope - rule query")