You'll find some more resources for equation parsers here: http://stackoverflow.com/questions/28256/equation-expression-parser-with-precedence On Thu, Apr 23, 2009 at 12:26 PM, Peter wrote: > Speaking of FORTRAN, there was a neat shortcut expression evaluator designed for > FORTRAN I, it is on Wikipedia. I have tested it (just add parens to cope with > deeper expressions - eventually buffer size quickly limits this in small micros > - in FORTRAN the limit was likely the usable line length on a punched card): > > See under 'Alternatives to Dijkstra's Algorythm': > > http://en.wikipedia.org/wiki/Operator-precedence_parser That is really neat! It makes perfect sense, and is very simlpe and comprehensable. I see what you mean in terms of buffer length, though - it could also eat up a lot of equation stack in the parser I wrote. Very nice, thanks for pointing that out! -Adam -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist