Author: pmichaud
Date: Fri Jul  6 11:32:42 2007
New Revision: 19647

Modified:
   trunk/compilers/pge/PGE/OPTable.pir
   trunk/languages/punie/lib/ASTGrammar.tg

Log:
[pge]:
* Add <top> element to nodes returned from operator precedence parser.


Modified: trunk/compilers/pge/PGE/OPTable.pir
==============================================================================
--- trunk/compilers/pge/PGE/OPTable.pir (original)
+++ trunk/compilers/pge/PGE/OPTable.pir Fri Jul  6 11:32:42 2007
@@ -540,6 +540,7 @@
     $P0 = token["name"]
     $P0 = clone $P0
     oper['type'] = $P0
+    oper['top'] = token
   token_match_end:
     ret
 

Modified: trunk/languages/punie/lib/ASTGrammar.tg
==============================================================================
--- trunk/languages/punie/lib/ASTGrammar.tg     (original)
+++ trunk/languages/punie/lib/ASTGrammar.tg     Fri Jul  6 11:32:42 2007
@@ -503,6 +503,8 @@
       shift $S2, $P0             # get key for next entry
       # skip 'type' keys added by the operator precedence parser
       if $S2 == 'type' goto iter_loop 
+      # skip 'top' keys added by the operator precedence parser
+      if $S2 == 'top' goto iter_loop 
       $P2 = $P0[$S2]      # get entry at current key
       $S2 = concat 'PunieGrammar::', $S2
       $P3 = tree.get('past', $P2, $S2)

Reply via email to