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

Unified Diff: tools/lexer_generator/code_generator.py

Issue 71273003: Experimental lexer generator: add a test for the code generator. (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_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/code_generator.py
diff --git a/tools/lexer_generator/code_generator.py b/tools/lexer_generator/code_generator.py
index cafa0841bdfd7cb40988e7fd5f49a4bb349cbd29..559b8d95442a666c9f8d858a0d4c8b5321accf43 100644
--- a/tools/lexer_generator/code_generator.py
+++ b/tools/lexer_generator/code_generator.py
@@ -63,10 +63,10 @@ code_%s:
action = state.action()
if action:
- if action[1] == 'terminate':
+ if action.type() == 'terminate':
code += 'return 0;'
return code
- elif action[1] == 'terminate_illegal':
+ elif action.type() == 'terminate_illegal':
code += 'return 1;'
return code
@@ -82,7 +82,7 @@ code_%s:
''' % s.node_number()
if action:
- code += '%s\nyych = *(--cursor_);\ngoto code_%s;\n' % (state.action()[1],
+ code += '%s\nyych = *(--cursor_);\ngoto code_%s;\n' % (action.data(),
start_node_number)
return code
« no previous file with comments | « no previous file | tools/lexer_generator/code_generator_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698