pyrematch 1.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (521) hide show
  1. pyrematch-1.0.0/CMakeLists.txt +71 -0
  2. pyrematch-1.0.0/LICENSE +21 -0
  3. pyrematch-1.0.0/PKG-INFO +20 -0
  4. pyrematch-1.0.0/cmake/setup_pybind11.cmake +17 -0
  5. pyrematch-1.0.0/cmake/setup_tracy.cmake +22 -0
  6. pyrematch-1.0.0/pyproject.toml +8 -0
  7. pyrematch-1.0.0/python/pyrematch/README.md +3 -0
  8. pyrematch-1.0.0/python/pyrematch/__init__.py +39 -0
  9. pyrematch-1.0.0/python/pyrematch/pyrematch.py +168 -0
  10. pyrematch-1.0.0/python/pyrematch.egg-info/PKG-INFO +20 -0
  11. pyrematch-1.0.0/python/pyrematch.egg-info/SOURCES.txt +519 -0
  12. pyrematch-1.0.0/python/pyrematch.egg-info/dependency_links.txt +1 -0
  13. pyrematch-1.0.0/python/pyrematch.egg-info/top_level.txt +1 -0
  14. pyrematch-1.0.0/setup.cfg +4 -0
  15. pyrematch-1.0.0/setup.py +49 -0
  16. pyrematch-1.0.0/src/rematch/CMakeLists.txt +24 -0
  17. pyrematch-1.0.0/src/rematch/evaluation/algorithm/algorithm_class.cpp +119 -0
  18. pyrematch-1.0.0/src/rematch/evaluation/algorithm/algorithm_class.hpp +62 -0
  19. pyrematch-1.0.0/src/rematch/evaluation/algorithm/finditer_algorithm.cpp +92 -0
  20. pyrematch-1.0.0/src/rematch/evaluation/algorithm/finditer_algorithm.hpp +26 -0
  21. pyrematch-1.0.0/src/rematch/evaluation/algorithm/findone_algorithm.cpp +59 -0
  22. pyrematch-1.0.0/src/rematch/evaluation/algorithm/findone_algorithm.hpp +26 -0
  23. pyrematch-1.0.0/src/rematch/evaluation/document.cpp +27 -0
  24. pyrematch-1.0.0/src/rematch/evaluation/document.hpp +57 -0
  25. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/aliases.hpp +9 -0
  26. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/capture_subset_pair.hpp +16 -0
  27. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va.cpp +137 -0
  28. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va.hpp +57 -0
  29. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va_state.cpp +62 -0
  30. pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va_state.hpp +51 -0
  31. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va.cpp +521 -0
  32. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va.hpp +68 -0
  33. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_assert.cpp +17 -0
  34. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_assert.hpp +17 -0
  35. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_capture.hpp +21 -0
  36. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_filter.hpp +27 -0
  37. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_read_capture.hpp +22 -0
  38. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_state.cpp +148 -0
  39. pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_state.hpp +51 -0
  40. pyrematch-1.0.0/src/rematch/evaluation/start_end_chars.hpp +11 -0
  41. pyrematch-1.0.0/src/rematch/exceptions/anchor_inside_capture_exception.hpp +15 -0
  42. pyrematch-1.0.0/src/rematch/exceptions/complex_query_exception.hpp +16 -0
  43. pyrematch-1.0.0/src/rematch/exceptions/dfa_state_limit_checker.hpp +29 -0
  44. pyrematch-1.0.0/src/rematch/exceptions/empty_word_capture_exception.hpp +16 -0
  45. pyrematch-1.0.0/src/rematch/exceptions/exceptions.hpp +19 -0
  46. pyrematch-1.0.0/src/rematch/exceptions/invalid_character_exception.hpp +10 -0
  47. pyrematch-1.0.0/src/rematch/exceptions/invalid_escape_exception.hpp +15 -0
  48. pyrematch-1.0.0/src/rematch/exceptions/invalid_range_exception.hpp +14 -0
  49. pyrematch-1.0.0/src/rematch/exceptions/memory_limit_exceeded_exception.hpp +17 -0
  50. pyrematch-1.0.0/src/rematch/exceptions/multi_spanners_not_allowed_exception.hpp +19 -0
  51. pyrematch-1.0.0/src/rematch/exceptions/query_syntax_exception.hpp +27 -0
  52. pyrematch-1.0.0/src/rematch/exceptions/same_nested_variable_exception.hpp +13 -0
  53. pyrematch-1.0.0/src/rematch/exceptions/unhandled_expression_exception.hpp +11 -0
  54. pyrematch-1.0.0/src/rematch/exceptions/variable_limit_exceeded_exception.hpp +16 -0
  55. pyrematch-1.0.0/src/rematch/exceptions/variable_not_found_exception.hpp +17 -0
  56. pyrematch-1.0.0/src/rematch/exceptions/variable_not_found_in_catalog_exception.hpp +15 -0
  57. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa.cpp +100 -0
  58. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa.hpp +70 -0
  59. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa_state.cpp +41 -0
  60. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa_state.hpp +70 -0
  61. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa.cpp +100 -0
  62. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa.hpp +44 -0
  63. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_filter.hpp +36 -0
  64. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_state.cpp +56 -0
  65. pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_state.hpp +73 -0
  66. pyrematch-1.0.0/src/rematch/filtering_module/segment_identificator.cpp +74 -0
  67. pyrematch-1.0.0/src/rematch/filtering_module/segment_identificator.hpp +68 -0
  68. pyrematch-1.0.0/src/rematch/library_interface/flags.hpp +21 -0
  69. pyrematch-1.0.0/src/rematch/library_interface/match.cpp +85 -0
  70. pyrematch-1.0.0/src/rematch/library_interface/match.hpp +52 -0
  71. pyrematch-1.0.0/src/rematch/library_interface/match_iterator.cpp +45 -0
  72. pyrematch-1.0.0/src/rematch/library_interface/match_iterator.hpp +47 -0
  73. pyrematch-1.0.0/src/rematch/library_interface/multi_match.cpp +85 -0
  74. pyrematch-1.0.0/src/rematch/library_interface/multi_match.hpp +36 -0
  75. pyrematch-1.0.0/src/rematch/library_interface/multi_match_iterator.cpp +36 -0
  76. pyrematch-1.0.0/src/rematch/library_interface/multi_match_iterator.hpp +33 -0
  77. pyrematch-1.0.0/src/rematch/library_interface/multi_query.cpp +42 -0
  78. pyrematch-1.0.0/src/rematch/library_interface/multi_query.hpp +26 -0
  79. pyrematch-1.0.0/src/rematch/library_interface/query.cpp +47 -0
  80. pyrematch-1.0.0/src/rematch/library_interface/query.hpp +36 -0
  81. pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data.hpp +24 -0
  82. pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data_utils.cpp +30 -0
  83. pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data_utils.hpp +15 -0
  84. pyrematch-1.0.0/src/rematch/library_interface/rematch.cpp +37 -0
  85. pyrematch-1.0.0/src/rematch/library_interface/rematch.hpp +29 -0
  86. pyrematch-1.0.0/src/rematch/library_interface/statistics.hpp +16 -0
  87. pyrematch-1.0.0/src/rematch/library_interface/stats_collector.hpp +28 -0
  88. pyrematch-1.0.0/src/rematch/mediator/mapping.cpp +51 -0
  89. pyrematch-1.0.0/src/rematch/mediator/mapping.hpp +31 -0
  90. pyrematch-1.0.0/src/rematch/mediator/mediator/count_mediator.hpp +23 -0
  91. pyrematch-1.0.0/src/rematch/mediator/mediator/finditer_mediator.cpp +50 -0
  92. pyrematch-1.0.0/src/rematch/mediator/mediator/finditer_mediator.hpp +23 -0
  93. pyrematch-1.0.0/src/rematch/mediator/mediator/findone_mediator.cpp +34 -0
  94. pyrematch-1.0.0/src/rematch/mediator/mediator/findone_mediator.hpp +23 -0
  95. pyrematch-1.0.0/src/rematch/mediator/mediator/mediator.cpp +36 -0
  96. pyrematch-1.0.0/src/rematch/mediator/mediator/mediator.hpp +44 -0
  97. pyrematch-1.0.0/src/rematch/mediator/mediator/multi_finditer_mediator.cpp +61 -0
  98. pyrematch-1.0.0/src/rematch/mediator/mediator/multi_finditer_mediator.hpp +32 -0
  99. pyrematch-1.0.0/src/rematch/mediator/mediator/multi_findone_mediator.cpp +45 -0
  100. pyrematch-1.0.0/src/rematch/mediator/mediator/multi_findone_mediator.hpp +36 -0
  101. pyrematch-1.0.0/src/rematch/mediator/output_checker.hpp +26 -0
  102. pyrematch-1.0.0/src/rematch/mediator/segment_manager/default_segment_manager.cpp +25 -0
  103. pyrematch-1.0.0/src/rematch/mediator/segment_manager/default_segment_manager.hpp +26 -0
  104. pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_by_line_manager.cpp +47 -0
  105. pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_by_line_manager.hpp +31 -0
  106. pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_identificator.cpp +39 -0
  107. pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_identificator.hpp +25 -0
  108. pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_identificator_manager.cpp +20 -0
  109. pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_identificator_manager.hpp +24 -0
  110. pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_manager.hpp +19 -0
  111. pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_manager_creator.hpp +56 -0
  112. pyrematch-1.0.0/src/rematch/output_enumeration/ecs.cpp +100 -0
  113. pyrematch-1.0.0/src/rematch/output_enumeration/ecs.hpp +86 -0
  114. pyrematch-1.0.0/src/rematch/output_enumeration/ecs_node.cpp +107 -0
  115. pyrematch-1.0.0/src/rematch/output_enumeration/ecs_node.hpp +82 -0
  116. pyrematch-1.0.0/src/rematch/output_enumeration/enumerator.cpp +73 -0
  117. pyrematch-1.0.0/src/rematch/output_enumeration/enumerator.hpp +49 -0
  118. pyrematch-1.0.0/src/rematch/output_enumeration/extended_mapping.cpp +100 -0
  119. pyrematch-1.0.0/src/rematch/output_enumeration/extended_mapping.hpp +40 -0
  120. pyrematch-1.0.0/src/rematch/output_enumeration/mapping.cpp +139 -0
  121. pyrematch-1.0.0/src/rematch/output_enumeration/mapping.hpp +73 -0
  122. pyrematch-1.0.0/src/rematch/output_enumeration/minipool.cpp +20 -0
  123. pyrematch-1.0.0/src/rematch/output_enumeration/minipool.hpp +46 -0
  124. pyrematch-1.0.0/src/rematch/output_enumeration/node_manager.cpp +106 -0
  125. pyrematch-1.0.0/src/rematch/output_enumeration/node_manager.hpp +69 -0
  126. pyrematch-1.0.0/src/rematch/output_enumeration/span.cpp +6 -0
  127. pyrematch-1.0.0/src/rematch/output_enumeration/span.hpp +11 -0
  128. pyrematch-1.0.0/src/rematch/parsing/charclass.cpp +160 -0
  129. pyrematch-1.0.0/src/rematch/parsing/charclass.hpp +98 -0
  130. pyrematch-1.0.0/src/rematch/parsing/error_listener.hpp +39 -0
  131. pyrematch-1.0.0/src/rematch/parsing/grammar/REmatchLexer.g4 +39 -0
  132. pyrematch-1.0.0/src/rematch/parsing/grammar/REmatchParser.g4 +103 -0
  133. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.cpp +192 -0
  134. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.h +54 -0
  135. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.interp +110 -0
  136. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.tokens +59 -0
  137. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.cpp +2574 -0
  138. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.h +615 -0
  139. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.interp +106 -0
  140. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.tokens +59 -0
  141. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserBaseVisitor.cpp +7 -0
  142. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserBaseVisitor.h +152 -0
  143. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserVisitor.cpp +7 -0
  144. pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserVisitor.h +90 -0
  145. pyrematch-1.0.0/src/rematch/parsing/grammar/generate.sh +3 -0
  146. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va.cpp +820 -0
  147. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va.hpp +127 -0
  148. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_anchor.hpp +35 -0
  149. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_capture.cpp +27 -0
  150. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_capture.hpp +25 -0
  151. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_epsilon.hpp +20 -0
  152. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_filter.hpp +31 -0
  153. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_state.cpp +88 -0
  154. pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_state.hpp +84 -0
  155. pyrematch-1.0.0/src/rematch/parsing/parser.cpp +59 -0
  156. pyrematch-1.0.0/src/rematch/parsing/parser.hpp +35 -0
  157. pyrematch-1.0.0/src/rematch/parsing/variable_catalog.cpp +151 -0
  158. pyrematch-1.0.0/src/rematch/parsing/variable_catalog.hpp +84 -0
  159. pyrematch-1.0.0/src/rematch/parsing/visitors/char_class_visitor.hpp +803 -0
  160. pyrematch-1.0.0/src/rematch/parsing/visitors/variable_catalog_visitor.hpp +133 -0
  161. pyrematch-1.0.0/src/rematch/parsing/visitors/visitor_headers.hpp +7 -0
  162. pyrematch-1.0.0/src/targets/CMakeLists.txt +39 -0
  163. pyrematch-1.0.0/src/targets/main/emscripten_binding.cpp +69 -0
  164. pyrematch-1.0.0/src/targets/main/python_binding.cpp +86 -0
  165. pyrematch-1.0.0/src/targets/main/rematch.cpp +27 -0
  166. pyrematch-1.0.0/tests/CMakeLists.txt +62 -0
  167. pyrematch-1.0.0/tests/evaluation/algorithm_utf8.cpp +79 -0
  168. pyrematch-1.0.0/tests/evaluation/dummy_mapping.hpp +35 -0
  169. pyrematch-1.0.0/tests/evaluation/extended_det_va.cpp +163 -0
  170. pyrematch-1.0.0/tests/evaluation/extended_va.cpp +351 -0
  171. pyrematch-1.0.0/tests/evaluation/finditer_algorithm.cpp +283 -0
  172. pyrematch-1.0.0/tests/evaluation/findone_algorithm.cpp +43 -0
  173. pyrematch-1.0.0/tests/evaluation/mapping_helpers.hpp +18 -0
  174. pyrematch-1.0.0/tests/exceptions/anchor_inside_capture_exception.cpp +25 -0
  175. pyrematch-1.0.0/tests/exceptions/complex_query_exception.cpp +59 -0
  176. pyrematch-1.0.0/tests/exceptions/empty_word_capture_exception.cpp +18 -0
  177. pyrematch-1.0.0/tests/exceptions/invalid_escape_exception.cpp +14 -0
  178. pyrematch-1.0.0/tests/exceptions/invalid_range_exception.cpp +14 -0
  179. pyrematch-1.0.0/tests/exceptions/memory_limit_exceeded_exception.cpp +23 -0
  180. pyrematch-1.0.0/tests/exceptions/multi_spanners_not_allowed_exception.cpp +24 -0
  181. pyrematch-1.0.0/tests/exceptions/query_syntax_exception.cpp +27 -0
  182. pyrematch-1.0.0/tests/exceptions/same_nested_variable_exception.cpp +14 -0
  183. pyrematch-1.0.0/tests/exceptions/variable_not_found_exception.cpp +43 -0
  184. pyrematch-1.0.0/tests/exceptions/variable_not_found_in_catalog_exception.cpp +20 -0
  185. pyrematch-1.0.0/tests/filtering_module/search_dfa.cpp +49 -0
  186. pyrematch-1.0.0/tests/filtering_module/search_nfa.cpp +47 -0
  187. pyrematch-1.0.0/tests/filtering_module/segment_identification.cpp +139 -0
  188. pyrematch-1.0.0/tests/library_interface/flags.cpp +38 -0
  189. pyrematch-1.0.0/tests/library_interface/match.cpp +120 -0
  190. pyrematch-1.0.0/tests/library_interface/match_iterator.cpp +83 -0
  191. pyrematch-1.0.0/tests/library_interface/multi_match.cpp +92 -0
  192. pyrematch-1.0.0/tests/library_interface/multi_match_iterator.cpp +39 -0
  193. pyrematch-1.0.0/tests/library_interface/multi_query.cpp +179 -0
  194. pyrematch-1.0.0/tests/library_interface/query.cpp +54 -0
  195. pyrematch-1.0.0/tests/library_interface/rematch_compile.cpp +386 -0
  196. pyrematch-1.0.0/tests/library_interface/rematch_functions.cpp +97 -0
  197. pyrematch-1.0.0/tests/mediator/finditer_mediator.cpp +214 -0
  198. pyrematch-1.0.0/tests/mediator/findone_mediator.cpp +44 -0
  199. pyrematch-1.0.0/tests/mediator/multi_finditer_mediator.cpp +169 -0
  200. pyrematch-1.0.0/tests/mediator/multi_findone_mediator.cpp +56 -0
  201. pyrematch-1.0.0/tests/mediator/segment_manager_creator.cpp +55 -0
  202. pyrematch-1.0.0/tests/output_enumeration/ecs.cpp +159 -0
  203. pyrematch-1.0.0/tests/output_enumeration/ecs_node.cpp +74 -0
  204. pyrematch-1.0.0/tests/output_enumeration/enumerator.cpp +254 -0
  205. pyrematch-1.0.0/tests/output_enumeration/extended_mapping.cpp +87 -0
  206. pyrematch-1.0.0/tests/output_enumeration/garbage_collector.cpp +105 -0
  207. pyrematch-1.0.0/tests/output_enumeration/mapping.cpp +64 -0
  208. pyrematch-1.0.0/tests/parsing/logical_va.cpp +217 -0
  209. pyrematch-1.0.0/tests/parsing/parser.cpp +252 -0
  210. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/CMakeLists.txt +12 -0
  211. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/VERSION +1 -0
  212. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorListener.cpp +10 -0
  213. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorListener.h +167 -0
  214. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorStrategy.cpp +10 -0
  215. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorStrategy.h +121 -0
  216. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRFileStream.cpp +23 -0
  217. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRFileStream.h +30 -0
  218. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRInputStream.cpp +180 -0
  219. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRInputStream.h +79 -0
  220. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BailErrorStrategy.cpp +61 -0
  221. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BailErrorStrategy.h +59 -0
  222. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BaseErrorListener.cpp +25 -0
  223. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BaseErrorListener.h +36 -0
  224. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BufferedTokenStream.cpp +414 -0
  225. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BufferedTokenStream.h +200 -0
  226. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CharStream.cpp +11 -0
  227. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CharStream.h +37 -0
  228. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonToken.cpp +193 -0
  229. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonToken.h +158 -0
  230. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenFactory.cpp +39 -0
  231. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenFactory.h +74 -0
  232. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenStream.cpp +78 -0
  233. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenStream.h +79 -0
  234. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ConsoleErrorListener.cpp +15 -0
  235. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ConsoleErrorListener.h +35 -0
  236. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DefaultErrorStrategy.cpp +336 -0
  237. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DefaultErrorStrategy.h +466 -0
  238. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DiagnosticErrorListener.cpp +84 -0
  239. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DiagnosticErrorListener.h +80 -0
  240. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Exceptions.cpp +64 -0
  241. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Exceptions.h +99 -0
  242. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FailedPredicateException.cpp +52 -0
  243. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FailedPredicateException.h +32 -0
  244. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FlatHashMap.h +57 -0
  245. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FlatHashSet.h +57 -0
  246. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InputMismatchException.cpp +18 -0
  247. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InputMismatchException.h +24 -0
  248. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/IntStream.cpp +12 -0
  249. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/IntStream.h +218 -0
  250. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InterpreterRuleContext.cpp +19 -0
  251. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InterpreterRuleContext.h +45 -0
  252. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Lexer.cpp +294 -0
  253. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Lexer.h +196 -0
  254. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerInterpreter.cpp +60 -0
  255. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerInterpreter.h +46 -0
  256. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerNoViableAltException.cpp +36 -0
  257. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerNoViableAltException.h +31 -0
  258. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ListTokenSource.cpp +92 -0
  259. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ListTokenSource.h +88 -0
  260. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/NoViableAltException.cpp +46 -0
  261. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/NoViableAltException.h +42 -0
  262. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Parser.cpp +670 -0
  263. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Parser.h +461 -0
  264. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserInterpreter.cpp +294 -0
  265. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserInterpreter.h +173 -0
  266. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserRuleContext.cpp +138 -0
  267. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserRuleContext.h +147 -0
  268. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ProxyErrorListener.cpp +53 -0
  269. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ProxyErrorListener.h +38 -0
  270. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RecognitionException.cpp +65 -0
  271. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RecognitionException.h +98 -0
  272. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Recognizer.cpp +157 -0
  273. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Recognizer.h +160 -0
  274. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContext.cpp +144 -0
  275. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContext.h +141 -0
  276. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContextWithAltNum.cpp +27 -0
  277. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContextWithAltNum.h +32 -0
  278. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuntimeMetaData.cpp +54 -0
  279. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuntimeMetaData.h +155 -0
  280. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Token.cpp +9 -0
  281. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Token.h +92 -0
  282. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenFactory.h +30 -0
  283. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenSource.cpp +9 -0
  284. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenSource.h +85 -0
  285. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStream.cpp +11 -0
  286. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStream.h +137 -0
  287. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStreamRewriter.cpp +425 -0
  288. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStreamRewriter.h +295 -0
  289. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedCharStream.cpp +208 -0
  290. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedCharStream.h +117 -0
  291. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedTokenStream.cpp +270 -0
  292. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedTokenStream.h +115 -0
  293. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Version.h +42 -0
  294. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Vocabulary.cpp +64 -0
  295. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Vocabulary.h +177 -0
  296. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/WritableToken.cpp +9 -0
  297. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/WritableToken.h +23 -0
  298. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/antlr4-common.h +101 -0
  299. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/antlr4-runtime.h +168 -0
  300. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATN.cpp +159 -0
  301. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATN.h +133 -0
  302. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfig.cpp +106 -0
  303. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfig.h +157 -0
  304. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfigSet.cpp +233 -0
  305. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfigSet.h +157 -0
  306. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializationOptions.cpp +39 -0
  307. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializationOptions.h +48 -0
  308. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializer.cpp +628 -0
  309. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializer.h +32 -0
  310. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNSimulator.cpp +33 -0
  311. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNSimulator.h +71 -0
  312. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNState.cpp +56 -0
  313. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNState.h +139 -0
  314. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNStateType.cpp +33 -0
  315. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNStateType.h +36 -0
  316. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNType.h +20 -0
  317. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ActionTransition.cpp +29 -0
  318. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ActionTransition.h +35 -0
  319. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AmbiguityInfo.cpp +16 -0
  320. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AmbiguityInfo.h +68 -0
  321. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ArrayPredictionContext.cpp +129 -0
  322. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ArrayPredictionContext.h +51 -0
  323. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AtomTransition.cpp +27 -0
  324. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AtomTransition.h +33 -0
  325. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BasicBlockStartState.h +24 -0
  326. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BasicState.h +23 -0
  327. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BlockEndState.h +26 -0
  328. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BlockStartState.h +30 -0
  329. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
  330. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ContextSensitivityInfo.h +47 -0
  331. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionEventInfo.cpp +14 -0
  332. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionEventInfo.h +70 -0
  333. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionInfo.cpp +25 -0
  334. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionInfo.h +227 -0
  335. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionState.cpp +12 -0
  336. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionState.h +34 -0
  337. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/EpsilonTransition.cpp +31 -0
  338. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/EpsilonTransition.h +42 -0
  339. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ErrorInfo.cpp +15 -0
  340. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ErrorInfo.h +43 -0
  341. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/HashUtils.h +18 -0
  342. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LL1Analyzer.cpp +189 -0
  343. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LL1Analyzer.h +76 -0
  344. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNConfig.cpp +67 -0
  345. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNConfig.h +44 -0
  346. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNSimulator.cpp +621 -0
  347. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNSimulator.h +199 -0
  348. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerAction.cpp +15 -0
  349. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerAction.h +100 -0
  350. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionExecutor.cpp +108 -0
  351. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionExecutor.h +128 -0
  352. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionType.h +57 -0
  353. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerChannelAction.cpp +43 -0
  354. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerChannelAction.h +59 -0
  355. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerCustomAction.cpp +45 -0
  356. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerCustomAction.h +75 -0
  357. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerIndexedCustomAction.cpp +50 -0
  358. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerIndexedCustomAction.h +76 -0
  359. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerModeAction.cpp +43 -0
  360. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerModeAction.h +57 -0
  361. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerMoreAction.cpp +36 -0
  362. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerMoreAction.h +53 -0
  363. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPopModeAction.cpp +36 -0
  364. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPopModeAction.h +53 -0
  365. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPushModeAction.cpp +43 -0
  366. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPushModeAction.h +57 -0
  367. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerSkipAction.cpp +36 -0
  368. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerSkipAction.h +51 -0
  369. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerTypeAction.cpp +43 -0
  370. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerTypeAction.h +51 -0
  371. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LookaheadEventInfo.cpp +16 -0
  372. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LookaheadEventInfo.h +42 -0
  373. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LoopEndState.h +26 -0
  374. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/NotSetTransition.cpp +22 -0
  375. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/NotSetTransition.h +27 -0
  376. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
  377. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/OrderedATNConfigSet.h +25 -0
  378. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParseInfo.cpp +102 -0
  379. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParseInfo.h +102 -0
  380. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulator.cpp +1413 -0
  381. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulator.h +911 -0
  382. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
  383. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PlusBlockStartState.h +29 -0
  384. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PlusLoopbackState.h +25 -0
  385. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
  386. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PrecedencePredicateTransition.h +35 -0
  387. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateEvalInfo.cpp +17 -0
  388. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateEvalInfo.h +62 -0
  389. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateTransition.cpp +24 -0
  390. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateTransition.h +50 -0
  391. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContext.cpp +601 -0
  392. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContext.h +225 -0
  393. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextCache.cpp +56 -0
  394. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextCache.h +63 -0
  395. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
  396. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCache.h +101 -0
  397. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
  398. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextType.h +21 -0
  399. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionMode.cpp +202 -0
  400. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionMode.h +436 -0
  401. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
  402. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ProfilingATNSimulator.h +60 -0
  403. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RangeTransition.cpp +26 -0
  404. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RangeTransition.h +31 -0
  405. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleStartState.h +26 -0
  406. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleStopState.h +27 -0
  407. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleTransition.cpp +33 -0
  408. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleTransition.h +42 -0
  409. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContext.cpp +418 -0
  410. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContext.h +237 -0
  411. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContextType.h +23 -0
  412. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SerializedATNView.h +101 -0
  413. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SetTransition.cpp +28 -0
  414. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SetTransition.h +38 -0
  415. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SingletonPredictionContext.cpp +79 -0
  416. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SingletonPredictionContext.h +43 -0
  417. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarBlockStartState.h +24 -0
  418. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopEntryState.h +37 -0
  419. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopbackState.cpp +19 -0
  420. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopbackState.h +25 -0
  421. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TokensStartState.h +24 -0
  422. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/Transition.cpp +36 -0
  423. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/Transition.h +65 -0
  424. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TransitionType.cpp +27 -0
  425. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TransitionType.h +33 -0
  426. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/WildcardTransition.cpp +21 -0
  427. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/WildcardTransition.h +27 -0
  428. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFA.cpp +115 -0
  429. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFA.h +96 -0
  430. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFASerializer.cpp +60 -0
  431. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFASerializer.h +32 -0
  432. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFAState.cpp +59 -0
  433. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFAState.h +154 -0
  434. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/LexerDFASerializer.cpp +17 -0
  435. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/LexerDFASerializer.h +22 -0
  436. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/internal/Synchronization.cpp +100 -0
  437. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/internal/Synchronization.h +154 -0
  438. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/InterpreterDataReader.cpp +124 -0
  439. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/InterpreterDataReader.h +33 -0
  440. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Interval.cpp +61 -0
  441. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Interval.h +84 -0
  442. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/IntervalSet.cpp +508 -0
  443. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/IntervalSet.h +190 -0
  444. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/MurmurHash.cpp +120 -0
  445. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/MurmurHash.h +102 -0
  446. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Predicate.cpp +4 -0
  447. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Predicate.h +21 -0
  448. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Any.cpp +8 -0
  449. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Any.h +16 -0
  450. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Arrays.cpp +43 -0
  451. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Arrays.h +149 -0
  452. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/BitSet.h +76 -0
  453. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/CPPUtils.cpp +207 -0
  454. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/CPPUtils.h +65 -0
  455. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Casts.h +34 -0
  456. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Declarations.h +161 -0
  457. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/StringUtils.cpp +38 -0
  458. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/StringUtils.h +16 -0
  459. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Unicode.h +28 -0
  460. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Utf8.cpp +242 -0
  461. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Utf8.h +54 -0
  462. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
  463. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNode.h +24 -0
  464. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNodeImpl.cpp +54 -0
  465. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNodeImpl.h +43 -0
  466. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
  467. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/IterativeParseTreeWalker.h +53 -0
  468. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTree.cpp +12 -0
  469. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTree.h +111 -0
  470. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeListener.cpp +9 -0
  471. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeListener.h +39 -0
  472. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeProperty.h +50 -0
  473. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeType.h +22 -0
  474. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeVisitor.cpp +9 -0
  475. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeVisitor.h +57 -0
  476. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeWalker.cpp +48 -0
  477. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeWalker.h +55 -0
  478. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNode.h +40 -0
  479. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNodeImpl.cpp +54 -0
  480. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNodeImpl.h +32 -0
  481. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/Trees.cpp +241 -0
  482. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/Trees.h +78 -0
  483. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/Chunk.cpp +9 -0
  484. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/Chunk.h +44 -0
  485. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
  486. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
  487. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
  488. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePattern.h +105 -0
  489. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
  490. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
  491. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
  492. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/RuleTagToken.h +117 -0
  493. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TagChunk.cpp +39 -0
  494. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TagChunk.h +86 -0
  495. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TextChunk.cpp +28 -0
  496. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TextChunk.h +51 -0
  497. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
  498. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TokenTagToken.h +80 -0
  499. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPath.cpp +154 -0
  500. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPath.h +86 -0
  501. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathElement.cpp +31 -0
  502. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathElement.h +40 -0
  503. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.cpp +180 -0
  504. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.g4 +64 -0
  505. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.h +53 -0
  506. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.interp +41 -0
  507. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.tokens +12 -0
  508. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
  509. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
  510. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
  511. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
  512. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
  513. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleElement.h +26 -0
  514. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
  515. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
  516. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
  517. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenElement.h +26 -0
  518. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
  519. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
  520. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
  521. pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardElement.h +23 -0
@@ -0,0 +1,71 @@
1
+ cmake_minimum_required(VERSION 3.23.2)
2
+ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
3
+ project(rematch LANGUAGES CXX)
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED True)
6
+ set(project_LIB ${PROJECT_NAME}lib)
7
+ # Use all cores but one for compilation
8
+ include(ProcessorCount)
9
+ ProcessorCount(NUM_CORES)
10
+ if(NUM_CORES GREATER 1)
11
+ math(EXPR PARALLEL_LEVEL "${NUM_CORES} - 1")
12
+ set(CMAKE_BUILD_PARALLEL_LEVEL ${PARALLEL_LEVEL})
13
+ endif()
14
+
15
+ # Enable testing
16
+ set(REMATCH_BUILD_TESTING OFF)
17
+ # Enable profiling
18
+ set(ENABLE_PROFILING OFF CACHE BOOL "Enable Profiling" FORCE)
19
+
20
+
21
+ if(NOT CMAKE_BUILD_TYPE)
22
+ set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type" FORCE)
23
+ message(STATUS "Build type not specified. Using Release by default.")
24
+ else()
25
+ message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
26
+ endif()
27
+
28
+ if(SKBUILD)
29
+ # Enables PIC for all targets
30
+ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
31
+ endif()
32
+
33
+ if (MSVC)
34
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
35
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /Od /Zi")
36
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /O2")
37
+ else()
38
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
39
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -g3")
40
+ set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3 -g0 -pedantic")
41
+ endif()
42
+
43
+ set(EXECUTABLE_OUTPUT_PATH "${PROJECT_BINARY_DIR}/bin")
44
+ set(LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")
45
+
46
+
47
+ include_directories(src/rematch)
48
+ add_subdirectory(src/rematch)
49
+
50
+
51
+ # Tracy
52
+ include(cmake/setup_tracy.cmake)
53
+ # ANTLR
54
+ add_subdirectory("${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime")
55
+ include_directories("${CMAKE_SOURCE_DIR}/third_party/antlr4-cpp-runtime/src")
56
+
57
+
58
+ include_directories(src/targets)
59
+ add_subdirectory(src/targets)
60
+
61
+ if(REMATCH_BUILD_TESTING)
62
+ if(ENABLE_PROFILING)
63
+ message(STATUS "Skipped testing build due to profiling.")
64
+ elseif(SKBUILD)
65
+ message(STATUS "Skipped testing build due to SKBUILD.")
66
+ elseif(EMSCRIPTEN)
67
+ message(STATUS "Skipped testing build due to EMSCRIPTEN.")
68
+ else()
69
+ add_subdirectory(tests)
70
+ endif()
71
+ endif()
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 REmatchChile
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyrematch
3
+ Version: 1.0.0
4
+ Summary: Python bindings for REmatch, an information extraction focused regex library that uses constant delay algoirthms
5
+ Home-page: https://rematch.cl/
6
+ Author: Vicente Calisto, Oscar Cárcamo, Nicolás Van Sint Jan, Gustavo Toro
7
+ Author-email: vecalisto@uc.cl, oscar.carcamoz@uc.cl, nicovsj@uc.cl, gustavo.toro@uc.cl
8
+ License: MIT
9
+ Keywords: regex,rematch,regular,information extraction,text search,pattern matching
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+
18
+ # PyREmatch
19
+
20
+ Python bindings for REmatch, an information extraction focused regex library that uses constant delay algoirthms
@@ -0,0 +1,17 @@
1
+ include(FetchContent)
2
+
3
+ message("Fetching pybind11")
4
+
5
+ set(FETCHCONTENT_QUIET FALSE)
6
+
7
+ FetchContent_Declare(
8
+ pybind11
9
+ URL https://github.com/pybind/pybind11/archive/refs/tags/v2.11.1.tar.gz
10
+ )
11
+
12
+ FetchContent_GetProperties(pybind11)
13
+
14
+ if(NOT pybind11_POPULATED)
15
+ FetchContent_Populate(pybind11)
16
+ add_subdirectory(${pybind11_SOURCE_DIR} ${pybind11_BINARY_DIR})
17
+ endif()
@@ -0,0 +1,22 @@
1
+ include(FetchContent)
2
+
3
+ message("Fetching Tracy")
4
+
5
+ Set(FETCHCONTENT_QUIET FALSE)
6
+
7
+ FetchContent_Declare (
8
+ tracy
9
+ GIT_REPOSITORY https://github.com/wolfpld/tracy.git
10
+ GIT_TAG master
11
+ GIT_SHALLOW TRUE
12
+ )
13
+
14
+ if (ENABLE_PROFILING)
15
+ set(TRACY_ENABLE ON CACHE BOOL "Enable Tracy" FORCE)
16
+ set(TRACY_NO_EXIT ON CACHE BOOL "No Exit Tracy" FORCE)
17
+ set(TRACY_DEBUGINFOD ON CACHE BOOL "Use DEBUGINFOD Tracy" FORCE)
18
+ else()
19
+ set(TRACY_ENABLE OFF CACHE BOOL "Disable Tracy" FORCE)
20
+ endif()
21
+
22
+ FetchContent_MakeAvailable(tracy)
@@ -0,0 +1,8 @@
1
+ [build-system]
2
+ requires = [
3
+ "setuptools",
4
+ "scikit-build",
5
+ "wheel",
6
+ "cmake>=3.23.2",
7
+ ]
8
+ build-backend = "setuptools.build_meta"
@@ -0,0 +1,3 @@
1
+ # PyREmatch
2
+
3
+ Python bindings for REmatch, an information extraction focused regex library that uses constant delay algoirthms
@@ -0,0 +1,39 @@
1
+ from .pyrematch import Flags, reql
2
+
3
+ __version__ = "1.0.0"
4
+
5
+ from ._pyrematch import (
6
+ AnchorInsideCaptureException,
7
+ ComplexQueryException,
8
+ EmptyWordCaptureException,
9
+ InvalidCharacterException,
10
+ InvalidEscapeException,
11
+ InvalidRangeException,
12
+ MemoryLimitExceededException,
13
+ QuerySyntaxException,
14
+ SameNestedVariableException,
15
+ UnhandledExpressionException,
16
+ VariableLimitExceededException,
17
+ VariableNotFoundException,
18
+ VariableNotFoundInCatalogException,
19
+ MultiSpannersNotAllowedException,
20
+ )
21
+
22
+ __all__ = [
23
+ "reql",
24
+ "Flags",
25
+ "QuerySyntaxException",
26
+ "AnchorInsideCaptureException",
27
+ "ComplexQueryException",
28
+ "EmptyWordCaptureException",
29
+ "InvalidCharacterException",
30
+ "InvalidEscapeException",
31
+ "InvalidRangeException",
32
+ "MemoryLimitExceededException",
33
+ "SameNestedVariableException",
34
+ "UnhandledExpressionException",
35
+ "VariableLimitExceededException",
36
+ "VariableNotFoundException",
37
+ "VariableNotFoundInCatalogException",
38
+ "MultiSpannersNotAllowedException",
39
+ ]
@@ -0,0 +1,168 @@
1
+ import enum
2
+ from typing import List, Tuple, Union
3
+
4
+ from ._pyrematch import (
5
+ PyFlags,
6
+ PyMatch,
7
+ PyMatchIterator,
8
+ PyMultiQuery,
9
+ PyMultiMatch,
10
+ PyMultiMatchIterator,
11
+ PyQuery,
12
+ )
13
+
14
+
15
+ class Flags(enum.Flag):
16
+ NOFLAG = enum.auto()
17
+ LINE_BY_LINE = enum.auto()
18
+ MULTI_MATCH = enum.auto()
19
+
20
+ def _get_pyflags(self) -> "PyFlags":
21
+ pyflags = PyFlags()
22
+ pyflags.line_by_line = Flags.LINE_BY_LINE in self
23
+
24
+ return pyflags
25
+
26
+
27
+ def reql(
28
+ pattern: str,
29
+ flags: Flags = Flags.NOFLAG,
30
+ max_mempool_duplications=8,
31
+ max_deterministic_states=1000,
32
+ ):
33
+ if Flags.MULTI_MATCH in flags:
34
+ return MultiQuery(
35
+ pattern, flags, max_mempool_duplications, max_deterministic_states
36
+ )
37
+ return Query(pattern, flags, max_mempool_duplications, max_deterministic_states)
38
+
39
+
40
+ class Match:
41
+ def __init__(self, pymatch: "PyMatch"):
42
+ self._pymatch = pymatch
43
+
44
+ def start(self, variable: Union[str, int]) -> int:
45
+ return self._pymatch.start(variable)
46
+
47
+ def end(self, variable: Union[str, int]) -> int:
48
+ return self._pymatch.end(variable)
49
+
50
+ def span(self, variable: Union[str, int]) -> Tuple[int, int]:
51
+ return self._pymatch.span(variable)
52
+
53
+ def group(self, variable: Union[str, int]) -> str:
54
+ return self._pymatch.group(variable)
55
+
56
+ def empty(self) -> bool:
57
+ return self._pymatch.empty()
58
+
59
+ def variables(self) -> List[str]:
60
+ return self._pymatch.variables()
61
+
62
+ def __repr__(self) -> str:
63
+ variable_repr = [
64
+ f"{variable} -> [{self.start(variable)}, {self.end(variable)}>"
65
+ for variable in self.variables()
66
+ ]
67
+
68
+ if variable_repr:
69
+ return "\n".join(variable_repr)
70
+
71
+ return "Empty match"
72
+
73
+
74
+ class MatchIterator:
75
+ def __init__(self, document: str, pyquery: "PyQuery"):
76
+ self._match_iterator: "PyMatchIterator" = pyquery.finditer(document)
77
+
78
+ def __iter__(self) -> "MatchIterator":
79
+ return self
80
+
81
+ def __next__(self) -> Match:
82
+ pymatch = self._match_iterator.next()
83
+ if pymatch:
84
+ return Match(pymatch)
85
+ raise StopIteration
86
+
87
+ def variables(self) -> List[str]:
88
+ return self._match_iterator.variables()
89
+
90
+
91
+ class Query:
92
+ def __init__(
93
+ self,
94
+ pattern: str,
95
+ flags: Flags = Flags.NOFLAG,
96
+ max_mempool_duplications=8,
97
+ max_deterministic_states=1000,
98
+ ):
99
+ pyflags = flags._get_pyflags()
100
+ pyflags.max_mempool_duplications = max_mempool_duplications
101
+ pyflags.max_deterministic_states = max_deterministic_states
102
+ self._pyquery: "PyQuery" = PyQuery(pattern, pyflags)
103
+
104
+ def finditer(self, document: str) -> MatchIterator:
105
+ return MatchIterator(document, self._pyquery)
106
+
107
+ def findone(self, document: str) -> "Match":
108
+ return Match(self._pyquery.findone(document))
109
+
110
+ def check(self, document: str) -> bool:
111
+ return self._pyquery.check(document)
112
+
113
+
114
+ class MultiMatch:
115
+ def __init__(self, pymatch: "PyMultiMatch"):
116
+ self._pymatch = pymatch
117
+
118
+ def spans(self, variable: Union[str, int]) -> List[Tuple[int, int]]:
119
+ return self._pymatch.spans(variable)
120
+
121
+ def groups(self, variable: Union[str, int]) -> List[str]:
122
+ return self._pymatch.groups(variable)
123
+
124
+ def submatch(self, span: Tuple[int, int]) -> "MultiMatch":
125
+ return MultiMatch(self._pymatch.submatch(span))
126
+
127
+ def empty(self) -> bool:
128
+ return self._pymatch.empty()
129
+
130
+
131
+ class MultiMatchIterator:
132
+ def __init__(self, document: str, pyquery: "PyMultiQuery"):
133
+ self._match_iterator: "PyMultiMatchIterator" = pyquery.finditer(document)
134
+
135
+ def __iter__(self) -> "MultiMatchIterator":
136
+ return self
137
+
138
+ def __next__(self) -> MultiMatch:
139
+ pymatch = self._match_iterator.next()
140
+ if pymatch:
141
+ return MultiMatch(pymatch)
142
+ raise StopIteration
143
+
144
+ def variables(self) -> List[str]:
145
+ return self._match_iterator.variables()
146
+
147
+
148
+ class MultiQuery:
149
+ def __init__(
150
+ self,
151
+ pattern: str,
152
+ flags: Flags = Flags.NOFLAG,
153
+ max_mempool_duplications=8,
154
+ max_deterministic_states=1000,
155
+ ):
156
+ pyflags = flags._get_pyflags()
157
+ pyflags.max_mempool_duplications = max_mempool_duplications
158
+ pyflags.max_deterministic_states = max_deterministic_states
159
+ self._pyquery: "PyMultiQuery" = PyMultiQuery(pattern, pyflags)
160
+
161
+ def finditer(self, document: str) -> MultiMatchIterator:
162
+ return MultiMatchIterator(document, self._pyquery)
163
+
164
+ def findone(self, document: str) -> "MultiMatch":
165
+ return MultiMatch(self._pyquery.findone(document))
166
+
167
+ def check(self, document: str) -> bool:
168
+ return self._pyquery.check(document)
@@ -0,0 +1,20 @@
1
+ Metadata-Version: 2.1
2
+ Name: pyrematch
3
+ Version: 1.0.0
4
+ Summary: Python bindings for REmatch, an information extraction focused regex library that uses constant delay algoirthms
5
+ Home-page: https://rematch.cl/
6
+ Author: Vicente Calisto, Oscar Cárcamo, Nicolás Van Sint Jan, Gustavo Toro
7
+ Author-email: vecalisto@uc.cl, oscar.carcamoz@uc.cl, nicovsj@uc.cl, gustavo.toro@uc.cl
8
+ License: MIT
9
+ Keywords: regex,rematch,regular,information extraction,text search,pattern matching
10
+ Classifier: Development Status :: 3 - Alpha
11
+ Classifier: Intended Audience :: Science/Research
12
+ Classifier: License :: OSI Approved :: MIT License
13
+ Classifier: Programming Language :: Python :: 3
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+
18
+ # PyREmatch
19
+
20
+ Python bindings for REmatch, an information extraction focused regex library that uses constant delay algoirthms