11ANEW
PP *
new_pp(MemPool p,
const uint size,
const char* name) {
12 PP *pp = (
PP *)mp_calloc(p,
PP);
13 vector_init(&pp->
data);
14 pp->
macros = (Hash)mp_calloc(p, Hash);
17 vector_init(&pp->
state);
22 vector_add(&pp->
state, (vtype)pps);
27 for (m_uint i = 1; i < vector_size(&pp->
state); ++i) {
28 void *ppstate = (
void *)vector_at(&pp->
state, i);
33 vector_clear(&pp->
state);
40 vector_release(&pp->
state);
43 mp_free(p, Hash, pp->
macros);
44 vector_release(&pp->
data);
helper for bison locations
ANN void clear_buffer(void *state, void *scan)
include this file to use gwion-ast library
ANN void pos_ini(pos_t *pos)
void macro_del(const Hash)
ANEW PP * new_pp(MemPool p, const uint size, const char *name)
ANN void free_pp(MemPool p, PP *pp, void *data)
ANN PPState * new_ppstate(MemPool p, const char *filename)
static void pp_post(PP *pp, void *data)
struct Vector_ global_undef