[antlr-interest] antlr gramma versus yacc grammar

Vaclav Barta vbar at comp.cz
Wed Nov 21 10:07:26 PST 2007


On Tuesday 20 November 2007 23:42:21 Kevin J. Cummings wrote:
> Mathew Yeates wrote:
> > I haven't found mention of yacc yet in the book. How do yacc and antlr
> > differ?
> YACC is LALR(1) (or almost LALR(1)), while ANTLR is LL(k).
...
> > I have found a fortran 77 yacc/lex grammar as part of the f2c package at
> > netlib. How difficult is it to turn this into a antlr grammar? I know
> > ... Someone write a translator!!
> Shouldn't be too difficult, and it should be a straight-forward problem
> to solve.  Let us know where you get stuck, and we can help.
Well, AFAIK there are LALR(1) grammars which aren't LL(k), so a general 
translator would be non-trivial :-) - much easier to stick to the specific 
grammar...

	Bye
		Vasek
--
Open Source integration
http://www.mangrove.cz/


More information about the antlr-interest mailing list