Reviewers: dcarney,
Message:
Committed patchset #1 manually as r17400.
Description:
Experimental scanner: number and whitespace fixes.
Failures down to 6.
BUG=
[email protected]
Committed: https://code.google.com/p/v8/source/detail?r=17400
Please review this at https://codereview.chromium.org/44403002/
SVN Base: https://v8.googlecode.com/svn/branches/experimental/parser
Affected files (+2, -2 lines):
M src/lexer/lexer.re
Index: src/lexer/lexer.re
diff --git a/src/lexer/lexer.re b/src/lexer/lexer.re
index
9d6d881684102256a145b0b1d935b744d95bcb74..ef6287f21b0d2f084e0a30fdfa3b38eb7c4bdbf4
100644
--- a/src/lexer/lexer.re
+++ b/src/lexer/lexer.re
@@ -266,7 +266,7 @@ start_:
digit = [0-9];
hex_digit = [0-9a-fA-F];
maybe_exponent = ('e' [-+]? digit+)?;
- number = ('0x' hex_digit+) | ("." digit+ maybe_exponent) | (digit+
("." digit+)? maybe_exponent);
+ number = ('0x' hex_digit+) | ("." digit+ maybe_exponent) | (digit+
("." digit*)? maybe_exponent);
<Normal> "break" not_identifier_char {
PUSH_TOKEN_LOOKAHEAD(Token::BREAK); }
<Normal> "case" not_identifier_char {
PUSH_TOKEN_LOOKAHEAD(Token::CASE); }
@@ -331,7 +331,7 @@ start_:
<Normal> "!" { PUSH_TOKEN(Token::NOT); }
<Normal> "//" :=> SingleLineComment
- <Normal> whitespace? "-->" { if (just_seen_line_terminator_) {
YYSETCONDITION(kConditionSingleLineComment); goto yy0; } else { --cursor_;
send(Token::DEC); start_ = cursor_; goto yy0; } }
+ <Normal> whitespace* "-->" { if (just_seen_line_terminator_) {
YYSETCONDITION(kConditionSingleLineComment); goto yy0; } else { --cursor_;
send(Token::DEC); start_ = cursor_; goto yy0; } }
<Normal> "/*" :=> MultiLineComment
<Normal> "<!--" :=> HtmlComment
--
--
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.