Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add strict to LALR_Parser #24

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lark_cython/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .lark_cython import plugins, Token

__version__ = "0.0.14"
__version__ = "0.0.15"
6 changes: 3 additions & 3 deletions lark_cython/lark_cython.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ cdef class _Parser:


class LALR_Parser(Serialize):
def __init__(self, parser_conf, debug=False):
analysis = LALR_Analyzer(parser_conf, debug=debug)
def __init__(self, parser_conf, debug=False, strict=False):
analysis = LALR_Analyzer(parser_conf, debug=debug, strict=strict)
analysis.compute_lalr()
callbacks = parser_conf.callbacks

Expand Down Expand Up @@ -1067,4 +1067,4 @@ plugins = {
'LexerThread': LexerThread,
'LALR_Parser': LALR_Parser,
'_Parser': _Parser, # XXX Ugly
}
}
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def parse_description():

ext_modules = cythonize('lark_cython/*.pyx'), # accepts a glob pattern
requires = ['Cython'],
install_requires = ['lark>=1.1.4', 'cython>=0.29.0', 'Cython>=0.29.0'],
install_requires = ['lark>=1.1.6', 'cython>=0.29.0', 'Cython>=0.29.0'],
setup_requires=['Cython'],

author = "Erez Shinan",
Expand Down