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

Unified Diff: src/lexer/lexer_py.re

Issue 59403010: Experimental parser: easier to read rules and default 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/dfa.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 19c79844646d269c8af500e5730267303652634e..26e3f21065d71b4b5653be28855f0aec0c3af86e 100644
--- a/src/lexer/lexer_py.re
+++ b/src/lexer/lexer_py.re
@@ -27,170 +27,185 @@
whitespace_char = [ \t\v\f\r:ws:\240];
whitespace = whitespace_char+;
-identifier_start = [$_a-zA-Z:lit:];
-identifier_char = [$_a-zA-Z0-9:lit:];
-not_identifier_char = [^:identifier_char:];
-line_terminator = [\n\r]+;
+identifier_start = [$_a-zA-Z:lit:]; # TODO add relevant latin1 char codes
+identifier_char = [0-9:identifier_start:];
+line_terminator = [\n\r];
digit = [0-9];
hex_digit = [0-9a-fA-F];
maybe_exponent = ("e" [\-+]? digit+)?;
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); }
-<Normal> "catch" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::CATCH); }
-<Normal> "class" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "const" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::CONST); }
-<Normal> "continue" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::CONTINUE); }
-<Normal> "debugger" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::DEBUGGER); }
-<Normal> "default" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::DEFAULT); }
-<Normal> "delete" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::DELETE); }
-<Normal> "do" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::DO); }
-<Normal> "else" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::ELSE); }
-<Normal> "enum" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "export" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "extends" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "false" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FALSE_LITERAL); }
-<Normal> "finally" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FINALLY); }
-<Normal> "for" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FOR); }
-<Normal> "function" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUNCTION); }
-<Normal> "if" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::IF); }
-<Normal> "implements" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "import" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "in" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::IN); }
-<Normal> "instanceof" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::INSTANCEOF); }
-<Normal> "interface" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "let" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "new" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::NEW); }
-<Normal> "null" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::NULL_LITERAL); }
-<Normal> "package" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "private" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "protected" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "public" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "return" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::RETURN); }
-<Normal> "static" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_STRICT_RESERVED_WORD); }
-<Normal> "super" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::FUTURE_RESERVED_WORD); }
-<Normal> "switch" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::SWITCH); }
-<Normal> "this" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::THIS); }
-<Normal> "throw" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::THROW); }
-<Normal> "true" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::TRUE_LITERAL); }
-<Normal> "try" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::TRY); }
-<Normal> "typeof" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::TYPEOF); }
-<Normal> "var" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::VAR); }
-<Normal> "void" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::VOID); }
-<Normal> "while" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::WHILE); }
-<Normal> "with" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::WITH); }
-<Normal> "yield" not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::YIELD); }
-
-<Normal> "|=" { PUSH_TOKEN(Token::ASSIGN_BIT_OR); }
-<Normal> "^=" { PUSH_TOKEN(Token::ASSIGN_BIT_XOR); }
-<Normal> "&=" { PUSH_TOKEN(Token::ASSIGN_BIT_AND); }
-<Normal> "+=" { PUSH_TOKEN(Token::ASSIGN_ADD); }
-<Normal> "-=" { PUSH_TOKEN(Token::ASSIGN_SUB); }
-<Normal> "*=" { PUSH_TOKEN(Token::ASSIGN_MUL); }
-<Normal> "/=" { PUSH_TOKEN(Token::ASSIGN_DIV); }
-<Normal> "%=" { PUSH_TOKEN(Token::ASSIGN_MOD); }
-
-<Normal> "===" { PUSH_TOKEN(Token::EQ_STRICT); }
-<Normal> "==" { PUSH_TOKEN(Token::EQ); }
-<Normal> "=" { PUSH_TOKEN(Token::ASSIGN); }
-<Normal> "!==" { PUSH_TOKEN(Token::NE_STRICT); }
-<Normal> "!=" { PUSH_TOKEN(Token::NE); }
-<Normal> "!" { PUSH_TOKEN(Token::NOT); }
-
-<Normal> "//" :=> SingleLineComment
-<Normal> whitespace* "-->" { if (just_seen_line_terminator_) { YYSETCONDITION(kConditionSingleLineComment); goto yyc_SingleLineComment; } else { --cursor_; send(Token::DEC); start_ = cursor_; goto yyc_Normal; } }
-<Normal> "/*" :=> MultiLineComment
-<Normal> "<!--" :=> HtmlComment
-
-<Normal> ">>>=" { PUSH_TOKEN(Token::ASSIGN_SHR); }
-<Normal> ">>>" { PUSH_TOKEN(Token::SHR); }
-<Normal> "<<=" { PUSH_TOKEN(Token::ASSIGN_SHL); }
-<Normal> ">>=" { PUSH_TOKEN(Token::ASSIGN_SAR); }
-<Normal> "<=" { PUSH_TOKEN(Token::LTE); }
-<Normal> ">=" { PUSH_TOKEN(Token::GTE); }
-<Normal> "<<" { PUSH_TOKEN(Token::SHL); }
-<Normal> ">>" { PUSH_TOKEN(Token::SAR); }
-<Normal> "<" { PUSH_TOKEN(Token::LT); }
-<Normal> ">" { PUSH_TOKEN(Token::GT); }
-
-<Normal> number not_identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::NUMBER); }
-<Normal> number identifier_char { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
-
-<Normal> "(" { PUSH_TOKEN(Token::LPAREN); }
-<Normal> ")" { PUSH_TOKEN(Token::RPAREN); }
-<Normal> "[" { PUSH_TOKEN(Token::LBRACK); }
-<Normal> "]" { PUSH_TOKEN(Token::RBRACK); }
-<Normal> "{" { PUSH_TOKEN(Token::LBRACE); }
-<Normal> "}" { PUSH_TOKEN(Token::RBRACE); }
-<Normal> ":" { PUSH_TOKEN(Token::COLON); }
-<Normal> ";" { PUSH_TOKEN(Token::SEMICOLON); }
-<Normal> "." { PUSH_TOKEN(Token::PERIOD); }
-<Normal> "?" { PUSH_TOKEN(Token::CONDITIONAL); }
-<Normal> "++" { PUSH_TOKEN(Token::INC); }
-<Normal> "--" { PUSH_TOKEN(Token::DEC); }
-
-<Normal> "||" { PUSH_TOKEN(Token::OR); }
-<Normal> "&&" { PUSH_TOKEN(Token::AND); }
-
-<Normal> "|" { PUSH_TOKEN(Token::BIT_OR); }
-<Normal> "^" { PUSH_TOKEN(Token::BIT_XOR); }
-<Normal> "&" { PUSH_TOKEN(Token::BIT_AND); }
-<Normal> "+" { PUSH_TOKEN(Token::ADD); }
-<Normal> "-" { PUSH_TOKEN(Token::SUB); }
-<Normal> "*" { PUSH_TOKEN(Token::MUL); }
-<Normal> "/" { PUSH_TOKEN(Token::DIV); }
-<Normal> "%" { PUSH_TOKEN(Token::MOD); }
-<Normal> "~" { PUSH_TOKEN(Token::BIT_NOT); }
-<Normal> "," { PUSH_TOKEN(Token::COMMA); }
-
-<Normal> line_terminator { PUSH_LINE_TERMINATOR(); }
-<Normal> whitespace { SKIP(); }
-
-<Normal> "\"" :=> DoubleQuoteString
-<Normal> "'" :=> SingleQuoteString
-
-<Normal> identifier_start :=> Identifier
-<Normal> /\\u[0-9a-fA-F]{4}/ { if (ValidIdentifierStart()) { YYSETCONDITION(kConditionIdentifier); goto yyc_Identifier; } send(Token::ILLEGAL); start_ = cursor_; goto yyc_Normal; }
-<Normal> "\\" { PUSH_TOKEN(Token::ILLEGAL); }
-
-<Normal> eof { PUSH_EOF_AND_RETURN();}
-<Normal> any { PUSH_TOKEN(Token::ILLEGAL); }
-
-<DoubleQuoteString> "\\\\" { goto yyc_DoubleQuoteString; }
-<DoubleQuoteString> "\\\"" { goto yyc_DoubleQuoteString; }
-<DoubleQuoteString> "\"" { PUSH_TOKEN(Token::STRING);}
-<DoubleQuoteString> /\\\n\r?/ { goto yyc_DoubleQuoteString; }
-<DoubleQuoteString> /\\\r\n?/ { goto yyc_DoubleQuoteString; }
-<DoubleQuoteString> /\n/ => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
-<DoubleQuoteString> /\r/ => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
-<DoubleQuoteString> eof { TERMINATE_ILLEGAL(); }
-<DoubleQuoteString> any { goto yyc_DoubleQuoteString; }
-
-<SingleQuoteString> "\\" { goto yyc_SingleQuoteString; }
-<SingleQuoteString> "\\'" { goto yyc_SingleQuoteString; }
-<SingleQuoteString> "'" { PUSH_TOKEN(Token::STRING); }
-<SingleQuoteString> /\\\n\r?/ { goto yyc_SingleQuoteString; }
-<SingleQuoteString> /\\\r\n?/ { goto yyc_SingleQuoteString; }
-<SingleQuoteString> /\n/ => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
-<SingleQuoteString> /\r/ => Normal { PUSH_TOKEN_LOOKAHEAD(Token::ILLEGAL); }
-<SingleQuoteString> eof { TERMINATE_ILLEGAL(); }
-<SingleQuoteString> any { goto yyc_SingleQuoteString; }
-
-<Identifier> identifier_char+ { goto yyc_Identifier; }
-<Identifier> /\\u[0-9a-fA-F]{4}/ { if (ValidIdentifierPart()) { goto yyc_Identifier; } YYSETCONDITION(kConditionNormal); send(Token::ILLEGAL); start_ = cursor_; goto yyc_Normal; }
-<Identifier> "\\" { PUSH_TOKEN(Token::ILLEGAL); }
-<Identifier> any { PUSH_TOKEN_LOOKAHEAD(Token::IDENTIFIER); }
-
-<SingleLineComment> line_terminator { PUSH_LINE_TERMINATOR();}
-<SingleLineComment> eof { start_ = cursor_ - 1; PUSH_TOKEN(Token::EOS); }
-<SingleLineComment> any { goto yyc_SingleLineComment; }
-
-<MultiLineComment> "*/" { PUSH_LINE_TERMINATOR();}
-<MultiLineComment> eof { start_ = cursor_ - 1; PUSH_TOKEN(Token::EOS); }
-<MultiLineComment> any { goto yyc_MultiLineComment; }
-
-<HtmlComment> "-->" { PUSH_LINE_TERMINATOR();}
-<HtmlComment> line_terminator+ { PUSH_LINE_TERMINATOR();}
-<HtmlComment> eof { start_ = cursor_ - 1; PUSH_TOKEN(Token::EOS); }
-<HtmlComment> any { goto yyc_HtmlComment; }
+<default>
+"|=" { PUSH_TOKEN(ASSIGN_BIT_OR); }
+"^=" { PUSH_TOKEN(ASSIGN_BIT_XOR); }
+"&=" { PUSH_TOKEN(ASSIGN_BIT_AND); }
+"+=" { PUSH_TOKEN(ASSIGN_ADD); }
+"-=" { PUSH_TOKEN(ASSIGN_SUB); }
+"*=" { PUSH_TOKEN(ASSIGN_MUL); }
+"/=" { PUSH_TOKEN(ASSIGN_DIV); }
+"%=" { PUSH_TOKEN(ASSIGN_MOD); }
+
+"===" { PUSH_TOKEN(EQ_STRICT); }
+"==" { PUSH_TOKEN(EQ); }
+"=" { PUSH_TOKEN(ASSIGN); }
+"!==" { PUSH_TOKEN(NE_STRICT); }
+"!=" { PUSH_TOKEN(NE); }
+"!" { PUSH_TOKEN(NOT); }
+
+"//" <<SingleLineComment>> # TODO save offset?
+"/*" <<MultiLineComment>>
+"<!--" <<HtmlComment>>
+#whitespace* "-->" { if (just_seen_line_terminator_) { YYSETCONDITION(kConditionSingleLineComment); goto yyc_SingleLineComment; } else { --cursor_; send(Token::DEC); start_ = cursor_; goto yyc_Normal; } }
+
+">>>=" { PUSH_TOKEN(ASSIGN_SHR); }
+">>>" { PUSH_TOKEN(SHR); }
+"<<=" { PUSH_TOKEN(ASSIGN_SHL); }
+">>=" { PUSH_TOKEN(ASSIGN_SAR); }
+"<=" { PUSH_TOKEN(LTE); }
+">=" { PUSH_TOKEN(GTE); }
+"<<" { PUSH_TOKEN(SHL); }
+">>" { PUSH_TOKEN(SAR); }
+"<" { PUSH_TOKEN(LT); }
+">" { PUSH_TOKEN(GT); }
+
+number { PUSH_TOKEN(NUMBER); }
+# number identifier_char { PUSH_TOKEN(ILLEGAL); }
+
+"(" { PUSH_TOKEN(LPAREN); }
+")" { PUSH_TOKEN(RPAREN); }
+"[" { PUSH_TOKEN(LBRACK); }
+"]" { PUSH_TOKEN(RBRACK); }
+"{" { PUSH_TOKEN(LBRACE); }
+"}" { PUSH_TOKEN(RBRACE); }
+":" { PUSH_TOKEN(COLON); }
+";" { PUSH_TOKEN(SEMICOLON); }
+"." { PUSH_TOKEN(PERIOD); }
+"?" { PUSH_TOKEN(CONDITIONAL); }
+"++" { PUSH_TOKEN(INC); }
+"--" { PUSH_TOKEN(DEC); }
+
+"||" { PUSH_TOKEN(OR); }
+"&&" { PUSH_TOKEN(AND); }
+
+"|" { PUSH_TOKEN(BIT_OR); }
+"^" { PUSH_TOKEN(BIT_XOR); }
+"&" { PUSH_TOKEN(BIT_AND); }
+"+" { PUSH_TOKEN(ADD); }
+"-" { PUSH_TOKEN(SUB); }
+"*" { PUSH_TOKEN(MUL); }
+"/" { PUSH_TOKEN(DIV); }
+"%" { PUSH_TOKEN(MOD); }
+"~" { PUSH_TOKEN(BIT_NOT); }
+"," { PUSH_TOKEN(COMMA); }
+
+line_terminator+ { PUSH_LINE_TERMINATOR(); }
+whitespace <<continue>>
+
+"\"" <<DoubleQuoteString>> # TODO mark these transitions as ignoring this character
+"'" <<SingleQuoteString>>
+
+identifier_start <<Identifier>> # TODO merge identifier dfa...
+/\\u[0-9a-fA-F]{4}/ {
+ if (V8_LIKELY(ValidIdentifierStart())) {
+ JUMP(Identifier);
+ }
+ PUSH_TOKEN(ILLEGAL);
+}
+
+eof <<terminate>>
+default { PUSH_TOKEN(ILLEGAL); }
+
+<DoubleQuoteString>
+"\\" <<continue>>
+"\\\"" <<continue>>
+"\"" { PUSH_TOKEN(STRING); } <<break>>
+/\\\n\r?/ <<continue>>
+/\\\r\n?/ <<continue>>
+/\n\r/ { PUSH_TOKEN(ILLEGAL); } <<break>>
+eof <<terminate_illegal>>
+default <<continue>>
+
+<SingleQuoteString>
+"\\" <<continue>>
+"\\'" <<continue>>
+"'" { PUSH_TOKEN(STRING); } <<break>>
+/\\\n\r?/ <<continue>>
+/\\\r\n?/ <<continue>>
+/\n\r/ { PUSH_TOKEN(ILLEGAL); } <<break>>
+eof <<terminate_illegal>>
+default <<continue>>
+
+<Identifier>
+identifier_char+ <<continue>>
+/\\u[0-9a-fA-F]{4}/ {
+ if (V8_UNLIKELY(!ValidIdentifierStart())) {
+ PUSH_TOKEN(ILLEGAL);
+ JUMP(Normal);
+ }
+}
+default { PUSH_TOKEN(IDENTIFIER); } <<break>>
+
+<SingleLineComment>
+line_terminator { PUSH_LINE_TERMINATOR(); } <<break>>
+eof <<terminate>>
+default <<continue>>
+
+<MultiLineComment>
+"*/" <<break>>
+line_terminator+ { PUSH_LINE_TERMINATOR(); }
+eof <<terminate>>
+default <<continue>>
+
+<HtmlComment>
+"-->" <<break>>
+line_terminator+ { PUSH_LINE_TERMINATOR(); }
+eof <<terminate>>
+default <<continue>>
+
+<default>
+# all keywords
+"break" { PUSH_TOKEN(BREAK); } <<break>>
+"case" { PUSH_TOKEN(CASE); } <<break>>
+"catch" { PUSH_TOKEN(CATCH); } <<break>>
+"class" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"const" { PUSH_TOKEN(CONST); } <<break>>
+"continue" { PUSH_TOKEN(CONTINUE); } <<break>>
+"debugger" { PUSH_TOKEN(DEBUGGER); } <<break>>
+"default" { PUSH_TOKEN(DEFAULT); } <<break>>
+"delete" { PUSH_TOKEN(DELETE); } <<break>>
+"do" { PUSH_TOKEN(DO); } <<break>>
+"else" { PUSH_TOKEN(ELSE); } <<break>>
+"enum" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"export" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"extends" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"false" { PUSH_TOKEN(FALSE_LITERAL); } <<break>>
+"finally" { PUSH_TOKEN(FINALLY); } <<break>>
+"for" { PUSH_TOKEN(FOR); } <<break>>
+"function" { PUSH_TOKEN(FUNCTION); } <<break>>
+"if" { PUSH_TOKEN(IF); } <<break>>
+"implements" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"import" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"in" { PUSH_TOKEN(IN); } <<break>>
+"instanceof" { PUSH_TOKEN(INSTANCEOF); } <<break>>
+"interface" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"let" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"new" { PUSH_TOKEN(NEW); } <<break>>
+"null" { PUSH_TOKEN(NULL_LITERAL); } <<break>>
+"package" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"private" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"protected" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"public" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"return" { PUSH_TOKEN(RETURN); } <<break>>
+"static" { PUSH_TOKEN(FUTURE_STRICT_RESERVED_WORD); } <<break>>
+"super" { PUSH_TOKEN(FUTURE_RESERVED_WORD); } <<break>>
+"switch" { PUSH_TOKEN(SWITCH); } <<break>>
+"this" { PUSH_TOKEN(THIS); } <<break>>
+"throw" { PUSH_TOKEN(THROW); } <<break>>
+"true" { PUSH_TOKEN(TRUE_LITERAL); } <<break>>
+"try" { PUSH_TOKEN(TRY); } <<break>>
+"typeof" { PUSH_TOKEN(TYPEOF); } <<break>>
+"var" { PUSH_TOKEN(VAR); } <<break>>
+"void" { PUSH_TOKEN(VOID); } <<break>>
+"while" { PUSH_TOKEN(WHILE); } <<break>>
+"with" { PUSH_TOKEN(WITH); } <<break>>
+"yield" { PUSH_TOKEN(YIELD); } <<break>>
« no previous file with comments | « no previous file | tools/lexer_generator/dfa.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698