[antlr-interest] Re: Nondeterminism problem

sarah2geller sarah2geller at yahoo.com
Fri Dec 19 12:09:52 PST 2003


> >>s : Z (a | ) B ;
> >>
> >>a : A;
> >>
> >>t : X a A ;
> >>
> > This incomplete grammar is LL(1). If you add a production like 
> > 
> > s : t;
> > 
> > it is still LL(1).
> > 
> 
> This grammar is not incomplete, is it? Anyway, this grammar 
actually is 
> LL(1), but this is not the point, the point is it is LALR', but not 
SLL 
> which shows LALR' grammars are not a subset of SLL grammars. As 
this 
> seemed to be the intention of the initial claim, it is wrong, isn't 
it?
> 

Since t is not on the right side of a production, the t production is 
not reachable in the grammar.

As I said before, LL(1), SLL(1), and LALL(1) are all the same grammar 
class. This is a well-known fact that you can find in any text book. 
So when I said the grammar above was LL(1), that means that it is 
also SLL(1) because they are the same class. Saying "strong LL(1)" is 
redundant because all LL(1) grammars are strong. LL(k) is more 
powerful than LALL(k) and SLL(k) only for k>1. So the example grammar 
given above is not relevant to the question of even LALL vs. SLL, 
much less LALL' vs. SLL.



 

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