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

Unified Diff: tools/lexer_generator/lexer_test.py

Issue 152513004: Experimental parser: some tuple removal (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/dfa_optimizer.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/lexer_test.py
diff --git a/tools/lexer_generator/lexer_test.py b/tools/lexer_generator/lexer_test.py
index 7b90c6f71f03fa4b5877dfbdf59949cf3ad89599..386de463205cfda8815ed33e91d3e23fead5c843 100644
--- a/tools/lexer_generator/lexer_test.py
+++ b/tools/lexer_generator/lexer_test.py
@@ -26,13 +26,13 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import unittest
-from automaton import Action
+from automaton import Term, Action
from rule_parser import RuleProcessor
class LexerTestCase(unittest.TestCase):
def __verify_action_stream(self, rules, string, expected):
- expected = map(lambda (action, s) : (Action(None, (action, None)), s),
+ expected = map(lambda (action, s) : (Action(None, Term(action)), s),
expected)
rule_processor = RuleProcessor.parse(rules, 'latin1')
automata = rule_processor.default_automata()
@@ -44,7 +44,7 @@ class LexerTestCase(unittest.TestCase):
@staticmethod
def __terminate():
- return (Action(None, ('terminate', None)), '\0')
+ return ('terminate', '\0')
def test_simple(self):
rules = '''
« no previous file with comments | « tools/lexer_generator/dfa_optimizer.py ('k') | tools/lexer_generator/rule_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698