In scan.l, there is:
decimal (({digit}*\.{digit}+)|({digit}+\.{digit}*))
real
((({digit}*\.{digit}+)|({digit}+\.{digit}*)|({digit}+))([Ee][-+]?{digit}+))
Could this be simplified as:
decimal (({integer}?\.{integer})|({integer}\.{integer}?))
real ((({decimal})|({integer}))([Ee][-+]?{integer}))
What is the reason if it shouldn't be? This is just an educational question,
I guess. I wouldn't want to waste time writing bad patches. :) I ran regress
with this change and it looked ok.
One reason I can think of right now, is that if the definition of integer or
decimal were to change, it might break decimal and real. Another reason
might be a performance loss?
--
-------- Robert B. Easter reaster@comptechnews.com ---------
-- CompTechNews Message Board http://www.comptechnews.com/ --
-- CompTechServ Tech Services http://www.comptechserv.com/ --
---------- http://www.comptechnews.com/~reaster/ ------------