ExtendedNumberParser

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

ExtendedNumberParser

Frank Shearar-3
Hi Nicolas,

I was wondering about why we're using ExtendedNumberParser instead of
SqNumberParser behind Number class >> #readFrom:.

In particular, our use of ExtendedNumberParser means that
PetitSmalltalk doesn't work in Squeak (because we then can't tell that
" a := 1." is a terminated statement rather than the assignment of a
Float).

I understand the desire for a very liberal number parser; I just
wonder if we shouldn't have a separate entry point, like (needs a
better name!) Number class >> #readLiberallyFrom:.

What do you think? (Also, this removes the need for putting a number
grammar into PetitSmalltalk which, while theoretically
pleasing/elegant is also something that I can't figure out how to make
efficient.)

frank