[o:XML] Re: SIDE NOTE: CIL Schema
Martin Klang
martin at hack.org
Mon Jan 10 12:25:48 UTC 2005
On 10 Jan 2005, at 11:39, Frank Raiser wrote:
> On Sun, Jan 09, 2005 at 05:56:51PM +0000, Martin Klang wrote:
>> I'm currently playing around with the Antlr
>> parser generator, and its Java grammar in particular - I'm looking at
>> ways of making it generate XML output from its AST.
> I'm not sure if you have seen it already, so I'll just keep this
> posting short: Take a look at the parser-java module of SrcML.
Yes, this will be my first line of attack! Looks like you've solved
most, probably all, of the problems already.
As for playing around with Antlr, I had the crazy idea of describing
the output XML in the actual grammar, either by extending the grammar
vocabulary (the grammar grammar!) with XML output directives, or by
parsing the grammar to XML format, manually include output nodes in
this grammar, then transform it back into Antlr format plus XML
generating code. Or something like that.
With the grammar in XML format, it's easy to write tools that eg
eliminate left recursion (see YAPP on the o-xml web site).
Anyhow... too many crazy ideas, too little time in the day!
Thanks for the mail, and thanks for the work you've done on SrcML -
it'll make my life easier!
regards,
/m
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
More information about the o-xml
mailing list