[antlr-interest] Re: Determinig the real ambiguities
Terence Parr
parrt at cs.usfca.edu
Fri Jul 16 12:12:30 PDT 2004
On Jul 15, 2004, at 3:46 PM, thrutchy wrote:
> --- In antlr-interest at yahoogroups.com, Terence Parr <parrt at c...> wrote:
>> It is. ;) However, the new ANTLR 3.0 prototype handles this situation
>> trivially. It tries more and more lookahead until it realizes it
>> needs
>> arbitrary lookahead and then it builds a tight little DFA that walks
>> out until it sees the C or D and then it knows which production will
>> succeed using real parsing.
>
> Very nice. I think this will help out quite a bit. I assume you will
> still be able to have it let you know when it is resorting to this so
> that the grammar can be refactored to not do the DFA thing and be
> faster. Or better yet, have ANTLR do the refactoring for at least
> simple cases...
ANTLR will be able to profile your grammar and even be able to tell you
if it's fixed k or arbitrary lookahead for each decision point.
Refactoring is something that Loring Craymer is all hot-n-bothered
about. :)
> How do yo see ANTLR 3.0 comparing to Perl 5.6+ regular expressions?
ANTLR will always have less bells and whistles than PERL. I like
simplicity. Plus, perl has to overcome lack of a real parser (though I
hear they are making one) with complicated regular expressions.
Lookback / ahead in perl are primarily used I'm sure to make up for the
fact that you don't have a real grammar giving you context information.
> Do you see the parser and lexer in ANTLR becoming one in the same at
> some point?
Yes, a unified parser/lexer is planned.
> One could choose what the input (character or token
> stream, etc) and output (token stream or AST) would be.
>
> Do you have a feature list of ANTLR 3.0 around somewhere?
Not really ;) You can look at the cabal notes and other stuff on the
blog
http://www.antlr.org/blog/index.tml
> Thanks for the tool, Terrance!
At your service,
Terence
--
CS Professor & Grad Director, University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Cofounder, http://www.jguru.com
Cofounder, http://www.knowspam.net enjoy email again!
Cofounder, http://www.peerscope.com pure link sharing
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
<*> To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list