From d74898029f38c59a316716e734eb5115c5a4614c Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 21 Feb 2008 17:39:36 +0000 Subject: - modified parser and tokenizer to support slight ABNF modifications from yesterday - change in ABNF was wrong - made a slightly different change - fixed bugs in tokenizer - expression compiler finished (except bugs, of course ;)) --- ctok.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'ctok.c') diff --git a/ctok.c b/ctok.c index db5609ec..8b88e1a2 100644 --- a/ctok.c +++ b/ctok.c @@ -224,6 +224,10 @@ ctokGetNumber(ctok_t *pThis, ctok_token_t *pToken) CHKiRet(ctokGetCharFromStream(pThis, &c)); c = tolower(c); } + + /* we need to unget the character that made the loop terminate */ + CHKiRet(ctokUngetCharFromStream(pThis, c)); + CHKiRet(var.SetInt64(pToken->pVar, n)); dbgprintf("number, number is: '%lld'\n", n); @@ -518,7 +522,7 @@ ctokGetToken(ctok_t *pThis, ctok_token_t **ppToken) } while(bRetry); /* warning: do ... while()! */ *ppToken = pToken; -RUNLOG_VAR("%d", pToken->tok); + dbgoprint((obj_t*) pToken, "token: %d\n", pToken->tok); finalize_it: if(iRet != RS_RET_OK) { -- cgit