imports { -- AbstractSyntax.ag imports import Data.Set(Set) import Data.Map(Map) import Patterns (Pattern(..),Patterns) import Expression (Expression(..)) import CommonTypes } DATA Grammar | Grammar typeSyns : {TypeSyns} useMap : {UseMap} derivings : {Derivings} wrappers : {Set NontermIdent} nonts : Nonterminals pragmas : {PragmaMap} -- pragmas defined at a certain alternative manualAttrOrderMap : {AttrOrderMap} -- manually enforced dependencies between attributes paramMap : {ParamMap} contextMap : {ContextMap} quantMap : {QuantMap} uniqueMap : {UniqueMap} augmentsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} aroundsMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier [Expression]))} mergeMap : {Map NontermIdent (Map ConstructorIdent (Map Identifier (Identifier, [Identifier], Expression)))} TYPE Nonterminals = [Nonterminal] TYPE Productions = [Production] TYPE Children = [Child] TYPE Rules = [Rule] TYPE TypeSigs = [TypeSig] DATA Nonterminal | Nonterminal nt : {NontermIdent} params : {[Identifier]} inh : {Attributes} syn : {Attributes} prods : Productions DATA Production | Production con : {ConstructorIdent} children : Children rules : Rules typeSigs : TypeSigs DATA Child | Child name : {Identifier} tp : {Type} inh : {Attributes} syn : {Attributes} virtual : {Maybe (Maybe Type)} -- first maybe: is child virtual, second maybe: did child already exist DATA Rule | Rule mbName : {Maybe Identifier} pattern : Pattern rhs : Expression owrt : {Bool} origin : String -- just for documentation (and maybe errors) explicit : Bool -- True if this rule defined in the source code DATA TypeSig | TypeSig name : {Identifier} tp : {Type} SET AllAbstractSyntax = Grammar Nonterminal Nonterminals Production Productions Child Children Rule Rules TypeSig TypeSigs