|[7 earlier articles]|
|Re: parsing, was .NET Compiler for Interactive Fiction firstname.lastname@example.org (Ralph P. Boland) (2003-04-15)|
|Re: parsing, was .NET Compiler for Interactive Fiction bobduff@shell01.TheWorld.com (Robert A Duff) (2003-04-20)|
|Re: simple vs. complex parsers email@example.com (Chris F Clark) (2003-04-27)|
|Re: simple vs. complex parsers firstname.lastname@example.org (Joachim Durchholz) (2003-05-05)|
|Re: simple vs. complex parsers bobduff@shell01.TheWorld.com (Robert A Duff) (2003-05-15)|
|Re: simple vs. complex parsers cfc@shell01.TheWorld.com (Chris F Clark) (2003-05-18)|
|Re: simple vs. complex parsers email@example.com (Sylvain Schmitz) (2003-05-18)|
|Re: simple vs. complex parsers firstname.lastname@example.org (Lieven Marchand) (2003-05-18)|
|Re: simple vs. complex parsers email@example.com (2003-05-18)|
|Re: simple vs. complex parsers firstname.lastname@example.org (2003-05-23)|
|Re: simple vs. complex parsers email@example.com (2003-05-23)|
|Re: simple vs. complex parsers firstname.lastname@example.org (Antti-Juhani Kaijanaho) (2003-05-24)|
|From:||Sylvain Schmitz <email@example.com>|
|Date:||18 May 2003 23:48:45 -0400|
|References:||03-02-125 03-02-147 03-03-043 03-03-061 03-03-103 03-04-006 03-04-028 03-04-046 03-04-066 03-04-116 03-05-103|
|Posted-Date:||18 May 2003 23:48:45 EDT|
Robert A Duff wrote:
> Hmm. I'm not sure I agree. Do we really want tools that can parse
> ambiguous grammars, if that encourages language designers to create
> ambiguous grammars? Are ambiguous grammars good for human readers?
I was under the impression that ambiguous grammars were a bigger
problem to computers. Human languages use extremely ambiguous grammars
which we solve using an enormous amount of context, be it the topic of
the conversation, usage or whatsoever. Computers on the other hand
have some hard time with nondeterminism. So being able to parse
ambiguous grammars is a quality when facing natural languages (and
that's Tomita's field of research), but it could turn into a drawback
for computer languages.
Joachim Durchholz wrote:
> The only downside is that the parser generator won't tell you whether
> your grammar is ambiguous. Nothing that a separate "grammar checker"
> tool couldn't handle (that checker would need assistance from the
> grammar writer, since the problem is undecidable in general).
Does anyone know a tool like this?
I've found the DMS Reengineering Toolkit, which automatically attempts
to tell whether the grammar is ambiguous or not
http://www.semdesigns.com/Products/DMS/DMSToolkit.html), but I have no
idea of its efficiency.
Another solution would be to use a parser generator like bison and tweak
and distort the grammar until we're sure it's not ambiguous, but in that
case the risk of actually changing the language it generates is real.
I believe noncanonical methods have still something to offer, being
able to parse wide classes of grammar in a deterministic way (see
http://www.eecg.toronto.edu/~mdhutton/papers/noncan.pdf). I'd like to
gather some opinions on this point.
Return to the
Search the comp.compilers archives again.