File: ConcreteSyntax.hs

package info (click to toggle)
uuagc 0.9.56-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,764 kB
  • sloc: haskell: 84,340; makefile: 11
file content (261 lines) | stat: -rw-r--r-- 9,284 bytes parent folder | download
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261


-- UUAGC 0.9.56 (src-ag/ConcreteSyntax.ag)
module ConcreteSyntax where
{-# LINE 2 "src-ag/ConcreteSyntax.ag" #-}

import UU.Scanner.Position (Pos)
import Patterns   (Pattern)
import Expression (Expression)
import CommonTypes
import Macro --marcos
{-# LINE 13 "src-generated/ConcreteSyntax.hs" #-}
-- AG ----------------------------------------------------------
{-
   alternatives:
      alternative AG:
         child elems          : Elems 
-}
data AG = AG (Elems)
-- Alt ---------------------------------------------------------
{-
   alternatives:
      alternative Alt:
         child pos            : {Pos}
         child names          : ConstructorSet 
         child tyvars         : {[Identifier]}
         child fields         : Fields 
         child macro          : {MaybeMacro}
-}
data Alt = Alt (Pos) (ConstructorSet) (([Identifier])) (Fields) (MaybeMacro)
-- Alts --------------------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : Alt 
         child tl             : Alts 
      alternative Nil:
-}
type Alts = [Alt]
-- Attrs -------------------------------------------------------
{-
   alternatives:
      alternative Attrs:
         child pos            : {Pos}
         child inh            : {AttrNames}
         child chn            : {AttrNames}
         child syn            : {AttrNames}
-}
data Attrs = Attrs (Pos) (AttrNames) (AttrNames) (AttrNames)
-- ConstructorSet ----------------------------------------------
{-
   alternatives:
      alternative CName:
         child name           : {ConstructorIdent}
      alternative CUnion:
         child set1           : ConstructorSet 
         child set2           : ConstructorSet 
      alternative CDifference:
         child set1           : ConstructorSet 
         child set2           : ConstructorSet 
      alternative CAll:
-}
data ConstructorSet = CName (ConstructorIdent)
                    | CUnion (ConstructorSet) (ConstructorSet)
                    | CDifference (ConstructorSet) (ConstructorSet)
                    | CAll
-- Elem --------------------------------------------------------
{-
   alternatives:
      alternative Data:
         child pos            : {Pos}
         child contype        : {ConstructorType}
         child ctx            : {ClassContext}
         child names          : NontSet 
         child params         : {[Identifier]}
         child attrs          : Attrs 
         child alts           : Alts 
         child ext            : {Bool}
      alternative Type:
         child pos            : {Pos}
         child ctx            : {ClassContext}
         child name           : {NontermIdent}
         child params         : {[Identifier]}
         child type           : {ComplexType}
      alternative Attr:
         child pos            : {Pos}
         child ctx            : {ClassContext}
         child names          : NontSet 
         child quants         : {[String]}
         child attrs          : Attrs 
      alternative Sem:
         child pos            : {Pos}
         child ctx            : {ClassContext}
         child names          : NontSet 
         child attrs          : Attrs 
         child quants         : {[String]}
         child alts           : SemAlts 
      alternative Txt:
         child pos            : {Pos}
         child kind           : {BlockKind}
         child mbNt           : {Maybe NontermIdent}
         child lines          : {[String]}
      alternative Set:
         child pos            : {Pos}
         child name           : {NontermIdent}
         child merge          : {Bool}
         child set            : NontSet 
      alternative Deriving:
         child pos            : {Pos}
         child set            : NontSet 
         child classes        : {[NontermIdent]}
      alternative Wrapper:
         child pos            : {Pos}
         child set            : NontSet 
      alternative Nocatas:
         child pos            : {Pos}
         child set            : NontSet 
      alternative Pragma:
         child pos            : {Pos}
         child names          : {[NontermIdent]}
      alternative Module:
         child pos            : {Pos}
         child name           : {String}
         child exports        : {String}
         child imports        : {String}
-}
data Elem = Data (Pos) (ConstructorType) (ClassContext) (NontSet) (([Identifier])) (Attrs) (Alts) (Bool)
          | Type (Pos) (ClassContext) (NontermIdent) (([Identifier])) (ComplexType)
          | Attr (Pos) (ClassContext) (NontSet) (([String])) (Attrs)
          | Sem (Pos) (ClassContext) (NontSet) (Attrs) (([String])) (SemAlts)
          | Txt (Pos) (BlockKind) ((Maybe NontermIdent)) (([String]))
          | Set (Pos) (NontermIdent) (Bool) (NontSet)
          | Deriving (Pos) (NontSet) (([NontermIdent]))
          | Wrapper (Pos) (NontSet)
          | Nocatas (Pos) (NontSet)
          | Pragma (Pos) (([NontermIdent]))
          | Module (Pos) (String) (String) (String)
-- Elems -------------------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : Elem 
         child tl             : Elems 
      alternative Nil:
-}
type Elems = [Elem]
-- Field -------------------------------------------------------
{-
   alternatives:
      alternative FChild:
         child name           : {Identifier}
         child tp             : {Type}
      alternative FCtx:
         child tps            : {[Type]}
-}
data Field = FChild (Identifier) (Type)
           | FCtx (([Type]))
-- Fields ------------------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : Field 
         child tl             : Fields 
      alternative Nil:
-}
type Fields = [Field]
-- NontSet -----------------------------------------------------
{-
   alternatives:
      alternative NamedSet:
         child name           : {NontermIdent}
      alternative All:
      alternative Union:
         child set1           : NontSet 
         child set2           : NontSet 
      alternative Intersect:
         child set1           : NontSet 
         child set2           : NontSet 
      alternative Difference:
         child set1           : NontSet 
         child set2           : NontSet 
      alternative Path:
         child from           : {NontermIdent}
         child to             : {NontermIdent}
-}
data NontSet = NamedSet (NontermIdent)
             | All
             | Union (NontSet) (NontSet)
             | Intersect (NontSet) (NontSet)
             | Difference (NontSet) (NontSet)
             | Path (NontermIdent) (NontermIdent)
-- SemAlt ------------------------------------------------------
{-
   alternatives:
      alternative SemAlt:
         child pos            : {Pos}
         child constructorSet : ConstructorSet 
         child rules          : SemDefs 
-}
data SemAlt = SemAlt (Pos) (ConstructorSet) (SemDefs)
-- SemAlts -----------------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : SemAlt 
         child tl             : SemAlts 
      alternative Nil:
-}
type SemAlts = [SemAlt]
-- SemDef ------------------------------------------------------
{-
   alternatives:
      alternative Def:
         child pos            : {Pos}
         child mbName         : {Maybe Identifier}
         child pattern        : {Pattern}
         child rhs            : {Expression}
         child owrt           : {Bool}
         child pure           : {Bool}
         child eager          : {Bool}
      alternative TypeDef:
         child pos            : {Pos}
         child ident          : {Identifier}
         child tp             : {Type}
      alternative UniqueDef:
         child ident          : {Identifier}
         child ref            : {Identifier}
      alternative AugmentDef:
         child ident          : {Identifier}
         child rhs            : {Expression}
      alternative AroundDef:
         child ident          : {Identifier}
         child rhs            : {Expression}
      alternative MergeDef:
         child target         : {Identifier}
         child nt             : {Identifier}
         child sources        : {[Identifier]}
         child rhs            : {Expression}
      alternative SemPragma:
         child names          : {[NontermIdent]}
      alternative AttrOrderBefore:
         child before         : {[Occurrence]}
         child after          : {[Occurrence]}
-}
data SemDef = Def (Pos) ((Maybe Identifier)) (Pattern) (Expression) (Bool) (Bool) (Bool)
            | TypeDef (Pos) (Identifier) (Type)
            | UniqueDef (Identifier) (Identifier)
            | AugmentDef (Identifier) (Expression)
            | AroundDef (Identifier) (Expression)
            | MergeDef (Identifier) (Identifier) (([Identifier])) (Expression)
            | SemPragma (([NontermIdent]))
            | AttrOrderBefore (([Occurrence])) (([Occurrence]))
-- SemDefs -----------------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : SemDef 
         child tl             : SemDefs 
      alternative Nil:
-}
type SemDefs = [SemDef]