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

Unified Diff: tools/lexer_generator/dfa.py

Issue 139303008: Experimental parser: fix an assert to be more meaningful. (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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/dfa.py
diff --git a/tools/lexer_generator/dfa.py b/tools/lexer_generator/dfa.py
index f135b8e1e9d133298be386664c186365bb89a585..a8f29cdbd6a2389fe79e49e68dadd8330beae9b0 100644
--- a/tools/lexer_generator/dfa.py
+++ b/tools/lexer_generator/dfa.py
@@ -189,7 +189,9 @@ class DfaMinimizer:
all_keys.append(state.key_iter())
if action:
if state not in terminal_set:
- assert action.entry_action()
+ # Match actions are valid only if we have matched the whole token, not
+ # just some sub-part of it.
+ assert not action.match_action()
key = ("nonterminal action", action)
else:
key = ("terminal action", action)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698