Parrot update Parrot update #32

calc example -- test parsing

$ make
$ parrot calc.pbc --target=parse
> 3 + 4
"parse" => PMC 'Calc::Grammar' => "3 + 4\n" @ 0 {
     <statement> => ResizablePMCArray (size:1) [
         PMC 'Calc::Grammar' => "3 + 4\n" @ 0 {
             <term> => ResizablePMCArray (size:2) [
                 PMC 'Calc::Grammar' => "3" @ 0,
                 PMC 'Calc::Grammar' => "4" @ 4
             ]
             <addop> => PMC 'Calc::Grammar' => "+" @ 2
         }
     ]
 }
continued...
Copyright © 2008
http://www.pmichaud.com/2008/pres/