Parrot Compiler Tools Parrot Compiler Tools #15

Build compiler and test parsing

$ ./parrot -o abc.pbc abc.pir        # build abc compiler

$ ./parrot abc.pbc --target=parse    # test parse
> 3 + 4
"parse" => PMC 'ABC::Grammar' => "3 + 4\n" @ 0 {
    <statement> => PMC 'ABC::Grammar' => "3 + 4\n" @ 0 {
        <term> => ResizablePMCArray (size:2) [
            PMC 'ABC::Grammar' => "3" @ 0,
            PMC 'ABC::Grammar' => "4" @ 4
        ]
        <addop> => PMC 'ABC::Grammar' => "+" @ 2
    }
}
Copyright © 2007 Patrick Michaud