1 #ifndef _RPACOMPILER_H_
2 #define _RPACOMPILER_H_
4 #include "rvmcodegen.h"
12 typedef struct rpa_ruledef_s {
21 #define RPA_COMPILER_CURRENTEXP(__co__) ((rpa_ruledef_t*)r_array_lastslot((__co__)->expressions))
23 typedef struct rpa_compiler_s {
25 rarray_t *expressions;
32 rpa_compiler_t *rpa_compiler_create();
33 void rpa_compiler_destroy(rpa_compiler_t *co);
34 rint rpa_compiler_rule_begin(rpa_compiler_t *co, const rchar *name, ruint namesize);
35 rint rpa_compiler_rule_begin_s(rpa_compiler_t *co, const rchar *name);
36 rint rpa_compiler_rule_end(rpa_compiler_t *co);
38 rint rpa_compiler_exp_begin(rpa_compiler_t *co);
39 rint rpa_compiler_exp_end(rpa_compiler_t *co, ruint qflag);