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

Re: ncgen don't line "minus zero".



Hi Bernward,

> If a variable in an .cdl file contains a value of "-0" or "+0", ncgen 
> produces a syntax error. The reason is seems to be the following in ncgen.l:
> [+-]?[1-9][0-9]*[lL]?|0[lL]? {

Thanks for pointing out this bug.  If you change the above line in ncgen.l
to

[+-]?([1-9][0-9]*|0)[lL]? {

it seems to fix the bug with `-0' and `+0' not being recognized, but octal
constants beginning with `0' are still interpreted correctly.

Please let me know if you notice any problems with this fix to
ncgen/ncgen.l.  Otherwise, I'll incorporate it into the next release or set
of patches.

______________________________________________________________________________

Russ Rew                                                UCAR Unidata Program
address@hidden                                          P.O. Box 3000
http://www.unidata.ucar.edu/                          Boulder, CO 80307-3000
______________________________________________________________________________