Skip to content

Commit

Permalink
Refactor Regex and introduce Numba-based FSM utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonwillard committed Sep 16, 2023
1 parent 76e95fe commit c7b3cc8
Show file tree
Hide file tree
Showing 8 changed files with 1,259 additions and 883 deletions.
17 changes: 0 additions & 17 deletions examples/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,6 @@
checkpoint, trust_remote_code=True, revision=revision
).to(device)

# import urllib.request
#
# sql_grammar_url = "https://github.com/zbrookle/sql_to_ibis/raw/0e9226da42065940ce21439d490f9fcacadc7f92/sql_to_ibis/grammar/sql.lark"
# sql_grammar = "".join(
# [line.decode("utf-8") for line in urllib.request.urlopen(sql_grammar_url)]
# )
# with open("sql_grammar.lark", "w") as f:
# f.write(sql_grammar)
#
# TODO: `_STRING_ESC_INNER` from `%import common.ESCAPED_STRING` introduces a
# (potentially superfluous) look-back; we need to replace it or implement
# look-backs.
# parser = PartialLark.open(
# "sql_grammar.lark",
# parser="lalr",
# )

parser = PartialLark.open_from_package(
"tests",
"partial_python.lark",
Expand Down
Loading

0 comments on commit c7b3cc8

Please sign in to comment.