[antlr-interest] Extract all rules/lexems/keywords of a Language.g into XML format?

Terence Parr parrt at cs.usfca.edu
Thu Jun 9 14:37:53 PDT 2011


i have something like this but am not done. v4 will have a syntax highlighting editor as a standard widget.
T
On Jun 9, 2011, at 11:52 AM, Ruslan Zasukhin wrote:

> Hi All,
> Hi Terrence,
> 
> We have meet task, where we may want be able extract from
>    ANY ANTLR grammar
> 
> Description of all Rules, Keywords, Lexems, Imaginary Tokens ...
> and put that info into e.g. XML format.
> 
> 
> Actually this can be considered as transformation of ANTLR grammar into XML
> form.
> 
> I believe will be possible and reverse task ... That XML back into ANTLR .g
> grammar.
> 
> 
> -------
> We think next way is possible:
> 
> * you already have PARSER of any ANTLR grammar.
> 
> * it parses .g grammar and produce AST...
> 
> * it looks not to be difficult walk by that AST and output XML in this or
> that form ...
> 
> * Or may be string templates can be used ...
> 
> * actually you already produce C, Java, C# outputs for a grammar.g
> Why not add XML - as a general format?
> 
> What you think?
> 
> 
> 
> ----------
> Also we have see cTag tools, which can parse many languages,
> And produce text output even without XML.
> As you may know this tool targeted as Editor App helper library.
> 
> But I think, why ANTLR cannot be improved to produce similar output,
> and kill cTag as a project :-)
> 
> 
> --------
> Another example of special but not wide tool is GCC-XML
>    http://www.gccxml.org/HTML/Index.html
> 
> 
> IMO, will be great to extend ANTLR in this way.
> This will open new roads for its usage probably.
> 
> And this can be for us - users of ANTLR as easy as
> 
>    Option output = XML
> 
> 
> What you think ?
> 
> 
> 
> 
> 
> -- 
> Best regards,
> 
> Ruslan Zasukhin
> VP Engineering and New Technology
> Paradigma Software, Inc
> 
> Valentina - Joining Worlds of Information
> http://www.paradigmasoft.com
> 
> [I feel the need: the need for speed]
> 
> 
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list