add an assertion that catches the infinite loop
This commit is contained in:
parent
bd9f9293c1
commit
e4984fe60c
1 changed files with 3 additions and 0 deletions
|
|
@ -343,6 +343,9 @@ HParseResult *h_llk_parse(HAllocator* mm__, const HParser* parser, HInputStream*
|
||||||
if(p == NULL)
|
if(p == NULL)
|
||||||
goto no_parse;
|
goto no_parse;
|
||||||
|
|
||||||
|
// an infinite loop case that shouldn't happen
|
||||||
|
assert(!p->items[0] || p->items[0] != x);
|
||||||
|
|
||||||
// push production's rhs onto the stack (in reverse order)
|
// push production's rhs onto the stack (in reverse order)
|
||||||
HCFChoice **s;
|
HCFChoice **s;
|
||||||
for(s = p->items; *s; s++);
|
for(s = p->items; *s; s++);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue