diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 17:39:36 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-21 17:39:36 +0000 |
commit | d74898029f38c59a316716e734eb5115c5a4614c (patch) | |
tree | deeecc3b3781f3ea7455f57ed16b823a859cfd83 /ctok.c | |
parent | abd0b45c447caa628bde2ceb6406c56bd7b56003 (diff) | |
download | rsyslog-d74898029f38c59a316716e734eb5115c5a4614c.tar.gz rsyslog-d74898029f38c59a316716e734eb5115c5a4614c.tar.bz2 rsyslog-d74898029f38c59a316716e734eb5115c5a4614c.zip |
- 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.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -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) { |