summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/tools/lexer.c
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2007-06-04 02:50:28 +0000
committerdarrenr <darrenr@FreeBSD.org>2007-06-04 02:50:28 +0000
commite2e28d4361fc9bdb67694eedaf349bdc7ca088a3 (patch)
treef9efeb29d9992430924bdce513e7199c9397ac36 /contrib/ipfilter/tools/lexer.c
parent092f5d1218f4867a87b382d75613b9d2b3e56c18 (diff)
downloadFreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.zip
FreeBSD-src-e2e28d4361fc9bdb67694eedaf349bdc7ca088a3.tar.gz
Import IPFilter 4.1.23 to vendor branch.
See src/contrib/ipfilter/HISTORY for details of changes since 4.1.13
Diffstat (limited to 'contrib/ipfilter/tools/lexer.c')
-rw-r--r--contrib/ipfilter/tools/lexer.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/ipfilter/tools/lexer.c b/contrib/ipfilter/tools/lexer.c
index 49eeb51..9810345 100644
--- a/contrib/ipfilter/tools/lexer.c
+++ b/contrib/ipfilter/tools/lexer.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003 by Darren Reed.
+ * Copyright (C) 2002-2006 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*/
@@ -283,8 +283,9 @@ nextchar:
yypos++;
}
} while (n != c);
- yyunputc(n);
- break;
+ rval = YY_STR;
+ goto done;
+ /* NOTREACHED */
case EOF :
yylineNum = 1;
@@ -465,6 +466,9 @@ nextchar:
done:
yystr = yytexttostr(0, yypos);
+ if (yydebug)
+ printf("isbuilding %d yyvarnext %d nokey %d\n",
+ isbuilding, yyvarnext, nokey);
if (isbuilding == 1) {
wordtab_t *w;
@@ -491,8 +495,8 @@ done:
yytokentype = rval;
if (yydebug)
- printf("lexed(%s) [%d,%d,%d] => %d\n", yystr, string_start,
- string_end, pos, rval);
+ printf("lexed(%s) [%d,%d,%d] => %d @%d\n", yystr, string_start,
+ string_end, pos, rval, yysavedepth);
switch (rval)
{
@@ -607,6 +611,8 @@ wordtab_t *newdict;
void yyresetdict()
{
+ if (yydebug)
+ printf("yyresetdict(%d)\n", yysavedepth);
if (yysavedepth > 0) {
yysettab(yysavewords[--yysavedepth]);
if (yydebug)
OpenPOWER on IntegriCloud