\begin_layout Plain Layout
- | FuncApp
+ | BasicExp
\end_layout
\begin_layout Plain Layout
- | BasicExp
+ | FuncApp
\end_layout
\begin_layout Plain Layout
\begin_layout Plain Layout
-FuncApp := BasicExp '(' ParamList ')'
+FuncApp := BasicExp '(' ExpList ')'
\end_layout
\begin_layout Plain Layout
\begin_layout Plain Layout
-ParamList := '(' (Expression (',' Expression)*)? ')'
-\end_layout
-
-\begin_layout Plain Layout
-
-\end_layout
-
-\begin_layout Plain Layout
-
ExpList := Expression*
\end_layout
{
AST* ret = NULL;
- // Expression := CoreForm
- // | BasicExp
- // | FuncApp
- //
- // CoreForm := 'define' ID Expression TERM
- // | 'set!' ID Expression TERM
- // | 'begin' ExpList* TERM
- // | 'quote' ExpList* TERM
- // | 'if' Expression Expression 'else' Expression? TERM
- // | 'lambda' IdList ExpList? TERM
- // | 'macro' IdList ExpList? TERM
- // | 'syntax' ID IdList ID ExpList TERM
- //
- // FuncApp := BasicExp '(' ParamList ')'
- //
- // BasicExp := MacroName ExpList? TERM
- // | '(' Expression (ID Expression)* ')'
- // | Literal
- //
- // Literal := ID
- // | CHAR
- // | SYMBOL
- // | STRING
- // | NUMBER
- //
- // ParamList := '(' (Expression (',' Expression)*)? ')'
- //
- // ExpList := Expression*
- //
- // IdList := '(' ID* ')'
- //
-
if( isCoreFormName() )
{
ret = CoreForm();