expressir 1.4.3 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (482) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codeql.yml +2 -14
  3. data/.github/workflows/rake.yml +6 -364
  4. data/.github/workflows/release.yml +15 -178
  5. data/.github/workflows/stress.yml +1 -18
  6. data/.rubocop.yml +1 -0
  7. data/.rubocop_todo.yml +21 -0
  8. data/Gemfile +12 -0
  9. data/README.adoc +6 -19
  10. data/Rakefile +6 -7
  11. data/exe/{format-test → expressir-format-test} +1 -1
  12. data/expressir.gemspec +23 -32
  13. data/expressir_wrapped.txt +23068 -0
  14. data/lib/expressir/cli.rb +1 -1
  15. data/lib/expressir/express/formatter.rb +661 -661
  16. data/lib/expressir/express/parser.rb +299 -33
  17. data/lib/expressir/express/visitor.rb +238 -133
  18. data/lib/expressir/liquid/cache_drop.rb +20 -0
  19. data/lib/expressir/liquid/data_type_drop.rb +8 -0
  20. data/lib/expressir/liquid/data_types/aggregate_drop.rb +21 -0
  21. data/lib/expressir/liquid/data_types/array_drop.rb +34 -0
  22. data/lib/expressir/liquid/data_types/bag_drop.rb +26 -0
  23. data/lib/expressir/liquid/data_types/binary_drop.rb +22 -0
  24. data/lib/expressir/liquid/data_types/boolean_drop.rb +10 -0
  25. data/lib/expressir/liquid/data_types/enumeration_drop.rb +30 -0
  26. data/lib/expressir/liquid/data_types/enumeration_item_drop.rb +17 -0
  27. data/lib/expressir/liquid/data_types/generic_drop.rb +17 -0
  28. data/lib/expressir/liquid/data_types/generic_entity_drop.rb +17 -0
  29. data/lib/expressir/liquid/data_types/integer_drop.rb +10 -0
  30. data/lib/expressir/liquid/data_types/list_drop.rb +30 -0
  31. data/lib/expressir/liquid/data_types/logical_drop.rb +10 -0
  32. data/lib/expressir/liquid/data_types/number_drop.rb +10 -0
  33. data/lib/expressir/liquid/data_types/real_drop.rb +18 -0
  34. data/lib/expressir/liquid/data_types/select_drop.rb +34 -0
  35. data/lib/expressir/liquid/data_types/set_drop.rb +26 -0
  36. data/lib/expressir/liquid/data_types/string_drop.rb +22 -0
  37. data/lib/expressir/liquid/declaration_drop.rb +8 -0
  38. data/lib/expressir/liquid/declarations/attribute_drop.rb +37 -0
  39. data/lib/expressir/liquid/declarations/constant_drop.rb +25 -0
  40. data/lib/expressir/liquid/declarations/entity_drop.rb +65 -0
  41. data/lib/expressir/liquid/declarations/function_drop.rb +93 -0
  42. data/lib/expressir/liquid/declarations/interface_drop.rb +30 -0
  43. data/lib/expressir/liquid/declarations/interface_item_drop.rb +22 -0
  44. data/lib/expressir/liquid/declarations/interfaced_item_drop.rb +34 -0
  45. data/lib/expressir/liquid/declarations/parameter_drop.rb +25 -0
  46. data/lib/expressir/liquid/declarations/procedure_drop.rb +89 -0
  47. data/lib/expressir/liquid/declarations/remark_item_drop.rb +22 -0
  48. data/lib/expressir/liquid/declarations/rule_drop.rb +105 -0
  49. data/lib/expressir/liquid/declarations/schema_drop.rb +91 -0
  50. data/lib/expressir/liquid/declarations/schema_version_drop.rb +26 -0
  51. data/lib/expressir/liquid/declarations/schema_version_item_drop.rb +22 -0
  52. data/lib/expressir/liquid/declarations/subtype_constraint_drop.rb +37 -0
  53. data/lib/expressir/liquid/declarations/type_drop.rb +37 -0
  54. data/lib/expressir/liquid/declarations/unique_rule_drop.rb +21 -0
  55. data/lib/expressir/liquid/declarations/variable_drop.rb +25 -0
  56. data/lib/expressir/liquid/declarations/where_rule_drop.rb +21 -0
  57. data/lib/expressir/liquid/expression_drop.rb +8 -0
  58. data/lib/expressir/liquid/expressions/aggregate_initializer_drop.rb +24 -0
  59. data/lib/expressir/liquid/expressions/aggregate_initializer_item_drop.rb +22 -0
  60. data/lib/expressir/liquid/expressions/binary_expression_drop.rb +26 -0
  61. data/lib/expressir/liquid/expressions/entity_constructor_drop.rb +26 -0
  62. data/lib/expressir/liquid/expressions/function_call_drop.rb +26 -0
  63. data/lib/expressir/liquid/expressions/interval_drop.rb +34 -0
  64. data/lib/expressir/liquid/expressions/query_expression_drop.rb +25 -0
  65. data/lib/expressir/liquid/expressions/unary_expression_drop.rb +22 -0
  66. data/lib/expressir/liquid/identifier_drop.rb +33 -0
  67. data/lib/expressir/liquid/literal_drop.rb +8 -0
  68. data/lib/expressir/liquid/literals/binary_drop.rb +18 -0
  69. data/lib/expressir/liquid/literals/integer_drop.rb +18 -0
  70. data/lib/expressir/liquid/literals/logical_drop.rb +18 -0
  71. data/lib/expressir/liquid/literals/real_drop.rb +18 -0
  72. data/lib/expressir/liquid/literals/string_drop.rb +22 -0
  73. data/lib/expressir/liquid/model_element_drop.rb +33 -0
  74. data/lib/expressir/liquid/reference_drop.rb +8 -0
  75. data/lib/expressir/liquid/references/attribute_reference_drop.rb +22 -0
  76. data/lib/expressir/liquid/references/group_reference_drop.rb +22 -0
  77. data/lib/expressir/liquid/references/index_reference_drop.rb +26 -0
  78. data/lib/expressir/liquid/references/simple_reference_drop.rb +22 -0
  79. data/lib/expressir/liquid/repository_drop.rb +22 -0
  80. data/lib/expressir/liquid/statement_drop.rb +8 -0
  81. data/lib/expressir/liquid/statements/alias_drop.rb +29 -0
  82. data/lib/expressir/liquid/statements/assignment_drop.rb +22 -0
  83. data/lib/expressir/liquid/statements/case_action_drop.rb +26 -0
  84. data/lib/expressir/liquid/statements/case_drop.rb +30 -0
  85. data/lib/expressir/liquid/statements/compound_drop.rb +22 -0
  86. data/lib/expressir/liquid/statements/escape_drop.rb +10 -0
  87. data/lib/expressir/liquid/statements/if_drop.rb +34 -0
  88. data/lib/expressir/liquid/statements/null_drop.rb +10 -0
  89. data/lib/expressir/liquid/statements/procedure_call_drop.rb +26 -0
  90. data/lib/expressir/liquid/statements/repeat_drop.rb +45 -0
  91. data/lib/expressir/liquid/statements/return_drop.rb +18 -0
  92. data/lib/expressir/liquid/statements/skip_drop.rb +10 -0
  93. data/lib/expressir/liquid/supertype_expression_drop.rb +8 -0
  94. data/lib/expressir/liquid/supertype_expressions/binary_supertype_expression_drop.rb +26 -0
  95. data/lib/expressir/liquid/supertype_expressions/oneof_supertype_expression_drop.rb +22 -0
  96. data/lib/expressir/liquid.rb +18 -0
  97. data/lib/expressir/model/declarations/interface_item.rb +1 -1
  98. data/lib/expressir/model/model_element.rb +7 -0
  99. data/lib/expressir/version.rb +1 -1
  100. data/lib/expressir.rb +2 -0
  101. metadata +101 -569
  102. data/.cross_rubies +0 -28
  103. data/.gitmodules +0 -6
  104. data/.yardopts +0 -11
  105. data/exe/generate-parser +0 -51
  106. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/CMakeLists.txt +0 -191
  107. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj +0 -652
  108. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2019.vcxproj.filters +0 -948
  109. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2022.vcxproj +0 -652
  110. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlr4cpp-vs2022.vcxproj.filters +0 -948
  111. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/Info.plist +0 -26
  112. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp-ios/antlrcpp_ios.h +0 -17
  113. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.pbxproj +0 -3040
  114. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  115. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  116. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4.xcscheme +0 -76
  117. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_ios.xcscheme +0 -76
  118. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/antlrcpp.xcodeproj/xcshareddata/xcschemes/antlr4_static.xcscheme +0 -76
  119. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.noarch.nuspec +0 -23
  120. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.noarch.targets +0 -8
  121. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.nuspec +0 -30
  122. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.props +0 -21
  123. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.shared.targets +0 -44
  124. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.static.nuspec +0 -29
  125. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/ANTLR4.Runtime.cpp.static.targets +0 -44
  126. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/antlr4.jpg +0 -0
  127. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/nuget/pack.cmd +0 -93
  128. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.cpp +0 -10
  129. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorListener.h +0 -167
  130. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.cpp +0 -10
  131. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRErrorStrategy.h +0 -121
  132. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.cpp +0 -23
  133. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRFileStream.h +0 -30
  134. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.cpp +0 -180
  135. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ANTLRInputStream.h +0 -79
  136. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.cpp +0 -61
  137. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BailErrorStrategy.h +0 -59
  138. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.cpp +0 -25
  139. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BaseErrorListener.h +0 -36
  140. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.cpp +0 -414
  141. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/BufferedTokenStream.h +0 -200
  142. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.cpp +0 -11
  143. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CharStream.h +0 -37
  144. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.cpp +0 -193
  145. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonToken.h +0 -158
  146. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.cpp +0 -39
  147. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenFactory.h +0 -74
  148. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.cpp +0 -78
  149. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/CommonTokenStream.h +0 -79
  150. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.cpp +0 -15
  151. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ConsoleErrorListener.h +0 -35
  152. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.cpp +0 -336
  153. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DefaultErrorStrategy.h +0 -466
  154. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.cpp +0 -84
  155. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/DiagnosticErrorListener.h +0 -80
  156. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.cpp +0 -64
  157. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Exceptions.h +0 -99
  158. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.cpp +0 -52
  159. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FailedPredicateException.h +0 -32
  160. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FlatHashMap.h +0 -57
  161. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/FlatHashSet.h +0 -57
  162. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.cpp +0 -18
  163. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InputMismatchException.h +0 -24
  164. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.cpp +0 -12
  165. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/IntStream.h +0 -218
  166. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.cpp +0 -19
  167. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/InterpreterRuleContext.h +0 -45
  168. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.cpp +0 -294
  169. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Lexer.h +0 -196
  170. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.cpp +0 -60
  171. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerInterpreter.h +0 -46
  172. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.cpp +0 -36
  173. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/LexerNoViableAltException.h +0 -31
  174. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.cpp +0 -92
  175. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ListTokenSource.h +0 -88
  176. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.cpp +0 -46
  177. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/NoViableAltException.h +0 -42
  178. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.cpp +0 -670
  179. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Parser.h +0 -461
  180. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.cpp +0 -294
  181. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserInterpreter.h +0 -173
  182. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.cpp +0 -138
  183. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ParserRuleContext.h +0 -147
  184. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.cpp +0 -53
  185. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/ProxyErrorListener.h +0 -38
  186. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.cpp +0 -65
  187. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RecognitionException.h +0 -98
  188. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.cpp +0 -157
  189. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Recognizer.h +0 -160
  190. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.cpp +0 -144
  191. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContext.h +0 -141
  192. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.cpp +0 -27
  193. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuleContextWithAltNum.h +0 -32
  194. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.cpp +0 -54
  195. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/RuntimeMetaData.h +0 -155
  196. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.cpp +0 -9
  197. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Token.h +0 -92
  198. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenFactory.h +0 -30
  199. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.cpp +0 -9
  200. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenSource.h +0 -85
  201. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.cpp +0 -11
  202. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStream.h +0 -137
  203. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.cpp +0 -425
  204. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/TokenStreamRewriter.h +0 -295
  205. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.cpp +0 -208
  206. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedCharStream.h +0 -117
  207. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.cpp +0 -270
  208. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/UnbufferedTokenStream.h +0 -115
  209. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Version.h +0 -42
  210. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.cpp +0 -64
  211. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/Vocabulary.h +0 -177
  212. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.cpp +0 -9
  213. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/WritableToken.h +0 -23
  214. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-common.h +0 -101
  215. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/antlr4-runtime.h +0 -168
  216. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.cpp +0 -159
  217. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATN.h +0 -133
  218. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.cpp +0 -106
  219. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfig.h +0 -157
  220. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.cpp +0 -233
  221. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNConfigSet.h +0 -157
  222. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.cpp +0 -39
  223. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializationOptions.h +0 -48
  224. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.cpp +0 -628
  225. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNDeserializer.h +0 -32
  226. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.cpp +0 -33
  227. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNSimulator.h +0 -71
  228. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.cpp +0 -56
  229. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNState.h +0 -139
  230. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.cpp +0 -33
  231. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNStateType.h +0 -36
  232. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ATNType.h +0 -20
  233. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.cpp +0 -29
  234. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ActionTransition.h +0 -35
  235. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.cpp +0 -16
  236. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AmbiguityInfo.h +0 -68
  237. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.cpp +0 -129
  238. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ArrayPredictionContext.h +0 -51
  239. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.cpp +0 -27
  240. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/AtomTransition.h +0 -33
  241. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicBlockStartState.h +0 -24
  242. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BasicState.h +0 -23
  243. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockEndState.h +0 -26
  244. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/BlockStartState.h +0 -30
  245. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.cpp +0 -14
  246. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ContextSensitivityInfo.h +0 -47
  247. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.cpp +0 -14
  248. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionEventInfo.h +0 -70
  249. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.cpp +0 -25
  250. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionInfo.h +0 -227
  251. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.cpp +0 -12
  252. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/DecisionState.h +0 -34
  253. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.cpp +0 -31
  254. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/EpsilonTransition.h +0 -42
  255. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.cpp +0 -15
  256. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ErrorInfo.h +0 -43
  257. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/HashUtils.h +0 -18
  258. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.cpp +0 -189
  259. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LL1Analyzer.h +0 -76
  260. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.cpp +0 -67
  261. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNConfig.h +0 -44
  262. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.cpp +0 -621
  263. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerATNSimulator.h +0 -199
  264. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.cpp +0 -15
  265. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerAction.h +0 -100
  266. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.cpp +0 -108
  267. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionExecutor.h +0 -128
  268. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerActionType.h +0 -57
  269. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.cpp +0 -43
  270. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerChannelAction.h +0 -59
  271. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.cpp +0 -45
  272. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerCustomAction.h +0 -75
  273. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.cpp +0 -50
  274. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerIndexedCustomAction.h +0 -76
  275. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.cpp +0 -43
  276. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerModeAction.h +0 -57
  277. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.cpp +0 -36
  278. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerMoreAction.h +0 -53
  279. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.cpp +0 -36
  280. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPopModeAction.h +0 -53
  281. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.cpp +0 -43
  282. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerPushModeAction.h +0 -57
  283. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.cpp +0 -36
  284. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerSkipAction.h +0 -51
  285. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.cpp +0 -43
  286. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LexerTypeAction.h +0 -51
  287. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.cpp +0 -16
  288. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LookaheadEventInfo.h +0 -42
  289. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/LoopEndState.h +0 -26
  290. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.cpp +0 -22
  291. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/NotSetTransition.h +0 -27
  292. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.cpp +0 -16
  293. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/OrderedATNConfigSet.h +0 -25
  294. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.cpp +0 -102
  295. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParseInfo.h +0 -102
  296. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.cpp +0 -1413
  297. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulator.h +0 -911
  298. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ParserATNSimulatorOptions.h +0 -50
  299. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusBlockStartState.h +0 -29
  300. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PlusLoopbackState.h +0 -25
  301. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.cpp +0 -23
  302. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PrecedencePredicateTransition.h +0 -35
  303. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.cpp +0 -17
  304. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateEvalInfo.h +0 -62
  305. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.cpp +0 -24
  306. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredicateTransition.h +0 -50
  307. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.cpp +0 -601
  308. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContext.h +0 -225
  309. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.cpp +0 -56
  310. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextCache.h +0 -63
  311. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.cpp +0 -167
  312. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCache.h +0 -101
  313. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextMergeCacheOptions.h +0 -71
  314. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionContextType.h +0 -21
  315. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.cpp +0 -202
  316. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/PredictionMode.h +0 -436
  317. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.cpp +0 -179
  318. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/ProfilingATNSimulator.h +0 -60
  319. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.cpp +0 -26
  320. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RangeTransition.h +0 -31
  321. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStartState.h +0 -26
  322. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleStopState.h +0 -27
  323. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.cpp +0 -33
  324. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/RuleTransition.h +0 -42
  325. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.cpp +0 -418
  326. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContext.h +0 -237
  327. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SemanticContextType.h +0 -23
  328. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SerializedATNView.h +0 -101
  329. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.cpp +0 -28
  330. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SetTransition.h +0 -38
  331. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.cpp +0 -79
  332. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/SingletonPredictionContext.h +0 -43
  333. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarBlockStartState.h +0 -24
  334. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopEntryState.h +0 -37
  335. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.cpp +0 -19
  336. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/StarLoopbackState.h +0 -25
  337. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TokensStartState.h +0 -24
  338. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.cpp +0 -36
  339. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/Transition.h +0 -65
  340. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.cpp +0 -27
  341. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/TransitionType.h +0 -33
  342. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.cpp +0 -21
  343. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/atn/WildcardTransition.h +0 -27
  344. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.cpp +0 -115
  345. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFA.h +0 -96
  346. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.cpp +0 -60
  347. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFASerializer.h +0 -32
  348. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.cpp +0 -59
  349. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/DFAState.h +0 -154
  350. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.cpp +0 -17
  351. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/dfa/LexerDFASerializer.h +0 -22
  352. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/internal/Synchronization.cpp +0 -100
  353. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/internal/Synchronization.h +0 -154
  354. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.cpp +0 -124
  355. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/InterpreterDataReader.h +0 -33
  356. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.cpp +0 -61
  357. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Interval.h +0 -84
  358. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.cpp +0 -508
  359. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/IntervalSet.h +0 -190
  360. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.cpp +0 -120
  361. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/MurmurHash.h +0 -102
  362. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.cpp +0 -4
  363. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/misc/Predicate.h +0 -21
  364. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.cpp +0 -8
  365. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Any.h +0 -16
  366. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.cpp +0 -43
  367. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Arrays.h +0 -149
  368. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/BitSet.h +0 -76
  369. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.cpp +0 -207
  370. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/CPPUtils.h +0 -65
  371. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Casts.h +0 -34
  372. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Declarations.h +0 -161
  373. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.cpp +0 -38
  374. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/StringUtils.h +0 -16
  375. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Unicode.h +0 -28
  376. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.cpp +0 -242
  377. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/support/Utf8.h +0 -54
  378. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/AbstractParseTreeVisitor.h +0 -129
  379. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNode.h +0 -24
  380. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.cpp +0 -54
  381. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ErrorNodeImpl.h +0 -43
  382. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.cpp +0 -66
  383. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/IterativeParseTreeWalker.h +0 -53
  384. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.cpp +0 -12
  385. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTree.h +0 -111
  386. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.cpp +0 -9
  387. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeListener.h +0 -39
  388. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeProperty.h +0 -50
  389. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeType.h +0 -22
  390. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.cpp +0 -9
  391. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeVisitor.h +0 -57
  392. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.cpp +0 -48
  393. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/ParseTreeWalker.h +0 -55
  394. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNode.h +0 -40
  395. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.cpp +0 -54
  396. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/TerminalNodeImpl.h +0 -32
  397. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.cpp +0 -241
  398. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/Trees.h +0 -78
  399. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.cpp +0 -9
  400. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/Chunk.h +0 -44
  401. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.cpp +0 -69
  402. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreeMatch.h +0 -132
  403. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.cpp +0 -64
  404. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePattern.h +0 -105
  405. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +0 -370
  406. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.h +0 -185
  407. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.cpp +0 -77
  408. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/RuleTagToken.h +0 -117
  409. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.cpp +0 -39
  410. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TagChunk.h +0 -86
  411. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.cpp +0 -28
  412. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TextChunk.h +0 -51
  413. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.cpp +0 -36
  414. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/pattern/TokenTagToken.h +0 -80
  415. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.cpp +0 -154
  416. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPath.h +0 -86
  417. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.cpp +0 -31
  418. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathElement.h +0 -40
  419. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.cpp +0 -180
  420. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.g4 +0 -64
  421. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.h +0 -53
  422. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexer.tokens +0 -12
  423. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.cpp +0 -13
  424. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathLexerErrorListener.h +0 -22
  425. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +0 -20
  426. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleAnywhereElement.h +0 -27
  427. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.cpp +0 -30
  428. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathRuleElement.h +0 -26
  429. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +0 -20
  430. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenAnywhereElement.h +0 -25
  431. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.cpp +0 -33
  432. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathTokenElement.h +0 -26
  433. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +0 -23
  434. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +0 -23
  435. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.cpp +0 -24
  436. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/src/tree/xpath/XPathWildcardElement.h +0 -23
  437. data/ext/express_parser/antlr4-upstream/runtime/Cpp/runtime/tests/Utf8Test.cpp +0 -110
  438. data/ext/express_parser/antlrgen/Express.interp +0 -532
  439. data/ext/express_parser/antlrgen/Express.tokens +0 -190
  440. data/ext/express_parser/antlrgen/ExpressBaseListener.cpp +0 -7
  441. data/ext/express_parser/antlrgen/ExpressBaseListener.h +0 -623
  442. data/ext/express_parser/antlrgen/ExpressBaseVisitor.cpp +0 -7
  443. data/ext/express_parser/antlrgen/ExpressBaseVisitor.h +0 -816
  444. data/ext/express_parser/antlrgen/ExpressLexer.cpp +0 -685
  445. data/ext/express_parser/antlrgen/ExpressLexer.h +0 -78
  446. data/ext/express_parser/antlrgen/ExpressLexer.interp +0 -534
  447. data/ext/express_parser/antlrgen/ExpressLexer.tokens +0 -190
  448. data/ext/express_parser/antlrgen/ExpressListener.cpp +0 -7
  449. data/ext/express_parser/antlrgen/ExpressListener.h +0 -616
  450. data/ext/express_parser/antlrgen/ExpressParser.cpp +0 -17591
  451. data/ext/express_parser/antlrgen/ExpressParser.h +0 -3692
  452. data/ext/express_parser/antlrgen/ExpressVisitor.cpp +0 -7
  453. data/ext/express_parser/antlrgen/ExpressVisitor.h +0 -422
  454. data/ext/express_parser/express_parser.cpp +0 -19405
  455. data/ext/express_parser/extconf.rb +0 -63
  456. data/rakelib/antlr4-native.rake +0 -173
  457. data/rakelib/cross-ruby.rake +0 -403
  458. data/spec/acceptance/version_spec.rb +0 -30
  459. data/spec/expressir/express/cache_spec.rb +0 -89
  460. data/spec/expressir/express/formatter_spec.rb +0 -171
  461. data/spec/expressir/express/parser_spec.rb +0 -141
  462. data/spec/expressir/model/model_element_spec.rb +0 -343
  463. data/spec/spec_helper.rb +0 -24
  464. data/spec/support/console_helper.rb +0 -29
  465. data/spec/syntax/multiple.exp +0 -23
  466. data/spec/syntax/multiple.yaml +0 -198
  467. data/spec/syntax/multiple_formatted.exp +0 -71
  468. data/spec/syntax/multiple_hyperlink_formatted.exp +0 -71
  469. data/spec/syntax/multiple_schema_head_hyperlink_formatted.exp +0 -13
  470. data/spec/syntax/remark.exp +0 -193
  471. data/spec/syntax/remark.yaml +0 -471
  472. data/spec/syntax/remark_formatted.exp +0 -228
  473. data/spec/syntax/single.exp +0 -4
  474. data/spec/syntax/single.yaml +0 -18
  475. data/spec/syntax/single_formatted.exp +0 -10
  476. data/spec/syntax/single_formatted.yaml +0 -36
  477. data/spec/syntax/syntax.exp +0 -333
  478. data/spec/syntax/syntax.yaml +0 -3509
  479. data/spec/syntax/syntax_formatted.exp +0 -902
  480. data/spec/syntax/syntax_hyperlink_formatted.exp +0 -902
  481. data/spec/syntax/syntax_schema_head_formatted.exp +0 -18
  482. /data/exe/{format → expressir-format} +0 -0
@@ -1,466 +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 "ANTLRErrorStrategy.h"
9
- #include "misc/IntervalSet.h"
10
-
11
- namespace antlr4 {
12
-
13
- /**
14
- * This is the default implementation of {@link ANTLRErrorStrategy} used for
15
- * error reporting and recovery in ANTLR parsers.
16
- */
17
- class ANTLR4CPP_PUBLIC DefaultErrorStrategy : public ANTLRErrorStrategy {
18
- public:
19
- DefaultErrorStrategy();
20
- DefaultErrorStrategy(DefaultErrorStrategy const& other) = delete;
21
- virtual ~DefaultErrorStrategy();
22
-
23
- DefaultErrorStrategy& operator = (DefaultErrorStrategy const& other) = delete;
24
-
25
- protected:
26
- /**
27
- * Indicates whether the error strategy is currently "recovering from an
28
- * error". This is used to suppress reporting multiple error messages while
29
- * attempting to recover from a detected syntax error.
30
- *
31
- * @see #inErrorRecoveryMode
32
- */
33
- bool errorRecoveryMode;
34
-
35
- /** The index into the input stream where the last error occurred.
36
- * This is used to prevent infinite loops where an error is found
37
- * but no token is consumed during recovery...another error is found,
38
- * ad nauseum. This is a failsafe mechanism to guarantee that at least
39
- * one token/tree node is consumed for two errors.
40
- */
41
- int lastErrorIndex;
42
-
43
- misc::IntervalSet lastErrorStates;
44
-
45
- /// <summary>
46
- /// {@inheritDoc}
47
- /// <p/>
48
- /// The default implementation simply calls <seealso cref="#endErrorCondition"/> to
49
- /// ensure that the handler is not in error recovery mode.
50
- /// </summary>
51
- public:
52
- virtual void reset(Parser *recognizer) override;
53
-
54
- /// <summary>
55
- /// This method is called to enter error recovery mode when a recognition
56
- /// exception is reported.
57
- /// </summary>
58
- /// <param name="recognizer"> the parser instance </param>
59
- protected:
60
- virtual void beginErrorCondition(Parser *recognizer);
61
-
62
- /// <summary>
63
- /// {@inheritDoc}
64
- /// </summary>
65
- public:
66
- virtual bool inErrorRecoveryMode(Parser *recognizer) override;
67
-
68
- /// <summary>
69
- /// This method is called to leave error recovery mode after recovering from
70
- /// a recognition exception.
71
- /// </summary>
72
- /// <param name="recognizer"> </param>
73
- protected:
74
- virtual void endErrorCondition(Parser *recognizer);
75
-
76
- /// <summary>
77
- /// {@inheritDoc}
78
- /// <p/>
79
- /// The default implementation simply calls <seealso cref="#endErrorCondition"/>.
80
- /// </summary>
81
- public:
82
- virtual void reportMatch(Parser *recognizer) override;
83
-
84
- /// {@inheritDoc}
85
- /// <p/>
86
- /// The default implementation returns immediately if the handler is already
87
- /// in error recovery mode. Otherwise, it calls <seealso cref="#beginErrorCondition"/>
88
- /// and dispatches the reporting task based on the runtime type of {@code e}
89
- /// according to the following table.
90
- ///
91
- /// <ul>
92
- /// <li><seealso cref="NoViableAltException"/>: Dispatches the call to
93
- /// <seealso cref="#reportNoViableAlternative"/></li>
94
- /// <li><seealso cref="InputMismatchException"/>: Dispatches the call to
95
- /// <seealso cref="#reportInputMismatch"/></li>
96
- /// <li><seealso cref="FailedPredicateException"/>: Dispatches the call to
97
- /// <seealso cref="#reportFailedPredicate"/></li>
98
- /// <li>All other types: calls <seealso cref="Parser#notifyErrorListeners"/> to report
99
- /// the exception</li>
100
- /// </ul>
101
- virtual void reportError(Parser *recognizer, const RecognitionException &e) override;
102
-
103
- /// <summary>
104
- /// {@inheritDoc}
105
- /// <p/>
106
- /// The default implementation resynchronizes the parser by consuming tokens
107
- /// until we find one in the resynchronization set--loosely the set of tokens
108
- /// that can follow the current rule.
109
- /// </summary>
110
- virtual void recover(Parser *recognizer, std::exception_ptr e) override;
111
-
112
- /**
113
- * The default implementation of {@link ANTLRErrorStrategy#sync} makes sure
114
- * that the current lookahead symbol is consistent with what were expecting
115
- * at this point in the ATN. You can call this anytime but ANTLR only
116
- * generates code to check before subrules/loops and each iteration.
117
- *
118
- * <p>Implements Jim Idle's magic sync mechanism in closures and optional
119
- * subrules. E.g.,</p>
120
- *
121
- * <pre>
122
- * a : sync ( stuff sync )* ;
123
- * sync : {consume to what can follow sync} ;
124
- * </pre>
125
- *
126
- * At the start of a sub rule upon error, {@link #sync} performs single
127
- * token deletion, if possible. If it can't do that, it bails on the current
128
- * rule and uses the default error recovery, which consumes until the
129
- * resynchronization set of the current rule.
130
- *
131
- * <p>If the sub rule is optional ({@code (...)?}, {@code (...)*}, or block
132
- * with an empty alternative), then the expected set includes what follows
133
- * the subrule.</p>
134
- *
135
- * <p>During loop iteration, it consumes until it sees a token that can start a
136
- * sub rule or what follows loop. Yes, that is pretty aggressive. We opt to
137
- * stay in the loop as long as possible.</p>
138
- *
139
- * <p><strong>ORIGINS</strong></p>
140
- *
141
- * <p>Previous versions of ANTLR did a poor job of their recovery within loops.
142
- * A single mismatch token or missing token would force the parser to bail
143
- * out of the entire rules surrounding the loop. So, for rule</p>
144
- *
145
- * <pre>
146
- * classDef : 'class' ID '{' member* '}'
147
- * </pre>
148
- *
149
- * input with an extra token between members would force the parser to
150
- * consume until it found the next class definition rather than the next
151
- * member definition of the current class.
152
- *
153
- * <p>This functionality cost a little bit of effort because the parser has to
154
- * compare token set at the start of the loop and at each iteration. If for
155
- * some reason speed is suffering for you, you can turn off this
156
- * functionality by simply overriding this method as a blank { }.</p>
157
- */
158
- virtual void sync(Parser *recognizer) override;
159
-
160
- /// <summary>
161
- /// This is called by <seealso cref="#reportError"/> when the exception is a
162
- /// <seealso cref="NoViableAltException"/>.
163
- /// </summary>
164
- /// <seealso cref= #reportError
165
- /// </seealso>
166
- /// <param name="recognizer"> the parser instance </param>
167
- /// <param name="e"> the recognition exception </param>
168
- protected:
169
- virtual void reportNoViableAlternative(Parser *recognizer, const NoViableAltException &e);
170
-
171
- /// <summary>
172
- /// This is called by <seealso cref="#reportError"/> when the exception is an
173
- /// <seealso cref="InputMismatchException"/>.
174
- /// </summary>
175
- /// <seealso cref= #reportError
176
- /// </seealso>
177
- /// <param name="recognizer"> the parser instance </param>
178
- /// <param name="e"> the recognition exception </param>
179
- virtual void reportInputMismatch(Parser *recognizer, const InputMismatchException &e);
180
-
181
- /// <summary>
182
- /// This is called by <seealso cref="#reportError"/> when the exception is a
183
- /// <seealso cref="FailedPredicateException"/>.
184
- /// </summary>
185
- /// <seealso cref= #reportError
186
- /// </seealso>
187
- /// <param name="recognizer"> the parser instance </param>
188
- /// <param name="e"> the recognition exception </param>
189
- virtual void reportFailedPredicate(Parser *recognizer, const FailedPredicateException &e);
190
-
191
- /**
192
- * This method is called to report a syntax error which requires the removal
193
- * of a token from the input stream. At the time this method is called, the
194
- * erroneous symbol is current {@code LT(1)} symbol and has not yet been
195
- * removed from the input stream. When this method returns,
196
- * {@code recognizer} is in error recovery mode.
197
- *
198
- * <p>This method is called when {@link #singleTokenDeletion} identifies
199
- * single-token deletion as a viable recovery strategy for a mismatched
200
- * input error.</p>
201
- *
202
- * <p>The default implementation simply returns if the handler is already in
203
- * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to
204
- * enter error recovery mode, followed by calling
205
- * {@link Parser#notifyErrorListeners}.</p>
206
- *
207
- * @param recognizer the parser instance
208
- */
209
- virtual void reportUnwantedToken(Parser *recognizer);
210
-
211
- /**
212
- * This method is called to report a syntax error which requires the
213
- * insertion of a missing token into the input stream. At the time this
214
- * method is called, the missing token has not yet been inserted. When this
215
- * method returns, {@code recognizer} is in error recovery mode.
216
- *
217
- * <p>This method is called when {@link #singleTokenInsertion} identifies
218
- * single-token insertion as a viable recovery strategy for a mismatched
219
- * input error.</p>
220
- *
221
- * <p>The default implementation simply returns if the handler is already in
222
- * error recovery mode. Otherwise, it calls {@link #beginErrorCondition} to
223
- * enter error recovery mode, followed by calling
224
- * {@link Parser#notifyErrorListeners}.</p>
225
- *
226
- * @param recognizer the parser instance
227
- */
228
- virtual void reportMissingToken(Parser *recognizer);
229
-
230
- public:
231
- /**
232
- * {@inheritDoc}
233
- *
234
- * <p>The default implementation attempts to recover from the mismatched input
235
- * by using single token insertion and deletion as described below. If the
236
- * recovery attempt fails, this method throws an
237
- * {@link InputMismatchException}.</p>
238
- *
239
- * <p><strong>EXTRA TOKEN</strong> (single token deletion)</p>
240
- *
241
- * <p>{@code LA(1)} is not what we are looking for. If {@code LA(2)} has the
242
- * right token, however, then assume {@code LA(1)} is some extra spurious
243
- * token and delete it. Then consume and return the next token (which was
244
- * the {@code LA(2)} token) as the successful result of the match operation.</p>
245
- *
246
- * <p>This recovery strategy is implemented by {@link #singleTokenDeletion}.</p>
247
- *
248
- * <p><strong>MISSING TOKEN</strong> (single token insertion)</p>
249
- *
250
- * <p>If current token (at {@code LA(1)}) is consistent with what could come
251
- * after the expected {@code LA(1)} token, then assume the token is missing
252
- * and use the parser's {@link TokenFactory} to create it on the fly. The
253
- * "insertion" is performed by returning the created token as the successful
254
- * result of the match operation.</p>
255
- *
256
- * <p>This recovery strategy is implemented by {@link #singleTokenInsertion}.</p>
257
- *
258
- * <p><strong>EXAMPLE</strong></p>
259
- *
260
- * <p>For example, Input {@code i=(3;} is clearly missing the {@code ')'}. When
261
- * the parser returns from the nested call to {@code expr}, it will have
262
- * call chain:</p>
263
- *
264
- * <pre>
265
- * stat &rarr; expr &rarr; atom
266
- * </pre>
267
- *
268
- * and it will be trying to match the {@code ')'} at this point in the
269
- * derivation:
270
- *
271
- * <pre>
272
- * =&gt; ID '=' '(' INT ')' ('+' atom)* ';'
273
- * ^
274
- * </pre>
275
- *
276
- * The attempt to match {@code ')'} will fail when it sees {@code ';'} and
277
- * call {@link #recoverInline}. To recover, it sees that {@code LA(1)==';'}
278
- * is in the set of tokens that can follow the {@code ')'} token reference
279
- * in rule {@code atom}. It can assume that you forgot the {@code ')'}.
280
- */
281
- virtual Token* recoverInline(Parser *recognizer) override;
282
-
283
- /// <summary>
284
- /// This method implements the single-token insertion inline error recovery
285
- /// strategy. It is called by <seealso cref="#recoverInline"/> if the single-token
286
- /// deletion strategy fails to recover from the mismatched input. If this
287
- /// method returns {@code true}, {@code recognizer} will be in error recovery
288
- /// mode.
289
- /// <p/>
290
- /// This method determines whether or not single-token insertion is viable by
291
- /// checking if the {@code LA(1)} input symbol could be successfully matched
292
- /// if it were instead the {@code LA(2)} symbol. If this method returns
293
- /// {@code true}, the caller is responsible for creating and inserting a
294
- /// token with the correct type to produce this behavior.
295
- /// </summary>
296
- /// <param name="recognizer"> the parser instance </param>
297
- /// <returns> {@code true} if single-token insertion is a viable recovery
298
- /// strategy for the current mismatched input, otherwise {@code false} </returns>
299
- protected:
300
- virtual bool singleTokenInsertion(Parser *recognizer);
301
-
302
- /// <summary>
303
- /// This method implements the single-token deletion inline error recovery
304
- /// strategy. It is called by <seealso cref="#recoverInline"/> to attempt to recover
305
- /// from mismatched input. If this method returns null, the parser and error
306
- /// handler state will not have changed. If this method returns non-null,
307
- /// {@code recognizer} will <em>not</em> be in error recovery mode since the
308
- /// returned token was a successful match.
309
- /// <p/>
310
- /// If the single-token deletion is successful, this method calls
311
- /// <seealso cref="#reportUnwantedToken"/> to report the error, followed by
312
- /// <seealso cref="Parser#consume"/> to actually "delete" the extraneous token. Then,
313
- /// before returning <seealso cref="#reportMatch"/> is called to signal a successful
314
- /// match.
315
- /// </summary>
316
- /// <param name="recognizer"> the parser instance </param>
317
- /// <returns> the successfully matched <seealso cref="Token"/> instance if single-token
318
- /// deletion successfully recovers from the mismatched input, otherwise
319
- /// {@code null} </returns>
320
- virtual Token* singleTokenDeletion(Parser *recognizer);
321
-
322
- /// <summary>
323
- /// Conjure up a missing token during error recovery.
324
- ///
325
- /// The recognizer attempts to recover from single missing
326
- /// symbols. But, actions might refer to that missing symbol.
327
- /// For example, x=ID {f($x);}. The action clearly assumes
328
- /// that there has been an identifier matched previously and that
329
- /// $x points at that token. If that token is missing, but
330
- /// the next token in the stream is what we want we assume that
331
- /// this token is missing and we keep going. Because we
332
- /// have to return some token to replace the missing token,
333
- /// we have to conjure one up. This method gives the user control
334
- /// over the tokens returned for missing tokens. Mostly,
335
- /// you will want to create something special for identifier
336
- /// tokens. For literals such as '{' and ',', the default
337
- /// action in the parser or tree parser works. It simply creates
338
- /// a CommonToken of the appropriate type. The text will be the token.
339
- /// If you change what tokens must be created by the lexer,
340
- /// override this method to create the appropriate tokens.
341
- /// </summary>
342
- virtual Token* getMissingSymbol(Parser *recognizer);
343
-
344
- virtual misc::IntervalSet getExpectedTokens(Parser *recognizer);
345
-
346
- /// <summary>
347
- /// How should a token be displayed in an error message? The default
348
- /// is to display just the text, but during development you might
349
- /// want to have a lot of information spit out. Override in that case
350
- /// to use t.toString() (which, for CommonToken, dumps everything about
351
- /// the token). This is better than forcing you to override a method in
352
- /// your token objects because you don't have to go modify your lexer
353
- /// so that it creates a new class.
354
- /// </summary>
355
- virtual std::string getTokenErrorDisplay(Token *t);
356
-
357
- virtual std::string getSymbolText(Token *symbol);
358
-
359
- virtual size_t getSymbolType(Token *symbol);
360
-
361
- virtual std::string escapeWSAndQuote(const std::string &s) const;
362
-
363
- /* Compute the error recovery set for the current rule. During
364
- * rule invocation, the parser pushes the set of tokens that can
365
- * follow that rule reference on the stack; this amounts to
366
- * computing FIRST of what follows the rule reference in the
367
- * enclosing rule. See LinearApproximator.FIRST().
368
- * This local follow set only includes tokens
369
- * from within the rule; i.e., the FIRST computation done by
370
- * ANTLR stops at the end of a rule.
371
- *
372
- * EXAMPLE
373
- *
374
- * When you find a "no viable alt exception", the input is not
375
- * consistent with any of the alternatives for rule r. The best
376
- * thing to do is to consume tokens until you see something that
377
- * can legally follow a call to r *or* any rule that called r.
378
- * You don't want the exact set of viable next tokens because the
379
- * input might just be missing a token--you might consume the
380
- * rest of the input looking for one of the missing tokens.
381
- *
382
- * Consider grammar:
383
- *
384
- * a : '[' b ']'
385
- * | '(' b ')'
386
- * ;
387
- * b : c '^' INT ;
388
- * c : ID
389
- * | INT
390
- * ;
391
- *
392
- * At each rule invocation, the set of tokens that could follow
393
- * that rule is pushed on a stack. Here are the various
394
- * context-sensitive follow sets:
395
- *
396
- * FOLLOW(b1_in_a) = FIRST(']') = ']'
397
- * FOLLOW(b2_in_a) = FIRST(')') = ')'
398
- * FOLLOW(c_in_b) = FIRST('^') = '^'
399
- *
400
- * Upon erroneous input "[]", the call chain is
401
- *
402
- * a -> b -> c
403
- *
404
- * and, hence, the follow context stack is:
405
- *
406
- * depth follow set start of rule execution
407
- * 0 <EOF> a (from main())
408
- * 1 ']' b
409
- * 2 '^' c
410
- *
411
- * Notice that ')' is not included, because b would have to have
412
- * been called from a different context in rule a for ')' to be
413
- * included.
414
- *
415
- * For error recovery, we cannot consider FOLLOW(c)
416
- * (context-sensitive or otherwise). We need the combined set of
417
- * all context-sensitive FOLLOW sets--the set of all tokens that
418
- * could follow any reference in the call chain. We need to
419
- * resync to one of those tokens. Note that FOLLOW(c)='^' and if
420
- * we resync'd to that token, we'd consume until EOF. We need to
421
- * sync to context-sensitive FOLLOWs for a, b, and c: {']','^'}.
422
- * In this case, for input "[]", LA(1) is ']' and in the set, so we would
423
- * not consume anything. After printing an error, rule c would
424
- * return normally. Rule b would not find the required '^' though.
425
- * At this point, it gets a mismatched token error and throws an
426
- * exception (since LA(1) is not in the viable following token
427
- * set). The rule exception handler tries to recover, but finds
428
- * the same recovery set and doesn't consume anything. Rule b
429
- * exits normally returning to rule a. Now it finds the ']' (and
430
- * with the successful match exits errorRecovery mode).
431
- *
432
- * So, you can see that the parser walks up the call chain looking
433
- * for the token that was a member of the recovery set.
434
- *
435
- * Errors are not generated in errorRecovery mode.
436
- *
437
- * ANTLR's error recovery mechanism is based upon original ideas:
438
- *
439
- * "Algorithms + Data Structures = Programs" by Niklaus Wirth
440
- *
441
- * and
442
- *
443
- * "A note on error recovery in recursive descent parsers":
444
- * http://portal.acm.org/citation.cfm?id=947902.947905
445
- *
446
- * Later, Josef Grosch had some good ideas:
447
- *
448
- * "Efficient and Comfortable Error Recovery in Recursive Descent
449
- * Parsers":
450
- * ftp://www.cocolab.com/products/cocktail/doca4.ps/ell.ps.zip
451
- *
452
- * Like Grosch I implement context-sensitive FOLLOW sets that are combined
453
- * at run-time upon error to avoid overhead during parsing.
454
- */
455
- virtual misc::IntervalSet getErrorRecoverySet(Parser *recognizer);
456
-
457
- /// <summary>
458
- /// Consume tokens until one matches the given token set. </summary>
459
- virtual void consumeUntil(Parser *recognizer, const misc::IntervalSet &set);
460
-
461
- private:
462
- std::vector<std::unique_ptr<Token>> _errorSymbols; // Temporarily created token.
463
- void InitializeInstanceFields();
464
- };
465
-
466
- } // namespace antlr4
@@ -1,84 +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/PredictionContext.h"
7
- #include "atn/ATNConfig.h"
8
- #include "atn/ATNConfigSet.h"
9
- #include "Parser.h"
10
- #include "misc/Interval.h"
11
- #include "dfa/DFA.h"
12
-
13
- #include "DiagnosticErrorListener.h"
14
-
15
- using namespace antlr4;
16
-
17
- DiagnosticErrorListener::DiagnosticErrorListener() : DiagnosticErrorListener(true) {
18
- }
19
-
20
- DiagnosticErrorListener::DiagnosticErrorListener(bool exactOnly_) : exactOnly(exactOnly_) {
21
- }
22
-
23
- void DiagnosticErrorListener::reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
24
- bool exact, const antlrcpp::BitSet &ambigAlts, atn::ATNConfigSet *configs) {
25
- if (exactOnly && !exact) {
26
- return;
27
- }
28
-
29
- std::string decision = getDecisionDescription(recognizer, dfa);
30
- antlrcpp::BitSet conflictingAlts = getConflictingAlts(ambigAlts, configs);
31
- std::string text = recognizer->getTokenStream()->getText(misc::Interval(startIndex, stopIndex));
32
- std::string message = "reportAmbiguity d=" + decision + ": ambigAlts=" + conflictingAlts.toString() +
33
- ", input='" + text + "'";
34
-
35
- recognizer->notifyErrorListeners(message);
36
- }
37
-
38
- void DiagnosticErrorListener::reportAttemptingFullContext(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex,
39
- size_t stopIndex, const antlrcpp::BitSet &/*conflictingAlts*/, atn::ATNConfigSet * /*configs*/) {
40
- std::string decision = getDecisionDescription(recognizer, dfa);
41
- std::string text = recognizer->getTokenStream()->getText(misc::Interval(startIndex, stopIndex));
42
- std::string message = "reportAttemptingFullContext d=" + decision + ", input='" + text + "'";
43
- recognizer->notifyErrorListeners(message);
44
- }
45
-
46
- void DiagnosticErrorListener::reportContextSensitivity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex,
47
- size_t stopIndex, size_t /*prediction*/, atn::ATNConfigSet * /*configs*/) {
48
- std::string decision = getDecisionDescription(recognizer, dfa);
49
- std::string text = recognizer->getTokenStream()->getText(misc::Interval(startIndex, stopIndex));
50
- std::string message = "reportContextSensitivity d=" + decision + ", input='" + text + "'";
51
- recognizer->notifyErrorListeners(message);
52
- }
53
-
54
- std::string DiagnosticErrorListener::getDecisionDescription(Parser *recognizer, const dfa::DFA &dfa) {
55
- size_t decision = dfa.decision;
56
- size_t ruleIndex = (reinterpret_cast<atn::ATNState*>(dfa.atnStartState))->ruleIndex;
57
-
58
- const std::vector<std::string>& ruleNames = recognizer->getRuleNames();
59
- if (ruleIndex == INVALID_INDEX || ruleIndex >= ruleNames.size()) {
60
- return std::to_string(decision);
61
- }
62
-
63
- std::string ruleName = ruleNames[ruleIndex];
64
- if (ruleName == "" || ruleName.empty()) {
65
- return std::to_string(decision);
66
- }
67
-
68
- return std::to_string(decision) + " (" + ruleName + ")";
69
- }
70
-
71
- antlrcpp::BitSet DiagnosticErrorListener::getConflictingAlts(const antlrcpp::BitSet &reportedAlts,
72
- atn::ATNConfigSet *configs) {
73
- if (reportedAlts.count() > 0) { // Not exactly like the original Java code, but this listener is only used
74
- // in the TestRig (where it never provides a good alt set), so it's probably ok so.
75
- return reportedAlts;
76
- }
77
-
78
- antlrcpp::BitSet result;
79
- for (auto &config : configs->configs) {
80
- result.set(config->alt);
81
- }
82
-
83
- return result;
84
- }
@@ -1,80 +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 "BaseErrorListener.h"
9
-
10
- namespace antlr4 {
11
-
12
- /// <summary>
13
- /// This implementation of <seealso cref="ANTLRErrorListener"/> can be used to identify
14
- /// certain potential correctness and performance problems in grammars. "Reports"
15
- /// are made by calling <seealso cref="Parser#notifyErrorListeners"/> with the appropriate
16
- /// message.
17
- ///
18
- /// <ul>
19
- /// <li><b>Ambiguities</b>: These are cases where more than one path through the
20
- /// grammar can match the input.</li>
21
- /// <li><b>Weak context sensitivity</b>: These are cases where full-context
22
- /// prediction resolved an SLL conflict to a unique alternative which equaled the
23
- /// minimum alternative of the SLL conflict.</li>
24
- /// <li><b>Strong (forced) context sensitivity</b>: These are cases where the
25
- /// full-context prediction resolved an SLL conflict to a unique alternative,
26
- /// <em>and</em> the minimum alternative of the SLL conflict was found to not be
27
- /// a truly viable alternative. Two-stage parsing cannot be used for inputs where
28
- /// this situation occurs.</li>
29
- /// </ul>
30
- ///
31
- /// @author Sam Harwell
32
- /// </summary>
33
- class ANTLR4CPP_PUBLIC DiagnosticErrorListener : public BaseErrorListener {
34
- /// <summary>
35
- /// When {@code true}, only exactly known ambiguities are reported.
36
- /// </summary>
37
- protected:
38
- const bool exactOnly;
39
-
40
- /// <summary>
41
- /// Initializes a new instance of <seealso cref="DiagnosticErrorListener"/> which only
42
- /// reports exact ambiguities.
43
- /// </summary>
44
- public:
45
- DiagnosticErrorListener();
46
-
47
- /// <summary>
48
- /// Initializes a new instance of <seealso cref="DiagnosticErrorListener"/>, specifying
49
- /// whether all ambiguities or only exact ambiguities are reported.
50
- /// </summary>
51
- /// <param name="exactOnly"> {@code true} to report only exact ambiguities, otherwise
52
- /// {@code false} to report all ambiguities. </param>
53
- DiagnosticErrorListener(bool exactOnly);
54
-
55
- virtual void reportAmbiguity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex, bool exact,
56
- const antlrcpp::BitSet &ambigAlts, atn::ATNConfigSet *configs) override;
57
-
58
- virtual void reportAttemptingFullContext(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
59
- const antlrcpp::BitSet &conflictingAlts, atn::ATNConfigSet *configs) override;
60
-
61
- virtual void reportContextSensitivity(Parser *recognizer, const dfa::DFA &dfa, size_t startIndex, size_t stopIndex,
62
- size_t prediction, atn::ATNConfigSet *configs) override;
63
-
64
- protected:
65
- virtual std::string getDecisionDescription(Parser *recognizer, const dfa::DFA &dfa);
66
-
67
- /// <summary>
68
- /// Computes the set of conflicting or ambiguous alternatives from a
69
- /// configuration set, if that information was not already provided by the
70
- /// parser.
71
- /// </summary>
72
- /// <param name="reportedAlts"> The set of conflicting or ambiguous alternatives, as
73
- /// reported by the parser. </param>
74
- /// <param name="configs"> The conflicting or ambiguous configuration set. </param>
75
- /// <returns> Returns {@code reportedAlts} if it is not {@code null}, otherwise
76
- /// returns the set of alternatives represented in {@code configs}. </returns>
77
- virtual antlrcpp::BitSet getConflictingAlts(const antlrcpp::BitSet &reportedAlts, atn::ATNConfigSet *configs);
78
- };
79
-
80
- } // namespace antlr4