equal
deleted
inserted
replaced
142 PP "else" { RET(TOKEN_PP_ELSE); } |
142 PP "else" { RET(TOKEN_PP_ELSE); } |
143 PP "elif" { RET(TOKEN_PP_ELIF); } |
143 PP "elif" { RET(TOKEN_PP_ELIF); } |
144 PP "endif" { RET(TOKEN_PP_ENDIF); } |
144 PP "endif" { RET(TOKEN_PP_ENDIF); } |
145 PP "error" { RET(TOKEN_PP_ERROR); } |
145 PP "error" { RET(TOKEN_PP_ERROR); } |
146 |
146 |
147 WHITESPACE { goto scanner_loop; } |
147 WHITESPACE { if (s->report_whitespace) RET(' '); goto scanner_loop; } |
148 NEWLINE { s->line++; RET('\n'); } |
148 NEWLINE { s->line++; RET('\n'); } |
149 ANY { goto bad_chars; } |
149 ANY { goto bad_chars; } |
150 */ |
150 */ |
151 |
151 |
152 multilinecomment: |
152 multilinecomment: |
156 // The "*\/" is just to avoid screwing up text editor syntax highlighting. |
156 // The "*\/" is just to avoid screwing up text editor syntax highlighting. |
157 /*!re2c |
157 /*!re2c |
158 "*\/" { |
158 "*\/" { |
159 if (saw_newline) |
159 if (saw_newline) |
160 RET('\n'); |
160 RET('\n'); |
|
161 else if (s->report_whitespace) |
|
162 RET(' '); |
161 goto scanner_loop; |
163 goto scanner_loop; |
162 } |
164 } |
163 NEWLINE { |
165 NEWLINE { |
164 s->line++; |
166 s->line++; |
165 token = matchptr; |
167 token = matchptr; |