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

Unified Diff: tools/lexer_generator/nfa.py

Issue 152823002: Experimental parser: use sentinal values for actions (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 | « tools/lexer_generator/lexer_test.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/nfa.py
diff --git a/tools/lexer_generator/nfa.py b/tools/lexer_generator/nfa.py
index fd791864b8a379d6074a70b8663d65343fce550b..2367630b76b711cea0725b5df5e1083e276f3ca8 100644
--- a/tools/lexer_generator/nfa.py
+++ b/tools/lexer_generator/nfa.py
@@ -35,7 +35,7 @@ class NfaState(AutomatonState):
self.__transitions = {}
self.__unclosed = set()
self.__epsilon_closure = None
- self.__action = None
+ self.__action = Action.empty_action()
def transitions_to_multiple_states(self):
return True
@@ -55,6 +55,7 @@ class NfaState(AutomatonState):
def set_action(self, action):
assert not self.is_closed()
assert not self.__action
+ assert isinstance(action, Action)
self.__action = action
def transitions(self):
« no previous file with comments | « tools/lexer_generator/lexer_test.py ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698