File: Macro.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 (53 lines) | stat: -rw-r--r-- 1,577 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


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

import CommonTypes
{-# LINE 9 "src-generated/Macro.hs" #-}
-- Macro -------------------------------------------------------
{-
   alternatives:
      alternative Macro:
         child con            : {ConstructorIdent}
         child children       : MacroChildren 
      alternative None:
-}
data Macro = Macro (ConstructorIdent) (MacroChildren)
           | None
           deriving ( Show)
-- MacroChild --------------------------------------------------
{-
   alternatives:
      alternative RuleChild:
         child name           : {Identifier}
         child macro          : Macro 
      alternative ChildChild:
         child name           : {Identifier}
         child child          : {Identifier}
      alternative ValueChild:
         child name           : {Identifier}
         child value          : {String}
-}
data MacroChild = RuleChild (Identifier) (Macro)
                | ChildChild (Identifier) (Identifier)
                | ValueChild (Identifier) (String)
                deriving ( Show)
-- MacroChildren -----------------------------------------------
{-
   alternatives:
      alternative Cons:
         child hd             : MacroChild 
         child tl             : MacroChildren 
      alternative Nil:
-}
type MacroChildren = [MacroChild]
-- MaybeMacro --------------------------------------------------
{-
   alternatives:
      alternative Just:
         child just           : Macro 
      alternative Nothing:
-}
type MaybeMacro = Maybe (Macro)