home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.compilers      Compiler construction, theory, etc. (Mod      2,753 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 2,300 of 2,753   
   Chris Dodd to George Neuner   
   Re: LR(1) Parsing : Error Handling & Rec   
   26 Jul 14 21:16:19   
   
   From: cdodd@acm.org   
      
   George Neuner  wrote   
   > For every LL(k) grammar where both k and the set T of tokens is fixed,   
   > there is an equivalent LL(1) grammar.  In the worst case, the   
   > equivalent LL(1) grammar will have k**T rules.   
      
   This is simply not true.  A counter-example from Kurki-Suonio   
      
      
   is:   
      
       S ::= aSA | \epsilon   
       A ::= aabS | c   
      
   This grammar (and the language) is LL(2), but there does not exist an   
   equivalent LL(1) grammar.  Here k=2 (fixed) and T = {a, b, c} (also fixed)   
      
   Chris Dodd   
   cdodd@acm.org   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca