| 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 |
| 23 |
extern "C" { |
| 24 |
#endif |
| 25 |
|
| 26 |
/** |
| 27 |
* A libxml automata description |
| 28 |
* |
| 29 |
* It can be compiled into a regexp |
| 30 |
*/ |
| 31 |
typedef struct _xmlAutomata xmlAutomata; |
| 32 |
typedef xmlAutomata *xmlAutomataPtr; |
| 33 |
|
| 34 |
/** |
| 35 |
* A state in the automata description |
| 36 |
*/ |
| 37 |
typedef struct _xmlAutomataState xmlAutomataState; |
| 38 |
typedef xmlAutomataState *xmlAutomataStatePtr; |
| 39 |
|
| 40 |
/* |
| 41 |
* Building API |
| 42 |
*/ |
| 43 |
XML_DEPRECATED |
| 44 |
XMLPUBFUN xmlAutomata * |
| 45 |
xmlNewAutomata (void); |
| 46 |
XML_DEPRECATED |
| 47 |
XMLPUBFUN void |
| 48 |
xmlFreeAutomata (xmlAutomata *am); |
| 49 |
|
| 50 |
XML_DEPRECATED |
| 51 |
XMLPUBFUN xmlAutomataState * |
| 52 |
xmlAutomataGetInitState (xmlAutomata *am); |
| 53 |
XML_DEPRECATED |
| 54 |
XMLPUBFUN int |
| 55 |
xmlAutomataSetFinalState (xmlAutomata *am, |
| 56 |
xmlAutomataState *state); |
| 57 |
XML_DEPRECATED |
| 58 |
XMLPUBFUN xmlAutomataState * |
| 59 |
xmlAutomataNewState (xmlAutomata *am); |
| 60 |
XML_DEPRECATED |
| 61 |
XMLPUBFUN xmlAutomataState * |
| 62 |
xmlAutomataNewTransition (xmlAutomata *am, |
| 63 |
xmlAutomataState *from, |
| 64 |
xmlAutomataState *to, |
| 65 |
const xmlChar *token, |
| 66 |
void *data); |
| 67 |
XML_DEPRECATED |
| 68 |
XMLPUBFUN xmlAutomataState * |
| 69 |
xmlAutomataNewTransition2 (xmlAutomata *am, |
| 70 |
xmlAutomataState *from, |
| 71 |
xmlAutomataState *to, |
| 72 |
const xmlChar *token, |
| 73 |
const xmlChar *token2, |
| 74 |
void *data); |
| 75 |
XML_DEPRECATED |
| 76 |
XMLPUBFUN xmlAutomataState * |
| 77 |
xmlAutomataNewNegTrans (xmlAutomata *am, |
| 78 |
xmlAutomataState *from, |
| 79 |
xmlAutomataState *to, |
| 80 |
const xmlChar *token, |
| 81 |
const xmlChar *token2, |
| 82 |
void *data); |
| 83 |
|
| 84 |
XML_DEPRECATED |
| 85 |
XMLPUBFUN xmlAutomataState * |
| 86 |
xmlAutomataNewCountTrans (xmlAutomata *am, |
| 87 |
xmlAutomataState *from, |
| 88 |
xmlAutomataState *to, |
| 89 |
const xmlChar *token, |
| 90 |
int min, |
| 91 |
int max, |
| 92 |
void *data); |
| 93 |
XML_DEPRECATED |
| 94 |
XMLPUBFUN 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); |
| 103 |
XML_DEPRECATED |
| 104 |
XMLPUBFUN xmlAutomataState * |
| 105 |
xmlAutomataNewOnceTrans (xmlAutomata *am, |
| 106 |
xmlAutomataState *from, |
| 107 |
xmlAutomataState *to, |
| 108 |
const xmlChar *token, |
| 109 |
int min, |
| 110 |
int max, |
| 111 |
void *data); |
| 112 |
XML_DEPRECATED |
| 113 |
XMLPUBFUN 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); |
| 122 |
XML_DEPRECATED |
| 123 |
XMLPUBFUN xmlAutomataState * |
| 124 |
xmlAutomataNewAllTrans (xmlAutomata *am, |
| 125 |
xmlAutomataState *from, |
| 126 |
xmlAutomataState *to, |
| 127 |
int lax); |
| 128 |
XML_DEPRECATED |
| 129 |
XMLPUBFUN xmlAutomataState * |
| 130 |
xmlAutomataNewEpsilon (xmlAutomata *am, |
| 131 |
xmlAutomataState *from, |
| 132 |
xmlAutomataState *to); |
| 133 |
XML_DEPRECATED |
| 134 |
XMLPUBFUN xmlAutomataState * |
| 135 |
xmlAutomataNewCountedTrans (xmlAutomata *am, |
| 136 |
xmlAutomataState *from, |
| 137 |
xmlAutomataState *to, |
| 138 |
int counter); |
| 139 |
XML_DEPRECATED |
| 140 |
XMLPUBFUN xmlAutomataState * |
| 141 |
xmlAutomataNewCounterTrans (xmlAutomata *am, |
| 142 |
xmlAutomataState *from, |
| 143 |
xmlAutomataState *to, |
| 144 |
int counter); |
| 145 |
XML_DEPRECATED |
| 146 |
XMLPUBFUN int |
| 147 |
xmlAutomataNewCounter (xmlAutomata *am, |
| 148 |
int min, |
| 149 |
int max); |
| 150 |
|
| 151 |
XML_DEPRECATED |
| 152 |
XMLPUBFUN struct _xmlRegexp * |
| 153 |
xmlAutomataCompile (xmlAutomata *am); |
| 154 |
XML_DEPRECATED |
| 155 |
XMLPUBFUN int |
| 156 |
xmlAutomataIsDeterminist (xmlAutomata *am); |
| 157 |
|
| 158 |
#ifdef __cplusplus |
| 159 |
} |
| 160 |
#endif |
| 161 |
|
| 162 |
#endif /* LIBXML_REGEXP_ENABLED */ |
| 163 |
|
| 164 |
#endif /* __XML_AUTOMATA_H__ */ |