I think it is a good idea to have the number parser separate, after all it might also make sense to use it separately.
+1. Modularity and composibility is a strong apsect of PP so we should use them. Especially since in the future we want to use petitSmalltalk for pharo (to be checked speedwise).
It seems that the new Smalltalk grammar is significantly slower. The benchmark PPSmalltalkClassesTests class>>#benchmark: that uses the source code of the collection hierarchy and does not especially target number literals runs 30% slower.
Also I see that "Number readFrom: ..." is still used within the grammar. This seems to be a bit strange, no?
Lukas
On 3 September 2011 17:18, Frank Shearar <frank.shearar@gmail.com> wrote:
On 3 September 2011 15:56, Lukas Renggli <renggli@gmail.com> wrote:
On 3 September 2011 16:51, Frank Shearar <frank.shearar@gmail.com> wrote:
Hi Lukas,
I haven't :) mainly because I'm unsure where to put it - is there perhaps a PP Inbox, or shall I just post the merged version, or what's your preference? (How about an mcd between my merge and PP's head?)
Just put the .mcz at some public URL (dropbox, squeak source, ...) or attach it to a mail.
Ah, great - here it is. You'll see I've written the grammar as a separate class. That was really more to make what I'd done more obvious and to minimise the change to PPSmalltalkGrammar, but perhaps it's not a bad idea anyway: it's easy to see the number literal subgrammar.
frank
Lukas
-- Lukas Renggli www.lukas-renggli.ch
-- Lukas Renggli www.lukas-renggli.ch