Hello!
> > (A B) | C
> > means the same that
> > A B | C
> > even without line break, doesn't it?
> No,
Hmm! This may be the reason of some previous misunderstandings ...
> As it is,
> A B | C
> is ambiguous, that is, it isn't clear whether it means
> (A B) | C
> or
> A (B|C)
In this case, one may wonder how we should interpret the following production in today's BNF:
lastTwoDigits = digit digit | digit "u" | "u" "u"
My interpretation is
lastTwoDigits = ( digit digit ) | ( digit "u" ) | ( "uu" )
as I consider that it makes more sense than
lastTwoDigits = digit ( digit | digit ) ( "u" | "u" ) "u"
which indeed would mean
lastTwoDigits = digit digit "uu"
that is: two specified digits followed by two unspecified digits.
In other words, it seems that the BNF is written such as
> > (A B) | C
> > means the same that
> > A B | C
> > even without line break, doesn't it?
Regards!
SaaĊĦha,
|