in reply to Parse Tree Export (as XML?)
Lisp already does something like this, where almost everything is a list.
Note however that your example is not quite fully XMLized. I would spell that:
<program> <function name="hello" prototype=""> <call function="print"> <argument><string data="Hello world\n"/> </argument></call></function> <call function="hello"></call> </program>
But note that this is a lot harder to type and read than
#!/usr/bin/perl sub hello { print "Hello world\n" } hello();
So one would not want to enter code as XML. I agree that having access to the parse tree would be good, through perl itself -- once the program was parsed perl would, given an appropriate option, spit out the parse tree in some form. I'm not sure that that form should optimally be XML, though, but it's a possibility.
|
|---|