Revision: 17282
Author:   [email protected]
Date:     Mon Oct 21 09:24:39 2013 UTC
Log:      Experimental parser: unify regex handling with the baseline.

BUG=
[email protected]

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

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

=======================================
--- /branches/experimental/parser/src/lexer/lexer.re Fri Oct 18 14:33:27 2013 UTC +++ /branches/experimental/parser/src/lexer/lexer.re Mon Oct 21 09:24:39 2013 UTC
@@ -195,9 +195,10 @@
     any = [\000-\377];
     whitespace_char = [ \t\v\f\r];
     whitespace = whitespace_char+;
-    identifier_start_ = [$_\\a-zA-Z];
-    identifier_char = [$_\\a-zA-Z0-9];
+    identifier_start_ = [$_a-zA-Z];
+    identifier_char = [$_a-zA-Z0-9];
     not_identifier_char = any\identifier_char;
+    illegal_after_identifier = [\\];
     line_terminator = [\n\r]+;
     digit = [0-9];
     hex_digit = [0-9a-fA-F];
@@ -319,7 +320,7 @@
     <Normal> identifier_start_    :=> Identifier

     <Normal> eof           { PUSH_EOF_AND_RETURN();}
-    <Normal> any           { TERMINATE_ILLEGAL(); }
+    <Normal> any           { PUSH_TOKEN(Token::ILLEGAL); }

     <DoubleQuoteString> "\\\""  { goto yy0; }
     <DoubleQuoteString> '"'     { PUSH_TOKEN(Token::STRING);}
@@ -338,6 +339,7 @@
     <SingleQuoteString> any     { goto yy0; }

     <Identifier> identifier_char+  { goto yy0; }
+    <Identifier> illegal_after_identifier { PUSH_TOKEN(Token::ILLEGAL); }
<Identifier> any { PUSH_TOKEN_LOOKAHEAD(Token::IDENTIFIER); }

     <SingleLineComment> line_terminator { 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