]> git.mdlowis.com Git - archive/dlang.git/commitdiff
Updated EBNF and removed it from parser source
authorMike D. Lowis <mike@mdlowis.com>
Tue, 29 May 2012 20:19:42 +0000 (16:19 -0400)
committerMike D. Lowis <mike@mdlowis.com>
Tue, 29 May 2012 20:19:42 +0000 (16:19 -0400)
docs/language_spec/language.lyx
source/dlparser/dlparser.cpp

index 2b4169cbba39ca2582d39cf06775a0e0ab23ed04..9275e52b42efde91c75685c859a7fead10b1801b 100644 (file)
@@ -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
 
index 63bef51e5a56355cf2399d5b7e428a6fa9da328c..6b435ae8b2564e6aba7256fd53cb566b7b4991cd 100644 (file)
@@ -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();