blob: b4ceecb077da02b16dc72985b4936d8877a6d671 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#ifndef QUICKMEDIA_XPATH_TOKENIZER_H
#define QUICKMEDIA_XPATH_TOKENIZER_H
#include "NodeSearch.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct {
const char *code;
union {
QuickMediaStringView string;
QuickMediaStringView identifier;
int number;
};
} QuickMediaXpathTokenizer;
typedef enum {
QUICKMEDIA_XPATH_TOKEN_INVALID,
QUICKMEDIA_XPATH_TOKEN_END_OF_FILE,
QUICKMEDIA_XPATH_TOKEN_CHILD,
QUICKMEDIA_XPATH_TOKEN_CHILD_RECURSIVE,
QUICKMEDIA_XPATH_TOKEN_IDENTIFIER,
QUICKMEDIA_XPATH_TOKEN_NUMBER,
QUICKMEDIA_XPATH_TOKEN_STRING,
QUICKMEDIA_XPATH_TOKEN_OPEN_BRACKET,
QUICKMEDIA_XPATH_TOKEN_CLOSING_BRACKET,
QUICKMEDIA_XPATH_TOKEN_EQUAL
} QuickMediaXpathToken;
void quickmedia_xpath_tokenizer_init(QuickMediaXpathTokenizer *self, const char *xpath);
QuickMediaXpathToken quickmedia_xpath_tokenizer_next(QuickMediaXpathTokenizer *self);
int quickmedia_xpath_tokenizer_next_if(QuickMediaXpathTokenizer *self, QuickMediaXpathToken token);
#ifdef __cplusplus
}
#endif
#endif
|