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

Unified Diff: tools/lexer_generator/transition_keys.py

Issue 59033005: Experimental parser: build regex parse trees for all rules (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/rule_parser.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/transition_keys.py
diff --git a/tools/lexer_generator/transition_keys.py b/tools/lexer_generator/transition_keys.py
index a68ea30f527f8ce3e508be321adeefb211a03a1a..8ddbfb3b073f770ab3740b0d0b331b0345782053 100644
--- a/tools/lexer_generator/transition_keys.py
+++ b/tools/lexer_generator/transition_keys.py
@@ -103,12 +103,12 @@ class TransitionKey:
elif graph[1] == 'lit':
ranges.append(TransitionKey.__unicode_literal_bounds)
else:
- assert "unknown character class %s" % graph[1]
+ raise Exception("unknown character class [%s]" % graph[1])
elif key == 'CAT':
for x in [graph[1], graph[2]]:
TransitionKey.__process_graph(x, ranges)
else:
- assert False, "bad key %s" % key
+ raise Exception("bad key [%s]" % key)
@staticmethod
def character_class(invert, graph):
« no previous file with comments | « tools/lexer_generator/rule_parser.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698