-- Haskell data types for the abstract syntax.
-- Generated by the BNF converter.

{-# LANGUAGE GeneralizedNewtypeDeriving #-}

module AbsSRL where

import Prelude (Char, Double, Integer, String)
import qualified Prelude as C (Eq, Ord, Show, Read)
import qualified Data.String

newtype Ident = Ident String
  deriving (C.Eq, C.Ord, C.Show, C.Read, Data.String.IsString)

data SRL = ESRL [Blk]
  deriving (C.Eq, C.Ord, C.Show, C.Read)

data Blk
    = Bstep Step
    | Bif Exp [Blk] [Blk] Exp
    | Bfrom Exp [Blk] [Blk] Exp
    | Bfor Exp [Blk] [Blk] [Blk] [Blk] Exp
  deriving (C.Eq, C.Ord, C.Show, C.Read)

data Step
    = SasnAdd Ident Exp
    | SasnMin Ident Exp
    | SasnXor Ident Exp
    | SasnArrAdd Ident Exp Exp
    | SasnArrMin Ident Exp Exp
    | SasnArrXor Ident Exp Exp
    | Sinc Ident
    | Sdec Ident
    | Spush Ident Ident
    | Spop Ident Ident
    | Sskip
  deriving (C.Eq, C.Ord, C.Show, C.Read)

data Exp
    = Etop Exp
    | Eempty Exp
    | Exor Exp Exp
    | Eeq Exp Exp
    | Ene Exp Exp
    | Elt Exp Exp
    | Egt Exp Exp
    | Ele Exp Exp
    | Ege Exp Exp
    | Eadd Exp Exp
    | Emin Exp Exp
    | Emul Exp Exp
    | Ediv Exp Exp
    | Earr Exp Exp
    | Econ Integer
    | Evar Ident
  deriving (C.Eq, C.Ord, C.Show, C.Read)

