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 903 of 2,753   
   George Neuner to wooks   
   Re: Grammar for variable and method decl   
   03 Mar 07 23:32:37   
   
   From: gneuner2@comcast.net   
      
   On 1 Mar 2007 21:33:40 -0500, "wooks"  wrote:   
      
   >How do you define a grammar where ...   
   >public/private datatype id and are not distinguishable until the 4th   
   >token.   
      
   The language is not LL(1), left factoring can not remove all the   
   conflicts.  You need extended look ahead and/or predication and   
   backtracking to parse the language in LL.   
      
   LL(k>1) tools such as Antlr and JavaCC can handle this problem in the   
   natural way, as can any of the LR tools.   
      
   George   
      
   --- 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