Re: grammar ambiguity

"Joachim Durchholz" <>
27 Feb 2000 02:49:49 -0500

          From comp.compilers

Related articles
[7 earlier articles]
Re: grammar ambiguity (Chris F Clark) (2000-02-12)
Re: Grammar ambiguity (Charles E. Bortle, Jr.) (2000-02-13)
Re: Grammar ambiguity (Jocelyn Coulmance) (2000-02-19)
Re: grammar ambiguity (2000-02-21)
Re: grammar ambiguity world! (Chris F Clark) (2000-02-27)
Re: Grammar ambiguity (Joachim Durchholz) (2000-02-27)
Re: grammar ambiguity (Joachim Durchholz) (2000-02-27)
Re: Grammar ambiguity (Jocelyn Coulmance) (2000-03-03)
Grammar ambiguity (Vassilis Kostakos) (2000-03-06)
Re: Grammar ambiguity (2000-03-11)
Re: Grammar ambiguity (Rodrigo Augusto Barbato Ferreira) (2000-03-11)
| List of all articles for this month |

From: "Joachim Durchholz" <>
Newsgroups: comp.compilers
Date: 27 Feb 2000 02:49:49 -0500
Organization: Compilers Central
References: 00-02-024 00-02-051
Keywords: parse

Chris F Clark <world!> schrieb in im Newsbeitrag:
> The final technique worth mentioning is to extend the non-terminal
> lookahead by computing its closure (or limit). Essentially this takes
> the entire right context into consideration. Moreover, I believe one
> can prove that for any unambiguous grammar the process terminates (the
> limit converges or more precisely the closure has finite number of
> states). However, as far as I can tell that the only check for an
> ambiguous grammar is that the process does not terminate.
> [...]
> In addition, the run-time support
> for executing the resulting parsers is not implemented, so the feature
> is essentially useless at the moment.

This is not a problem. I just want to check the grammar, I don't want
to parse it. We're just considering grammar alternatives; if we know
that a tool cannot handle it, we won't know for sure that the grammar
is ambiguous but we do know that automated tools have trouble using
it, so we'll probably drop the syntax anyway :)

> The reason I know this is Yacc++ 2.4 implements this closure
> operation (in the generator) in an undocumented option. On some
> grammars the tool just loops producing gigabytes of states before
> running out of memory and failing.

I'd like to give it a try. Where can I find Yacc++? What's that secret


Post a followup to this message

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