Reviewers: ulan,
Message:
Committed patchset #1 manually as r17186 (presubmit successful).
Description:
Experimental push mode parser: More fixes.
BUG=
R=u...@chromium.org
Committed: https://code.google.com/p/v8/source/detail?r=17186
Please review this at https://codereview.chromium.org/27172002/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser
Affected files (+15, -16 lines):
M src/lexer/lexer.re
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(); }
*/
--
--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.