diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-13 17:21:03 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-06-13 17:21:03 +0200 |
commit | 4f32b629906f078ea81637829dde136a27b214e5 (patch) | |
tree | c6a4c2830c99575edf7b272a4517d89094bb66b0 /runtime/ctok.c | |
parent | fa3451aaa466ba7da28de6b324b4f90bab3ad4ef (diff) | |
download | rsyslog-4f32b629906f078ea81637829dde136a27b214e5.tar.gz rsyslog-4f32b629906f078ea81637829dde136a27b214e5.tar.bz2 rsyslog-4f32b629906f078ea81637829dde136a27b214e5.zip |
begun building a testbench
Diffstat (limited to 'runtime/ctok.c')
-rw-r--r-- | runtime/ctok.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/runtime/ctok.c b/runtime/ctok.c index c938a292..927e6a47 100644 --- a/runtime/ctok.c +++ b/runtime/ctok.c @@ -130,7 +130,7 @@ ctokSkipWhitespaceFromStream(ctok_t *pThis) /* we must unget the one non-whitespace we found */ CHKiRet(ctokUngetCharFromStream(pThis, c)); -dbgprintf("skipped whitepsace, stream now '%s'\n", pThis->pp); +dbgprintf("skipped whitespace, stream now '%s'\n", pThis->pp); finalize_it: RETiRet; } @@ -390,6 +390,7 @@ ctokGetToken(ctok_t *pThis, ctok_token_t **ppToken) uchar szWord[128]; int bRetry = 0; /* retry parse? Only needed for inline comments... */ +dbgprintf("ctokGetToken\n"); ISOBJ_TYPE_assert(pThis, ctok); ASSERT(ppToken != NULL); @@ -408,6 +409,7 @@ ctokGetToken(ctok_t *pThis, ctok_token_t **ppToken) /* find the next token. We may loop when we have inline comments */ do { +dbgprintf("we search for a new token\n"); bRetry = 0; CHKiRet(ctokSkipWhitespaceFromStream(pThis)); CHKiRet(ctokGetCharFromStream(pThis, &c)); /* read a charater */ @@ -514,6 +516,7 @@ ctokGetToken(ctok_t *pThis, ctok_token_t **ppToken) pToken->tok = ctok_FUNCTION; // TODO: fill function name } else { /* give up... */ + dbgprintf("parser has an invalid word (token) '%s'\n", szWord); pToken->tok = ctok_INVALID; } } |