Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Pascal Форум Информер Страны мира
   Разбор и Анализ Строк    >>    fpars_00
   
 
 FParser - Translator/Interpreter from Infix to Token   Keith S. Brown 03.09.1993

FParser (Function PARSER) translates a function or expression written in infix notation (as per Pascal or Ada) and translates it to tokenized RPN (Reverse Polish Notation). The Tokenized RPN can then be interpreted as many times as required with new values in the expression. FParser has a number of standard (built-in) mathematical functions plus a few others from Digital Signal Processing.



24k 
 

FPARSER (UNIT) LIBRARY REFERENCE Version - 0.00 File - FPARSER.PAS Copyright - None. Public Domain. Author - Keith S. Brown (except where otherwise noted) Surface mail: Email:(brown@smd4.jsc.nasa.gov) K.Brown Code:NASA/JSC/ES64 Houston, TX 77058 (USA) Voice:713-483-8952 Purpose - 1. Translate an infix expression to tokenized RPN. 2. Execute a tokenized RPN expression. Language - Borland International's Turbo Pascal V:4.x+ for MS-DOS Remarks - Handles standard Pascal computational assignment expressions. With some differences, ie.:  as per Ada, numeric values may contain embedded underscores.  only the first 63 characters of an identifier are significant  the semi-colon terminating an expression is optional.  the extended unary functions "ArcCos", "ArcSin", "Log" (base 10), "Sign", "Step", "Tan" are available as well as the standard Pascal unary functions "Abs", "ArcTan", "Cos", "Exp", "Ln", "Round", "Sin", "Sqr", "Sqrt", "Trunc".  the extended binary operators "^" (as in x^3, cube of x) are available as well as the standard Pascal binary operators of "+", "-", "*", "/", "DIV", and "MOD".  the extended trinary functions: "Gate(x,cntr,wide:REAL):REAL;" (rectangular pulse), "Gaus(x,cntr,varia