[antlr-interest] Anybody tried to parse a Yacc grammar to Ant lr?

Bryan Ewbank ewbank at gmail.com
Thu Aug 4 12:55:02 PDT 2005


My $0.02:

I don't think translating a general yacc /program/ is practical - a
/grammar/, perhaps, but that means no actions anywhere.  That's
interesting in theory, but not really of that much practical value.

The other side of this is that you want the people maintaining the
code to know ANTLR at the end, as well - therefore, it may be of more
benefit to have them learn ANTLR, and then translate (by hand) the
yacc /programs/.

Having the people learn the idioms for yacc's "left recursion" and
"right recursion", as well as how precedence is handled in Antlr, will
go many miles towards having a maintainable product when you are
finished - instead of a generated pile of code that no one
understands.

- Bryan Ewbank

On 8/4/05, Jim O'Connor <Jim.O'Connor at microfocus.com> wrote:
> A converter to transport a yacc grammar to an Antlr grammar
> might be helpful.  Some on this list have attempted going from one "style"
> or another  to Antlr....
> 
> -----Original Message-----
>  From: Barry McGillin [mailto:barry.mcgillin at oracle.com] 
> 
> We want to convert some of our yacc gramamars to Antlr?  Is there such a
> thing as a parser for this or is a hand crafted experience? :-)


More information about the antlr-interest mailing list