Dec 092017
Expression evaluator with c source.
File INTERP11.ZIP from The Programmer’s Corner in
Category C Source Code
Expression evaluator with c source.
File Name File Size Zip Size Zip Type
INTERP.C 17098 4636 deflated
INTERP.H 1830 818 deflated
README 1668 941 deflated
SYNTAX.BNF 356 211 deflated

Download File INTERP11.ZIP Here

Contents of the README file

In September of 1991, someone posted a request on FidoNet's C_ECHO
requesting for an expression evaluator similar to one that was
available for QuickBASIC. After a couple of weeks of (admittedly
on-and-off) work, I posted version 1.0 of INTERP on the echo in six
rather large messages.

When Bob Stout discovered that numbers couldn't start with a decimal
point, he encouraged me to change it. At that time, I also read P. J.
Plauger's "Standard C" column in the C USER'S JOURNAL, which detailed
why my usage of setjmp() was decidedly nonstandard. For version 1.1,
I have changed the code to satisfy both Robert B. Stout and ANSI.

However, since the snippets are for code posted on the C_ECHO and
because I judge this to be quite a bit too large for posting there, I
am releasing it via the PDN. This has prompted Bob to produce his own
expression evaluator which WAS released onto the echo and which WILL
be in snippets, but that's beside the point.

This "library" is only provided in source so that it could be used by
people who use compilers that I don't have. It should compile and
work on any ANSI-compatable compiler. I don't think I made any
assumptions about the runtime environment other than that. If you
want to try it out with a simple command-line interface, just compile
it with the macro DEBUG defined and run it.

Otherwise, just compile it to object code and link it in to whatever
you want to use it with. There should be sufficient documentation in
the source to allow any reasonably skilled programmer to use this.

Good Luck.

Jonathan R. Guthrie
(Fido 1:106/2000.25)
(Bix jguthrie)
(Delphi SCIGUY)

 December 9, 2017  Add comments

 Leave a Reply

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>