[antlr-interest] Bash Grammer

Loring Craymer craymer at warpiv.com
Thu May 11 21:47:19 PDT 2006


Given that there is a yacc grammar in the GNU bash distro, the easiest
approach is probably to write a yacc-to-antlr BNF translator (easier than
editing a 4 KLOC .y file) and go from there.

>From the level of opposition to the idea, I would tend to believe that there
is a fortune to be made from developing a bash grammar and translator.  I
don't see it--a perl translator seems more likely to be viable--but that
could be me.

--Loring

> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Sohail Somani
> Sent: Thursday, May 11, 2006 7:30 AM
> To: Martin Probst
> Cc: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Bash Grammer
> 
> Phew, I thought I was the only one :)
> 
> On Thu, 2006-05-11 at 15:55 +0200, Martin Probst wrote:
> > Hi,
> >
> > I've not heard of one and there is none on the ANTLR grammar page.
> > However I would think that this might be the most horrible language
> > to parse on earth. There is nothing as inconsequent, ambiguous and
> > plain senseless as the standard "sh" language. I would really pity
> > anyone having to write a grammar for that.
> >
> > Martin
> >
> > Am 11.05.2006 um 14:03 schrieb Henry Butowsky:
> >
> > > Hi Guys,
> > > Out of interst has anybody done a bash (sh)  grammer with  ANTLR --
> > > Could be an interesting project ?
> > >
> > > Regards Henry
> > >
> > >
> >




More information about the antlr-interest mailing list