summaryrefslogtreecommitdiffstats
path: root/ctok.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-21 17:39:36 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-21 17:39:36 +0000
commitd74898029f38c59a316716e734eb5115c5a4614c (patch)
treedeeecc3b3781f3ea7455f57ed16b823a859cfd83 /ctok.c
parentabd0b45c447caa628bde2ceb6406c56bd7b56003 (diff)
downloadrsyslog-d74898029f38c59a316716e734eb5115c5a4614c.zip
rsyslog-d74898029f38c59a316716e734eb5115c5a4614c.tar.gz
rsyslog-d74898029f38c59a316716e734eb5115c5a4614c.tar.xz
- 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 ;))
Diffstat (limited to 'ctok.c')
-rw-r--r--ctok.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/ctok.c b/ctok.c
index db5609e..8b88e1a 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) {