1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
|
imports
{
-- AbstractSyntax.ag imports
import Data.Set(Set)
import Data.Map(Map)
import Patterns (Pattern(..),Patterns)
import Expression (Expression(..))
import Macro --marcos
import CommonTypes
import ErrorMessages
}
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}
params : {[Identifier]}
constraints : {[Type]}
children : Children
rules : Rules
typeSigs : TypeSigs
macro : MaybeMacro --marcos
DATA Child | Child name : {Identifier}
tp : {Type}
kind : {ChildKind}
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
pure : Bool -- True if this rule is pure (does not have side effects)
identity : Bool -- True if this rule is an identity rule
mbError : {Maybe Error} -- scheduling this rule yields the given error, if present
eager : Bool -- for ordered scheduling: use an eager semantics
DATA TypeSig | TypeSig name : {Identifier}
tp : {Type}
SET AllAbstractSyntax
= Grammar
Nonterminal Nonterminals
Production Productions
Child Children
Rule Rules
TypeSig TypeSigs
|