]> ruin.nu Git - proglang.git/blobdiff - Parsyntax.y
moved modified Testsyntax to Typechecker to keep the original one
[proglang.git] / Parsyntax.y
index 8bf7c6812d4ca3074be5f2e493c57b5359353263..f75fff6d2eebaa3458074b030d5c7b70b0de7f1d 100644 (file)
@@ -70,8 +70,8 @@ Stm : Type Ident '=' Exp ';' { SDecl $1 $2 $4 }
 
 
 Exp :: { Exp }
-Exp : Exp1 BOp Exp1 { BExp $1 $2 $3 } 
-  | Ident '=' Exp { EAss $1 $3 }
+Exp : Ident '=' Exp { EAss $1 $3 } 
+  | Exp1 BOp Exp1 { BExp $1 $2 $3 }
   | Exp1 { $1 }
 
 
@@ -94,11 +94,7 @@ Exp3 : Ident '++' { postIncr_ $1 }
   | Bool { EBool $1 }
   | 'readInt' { EReadI }
   | 'readBool' { EReadB }
-  | Exp4 { $1 }
-
-
-Exp4 :: { Exp }
-Exp4 : '(' Exp ')' { $2 } 
+  | '(' Exp ')' { $2 }
 
 
 ListStm :: { [Stm] }