Reviewers: marja,

Message:
Committed patchset #1 manually as r17797.

Description:
Experimental parser: better end of multiline comment detection

[email protected]

BUG=

Committed: https://code.google.com/p/v8/source/detail?r=17797

Please review this at https://codereview.chromium.org/70383009/

SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser

Affected files (+3, -3 lines):
  M src/lexer/lexer_py.re
  M tools/lexer_generator/regex_lexer.py


Index: src/lexer/lexer_py.re
diff --git a/src/lexer/lexer_py.re b/src/lexer/lexer_py.re
index af6809bac8ce29d1d7d34cd92b93d2d270785b57..4a49a3ab81ef3a3277b7fcf50f986d6c6ae8b13a 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -229,9 +229,9 @@ eof <|skip_and_terminate|>
 catch_all <||continue>

 <<MultiLineComment>>
-"*/"             <|skip|>
+/\*+\//             <|skip|>
 # TODO find a way to generate the below rule
-/\*[^\/]/        <||continue>
+/\*+[^\/*]/       <||continue>
 line_terminator  <push_line_terminator||continue>
 eof <|skip_and_terminate|>
 catch_all        <||continue>
Index: tools/lexer_generator/regex_lexer.py
diff --git a/tools/lexer_generator/regex_lexer.py b/tools/lexer_generator/regex_lexer.py index 262955fa585fee03237158ce497ca37c19cb5d9c..b653fdd752054deb3f3e920a0f15ef1f4e6b2afa 100644
--- a/tools/lexer_generator/regex_lexer.py
+++ b/tools/lexer_generator/regex_lexer.py
@@ -115,7 +115,7 @@ class RegexLexer:
     t.value = RegexLexer.__escaped_class_literals[t.value]
     return t

-  t_class_CLASS_LITERAL = r'[\w $_+\'/]'
+  t_class_CLASS_LITERAL = r'[\w *$_+\'/]'

   def t_REPEAT_BEGIN(self, t):
     r'\{'


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