blob: 3284713025dece6c646f6291901395058246f8b9 (
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
|
#ifndef SP_CONFIG_SCANNER_H
#define SP_CONFIG_SCANNER_H
typedef enum {
SP_ARGTYPE_UNKNOWN = 0,
SP_ARGTYPE_NONE,
SP_ARGTYPE_EMPTY,
SP_ARGTYPE_STR
} sp_argtype;
typedef struct {
char *kw; // keyword points directly to the parsed input text and as such is not null-terminated
size_t kwlen;
char *arg; // optional argument / can be not null terminated
size_t arglen;
sp_argtype argtype;
long lineno;
} sp_parsed_keyword;
zend_result sp_config_scan(char *data, zend_result (*process_rule)(sp_parsed_keyword*));
zend_string *sp_get_arg_string(sp_parsed_keyword *kw);
zend_string *sp_get_textual_representation(sp_parsed_keyword *parsed_rule);
#endif
|