equal
deleted
inserted
replaced
91 at the term level, {\tt ("_abs" x $t$)} will become an {\tt Abs} node and |
91 at the term level, {\tt ("_abs" x $t$)} will become an {\tt Abs} node and |
92 occurrences of {\tt x} in $t$ will be replaced by bound variables (the term |
92 occurrences of {\tt x} in $t$ will be replaced by bound variables (the term |
93 constructor \ttindex{Bound}). |
93 constructor \ttindex{Bound}). |
94 |
94 |
95 |
95 |
96 \section{Transforming parse trees to \AST{}s}\label{sec:astofpt} |
96 \section{Transforming parse trees to ASTs}\label{sec:astofpt} |
97 \index{ASTs!made from parse trees} |
97 \index{ASTs!made from parse trees} |
98 \newcommand\astofpt[1]{\lbrakk#1\rbrakk} |
98 \newcommand\astofpt[1]{\lbrakk#1\rbrakk} |
99 |
99 |
100 The parse tree is the raw output of the parser. Translation functions, |
100 The parse tree is the raw output of the parser. Translation functions, |
101 called {\bf parse AST translations}\indexbold{translations!parse AST}, |
101 called {\bf parse AST translations}\indexbold{translations!parse AST}, |
179 The names of constant heads in the \AST{} control the translation process. |
179 The names of constant heads in the \AST{} control the translation process. |
180 The list of constants invoking parse \AST{} translations appears in the |
180 The list of constants invoking parse \AST{} translations appears in the |
181 output of {\tt print_syntax} under {\tt parse_ast_translation}. |
181 output of {\tt print_syntax} under {\tt parse_ast_translation}. |
182 |
182 |
183 |
183 |
184 \section{Transforming \AST{}s to terms}\label{sec:termofast} |
184 \section{Transforming ASTs to terms}\label{sec:termofast} |
185 \index{terms!made from ASTs} |
185 \index{terms!made from ASTs} |
186 \newcommand\termofast[1]{\lbrakk#1\rbrakk} |
186 \newcommand\termofast[1]{\lbrakk#1\rbrakk} |
187 |
187 |
188 The \AST{}, after application of macros (see \S\ref{sec:macros}), is |
188 The \AST{}, after application of macros (see \S\ref{sec:macros}), is |
189 transformed into a term. This term is probably ill-typed since type |
189 transformed into a term. This term is probably ill-typed since type |