[antlr-interest] a new paper on ANTLR style grammars
Arnar Birgisson
arnarb at oddi.is
Thu Nov 20 10:05:41 PST 2003
Hello there..
Am I correct in the assumption that the "|" operator in ANTLR is not
ordered, i.e. it has the same meaning as in BNF? If so, wouldn't the "/"
operator as defined in the paper be useful? I don't have much
perspective on this as I am yet a beginner, but wouldn't it at least
save us from inserting "options {greedy=true}:" and syntactic predicates
here and there?
Arnar
> -----Original Message-----
> From: Terence Parr [mailto:parrt at cs.usfca.edu]
> Sent: 18. nóvember 2003 19:31
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] a new paper on ANTLR style grammars
>
>
> Folks,
>
> Here is an upcoming paper to a conference that formally defines
> grammars that operate like antlr: where alternatives have an implied
> order. Nicely formalizes the strategy of predicated parsing etc...
>
http://www.brynosaurus.com//pub/lang/peg.pdf
Just as we have the syntactic predicate that says what the lookahead
context must be, he has a "not predicate" that says what the lookahead
cannot be. This is very useful for such things as saying "match this
rule, but only if not following in context by this next thing." Really
powerful. moreover, he has a parser that demonstrates linear
backtracking parsing by use of dynamic programming. I will be studying
his technique very closely before code gen for ANTLR. :)
Ter
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list