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

Unified Diff: src/lexer/lexer_py.re

Issue 144603003: Experimental parser: better eos handling (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 11 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 | 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 328fda5e863c8ec3b8a946a0030a8ca5d53265bf..dede8a47f3fa1a8efef47b08b1718b177fe48c2e 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -51,7 +51,6 @@ number =
non_octal_whole_part /(\.[:digit:]*)?/ maybe_exponent );
harmony_number = "0"[bBoO][:digit:]+;
line_terminator_sequence = /[:line_terminator:]|(\r\n|\n\r)/;
-eos = [:eos:];
# Rules.
@@ -197,7 +196,7 @@ line_terminator+ <|line_terminator|>
identifier_start <|token(IDENTIFIER)|Identifier>
/\\u[:hex_digit:]{4}/ <check_escaped_identifier_start|token(IDENTIFIER)|Identifier>
-eos <|terminate|>
+eos <terminate>
default_action <do_token_and_go_forward(ILLEGAL)>
<<DoubleQuoteString>>
@@ -211,8 +210,8 @@ default_action <do_token_and_go_forward(ILLEGAL)>
"\\" <|token(ILLEGAL)|>
line_terminator <|token(ILLEGAL)|>
"\"" <|token(STRING)|>
-eos <|terminate_illegal|>
catch_all <||continue>
+eos <terminate_illegal>
<<SingleQuoteString>>
# TODO subgraph for '\'
@@ -226,8 +225,8 @@ catch_all <||continue>
"\\" <|token(ILLEGAL)|>
line_terminator <|token(ILLEGAL)|>
"'" <|token(STRING)|>
-eos <|terminate_illegal|>
catch_all <||continue>
+eos <terminate_illegal>
<<Identifier>>
identifier_char <|token(IDENTIFIER)|continue>
@@ -235,7 +234,7 @@ identifier_char <|token(IDENTIFIER)|continue>
<<SingleLineComment>>
line_terminator <|line_terminator|>
-eos <|skip_and_terminate|>
+eos <skip_and_terminate>
catch_all <||continue>
<<MultiLineComment>>
@@ -243,5 +242,5 @@ catch_all <||continue>
# TODO find a way to generate the below rule
/\*+[^\/*]/ <||continue>
line_terminator <line_terminator_in_multiline_comment||continue>
-eos <|terminate_illegal|>
catch_all <||continue>
+eos <terminate_illegal>
« no previous file with comments | « no previous file | tools/lexer_generator/code_generator.jinja » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698