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

Unified Diff: tools/lexer_generator/code_generator.jinja

Issue 145623002: Experimental parser: cleanup deferred transitions (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 months 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/code_generator.jinja
diff --git a/tools/lexer_generator/code_generator.jinja b/tools/lexer_generator/code_generator.jinja
index f34f9211bdc5b0b99a6624f5e295ea96deba2bc5..32fb65069d11c345f1e570231ebc5c5d034db394 100644
--- a/tools/lexer_generator/code_generator.jinja
+++ b/tools/lexer_generator/code_generator.jinja
@@ -43,14 +43,6 @@
{%- else -%}
({{r[1][0]}} <= primary_char && primary_char <= {{r[1][1]}})
{%- endif -%}
- {%- elif r[0] == 'CLASS' -%}
- {%- if r[1] == 'eos' -%}
- (primary_char == 0 && cursor_ >= buffer_end_)
- {%- elif r[1] == 'zero' -%}
- (primary_char == 0 && cursor_ < buffer_end_)
- {%- else %}
- uncompilable code for {{encoding}} {{r[0]}} {{r[1]}}
- {%- endif -%}
{# These classes require long_char and to be outside the primary range #}
{%- elif r[0] == 'LONG_CHAR_CLASS' and encoding in ['utf16', 'utf8'] -%}
{%- if r[1] == 'byte_order_mark' -%}
@@ -274,17 +266,11 @@
}
{% endfor -%}
- {%- for key, jump_id in state['deferred_transitions'] %}
- if ({{do_key(key)}}) { // deferred transition
- {{ do_transition(jump_id) }}
- }
- {% endfor -%}
-
- {%- if state['long_char_transitions'] -%}
+ {%- if state['deferred_transitions'] -%}
if ({{long_char_check()}}) {
next_.is_onebyte = false;
{{long_char_create()}}
- {%- for key, jump_id in state['long_char_transitions'] %}
+ {%- for key, jump_id in state['deferred_transitions'] %}
if ({{do_key(key)}}) { // long_char transition
{{ do_transition(jump_id) }}
}
« 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