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

Unified Diff: tools/lexer_generator/automaton.py

Issue 82803003: Experimental parser: add utf8 encoding (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 | « no previous file | tools/lexer_generator/code_generator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/automaton.py
diff --git a/tools/lexer_generator/automaton.py b/tools/lexer_generator/automaton.py
index 7321fae5972459374fb9bd33d04a8031fb8f9a40..ddd59fed54e5971cdcc0d1c720d619ba567321f4 100644
--- a/tools/lexer_generator/automaton.py
+++ b/tools/lexer_generator/automaton.py
@@ -217,6 +217,8 @@ class Automaton(object):
for key, state in node.key_state_iter():
if key == TransitionKey.epsilon():
key = "ε"
+ else:
+ key = key.to_string(self.encoding())
edge_content.append(" S_%s -> S_%s [ label = \"%s\" ];" % (
node.node_number(), state.node_number(), escape(key)))
return (node_content, edge_content)
« no previous file with comments | « no previous file | tools/lexer_generator/code_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698