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,036 of 2,753   
   ulf.schwekendiek@googlemail.com to All   
   Detection of ambiguous grammar   
   18 Aug 07 12:29:31   
   
   Hello,   
      
   I am thinking of a special case in GLR parsing. I am wondering whether   
   it is possible to check if a grammar is ambiguous. For example if I am   
   using GNU Bison as a parser generator it detects Shift-Reduce and   
   Reduce-Reduce conflict, however with the GLR feature it is possible to   
   parse most of the grammars. Now a special case could happen: More than   
   one parsing stack at the end is still alive and Bison would execute by   
   default the different semantic action stacks. However the Bison manual   
   states that the programmer can provide a special "merge" function   
   which resolves from this problem. I want to ask you if there is any   
   algorithm that can check if such case can happen for a given grammar   
   or not.   
      
   Best regards,   
      
   Ulf Schwekendiek   
      
   --- 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