PageRenderTime 81ms CodeModel.GetById 40ms app.highlight 3ms RepoModel.GetById 37ms app.codeStats 0ms

/parsed_xpath.h

http://github.com/fizx/parsley
C Header | 34 lines | 28 code | 6 blank | 0 comment | 0 complexity | 76f4281272902db921299ec7610b5481 MD5 | raw file
 1#ifndef _parsed_xpath_h_
 2#define _parsed_xpath_h_
 3
 4#include <stdarg.h>
 5
 6typedef struct __pxpath_node {
 7	int type;
 8	char* value;
 9 	struct __pxpath_node * next;
10 	struct __pxpath_node * child;
11} pxpath_node;
12
13typedef pxpath_node * pxpathPtr;
14
15enum {
16   PXPATH_FUNCTION = 1,
17	 PXPATH_PATH = 2,
18	 PXPATH_LITERAL = 3,
19	 PXPATH_LIT_EXPR = 4,
20	 PXPATH_OPERATOR = 3
21};
22
23pxpathPtr pxpath_new(int type, char* value);
24pxpathPtr pxpath_new_func(char* value, pxpathPtr child);
25pxpathPtr pxpath_cat_paths(int n, ...);
26pxpathPtr pxpath_cat_literals(int n, ...);
27pxpathPtr pxpath_new_path(int n, ...);
28pxpathPtr pxpath_dup(pxpathPtr p);
29pxpathPtr pxpath_new_literal(int n, ...);
30pxpathPtr pxpath_new_operator(int n, ...);
31void pxpath_free(pxpathPtr ptr);
32char* pxpath_to_string(pxpathPtr ptr);
33
34#endif