]> ruin.nu Git - proglang.git/blobdiff - syntax.cf
replace E with in
[proglang.git] / syntax.cf
index 7b84054391014ef81d22f0f03d8e8866af3049ce..0347ce56e2982362825fb40f7ec2582f778e9690 100644 (file)
--- a/syntax.cf
+++ b/syntax.cf
@@ -1,14 +1,21 @@
 
 -- ordinary rules
 
+
+True.    Bool ::= "true" ;
+False.   Bool ::= "false" ;
+
+TInt.   Type  ::= "int" ;
+TBool.  Type  ::= "bool" ;
+
 Program.  Stms ::= [Stm] ;
 
 
-SExp.     Stm      ::= Exp ";" ;
-SBlock.   Stm      ::= "{" [Stm] "}" ;
-SDecl.   Stm      ::= Type Ident "=" Exp ";" ;
-decl.    Stm      ::= Type Ident ";" ;
-define decl t v = SDecl t  v EDefault ;
+SExp.      Stm      ::= Exp ";" ;
+SBlock.    Stm      ::= "{" [Stm] "}" ;
+SDecl. Stm ::= Type Ident "=" Exp ";" ;
+SDeclD. Stm ::= Type Ident ";" ;
+
 
 SWhile.   Stm      ::= "while" "(" Exp ")" Stm ;
 SIf.     Stm      ::= "if" "(" Exp ")" Stm "else" Stm ;
@@ -74,21 +81,16 @@ _. Op ::= Op2;
 _. Op ::= Op0;
 
 
-True.    Bool ::= "true" ;
-False.   Bool ::= "false" ;
-
-TInt.   Type  ::= "int" ;
-TBool.  Type  ::= "bool" ;
-
 -- pragmas
 
-internal ExpT. Exp ::= Type Exp ;
-internal SNoop. Stm ::= ;
-internal EDefault. Exp ::= ;
+-- internal ExpT. Exp ::= Type Exp ;
+-- internal EDefault. Exp ::= ;
 internal BiOpExp. Exp ::= Exp Op Exp ;
-internal NoType. Type ::= ;
+-- internal NoType. Type ::= ;
 internal EPost. Exp ::= Ident Op1 ;
 
+internal SNoop. Stm ::= ;
+
 comment "/*" "*/" ;
 comment "//" ;