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

Unified Diff: tools/lexer_generator/rule_lexer.py

Issue 68343004: Experimental parser: better actions (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 | « tools/lexer_generator/nfa.py ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/rule_lexer.py
diff --git a/tools/lexer_generator/rule_lexer.py b/tools/lexer_generator/rule_lexer.py
index f839ca4fd8f768527535d19994eb18468f27a70e..3fa1efed8639021ee365d6969a5df9fc485fa191 100644
--- a/tools/lexer_generator/rule_lexer.py
+++ b/tools/lexer_generator/rule_lexer.py
@@ -31,6 +31,7 @@ class RuleLexer:
tokens = (
'DEFAULT',
+ 'DEFAULT_ACTION',
'IDENTIFIER',
'STRING',
'REGEX',
@@ -70,6 +71,8 @@ class RuleLexer:
r'[a-zA-Z][a-zA-Z0-9_]*'
if t.value == 'default':
t.type = 'DEFAULT'
+ if t.value == 'default_action':
+ t.type = 'DEFAULT_ACTION'
return t
t_STRING = r'"((\\("|\w|\\))|[^\\"])+"'
« no previous file with comments | « tools/lexer_generator/nfa.py ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698