00001
00004 #ifndef _PARSER_H
00005 #define _PARSER_H
00006 #include <stdio.h>
00007 #include <errno.h>
00008 #include <pcre.h>
00009 #include "template.h"
00010
00012 template_t te;
00014 enum eparse {
00015 PARSE_BEGIN = 0,
00016 PARSE_END = 1,
00017 PARSE_CLASS = 1,
00018 PARSE_PAIRS = 2,
00019 PARSE_CONTENT = 3,
00020 PARSE_ARGS = 4,
00021 PARSE_VECTOR = 3,
00022 PARSE_ARG = 2,
00023 PARSE_ELEMENT = 1,
00024 PARSE_OPT = PCRE_CASELESS | PCRE_DOTALL,
00025 PARSE_MATCH = 0,
00026 PARSE_ERR = EINVAL
00027 };
00028 int parse(char *);
00029 void parsetag(char *);
00030 char *parsepair(char *);
00031 #endif