On Tue, 21 Apr 2009, Akim Demaille wrote:

> The asymmetry between dashes and period is not something I am deeply attached
> to. POSIX says "Names are of arbitrary length, made up of letters, periods
> (.), underscores (_) and non-initial digits." so I'm fine with just adding `-'
> to the {letter}.  Yet the error messages should probably be improved.  Maybe
> catching "words" starting with dashes and digits, and complaining about them,
> in order to have
> 
> invalid identifier: -wrong
> invalid identifier: 1nv4l1d
> 
> instead of what we currently have.

That would at least fix this case:

  %token TOK1 1TOK

for which Bison currently assigns 1 to TOK1 and recognizes a separate TOK.

By the way, in the NEWS entry for 2.5, are we ready to announce the 
ability to put dashes in grammar symbol names?



Reply via email to