| Index: tools/lexer_generator/rule_parser.py
|
| diff --git a/tools/lexer_generator/rule_parser.py b/tools/lexer_generator/rule_parser.py
|
| index 4a70f3cdc673cda4643ac6005c80fd17cd42c075..f065436e3428ab2413726a735f3971e805cbd82b 100644
|
| --- a/tools/lexer_generator/rule_parser.py
|
| +++ b/tools/lexer_generator/rule_parser.py
|
| @@ -148,7 +148,7 @@ class RuleParser:
|
| if len(p) == 2:
|
| p[0] = (p[1], None)
|
| elif len(p) == 5:
|
| - p[0] = (p[1], p[2])
|
| + p[0] = (p[1], p[3])
|
| else:
|
| raise Exception()
|
|
|
| @@ -319,7 +319,7 @@ class RuleProcessor(object):
|
| assert catch_all == (None, None, 'continue'), "unimplemented"
|
| graphs.append(NfaBuilder.add_continue(NfaBuilder.catch_all()))
|
| graph = NfaBuilder.or_graphs(graphs)
|
| - rule_map[k] = graph
|
| + rule_map[subgraph] = graph
|
| # process first the subgraphs, then the default graph
|
| for k, v in parser_state.rules.items():
|
| if k == 'default': continue
|
|
|