3 ms·
Fexl meta-parsing and symbol resolution radically simplified.
- fexl 15y agoInstead of the complex chaining mechanism I used before, the Fexl meta-parser is now like this: Parse the source text, returning (pair ok; pair exp; symbols). ok is true if the source is well-formed, i.e. no syntax errors. If ok is true, exp is the parsed expression. If ok is false, exp is the string error message. symbols is the list of all symbols used but not defined within the source text. It is a list of entries (pair sym line_no), where line_no is the line number on which the symbol first occurred. If ok is true, then the caller can take the exp and successively apply the definitions of each symbol in the symbols list. The result will be the actual executable function which can then be run with "eval" in the Fexl intepreter.