9643ff1404b28598529aca54fca05e35687a42eb
[libfirm] / etc / effect.dtd
1 <!-- effect.dtd - DTD to model effects of external procedures inside firm. -->
2 <!-- $Id$ -->
3
4 <!-- upload this file to http://www/~firm/ after making changes -->
5
6 <!-- content model for all nodes -->
7 <!-- allow nodes/entity accesses to reference other nodes/an entity -->
8 <!ENTITY        % firm.id                       "id ID #REQUIRED">
9
10 <!-- allow a node to specify a type -->
11 <!ENTITY        % firm.type             "type CDATA #REQUIRED">
12
13 <!-- allow a node to specify a field -->
14 <!ENTITY        % firm.entity           "entity CDATA #REQUIRED">
15
16 <!-- allow a node to specify a typeid -->
17 <!ENTITY        % typeid                "typeid CDATA #REQUIRED">
18
19 <!-- allow a node to specify an owner -->
20 <!ENTITY        % firm.owner            "owner CDATA #REQUIRED">
21
22 <!-- the root element -->
23 <!ELEMENT       effects (type*, entity*, effect*)>
24 <!ATTLIST       effects
25                         module          CDATA           #IMPLIED>
26
27 <!-- an entity reference -->
28 <!ELEMENT       type    EMPTY>
29 <!ATTLIST       type
30                         %firm.id;
31                         %firm.type;>
32
33 <!-- an entity reference -->
34 <!ELEMENT       entity  EMPTY>
35 <!ATTLIST       entity
36                         %firm.id;
37                         %firm.type;
38                         %firm.entity;
39                         %firm.owner;>
40
41 <!-- a single effect -->
42 <!ELEMENT       effect (arg*, (load|store|alloc|call|join|unknown)*, raise?, ret)>
43 <!ATTLIST       effect
44                         procname        CDATA           #REQUIRED;
45                         %firm.type;>
46
47 <!-- procedure argument -->
48 <!ELEMENT       arg                     EMPTY>
49 <!ATTLIST       arg
50                         %firm.id;
51                         number          CDATA           #REQUIRED;
52                         %firm.type>
53
54 <!-- reference another value -->
55 <!ELEMENT       valref          EMPTY>
56 <!ATTLIST       valref
57                         refid           IDREF           #REQUIRED>
58
59 <!-- load effect -->
60 <!-- for static entities, use a 'select' without a child element -->
61 <!ELEMENT       select          (valref?)>
62 <!ATTLIST       select          %firm.entity;>
63
64 <!-- load effect -->
65 <!ELEMENT       load            (select)>
66 <!ATTLIST       load
67                         %firm.id;>
68
69 <!-- store effect -->
70 <!ELEMENT       store           (select,valref)>
71
72 <!-- alloc effect -->
73 <!ELEMENT       alloc           EMPTY>
74 <!ATTLIST       alloc           %firm.id;
75                                 %firm.type;>
76
77 <!-- call effect -->
78 <!ELEMENT       call            (select,(valref)*)>
79 <!ATTLIST       call            %firm.id;>
80
81 <!-- unknown value -->
82 <!ELEMENT       unknown         EMPTY>
83 <!ATTLIST       unknown         %firm.id;>
84
85 <!-- join two or more values -->
86 <!ELEMENT       join            (valref,valref+)>
87 <!ATTLIST       join            %firm.id;>
88
89 <!-- raise an exception -->
90 <!ELEMENT       raise           (valref)>
91 <!ATTLIST       raise           %firm.type;>
92
93 <!-- ret effect -->
94 <!ELEMENT       ret                     (valref?)>
95
96 <!--
97
98  $Log$
99  Revision 1.7  2004/10/21 15:32:21  boesler
100  minor changes
101
102  Revision 1.6  2004/10/11 09:55:19  liekweg
103  Renamed 'return' to 'ret' -flo
104
105  Revision 1.5  2004/10/05 16:19:04  liekweg
106  Grrr, CVS still messes up XML comments
107
108  Revision 1.4  2004/10/05 16:18:06  liekweg
109  Grrr, CVS messes up XML comments
110
111  Revision 1.3  2004/10/05 16:17:22  liekweg
112  Added 'raise' -flo
113
114  Revision 1.2  2004/10/05 15:46:59  liekweg
115  Added comment about this DTD's public location -flo
116
117  Revision 1.1  2004/10/05 14:34:13  liekweg
118  Added DTD for external effects description -flo
119
120  -->