From: Mike D. Lowis Date: Tue, 29 May 2012 20:19:42 +0000 (-0400) Subject: Updated EBNF and removed it from parser source X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=477cb219505dd2e73db1fa257af34530fbab93e4;p=archive%2Fdlang.git Updated EBNF and removed it from parser source --- diff --git a/docs/language_spec/language.lyx b/docs/language_spec/language.lyx index 2b4169c..9275e52 100644 --- a/docs/language_spec/language.lyx +++ b/docs/language_spec/language.lyx @@ -490,12 +490,12 @@ Expression := CoreForm \begin_layout Plain Layout - | FuncApp + | BasicExp \end_layout \begin_layout Plain Layout - | BasicExp + | FuncApp \end_layout \begin_layout Plain Layout @@ -548,7 +548,7 @@ CoreForm := 'define' ID Expression \begin_layout Plain Layout -FuncApp := BasicExp '(' ParamList ')' +FuncApp := BasicExp '(' ExpList ')' \end_layout \begin_layout Plain Layout @@ -605,15 +605,6 @@ Literal := ID \begin_layout Plain Layout -ParamList := '(' (Expression (',' Expression)*)? ')' -\end_layout - -\begin_layout Plain Layout - -\end_layout - -\begin_layout Plain Layout - ExpList := Expression* \end_layout diff --git a/source/dlparser/dlparser.cpp b/source/dlparser/dlparser.cpp index 63bef51..6b435ae 100644 --- a/source/dlparser/dlparser.cpp +++ b/source/dlparser/dlparser.cpp @@ -55,38 +55,6 @@ AST* DLParser::Expression(void) { 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();