]> ruin.nu Git - proglang.git/commitdiff
needed
authorMichael Andreen <harv@ruin.nu>
Fri, 24 Feb 2006 14:38:31 +0000 (14:38 +0000)
committerMichael Andreen <harv@ruin.nu>
Fri, 24 Feb 2006 14:38:31 +0000 (14:38 +0000)
Abssyntax.hs [new file with mode: 0644]

diff --git a/Abssyntax.hs b/Abssyntax.hs
new file mode 100644 (file)
index 0000000..7c95d53
--- /dev/null
@@ -0,0 +1,57 @@
+module Abssyntax where
+
+-- Haskell module generated by the BNF converter
+
+newtype Ident = Ident String deriving (Eq,Ord,Show)
+
+data Stm =
+   SDecl Type Ident Exp
+ | SExp Exp
+ | SBlock [Stm]
+ | SIf Exp Stm Stm
+ | SWhile Exp Stm
+ | SPrint Exp
+ | SNoop
+  deriving (Eq,Ord,Show)
+
+data Exp =
+   BExp Exp BOp Exp
+ | EVar Ident
+ | EAss Ident Exp
+ | EInt Integer
+ | ENeg Exp
+ | EBool Bool
+ | EReadI
+ | EReadB
+ | ExpT Type Exp
+ | EDefault
+ | OpExp Exp Op Exp
+ | EPost Ident Op
+  deriving (Eq,Ord,Show)
+
+data Stms =
+   Program [Stm]
+  deriving (Eq,Ord,Show)
+
+data BOp =
+   Lt
+ | ELt
+ | Gt
+ | EGt
+ | Eq
+ | NEq
+  deriving (Eq,Ord,Show)
+
+data Op =
+   Plus
+ | Minus
+ | Times
+ | Div
+  deriving (Eq,Ord,Show)
+
+data Type =
+   TInt
+ | TBool
+ | NoType
+  deriving (Eq,Ord,Show)
+