Revision: 17298
Author:   [email protected]
Date:     Mon Oct 21 14:09:28 2013 UTC
Log:      Experimental parser: misc fixes.

These make the experimental parser fail less when ran with .js files in the
repo (now 23 fails out of ~2000).

BUG=
[email protected]

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

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

=======================================
--- /branches/experimental/parser/src/lexer/lexer.re Mon Oct 21 11:29:05 2013 UTC +++ /branches/experimental/parser/src/lexer/lexer.re Mon Oct 21 14:09:28 2013 UTC
@@ -271,6 +271,7 @@
     <Normal> "<!--"        :=> HtmlComment

     <Normal> ">>>="        { PUSH_TOKEN(Token::ASSIGN_SHR); }
+    <Normal> ">>>"         { PUSH_TOKEN(Token::SHR); }
     <Normal> "<<="         { PUSH_TOKEN(Token::ASSIGN_SHL); }
     <Normal> ">>="         { PUSH_TOKEN(Token::ASSIGN_SAR); }
     <Normal> "<="          { PUSH_TOKEN(Token::LTE); }
@@ -325,6 +326,7 @@
     <Normal> eof           { PUSH_EOF_AND_RETURN();}
     <Normal> any           { PUSH_TOKEN(Token::ILLEGAL); }

+    <DoubleQuoteString> "\\\\"  { goto yy0; }
     <DoubleQuoteString> "\\\""  { goto yy0; }
     <DoubleQuoteString> '"'     { PUSH_TOKEN(Token::STRING);}
     <DoubleQuoteString> "\\" "\n" "\r"? { goto yy0; }
@@ -334,6 +336,7 @@
     <DoubleQuoteString> eof     { TERMINATE_ILLEGAL(); }
     <DoubleQuoteString> any     { goto yy0; }

+    <SingleQuoteString> "\\\\"  { goto yy0; }
     <SingleQuoteString> "\\'"   { goto yy0; }
     <SingleQuoteString> "'"     { PUSH_TOKEN(Token::STRING);}
     <SingleQuoteString> "\\" "\n" "\r"? { goto yy0; }
@@ -354,7 +357,7 @@
<IdentifierIllegal> any { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }

     <SingleLineComment> line_terminator { PUSH_LINE_TERMINATOR();}
-    <SingleLineComment> eof             { PUSH_LINE_TERMINATOR();}
+    <SingleLineComment> eof             { PUSH_TOKEN(Token::EOS); }
     <SingleLineComment> any             { goto yy0; }

     <MultiLineComment> [*][//]  { PUSH_LINE_TERMINATOR();}

--
--
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