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

Side by Side Diff: src/lexer/lexer.re

Issue 59533005: Prepare lexer-shell for benchmarking: process multiple input files, adjust output. (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 | « no previous file | src/lexer/lexer-shell.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Portions of this code based on re2c: 1 // Portions of this code based on re2c:
2 // (re2c/examples/push.re) 2 // (re2c/examples/push.re)
3 // Copyright 2013 the V8 project authors. All rights reserved. 3 // Copyright 2013 the V8 project authors. All rights reserved.
4 // Redistribution and use in source and binary forms, with or without 4 // Redistribution and use in source and binary forms, with or without
5 // modification, are permitted provided that the following conditions are 5 // modification, are permitted provided that the following conditions are
6 // met: 6 // met:
7 // 7 //
8 // * Redistributions of source code must retain the above copyright 8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer. 9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above 10 // * Redistributions in binary form must reproduce the above
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 limit_ += input_size; 210 limit_ += input_size;
211 211
212 #define SKIP() { start_ = cursor_; YYSETCONDITION(kConditionNorma l); goto yyc_Normal; } 212 #define SKIP() { start_ = cursor_; YYSETCONDITION(kConditionNorma l); goto yyc_Normal; }
213 #define YYFILL(n) { goto fill; } 213 #define YYFILL(n) { goto fill; }
214 214
215 #define YYGETSTATE() state_ 215 #define YYGETSTATE() state_
216 #define YYSETSTATE(x) { state_ = (x); } 216 #define YYSETSTATE(x) { state_ = (x); }
217 217
218 #define YYGETCONDITION() condition_ 218 #define YYGETCONDITION() condition_
219 #define YYSETCONDITION(x) { condition_ = (x); } 219 #define YYSETCONDITION(x) { condition_ = (x); }
220 #define YYDEBUG(state, current) {printf("%d: |%c| (%d)\n", state, current, (int) (current));}
220 221
221 start_: 222 start_:
222 if (FLAG_trace_lexer) { 223 if (FLAG_trace_lexer) {
223 printf("Starting a round; state_: %d, condition_: %d\n", state_, condition_) ; 224 printf("Starting a round; state_: %d, condition_: %d\n", state_, condition_) ;
224 } 225 }
225 226
226 /*!re2c 227 /*!re2c
227 re2c:indent:top = 1; 228 re2c:indent:top = 1;
228 re2c:yych:conversion = 0; 229 re2c:yych:conversion = 0;
229 re2c:condenumprefix = kCondition; 230 re2c:condenumprefix = kCondition;
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 size_t start_offset = start_ - buffer_; 432 size_t start_offset = start_ - buffer_;
432 memmove(buffer_, start_, limit_ - start_); 433 memmove(buffer_, start_, limit_ - start_);
433 marker_ -= start_offset; 434 marker_ -= start_offset;
434 cursor_ -= start_offset; 435 cursor_ -= start_offset;
435 limit_ -= start_offset; 436 limit_ -= start_offset;
436 start_ -= start_offset; 437 start_ -= start_offset;
437 real_start_ += start_offset; 438 real_start_ += start_offset;
438 } 439 }
439 return 0; 440 return 0;
440 } 441 }
OLDNEW
« no previous file with comments | « no previous file | src/lexer/lexer-shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698