[antlr-interest] What's the SLK Parser Generator?

Terence Parr parrt at jguru.com
Mon Oct 7 17:56:50 PDT 2002


Hmm...initial inspection seems to indicate they have misunderstood a 
lot of stuff, but may have a nice tool.

For example, I like this quote: "In practice, LL(k) parsing techniques 
for values of k that are greater than one have not been used until 
recently."  PCCTS/ANTLR have only done it for 12 years. ;)  They say, 
referring to my thesis:

"He uses heuristic methods that reduce the complexity of the problem to 
approximately linear for many commonly used grammars. As with other 
heuristics, the shortcoming is that this method does not always work in 
a reasonable period of time. "

Eh? Actually, the purpose of a heuristic is to sacrifice accuracy for 
speed.  Doh!  PCCTS actually did do full SLL(k) for k>1.

I'm a bit uncomfortable with their "ability" to read in LALR(1) 
grammars.  There's probably a proof around that says it ain't possible.

Plus I hate tables of ints as parsers ;)  That's why I built PCCTS in 
the first place.

I disagree with their def of SLL(K)...been a while but I thought SLL(k) 
meant "Strong LL(k)" meaning stronger constraint than LL(k).  I believe 
it means that the context for all rule references (FOLLOW in 
particular) are collapsed.  I.e., if two rules call rule expr, the 
FOLLOW(expr) is used instead of FOLLOW(expr_ref1) and FOLLOW(expr_ref2) 
when computing lookahead for rule expr (in case you fall off the end of 
the rule while computing lookahead).  Just means less context.  ANTLR 
actually does SLL(k) as well.  I have only seen a few places where 
LL(k) did something I wanted more than SLL(k).

Ter

On Monday, October 7, 2002, at 03:48  PM, mrosgood wrote:

> Terence Parr, Everyone-
>
>
> I just found this:
>
> The SLK Parser Generator
> http://home.earthlink.net/~parsersinc/slk/
>
> The first sentence reads:
>
> "The SLK parser generator is the only tool available that enables
> table-driven LL(k) parsing."
>
> The SLK site has some sample generated code.  Yup, there's tables.
>
> So, I was curious, does SLK have something that could benefit ANTLR?
>
>
> Cheers, Jason Osgood
>
>
>
>
> Your use of Yahoo! Groups is subject to 
> http://docs.yahoo.com/info/terms/
>
>
--
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