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 1,818 of 2,753   
   klyjikoo to Chris F Clark   
   Re: An example LL(K) language that is no   
   14 Feb 10 01:38:15   
   
   From: klyjikoo@gmail.com   
      
   Chris F Clark  wrote:   
   > Actually, I htink you have made a slight typo, and want the B rule to   
   > recurse on B not A   
      
   Yes, I had a mistake... I want the B rule to recurse on B .   
      
   >the following grammar should work:   
   >   
   >   
   > S := A   
   > A := B C   
   > B := b A d // 1 form of recursion   
   > B := b b A a d // other form of recursion, note the slight difference   
   > B := a c   
   > C := A   
   > C := epsilon   
      
      
   Your example also shows the difference between LR(k) and LL(k) grammars,   
   similar to my example...   
      
   --- 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