Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1010)

Unified Diff: src/lexer/lexer.re

Issue 44403002: Experimental scanner: number and whitespace fixes. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698