Author: bernhard
Date: Fri Mar 30 13:43:27 2007
New Revision: 17867
Modified:
trunk/languages/plumhead/src/partridge/PlumheadPAST.tg
Log:
[Plumhead partridge]
Simplify the TGE grammar
and get a strange failure of strings_1.php
Modified: trunk/languages/plumhead/src/partridge/PlumheadPAST.tg
==============================================================================
--- trunk/languages/plumhead/src/partridge/PlumheadPAST.tg (original)
+++ trunk/languages/plumhead/src/partridge/PlumheadPAST.tg Fri Mar 30
13:43:27 2007
@@ -79,37 +79,26 @@
past = new 'PAST::Stmts'
past.'init'( 'node' => node )
+ .local pmc cnode, past_else_block, past_condition, past_expression
+ .local pmc past_var, past_array_elem, past_assign, past_rel_expression
+ .local pmc past_echo, past_var_dump, past_if, past_if_block, past_sea
+
$P0 = node['statement']
if null $P0 goto handled_statement
.local pmc statement_iter
statement_iter = new .Iterator, $P0
iter_loop:
unless statement_iter goto iter_end
- .local pmc cnode, past_else_block, past_condition,
past_expression, past_var, past_array_elem, past_assign, past_rel_expression,
past_echo, past_var_dump, past_if, past_if_block, past_sea
+
cnode = shift statement_iter
- if null cnode goto iter_loop
$P1 = cnode['ECHO']
if null $P1 goto no_echo
$P3 = cnode[0]
- $P2 = $P3['expression']
- if null $P2 goto no_expression_in_echo
- past_expression = tree.'get'('past', $P2,
'Plumhead::Grammar::expression')
- if null past_expression goto iter_loop
- past_echo = new 'PAST::Op'
- past_echo.'init'( past_expression, 'node'=> node,
'name' => 'print' )
- past.'push'(past_echo)
- goto iter_loop
- no_expression_in_echo:
- $P2 = $P3['PHP_SAPI_NAME']
- if null $P2 goto no_php_sapi_name_in_echo
- past_expression = tree.'get'('past', $P3,
'Plumhead::Grammar::expression')
- if null past_expression goto iter_loop
- past_echo = new 'PAST::Op'
- past_echo.'init'( past_expression, 'node'=> node,
'name' => 'print' )
- past.'push'(past_echo)
- goto iter_loop
- no_php_sapi_name_in_echo:
+ past_expression = tree.'get'('past', $P3,
'Plumhead::Grammar::expression')
+ past_echo = new 'PAST::Op'
+ past_echo.'init'( past_expression, 'node'=> node, 'name'
=> 'print' )
+ past.'push'(past_echo)
goto iter_loop
no_echo: