Re: grammar ambiguity

"Joachim Durchholz" <joachim.durchholz@halstenbach.com.or.de>
27 Feb 2000 02:49:49 -0500

          From comp.compilers

Related articles
[7 earlier articles]
Re: grammar ambiguity compres@world.std.com (Chris F Clark) (2000-02-12)
Re: Grammar ambiguity cbrtjr@ix.netcom.com (Charles E. Bortle, Jr.) (2000-02-13)
Re: Grammar ambiguity j.coulmance@itecor.com (Jocelyn Coulmance) (2000-02-19)
Re: grammar ambiguity wclodius@aol.com (2000-02-21)
Re: grammar ambiguity world!cfc@uunet.uu.net (Chris F Clark) (2000-02-27)
Re: Grammar ambiguity joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-27)
Re: grammar ambiguity joachim.durchholz@halstenbach.com.or.de (Joachim Durchholz) (2000-02-27)
Re: Grammar ambiguity j.coulmance@itecor.com (Jocelyn Coulmance) (2000-03-03)
Grammar ambiguity ma9vk@bath.ac.uk (Vassilis Kostakos) (2000-03-06)
Re: Grammar ambiguity torbenm@diku.dk (2000-03-11)
Re: Grammar ambiguity rodrigo.ferreira@dcc.unicamp.br (Rodrigo Augusto Barbato Ferreira) (2000-03-11)
| List of all articles for this month |

From: "Joachim Durchholz" <joachim.durchholz@halstenbach.com.or.de>
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!cfc@uunet.uu.net> 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
option?


Regards,
Joachim


Post a followup to this message

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