1      * Summary: API to build regexp automata
2      * Description: the API to build regexp automata
3      *
4      * Copy: See Copyright for the status of this software.
5      *
6      * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
7
8      /if not defined(XML_AUTOMATA_H__)
9      /define XML_AUTOMATA_H__
10
11      /include "libxmlrpg/xmlversion"
12      /include "libxmlrpg/tree"
13
14      /if defined(LIBXML_REGEXP_ENABLED)
15      /if defined(LIBXML_AUTOMATA_ENABLED)
16
17      /include "libxmlrpg/xmlregexp"
18
19      * xmlAutomataPtr:
20      *
21      * A libxml automata description, It can be compiled into a regexp
22
23     d xmlAutomataPtr  s               *   based(######typedef######)
24
25      * xmlAutomataStatePtr:
26      *
27      * A state int the automata description,
28
29     d xmlAutomataStatePtr...
30     d                 s               *   based(######typedef######)
31
32      * Building API
33
34     d xmlNewAutomata  pr                  extproc('xmlNewAutomata')
35     d                                     like(xmlAutomataPtr)
36
37     d xmlFreeAutomata...
38     d                 pr                  extproc('xmlFreeAutomata')
39     d  am                                 value like(xmlAutomataPtr)
40
41     d xmlAutomataGetInitState...
42     d                 pr                  extproc('xmlAutomataGetInitState')
43     d                                     like(xmlAutomataStatePtr)
44     d  am                                 value like(xmlAutomataPtr)
45
46     d xmlAutomataSetFinalState...
47     d                 pr            10i 0 extproc('xmlAutomataSetFinalState')
48     d  am                                 value like(xmlAutomataPtr)
49     d  state                              value like(xmlAutomataStatePtr)
50
51     d xmlAutomataNewState...
52     d                 pr                  extproc('xmlAutomataNewState')
53     d                                     like(xmlAutomataStatePtr)
54     d  am                                 value like(xmlAutomataPtr)
55
56     d xmlAutomataNewTransition...
57     d                 pr                  extproc('xmlAutomataNewTransition')
58     d                                     like(xmlAutomataStatePtr)
59     d  am                                 value like(xmlAutomataPtr)
60     d  from                               value like(xmlAutomataStatePtr)
61     d  to                                 value like(xmlAutomataStatePtr)
62     d  token                          *   value options(*string)               const xmlChar *
63     d  data                           *   value options(*string)               void *
64
65     d xmlAutomataNewTransition2...
66     d                 pr                  extproc('xmlAutomataNewTransition2')
67     d                                     like(xmlAutomataStatePtr)
68     d  am                                 value like(xmlAutomataPtr)
69     d  from                               value like(xmlAutomataStatePtr)
70     d  to                                 value like(xmlAutomataStatePtr)
71     d  token                          *   value options(*string)               const xmlChar *
72     d  token2                         *   value options(*string)               const xmlChar *
73     d  data                           *   value options(*string)               void *
74
75     d xmlAutomataNewNegTrans...
76     d                 pr                  extproc('xmlAutomataNewNegTrans')
77     d                                     like(xmlAutomataStatePtr)
78     d  am                                 value like(xmlAutomataPtr)
79     d  from                               value like(xmlAutomataStatePtr)
80     d  to                                 value like(xmlAutomataStatePtr)
81     d  token                          *   value options(*string)               const xmlChar *
82     d  token2                         *   value options(*string)               const xmlChar *
83     d  data                           *   value options(*string)               void *
84
85     d xmlAutomataNewCountTrans...
86     d                 pr                  extproc('xmlAutomataNewCountTrans')
87     d                                     like(xmlAutomataStatePtr)
88     d  am                                 value like(xmlAutomataPtr)
89     d  from                               value like(xmlAutomataStatePtr)
90     d  to                                 value like(xmlAutomataStatePtr)
91     d  token                          *   value options(*string)               const xmlChar *
92     d  min                          10i 0 value
93     d  max                          10i 0 value
94     d  data                           *   value options(*string)               void *
95
96     d xmlAutomataNewCountTrans2...
97     d                 pr                  extproc('xmlAutomataNewCountTrans2')
98     d                                     like(xmlAutomataStatePtr)
99     d  am                                 value like(xmlAutomataPtr)
100     d  from                               value like(xmlAutomataStatePtr)
101     d  to                                 value like(xmlAutomataStatePtr)
102     d  token                          *   value options(*string)               const xmlChar *
103     d  token2                         *   value options(*string)               const xmlChar *
104     d  min                          10i 0 value
105     d  max                          10i 0 value
106     d  data                           *   value options(*string)               void *
107
108     d xmlAutomataNewOnceTrans...
109     d                 pr                  extproc('xmlAutomataNewOnceTrans')
110     d                                     like(xmlAutomataStatePtr)
111     d  am                                 value like(xmlAutomataPtr)
112     d  from                               value like(xmlAutomataStatePtr)
113     d  to                                 value like(xmlAutomataStatePtr)
114     d  token                          *   value options(*string)               const xmlChar *
115     d  min                          10i 0 value
116     d  max                          10i 0 value
117     d  data                           *   value options(*string)               void *
118
119     d xmlAutomataNewOnceTrans2...
120     d                 pr                  extproc('xmlAutomataNewOnceTrans2')
121     d                                     like(xmlAutomataStatePtr)
122     d  am                                 value like(xmlAutomataPtr)
123     d  from                               value like(xmlAutomataStatePtr)
124     d  to                                 value like(xmlAutomataStatePtr)
125     d  token                          *   value options(*string)               const xmlChar *
126     d  token2                         *   value options(*string)               const xmlChar *
127     d  min                          10i 0 value
128     d  max                          10i 0 value
129     d  data                           *   value options(*string)               void *
130
131     d xmlAutomataNewAllTrans...
132     d                 pr                  extproc('xmlAutomataNewAllTrans')
133     d                                     like(xmlAutomataStatePtr)
134     d  am                                 value like(xmlAutomataPtr)
135     d  from                               value like(xmlAutomataStatePtr)
136     d  to                                 value like(xmlAutomataStatePtr)
137     d  lax                          10i 0 value
138
139     d xmlAutomataNewEpsilon...
140     d                 pr                  extproc('xmlAutomataNewEpsilon')
141     d                                     like(xmlAutomataStatePtr)
142     d  am                                 value like(xmlAutomataPtr)
143     d  from                               value like(xmlAutomataStatePtr)
144     d  to                                 value like(xmlAutomataStatePtr)
145
146     d xmlAutomataNewCountedTrans...
147     d                 pr                  extproc('xmlAutomataNewCountedTrans')
148     d                                     like(xmlAutomataStatePtr)
149     d  am                                 value like(xmlAutomataPtr)
150     d  from                               value like(xmlAutomataStatePtr)
151     d  to                                 value like(xmlAutomataStatePtr)
152     d  counter                      10i 0 value
153
154     d xmlAutomataNewCounterTrans...
155     d                 pr                  extproc('xmlAutomataNewCounterTrans')
156     d                                     like(xmlAutomataStatePtr)
157     d  am                                 value like(xmlAutomataPtr)
158     d  from                               value like(xmlAutomataStatePtr)
159     d  to                                 value like(xmlAutomataStatePtr)
160     d  counter                      10i 0 value
161
162     d xmlAutomataNewCounter...
163     d                 pr            10i 0 extproc('xmlAutomataNewCounter')
164     d  am                                 value like(xmlAutomataPtr)
165     d  min                          10i 0 value
166     d  max                          10i 0 value
167
168     d xmlAutomataCompile...
169     d                 pr                  extproc('xmlAutomataCompile')
170     d                                     like(xmlRegexpPtr)
171     d  am                                 value like(xmlAutomataPtr)
172
173     d xmlAutomataIsDeterminist...
174     d                 pr            10i 0 extproc('xmlAutomataIsDeterminist')
175     d  am                                 value like(xmlAutomataPtr)
176
177      /endif                                                                    AUTOMATA_ENABLED
178      /endif                                                                    LIBXML_REGEXP_ENABLD
179      /endif                                                                    XML_AUTOMATA_H__
180