packages feed

tiger-1.0: derived/TigerAS.hs

-- UUAGC 0.9.5 (src/TigerAS.ag)
module TigerAS where


import TigerTypes
import UU.Scanner.Position
-- Args --------------------------------------------------------
type Args = [Expr]
-- AssignField -------------------------------------------------
data AssignField = AssignField (VarIdent) (Expr)
-- AssignFields ------------------------------------------------
type AssignFields = [AssignField]
-- DeclGroup ---------------------------------------------------
data DeclGroup = FunDecs (FunDecs)
               | TypeDecs (TypeDecs)
               | VarDec (Pos) (VarIdent) (Maybe TypeIdent) (Expr)
-- Declarations ------------------------------------------------
type Declarations = [DeclGroup]
-- Expr --------------------------------------------------------
data Expr = Apply (VarIdent) (Args)
          | ArrayVal (TypeIdent) (Expr) (Expr)
          | Assign (LValue) (Pos) (Expr)
          | Break (Pos)
          | For (Pos) (VarIdent) (Expr) (Expr) (Expr)
          | If (Pos) (Expr) (Expr) (Expr)
          | IntLit (Integer) (Pos)
          | LValue (LValue)
          | Let (Pos) (Declarations) (Expr)
          | Nil (Pos)
          | Op (String) (Pos) (Expr) (Expr)
          | RecordVal (TypeIdent) (AssignFields)
          | Sequence (Expr) (Expr)
          | Skip 
          | StringLit (String) (Pos)
          | UnOp (Pos) (String) (Expr)
          | While (Pos) (Expr) (Expr)
-- FunDec ------------------------------------------------------
data FunDec = FunDec (Pos) (VarIdent) ([TypedVar]) (Maybe TypeIdent) (Expr)
-- FunDecs -----------------------------------------------------
type FunDecs = [FunDec]
-- LValue ------------------------------------------------------
data LValue = Dot (Pos) (LValue) (VarIdent)
            | Ident (VarIdent)
            | Sub (Pos) (LValue) (Expr)
-- Program -----------------------------------------------------
data Program = Program (Expr)
-- TypeDec -----------------------------------------------------
data TypeDec = TypeDec (Pos) (TypeIdent) (Type)
-- TypeDecs ----------------------------------------------------
type TypeDecs = [TypeDec]