commit da6b9ad4417ba3206815244901e97e80fb5a46ff from: Sven M. Hallberg date: Mon Aug 03 13:14:42 2020 UTC adjust documentation commit - 495a6e54da5bacc0cc7de703543c5ff65abfc44f commit + da6b9ad4417ba3206815244901e97e80fb5a46ff blob - e1ea88b55ce1bef309b407422cf1c2a90fe37b49 blob + c7c4d7cf581ad77850d577c0f5dae03ef84a61a2 --- minip_m.h +++ minip_m.h @@ -1,5 +1,5 @@ /* miniature recursive-descent parser combinators - * with semantic actions + * with semantic actions and result memoization * * pesco 2019, 2020 */ @@ -238,7 +238,7 @@ memo_(struct stream inp, struct cache *cache, void *en h0 = h0 * 33 + (unsigned char)sym[i]; /* look up (pos,sym) in cache and return if found */ - /* NB: count steps; the table could be filled with dummies */ + /* NB: count steps, since the table could be filled with dummies */ for (i=0, h=h0, s=1; i < cache->capacity; i++, h+=s, s*=5) { mem = cache->table + (h % cache->capacity); if (mem->position == NULL) /* not in table */ blob - da50978d4e5b035c90ab5649713da061c53dc29c blob + 064dae8dd8dd7c8ae6365df380c9029dc6ae2ed5 --- minip_n.h +++ minip_n.h @@ -1,5 +1,5 @@ /* miniature recursive-descent parser combinators - * with semantic actions + * with semantic actions and omnibus negative result memoization * * pesco 2019, 2020 */ @@ -238,7 +238,7 @@ memo_(struct stream inp, struct cache *cache, void *en h0 = h0 * 33 + (unsigned char)sym[i]; /* look up (pos,sym) in cache and return if found */ - /* NB: count steps; the table could be filled with dummies */ + /* NB: count steps, since the table could be filled with dummies */ for (i=0, h=h0, s=1; i < cache->capacity; i++, h+=s, s*=5) { mem = cache->table + (h % cache->capacity); if (mem->position == NULL) /* not in table */