-- Haskel data types for the abstract syntax. -- Generated by the BNF converter. {-# LANGUAGE GeneralizedNewtypeDeriving #-} -- | The abstract syntax of language FstStudio. module AbsFstStudio where import qualified Prelude as T (Integer, String) import qualified Prelude as C (Eq, Ord, Show, Read) import Data.String data Program = Prog [Def] -- ^ Program ::= Def deriving (C.Eq, C.Ord, C.Show, C.Read) data Def = Declaration Ident [Ident] Exp -- ^ Def ::= "<" Ident Ident ">" "::=" Exp | Import [Ident] -- ^ Def ::= "import" Ident | Main Exp -- ^ Def ::= "<" "main" ">" "::=" Exp deriving (C.Eq, C.Ord, C.Show, C.Read) data Exp = Any -- ^ Exp ::= "?" | AppDecl Ident [Exp] -- ^ Exp ::= "<" Ident Exp ">" | Boundary -- ^ Exp ::= ".#." | CReplacement Exp Exp Exp Exp -- ^ Exp ::= Exp "->" Exp1 "||" Exp1 "_" Exp1 | CSReplacement Exp Exp Exp Exp -- ^ Exp ::= Exp "->" Exp1 "//" Exp1 "_" Exp1 | Complement Exp -- ^ Exp ::= "~" Exp4 | Composition Exp Exp -- ^ Exp ::= Exp ".o." Exp1 | Concat Exp Exp -- ^ Exp ::= Exp2 Exp3 | Concats T.String -- ^ Exp ::= "{" String "}" | Containment Exp -- ^ Exp ::= "$" Exp4 | CrossProduct Exp Exp -- ^ Exp ::= Exp ".x." Exp1 | Epsilon -- ^ Exp ::= "0" | Intersect Exp Exp -- ^ Exp ::= Exp1 "&" Exp2 | LongReplace Exp Exp -- ^ Exp ::= Exp "@->" Exp1 | Markup Exp Exp -- ^ Exp ::= Exp2 "..." Exp2 | Minus Exp Exp -- ^ Exp ::= Exp1 "-" Exp2 | NConcat Exp T.Integer -- ^ Exp ::= Exp4 "^" Integer | Plus Exp -- ^ Exp ::= Exp4 "+" | Relation T.String T.String -- ^ Exp ::= String ":" String | Replacement Exp Exp -- ^ Exp ::= Exp "->" Exp1 | Restriction Exp Exp Exp -- ^ Exp ::= Exp "=>" Exp1 "_" Exp1 | Star Exp -- ^ Exp ::= Exp4 "*" | Symbol T.String -- ^ Exp ::= String | TComplement Exp -- ^ Exp ::= "\\" Exp4 | Union Exp Exp -- ^ Exp ::= Exp1 "|" Exp2 | Variable Ident -- ^ Exp ::= Ident deriving (C.Eq, C.Ord, C.Show, C.Read) newtype Ident = Ident T.String deriving (C.Eq, C.Ord, C.Show, C.Read, Data.String.IsString)