mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-06-05 00:22:46 +08:00
Update yacc and lex generated files
Use the FreeBSD 11.1 yacc and lex tools to generate the files. Update #3472.
This commit is contained in:
parent
100e66f560
commit
fa3e012fc6
@ -41,13 +41,28 @@ GENERATED += $(LOCAL_INC)/gpiobus_if.h
|
||||
GENERATED += $(LOCAL_SRC)/gpiobus_if.c
|
||||
GENERATED += rtemsbsd/include/machine/rtems-bsd-regdomain.h
|
||||
GENERATED += rtemsbsd/rtems/rtems-bsd-regdomain.c
|
||||
GENERATED += freebsd/contrib/libpcap/grammar.h
|
||||
GENERATED += freebsd/contrib/libpcap/grammar.c
|
||||
GENERATED += freebsd/contrib/libpcap/pcap_version.h
|
||||
GENERATED += freebsd/contrib/libpcap/scanner.h
|
||||
GENERATED += freebsd/contrib/libpcap/scanner.c
|
||||
|
||||
all: $(GENERATED)
|
||||
YACC_GENERATED =
|
||||
LEX_GENERATED =
|
||||
|
||||
YACC_GENERATED += freebsd/lib/libc/net/nsparser.h
|
||||
YACC_GENERATED += freebsd/lib/libc/net/nsparser.c
|
||||
LEX_GENERATED += freebsd/lib/libc/net/nslexer.c
|
||||
|
||||
YACC_GENERATED += freebsd/sbin/pfctl/parse.h
|
||||
YACC_GENERATED += freebsd/sbin/pfctl/parse.c
|
||||
|
||||
YACC_GENERATED += freebsd/contrib/libpcap/grammar.h
|
||||
YACC_GENERATED += freebsd/contrib/libpcap/grammar.c
|
||||
LEX_GENERATED += freebsd/contrib/libpcap/scanner.h
|
||||
LEX_GENERATED += freebsd/contrib/libpcap/scanner.c
|
||||
|
||||
yacc: $(YACC_GENERATED)
|
||||
|
||||
lex: $(LEX_GENERATED)
|
||||
|
||||
all: yacc lex $(GENERATED)
|
||||
|
||||
$(LOCAL_INC)/usbdevs.h: $(FREEBSD_SRC)/sys/dev/usb/usbdevs
|
||||
awk -f $(TOOLS)/usbdevs2h.awk $< -h
|
||||
@ -229,22 +244,37 @@ rtemsbsd/include/machine/rtems-bsd-regdomain.h: $(FREEBSD_SRC)/etc/regdomain.xml
|
||||
rtemsbsd/rtems/rtems-bsd-regdomain.c: $(FREEBSD_SRC)/etc/regdomain.xml
|
||||
rtems-bin2c -C $< $@
|
||||
|
||||
freebsd/contrib/libpcap/grammar.h: freebsd/contrib/libpcap/grammar.c
|
||||
|
||||
freebsd/contrib/libpcap/grammar.c: freebsd-org/contrib/libpcap/grammar.y
|
||||
cd freebsd-org/contrib/libpcap && yacc -p pcap_ -o grammar.c -d grammar.y
|
||||
mv freebsd-org/contrib/libpcap/grammar.h freebsd/contrib/libpcap/grammar.h
|
||||
mv freebsd-org/contrib/libpcap/grammar.c $@
|
||||
|
||||
freebsd/contrib/libpcap/pcap_version.h: freebsd-org/contrib/libpcap/VERSION
|
||||
freebsd-org/contrib/libpcap/gen_version_header.sh $< freebsd-org/contrib/libpcap/pcap_version.h.in $@
|
||||
|
||||
freebsd/lib/libc/net/nsparser.h: freebsd/lib/libc/net/nsparser.c
|
||||
|
||||
freebsd/lib/libc/net/nsparser.c: freebsd/lib/libc/net/nsparser.y
|
||||
cd freebsd/lib/libc/net && yacc -p _nsyy -o nsparser.c -d nsparser.y
|
||||
|
||||
freebsd/lib/libc/net/nslexer.c: freebsd/lib/libc/net/nslexer.l
|
||||
cd freebsd/lib/libc/net && lex -P _nsyy -DYY_BUF_SIZE=1024 -o nslexer.c nslexer.l
|
||||
|
||||
freebsd/sbin/pfctl/parse.h: freebsd/sbin/pfctl/parse.c
|
||||
|
||||
freebsd/sbin/pfctl/parse.c: freebsd/sbin/pfctl/parse.y
|
||||
cd freebsd/sbin/pfctl && yacc -p pfctly -o parse.c -d parse.y
|
||||
|
||||
freebsd/contrib/libpcap/grammar.h: freebsd/contrib/libpcap/grammar.c
|
||||
|
||||
freebsd/contrib/libpcap/grammar.c: freebsd/contrib/libpcap/grammar.y
|
||||
cd freebsd/contrib/libpcap && yacc -p pcap_ -o grammar.c -d grammar.y
|
||||
|
||||
freebsd/contrib/libpcap/scanner.h: freebsd/contrib/libpcap/scanner.c
|
||||
|
||||
freebsd/contrib/libpcap/scanner.c: freebsd-org/contrib/libpcap/scanner.l
|
||||
cd freebsd-org/contrib/libpcap && lex -P pcap_ --header-file=scanner.h --nounput -o scanner.c scanner.l
|
||||
mv freebsd-org/contrib/libpcap/scanner.h freebsd/contrib/libpcap/scanner.h
|
||||
mv freebsd-org/contrib/libpcap/scanner.c $@
|
||||
freebsd/contrib/libpcap/scanner.c: freebsd/contrib/libpcap/scanner.l
|
||||
cd freebsd/contrib/libpcap && lex -P pcap_ --header-file=scanner.h --nounput -o scanner.c scanner.l
|
||||
|
||||
clean:
|
||||
clean-yacc:
|
||||
rm $(YACC_GENERATED)
|
||||
|
||||
clean-lex:
|
||||
rm $(LEX_GENERATED)
|
||||
|
||||
clean: clean-yacc clean-lex
|
||||
rm $(GENERATED)
|
||||
|
@ -1,6 +1,8 @@
|
||||
#line 2 "nslexer.c"
|
||||
|
||||
#line 3 "<stdout>"
|
||||
#line 4 "nslexer.c"
|
||||
|
||||
#define YY_BUF_SIZE 1024
|
||||
#define YY_INT_ALIGNED short int
|
||||
|
||||
/* A lexical scanner generated by flex */
|
||||
@ -171,7 +173,7 @@ typedef unsigned int flex_uint32_t;
|
||||
|
||||
/* Size of default input buffer. */
|
||||
#ifndef YY_BUF_SIZE
|
||||
#define YY_BUF_SIZE 1024
|
||||
#define YY_BUF_SIZE 16384
|
||||
#endif
|
||||
|
||||
/* The state buf must be large enough to hold one state per character in the main buffer.
|
||||
@ -531,8 +533,8 @@ int _nsyy_flex_debug = 0;
|
||||
#define YY_MORE_ADJ 0
|
||||
#define YY_RESTORE_YY_MORE_OFFSET
|
||||
char *_nsyytext;
|
||||
#line 1 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 2 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 1 "nslexer.l"
|
||||
#line 2 "nslexer.l"
|
||||
/* $NetBSD: nslexer.l,v 1.3 1999/01/25 00:16:17 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
@ -581,7 +583,7 @@ static char *rcsid =
|
||||
#include "nsparser.h"
|
||||
|
||||
#define YY_NO_INPUT 1
|
||||
#line 585 "<stdout>"
|
||||
#line 587 "nslexer.c"
|
||||
|
||||
#define INITIAL 0
|
||||
|
||||
@ -761,10 +763,10 @@ YY_DECL
|
||||
char *yy_cp, *yy_bp;
|
||||
int yy_act;
|
||||
|
||||
#line 59 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 59 "nslexer.l"
|
||||
|
||||
|
||||
#line 768 "<stdout>"
|
||||
#line 770 "nslexer.c"
|
||||
|
||||
if ( !(yy_init) )
|
||||
{
|
||||
@ -859,59 +861,59 @@ do_action: /* This label is used only to access EOF actions. */
|
||||
|
||||
case 1:
|
||||
YY_RULE_SETUP
|
||||
#line 61 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 61 "nslexer.l"
|
||||
; /* skip whitespace */
|
||||
YY_BREAK
|
||||
case 2:
|
||||
YY_RULE_SETUP
|
||||
#line 63 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 63 "nslexer.l"
|
||||
; /* skip comments */
|
||||
YY_BREAK
|
||||
case 3:
|
||||
/* rule 3 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 65 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 65 "nslexer.l"
|
||||
; /* allow continuation */
|
||||
YY_BREAK
|
||||
case 4:
|
||||
/* rule 4 can match eol */
|
||||
YY_RULE_SETUP
|
||||
#line 67 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 67 "nslexer.l"
|
||||
return NL;
|
||||
YY_BREAK
|
||||
case 5:
|
||||
YY_RULE_SETUP
|
||||
#line 69 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 69 "nslexer.l"
|
||||
return SUCCESS;
|
||||
YY_BREAK
|
||||
case 6:
|
||||
YY_RULE_SETUP
|
||||
#line 70 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 70 "nslexer.l"
|
||||
return UNAVAIL;
|
||||
YY_BREAK
|
||||
case 7:
|
||||
YY_RULE_SETUP
|
||||
#line 71 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 71 "nslexer.l"
|
||||
return NOTFOUND;
|
||||
YY_BREAK
|
||||
case 8:
|
||||
YY_RULE_SETUP
|
||||
#line 72 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 72 "nslexer.l"
|
||||
return TRYAGAIN;
|
||||
YY_BREAK
|
||||
case 9:
|
||||
YY_RULE_SETUP
|
||||
#line 74 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 74 "nslexer.l"
|
||||
return RETURN;
|
||||
YY_BREAK
|
||||
case 10:
|
||||
YY_RULE_SETUP
|
||||
#line 75 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 75 "nslexer.l"
|
||||
return CONTINUE;
|
||||
YY_BREAK
|
||||
case 11:
|
||||
YY_RULE_SETUP
|
||||
#line 77 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 77 "nslexer.l"
|
||||
{
|
||||
char *p;
|
||||
int i;
|
||||
@ -931,15 +933,15 @@ YY_RULE_SETUP
|
||||
YY_BREAK
|
||||
case 12:
|
||||
YY_RULE_SETUP
|
||||
#line 94 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 94 "nslexer.l"
|
||||
return _nsyytext[0];
|
||||
YY_BREAK
|
||||
case 13:
|
||||
YY_RULE_SETUP
|
||||
#line 96 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 96 "nslexer.l"
|
||||
ECHO;
|
||||
YY_BREAK
|
||||
#line 943 "<stdout>"
|
||||
#line 945 "nslexer.c"
|
||||
case YY_STATE_EOF(INITIAL):
|
||||
yyterminate();
|
||||
|
||||
@ -1904,7 +1906,7 @@ void _nsyyfree (void * ptr )
|
||||
|
||||
#define YYTABLES_NAME "yytables"
|
||||
|
||||
#line 96 "../../freebsd/lib/libc/net/nslexer.l"
|
||||
#line 96 "nslexer.l"
|
||||
|
||||
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
#define YYBYACC 1
|
||||
#define YYMAJOR 1
|
||||
#define YYMINOR 9
|
||||
#define YYPATCH 20160324
|
||||
#define YYPATCH 20170201
|
||||
|
||||
#define YYEMPTY (-1)
|
||||
#define yyclearin (yychar = YYEMPTY)
|
||||
@ -97,7 +97,7 @@
|
||||
|
||||
#define YYPURE 0
|
||||
|
||||
#line 2 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 2 "nsparser.y"
|
||||
/* $NetBSD: nsparser.y,v 1.3 1999/01/25 00:16:18 lukem Exp $ */
|
||||
|
||||
/*-
|
||||
@ -145,19 +145,19 @@ static void _nsaddsrctomap(const char *);
|
||||
|
||||
static ns_dbt curdbt;
|
||||
static ns_src cursrc;
|
||||
#line 51 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#ifdef YYSTYPE
|
||||
#undef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
#ifndef YYSTYPE_IS_DECLARED
|
||||
#define YYSTYPE_IS_DECLARED 1
|
||||
#line 51 "nsparser.y"
|
||||
typedef union {
|
||||
char *str;
|
||||
int mapval;
|
||||
} YYSTYPE;
|
||||
#endif /* !YYSTYPE_IS_DECLARED */
|
||||
#line 161 "_nsyy.tab.c"
|
||||
#line 161 "nsparser.c"
|
||||
|
||||
/* compatibility with bison */
|
||||
#ifdef YYPARSE_PARAM
|
||||
@ -356,7 +356,7 @@ typedef struct {
|
||||
} YYSTACKDATA;
|
||||
/* variables for the parser stack */
|
||||
static YYSTACKDATA yystack;
|
||||
#line 146 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 146 "nsparser.y"
|
||||
|
||||
static void
|
||||
_nsaddsrctomap(const char *elem)
|
||||
@ -389,10 +389,10 @@ _nsaddsrctomap(const char *elem)
|
||||
cursrc.name = elem;
|
||||
_nsdbtaddsrc(&curdbt, &cursrc);
|
||||
}
|
||||
#line 393 "_nsyy.tab.c"
|
||||
#line 393 "nsparser.c"
|
||||
|
||||
#if YYDEBUG
|
||||
#include <stdio.h> /* needed for printf */
|
||||
#include <stdio.h> /* needed for printf */
|
||||
#endif
|
||||
|
||||
#include <stdlib.h> /* needed for malloc, etc */
|
||||
@ -464,6 +464,8 @@ YYPARSE_DECL()
|
||||
}
|
||||
#endif
|
||||
|
||||
yym = 0;
|
||||
yyn = 0;
|
||||
yynerrs = 0;
|
||||
yyerrflag = 0;
|
||||
yychar = YYEMPTY;
|
||||
@ -483,28 +485,26 @@ yyloop:
|
||||
if ((yyn = yydefred[yystate]) != 0) goto yyreduce;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = YYLEX) < 0) yychar = YYEOF;
|
||||
yychar = YYLEX;
|
||||
if (yychar < 0) yychar = YYEOF;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = yyname[YYTRANSLATE(yychar)];
|
||||
if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
|
||||
printf("%sdebug: state %d, reading %d (%s)\n",
|
||||
YYPREFIX, yystate, yychar, yys);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
if (((yyn = yysindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: state %d, shifting to state %d\n",
|
||||
YYPREFIX, yystate, yytable[yyn]);
|
||||
#endif
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
|
||||
yystate = yytable[yyn];
|
||||
*++yystack.s_mark = yytable[yyn];
|
||||
*++yystack.l_mark = yylval;
|
||||
@ -512,18 +512,17 @@ yyloop:
|
||||
if (yyerrflag > 0) --yyerrflag;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yyrindex[yystate]) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yychar)
|
||||
if (((yyn = yyrindex[yystate]) != 0) && (yyn += yychar) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yychar)
|
||||
{
|
||||
yyn = yytable[yyn];
|
||||
goto yyreduce;
|
||||
}
|
||||
if (yyerrflag) goto yyinrecovery;
|
||||
if (yyerrflag != 0) goto yyinrecovery;
|
||||
|
||||
YYERROR_CALL("syntax error");
|
||||
|
||||
goto yyerrlab;
|
||||
|
||||
goto yyerrlab; /* redundant goto avoids 'unused label' warning */
|
||||
yyerrlab:
|
||||
++yynerrs;
|
||||
|
||||
@ -533,18 +532,15 @@ yyinrecovery:
|
||||
yyerrflag = 3;
|
||||
for (;;)
|
||||
{
|
||||
if ((yyn = yysindex[*yystack.s_mark]) && (yyn += YYERRCODE) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == YYERRCODE)
|
||||
if (((yyn = yysindex[*yystack.s_mark]) != 0) && (yyn += YYERRCODE) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) YYERRCODE)
|
||||
{
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
printf("%sdebug: state %d, error recovery shifting\
|
||||
to state %d\n", YYPREFIX, *yystack.s_mark, yytable[yyn]);
|
||||
#endif
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
|
||||
yystate = yytable[yyn];
|
||||
*++yystack.s_mark = yytable[yyn];
|
||||
*++yystack.l_mark = yylval;
|
||||
@ -569,7 +565,7 @@ yyinrecovery:
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = yyname[YYTRANSLATE(yychar)];
|
||||
if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
|
||||
printf("%sdebug: state %d, error recovery discards token %d (%s)\n",
|
||||
YYPREFIX, yystate, yychar, yys);
|
||||
}
|
||||
@ -585,32 +581,33 @@ yyreduce:
|
||||
YYPREFIX, yystate, yyn, yyrule[yyn]);
|
||||
#endif
|
||||
yym = yylen[yyn];
|
||||
if (yym)
|
||||
if (yym > 0)
|
||||
yyval = yystack.l_mark[1-yym];
|
||||
else
|
||||
memset(&yyval, 0, sizeof yyval);
|
||||
|
||||
switch (yyn)
|
||||
{
|
||||
case 6:
|
||||
#line 79 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 79 "nsparser.y"
|
||||
{
|
||||
free((char*)curdbt.name);
|
||||
}
|
||||
break;
|
||||
case 7:
|
||||
#line 83 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 83 "nsparser.y"
|
||||
{
|
||||
_nsdbtput(&curdbt);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
#line 87 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 87 "nsparser.y"
|
||||
{
|
||||
yyerrok;
|
||||
}
|
||||
break;
|
||||
case 9:
|
||||
#line 94 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 94 "nsparser.y"
|
||||
{
|
||||
curdbt.name = yylval.str;
|
||||
curdbt.srclist = NULL;
|
||||
@ -618,24 +615,24 @@ case 9:
|
||||
}
|
||||
break;
|
||||
case 12:
|
||||
#line 108 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 108 "nsparser.y"
|
||||
{
|
||||
cursrc.flags = NS_TERMINATE;
|
||||
_nsaddsrctomap(yystack.l_mark[0].str);
|
||||
}
|
||||
break;
|
||||
case 13:
|
||||
#line 112 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 112 "nsparser.y"
|
||||
{ cursrc.flags = NS_SUCCESS; }
|
||||
break;
|
||||
case 14:
|
||||
#line 113 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 113 "nsparser.y"
|
||||
{
|
||||
_nsaddsrctomap(yystack.l_mark[-4].str);
|
||||
}
|
||||
break;
|
||||
case 17:
|
||||
#line 125 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 125 "nsparser.y"
|
||||
{
|
||||
if (yystack.l_mark[0].mapval) /* if action == RETURN set RETURN bit */
|
||||
cursrc.flags |= yystack.l_mark[-2].mapval;
|
||||
@ -644,30 +641,30 @@ case 17:
|
||||
}
|
||||
break;
|
||||
case 18:
|
||||
#line 134 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 134 "nsparser.y"
|
||||
{ yyval.mapval = NS_SUCCESS; }
|
||||
break;
|
||||
case 19:
|
||||
#line 135 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 135 "nsparser.y"
|
||||
{ yyval.mapval = NS_UNAVAIL; }
|
||||
break;
|
||||
case 20:
|
||||
#line 136 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 136 "nsparser.y"
|
||||
{ yyval.mapval = NS_NOTFOUND; }
|
||||
break;
|
||||
case 21:
|
||||
#line 137 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 137 "nsparser.y"
|
||||
{ yyval.mapval = NS_TRYAGAIN; }
|
||||
break;
|
||||
case 22:
|
||||
#line 141 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 141 "nsparser.y"
|
||||
{ yyval.mapval = NS_ACTION_RETURN; }
|
||||
break;
|
||||
case 23:
|
||||
#line 142 "../../freebsd/lib/libc/net/nsparser.y"
|
||||
#line 142 "nsparser.y"
|
||||
{ yyval.mapval = NS_ACTION_CONTINUE; }
|
||||
break;
|
||||
#line 671 "_nsyy.tab.c"
|
||||
#line 668 "nsparser.c"
|
||||
}
|
||||
yystack.s_mark -= yym;
|
||||
yystate = *yystack.s_mark;
|
||||
@ -685,11 +682,12 @@ break;
|
||||
*++yystack.l_mark = yyval;
|
||||
if (yychar < 0)
|
||||
{
|
||||
if ((yychar = YYLEX) < 0) yychar = YYEOF;
|
||||
yychar = YYLEX;
|
||||
if (yychar < 0) yychar = YYEOF;
|
||||
#if YYDEBUG
|
||||
if (yydebug)
|
||||
{
|
||||
yys = yyname[YYTRANSLATE(yychar)];
|
||||
if ((yys = yyname[YYTRANSLATE(yychar)]) == NULL) yys = yyname[YYUNDFTOKEN];
|
||||
printf("%sdebug: state %d, reading %d (%s)\n",
|
||||
YYPREFIX, YYFINAL, yychar, yys);
|
||||
}
|
||||
@ -698,8 +696,8 @@ break;
|
||||
if (yychar == YYEOF) goto yyaccept;
|
||||
goto yyloop;
|
||||
}
|
||||
if ((yyn = yygindex[yym]) && (yyn += yystate) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == yystate)
|
||||
if (((yyn = yygindex[yym]) != 0) && (yyn += yystate) >= 0 &&
|
||||
yyn <= YYTABLESIZE && yycheck[yyn] == (YYINT) yystate)
|
||||
yystate = yytable[yyn];
|
||||
else
|
||||
yystate = yydgoto[yym];
|
||||
@ -708,10 +706,7 @@ break;
|
||||
printf("%sdebug: after reduction, shifting from state %d \
|
||||
to state %d\n", YYPREFIX, *yystack.s_mark, yystate);
|
||||
#endif
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)
|
||||
{
|
||||
goto yyoverflow;
|
||||
}
|
||||
if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;
|
||||
*++yystack.s_mark = (YYINT) yystate;
|
||||
*++yystack.l_mark = yyval;
|
||||
goto yyloop;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,337 +1,130 @@
|
||||
/* A Bison parser, made by GNU Bison 2.7. */
|
||||
|
||||
/* Bison interface for Yacc-like parsers in C
|
||||
|
||||
Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* As a special exception, you may create a larger work that contains
|
||||
part or all of the Bison parser skeleton and distribute that work
|
||||
under terms of your choice, so long as that work isn't itself a
|
||||
parser generator using the skeleton or a modified version thereof
|
||||
as a parser skeleton. Alternatively, if you modify or redistribute
|
||||
the parser skeleton itself, you may (at your option) remove this
|
||||
special exception, which will cause the skeleton and the resulting
|
||||
Bison output files to be licensed under the GNU General Public
|
||||
License without this special exception.
|
||||
|
||||
This special exception was added by the Free Software Foundation in
|
||||
version 2.2 of Bison. */
|
||||
|
||||
#ifndef YY_PFCTLY_PFCTLY_TAB_H_INCLUDED
|
||||
# define YY_PFCTLY_PFCTLY_TAB_H_INCLUDED
|
||||
/* Enabling traces. */
|
||||
#ifndef YYDEBUG
|
||||
# define YYDEBUG 0
|
||||
#endif
|
||||
#if YYDEBUG
|
||||
extern int pfctlydebug;
|
||||
#endif
|
||||
|
||||
/* Tokens. */
|
||||
#ifndef YYTOKENTYPE
|
||||
# define YYTOKENTYPE
|
||||
/* Put the tokens into the symbol table, so that GDB and other debuggers
|
||||
know about them. */
|
||||
enum yytokentype {
|
||||
PASS = 258,
|
||||
BLOCK = 259,
|
||||
SCRUB = 260,
|
||||
RETURN = 261,
|
||||
IN = 262,
|
||||
OS = 263,
|
||||
OUT = 264,
|
||||
LOG = 265,
|
||||
QUICK = 266,
|
||||
ON = 267,
|
||||
FROM = 268,
|
||||
TO = 269,
|
||||
FLAGS = 270,
|
||||
RETURNRST = 271,
|
||||
RETURNICMP = 272,
|
||||
RETURNICMP6 = 273,
|
||||
PROTO = 274,
|
||||
INET = 275,
|
||||
INET6 = 276,
|
||||
ALL = 277,
|
||||
ANY = 278,
|
||||
ICMPTYPE = 279,
|
||||
ICMP6TYPE = 280,
|
||||
CODE = 281,
|
||||
KEEP = 282,
|
||||
MODULATE = 283,
|
||||
STATE = 284,
|
||||
PORT = 285,
|
||||
RDR = 286,
|
||||
NAT = 287,
|
||||
BINAT = 288,
|
||||
ARROW = 289,
|
||||
NODF = 290,
|
||||
MINTTL = 291,
|
||||
ERROR = 292,
|
||||
ALLOWOPTS = 293,
|
||||
FASTROUTE = 294,
|
||||
FILENAME = 295,
|
||||
ROUTETO = 296,
|
||||
DUPTO = 297,
|
||||
REPLYTO = 298,
|
||||
NO = 299,
|
||||
LABEL = 300,
|
||||
NOROUTE = 301,
|
||||
URPFFAILED = 302,
|
||||
FRAGMENT = 303,
|
||||
USER = 304,
|
||||
GROUP = 305,
|
||||
MAXMSS = 306,
|
||||
MAXIMUM = 307,
|
||||
TTL = 308,
|
||||
TOS = 309,
|
||||
DROP = 310,
|
||||
TABLE = 311,
|
||||
REASSEMBLE = 312,
|
||||
FRAGDROP = 313,
|
||||
FRAGCROP = 314,
|
||||
ANCHOR = 315,
|
||||
NATANCHOR = 316,
|
||||
RDRANCHOR = 317,
|
||||
BINATANCHOR = 318,
|
||||
SET = 319,
|
||||
OPTIMIZATION = 320,
|
||||
TIMEOUT = 321,
|
||||
LIMIT = 322,
|
||||
LOGINTERFACE = 323,
|
||||
BLOCKPOLICY = 324,
|
||||
RANDOMID = 325,
|
||||
REQUIREORDER = 326,
|
||||
SYNPROXY = 327,
|
||||
FINGERPRINTS = 328,
|
||||
NOSYNC = 329,
|
||||
DEBUG = 330,
|
||||
SKIP = 331,
|
||||
HOSTID = 332,
|
||||
ANTISPOOF = 333,
|
||||
FOR = 334,
|
||||
INCLUDE = 335,
|
||||
BITMASK = 336,
|
||||
RANDOM = 337,
|
||||
SOURCEHASH = 338,
|
||||
ROUNDROBIN = 339,
|
||||
STATICPORT = 340,
|
||||
PROBABILITY = 341,
|
||||
ALTQ = 342,
|
||||
CBQ = 343,
|
||||
CODEL = 344,
|
||||
PRIQ = 345,
|
||||
HFSC = 346,
|
||||
FAIRQ = 347,
|
||||
BANDWIDTH = 348,
|
||||
TBRSIZE = 349,
|
||||
LINKSHARE = 350,
|
||||
REALTIME = 351,
|
||||
UPPERLIMIT = 352,
|
||||
QUEUE = 353,
|
||||
PRIORITY = 354,
|
||||
QLIMIT = 355,
|
||||
HOGS = 356,
|
||||
BUCKETS = 357,
|
||||
RTABLE = 358,
|
||||
TARGET = 359,
|
||||
INTERVAL = 360,
|
||||
LOAD = 361,
|
||||
RULESET_OPTIMIZATION = 362,
|
||||
PRIO = 363,
|
||||
STICKYADDRESS = 364,
|
||||
MAXSRCSTATES = 365,
|
||||
MAXSRCNODES = 366,
|
||||
SOURCETRACK = 367,
|
||||
GLOBAL = 368,
|
||||
RULE = 369,
|
||||
MAXSRCCONN = 370,
|
||||
MAXSRCCONNRATE = 371,
|
||||
OVERLOAD = 372,
|
||||
FLUSH = 373,
|
||||
SLOPPY = 374,
|
||||
TAGGED = 375,
|
||||
TAG = 376,
|
||||
IFBOUND = 377,
|
||||
FLOATING = 378,
|
||||
STATEPOLICY = 379,
|
||||
STATEDEFAULTS = 380,
|
||||
ROUTE = 381,
|
||||
SETTOS = 382,
|
||||
DIVERTTO = 383,
|
||||
DIVERTREPLY = 384,
|
||||
STRING = 385,
|
||||
NUMBER = 386,
|
||||
PORTBINARY = 387
|
||||
};
|
||||
#endif
|
||||
/* Tokens. */
|
||||
#define PASS 258
|
||||
#define BLOCK 259
|
||||
#define SCRUB 260
|
||||
#define RETURN 261
|
||||
#define IN 262
|
||||
#define OS 263
|
||||
#define OUT 264
|
||||
#define LOG 265
|
||||
#define QUICK 266
|
||||
#define ON 267
|
||||
#define FROM 268
|
||||
#define TO 269
|
||||
#define FLAGS 270
|
||||
#define RETURNRST 271
|
||||
#define RETURNICMP 272
|
||||
#define RETURNICMP6 273
|
||||
#define PROTO 274
|
||||
#define INET 275
|
||||
#define INET6 276
|
||||
#define ALL 277
|
||||
#define ANY 278
|
||||
#define ICMPTYPE 279
|
||||
#define ICMP6TYPE 280
|
||||
#define CODE 281
|
||||
#define KEEP 282
|
||||
#define MODULATE 283
|
||||
#define STATE 284
|
||||
#define PORT 285
|
||||
#define RDR 286
|
||||
#define NAT 287
|
||||
#define BINAT 288
|
||||
#define ARROW 289
|
||||
#define NODF 290
|
||||
#define MINTTL 291
|
||||
#define ERROR 292
|
||||
#define ALLOWOPTS 293
|
||||
#define FASTROUTE 294
|
||||
#define FILENAME 295
|
||||
#define ROUTETO 296
|
||||
#define DUPTO 297
|
||||
#define REPLYTO 298
|
||||
#define NO 299
|
||||
#define LABEL 300
|
||||
#define NOROUTE 301
|
||||
#define URPFFAILED 302
|
||||
#define FRAGMENT 303
|
||||
#define USER 304
|
||||
#define GROUP 305
|
||||
#define MAXMSS 306
|
||||
#define MAXIMUM 307
|
||||
#define TTL 308
|
||||
#define TOS 309
|
||||
#define DROP 310
|
||||
#define TABLE 311
|
||||
#define REASSEMBLE 312
|
||||
#define FRAGDROP 313
|
||||
#define FRAGCROP 314
|
||||
#define ANCHOR 315
|
||||
#define NATANCHOR 316
|
||||
#define RDRANCHOR 317
|
||||
#define BINATANCHOR 318
|
||||
#define SET 319
|
||||
#define OPTIMIZATION 320
|
||||
#define TIMEOUT 321
|
||||
#define LIMIT 322
|
||||
#define LOGINTERFACE 323
|
||||
#define BLOCKPOLICY 324
|
||||
#define RANDOMID 325
|
||||
#define REQUIREORDER 326
|
||||
#define SYNPROXY 327
|
||||
#define FINGERPRINTS 328
|
||||
#define NOSYNC 329
|
||||
#define DEBUG 330
|
||||
#define SKIP 331
|
||||
#define HOSTID 332
|
||||
#define ANTISPOOF 333
|
||||
#define FOR 334
|
||||
#define INCLUDE 335
|
||||
#define BITMASK 336
|
||||
#define RANDOM 337
|
||||
#define SOURCEHASH 338
|
||||
#define ROUNDROBIN 339
|
||||
#define STATICPORT 340
|
||||
#define PROBABILITY 341
|
||||
#define ALTQ 342
|
||||
#define CBQ 343
|
||||
#define CODEL 344
|
||||
#define PRIQ 345
|
||||
#define HFSC 346
|
||||
#define FAIRQ 347
|
||||
#define BANDWIDTH 348
|
||||
#define TBRSIZE 349
|
||||
#define LINKSHARE 350
|
||||
#define REALTIME 351
|
||||
#define UPPERLIMIT 352
|
||||
#define QUEUE 353
|
||||
#define PRIORITY 354
|
||||
#define QLIMIT 355
|
||||
#define HOGS 356
|
||||
#define BUCKETS 357
|
||||
#define RTABLE 358
|
||||
#define TARGET 359
|
||||
#define INTERVAL 360
|
||||
#define LOAD 361
|
||||
#define RULESET_OPTIMIZATION 362
|
||||
#define PRIO 363
|
||||
#define STICKYADDRESS 364
|
||||
#define MAXSRCSTATES 365
|
||||
#define MAXSRCNODES 366
|
||||
#define SOURCETRACK 367
|
||||
#define GLOBAL 368
|
||||
#define RULE 369
|
||||
#define MAXSRCCONN 370
|
||||
#define MAXSRCCONNRATE 371
|
||||
#define OVERLOAD 372
|
||||
#define FLUSH 373
|
||||
#define SLOPPY 374
|
||||
#define TAGGED 375
|
||||
#define TAG 376
|
||||
#define IFBOUND 377
|
||||
#define FLOATING 378
|
||||
#define STATEPOLICY 379
|
||||
#define STATEDEFAULTS 380
|
||||
#define ROUTE 381
|
||||
#define SETTOS 382
|
||||
#define DIVERTTO 383
|
||||
#define DIVERTREPLY 384
|
||||
#define STRING 385
|
||||
#define NUMBER 386
|
||||
#define PORTBINARY 387
|
||||
|
||||
|
||||
|
||||
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
|
||||
|
||||
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
|
||||
# define YYSTYPE_IS_DECLARED 1
|
||||
#endif
|
||||
|
||||
extern YYSTYPE pfctlylval;
|
||||
|
||||
#ifdef YYPARSE_PARAM
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int pfctlyparse (void *YYPARSE_PARAM);
|
||||
#else
|
||||
int pfctlyparse ();
|
||||
#endif
|
||||
#else /* ! YYPARSE_PARAM */
|
||||
#if defined __STDC__ || defined __cplusplus
|
||||
int pfctlyparse (void);
|
||||
#else
|
||||
int pfctlyparse ();
|
||||
#endif
|
||||
#endif /* ! YYPARSE_PARAM */
|
||||
|
||||
#endif /* !YY_PFCTLY_PFCTLY_TAB_H_INCLUDED */
|
||||
#define PASS 257
|
||||
#define BLOCK 258
|
||||
#define SCRUB 259
|
||||
#define RETURN 260
|
||||
#define IN 261
|
||||
#define OS 262
|
||||
#define OUT 263
|
||||
#define LOG 264
|
||||
#define QUICK 265
|
||||
#define ON 266
|
||||
#define FROM 267
|
||||
#define TO 268
|
||||
#define FLAGS 269
|
||||
#define RETURNRST 270
|
||||
#define RETURNICMP 271
|
||||
#define RETURNICMP6 272
|
||||
#define PROTO 273
|
||||
#define INET 274
|
||||
#define INET6 275
|
||||
#define ALL 276
|
||||
#define ANY 277
|
||||
#define ICMPTYPE 278
|
||||
#define ICMP6TYPE 279
|
||||
#define CODE 280
|
||||
#define KEEP 281
|
||||
#define MODULATE 282
|
||||
#define STATE 283
|
||||
#define PORT 284
|
||||
#define RDR 285
|
||||
#define NAT 286
|
||||
#define BINAT 287
|
||||
#define ARROW 288
|
||||
#define NODF 289
|
||||
#define MINTTL 290
|
||||
#define ERROR 291
|
||||
#define ALLOWOPTS 292
|
||||
#define FASTROUTE 293
|
||||
#define FILENAME 294
|
||||
#define ROUTETO 295
|
||||
#define DUPTO 296
|
||||
#define REPLYTO 297
|
||||
#define NO 298
|
||||
#define LABEL 299
|
||||
#define NOROUTE 300
|
||||
#define URPFFAILED 301
|
||||
#define FRAGMENT 302
|
||||
#define USER 303
|
||||
#define GROUP 304
|
||||
#define MAXMSS 305
|
||||
#define MAXIMUM 306
|
||||
#define TTL 307
|
||||
#define TOS 308
|
||||
#define DROP 309
|
||||
#define TABLE 310
|
||||
#define REASSEMBLE 311
|
||||
#define FRAGDROP 312
|
||||
#define FRAGCROP 313
|
||||
#define ANCHOR 314
|
||||
#define NATANCHOR 315
|
||||
#define RDRANCHOR 316
|
||||
#define BINATANCHOR 317
|
||||
#define SET 318
|
||||
#define OPTIMIZATION 319
|
||||
#define TIMEOUT 320
|
||||
#define LIMIT 321
|
||||
#define LOGINTERFACE 322
|
||||
#define BLOCKPOLICY 323
|
||||
#define RANDOMID 324
|
||||
#define REQUIREORDER 325
|
||||
#define SYNPROXY 326
|
||||
#define FINGERPRINTS 327
|
||||
#define NOSYNC 328
|
||||
#define DEBUG 329
|
||||
#define SKIP 330
|
||||
#define HOSTID 331
|
||||
#define ANTISPOOF 332
|
||||
#define FOR 333
|
||||
#define INCLUDE 334
|
||||
#define BITMASK 335
|
||||
#define RANDOM 336
|
||||
#define SOURCEHASH 337
|
||||
#define ROUNDROBIN 338
|
||||
#define STATICPORT 339
|
||||
#define PROBABILITY 340
|
||||
#define ALTQ 341
|
||||
#define CBQ 342
|
||||
#define CODEL 343
|
||||
#define PRIQ 344
|
||||
#define HFSC 345
|
||||
#define FAIRQ 346
|
||||
#define BANDWIDTH 347
|
||||
#define TBRSIZE 348
|
||||
#define LINKSHARE 349
|
||||
#define REALTIME 350
|
||||
#define UPPERLIMIT 351
|
||||
#define QUEUE 352
|
||||
#define PRIORITY 353
|
||||
#define QLIMIT 354
|
||||
#define HOGS 355
|
||||
#define BUCKETS 356
|
||||
#define RTABLE 357
|
||||
#define TARGET 358
|
||||
#define INTERVAL 359
|
||||
#define LOAD 360
|
||||
#define RULESET_OPTIMIZATION 361
|
||||
#define PRIO 362
|
||||
#define STICKYADDRESS 363
|
||||
#define MAXSRCSTATES 364
|
||||
#define MAXSRCNODES 365
|
||||
#define SOURCETRACK 366
|
||||
#define GLOBAL 367
|
||||
#define RULE 368
|
||||
#define MAXSRCCONN 369
|
||||
#define MAXSRCCONNRATE 370
|
||||
#define OVERLOAD 371
|
||||
#define FLUSH 372
|
||||
#define SLOPPY 373
|
||||
#define TAGGED 374
|
||||
#define TAG 375
|
||||
#define IFBOUND 376
|
||||
#define FLOATING 377
|
||||
#define STATEPOLICY 378
|
||||
#define STATEDEFAULTS 379
|
||||
#define ROUTE 380
|
||||
#define SETTOS 381
|
||||
#define DIVERTTO 382
|
||||
#define DIVERTREPLY 383
|
||||
#define STRING 384
|
||||
#define NUMBER 385
|
||||
#define PORTBINARY 386
|
||||
|
Loading…
x
Reference in New Issue
Block a user