Revision: 17732
Author:   [email protected]
Date:     Thu Nov 14 10:58:08 2013 UTC
Log:      Experimental parser: fix up action_type display

[email protected]

BUG=

Review URL: https://codereview.chromium.org/66163014
http://code.google.com/p/v8/source/detail?r=17732

Modified:
 /branches/experimental/parser/tools/lexer_generator/automaton.py
 /branches/experimental/parser/tools/lexer_generator/code_generator.py

=======================================
--- /branches/experimental/parser/tools/lexer_generator/automaton.py Wed Nov 13 08:20:20 2013 UTC +++ /branches/experimental/parser/tools/lexer_generator/automaton.py Thu Nov 14 10:58:08 2013 UTC
@@ -137,8 +137,9 @@
       if node.action():
         action = node.action()
         if action.type() == 'code':
-          # assert action.data()
           action_text = action.data()
+        elif action.type() == 'push_token':
+          action_text = "token(" + action.data() + ")"
         else:
           action_text = action.type()
         action_text = escape(action_text)
=======================================
--- /branches/experimental/parser/tools/lexer_generator/code_generator.py Thu Nov 14 10:46:34 2013 UTC +++ /branches/experimental/parser/tools/lexer_generator/code_generator.py Thu Nov 14 10:58:08 2013 UTC
@@ -92,8 +92,9 @@
         code += '%s\nBACK();\ngoto code_%s;\n' % (action.data(),
                                                   start_node_number)
       elif action.type() == 'push_token':
-        #TODO
-        pass
+        content = 'PUSH_TOKEN(Token::%s);' % action.data()
+        code += '%s\nBACK();\ngoto code_%s;\n' % (content,
+                                                  start_node_number)
       else:
         raise Exception("unknown type %s" % action.type())
     else:

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to