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

Unified Diff: tools/lexer_generator/dfa_optimizer.py

Issue 85623003: Experimental parser: enable transition reduction (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/code_generator.py ('k') | tools/lexer_generator/generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/dfa_optimizer.py
diff --git a/tools/lexer_generator/dfa_optimizer.py b/tools/lexer_generator/dfa_optimizer.py
index 0b2c1e5136afe0e068d212f870449f11bb4afe80..2ac651da5ced87ca0b9236c4d0764c22a0658a5b 100644
--- a/tools/lexer_generator/dfa_optimizer.py
+++ b/tools/lexer_generator/dfa_optimizer.py
@@ -149,10 +149,10 @@ class DfaOptimizer(object):
assert not state_replacements
self.__dfa.visit_all_states(replace_state)
# now patch up all states with stores
- for state in store_states:
- old_action = states[state]['action']
- match_action = ('do_stored_token', None)
- states[state]['action'] = replacement_action(old_action, match_action)
+ for state_id in store_states:
+ old_action = states[state_id]['action']
+ match_action = ('do_stored_token', state_id)
+ states[state_id]['action'] = replacement_action(old_action, match_action)
start_name = name(self.__dfa.start_state())
if self.__log:
print 'gotos inserted %s' % counters['gotos']
« no previous file with comments | « tools/lexer_generator/code_generator.py ('k') | tools/lexer_generator/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698