Revision: 18039
Author:   [email protected]
Date:     Mon Nov 25 10:36:04 2013 UTC
Log:      Experimental lexer generator: utf line terminator fix.

BUG=

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

Modified:
 /branches/experimental/parser/src/scanner.h
 /branches/experimental/parser/tools/lexer_generator/code_generator.py

=======================================
--- /branches/experimental/parser/src/scanner.h Wed Nov 20 16:10:09 2013 UTC
+++ /branches/experimental/parser/src/scanner.h Mon Nov 25 10:36:04 2013 UTC
@@ -139,6 +139,9 @@
bool IsIdentifierPart(unibrow::uchar c) { return kIsIdentifierPart.get(c); } bool IsLineTerminator(unibrow::uchar c) { return kIsLineTerminator.get(c); }
   bool IsWhiteSpace(unibrow::uchar c) { return kIsWhiteSpace.get(c); }
+  bool IsWhiteSpaceNotLineTerminator(unibrow::uchar c) {
+    return !kIsLineTerminator.get(c) && kIsWhiteSpace.get(c);
+  }
   bool IsLetter(unibrow::uchar c) { return kIsLetter.get(c); }
   bool IsIdentifierPartNotLetter(unibrow::uchar c) {
     return kIsIdentifierPartNotLetter.get(c);
=======================================
--- /branches/experimental/parser/tools/lexer_generator/code_generator.py Fri Nov 22 13:16:25 2013 UTC +++ /branches/experimental/parser/tools/lexer_generator/code_generator.py Mon Nov 25 10:36:04 2013 UTC
@@ -200,7 +200,7 @@
     return split_count + (0 if no_switch else 1)

   __call_map = {
-    'non_primary_whitespace' : 'IsWhiteSpace',
+    'non_primary_whitespace' : 'IsWhiteSpaceNotLineTerminator',
     'non_primary_letter' : 'IsLetter',
     'non_primary_identifier_part_not_letter' : 'IsIdentifierPartNotLetter',
     'non_primary_line_terminator' : 'IsLineTerminator',

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