[DGD] parse_string() and ambiguity

S. Foley zeppo1 at mindspring.com
Fri Oct 24 21:57:49 CEST 2003


Consider the following (incomplete and useless) grammar:

word = /[a-zA-Z]+/

...

SENTENCE : SUBJECT PREDICATE
SUBJECT : word
PREDICATE : word


I'm under the impression that this grammar is already ambiguous.  That is to
say, any production rule that contains more than 1 production rule symbol on
the right side (of the ':') is ambiguous because there's nothing to indicate
the order in which the production rules should be applied.  Is this correct?
I ask because many of the example grammars I've seen tend to use multiple
production rule symbols on the right side of a production rule, and I've
started to wonder whether I'm mistaken on this point.

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list