\hypertarget{compiler_8c}{}\doxysection{compiler.\+c File Reference}
\label{compiler_8c}\index{compiler.c@{compiler.c}}
{\ttfamily \#include \char`\"{}form3.\+h\char`\"{}}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structSuBbUf}{Su\+Bb\+Uf}}
\end{DoxyCompactItemize}
\doxysubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{compiler_8c_ae2a2c4999221d9e86d386de8c11e6e03}\label{compiler_8c_ae2a2c4999221d9e86d386de8c11e6e03}} 
\#define {\bfseries OPTION0}~1
\item 
\mbox{\Hypertarget{compiler_8c_ae2b2723e102e68ee4336a9cebce312af}\label{compiler_8c_ae2b2723e102e68ee4336a9cebce312af}} 
\#define {\bfseries OPTION1}~2
\item 
\mbox{\Hypertarget{compiler_8c_adee56d1cf782a84b62c90d459e50bcd1}\label{compiler_8c_adee56d1cf782a84b62c90d459e50bcd1}} 
\#define {\bfseries OPTION2}~3
\item 
\#define {\bfseries REDUCESUBEXPBUFFERS}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{compiler_8c_ae67e4aa2b4f8fada5432cb44b21b2001}\label{compiler_8c_ae67e4aa2b4f8fada5432cb44b21b2001}} 
typedef struct \mbox{\hyperlink{structSuBbUf}{Su\+Bb\+Uf}} {\bfseries SUBBUF}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{compiler_8c_a3492f34e53a19d873f81f2df7ce53a90}\label{compiler_8c_a3492f34e53a19d873f81f2df7ce53a90}} 
VOID {\bfseries inictable} ()
\item 
\mbox{\Hypertarget{compiler_8c_aca00a3b726b959da3c89772fe1d63f8f}\label{compiler_8c_aca00a3b726b959da3c89772fe1d63f8f}} 
\mbox{\hyperlink{structKEYWORD}{KEYWORD}} $\ast$ {\bfseries findcommand} (UBYTE $\ast$in)
\item 
\mbox{\Hypertarget{compiler_8c_a03d7ec977ee4c9ff99bb2d630f91e07a}\label{compiler_8c_a03d7ec977ee4c9ff99bb2d630f91e07a}} 
int {\bfseries Parentheses\+Test} (UBYTE $\ast$sin)
\item 
\mbox{\Hypertarget{compiler_8c_a0a2f18b5aeba4d9393637ea2b7514285}\label{compiler_8c_a0a2f18b5aeba4d9393637ea2b7514285}} 
UBYTE $\ast$ {\bfseries Skip\+AName} (UBYTE $\ast$s)
\item 
\mbox{\Hypertarget{compiler_8c_af67269af40040aeaae06e43ae9fc425e}\label{compiler_8c_af67269af40040aeaae06e43ae9fc425e}} 
UBYTE $\ast$ {\bfseries Is\+RHS} (UBYTE $\ast$s, UBYTE c)
\item 
\mbox{\Hypertarget{compiler_8c_a15fa5e4557a29293da52ce4de7ac6d75}\label{compiler_8c_a15fa5e4557a29293da52ce4de7ac6d75}} 
int {\bfseries Is\+Id\+Statement} (UBYTE $\ast$s)
\item 
\mbox{\Hypertarget{compiler_8c_a33f783f2265cb7d977eec1804c4e8182}\label{compiler_8c_a33f783f2265cb7d977eec1804c4e8182}} 
int {\bfseries Compile\+Algebra} (UBYTE $\ast$s, int leftright, WORD $\ast$prototype)
\item 
\mbox{\Hypertarget{compiler_8c_aa6d840e8f441ad7c41dc831980d3a4d3}\label{compiler_8c_aa6d840e8f441ad7c41dc831980d3a4d3}} 
int {\bfseries Compile\+Statement} (UBYTE $\ast$in)
\item 
\mbox{\Hypertarget{compiler_8c_ac6ef1311a474d1da2f4d1beac222f9f1}\label{compiler_8c_ac6ef1311a474d1da2f4d1beac222f9f1}} 
int {\bfseries Test\+Tables} ()
\item 
\mbox{\Hypertarget{compiler_8c_ab808b1657fdb1e4314de97ccfafc1bb5}\label{compiler_8c_ab808b1657fdb1e4314de97ccfafc1bb5}} 
int {\bfseries Compile\+Sub\+Expressions} (SBYTE $\ast$tokens)
\item 
\mbox{\Hypertarget{compiler_8c_aeeb95eabca62cfe0209d146648a2c62d}\label{compiler_8c_aeeb95eabca62cfe0209d146648a2c62d}} 
int {\bfseries Code\+Generator} (SBYTE $\ast$tokens)
\item 
\mbox{\Hypertarget{compiler_8c_a924cf25ada6a66e9050f861464c14933}\label{compiler_8c_a924cf25ada6a66e9050f861464c14933}} 
int {\bfseries Complete\+Term} (WORD $\ast$term, UWORD $\ast$numer, UWORD $\ast$denom, WORD nnum, WORD nden, int sign)
\item 
\mbox{\Hypertarget{compiler_8c_a5cb8628aaac5187d1843091dcd987081}\label{compiler_8c_a5cb8628aaac5187d1843091dcd987081}} 
int {\bfseries Code\+Factors} (SBYTE $\ast$tokens)
\item 
\mbox{\Hypertarget{compiler_8c_a715c7561e73a1ba9b14336868d8dbcec}\label{compiler_8c_a715c7561e73a1ba9b14336868d8dbcec}} 
WORD {\bfseries Generate\+Factors} (WORD n, WORD inc)
\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{compiler_8c_a484740f6025b23a41c92e56ada1fdf45}\label{compiler_8c_a484740f6025b23a41c92e56ada1fdf45}} 
int {\bfseries alfatable1} \mbox{[}27\mbox{]}
\item 
\mbox{\Hypertarget{compiler_8c_aaf5e10b0746604bc39a846fc89620040}\label{compiler_8c_aaf5e10b0746604bc39a846fc89620040}} 
\mbox{\hyperlink{structSuBbUf}{SUBBUF}} $\ast$ {\bfseries subexpbuffers} = 0
\item 
\mbox{\Hypertarget{compiler_8c_aae21f1a3196c40fef0dbe97a2d9a1851}\label{compiler_8c_aae21f1a3196c40fef0dbe97a2d9a1851}} 
\mbox{\hyperlink{structSuBbUf}{SUBBUF}} $\ast$ {\bfseries topsubexpbuffers} = 0
\item 
\mbox{\Hypertarget{compiler_8c_a7626d26bc4101b4e9ffa7d68c10074e0}\label{compiler_8c_a7626d26bc4101b4e9ffa7d68c10074e0}} 
LONG {\bfseries insubexpbuffers} = 0
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
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\textquotesingle{}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). 

\doxysubsection{Macro Definition Documentation}
\mbox{\Hypertarget{compiler_8c_aa6841dc27e18ee448c47965596cb3713}\label{compiler_8c_aa6841dc27e18ee448c47965596cb3713}} 
\index{compiler.c@{compiler.c}!REDUCESUBEXPBUFFERS@{REDUCESUBEXPBUFFERS}}
\index{REDUCESUBEXPBUFFERS@{REDUCESUBEXPBUFFERS}!compiler.c@{compiler.c}}
\doxysubsubsection{\texorpdfstring{REDUCESUBEXPBUFFERS}{REDUCESUBEXPBUFFERS}}
{\footnotesize\ttfamily \#define REDUCESUBEXPBUFFERS}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{    \{ \textcolor{keywordflow}{if} ( (topsubexpbuffers-\/subexpbuffers) > 256 ) \{\(\backslash\)}
\DoxyCodeLine{    M\_free(subexpbuffers,\textcolor{stringliteral}{"{}subexpbuffers"{}});\(\backslash\)}
\DoxyCodeLine{    subexpbuffers = (\mbox{\hyperlink{structSuBbUf}{SUBBUF}} *)Malloc1(256*\textcolor{keyword}{sizeof}(\mbox{\hyperlink{structSuBbUf}{SUBBUF}}),\textcolor{stringliteral}{"{}subexpbuffers"{}});\(\backslash\)}
\DoxyCodeLine{    topsubexpbuffers = subexpbuffers+256; \} insubexpbuffers = 0; \}}

\end{DoxyCode}


Definition at line 248 of file compiler.\+c.

