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

Unified Diff: tools/lexer_generator/nfa_builder.py

Issue 132693018: Experimental parser: handling unique keys in merges (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 months 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 | « no previous file | tools/lexer_generator/rule_parser.py » ('j') | 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 898e29692a687fd4ba32ae13b7fa7c8a54115524..5ff7e242b90cd08b944c5ecacee3a57695be3159 100644
--- a/tools/lexer_generator/nfa_builder.py
+++ b/tools/lexer_generator/nfa_builder.py
@@ -150,8 +150,8 @@ class NfaBuilder(object):
self.__patch_ends(ends, state['start_node'])
return (start, [])
- def __catch_all(self, graph):
- return self.__key_state(TransitionKey.unique('catch_all'))
+ def __unique_key(self, graph):
+ return self.__key_state(TransitionKey.unique(graph[1]))
def __join(self, graph):
(graph, name, subgraph) = graph[1:]
@@ -311,8 +311,8 @@ class NfaBuilder(object):
return ('CONTINUE', graph)
@staticmethod
- def catch_all():
- return ('CATCH_ALL',)
+ def unique_key(name):
+ return ('UNIQUE_KEY', name)
@staticmethod
def join_subgraph(graph, name, subgraph):
« no previous file with comments | « no previous file | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698