perhaps not weird, but certainly strange. do we have to deal with whitepace in the middle of identifiers. ie could this happen x = y &\ &z where the next line has whitespace at the start I had been treating LF as a delimiter, so Edwins point was useful. I currently have parsing of input tokens working and rendering of output tokens.working. Now I have to get the bit in the middle working, the one that converts the input stream to the output format. Everything else was relatively easy, but this part should be fun......... Edwin, how do you find the yacc usage (or rather the output thereof) for speed db Tim Wegner wrote:
Edwin wrote:
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.
Why is that weird? It's just an escape for a newline that allows something that is logically a single line to be broken into two lines.
You are right, it's not really part of the language, and is best handled by a preprocessor.
Tim
_______________________________________________ Fractdev mailing list Fractdev@mailman.xmission.com http://mailman.xmission.com/cgi-bin/mailman/listinfo/fractdev
-- regards David