bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Do not allow identifiers that start with a negative number.


From: Paul Eggert
Subject: Re: [PATCH] Do not allow identifiers that start with a negative number.
Date: Sat, 15 Jan 2011 15:48:13 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 01/15/2011 01:50 PM, Joel E. Denny wrote:
> I could also live with either of the following, but I think 
> they're unnecessarily restrictive:
> 
>   An identifier can be any sequence of letters, underscores, periods, 
>   dashes, and digits that does not start with an integer or float 
>   (unsigned or negative).
> 
>   An identifier can be any sequence of letters, underscores, periods, 
>   dashes, and digits that does not start with a digit or dash.

The second alternative is nice: it's simple, and easy to explain:
it's just as easy as what's in there now.  I could easily go with that.

The first alternative seems unnecessarily complicated; it's better
to keep things simple, all other things being equal.

> a loss of diagnostic information provided to the user.  Specifically, many 
> "possibly meant" messages are now missing.

The information generated by those "possibly meant" didn't seem that
useful to me; it seemed to be more a symptom of a syntax that was
unnecessarily confusing.

I do realize that a lot of work went into generating them.  Perhaps
they could be put back in, but we need to figure out what should be
accepted before worrying overly much how to diagnose things that are
rejected.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]