Revision: 17186
Author:   [email protected]
Date:     Mon Oct 14 10:48:11 2013 UTC
Log:      Experimental push mode parser: More fixes.

BUG=
[email protected]

Review URL: https://codereview.chromium.org/27172002
http://code.google.com/p/v8/source/detail?r=17186

Modified:
 /branches/experimental/parser/src/lexer/lexer.re

=======================================
--- /branches/experimental/parser/src/lexer/lexer.re Mon Oct 14 08:31:07 2013 UTC +++ /branches/experimental/parser/src/lexer/lexer.re Mon Oct 14 10:48:11 2013 UTC
@@ -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 @@
         <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
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to