Re: Ambuguity of CFG



"beelzebub" <tarball@xxxxxxxxx> writes:

S -> a S a and S -> a

The above is not an ambiguous grammar.

He didn't say it was. He said it was nondeterministic, which is
something else.

A grammar is deterministic if it can be parsed with a deterministic
pushdown automaton with finite lookahead, and nondeterministic if it
can not.

Every ambiguous grammar is nondeterministic, but the converse isn't
true.

Torben
.