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,357 of 2,753   
   Jason Evans to Tom   
   Re: LR(k) parser generator for k>1?   
   20 May 08 07:42:42   
   
   From: joevans@gmail.com   
      
   On May 18, 2:27 pm, Tom  wrote:   
   > I have searched on Internet and the comp.compilers news group for   
   > LR(k) parser generator implementation where k > 1.   
   >   
   > Would it be meaningful to implement one? I'm very interested to know.   
      
   I have contemplated how an LR(2) or LR(3) parser would impact LR(1)   
   parsers I've written, and my feeling is that while the extra lookahead   
   would sometimes be useful, it would make understanding grammar   
   problems more difficult.  It is always possible to restructure a   
   grammar to reduce the lookahead requirement, which is my preferred   
   approach.  Another solution is to use a GLR parser, which is capable   
   of resolving at run time any ambiguities that increased lookahead   
   would resolve at parser creation time.  There are numerous GLR parser   
   generators available.   
      
   Jason   
      
   --- 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