I've checked in the code to transform PunieGrammar match objects into
AST trees. The core pieces are:
- A tree grammar for the transformation in languages/punie/lib/
pge2past.g
- A series of AST node classes in languages/punie/lib/PAST/
- A script that parses a Punie source file, transforms the match
result into an AST tree, and dumps the tree in a text format for
verification. This is named punie2.pir, because it's still not far
enough along to replace punie.pir.
If you want to play with it, run it in languages/punie as:
parrot punie2.pir demo.p1
The current set of PAST node types is inspired by Pugs' PIL, but has
some significant differences.
Allison