add a missing end-of-input check in the LL(k) backend

This commit is contained in:
Sven M. Hallberg 2015-08-25 14:14:48 +02:00
parent 25b27490c3
commit c5f2c5aa2b
2 changed files with 26 additions and 0 deletions

View file

@ -349,6 +349,8 @@ HParseResult *h_llk_parse(HAllocator* mm__, const HParser* parser, HInputStream*
break;
case HCF_CHAR:
if(stream->overrun)
goto no_parse;
if(input != x->chr)
goto no_parse;
tok->token_type = TT_UINT;