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

Unified Diff: tools/lexer_generator/rule_parser.py

Issue 143523005: Experimental parser: fix __continue. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: cleanup 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 | « tools/lexer_generator/nfa_builder.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/rule_parser.py
diff --git a/tools/lexer_generator/rule_parser.py b/tools/lexer_generator/rule_parser.py
index fb823ca088511a38e896ed036f4314d533de57f5..29cb0ee34f1b771fa9a6aa19281fa1fde9cad2a8 100644
--- a/tools/lexer_generator/rule_parser.py
+++ b/tools/lexer_generator/rule_parser.py
@@ -302,7 +302,6 @@ class RuleProcessor(object):
assert 'default' in parser_state.rules
def process(subgraph, v):
graphs = []
- continues = 0
for graph, precedence, action in v['regex']:
(entry_action, match_action, transition) = action
if entry_action or match_action:
@@ -312,15 +311,12 @@ class RuleProcessor(object):
pass
elif transition == 'continue':
assert not subgraph == 'default'
- continues += 1
graph = NfaBuilder.add_continue(graph)
else:
assert subgraph == 'default'
graph = NfaBuilder.join_subgraph(
graph, transition, rule_map[transition])
graphs.append(graph)
- if continues == len(graphs):
- graphs.append(NfaBuilder.epsilon())
if v['catch_all']:
(precedence, catch_all) = v['catch_all']
assert catch_all == (None, None, 'continue'), "unimplemented"
« no previous file with comments | « tools/lexer_generator/nfa_builder.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698