[antlr-interest] BNF to ANTLR

Jim Idle jimi at temporal-wave.com
Wed Nov 4 11:07:18 PST 2009


Yeah - the thing is though, that you then don't really learn anything about what you are doing. Unless of course you write the translator in ANTLR first ;-)

Jim

> -----Original Message-----
> From: Loring Craymer [mailto:lgcraymer at yahoo.com]
> Sent: Wednesday, November 04, 2009 11:05 AM
> To: Jim Idle; antlr-interest at antlr.org
> Subject: Re: [antlr-interest] BNF to ANTLR
> 
> Actually, this is easier to do automatically.  Any BNF dialect takes
> about 2 pages for parser + lexer description of the BNF in ANTLR; it is
> very easy to write a translator from one BNF dialect to another
> (ANTLR).  You will still have to rework the resulting grammar.
> 
> --Loring
> 
> 
> 
> ----- Original Message ----
> > From: Jim Idle <jimi at temporal-wave.com>
> > To: "antlr-interest at antlr.org" <antlr-interest at antlr.org>
> > Sent: Wed, November 4, 2009 8:05:12 AM
> > Subject: Re: [antlr-interest] BNF to ANTLR
> >
> > Much better to do it by hand. ANTLRs EBNF notation is close, but
> remember that
> > ANTLR is LL() and not LALR, which most bnf definitions from normative
> specs are
> > aimed at. Use ANTLRWorks and build slowly and you should pick it up
> quite
> > quickly if you understand BNF well.
> >
> > Jim
> >
> > > -----Original Message-----
> > > From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> > > bounces at antlr.org] On Behalf Of Stefan Frey
> > > Sent: Wednesday, November 04, 2009 6:33 AM
> > > To: antlr-interest at antlr.org
> > > Subject: [antlr-interest] BNF to ANTLR
> > >
> > > Hi im quite new to ANTLR and compiler generation.
> > > I have a grammer written in BNF and need to convert it
> > > to the Format ANTLR supports. So ist there a better/quicker
> > > solution than by doing it by hand?
> > >
> > > Cheers Stefan
> > >
> > > List: http://www.antlr.org/mailman/listinfo/antlr-interest
> > > Unsubscribe: http://www.antlr.org/mailman/options/antlr-
> interest/your-
> > > email-address
> >
> >
> >
> >
> > 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