I'm looking for Lex/Yacc sources for a calculator application.The
calculator is supposed to be used for scientific purposes. More
precisely, I'm looking for something that can handle
basic algebraic expressions (log, exp, power, sin, cos, ...)
boolean expressions (AND, OR, NOT, XOR)
matrix/vector operations (inner/outer products, determinants, ...)
less important:
a few conditional statements (if ... then ... else ..., while)
Additionally, it should be able to work with variables, i.e. whenever
an unrecognized token is encountered, an external function should be
called to determine a value for that token.
If you know about the existence of such a thing (PD or commercial),
please send me a msg: fgr...@glue.umd.edu
Thank you,
Frank
I wrote a small C intepreter using the the bison and flex++ lex and yacc
tools which could be easily modified to do this type of thing. If you need
more information goto my tools web page:
http://ourworld.compuserve.com/homepages/jussi/tTools.htm
This page contains a ZIP package that has the source code, grammar and
working EXE files of the C interpreter in question.
Jussi Jumppanen (mail to:jus...@ca.com.au)
Author of: Hardware Digital Logic Analyers for Windows
Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor
"The C/C++, Java, Pacal, Cobol, Fortran programmers text editor"
Home Page: http://ourworld.compuserve.com/homepages/jussi/