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

Unified Diff: tools/lexer_generator/code_generator.jinja

Issue 75353003: Experimental lexer generator: Lex files with zeros properly. (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 | « test/cornercases/file-with-zero.js ('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.jinja
diff --git a/tools/lexer_generator/code_generator.jinja b/tools/lexer_generator/code_generator.jinja
index 40b27d9c900c465d1e03905ba9275f6264c904a2..231e58d17cbc3701eb7b4c7885b55f97a76c9671 100644
--- a/tools/lexer_generator/code_generator.jinja
+++ b/tools/lexer_generator/code_generator.jinja
@@ -15,6 +15,12 @@
{%- else -%}
({{r[1][0]}} <= yych && yych <= {{r[1][1]}})
{%- endif -%}
+ {%- elif r[0] == 'CLASS' -%}
+ {%- if r[1] == 'eof' -%}
+ (yych == 0 && cursor_ == buffer_end_)
+ {%- else -%}
+ false
+ {%- endif -%}
{%- else -%}
false
{%- endif -%}
« no previous file with comments | « test/cornercases/file-with-zero.js ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698