1/**
2 * @file
3 *
4 * @brief API to build regexp automata
5 *
6 * These are internal functions and shouldn't be used.
7 *
8 * @copyright See Copyright for the status of this software.
9 *
10 * @author Daniel Veillard
11 */
12
13#ifndef __XML_AUTOMATA_H__
14#define __XML_AUTOMATA_H__
15
16#include <libxml/xmlversion.h>
17
18#ifdef LIBXML_REGEXP_ENABLED
19
20#include <libxml/xmlstring.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
26/**
27 * A libxml automata description
28 *
29 * It can be compiled into a regexp
30 */
31typedef struct _xmlAutomata xmlAutomata;
32typedef xmlAutomata *xmlAutomataPtr;
33
34/**
35 * A state in the automata description
36 */
37typedef struct _xmlAutomataState xmlAutomataState;
38typedef xmlAutomataState *xmlAutomataStatePtr;
39
40/*
41 * Building API
42 */
43XML_DEPRECATED
44XMLPUBFUN xmlAutomata *
45 xmlNewAutomata (void);
46XML_DEPRECATED
47XMLPUBFUN void
48 xmlFreeAutomata (xmlAutomata *am);
49
50XML_DEPRECATED
51XMLPUBFUN xmlAutomataState *
52 xmlAutomataGetInitState (xmlAutomata *am);
53XML_DEPRECATED
54XMLPUBFUN int
55 xmlAutomataSetFinalState (xmlAutomata *am,
56 xmlAutomataState *state);
57XML_DEPRECATED
58XMLPUBFUN xmlAutomataState *
59 xmlAutomataNewState (xmlAutomata *am);
60XML_DEPRECATED
61XMLPUBFUN xmlAutomataState *
62 xmlAutomataNewTransition (xmlAutomata *am,
63 xmlAutomataState *from,
64 xmlAutomataState *to,
65 const xmlChar *token,
66 void *data);
67XML_DEPRECATED
68XMLPUBFUN xmlAutomataState *
69 xmlAutomataNewTransition2 (xmlAutomata *am,
70 xmlAutomataState *from,
71 xmlAutomataState *to,
72 const xmlChar *token,
73 const xmlChar *token2,
74 void *data);
75XML_DEPRECATED
76XMLPUBFUN xmlAutomataState *
77 xmlAutomataNewNegTrans (xmlAutomata *am,
78 xmlAutomataState *from,
79 xmlAutomataState *to,
80 const xmlChar *token,
81 const xmlChar *token2,
82 void *data);
83
84XML_DEPRECATED
85XMLPUBFUN xmlAutomataState *
86 xmlAutomataNewCountTrans (xmlAutomata *am,
87 xmlAutomataState *from,
88 xmlAutomataState *to,
89 const xmlChar *token,
90 int min,
91 int max,
92 void *data);
93XML_DEPRECATED
94XMLPUBFUN xmlAutomataState *
95 xmlAutomataNewCountTrans2 (xmlAutomata *am,
96 xmlAutomataState *from,
97 xmlAutomataState *to,
98 const xmlChar *token,
99 const xmlChar *token2,
100 int min,
101 int max,
102 void *data);
103XML_DEPRECATED
104XMLPUBFUN xmlAutomataState *
105 xmlAutomataNewOnceTrans (xmlAutomata *am,
106 xmlAutomataState *from,
107 xmlAutomataState *to,
108 const xmlChar *token,
109 int min,
110 int max,
111 void *data);
112XML_DEPRECATED
113XMLPUBFUN xmlAutomataState *
114 xmlAutomataNewOnceTrans2 (xmlAutomata *am,
115 xmlAutomataState *from,
116 xmlAutomataState *to,
117 const xmlChar *token,
118 const xmlChar *token2,
119 int min,
120 int max,
121 void *data);
122XML_DEPRECATED
123XMLPUBFUN xmlAutomataState *
124 xmlAutomataNewAllTrans (xmlAutomata *am,
125 xmlAutomataState *from,
126 xmlAutomataState *to,
127 int lax);
128XML_DEPRECATED
129XMLPUBFUN xmlAutomataState *
130 xmlAutomataNewEpsilon (xmlAutomata *am,
131 xmlAutomataState *from,
132 xmlAutomataState *to);
133XML_DEPRECATED
134XMLPUBFUN xmlAutomataState *
135 xmlAutomataNewCountedTrans (xmlAutomata *am,
136 xmlAutomataState *from,
137 xmlAutomataState *to,
138 int counter);
139XML_DEPRECATED
140XMLPUBFUN xmlAutomataState *
141 xmlAutomataNewCounterTrans (xmlAutomata *am,
142 xmlAutomataState *from,
143 xmlAutomataState *to,
144 int counter);
145XML_DEPRECATED
146XMLPUBFUN int
147 xmlAutomataNewCounter (xmlAutomata *am,
148 int min,
149 int max);
150
151XML_DEPRECATED
152XMLPUBFUN struct _xmlRegexp *
153 xmlAutomataCompile (xmlAutomata *am);
154XML_DEPRECATED
155XMLPUBFUN int
156 xmlAutomataIsDeterminist (xmlAutomata *am);
157
158#ifdef __cplusplus
159}
160#endif
161
162#endif /* LIBXML_REGEXP_ENABLED */
163
164#endif /* __XML_AUTOMATA_H__ */
165