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,091 of 2,753   
   Borneq to All   
   Constructing LL(k) tables   
   13 Nov 11 04:57:26   
   
   From: a.moderacja@gmail.com   
      
   To construct LL(1) table M:   
   for each production A->alpha do:   
   for each terminal a from FIRST(alpha) (a<>eps) add production A->alpha   
   to M[A,a]   
   if eps is in FIRST(alpha), for each b from FOLLOW(A) add  A->alpha to   
   M[A,b]   
      
   If grammar is not LL(1), in one table position there will be more than   
   one production. Can I construct LL(k) tables simply by splitting cells   
   with more than one production? Which is algorithm to production   
   choosing ?   
      
   --- 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