by Linguar Amadala (4 Submissions)
Category: Miscellaneous
Compatability: Visual Basic 5.0
Difficulty: Advanced
Date Added: Wed 3rd February 2021
Rating:
(3 Votes)

Evaluates the input text and returns the result. Supports: multiple-argument functions, strings, octal, hexadecimal and decimal numbers, Recursion based method calls (as long as your stack holds out, it should be able to handle what you put into it)
Inputs
The Code to be interpreted
Assumes
Uses Lexical Analysis to break up input into a stream of tokens that will be sent (during evaluation) to a semantic expression parser, which orders the expression in proper order of operations.. After both steps are done it's passed onto a third procedure, the interpreter during the evaluation process
Code Returns
The Semantic Expression Structure
Side Effects
If you press the "Go" button on the multiple evaluate section (middle of the three), and you don't change it from the default value of 1000 (in the text box shown) it will evaluate 1000 times before stopping.
The only drawback of this method is it is inevitably going to have speed difficulties with complex operations if needed thousands of times, due to recursion.
Download Expression Evaluator (with function support) (31 KB)