|
VOID | inictable () |
|
KEYWORD * | findcommand (UBYTE *in) |
|
int | ParenthesesTest (UBYTE *sin) |
|
UBYTE * | SkipAName (UBYTE *s) |
|
UBYTE * | IsRHS (UBYTE *s, UBYTE c) |
|
int | IsIdStatement (UBYTE *s) |
|
int | CompileAlgebra (UBYTE *s, int leftright, WORD *prototype) |
|
int | CompileStatement (UBYTE *in) |
|
int | TestTables () |
|
int | CompileSubExpressions (SBYTE *tokens) |
|
int | CodeGenerator (SBYTE *tokens) |
|
int | CompleteTerm (WORD *term, UWORD *numer, UWORD *denom, WORD nnum, WORD nden, int sign) |
|
int | CodeFactors (SBYTE *tokens) |
|
WORD | GenerateFactors (WORD n, WORD inc) |
|
The heart of the compiler. It contains the tables of statements. It finds the statements in the tables and calls the proper routines. For algebraic expressions it runs the compilation by first calling the tokenizer, splitting things into subexpressions and generating the code. There is a system for recognizing already existing subexpressions. This economizes on the length of the output.
Note: the compiler of FORM doesn't attempt to normalize the input. Hence x+1 and 1+x are different objects during compilation. Similarly (a+b-b) will not be simplified to (a).
Definition in file compiler.c.