1 * Summary: regular expressions handling
2 * Description: basic API for libxml regular expressions handling used
3 * for XML Schemas and validation.
5 * Copy: See Copyright for the status of this software.
7 * Author: Patrick Monnerat <pm@datasphere.ch>, DATASPHERE S.A.
9 /if not defined(XML_REGEXP_H__)
10 /define XML_REGEXP_H__
12 /include "libxmlrpg/xmlversion"
14 /if defined(LIBXML_REGEXP_ENABLED)
18 * A libxml regular expression, they can actually be far more complex
19 * thank the POSIX regex expressions.
21 d xmlRegexpPtr s * based(######typedef######)
25 * A libxml progressive regular expression evaluation context
27 d xmlRegExecCtxtPtr...
28 d s * based(######typedef######)
30 /include "libxmlrpg/tree"
31 /include "libxmlrpg/dict"
36 d pr extproc('xmlRegexpCompile')
38 d regexp * value options(*string) const xmlChar *
41 d pr extproc('xmlRegFreeRegexp')
42 d regexp value like(xmlRegexpPtr)
44 d xmlRegexpExec pr 10i 0 extproc('xmlRegexpExec')
45 d comp value like(xmlRegexpPtr)
46 d value * value options(*string) const xmlChar *
48 d xmlRegexpPrint pr extproc('xmlRegexpPrint')
49 d output * value FILE *
50 d regexp value like(xmlRegexpPtr)
52 d xmlRegexpIsDeterminist...
53 d pr 10i 0 extproc('xmlRegexpIsDeterminist')
54 d comp value like(xmlRegexpPtr)
56 * xmlRegExecCallbacks:
57 * @exec: the regular expression context
58 * @token: the current token string
59 * @transdata: transition data
60 * @inputdata: input data
62 * Callback function when doing a transition in the automata
64 d xmlRegExecCallbacks...
65 d s * based(######typedef######)
70 d xmlRegNewExecCtxt...
71 d pr extproc('xmlRegNewExecCtxt')
72 d like(xmlRegExecCtxtPtr)
73 d comp value like(xmlRegexpPtr)
74 d callback value like(xmlRegExecCallbacks)
77 d xmlRegFreeExecCtxt...
78 d pr extproc('xmlRegFreeExecCtxt')
79 d exec value like(xmlRegExecCtxtPtr)
81 d xmlRegExecPushString...
82 d pr 10i 0 extproc('xmlRegExecPushString')
83 d exec value like(xmlRegExecCtxtPtr)
84 d value * value options(*string) const xmlChar *
87 d xmlRegExecPushString2...
88 d pr 10i 0 extproc('xmlRegExecPushString2')
89 d exec value like(xmlRegExecCtxtPtr)
90 d value * value options(*string) const xmlChar *
91 d value2 * value options(*string) const xmlChar *
94 d xmlRegExecNextValues...
95 d pr 10i 0 extproc('xmlRegExecNextValues')
96 d exec value like(xmlRegExecCtxtPtr)
99 d values * xmlChar * (*)
102 d xmlRegExecErrInfo...
103 d pr 10i 0 extproc('xmlRegExecErrInfo')
104 d exec value like(xmlRegExecCtxtPtr)
105 d string * const xmlChar * (*)
108 d values * xmlChar * (*)
111 /if defined(LIBXML_EXPR_ENABLED)
113 * Formal regular expression handling
114 * Its goal is to do some formal work on content models
116 * expressions are used within a context
118 d xmlExpCtxtPtr s * based(######typedef######)
120 d xmlExpFreeCtxt pr extproc('xmlExpFreeCtxt')
121 d ctxt value like(xmlExpCtxtPtr)
123 d xmlExpNewCtxt pr extproc('xmlExpNewCtxt')
124 d like(xmlExpCtxtPtr)
125 d maxNodes 10i 0 value
126 d dict value like(xmlDictPtr)
128 d xmlExpCtxtNbNodes...
129 d pr 10i 0 extproc('xmlExpCtxtNbNodes')
130 d ctxt value like(xmlExpCtxtPtr)
132 d xmlExpCtxtNbCons...
133 d pr 10i 0 extproc('xmlExpCtxtNbCons')
134 d ctxt value like(xmlExpCtxtPtr)
136 * Expressions are trees but the tree is opaque
138 d xmlExpNodePtr s * based(######typedef######)
140 d xmlExpNodeType s 10i 0 based(######typedef######) enum
149 * 2 core expressions shared by all for the empty language set
150 * and for the set with just the empty token
152 d forbiddenExp s import('forbiddenExp')
153 d like(xmlExpNodePtr)
155 d emptyExp s import('emptyExp')
156 d like(xmlExpNodePtr)
159 * Expressions are reference counted internally
161 d xmlExpFree pr extproc('xmlExpFree')
162 d expr value like(xmlExpNodePtr)
164 d xmlExpRef pr extproc('xmlExpRef')
165 d expr value like(xmlExpNodePtr)
167 * constructors can be either manual or from a string
169 d xmlExpParse pr extproc('xmlExpParse')
170 d like(xmlExpNodePtr)
171 d ctxt value like(xmlExpCtxtPtr)
172 d expr * value options(*string) const char *
174 d xmlExpNewAtom pr extproc('xmlExpNewAtom')
175 d like(xmlExpNodePtr)
176 d ctxt value like(xmlExpCtxtPtr)
177 d name * value options(*string) const xmlChar *
180 d xmlExpNewOr pr extproc('xmlExpNewOr')
181 d like(xmlExpNodePtr)
182 d ctxt value like(xmlExpCtxtPtr)
183 d left value like(xmlExpNodePtr)
184 d right value like(xmlExpNodePtr)
186 d xmlExpNewSeq pr extproc('xmlExpNewSeq')
187 d like(xmlExpNodePtr)
188 d ctxt value like(xmlExpCtxtPtr)
189 d left value like(xmlExpNodePtr)
190 d right value like(xmlExpNodePtr)
192 d xmlExpNewRange pr extproc('xmlExpNewRange')
193 d like(xmlExpNodePtr)
194 d ctxt value like(xmlExpCtxtPtr)
195 d subset value like(xmlExpNodePtr)
199 * The really interesting APIs
201 d xmlExpIsNillable...
202 d pr 10i 0 extproc('xmlExpIsNillable')
203 d expr value like(xmlExpNodePtr)
205 d xmlExpMaxToken pr 10i 0 extproc('xmlExpMaxToken')
206 d expr value like(xmlExpNodePtr)
208 d xmlExpGetLanguage...
209 d pr 10i 0 extproc('xmlExpGetLanguage')
210 d ctxt value like(xmlExpCtxtPtr)
211 d expr value like(xmlExpNodePtr)
212 d langList * const xmlChar *(*)
215 d xmlExpGetStart pr 10i 0 extproc('xmlExpGetStart')
216 d ctxt value like(xmlExpCtxtPtr)
217 d expr value like(xmlExpNodePtr)
218 d tokList * const xmlChar *(*)
221 d xmlExpStringDerive...
222 d pr extproc('xmlExpStringDerive')
223 d like(xmlExpNodePtr)
224 d ctxt value like(xmlExpCtxtPtr)
225 d expr value like(xmlExpNodePtr)
226 d str * value options(*string) const xmlChar *
230 d pr extproc('xmlExpExpDerive')
231 d like(xmlExpNodePtr)
232 d ctxt value like(xmlExpCtxtPtr)
233 d expr value like(xmlExpNodePtr)
234 d sub value like(xmlExpNodePtr)
236 d xmlExpSubsume pr 10i 0 extproc('xmlExpSubsume')
237 d ctxt value like(xmlExpCtxtPtr)
238 d expr value like(xmlExpNodePtr)
239 d sub value like(xmlExpNodePtr)
241 d xmlExpDump pr extproc('xmlExpDump')
242 d buf value like(xmlBufferPtr)
243 d expr value like(xmlExpNodePtr)
244 /endif LIBXML_EXPR_ENABLED
245 /endif LIBXML_REGEXP_ENABLD
246 /endif XML_REGEXP_H__