More Coming Soon

Mathwork: Algebraic Expression Compiler

Since 2001, whenever I've produced an upgrade to EBNF, I followed the same testing routine. Unit test the modules, integration testing, and practical testing by writing an algebraic expression parser and a pseudo-code design language (i.e. upgrade to P4).

For 2009, I decided to create an algebraic expression parser that also compiled code as an example of how to go about creating a compiler with EBNF 4.0. The Mathwork EBNF 4.0 application evolved from that work.

Mathwork reads and parses a text file of formatted mathematical statements and compiles FORTH code that is written to a new text file along with the actual results of the algebraic expressions for each stage of source file statements. The FORTH code is in a ready to use form and can be cut and pasted into a FORTH source file.

The more I used Mathwork, the more I realized how much fun it is and useful it might be to others. More documentation will be listed here as it becomes available.

Some Mathwork highlights:

  • ANS Floating point Numbers
  • X^(expression) Powers
  • Any Root of X and SQRT
  • ABS(expression)
  • Log to base 10, e, or any expression
  • Trig Functions
  • Irrational Numbers i, j
  • pi, phi Ratios
  • (expression)! Factorials for X <= 170
  • Implied multiplication like 4X, X(a/b) or 2sin(x)
  • Results shown in order per statement block
  • Named variables with no interference with FORTH variables
  • Compilation space reclaimed when completed
  • Named Function stand-ins like f(x)
  • Single and multi-line comments
  • Compiled FORTH source code for all expressions including variables formatted line-by-line for ease of use
  • Familiar, easy "For/Where" source statement structure







word to html converter html help workshop This Web Page Created with PageBreeze Free Website Builder  chm editor perl editor ide