Subject: Re: CVS commit: syssrc
To: Eduardo Horvath <eeh@netbsd.org>
From: John Hawkinson <jhawk@MIT.EDU>
List: source-changes
Date: 07/11/2000 10:11:49
| Fix for:
| 
| 7.      Numbers starting with [a-f] should work, but symbols
| 	  of the same name should have priority.

Sorry to be a wet blanket about this.

Did you have a reason for implementing this as you did, instead
of having the lexer return tNUMBER for numbers starting with [a-f]
(now it returns tIDENT and you special-case failed identifiers
by looking to see if they can be parsed into numbers).

I think I would have had tNUMBER returned and then attempt to translate
all tNUMBER cases into identifiers before trying them as numbers.

Corner cases:

       a)	A symbol named "1234" will be interpreted as 0x1234 and
		not it's real value, but a symbol named "f234" will be
		properly identified. That seems wrong.

       b)	In what I propose "0xf234" would be lexed as tNUMBER
		and some special handling would be required for 
		be required for db_term() to tell the difference.

Regardless, I would judge that this is enough of a user-visible change
as to merit a doc/CHANGES entry; but I'd hold off until we're solid
on the implementation.

--jhawk