[Gimp-developer] next generation size entries

Simon Budig simon at budig.de
Mon Dec 17 15:18:52 PST 2007


Martin Nordholts (enselic at gmail.com) wrote:
> I'm currently interested in looking into this, mostly because I think
> this needs a clean solution before I will be able to cleanly finalize
> the GimpRectangleTool.

I have a prototypeish parser running here, specified with yacc:

$ ./parseunit
2m + 3in
Result: 2.076200 m
40cm / 2in
Result: 7.874000
2m * 3ft
syntax error
2m * 3ft / 2in
Ergebnis: 35.998171 m

It kind of tries to track the dimension of the value entered and
currently bails out for dimensions > 2. Not very reliable but it might
help for a good start of the parser.

If you're curious I'll put the code online somewhere.

Bye,
        Simon
-- 
              simon at budig.de              http://simon.budig.de/


More information about the Gimp-developer mailing list