Mathics Core Interpreter Overview¶
At its heart, the Mathics interpreter works over S-expressions: combinations of nested and/or sequenced lists, pretty much the same as simple Lisp interpreters work. See also Everything is an Expression.
When you enter a string to Mathics there is a 3-step process:
the input string is parsed to
FullFormS-expression is evaluated giving another S-expression
The result is formatted to the kind of output desired. Formatting can cause additional evaluations to occurs
This is mentioned from the user perspective in the Figure “Steps in the operation of Wolfram Language”
Each of the above steps can be involved, so we break these down below.
- Top-level Eval and Display
- Scanning and Parsing
- AST, S-Expression, General List: same thing
- Evaluation of an Expression
- Forms, Boxes, and Formats
- Object Classes