Hi guys,
I tried to transform the following parse tree:
{:ae=>
[{:term=>{:factor=>{:ident=>"a"@0}}},
{:plus=>"+ "@2,
:term1=>
[{:factor=>{:ident=>"b"@4}},
{:mult=>"* "@6, :factor1=>{:ident=>"c"@8}}]}]}
One of the transformation rules I applied is:
@t.rule(:factor1 => simple(:str)) { str
puts "Test Factor1"
str
}
And the result after the transformation is:
{:ae=>
["a"@0, {:plus=>"+ "@2, :term1=>["b"@4, {:mult=>"* "@6, :factor1=>"c"@8}]}]}
However, I expected in the output: "Test Factor1" but it did not.
It seems if this rule was not or ( could not be) applied.
Can anyone explain why it did not?
Thanks in advance ,
Thiel