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

Unified Diff: tools/lexer_generator/rule_parser.py

Issue 160443002: Experimental parser: remove match actions (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 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 | « tools/lexer_generator/regex_parser.py ('k') | tools/lexer_generator/transition_keys.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/lexer_generator/rule_parser.py
diff --git a/tools/lexer_generator/rule_parser.py b/tools/lexer_generator/rule_parser.py
index c1178693f8d4454717c59ff32bab334f92164538..64cd878b820b896390d4a090cbd424a1888c9c19 100644
--- a/tools/lexer_generator/rule_parser.py
+++ b/tools/lexer_generator/rule_parser.py
@@ -188,10 +188,8 @@ class RuleParser:
tree = Term.empty_term()
else:
tree = p[1] # regex case
- # handle actions
- if entry_action or match_action:
- tree = NfaBuilder.add_action(
- tree, Action(entry_action, match_action, precedence))
+ # install actions
+ tree = NfaBuilder.add_action(tree, entry_action, match_action, precedence)
# handle transitions
if not transition:
pass
@@ -409,4 +407,4 @@ class RuleProcessor(object):
parser_state.encoding, parser_state.character_classes, rule_map, name)
# process default_action
default_action = parser_state.rules['default']['default_action']
- self.__default_action = Action(Term.empty_term(), default_action)
+ self.__default_action = Action(default_action, 0)
« no previous file with comments | « tools/lexer_generator/regex_parser.py ('k') | tools/lexer_generator/transition_keys.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698