2014-08-25 00:38:09 -04:00
|
|
|
/**
|
|
|
|
* See Copyright Notice in picrin.h
|
|
|
|
*/
|
|
|
|
|
2014-09-14 04:54:53 -04:00
|
|
|
#ifndef PICRIN_READ_H
|
|
|
|
#define PICRIN_READ_H
|
2014-08-25 00:38:09 -04:00
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
enum pic_typecase {
|
|
|
|
PIC_CASE_DEFAULT,
|
|
|
|
PIC_CASE_FOLD,
|
|
|
|
};
|
|
|
|
|
|
|
|
struct pic_trie {
|
|
|
|
struct pic_trie *table[256];
|
|
|
|
struct pic_proc *proc;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct pic_reader {
|
|
|
|
short typecase;
|
|
|
|
xhash labels;
|
|
|
|
struct pic_trie *trie;
|
|
|
|
};
|
|
|
|
|
|
|
|
void pic_init_reader(pic_state *);
|
|
|
|
|
|
|
|
void pic_define_reader(pic_state *, const char *, pic_func_t);
|
|
|
|
|
2014-09-12 06:49:00 -04:00
|
|
|
struct pic_trie *pic_make_trie(pic_state *);
|
2014-08-25 00:38:09 -04:00
|
|
|
void pic_trie_delete(pic_state *, struct pic_trie *);
|
|
|
|
|
|
|
|
#if defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif
|