-- UUAGC 0.9.50.2 (src-ag/Language/EWE/AbsSyn.ag) module Language.EWE.AbsSyn where -- Cond -------------------------------------------------------- {- alternatives: alternative CLET: alternative CLT: alternative CGET: alternative CGT: alternative CE: alternative CNE: -} data Cond = CLET | CLT | CGET | CGT | CE | CNE deriving ( Eq,Show) -- Equ --------------------------------------------------------- {- alternatives: alternative Tuple: child x1 : {String} child x2 : {Int} -} type Equ = ( (String),(Int)) -- Equates ----------------------------------------------------- {- alternatives: alternative Cons: child hd : Equ child tl : Equates alternative Nil: -} type Equates = [Equ] -- Instr ------------------------------------------------------- {- alternatives: alternative IMMI: child dest : MRef child int : {Int} alternative IMMS: child dest : MRef child string : {String} alternative IMRPC: child dest : MRef child int : {Int} alternative SPC: child oper : MRef alternative IMMM: child dest : MRef child oper : MRef alternative IAdd: child dest : MRef child left : MRef child right : MRef alternative ISub: child dest : MRef child left : MRef child right : MRef alternative IMul: child dest : MRef child left : MRef child right : MRef alternative IDiv: child dest : MRef child left : MRef child right : MRef alternative IMod: child dest : MRef child left : MRef child right : MRef alternative IMRI: child dest : MRef child oper : MRef child int : {Int} alternative IMMR: child dest : MRef child int : {Int} child oper : MRef alternative IRI: child oper : MRef alternative IWI: child oper : MRef alternative IRS: child left : MRef child right : MRef alternative IWS: child oper : MRef alternative IGI: child int : {Int} alternative IGS: child string : {String} alternative IFI: child bcond : MRef child cond : Cond child then : MRef child int : {Int} alternative IFS: child bcond : MRef child cond : Cond child then : MRef child string : {String} alternative IH: alternative IB: alternative INI: -} data Instr = IMMI (MRef) (Int) | IMMS (MRef) (String) | IMRPC (MRef) (Int) | SPC (MRef) | IMMM (MRef) (MRef) | IAdd (MRef) (MRef) (MRef) | ISub (MRef) (MRef) (MRef) | IMul (MRef) (MRef) (MRef) | IDiv (MRef) (MRef) (MRef) | IMod (MRef) (MRef) (MRef) | IMRI (MRef) (MRef) (Int) | IMMR (MRef) (Int) (MRef) | IRI (MRef) | IWI (MRef) | IRS (MRef) (MRef) | IWS (MRef) | IGI (Int) | IGS (String) | IFI (MRef) (Cond) (MRef) (Int) | IFS (MRef) (Cond) (MRef) (String) | IH | IB | INI deriving ( Eq,Show) -- Labels ------------------------------------------------------ {- alternatives: alternative Cons: child hd : {String} child tl : Labels alternative Nil: -} type Labels = [(String)] -- MRef -------------------------------------------------------- {- alternatives: alternative MRefI: child int : {Int} alternative MRefId: child string : {String} -} data MRef = MRefI (Int) | MRefId (String) deriving ( Eq,Show) -- Prog -------------------------------------------------------- {- alternatives: alternative Prg: child stms : Stmts child equates : Equates -} data Prog = Prg (Stmts) (Equates) deriving ( Eq,Show) -- Stmt -------------------------------------------------------- {- alternatives: alternative Stmt: child labels : Labels child instr : Instr -} data Stmt = Stmt (Labels) (Instr) deriving ( Eq,Show) -- Stmts ------------------------------------------------------- {- alternatives: alternative Cons: child hd : Stmt child tl : Stmts alternative Nil: -} type Stmts = [Stmt]