Detection of ambiguous grammar

"ulf.schwekendiek@googlemail.com" <ulf.schwekendiek@googlemail.com>
Sat, 18 Aug 2007 12:29:31 -0700

          From comp.compilers

Related articles
Detection of ambiguous grammar ulf.schwekendiek@googlemail.com (ulf.schwekendiek@googlemail.com) (2007-08-18)
Re: Detection of ambiguous grammar neelk@cs.cmu.edu (Neelakantan Krishnaswami) (2007-08-20)
Re: Detection of ambiguous grammar torbenm@app-2.diku.dk (2007-08-20)
Re: Detection of ambiguous grammar idbaxter@semdesigns.com (2007-08-24)
| List of all articles for this month |

From: "ulf.schwekendiek@googlemail.com" <ulf.schwekendiek@googlemail.com>
Newsgroups: comp.compilers
Date: Sat, 18 Aug 2007 12:29:31 -0700
Organization: Compilers Central
Keywords: parse, question

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



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.