On Sat, 8 Jan 2011, Paul Eggert wrote:
> On 01/08/2011 10:29 AM, Joel E. Denny wrote:
> > id -|({letter}|-({letter}|-))({letter}|[-0-9])*
>
> Sorry, I guess I don't understand the point of this.
> Why should "---39---" be an identifier?
I thought we were adding the simple rule that an identifier cannot begin
with a negative integer. "---39---" does not begin with a negative
integer.
> And if so,
> why should "--39--" *not* be an identifier?
Who says it shouldn't?
> The more I think about this, the more I think that it
> is a mistake for Bison to allow "-" in identifiers.
> This is incompatible with C and with C++ and with Java,
Any more than "."?
> and is bound to lead to more problems elsewhere.
Such as?
> Can someone remind me why we're doing this?
It's consistent with other identifiers in Bison. Some of us think "-" is
easier to type and read than "_". And, so far, I've seen no compelling
reason not to do this.