[antlr-interest] NQOT: Grammar meta-programming
Harald Mueller
harald_m_mueller at gmx.de
Sun Dec 9 23:34:32 PST 2007
Johannes wrote:
> Harald M. Müller wrote:
> > I wrote -
> >
> >> Not even C and C# have the same "simple expressions" -
> >>> e.g.,
> >>>
> >>> (T) -a
> >>>
> >>> might be a cast expression in C, but never in C#,
> > [...]
> >
> > and Johannes answered
> >
> >> Actually, this is wrong.
> >
> > and I say: Huh? -
and he says:
>
> The problem is that you overlook e.g. "(int) -1.0", which is valid
> nonetheless.
Ah - so much for precise examples :-) I meant T and a to be identifiers, i.e. the example was meant to be a real *example*, not some generic thing where T could also be int or the like. The C# spec at exactly the place cited is careful enough: It says explicitly "If x and y are identifiers, ..." - I forgot this.
Lesson to be learned: Specify examples better :-)
Regards
Harald
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
More information about the antlr-interest
mailing list