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

Unified Diff: tools/lexer_generator/code_generator.py

Issue 64913011: Experimental parser: implement skip (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 | « src/lexer/lexer_py.re ('k') | tools/lexer_generator/rule_parser.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 979865c2750c6246d083b2cfbe60ace9ac3712f4..eede23327a47128e84a29fdf6fd6d2efdd886316 100644
--- a/tools/lexer_generator/code_generator.py
+++ b/tools/lexer_generator/code_generator.py
@@ -75,6 +75,9 @@ code_%s:
elif action.type() == 'terminate_illegal':
code += 'PUSH_TOKEN(Token::ILLEGAL); return 1;'
return code
+ elif action.type() == 'skip':
+ code += 'SKIP(); goto code_start;'
+ return code
code += '''
//fprintf(stderr, "char at hand is %c (%d)\\n", yych, yych);\n'''
« no previous file with comments | « src/lexer/lexer_py.re ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698