generalize most of llk.c to arbitrary k (ex. h_predict) - still bugged
This commit is contained in:
parent
3ff32e86e4
commit
5e3c681dbc
3 changed files with 172 additions and 60 deletions
|
|
@ -45,10 +45,14 @@ void h_stringmap_put_epsilon(HCFStringMap *m, void *v);
|
|||
void h_stringmap_put_after(HCFStringMap *m, uint8_t c, HCFStringMap *ends);
|
||||
void h_stringmap_put_char(HCFStringMap *m, uint8_t c, void *v);
|
||||
void h_stringmap_update(HCFStringMap *m, const HCFStringMap *n);
|
||||
void h_stringmap_replace(HCFStringMap *m, void *old, void *new);
|
||||
void *h_stringmap_get(const HCFStringMap *m, const uint8_t *str, size_t n, bool end);
|
||||
bool h_stringmap_present(const HCFStringMap *m, const uint8_t *str, size_t n, bool end);
|
||||
bool h_stringmap_present_epsilon(const HCFStringMap *m);
|
||||
|
||||
static inline void *h_stringmap_get_char(const HCFStringMap *m, const uint8_t c)
|
||||
{ return h_hashtable_get(m->char_branches, (void *)char_key(c)); }
|
||||
|
||||
|
||||
/* Convert 'parser' into CFG representation by desugaring and compiling the set
|
||||
* of nonterminals.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue