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

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

Issue 74793009: Experimental lexer generator: Fix the rest of the failures. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/lexer/lexer_py.re ('k') | 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 #include "lexer/even-more-experimental-scanner.h" 1 #include "lexer/even-more-experimental-scanner.h"
2 2
3 3
4 {# TODO implement CLASS checks #} 4 {# TODO implement CLASS checks #}
5 {%- macro do_key(key) -%} 5 {%- macro do_key(key) -%}
6 {%- for r in key.range_iter() -%} 6 {%- for r in key.range_iter() -%}
7 {%- if not loop.first %} || {% endif -%} 7 {%- if not loop.first %} || {% endif -%}
8 {%- if r[0] == 'LATIN_1' -%} 8 {%- if r[0] == 'LATIN_1' -%}
9 {%- if r[1][0] == r[1][1] -%} 9 {%- if r[1][0] == r[1][1] -%}
10 yych == {{r[1][0]}} 10 yych == {{r[1][0]}}
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 112
113 #define PUSH_LINE_TERMINATOR(s) { \ 113 #define PUSH_LINE_TERMINATOR(s) { \
114 start_ = cursor_; \ 114 start_ = cursor_; \
115 just_seen_line_terminator_ = true; \ 115 just_seen_line_terminator_ = true; \
116 } 116 }
117 117
118 #define FORWARD() { \ 118 #define FORWARD() { \
119 yych = *(++cursor_); \ 119 yych = *(++cursor_); \
120 } 120 }
121 121
122 #define BACKWARD() { \
123 yych = *(--cursor_); \
124 }
125
122 #define SKIP() { \ 126 #define SKIP() { \
123 start_ = cursor_; \ 127 start_ = cursor_; \
124 } 128 }
125 129
126 namespace v8 { 130 namespace v8 {
127 namespace internal { 131 namespace internal {
128 Token::Value EvenMoreExperimentalScanner::Next(int* beg_pos_to_return, 132 Token::Value EvenMoreExperimentalScanner::Next(int* beg_pos_to_return,
129 int* end_pos_to_return) { 133 int* end_pos_to_return) {
130 // Setup environment. 134 // Setup environment.
131 YYCTYPE yych = *cursor_; 135 YYCTYPE yych = *cursor_;
(...skipping 12 matching lines...) Expand all
144 {% endif -%} 148 {% endif -%}
145 {{dispatch_action(default_action[0], default_action[1])}} 149 {{dispatch_action(default_action[0], default_action[1])}}
146 FORWARD(); 150 FORWARD();
147 goto code_start; 151 goto code_start;
148 152
149 fell_through: 153 fell_through:
150 CHECK(false); 154 CHECK(false);
151 } 155 }
152 } } 156 } }
153 157
OLDNEW
« no previous file with comments | « src/lexer/lexer_py.re ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698