handle suspend on lookahead at the very end of the chunk

This commit is contained in:
Sven M. Hallberg 2015-09-04 21:05:56 +02:00
parent 010a1a36ff
commit 1276004250
3 changed files with 27 additions and 14 deletions

View file

@ -56,6 +56,9 @@ bool h_stringmap_empty(const HStringMap *m);
static inline HStringMap *h_stringmap_get_char(const HStringMap *m, const uint8_t c)
{ return h_hashtable_get(m->char_branches, (void *)char_key(c)); }
// dummy return value used by h_stringmap_get_lookahead when out of input
#define H_NEED_INPUT ((void *)&h_stringmap_get_lookahead)
/* Convert 'parser' into CFG representation by desugaring and compiling the set
* of nonterminals.