🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.misc
Article #25

Re: Writing an expression evaluator

#25
From: G. C. Straty
Date: Fri, 16 Feb 1996 23:57
28 lines
1985 bytes
Aristotle wrote:
> 
> Does anyone have any tips on how to go about writing an expression
> evaluator(one complex enough to handle Trig. functions). I am writing a
> program that uses expression and I would like to have the user be able to
>  enter their own expressions and have my program implement them. Any help
>  would be appreciated. Thanks in advance!
> 
>                                 John M. "Aristotle" De CristofaroAristotle wrote:
> 
> Does anyone have any tips on how to go about writing an expression
> evaluator(one complex enough to handle Trig. functions). I am writing a
> program that uses expression and I would like to have the user be able to
>  enter their own expressions and have my program implement them. Any help
>  would be appreciated. Thanks in advance!
> 
>                                 John M. "Aristotle" De Cristofaro

Borland Pascal-3 (if you can remember that far back) included
source code for what they called MicroCalc, sample code for a basic 
spread sheet. In that code was a reasonably good function 
interpreter and evaluator which I have used often with good results. 
It will handle fairly complicated expressions as long as parens are
not to deep. In digging through my stack of old 5.25 DDs I found I still 
have it. If you are interested, I would be happy to make it
available to you.

straty@bldrdoc.gov
Technical Details
Message-ID: <312519F6.45E4@harrier.bldrdoc.gov>
Path: arc1-ca.pugleaf.net!central.bldrdoc.gov!news
References: <311FEBD8.7305@cnj.digex.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!central.bldrdoc.gov!news
From: "G. C. Straty" <straty@harrier.bldrdoc.gov>
Newsgroups: comp.lang.pascal.misc,comp.lang.pascal.borland,comp.programming,comp.lang.misc,comp.lang.c,comp.lang.c++
Subject: Re: Writing an expression evaluator
Date: Fri, 16 Feb 1996 16:57:42 -0700
Organization: NIST
Message-ID: <312519F6.45E4@harrier.bldrdoc.gov>
References: <311FEBD8.7305@cnj.digex.net>
NNTP-Posting-Host: harrier.bldrdoc.gov
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Mailer: Mozilla 2.0b6b (Win16; I)
CC: straty@bldrdoc.gov