On Wed, 2004-02-11 at 03:43, David Burnett wrote:
I wanted to avoid lex and yacc as I want to run this as an applet, so it has to be small javaCC alone is 370k - more than 3 times as large as my applet..
Surely however you don't need to redistribute javaCC? Most parser generators output code which you compile into your program and then are no longer required at runtime. The code they output is usually table-driven and will probably be a bit bigger than something you write by hand, but it may not be as bad as you think. Incidentally, one weird part of Fractint's parser which I haven't yet tried to emulate is that you can insert \ *in the middle of a token*, eg x = y &\ &z is the same as x = y && z. This is really painful to deal with in a standard lexer & is probably best handled by preprocessing the file with a regular expression. -- Edwin