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

Unified Diff: tools/lexer_generator/nfa.py

Issue 66533002: Experimental parser: better generation (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/generator.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.py
diff --git a/tools/lexer_generator/nfa.py b/tools/lexer_generator/nfa.py
index 16eb5a280d6db47b76f7f65da37cf7f833ffe53c..46ddc711765dca4799ad34a3b750584dae0f2c96 100644
--- a/tools/lexer_generator/nfa.py
+++ b/tools/lexer_generator/nfa.py
@@ -214,8 +214,11 @@ class NfaBuilder:
new_start.close(start)
start = new_start
else:
+ new_end = self.__new_state()
for end in ends:
end.set_transition_action(action)
+ self.__patch_ends(ends, new_end)
+ ends = [new_end]
return (start, ends)
def __continue(self, graph):
« no previous file with comments | « tools/lexer_generator/generator.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698