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

Unified Diff: tools/lexer_generator/nfa_builder.py

Issue 77863004: Experimental parser: small cleanups (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/nfa.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/nfa_builder.py
diff --git a/tools/lexer_generator/nfa_builder.py b/tools/lexer_generator/nfa_builder.py
index 908e07cbfb83c911293201157ce6a879dba95b3c..c5410b324d693466233b22cc7dbef846241b1173 100644
--- a/tools/lexer_generator/nfa_builder.py
+++ b/tools/lexer_generator/nfa_builder.py
@@ -224,7 +224,7 @@ class NfaBuilder(object):
transitions = state.transitions()
if not catch_all in transitions:
return
- f = lambda acc, state: acc | state.epsilon_closure()
+ f = lambda acc, state: acc | set(state.epsilon_closure_iter())
reachable_states = reduce(f, transitions[catch_all], set())
f = lambda acc, state: acc | set(state.transitions().keys())
keys = reduce(f, reachable_states, set())
« no previous file with comments | « tools/lexer_generator/nfa.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698