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

Unified Diff: src/lexer/lexer_py.re

Issue 69293005: Experimental parser: add catch all rule (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 | « no previous file | tools/lexer_generator/automata_test.py » ('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 37c9462c24076106929c882c10982935f5f9cbc3..902993bcd114c544baaf9a0a953bc87e16622c1f 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -163,24 +163,22 @@ eof <<terminate>>
default_action { PUSH_TOKEN(ILLEGAL); }
<DoubleQuoteString>
-"\\" <<continue>>
-"\\\"" <<continue>>
-"\"" { PUSH_TOKEN(STRING); }
/\\\n\r?/ <<continue>>
/\\\r\n?/ <<continue>>
-/\n|\r/ { PUSH_TOKEN(ILLEGAL); }
+/\\./ <<continue>>
+/\n|\r/ { PUSH_TOKEN(ILLEGAL); }
+"\"" { PUSH_TOKEN(STRING); }
eof <<terminate_illegal>>
-/./ <<continue>>
+catch_all <<continue>>
<SingleQuoteString>
-"\\" <<continue>>
-"\\'" <<continue>>
-"'" { PUSH_TOKEN(STRING); }
/\\\n\r?/ <<continue>>
/\\\r\n?/ <<continue>>
-/\n|\r/ { PUSH_TOKEN(ILLEGAL); }
+/\\./ <<continue>>
+/\n|\r/ { PUSH_TOKEN(ILLEGAL); }
+"'" { PUSH_TOKEN(STRING); }
eof <<terminate_illegal>>
-/./ <<continue>>
+catch_all <<continue>>
<Identifier>
identifier_char <<continue>>
@@ -194,18 +192,21 @@ default_action { PUSH_TOKEN(IDENTIFIER); }
<SingleLineComment>
line_terminator { PUSH_LINE_TERMINATOR(); }
eof <<terminate>>
-/./ <<continue>>
+catch_all <<continue>>
<MultiLineComment>
"*/" { SKIP(); }
+/\*./ <<continue>>
# need to force action
line_terminator+ { PUSH_LINE_TERMINATOR(); } <<continue>>
eof <<terminate>>
-/./ <<continue>>
+catch_all <<continue>>
<HtmlComment>
"-->" { SKIP(); }
+/--./ <<continue>>
+/-./ <<continue>>
marja 2013/11/12 08:45:02 Why are these two needed?
dcarney 2013/11/12 09:03:59 otherwise the string "<!-- --k" would produce an i
# need to force action
line_terminator+ { PUSH_LINE_TERMINATOR(); } <<continue>>
eof <<terminate>>
-/./ <<continue>>
+catch_all <<continue>>
« no previous file with comments | « no previous file | tools/lexer_generator/automata_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698