[antlr-interest] Re: PERL VS ANTLR
Terence Parr
parrt at jguru.com
Wed Jan 29 11:24:40 PST 2003
On Wednesday, January 29, 2003, at 11:10 AM, cintyram
<cintyram at yahoo.com> wrote:
> you are right, and i stand corrected ;
> my answer was not comprehensive enough to state that antlr does not
> support all cfgs but only predicated LL ; on the other hand , though i
> must admit to my being not the expert on this, LR grammars can be
> represented by an equivalent LL grammar ;
> i remember having done some exercises on this in the compiler theory
> class ;
Actually LR(k) is only as strong as LL(k) if you put actions on the
left-edge of every production, forcing the LR parser to know where it's
at on the left-edge just like an LL(k) parser.
The thing to remember is that all languages are "turing complete" so
can implement pretty much anything, however, you should focus on
efficiency of expression. ANTLR is a domain-specific language designed
to make building parsers/translators easier. PERL for the most part
makes you implement parsers by hand. Also, isn't PERL optimized to
work on a line-by-line basis? Can it easily match an HTML tag, for
example, spanning 5 lines?
Ter
--
Co-founder, http://www.jguru.com
Creator, ANTLR Parser Generator: http://www.antlr.org
Lecturer in Comp. Sci., University of San Francisco
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list