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.
- pyrematch-1.0.0/CMakeLists.txt +71 -0
- pyrematch-1.0.0/LICENSE +21 -0
- pyrematch-1.0.0/PKG-INFO +20 -0
- pyrematch-1.0.0/cmake/setup_pybind11.cmake +17 -0
- pyrematch-1.0.0/cmake/setup_tracy.cmake +22 -0
- pyrematch-1.0.0/pyproject.toml +8 -0
- pyrematch-1.0.0/python/pyrematch/README.md +3 -0
- pyrematch-1.0.0/python/pyrematch/__init__.py +39 -0
- pyrematch-1.0.0/python/pyrematch/pyrematch.py +168 -0
- pyrematch-1.0.0/python/pyrematch.egg-info/PKG-INFO +20 -0
- pyrematch-1.0.0/python/pyrematch.egg-info/SOURCES.txt +519 -0
- pyrematch-1.0.0/python/pyrematch.egg-info/dependency_links.txt +1 -0
- pyrematch-1.0.0/python/pyrematch.egg-info/top_level.txt +1 -0
- pyrematch-1.0.0/setup.cfg +4 -0
- pyrematch-1.0.0/setup.py +49 -0
- pyrematch-1.0.0/src/rematch/CMakeLists.txt +24 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/algorithm_class.cpp +119 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/algorithm_class.hpp +62 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/finditer_algorithm.cpp +92 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/finditer_algorithm.hpp +26 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/findone_algorithm.cpp +59 -0
- pyrematch-1.0.0/src/rematch/evaluation/algorithm/findone_algorithm.hpp +26 -0
- pyrematch-1.0.0/src/rematch/evaluation/document.cpp +27 -0
- pyrematch-1.0.0/src/rematch/evaluation/document.hpp +57 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/aliases.hpp +9 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/capture_subset_pair.hpp +16 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va.cpp +137 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va.hpp +57 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va_state.cpp +62 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/dfa/extended_det_va_state.hpp +51 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va.cpp +521 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va.hpp +68 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_assert.cpp +17 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_assert.hpp +17 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_capture.hpp +21 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_filter.hpp +27 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_read_capture.hpp +22 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_state.cpp +148 -0
- pyrematch-1.0.0/src/rematch/evaluation/extended_va/nfa/extended_va_state.hpp +51 -0
- pyrematch-1.0.0/src/rematch/evaluation/start_end_chars.hpp +11 -0
- pyrematch-1.0.0/src/rematch/exceptions/anchor_inside_capture_exception.hpp +15 -0
- pyrematch-1.0.0/src/rematch/exceptions/complex_query_exception.hpp +16 -0
- pyrematch-1.0.0/src/rematch/exceptions/dfa_state_limit_checker.hpp +29 -0
- pyrematch-1.0.0/src/rematch/exceptions/empty_word_capture_exception.hpp +16 -0
- pyrematch-1.0.0/src/rematch/exceptions/exceptions.hpp +19 -0
- pyrematch-1.0.0/src/rematch/exceptions/invalid_character_exception.hpp +10 -0
- pyrematch-1.0.0/src/rematch/exceptions/invalid_escape_exception.hpp +15 -0
- pyrematch-1.0.0/src/rematch/exceptions/invalid_range_exception.hpp +14 -0
- pyrematch-1.0.0/src/rematch/exceptions/memory_limit_exceeded_exception.hpp +17 -0
- pyrematch-1.0.0/src/rematch/exceptions/multi_spanners_not_allowed_exception.hpp +19 -0
- pyrematch-1.0.0/src/rematch/exceptions/query_syntax_exception.hpp +27 -0
- pyrematch-1.0.0/src/rematch/exceptions/same_nested_variable_exception.hpp +13 -0
- pyrematch-1.0.0/src/rematch/exceptions/unhandled_expression_exception.hpp +11 -0
- pyrematch-1.0.0/src/rematch/exceptions/variable_limit_exceeded_exception.hpp +16 -0
- pyrematch-1.0.0/src/rematch/exceptions/variable_not_found_exception.hpp +17 -0
- pyrematch-1.0.0/src/rematch/exceptions/variable_not_found_in_catalog_exception.hpp +15 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa.cpp +100 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa.hpp +70 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa_state.cpp +41 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/dfa/search_dfa_state.hpp +70 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa.cpp +100 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa.hpp +44 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_filter.hpp +36 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_state.cpp +56 -0
- pyrematch-1.0.0/src/rematch/filtering_module/search_variable_set_automaton/nfa/search_nfa_state.hpp +73 -0
- pyrematch-1.0.0/src/rematch/filtering_module/segment_identificator.cpp +74 -0
- pyrematch-1.0.0/src/rematch/filtering_module/segment_identificator.hpp +68 -0
- pyrematch-1.0.0/src/rematch/library_interface/flags.hpp +21 -0
- pyrematch-1.0.0/src/rematch/library_interface/match.cpp +85 -0
- pyrematch-1.0.0/src/rematch/library_interface/match.hpp +52 -0
- pyrematch-1.0.0/src/rematch/library_interface/match_iterator.cpp +45 -0
- pyrematch-1.0.0/src/rematch/library_interface/match_iterator.hpp +47 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_match.cpp +85 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_match.hpp +36 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_match_iterator.cpp +36 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_match_iterator.hpp +33 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_query.cpp +42 -0
- pyrematch-1.0.0/src/rematch/library_interface/multi_query.hpp +26 -0
- pyrematch-1.0.0/src/rematch/library_interface/query.cpp +47 -0
- pyrematch-1.0.0/src/rematch/library_interface/query.hpp +36 -0
- pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data.hpp +24 -0
- pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data_utils.cpp +30 -0
- pyrematch-1.0.0/src/rematch/library_interface/query_data/query_data_utils.hpp +15 -0
- pyrematch-1.0.0/src/rematch/library_interface/rematch.cpp +37 -0
- pyrematch-1.0.0/src/rematch/library_interface/rematch.hpp +29 -0
- pyrematch-1.0.0/src/rematch/library_interface/statistics.hpp +16 -0
- pyrematch-1.0.0/src/rematch/library_interface/stats_collector.hpp +28 -0
- pyrematch-1.0.0/src/rematch/mediator/mapping.cpp +51 -0
- pyrematch-1.0.0/src/rematch/mediator/mapping.hpp +31 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/count_mediator.hpp +23 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/finditer_mediator.cpp +50 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/finditer_mediator.hpp +23 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/findone_mediator.cpp +34 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/findone_mediator.hpp +23 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/mediator.cpp +36 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/mediator.hpp +44 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/multi_finditer_mediator.cpp +61 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/multi_finditer_mediator.hpp +32 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/multi_findone_mediator.cpp +45 -0
- pyrematch-1.0.0/src/rematch/mediator/mediator/multi_findone_mediator.hpp +36 -0
- pyrematch-1.0.0/src/rematch/mediator/output_checker.hpp +26 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/default_segment_manager.cpp +25 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/default_segment_manager.hpp +26 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_by_line_manager.cpp +47 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_by_line_manager.hpp +31 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_identificator.cpp +39 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/line_identificator.hpp +25 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_identificator_manager.cpp +20 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_identificator_manager.hpp +24 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_manager.hpp +19 -0
- pyrematch-1.0.0/src/rematch/mediator/segment_manager/segment_manager_creator.hpp +56 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/ecs.cpp +100 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/ecs.hpp +86 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/ecs_node.cpp +107 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/ecs_node.hpp +82 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/enumerator.cpp +73 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/enumerator.hpp +49 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/extended_mapping.cpp +100 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/extended_mapping.hpp +40 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/mapping.cpp +139 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/mapping.hpp +73 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/minipool.cpp +20 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/minipool.hpp +46 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/node_manager.cpp +106 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/node_manager.hpp +69 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/span.cpp +6 -0
- pyrematch-1.0.0/src/rematch/output_enumeration/span.hpp +11 -0
- pyrematch-1.0.0/src/rematch/parsing/charclass.cpp +160 -0
- pyrematch-1.0.0/src/rematch/parsing/charclass.hpp +98 -0
- pyrematch-1.0.0/src/rematch/parsing/error_listener.hpp +39 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/REmatchLexer.g4 +39 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/REmatchParser.g4 +103 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.cpp +192 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.h +54 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.interp +110 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchLexer.tokens +59 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.cpp +2574 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.h +615 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.interp +106 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParser.tokens +59 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserBaseVisitor.cpp +7 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserBaseVisitor.h +152 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserVisitor.cpp +7 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/autogenerated/REmatchParserVisitor.h +90 -0
- pyrematch-1.0.0/src/rematch/parsing/grammar/generate.sh +3 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va.cpp +820 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va.hpp +127 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_anchor.hpp +35 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_capture.cpp +27 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_capture.hpp +25 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_epsilon.hpp +20 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_filter.hpp +31 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_state.cpp +88 -0
- pyrematch-1.0.0/src/rematch/parsing/logical_variable_set_automaton/logical_va_state.hpp +84 -0
- pyrematch-1.0.0/src/rematch/parsing/parser.cpp +59 -0
- pyrematch-1.0.0/src/rematch/parsing/parser.hpp +35 -0
- pyrematch-1.0.0/src/rematch/parsing/variable_catalog.cpp +151 -0
- pyrematch-1.0.0/src/rematch/parsing/variable_catalog.hpp +84 -0
- pyrematch-1.0.0/src/rematch/parsing/visitors/char_class_visitor.hpp +803 -0
- pyrematch-1.0.0/src/rematch/parsing/visitors/variable_catalog_visitor.hpp +133 -0
- pyrematch-1.0.0/src/rematch/parsing/visitors/visitor_headers.hpp +7 -0
- pyrematch-1.0.0/src/targets/CMakeLists.txt +39 -0
- pyrematch-1.0.0/src/targets/main/emscripten_binding.cpp +69 -0
- pyrematch-1.0.0/src/targets/main/python_binding.cpp +86 -0
- pyrematch-1.0.0/src/targets/main/rematch.cpp +27 -0
- pyrematch-1.0.0/tests/CMakeLists.txt +62 -0
- pyrematch-1.0.0/tests/evaluation/algorithm_utf8.cpp +79 -0
- pyrematch-1.0.0/tests/evaluation/dummy_mapping.hpp +35 -0
- pyrematch-1.0.0/tests/evaluation/extended_det_va.cpp +163 -0
- pyrematch-1.0.0/tests/evaluation/extended_va.cpp +351 -0
- pyrematch-1.0.0/tests/evaluation/finditer_algorithm.cpp +283 -0
- pyrematch-1.0.0/tests/evaluation/findone_algorithm.cpp +43 -0
- pyrematch-1.0.0/tests/evaluation/mapping_helpers.hpp +18 -0
- pyrematch-1.0.0/tests/exceptions/anchor_inside_capture_exception.cpp +25 -0
- pyrematch-1.0.0/tests/exceptions/complex_query_exception.cpp +59 -0
- pyrematch-1.0.0/tests/exceptions/empty_word_capture_exception.cpp +18 -0
- pyrematch-1.0.0/tests/exceptions/invalid_escape_exception.cpp +14 -0
- pyrematch-1.0.0/tests/exceptions/invalid_range_exception.cpp +14 -0
- pyrematch-1.0.0/tests/exceptions/memory_limit_exceeded_exception.cpp +23 -0
- pyrematch-1.0.0/tests/exceptions/multi_spanners_not_allowed_exception.cpp +24 -0
- pyrematch-1.0.0/tests/exceptions/query_syntax_exception.cpp +27 -0
- pyrematch-1.0.0/tests/exceptions/same_nested_variable_exception.cpp +14 -0
- pyrematch-1.0.0/tests/exceptions/variable_not_found_exception.cpp +43 -0
- pyrematch-1.0.0/tests/exceptions/variable_not_found_in_catalog_exception.cpp +20 -0
- pyrematch-1.0.0/tests/filtering_module/search_dfa.cpp +49 -0
- pyrematch-1.0.0/tests/filtering_module/search_nfa.cpp +47 -0
- pyrematch-1.0.0/tests/filtering_module/segment_identification.cpp +139 -0
- pyrematch-1.0.0/tests/library_interface/flags.cpp +38 -0
- pyrematch-1.0.0/tests/library_interface/match.cpp +120 -0
- pyrematch-1.0.0/tests/library_interface/match_iterator.cpp +83 -0
- pyrematch-1.0.0/tests/library_interface/multi_match.cpp +92 -0
- pyrematch-1.0.0/tests/library_interface/multi_match_iterator.cpp +39 -0
- pyrematch-1.0.0/tests/library_interface/multi_query.cpp +179 -0
- pyrematch-1.0.0/tests/library_interface/query.cpp +54 -0
- pyrematch-1.0.0/tests/library_interface/rematch_compile.cpp +386 -0
- pyrematch-1.0.0/tests/library_interface/rematch_functions.cpp +97 -0
- pyrematch-1.0.0/tests/mediator/finditer_mediator.cpp +214 -0
- pyrematch-1.0.0/tests/mediator/findone_mediator.cpp +44 -0
- pyrematch-1.0.0/tests/mediator/multi_finditer_mediator.cpp +169 -0
- pyrematch-1.0.0/tests/mediator/multi_findone_mediator.cpp +56 -0
- pyrematch-1.0.0/tests/mediator/segment_manager_creator.cpp +55 -0
- pyrematch-1.0.0/tests/output_enumeration/ecs.cpp +159 -0
- pyrematch-1.0.0/tests/output_enumeration/ecs_node.cpp +74 -0
- pyrematch-1.0.0/tests/output_enumeration/enumerator.cpp +254 -0
- pyrematch-1.0.0/tests/output_enumeration/extended_mapping.cpp +87 -0
- pyrematch-1.0.0/tests/output_enumeration/garbage_collector.cpp +105 -0
- pyrematch-1.0.0/tests/output_enumeration/mapping.cpp +64 -0
- pyrematch-1.0.0/tests/parsing/logical_va.cpp +217 -0
- pyrematch-1.0.0/tests/parsing/parser.cpp +252 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/CMakeLists.txt +12 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/VERSION +1 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorListener.cpp +10 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorListener.h +167 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorStrategy.cpp +10 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRErrorStrategy.h +121 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRFileStream.cpp +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRFileStream.h +30 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRInputStream.cpp +180 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ANTLRInputStream.h +79 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BailErrorStrategy.cpp +61 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BailErrorStrategy.h +59 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BaseErrorListener.cpp +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BaseErrorListener.h +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BufferedTokenStream.cpp +414 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/BufferedTokenStream.h +200 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CharStream.cpp +11 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CharStream.h +37 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonToken.cpp +193 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonToken.h +158 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenFactory.cpp +39 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenFactory.h +74 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenStream.cpp +78 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/CommonTokenStream.h +79 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ConsoleErrorListener.cpp +15 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ConsoleErrorListener.h +35 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DefaultErrorStrategy.cpp +336 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DefaultErrorStrategy.h +466 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DiagnosticErrorListener.cpp +84 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/DiagnosticErrorListener.h +80 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Exceptions.cpp +64 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Exceptions.h +99 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FailedPredicateException.cpp +52 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FailedPredicateException.h +32 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FlatHashMap.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/FlatHashSet.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InputMismatchException.cpp +18 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InputMismatchException.h +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/IntStream.cpp +12 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/IntStream.h +218 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InterpreterRuleContext.cpp +19 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/InterpreterRuleContext.h +45 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Lexer.cpp +294 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Lexer.h +196 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerInterpreter.cpp +60 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerInterpreter.h +46 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerNoViableAltException.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/LexerNoViableAltException.h +31 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ListTokenSource.cpp +92 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ListTokenSource.h +88 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/NoViableAltException.cpp +46 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/NoViableAltException.h +42 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Parser.cpp +670 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Parser.h +461 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserInterpreter.cpp +294 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserInterpreter.h +173 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserRuleContext.cpp +138 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ParserRuleContext.h +147 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ProxyErrorListener.cpp +53 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/ProxyErrorListener.h +38 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RecognitionException.cpp +65 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RecognitionException.h +98 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Recognizer.cpp +157 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Recognizer.h +160 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContext.cpp +144 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContext.h +141 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContextWithAltNum.cpp +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuleContextWithAltNum.h +32 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuntimeMetaData.cpp +54 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/RuntimeMetaData.h +155 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Token.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Token.h +92 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenFactory.h +30 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenSource.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenSource.h +85 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStream.cpp +11 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStream.h +137 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStreamRewriter.cpp +425 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/TokenStreamRewriter.h +295 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedCharStream.cpp +208 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedCharStream.h +117 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedTokenStream.cpp +270 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/UnbufferedTokenStream.h +115 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Version.h +42 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Vocabulary.cpp +64 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/Vocabulary.h +177 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/WritableToken.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/WritableToken.h +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/antlr4-common.h +101 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/antlr4-runtime.h +168 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATN.cpp +159 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATN.h +133 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfig.cpp +106 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfig.h +157 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfigSet.cpp +233 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNConfigSet.h +157 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializationOptions.cpp +39 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializationOptions.h +48 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializer.cpp +628 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNDeserializer.h +32 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNSimulator.cpp +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNSimulator.h +71 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNState.cpp +56 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNState.h +139 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNStateType.cpp +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNStateType.h +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ATNType.h +20 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ActionTransition.cpp +29 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ActionTransition.h +35 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AmbiguityInfo.cpp +16 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AmbiguityInfo.h +68 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ArrayPredictionContext.cpp +129 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ArrayPredictionContext.h +51 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AtomTransition.cpp +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/AtomTransition.h +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BasicBlockStartState.h +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BasicState.h +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BlockEndState.h +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/BlockStartState.h +30 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ContextSensitivityInfo.cpp +14 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ContextSensitivityInfo.h +47 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionEventInfo.cpp +14 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionEventInfo.h +70 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionInfo.cpp +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionInfo.h +227 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionState.cpp +12 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/DecisionState.h +34 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/EpsilonTransition.cpp +31 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/EpsilonTransition.h +42 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ErrorInfo.cpp +15 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ErrorInfo.h +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/HashUtils.h +18 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LL1Analyzer.cpp +189 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LL1Analyzer.h +76 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNConfig.cpp +67 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNConfig.h +44 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNSimulator.cpp +621 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerATNSimulator.h +199 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerAction.cpp +15 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerAction.h +100 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionExecutor.cpp +108 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionExecutor.h +128 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerActionType.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerChannelAction.cpp +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerChannelAction.h +59 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerCustomAction.cpp +45 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerCustomAction.h +75 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerIndexedCustomAction.cpp +50 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerIndexedCustomAction.h +76 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerModeAction.cpp +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerModeAction.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerMoreAction.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerMoreAction.h +53 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPopModeAction.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPopModeAction.h +53 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPushModeAction.cpp +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerPushModeAction.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerSkipAction.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerSkipAction.h +51 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerTypeAction.cpp +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LexerTypeAction.h +51 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LookaheadEventInfo.cpp +16 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LookaheadEventInfo.h +42 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/LoopEndState.h +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/NotSetTransition.cpp +22 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/NotSetTransition.h +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/OrderedATNConfigSet.cpp +16 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/OrderedATNConfigSet.h +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParseInfo.cpp +102 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParseInfo.h +102 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulator.cpp +1413 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulator.h +911 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ParserATNSimulatorOptions.h +50 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PlusBlockStartState.h +29 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PlusLoopbackState.h +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PrecedencePredicateTransition.cpp +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PrecedencePredicateTransition.h +35 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateEvalInfo.cpp +17 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateEvalInfo.h +62 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateTransition.cpp +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredicateTransition.h +50 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContext.cpp +601 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContext.h +225 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextCache.cpp +56 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextCache.h +63 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCache.cpp +167 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCache.h +101 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextMergeCacheOptions.h +71 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionContextType.h +21 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionMode.cpp +202 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/PredictionMode.h +436 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ProfilingATNSimulator.cpp +179 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/ProfilingATNSimulator.h +60 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RangeTransition.cpp +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RangeTransition.h +31 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleStartState.h +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleStopState.h +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleTransition.cpp +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/RuleTransition.h +42 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContext.cpp +418 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContext.h +237 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SemanticContextType.h +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SerializedATNView.h +101 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SetTransition.cpp +28 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SetTransition.h +38 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SingletonPredictionContext.cpp +79 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/SingletonPredictionContext.h +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarBlockStartState.h +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopEntryState.h +37 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopbackState.cpp +19 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/StarLoopbackState.h +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TokensStartState.h +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/Transition.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/Transition.h +65 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TransitionType.cpp +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/TransitionType.h +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/WildcardTransition.cpp +21 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/atn/WildcardTransition.h +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFA.cpp +115 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFA.h +96 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFASerializer.cpp +60 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFASerializer.h +32 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFAState.cpp +59 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/DFAState.h +154 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/LexerDFASerializer.cpp +17 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/dfa/LexerDFASerializer.h +22 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/internal/Synchronization.cpp +100 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/internal/Synchronization.h +154 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/InterpreterDataReader.cpp +124 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/InterpreterDataReader.h +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Interval.cpp +61 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Interval.h +84 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/IntervalSet.cpp +508 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/IntervalSet.h +190 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/MurmurHash.cpp +120 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/MurmurHash.h +102 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Predicate.cpp +4 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/misc/Predicate.h +21 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Any.cpp +8 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Any.h +16 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Arrays.cpp +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Arrays.h +149 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/BitSet.h +76 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/CPPUtils.cpp +207 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/CPPUtils.h +65 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Casts.h +34 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Declarations.h +161 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/StringUtils.cpp +38 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/StringUtils.h +16 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Unicode.h +28 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Utf8.cpp +242 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/support/Utf8.h +54 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/AbstractParseTreeVisitor.h +129 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNode.h +24 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNodeImpl.cpp +54 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ErrorNodeImpl.h +43 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/IterativeParseTreeWalker.cpp +66 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/IterativeParseTreeWalker.h +53 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTree.cpp +12 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTree.h +111 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeListener.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeListener.h +39 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeProperty.h +50 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeType.h +22 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeVisitor.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeVisitor.h +57 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeWalker.cpp +48 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/ParseTreeWalker.h +55 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNode.h +40 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNodeImpl.cpp +54 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/TerminalNodeImpl.h +32 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/Trees.cpp +241 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/Trees.h +78 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/Chunk.cpp +9 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/Chunk.h +44 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreeMatch.cpp +69 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreeMatch.h +132 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePattern.cpp +64 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePattern.h +105 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePatternMatcher.cpp +370 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/ParseTreePatternMatcher.h +185 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/RuleTagToken.cpp +77 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/RuleTagToken.h +117 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TagChunk.cpp +39 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TagChunk.h +86 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TextChunk.cpp +28 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TextChunk.h +51 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TokenTagToken.cpp +36 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/pattern/TokenTagToken.h +80 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPath.cpp +154 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPath.h +86 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathElement.cpp +31 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathElement.h +40 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.cpp +180 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.g4 +64 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.h +53 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.interp +41 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexer.tokens +12 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexerErrorListener.cpp +13 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathLexerErrorListener.h +22 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleAnywhereElement.cpp +20 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleAnywhereElement.h +27 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleElement.cpp +30 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathRuleElement.h +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenAnywhereElement.cpp +20 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenAnywhereElement.h +25 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenElement.cpp +33 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathTokenElement.h +26 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardAnywhereElement.cpp +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardAnywhereElement.h +23 -0
- pyrematch-1.0.0/third_party/antlr4-cpp-runtime/src/tree/xpath/XPathWildcardElement.cpp +24 -0
- 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()
|
pyrematch-1.0.0/LICENSE
ADDED
|
@@ -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.
|
pyrematch-1.0.0/PKG-INFO
ADDED
|
@@ -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,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
|