Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: tools/lexer_generator/rule_parser.py

Issue 70103016: Experimental parser: small cleanup (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/lexer_generator/dfa.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « tools/lexer_generator/dfa.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698