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 824 of 2,753   
   Hans-Peter Diettrich to SM Ryan   
   Re: Reduce/Reduce conflict in Algol60 gr   
   14 Oct 06 16:10:20   
   
   From: DrDiettrich1@aol.com   
      
   SM Ryan wrote:   
      
   > The problem is you can't distinguish Boolean variable from arithmetic   
   > variable merely by looking variable characters themselves. You need to   
   > match the variable to its declaration and that requires a context   
   > sensitive grammar. In a context free grammar a Boolean variable and   
   > arithmetic variable (or function names) are indistinguishable hence   
   > the reduce-reduce conflict.   
      
   This was my impression as well. An arithmetic_expression is a special   
   case of a boolean_expression, slipping in by "relation". Adding a dummy   
   relation, which turns any arithmetic_expression (in detail   
   arithmetic_primary: variable, function_designator) into an   
   "boolean_primary", IMO would solve the syntax (context) problem.   
      
   DoDi   
      
   --- 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