[antlr-interest] [solved] Generate a grammar rule without actions, assignments etc.

Terence Parr parrt at cs.usfca.edu
Thu Feb 5 15:26:32 PST 2009


We'll have a better version soon.
Ter
On Feb 5, 2009, at 5:59 AM, Paul Bouché (NSN) wrote:

> I thought about that already, actually that would be a string template
> or rewriter project, I could use the existent antlr grammar parser for
> that, the AntlrTool has a switch -print which I tried with 2.7.7 and  
> it
> did not what I wanted. But actually in 3.0 it works =)
>
> So simply one uses
> org.antlr.Tool -print <path to grammar file>
>
> Priolo, Scott schrieb:
>> You could write a grammar that does this work for you.  (sort of a  
>> grammar that documents grammars).  Sounds like a great project.
>>
>> -----Original Message-----
>> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org 
>> ] On Behalf Of "Paul Bouché (NSN)"
>> Sent: Thursday, February 05, 2009 8:34 AM
>> To: antlr-interest at antlr.org
>> Subject: [antlr-interest] Generate a grammar rule without  
>> actions,assignments etc.
>>
>> Hi,
>>
>> is there already a tool or "hidden function" with ANTLRWorks to  
>> generate
>> a "clean" grammar from a given ANTLR grammar, i.e. one which  
>> basically
>> only contains the parsre and lexer rules.
>> I would like to use that for documentation purposes.
>>
>> Best,
>> Paul
>>
>>
>
>
> -- 
> Paul Bouché
> Voice: +49 30 590080-1284
>
> Nokia Siemens Networks GmbH & Co. KG, An den Treptowers 1, 12435  
> Berlin, Germany
> Sitz der Gesellschaft: München / Registered office: Munich
> Registergericht: München / Commercial registry: Munich, HRA 88537
> WEEE-Reg.-Nr.: DE 52984304
>
> Persönlich haftende Gesellschafterin / General Partner: Nokia  
> Siemens Networks Management GmbH
> Geschäftsleitung / Board of Directors: Lydia Sommer, Olaf Horsthemke
> Vorsitzender des Aufsichtsrats / Chairman of supervisory board:  
> Lauri Kivinen
> Sitz der Gesellschaft: München / Registered office: Munich
> Registergericht: München / Commercial registry: Munich, HRB 163416
>
>
> 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