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

Unified Diff: src/lexer/lexer.re

Issue 27172002: Experimental push mode parser: More fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer.re
diff --git a/src/lexer/lexer.re b/src/lexer/lexer.re
index ef94717c65dab1d0be04d629a0e10d12d9498f6c..0082f0afb052df2536697127c19f76885dcd4a40 100644
--- a/src/lexer/lexer.re
+++ b/src/lexer/lexer.re
@@ -33,7 +33,6 @@
printf("got token %s (%d)\n", tokenNames[T], T); \
SKIP(); }
#define PUSH_STRING() { \
- --cursor; \
printf("got string\n"); \
size_t tokenSize = cursor-start; \
fwrite(start, tokenSize, 1, stdout); \
@@ -367,27 +366,27 @@ public:
<DoubleQuoteString> '"' { PUSH_STRING();}
<DoubleQuoteString> any { goto yy0; }
- <SingleQuoteString> "\\'" { goto yy0; }
- <SingleQuoteString> "'" { PUSH_STRING();}
- <SingleQuoteString> any { goto yy0; }
+ <SingleQuoteString> "\\'" { goto yy0; }
+ <SingleQuoteString> "'" { PUSH_STRING();}
+ <SingleQuoteString> any { goto yy0; }
- <Identifier> identifier_char+ { goto yy0; }
- <Identifier> any { PUSH_IDENTIFIER(); }
+ <Identifier> identifier_char+ { goto yy0; }
+ <Identifier> any { PUSH_IDENTIFIER(); }
<SingleLineComment> line_terminator { PUSH_LINE_TERMINATOR();}
- <SingleLineComment> eof { PUSH_LINE_TERMINATOR();}
- <SingleLineComment> any :=> SingleLineComment
+ <SingleLineComment> eof { PUSH_LINE_TERMINATOR();}
+ <SingleLineComment> any { goto yy0; }
- <MultiLineComment> [*][//] { PUSH_LINE_TERMINATOR();}
- <MultiLineComment> eof { TERMINATE_ILLEGAL(); }
- <MultiLineComment> any :=> MultiLineComment
+ <MultiLineComment> [*][//] { PUSH_LINE_TERMINATOR();}
+ <MultiLineComment> eof { TERMINATE_ILLEGAL(); }
+ <MultiLineComment> any { goto yy0; }
- <HtmlComment> eof { TERMINATE_ILLEGAL(); }
- <HtmlComment> "-->" { PUSH_LINE_TERMINATOR();}
- <HtmlComment> any :=> HtmlComment
+ <HtmlComment> eof { TERMINATE_ILLEGAL(); }
+ <HtmlComment> "-->" { PUSH_LINE_TERMINATOR();}
+ <HtmlComment> any { goto yy0; }
- <Number> number_char+ { goto yy0; }
- <Number> any { PUSH_NUMBER(); }
+ <Number> number_char+ { goto yy0; }
+ <Number> any { PUSH_NUMBER(); }
*/
« 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