Re: detecting ambiguous grammars

henry@spsystems.net (Henry Spencer)
4 Mar 2001 01:37:04 -0500

          From comp.compilers

Related articles
detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-02-15)
Re: detecting ambiguous grammars davidpereira@home.com (David Pereira) (2001-02-17)
Re: detecting ambiguous grammars cfc@world.std.com (Chris F Clark) (2001-02-23)
Re: detecting ambiguous grammars joachim_d@gmx.de (Joachim Durchholz) (2001-03-01)
Re: detecting ambiguous grammars henry@spsystems.net (2001-03-04)
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-04)
Re: detecting ambiguous grammars davidpereira@home.com (David Pereira) (2001-03-08)
Re: detecting ambiguous grammars dlester@cs.man.ac.uk (2001-03-10)
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-12)
Re: detecting ambiguous grammars christian.bau@isltd.insignia.com (2001-03-22)
Re: detecting ambiguous grammars thant@acm.org (Thant Tessman) (2001-03-26)
[11 later articles]
| List of all articles for this month |
From: henry@spsystems.net (Henry Spencer)
Newsgroups: comp.compilers
Date: 4 Mar 2001 01:37:04 -0500
Organization: SP Systems, Toronto, Canada
References: 01-02-080 01-03-020
Keywords: parse, theory
Posted-Date: 04 Mar 2001 01:37:04 EST

Joachim Durchholz <joachim.durchholz@gmx.de> wrote:
>2) "undecidable" means: you can write an algorithm that checks whether a
>given grammar is ambiguous. However, this algorithm may take an
>arbitrarily long time to terminate, and for some grammars it will never
>reach a conclusion and continue to run forever.


Of course, this doesn't prevent you from building algorithms which will
(almost certainly) cope well with all *real* grammars. Many problems
which compilers solve every day are, *in their full generality*, highly
intractable or provably undecidable. Most real grammars are relatively
simple, especially if they are written by human beings rather than
generated by programs.
--
When failure is not an option, success | Henry Spencer henry@spsystems.net
can get expensive. -- Peter Stibrany | (aka henry@zoo.toronto.edu)


Post a followup to this message

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