mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-13 09:01:53 +03:00
* xmlregexp.c xmlschemas.c include/libxml/xmlautomata.h: more work on the automata interfaces and debug of counted choices * test/schemas/* result/schemas/*: added a number of tests Daniel
86 lines
2.1 KiB
C
86 lines
2.1 KiB
C
/*
|
|
* automata.h : description of the API to build regexp automats
|
|
*
|
|
* See Copyright for the status of this software.
|
|
*
|
|
* Daniel Veillard <veillard@redhat.com>
|
|
*/
|
|
|
|
#ifndef __XML_AUTOMATA_H__
|
|
#define __XML_AUTOMATA_H__
|
|
|
|
#if defined(WIN32) && defined(_MSC_VER)
|
|
#include <libxml/xmlwin32version.h>
|
|
#else
|
|
#include <libxml/xmlversion.h>
|
|
#endif
|
|
#ifdef LIBXML_AUTOMATA_ENABLED
|
|
|
|
#include <libxml/xmlregexp.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/**
|
|
* xmlAutomataPtr:
|
|
*
|
|
* A libxml automata description, It can be compiled into a regexp
|
|
*/
|
|
typedef struct _xmlAutomata xmlAutomata;
|
|
typedef xmlAutomata *xmlAutomataPtr;
|
|
|
|
/**
|
|
* xmlAutomataStatePtr:
|
|
*
|
|
* A state int the automata description,
|
|
*/
|
|
typedef struct _xmlAutomataState xmlAutomataState;
|
|
typedef xmlAutomataState *xmlAutomataStatePtr;
|
|
|
|
/*
|
|
* Building API
|
|
*/
|
|
xmlAutomataPtr xmlNewAutomata (void);
|
|
void xmlFreeAutomata (xmlAutomataPtr am);
|
|
|
|
xmlAutomataStatePtr xmlAutomataGetInitState (xmlAutomataPtr am);
|
|
int xmlAutomataSetFinalState(xmlAutomataPtr am,
|
|
xmlAutomataStatePtr state);
|
|
xmlAutomataStatePtr xmlAutomataNewState (xmlAutomataPtr am);
|
|
xmlAutomataStatePtr xmlAutomataNewTransition(xmlAutomataPtr am,
|
|
xmlAutomataStatePtr from,
|
|
xmlAutomataStatePtr to,
|
|
const xmlChar *token,
|
|
void *data);
|
|
xmlAutomataStatePtr xmlAutomataNewCountTrans(xmlAutomataPtr am,
|
|
xmlAutomataStatePtr from,
|
|
xmlAutomataStatePtr to,
|
|
const xmlChar *token,
|
|
int min,
|
|
int max,
|
|
void *data);
|
|
xmlAutomataStatePtr xmlAutomataNewEpsilon (xmlAutomataPtr am,
|
|
xmlAutomataStatePtr from,
|
|
xmlAutomataStatePtr to);
|
|
xmlAutomataStatePtr xmlAutomataNewCountedTrans(xmlAutomataPtr am,
|
|
xmlAutomataStatePtr from,
|
|
xmlAutomataStatePtr to,
|
|
int counter);
|
|
xmlAutomataStatePtr xmlAutomataNewCounterTrans(xmlAutomataPtr am,
|
|
xmlAutomataStatePtr from,
|
|
xmlAutomataStatePtr to,
|
|
int counter);
|
|
int xmlAutomataNewCounter (xmlAutomataPtr am,
|
|
int min,
|
|
int max);
|
|
|
|
xmlRegexpPtr xmlAutomataCompile (xmlAutomataPtr am);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif /* LIBXML_AUTOMATA_ENABLED */
|
|
#endif /* __XML_AUTOMATA_H__ */
|