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

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

Issue 172893003: Experimental parser: add dfa path iterator (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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 | « tools/lexer_generator/backtracking_generator.py ('k') | tools/lexer_generator/dfa.py » ('j') | 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 next_.is_onebyte = true; 132 next_.is_onebyte = true;
133 {%- endif -%} 133 {%- endif -%}
134 has_line_terminator_before_next_ = true; 134 has_line_terminator_before_next_ = true;
135 goto state_entry_0; 135 goto state_entry_0;
136 {% elif type == 'token' %} 136 {% elif type == 'token' %}
137 DO_TOKEN(Token::{{args[0]}}) 137 DO_TOKEN(Token::{{args[0]}})
138 return; 138 return;
139 {% elif type == 'do_stored_token' %} 139 {% elif type == 'do_stored_token' %}
140 DO_TOKEN(stored_token) 140 DO_TOKEN(stored_token)
141 return; 141 return;
142 {% elif type == 'do_token_and_go_forward' %} 142 {% elif type == 'default' %}
143 DO_TOKEN(Token::{{args[0]}}); 143 DO_TOKEN(Token::ILLEGAL);
144 FORWARD(); 144 FORWARD();
145 RESET_START(); 145 RESET_START();
146 return; 146 return;
147 {% elif type == 'harmony_token' %} 147 {% elif type == 'harmony_token' %}
148 if (harmony_{{args[0]}}_) { 148 if (harmony_{{args[0]}}_) {
149 DO_TOKEN(Token::{{args[1]}}); 149 DO_TOKEN(Token::{{args[1]}});
150 } else { 150 } else {
151 DO_TOKEN(Token::{{args[2]}}); 151 DO_TOKEN(Token::{{args[2]}});
152 } 152 }
153 return; 153 return;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 // force use of stored_token 378 // force use of stored_token
379 stored_token = Token::ILLEGAL; 379 stored_token = Token::ILLEGAL;
380 // force use of marker 380 // force use of marker
381 marker = NULL; 381 marker = NULL;
382 // force use of state_entry_0 382 // force use of state_entry_0
383 goto state_entry_0; 383 goto state_entry_0;
384 } 384 }
385 } 385 }
386 } } 386 } }
387 387
OLDNEW
« no previous file with comments | « tools/lexer_generator/backtracking_generator.py ('k') | tools/lexer_generator/dfa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698