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

Side by Side Diff: tools/lexer_generator/code_generator.jinja

Issue 138723003: Experimental parser: add back forward before jumping to eos handler (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 {%- endif -%} 255 {%- endif -%}
256 256
257 {%- for key, jump_id in state['if_transitions'] %} 257 {%- for key, jump_id in state['if_transitions'] %}
258 if ({{do_key(key)}}) { // normal if transition 258 if ({{do_key(key)}}) { // normal if transition
259 {{ do_transition(jump_id) }} 259 {{ do_transition(jump_id) }}
260 } 260 }
261 {% endfor -%} 261 {% endfor -%}
262 262
263 {%- if 'eos' in state['unique_transitions'] %} 263 {%- if 'eos' in state['unique_transitions'] %}
264 if (primary_char == 0 && cursor_ >= buffer_end_) { // eos handler 264 if (primary_char == 0 && cursor_ >= buffer_end_) { // eos handler
265 FORWARD();
265 {{ jump(state['unique_transitions']['eos']) }} 266 {{ jump(state['unique_transitions']['eos']) }}
266 } 267 }
267 {%- endif -%} 268 {%- endif -%}
268 269
269 {%- if state['deferred_transitions'] %} 270 {%- if state['deferred_transitions'] %}
270 if ({{long_char_check()}}) { 271 if ({{long_char_check()}}) {
271 next_.is_onebyte = false; 272 next_.is_onebyte = false;
272 {{long_char_create()}} 273 {{long_char_create()}}
273 {%- for key, jump_id in state['deferred_transitions'] %} 274 {%- for key, jump_id in state['deferred_transitions'] %}
274 if ({{do_key(key)}}) { // long_char transition 275 if ({{do_key(key)}}) { // long_char transition
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 // force use of stored_token 352 // force use of stored_token
352 stored_token = Token::ILLEGAL; 353 stored_token = Token::ILLEGAL;
353 // force use of marker 354 // force use of marker
354 marker = NULL; 355 marker = NULL;
355 // force use of state_entry_0 356 // force use of state_entry_0
356 goto state_entry_0; 357 goto state_entry_0;
357 } 358 }
358 } 359 }
359 } } 360 } }
360 361
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698