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

Unified Diff: src/lexer/lexer_py.re

Issue 74793009: Experimental lexer generator: Fix the rest of the failures. (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 7 years, 1 month 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 | « src/lexer/even-more-experimental-scanner.cc ('k') | tools/lexer_generator/code_generator.jinja » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lexer/lexer_py.re
diff --git a/src/lexer/lexer_py.re b/src/lexer/lexer_py.re
index bf08134c8237cf607c947d7851c402a633478027..650f5455b071da47caac47db651a43e2d3e118f6 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -65,7 +65,7 @@ line_terminator_sequence = (/\n\r?/)|(/\r\n?/);
"!" <|push_token(NOT)|>
"//" <||SingleLineComment>
-"/*" <||MultiLineComment>
+"/*" <{marker_ = cursor_ - 2;}||MultiLineComment>
"<!--" <||SingleLineComment>
"<!-" <|{
@@ -195,9 +195,9 @@ default_action <push_token_and_go_forward(ILLEGAL)>
<<DoubleQuoteString>>
"\\" line_terminator_sequence <||continue>
-/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[x][:hex_digit:]{2}/ <||continue>
/\\[u][:hex_digit:]{4}/ <||continue>
-/\\[^xXu\r\n]/ <||continue>
+/\\[^xu\r\n]/ <||continue>
"\\" <|push_token(ILLEGAL)|>
/\n|\r/ <|push_token(ILLEGAL)|>
"\"" <|push_token(STRING)|>
@@ -207,9 +207,9 @@ catch_all <||continue>
<<SingleQuoteString>>
# TODO subgraph for '\'
"\\" line_terminator_sequence <||continue>
-/\\[xX][:hex_digit:]{2}/ <||continue>
+/\\[x][:hex_digit:]{2}/ <||continue>
/\\[u][:hex_digit:]{4}/ <||continue>
-/\\[^xXu\r\n]/ <||continue>
+/\\[^xu\r\n]/ <||continue>
"\\" <|push_token(ILLEGAL)|>
/\n|\r/ <|push_token(ILLEGAL)|>
"'" <|push_token(STRING)|>
@@ -234,5 +234,5 @@ catch_all <||continue>
# TODO find a way to generate the below rule
/\*+[^\/*]/ <||continue>
line_terminator <push_line_terminator||continue>
-eof <|skip_and_terminate|>
+eof <|{start_ = marker_; BACKWARD(); PUSH_TOKEN(Token::ILLEGAL);}|>
catch_all <||continue>
« no previous file with comments | « src/lexer/even-more-experimental-scanner.cc ('k') | tools/lexer_generator/code_generator.jinja » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698