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

Unified Diff: tools/lexer_generator/generator.py

Issue 59403010: Experimental parser: easier to read rules and default rule (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') | tools/lexer_generator/nfa.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/generator.py
diff --git a/tools/lexer_generator/generator.py b/tools/lexer_generator/generator.py
index 6b0ab0b07f438995b7dc19e31d87c4e190fccf7f..cf19267432da892a861b793a2d4a2db0bd107fb1 100644
--- a/tools/lexer_generator/generator.py
+++ b/tools/lexer_generator/generator.py
@@ -76,7 +76,7 @@ def process_rules(parser_state):
builder.set_character_classes(parser_state.character_classes)
for k, v in parser_state.rules.items():
graphs = []
- for (rule_type, graph, identifier, action) in v:
+ for (graph, code, action) in v['regex']:
# graphs.append(NfaBuilder.add_action(graph, (action, identifier)))
graphs.append(graph)
rule_map[k] = builder.nfa(NfaBuilder.or_graphs(graphs))
« no previous file with comments | « tools/lexer_generator/dfa.py ('k') | tools/lexer_generator/nfa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698