X-Git-Url: https://ruin.nu/git/?p=proglang.git;a=blobdiff_plain;f=Abssyntax.hs;h=d8ef904d06766fd3ccab71ee41d1ed9e9ceb319b;hp=7c95d5324e1a58ef1a8f32b099d16fb0babcac42;hb=2c2f90fca1005f6dedc69ee7f3d7c5072e5c123b;hpb=b33c4977fff6bad375551eaf4fed0aa06daf1c88 diff --git a/Abssyntax.hs b/Abssyntax.hs index 7c95d53..d8ef904 100644 --- a/Abssyntax.hs +++ b/Abssyntax.hs @@ -15,17 +15,17 @@ data Stm = deriving (Eq,Ord,Show) data Exp = - BExp Exp BOp Exp + EAss Ident Exp | EVar Ident - | EAss Ident Exp | EInt Integer | ENeg Exp + | ENot Exp | EBool Bool | EReadI | EReadB | ExpT Type Exp | EDefault - | OpExp Exp Op Exp + | BiOpExp Exp Op Exp | EPost Ident Op deriving (Eq,Ord,Show) @@ -33,17 +33,14 @@ data Stms = Program [Stm] deriving (Eq,Ord,Show) -data BOp = +data Op = Lt | ELt | Gt | EGt | Eq | NEq - deriving (Eq,Ord,Show) - -data Op = - Plus + | Plus | Minus | Times | Div