home *** CD-ROM | disk | FTP | other *** search
/ ProfitPress Mega CDROM2 …eeware (MSDOS)(1992)(Eng) / ProfitPress-MegaCDROM2.B6I / PROG / PASCAL / PARSE10.ZIP / PARSER.DOC < prev    next >
Encoding:
Text File  |  1991-06-14  |  2.7 KB  |  68 lines

  1. *******************************************************************************
  2. *                                   parser                                    *
  3. * recursive decent expression parser for turbo-pascal, Loewy Ron, 1991.       *
  4. * parser.doc, Last Update :                  Jun. 14, 1991.                   *
  5. *******************************************************************************
  6.  
  7. Introduction
  8. ------------
  9.  
  10.   Parser is a recursive decent expression parser unit for Turbo-Pascal, this 
  11.  unit includes the 5 basic math. operators (+ - * / ^), and some basic
  12.  mathematical functions (sin, exp, cos, ln, log10, log2, abs, arctan, sqr,
  13.  sqrt, tan, cotan, arcsin, arccos) and 2 constants (pi, e). Parser can be 
  14.  used to receive formula input from the user, and perform the neccessary 
  15.  calculations during program runtime. Parser supports 10 general purpose
  16.  variables (v0, v1, .., v9) that can be set (using the = operator) and used
  17.  in formulas by the user.
  18.  
  19. Operation
  20. ---------
  21.  
  22.   Simply use parser unit in your program using the USES clause, when ever you
  23.  want to parse a string formula do :
  24.         macro := stringFormula; { stringFormula is where you've got the formula }
  25.         myResult := getExpr(validity);
  26.         if (validity = false) then
  27.                 tellError { the formula has an error at the errAt byte }
  28.         else
  29.                 tellResult(myResult);
  30.  
  31.   Please notice - the source code is provided, so you will probably find it
  32.  easy to understand that example after you will look into the code.
  33.  
  34. Warranty
  35. --------
  36.  
  37.   There is no warranty what so ever, The unit and docs. are supplied as is,
  38.  The author (Loewy Ron), is not, and will not be responsible for any damages,
  39.  lost profits, or inconveniences caused by the use, or inability to
  40.  use this unit. The use of the unit is at your own risk. By using the unit
  41.  you agree to this.
  42.  
  43. General
  44. -------
  45.  
  46.   parser is copyrighted by myself, (c) Loewy Ron, 1990, 1991. I release
  47.  the source, and it can be used for non-commercial programs, If you find
  48.  parser worthy, and plan to use it in a commercial product - please
  49.  register it. (An order form is supplied - ORDER.TXT)
  50.  
  51.   No one but myself, is allowed to charge money for parser, 
  52.  except then minimal distribution fees.
  53.  
  54. Contact
  55. -------
  56.  
  57.   You can contact me on what-ever you want to at my address at :
  58.  
  59.           Loewy Ron,                            Loewy Ron
  60.           9 Haneveem st.            Or          20 Smolanskin st.
  61.           Herzeliya, 46465,                     Haifa, 34366,
  62.           Israel.                               Israel.
  63.  
  64. Credits
  65. -------
  66.  
  67.   Turbo-Pascal is a copyright of Borland International. 
  68.