diff --git a/lark/tools/nearley.py b/lark/tools/nearley.py index eead26d..a7fd259 100644 --- a/lark/tools/nearley.py +++ b/lark/tools/nearley.py @@ -160,7 +160,7 @@ def create_code_for_nearley_grammar(g, start, builtin_path, folder_path): emit('class TransformNearley(Transformer):') for alias in n2l.alias_js_code: emit(" %s = var.get('%s').to_python()" % (alias, alias)) - emit(" __default__ = lambda self, n, c: c if c else None") + emit(" __default__ = lambda self, n, c, m: c if c else None") emit() emit('parser = Lark(grammar, start="n_%s")' % start)