[squeak-dev] ExtendedNumberParser

Frank Shearar frank.shearar at gmail.com
Thu Apr 19 21:47:54 UTC 2012


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


More information about the Squeak-dev mailing list