From a543eeb162cbb67fa68974d01cf295316cf6647f Mon Sep 17 00:00:00 2001 From: night199uk Date: Sat, 22 Dec 2018 08:12:27 +0100 Subject: [PATCH] Fix assert on empty options for a Rule --- lark/load_grammar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lark/load_grammar.py b/lark/load_grammar.py index 3c11830..a9de749 100644 --- a/lark/load_grammar.py +++ b/lark/load_grammar.py @@ -510,8 +510,7 @@ class Grammar: empty_indices = [x==_EMPTY for i, x in enumerate(expansion)] if any(empty_indices): - assert options - exp_options = copy(options) + exp_options = copy(options) or RuleOptions() exp_options.empty_indices = empty_indices expansion = [x for x in expansion if x!=_EMPTY] else: