<p dir="ltr"> I see things like "unsigned long" in some changes (specially macro constants) rather than the stdint.h types. Please point me to the generator tool location and I will contribute a patch to FreeBSD (meanwhile we could use them).</p>
<p dir="ltr">> El 24/5/2015 0:19, "Chris Johns" <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> escribió:<br>
>><br>
>> Use the FreeBSD lex, yacc and rpcgen tools to generate the various<br>
>> sources used in LibBSD. The change also removes an RTEMS specific change<br>
>> added when using other hosts operating systems to generate the files.<br>
>><br>
>> LibBSD should use FreeBSD version of the tools to generate the source<br>
>> because the FreeBSD kernel is developed using them.<br>
>><br>
>> The change is supported by the waf build which disables generating<br>
>> the files unless enabled. I am not sure the effect with the Makefile<br>
>> build support.<br>
>> ---<br>
>> freebsd/include/rpc/rpcb_prot.h | 173 +--<br>
>> freebsd/lib/libc/net/nslexer.c | 270 ++--<br>
>> freebsd/lib/libc/net/nsparser.c | 2228 ++++++++-----------------------<br>
>> freebsd/lib/libipsec/policy_parse.c | 2490 ++++++++++-------------------------<br>
>> freebsd/lib/libipsec/policy_token.c | 348 +++--<br>
>> freebsd/lib/libipsec/policy_token.l | 4 -<br>
>> 6 files changed, 1619 insertions(+), 3894 deletions(-)<br>
>><br>
>> diff --git a/freebsd/include/rpc/rpcb_prot.h b/freebsd/include/rpc/rpcb_prot.h<br>
>> index 0612bc5..914eb13 100644<br>
>> --- a/freebsd/include/rpc/rpcb_prot.h<br>
>> +++ b/freebsd/include/rpc/rpcb_prot.h<br>
>> @@ -4,11 +4,10 @@<br>
>> */<br>
>><br>
>> #ifndef _RPCB_PROT_H_RPCGEN<br>
>> -#define _RPCB_PROT_H_RPCGEN<br>
>> +#define _RPCB_PROT_H_RPCGEN<br>
>><br>
>> #include <rpc/rpc.h><br>
>><br>
>> -<br>
>> #ifdef __cplusplus<br>
>> extern "C" {<br>
>> #endif<br>
>> @@ -275,14 +274,14 @@ typedef rpcb_entry_list *rpcb_entry_list_ptr;<br>
>> * rpcbind statistics<br>
>> */<br>
>><br>
>> -#define rpcb_highproc_2 RPCBPROC_CALLIT<br>
>> -#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR<br>
>> -#define rpcb_highproc_4 RPCBPROC_GETSTAT<br>
>> -#define RPCBSTAT_HIGHPROC 13<br>
>> -#define RPCBVERS_STAT 3<br>
>> -#define RPCBVERS_4_STAT 2<br>
>> -#define RPCBVERS_3_STAT 1<br>
>> -#define RPCBVERS_2_STAT 0<br>
>> +#define rpcb_highproc_2 RPCBPROC_CALLIT<br>
>> +#define rpcb_highproc_3 RPCBPROC_TADDR2UADDR<br>
>> +#define rpcb_highproc_4 RPCBPROC_GETSTAT<br>
>> +#define RPCBSTAT_HIGHPROC 13<br>
>> +#define RPCBVERS_STAT 3<br>
>> +#define RPCBVERS_4_STAT 2<br>
>> +#define RPCBVERS_3_STAT 1<br>
>> +#define RPCBVERS_2_STAT 0<br>
>><br>
>> /* Link list of all the stats about getport and getaddr */<br>
>><br>
>> @@ -490,66 +489,38 @@ typedef rpcb_stat rpcb_stat_byvers[RPCBVERS_STAT];<br>
>><br>
>> #endif /* ndef _KERNEL */<br>
>><br>
>> -#define RPCBPROG 100000<br>
>> -#define RPCBVERS 3<br>
>> +#define RPCBPROG ((unsigned long)(100000))<br>
>> +#define RPCBVERS ((unsigned long)(3))<br>
>><br>
>> -#if defined(__STDC__) || defined(__cplusplus)<br>
>> -#define RPCBPROC_SET 1<br>
>> +extern void rpcbprog_3(struct svc_req *rqstp, SVCXPRT *transp);<br>
>> +#define RPCBPROC_SET ((unsigned long)(1))<br>
>> extern bool_t * rpcbproc_set_3(rpcb *, CLIENT *);<br>
>> extern bool_t * rpcbproc_set_3_svc(rpcb *, struct svc_req *);<br>
>> -#define RPCBPROC_UNSET 2<br>
>> +#define RPCBPROC_UNSET ((unsigned long)(2))<br>
>> extern bool_t * rpcbproc_unset_3(rpcb *, CLIENT *);<br>
>> extern bool_t * rpcbproc_unset_3_svc(rpcb *, struct svc_req *);<br>
>> -#define RPCBPROC_GETADDR 3<br>
>> +#define RPCBPROC_GETADDR ((unsigned long)(3))<br>
>> extern char ** rpcbproc_getaddr_3(rpcb *, CLIENT *);<br>
>> extern char ** rpcbproc_getaddr_3_svc(rpcb *, struct svc_req *);<br>
>> -#define RPCBPROC_DUMP 4<br>
>> +#define RPCBPROC_DUMP ((unsigned long)(4))<br>
>> extern rpcblist_ptr * rpcbproc_dump_3(void *, CLIENT *);<br>
>> extern rpcblist_ptr * rpcbproc_dump_3_svc(void *, struct svc_req *);<br>
>> -#define RPCBPROC_CALLIT 5<br>
>> +#define RPCBPROC_CALLIT ((unsigned long)(5))<br>
>> extern rpcb_rmtcallres * rpcbproc_callit_3(rpcb_rmtcallargs *, CLIENT *);<br>
>> extern rpcb_rmtcallres * rpcbproc_callit_3_svc(rpcb_rmtcallargs *, struct svc_req *);<br>
>> -#define RPCBPROC_GETTIME 6<br>
>> +#define RPCBPROC_GETTIME ((unsigned long)(6))<br>
>> extern u_int * rpcbproc_gettime_3(void *, CLIENT *);<br>
>> extern u_int * rpcbproc_gettime_3_svc(void *, struct svc_req *);<br>
>> -#define RPCBPROC_UADDR2TADDR 7<br>
>> +#define RPCBPROC_UADDR2TADDR ((unsigned long)(7))<br>
>> extern struct netbuf * rpcbproc_uaddr2taddr_3(char **, CLIENT *);<br>
>> extern struct netbuf * rpcbproc_uaddr2taddr_3_svc(char **, struct svc_req *);<br>
>> -#define RPCBPROC_TADDR2UADDR 8<br>
>> +#define RPCBPROC_TADDR2UADDR ((unsigned long)(8))<br>
>> extern char ** rpcbproc_taddr2uaddr_3(struct netbuf *, CLIENT *);<br>
>> extern char ** rpcbproc_taddr2uaddr_3_svc(struct netbuf *, struct svc_req *);<br>
>> -extern int rpcbprog_3_freeresult (SVCXPRT *, xdrproc_t, caddr_t);<br>
>> -<br>
>> -#else /* K&R C */<br>
>> -#define RPCBPROC_SET 1<br>
>> -extern bool_t * rpcbproc_set_3();<br>
>> -extern bool_t * rpcbproc_set_3_svc();<br>
>> -#define RPCBPROC_UNSET 2<br>
>> -extern bool_t * rpcbproc_unset_3();<br>
>> -extern bool_t * rpcbproc_unset_3_svc();<br>
>> -#define RPCBPROC_GETADDR 3<br>
>> -extern char ** rpcbproc_getaddr_3();<br>
>> -extern char ** rpcbproc_getaddr_3_svc();<br>
>> -#define RPCBPROC_DUMP 4<br>
>> -extern rpcblist_ptr * rpcbproc_dump_3();<br>
>> -extern rpcblist_ptr * rpcbproc_dump_3_svc();<br>
>> -#define RPCBPROC_CALLIT 5<br>
>> -extern rpcb_rmtcallres * rpcbproc_callit_3();<br>
>> -extern rpcb_rmtcallres * rpcbproc_callit_3_svc();<br>
>> -#define RPCBPROC_GETTIME 6<br>
>> -extern u_int * rpcbproc_gettime_3();<br>
>> -extern u_int * rpcbproc_gettime_3_svc();<br>
>> -#define RPCBPROC_UADDR2TADDR 7<br>
>> -extern struct netbuf * rpcbproc_uaddr2taddr_3();<br>
>> -extern struct netbuf * rpcbproc_uaddr2taddr_3_svc();<br>
>> -#define RPCBPROC_TADDR2UADDR 8<br>
>> -extern char ** rpcbproc_taddr2uaddr_3();<br>
>> -extern char ** rpcbproc_taddr2uaddr_3_svc();<br>
>> -extern int rpcbprog_3_freeresult ();<br>
>> -#endif /* K&R C */<br>
>> -#define RPCBVERS4 4<br>
>> -<br>
>> -#if defined(__STDC__) || defined(__cplusplus)<br>
>> +extern int rpcbprog_3_freeresult(SVCXPRT *, xdrproc_t, caddr_t);<br>
>> +#define RPCBVERS4 ((unsigned long)(4))<br>
>> +<br>
>> +extern void rpcbprog_4(struct svc_req *rqstp, SVCXPRT *transp);<br>
>> extern bool_t * rpcbproc_set_4(rpcb *, CLIENT *);<br>
>> extern bool_t * rpcbproc_set_4_svc(rpcb *, struct svc_req *);<br>
>> extern bool_t * rpcbproc_unset_4(rpcb *, CLIENT *);<br>
>> @@ -558,7 +529,7 @@ extern char ** rpcbproc_getaddr_4(rpcb *, CLIENT *);<br>
>> extern char ** rpcbproc_getaddr_4_svc(rpcb *, struct svc_req *);<br>
>> extern rpcblist_ptr * rpcbproc_dump_4(void *, CLIENT *);<br>
>> extern rpcblist_ptr * rpcbproc_dump_4_svc(void *, struct svc_req *);<br>
>> -#define RPCBPROC_BCAST RPCBPROC_CALLIT<br>
>> +#define RPCBPROC_BCAST ((unsigned long)(RPCBPROC_CALLIT))<br>
>> extern rpcb_rmtcallres * rpcbproc_bcast_4(rpcb_rmtcallargs *, CLIENT *);<br>
>> extern rpcb_rmtcallres * rpcbproc_bcast_4_svc(rpcb_rmtcallargs *, struct svc_req *);<br>
>> extern u_int * rpcbproc_gettime_4(void *, CLIENT *);<br>
>> @@ -567,90 +538,36 @@ extern struct netbuf * rpcbproc_uaddr2taddr_4(char **, CLIENT *);<br>
>> extern struct netbuf * rpcbproc_uaddr2taddr_4_svc(char **, struct svc_req *);<br>
>> extern char ** rpcbproc_taddr2uaddr_4(struct netbuf *, CLIENT *);<br>
>> extern char ** rpcbproc_taddr2uaddr_4_svc(struct netbuf *, struct svc_req *);<br>
>> -#define RPCBPROC_GETVERSADDR 9<br>
>> +#define RPCBPROC_GETVERSADDR ((unsigned long)(9))<br>
>> extern char ** rpcbproc_getversaddr_4(rpcb *, CLIENT *);<br>
>> extern char ** rpcbproc_getversaddr_4_svc(rpcb *, struct svc_req *);<br>
>> -#define RPCBPROC_INDIRECT 10<br>
>> +#define RPCBPROC_INDIRECT ((unsigned long)(10))<br>
>> extern rpcb_rmtcallres * rpcbproc_indirect_4(rpcb_rmtcallargs *, CLIENT *);<br>
>> extern rpcb_rmtcallres * rpcbproc_indirect_4_svc(rpcb_rmtcallargs *, struct svc_req *);<br>
>> -#define RPCBPROC_GETADDRLIST 11<br>
>> +#define RPCBPROC_GETADDRLIST ((unsigned long)(11))<br>
>> extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4(rpcb *, CLIENT *);<br>
>> extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc(rpcb *, struct svc_req *);<br>
>> -#define RPCBPROC_GETSTAT 12<br>
>> +#define RPCBPROC_GETSTAT ((unsigned long)(12))<br>
>> extern rpcb_stat * rpcbproc_getstat_4(void *, CLIENT *);<br>
>> extern rpcb_stat * rpcbproc_getstat_4_svc(void *, struct svc_req *);<br>
>> -extern int rpcbprog_4_freeresult (SVCXPRT *, xdrproc_t, caddr_t);<br>
>> -<br>
>> -#else /* K&R C */<br>
>> -extern bool_t * rpcbproc_set_4();<br>
>> -extern bool_t * rpcbproc_set_4_svc();<br>
>> -extern bool_t * rpcbproc_unset_4();<br>
>> -extern bool_t * rpcbproc_unset_4_svc();<br>
>> -extern char ** rpcbproc_getaddr_4();<br>
>> -extern char ** rpcbproc_getaddr_4_svc();<br>
>> -extern rpcblist_ptr * rpcbproc_dump_4();<br>
>> -extern rpcblist_ptr * rpcbproc_dump_4_svc();<br>
>> -#define RPCBPROC_BCAST RPCBPROC_CALLIT<br>
>> -extern rpcb_rmtcallres * rpcbproc_bcast_4();<br>
>> -extern rpcb_rmtcallres * rpcbproc_bcast_4_svc();<br>
>> -extern u_int * rpcbproc_gettime_4();<br>
>> -extern u_int * rpcbproc_gettime_4_svc();<br>
>> -extern struct netbuf * rpcbproc_uaddr2taddr_4();<br>
>> -extern struct netbuf * rpcbproc_uaddr2taddr_4_svc();<br>
>> -extern char ** rpcbproc_taddr2uaddr_4();<br>
>> -extern char ** rpcbproc_taddr2uaddr_4_svc();<br>
>> -#define RPCBPROC_GETVERSADDR 9<br>
>> -extern char ** rpcbproc_getversaddr_4();<br>
>> -extern char ** rpcbproc_getversaddr_4_svc();<br>
>> -#define RPCBPROC_INDIRECT 10<br>
>> -extern rpcb_rmtcallres * rpcbproc_indirect_4();<br>
>> -extern rpcb_rmtcallres * rpcbproc_indirect_4_svc();<br>
>> -#define RPCBPROC_GETADDRLIST 11<br>
>> -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4();<br>
>> -extern rpcb_entry_list_ptr * rpcbproc_getaddrlist_4_svc();<br>
>> -#define RPCBPROC_GETSTAT 12<br>
>> -extern rpcb_stat * rpcbproc_getstat_4();<br>
>> -extern rpcb_stat * rpcbproc_getstat_4_svc();<br>
>> -extern int rpcbprog_4_freeresult ();<br>
>> -#endif /* K&R C */<br>
>> +extern int rpcbprog_4_freeresult(SVCXPRT *, xdrproc_t, caddr_t);<br>
>><br>
>> /* the xdr functions */<br>
>> -<br>
>> -#if defined(__STDC__) || defined(__cplusplus)<br>
>> -extern bool_t xdr_rpcb (XDR *, rpcb*);<br>
>> -extern bool_t xdr_rp__list (XDR *, rp__list*);<br>
>> -extern bool_t xdr_rpcblist_ptr (XDR *, rpcblist_ptr*);<br>
>> -extern bool_t xdr_rpcb_rmtcallargs (XDR *, rpcb_rmtcallargs*);<br>
>> -extern bool_t xdr_rpcb_rmtcallres (XDR *, rpcb_rmtcallres*);<br>
>> -extern bool_t xdr_rpcb_entry (XDR *, rpcb_entry*);<br>
>> -extern bool_t xdr_rpcb_entry_list (XDR *, rpcb_entry_list*);<br>
>> -extern bool_t xdr_rpcb_entry_list_ptr (XDR *, rpcb_entry_list_ptr*);<br>
>> -extern bool_t xdr_rpcbs_addrlist (XDR *, rpcbs_addrlist*);<br>
>> -extern bool_t xdr_rpcbs_rmtcalllist (XDR *, rpcbs_rmtcalllist*);<br>
>> -extern bool_t xdr_rpcbs_proc (XDR *, rpcbs_proc);<br>
>> -extern bool_t xdr_rpcbs_addrlist_ptr (XDR *, rpcbs_addrlist_ptr*);<br>
>> -extern bool_t xdr_rpcbs_rmtcalllist_ptr (XDR *, rpcbs_rmtcalllist_ptr*);<br>
>> -extern bool_t xdr_rpcb_stat (XDR *, rpcb_stat*);<br>
>> -extern bool_t xdr_rpcb_stat_byvers (XDR *, rpcb_stat_byvers);<br>
>> -<br>
>> -#else /* K&R C */<br>
>> -extern bool_t xdr_rpcb ();<br>
>> -extern bool_t xdr_rp__list ();<br>
>> -extern bool_t xdr_rpcblist_ptr ();<br>
>> -extern bool_t xdr_rpcb_rmtcallargs ();<br>
>> -extern bool_t xdr_rpcb_rmtcallres ();<br>
>> -extern bool_t xdr_rpcb_entry ();<br>
>> -extern bool_t xdr_rpcb_entry_list ();<br>
>> -extern bool_t xdr_rpcb_entry_list_ptr ();<br>
>> -extern bool_t xdr_rpcbs_addrlist ();<br>
>> -extern bool_t xdr_rpcbs_rmtcalllist ();<br>
>> -extern bool_t xdr_rpcbs_proc ();<br>
>> -extern bool_t xdr_rpcbs_addrlist_ptr ();<br>
>> -extern bool_t xdr_rpcbs_rmtcalllist_ptr ();<br>
>> -extern bool_t xdr_rpcb_stat ();<br>
>> -extern bool_t xdr_rpcb_stat_byvers ();<br>
>> -<br>
>> -#endif /* K&R C */<br>
>> +extern bool_t xdr_rpcb(XDR *, rpcb*);<br>
>> +extern bool_t xdr_rp__list(XDR *, rp__list*);<br>
>> +extern bool_t xdr_rpcblist_ptr(XDR *, rpcblist_ptr*);<br>
>> +extern bool_t xdr_rpcb_rmtcallargs(XDR *, rpcb_rmtcallargs*);<br>
>> +extern bool_t xdr_rpcb_rmtcallres(XDR *, rpcb_rmtcallres*);<br>
>> +extern bool_t xdr_rpcb_entry(XDR *, rpcb_entry*);<br>
>> +extern bool_t xdr_rpcb_entry_list(XDR *, rpcb_entry_list*);<br>
>> +extern bool_t xdr_rpcb_entry_list_ptr(XDR *, rpcb_entry_list_ptr*);<br>
>> +extern bool_t xdr_rpcbs_addrlist(XDR *, rpcbs_addrlist*);<br>
>> +extern bool_t xdr_rpcbs_rmtcalllist(XDR *, rpcbs_rmtcalllist*);<br>
>> +extern bool_t xdr_rpcbs_proc(XDR *, rpcbs_proc);<br>
>> +extern bool_t xdr_rpcbs_addrlist_ptr(XDR *, rpcbs_addrlist_ptr*);<br>
>> +extern bool_t xdr_rpcbs_rmtcalllist_ptr(XDR *, rpcbs_rmtcalllist_ptr*);<br>
>> +extern bool_t xdr_rpcb_stat(XDR *, rpcb_stat*);<br>
>> +extern bool_t xdr_rpcb_stat_byvers(XDR *, rpcb_stat_byvers);<br>
>><br>
>> #ifdef __cplusplus<br>
>> }<br>
>> diff --git a/freebsd/lib/libc/net/nslexer.c b/freebsd/lib/libc/net/nslexer.c<br>
>> index b926d21..3c8c1c1 100644<br>
>> --- a/freebsd/lib/libc/net/nslexer.c<br>
>> +++ b/freebsd/lib/libc/net/nslexer.c<br>
>> @@ -34,6 +34,16 @@<br>
>><br>
>> /* First, we deal with platform-specific or compiler-specific issues. */<br>
>><br>
>> +#if defined(__FreeBSD__)<br>
>> +#ifndef __STDC_LIMIT_MACROS<br>
>> +#define __STDC_LIMIT_MACROS<br>
>> +#endif<br>
>> +#include <sys/cdefs.h><br>
>> +#include <stdint.h><br>
>> +#else<br>
>> +#define __dead2<br>
>> +#endif<br>
>> +<br>
>> /* begin standard C headers. */<br>
>> #include <stdio.h><br>
>> #include <string.h><br>
>> @@ -49,7 +59,8 @@<br>
>><br>
>> /* C99 systems have <inttypes.h>. Non-C99 systems may or may not. */<br>
>><br>
>> -#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L<br>
>> +#if defined(__FreeBSD__) || \<br>
>> + (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)<br>
>><br>
>> /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h,<br>
>> * if you want the limit (max/min) macros for int types.<br>
>> @@ -295,6 +306,7 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */<br>
>> #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \<br>
>> ? (yy_buffer_stack)[(yy_buffer_stack_top)] \<br>
>> : NULL)<br>
>> +#define yy_current_buffer YY_CURRENT_BUFFER<br>
>><br>
>> /* Same as previous macro, but useful when we know that the buffer stack is not<br>
>> * NULL or when we need an lvalue. For internal use only.<br>
>> @@ -370,17 +382,17 @@ FILE *_nsyyin = (FILE *) 0, *_nsyyout = (FILE *) 0;<br>
>><br>
>> typedef int yy_state_type;<br>
>><br>
>> -#define YY_FLEX_LEX_COMPAT<br>
>> extern int _nsyylineno;<br>
>><br>
>> int _nsyylineno = 1;<br>
>><br>
>> -extern char _nsyytext[];<br>
>> +extern char *_nsyytext;<br>
>> +#define yytext_ptr _nsyytext<br>
>><br>
>> static yy_state_type yy_get_previous_state (void );<br>
>> static yy_state_type yy_try_NUL_trans (yy_state_type current_state );<br>
>> static int yy_get_next_buffer (void );<br>
>> -static void yy_fatal_error (yyconst char msg[] );<br>
>> +static void yy_fatal_error (yyconst char msg[] ) __dead2;<br>
>><br>
>> /* Done after the current pattern has been matched and before the<br>
>> * corresponding action - sets up _nsyytext.<br>
>> @@ -390,12 +402,6 @@ static void yy_fatal_error (yyconst char msg[] );<br>
>> _nsyyleng = (size_t) (yy_cp - yy_bp); \<br>
>> (yy_hold_char) = *yy_cp; \<br>
>> *yy_cp = '\0'; \<br>
>> - if ( _nsyyleng + (yy_more_offset) >= YYLMAX ) \<br>
>> - YY_FATAL_ERROR( "token too large, exceeds YYLMAX" ); \<br>
>> - yy_flex_strncpy( &_nsyytext[(yy_more_offset)], (yytext_ptr), _nsyyleng + 1 ); \<br>
>> - _nsyyleng += (yy_more_offset); \<br>
>> - (yy_prev_more_offset) = (yy_more_offset); \<br>
>> - (yy_more_offset) = 0; \<br>
>> (yy_c_buf_p) = yy_cp;<br>
>><br>
>> #define YY_NUM_RULES 13<br>
>> @@ -407,27 +413,14 @@ struct yy_trans_info<br>
>> flex_int32_t yy_verify;<br>
>> flex_int32_t yy_nxt;<br>
>> };<br>
>> -static yyconst flex_int16_t yy_acclist[83] =<br>
>> +static yyconst flex_int16_t yy_accept[59] =<br>
>> { 0,<br>
>> - 14, 12, 13, 1, 12, 13, 4, 13, 2, 12,<br>
>> - 13, 11, 12, 13, 11, 12, 13, 11, 12, 13,<br>
>> - 11, 12, 13, 11, 12, 13, 11, 12, 13, 11,<br>
>> - 12, 13, 12, 13, 1, 2, 11, 11, 11, 11,<br>
>> - 11, 11, 11, 3, 11, 11, 11, 11, 11, 11,<br>
>> + 0, 0, 14, 12, 1, 4, 2, 11, 11, 11,<br>
>> + 11, 11, 11, 11, 12, 1, 2, 11, 11, 11,<br>
>> + 11, 11, 11, 11, 3, 11, 11, 11, 11, 11,<br>
>> 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,<br>
>> - 11, 11, 11, 11, 9, 11, 11, 11, 11, 11,<br>
>> - 11, 5, 11, 11, 6, 11, 10, 11, 7, 11,<br>
>> - 8, 11<br>
>> - } ;<br>
>> -<br>
>> -static yyconst flex_int16_t yy_accept[60] =<br>
>> - { 0,<br>
>> - 1, 1, 1, 2, 4, 7, 9, 12, 15, 18,<br>
>> - 21, 24, 27, 30, 33, 35, 36, 37, 38, 39,<br>
>> - 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,<br>
>> - 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,<br>
>> - 60, 61, 62, 63, 64, 65, 67, 68, 69, 70,<br>
>> - 71, 72, 74, 75, 77, 79, 81, 83, 83<br>
>> + 11, 11, 11, 11, 11, 9, 11, 11, 11, 11,<br>
>> + 11, 5, 11, 6, 10, 7, 8, 0<br>
>> } ;<br>
>><br>
>> static yyconst flex_int32_t yy_ec[256] =<br>
>> @@ -524,38 +517,22 @@ static yyconst flex_int32_t yy_rule_can_match_eol[14] =<br>
>> { 0,<br>
>> 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, };<br>
>><br>
>> +static yy_state_type yy_last_accepting_state;<br>
>> +static char *yy_last_accepting_cpos;<br>
>> +<br>
>> extern int _nsyy_flex_debug;<br>
>> int _nsyy_flex_debug = 0;<br>
>><br>
>> -static yy_state_type *yy_state_buf=0, *yy_state_ptr=0;<br>
>> -static char *yy_full_match;<br>
>> -static int yy_lp;<br>
>> -#define REJECT \<br>
>> -{ \<br>
>> -*yy_cp = (yy_hold_char); /* undo effects of setting up _nsyytext */ \<br>
>> -yy_cp = (yy_full_match); /* restore poss. backed-over text */ \<br>
>> -++(yy_lp); \<br>
>> -goto find_rule; \<br>
>> -}<br>
>> -<br>
>> -static int yy_more_offset = 0;<br>
>> -static int yy_prev_more_offset = 0;<br>
>> -#define yymore() ((yy_more_offset) = yy_flex_strlen( _nsyytext ))<br>
>> -#define YY_NEED_STRLEN<br>
>> +/* The intent behind this definition is that it'll catch<br>
>> + * any uses of REJECT which flex missed.<br>
>> + */<br>
>> +#define REJECT reject_used_but_not_detected<br>
>> +#define yymore() yymore_used_but_not_detected<br>
>> #define YY_MORE_ADJ 0<br>
>> -#define YY_RESTORE_YY_MORE_OFFSET \<br>
>> - { \<br>
>> - (yy_more_offset) = (yy_prev_more_offset); \<br>
>> - _nsyyleng -= (yy_more_offset); \<br>
>> - }<br>
>> -#ifndef YYLMAX<br>
>> -#define YYLMAX 8192<br>
>> -#endif<br>
>> -<br>
>> -char _nsyytext[YYLMAX];<br>
>> -char *yytext_ptr;<br>
>> -#line 1 "freebsd/lib/libc/net/nslexer.l"<br>
>> -#line 2 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#define YY_RESTORE_YY_MORE_OFFSET<br>
>> +char *_nsyytext;<br>
>> +#line 1 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 2 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> /* $NetBSD: nslexer.l,v 1.3 1999/01/25 00:16:17 lukem Exp $ */<br>
>><br>
>> /*-<br>
>> @@ -611,7 +588,7 @@ static char *rcsid =<br>
>> #include "nsparser.h"<br>
>><br>
>> #define YY_NO_INPUT 1<br>
>> -#line 615 "<stdout>"<br>
>> +#line 592 "<stdout>"<br>
>><br>
>> #define INITIAL 0<br>
>><br>
>> @@ -787,14 +764,14 @@ extern int _nsyylex (void);<br>
>> */<br>
>> YY_DECL<br>
>> {<br>
>> - register yy_state_type yy_current_state;<br>
>> - register char *yy_cp, *yy_bp;<br>
>> - register int yy_act;<br>
>> + yy_state_type yy_current_state;<br>
>> + char *yy_cp, *yy_bp;<br>
>> + int yy_act;<br>
>><br>
>> -#line 66 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 66 "../../freebsd/lib/libc/net/nslexer.l"<br>
>><br>
>><br>
>> -#line 798 "<stdout>"<br>
>> +#line 775 "<stdout>"<br>
>><br>
>> if ( !(yy_init) )<br>
>> {<br>
>> @@ -804,12 +781,6 @@ YY_DECL<br>
>> YY_USER_INIT;<br>
>> #endif<br>
>><br>
>> - /* Create the reject buffer large enough to save one state per allowed character. */<br>
>> - if ( ! (yy_state_buf) )<br>
>> - (yy_state_buf) = (yy_state_type *)_nsyyalloc(YY_STATE_BUF_SIZE );<br>
>> - if ( ! (yy_state_buf) )<br>
>> - YY_FATAL_ERROR( "out of dynamic memory in _nsyylex()" );<br>
>> -<br>
>> if ( ! (yy_start) )<br>
>> (yy_start) = 1; /* first start state */<br>
>><br>
>> @@ -841,14 +812,15 @@ YY_DECL<br>
>> yy_bp = yy_cp;<br>
>><br>
>> yy_current_state = (yy_start);<br>
>> -<br>
>> - (yy_state_ptr) = (yy_state_buf);<br>
>> - *(yy_state_ptr)++ = yy_current_state;<br>
>> -<br>
>> yy_match:<br>
>> do<br>
>> {<br>
>> - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];<br>
>> + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ;<br>
>> + if ( yy_accept[yy_current_state] )<br>
>> + {<br>
>> + (yy_last_accepting_state) = yy_current_state;<br>
>> + (yy_last_accepting_cpos) = yy_cp;<br>
>> + }<br>
>> while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )<br>
>> {<br>
>> yy_current_state = (int) yy_def[yy_current_state];<br>
>> @@ -856,36 +828,25 @@ yy_match:<br>
>> yy_c = yy_meta[(unsigned int) yy_c];<br>
>> }<br>
>> yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];<br>
>> - *(yy_state_ptr)++ = yy_current_state;<br>
>> ++yy_cp;<br>
>> }<br>
>> while ( yy_base[yy_current_state] != 69 );<br>
>><br>
>> yy_find_action:<br>
>> - yy_current_state = *--(yy_state_ptr);<br>
>> - (yy_lp) = yy_accept[yy_current_state];<br>
>> -find_rule: /* we branch to this label when backing up */<br>
>> - for ( ; ; ) /* until we find what rule we matched */<br>
>> - {<br>
>> - if ( (yy_lp) && (yy_lp) < yy_accept[yy_current_state + 1] )<br>
>> - {<br>
>> - yy_act = yy_acclist[(yy_lp)];<br>
>> - {<br>
>> - (yy_full_match) = yy_cp;<br>
>> - break;<br>
>> - }<br>
>> - }<br>
>> - --yy_cp;<br>
>> - yy_current_state = *--(yy_state_ptr);<br>
>> - (yy_lp) = yy_accept[yy_current_state];<br>
>> + yy_act = yy_accept[yy_current_state];<br>
>> + if ( yy_act == 0 )<br>
>> + { /* have to back up */<br>
>> + yy_cp = (yy_last_accepting_cpos);<br>
>> + yy_current_state = (yy_last_accepting_state);<br>
>> + yy_act = yy_accept[yy_current_state];<br>
>> }<br>
>><br>
>> YY_DO_BEFORE_ACTION;<br>
>><br>
>> if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] )<br>
>> {<br>
>> - int yyl;<br>
>> - for ( yyl = (yy_prev_more_offset); yyl < _nsyyleng; ++yyl )<br>
>> + yy_size_t yyl;<br>
>> + for ( yyl = 0; yyl < _nsyyleng; ++yyl )<br>
>> if ( _nsyytext[yyl] == '\n' )<br>
>><br>
>> _nsyylineno++;<br>
>> @@ -896,61 +857,68 @@ do_action: /* This label is used only to access EOF actions. */<br>
>><br>
>> switch ( yy_act )<br>
>> { /* beginning of action switch */<br>
>> + case 0: /* must back up */<br>
>> + /* undo the effects of YY_DO_BEFORE_ACTION */<br>
>> + *yy_cp = (yy_hold_char);<br>
>> + yy_cp = (yy_last_accepting_cpos);<br>
>> + yy_current_state = (yy_last_accepting_state);<br>
>> + goto yy_find_action;<br>
>> +<br>
>> case 1:<br>
>> YY_RULE_SETUP<br>
>> -#line 68 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 68 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> ; /* skip whitespace */<br>
>> YY_BREAK<br>
>> case 2:<br>
>> YY_RULE_SETUP<br>
>> -#line 70 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 70 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> ; /* skip comments */<br>
>> YY_BREAK<br>
>> case 3:<br>
>> /* rule 3 can match eol */<br>
>> YY_RULE_SETUP<br>
>> -#line 72 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 72 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> ; /* allow continuation */<br>
>> YY_BREAK<br>
>> case 4:<br>
>> /* rule 4 can match eol */<br>
>> YY_RULE_SETUP<br>
>> -#line 74 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 74 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return NL;<br>
>> YY_BREAK<br>
>> case 5:<br>
>> YY_RULE_SETUP<br>
>> -#line 76 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 76 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return SUCCESS;<br>
>> YY_BREAK<br>
>> case 6:<br>
>> YY_RULE_SETUP<br>
>> -#line 77 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 77 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return UNAVAIL;<br>
>> YY_BREAK<br>
>> case 7:<br>
>> YY_RULE_SETUP<br>
>> -#line 78 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 78 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return NOTFOUND;<br>
>> YY_BREAK<br>
>> case 8:<br>
>> YY_RULE_SETUP<br>
>> -#line 79 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 79 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return TRYAGAIN;<br>
>> YY_BREAK<br>
>> case 9:<br>
>> YY_RULE_SETUP<br>
>> -#line 81 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 81 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return RETURN;<br>
>> YY_BREAK<br>
>> case 10:<br>
>> YY_RULE_SETUP<br>
>> -#line 82 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 82 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return CONTINUE;<br>
>> YY_BREAK<br>
>> case 11:<br>
>> YY_RULE_SETUP<br>
>> -#line 84 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 84 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> {<br>
>> char *p;<br>
>> int i;<br>
>> @@ -970,17 +938,17 @@ YY_RULE_SETUP<br>
>> YY_BREAK<br>
>> case 12:<br>
>> YY_RULE_SETUP<br>
>> -#line 101 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 101 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> return _nsyytext[0];<br>
>> YY_BREAK<br>
>> case 13:<br>
>> YY_RULE_SETUP<br>
>> -#line 103 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 103 "../../freebsd/lib/libc/net/nslexer.l"<br>
>> ECHO;<br>
>> YY_BREAK<br>
>> -#line 982 "<stdout>"<br>
>> - case YY_STATE_EOF(INITIAL):<br>
>> - yyterminate();<br>
>> +#line 950 "<stdout>"<br>
>> +case YY_STATE_EOF(INITIAL):<br>
>> + yyterminate();<br>
>><br>
>> case YY_END_OF_BUFFER:<br>
>> {<br>
>> @@ -1120,9 +1088,9 @@ ECHO;<br>
>> */<br>
>> static int yy_get_next_buffer (void)<br>
>> {<br>
>> - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;<br>
>> - register char *source = (yytext_ptr);<br>
>> - register int number_to_move, i;<br>
>> + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;<br>
>> + char *source = (yytext_ptr);<br>
>> + int number_to_move, i;<br>
>> int ret_val;<br>
>><br>
>> if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )<br>
>> @@ -1170,8 +1138,37 @@ static int yy_get_next_buffer (void)<br>
>> while ( num_to_read <= 0 )<br>
>> { /* Not enough room in the buffer - grow it. */<br>
>><br>
>> - YY_FATAL_ERROR(<br>
>> -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" );<br>
>> + /* just a shorter name for the current buffer */<br>
>> + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE;<br>
>> +<br>
>> + int yy_c_buf_p_offset =<br>
>> + (int) ((yy_c_buf_p) - b->yy_ch_buf);<br>
>> +<br>
>> + if ( b->yy_is_our_buffer )<br>
>> + {<br>
>> + yy_size_t new_size = b->yy_buf_size * 2;<br>
>> +<br>
>> + if ( new_size <= 0 )<br>
>> + b->yy_buf_size += b->yy_buf_size / 8;<br>
>> + else<br>
>> + b->yy_buf_size *= 2;<br>
>> +<br>
>> + b->yy_ch_buf = (char *)<br>
>> + /* Include room in for 2 EOB chars. */<br>
>> + _nsyyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 );<br>
>> + }<br>
>> + else<br>
>> + /* Can't grow it, we don't own it. */<br>
>> + b->yy_ch_buf = 0;<br>
>> +<br>
>> + if ( ! b->yy_ch_buf )<br>
>> + YY_FATAL_ERROR(<br>
>> + "fatal error - scanner input buffer overflow" );<br>
>> +<br>
>> + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset];<br>
>> +<br>
>> + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size -<br>
>> + number_to_move - 1;<br>
>><br>
>> }<br>
>><br>
>> @@ -1225,17 +1222,19 @@ static int yy_get_next_buffer (void)<br>
>><br>
>> static yy_state_type yy_get_previous_state (void)<br>
>> {<br>
>> - register yy_state_type yy_current_state;<br>
>> - register char *yy_cp;<br>
>> + yy_state_type yy_current_state;<br>
>> + char *yy_cp;<br>
>><br>
>> yy_current_state = (yy_start);<br>
>><br>
>> - (yy_state_ptr) = (yy_state_buf);<br>
>> - *(yy_state_ptr)++ = yy_current_state;<br>
>> -<br>
>> for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )<br>
>> {<br>
>> - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);<br>
>> + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);<br>
>> + if ( yy_accept[yy_current_state] )<br>
>> + {<br>
>> + (yy_last_accepting_state) = yy_current_state;<br>
>> + (yy_last_accepting_cpos) = yy_cp;<br>
>> + }<br>
>> while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )<br>
>> {<br>
>> yy_current_state = (int) yy_def[yy_current_state];<br>
>> @@ -1243,7 +1242,6 @@ static int yy_get_next_buffer (void)<br>
>> yy_c = yy_meta[(unsigned int) yy_c];<br>
>> }<br>
>> yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];<br>
>> - *(yy_state_ptr)++ = yy_current_state;<br>
>> }<br>
>><br>
>> return yy_current_state;<br>
>> @@ -1256,9 +1254,15 @@ static int yy_get_next_buffer (void)<br>
>> */<br>
>> static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state )<br>
>> {<br>
>> - register int yy_is_jam;<br>
>> -<br>
>> - register YY_CHAR yy_c = 1;<br>
>> + int yy_is_jam;<br>
>> + char *yy_cp = (yy_c_buf_p);<br>
>> +<br>
>> + YY_CHAR yy_c = 1;<br>
>> + if ( yy_accept[yy_current_state] )<br>
>> + {<br>
>> + (yy_last_accepting_state) = yy_current_state;<br>
>> + (yy_last_accepting_cpos) = yy_cp;<br>
>> + }<br>
>> while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )<br>
>> {<br>
>> yy_current_state = (int) yy_def[yy_current_state];<br>
>> @@ -1267,8 +1271,6 @@ static int yy_get_next_buffer (void)<br>
>> }<br>
>> yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];<br>
>> yy_is_jam = (yy_current_state == 58);<br>
>> - if ( ! yy_is_jam )<br>
>> - *(yy_state_ptr)++ = yy_current_state;<br>
>><br>
>> return yy_is_jam ? 0 : yy_current_state;<br>
>> }<br>
>> @@ -1676,7 +1678,7 @@ YY_BUFFER_STATE _nsyy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_l<br>
>> YY_BUFFER_STATE b;<br>
>> char *buf;<br>
>> yy_size_t n;<br>
>> - int i;<br>
>> + yy_size_t i;<br>
>><br>
>> /* Get memory for full buffer, including space for trailing EOB's. */<br>
>> n = _yybytes_len + 2;<br>
>> @@ -1824,11 +1826,6 @@ static int yy_init_globals (void)<br>
>> (yy_init) = 0;<br>
>> (yy_start) = 0;<br>
>><br>
>> - (yy_state_buf) = 0;<br>
>> - (yy_state_ptr) = 0;<br>
>> - (yy_full_match) = 0;<br>
>> - (yy_lp) = 0;<br>
>> -<br>
>> /* Defined in main.c */<br>
>> #ifdef YY_STDINIT<br>
>> _nsyyin = stdin;<br>
>> @@ -1859,9 +1856,6 @@ int _nsyylex_destroy (void)<br>
>> _nsyyfree((yy_buffer_stack) );<br>
>> (yy_buffer_stack) = NULL;<br>
>><br>
>> - _nsyyfree ( (yy_state_buf) );<br>
>> - (yy_state_buf) = NULL;<br>
>> -<br>
>> /* Reset the globals. This is important in a non-reentrant scanner so the next time<br>
>> * _nsyylex() is called, initialization will occur. */<br>
>> yy_init_globals( );<br>
>> @@ -1876,7 +1870,7 @@ int _nsyylex_destroy (void)<br>
>> #ifndef yytext_ptr<br>
>> static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )<br>
>> {<br>
>> - register int i;<br>
>> + int i;<br>
>> for ( i = 0; i < n; ++i )<br>
>> s1[i] = s2[i];<br>
>> }<br>
>> @@ -1885,7 +1879,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )<br>
>> #ifdef YY_NEED_STRLEN<br>
>> static int yy_flex_strlen (yyconst char * s )<br>
>> {<br>
>> - register int n;<br>
>> + int n;<br>
>> for ( n = 0; s[n]; ++n )<br>
>> ;<br>
>><br>
>> @@ -1917,7 +1911,7 @@ void _nsyyfree (void * ptr )<br>
>><br>
>> #define YYTABLES_NAME "yytables"<br>
>><br>
>> -#line 103 "freebsd/lib/libc/net/nslexer.l"<br>
>> +#line 103 "../../freebsd/lib/libc/net/nslexer.l"<br>
>><br>
>><br>
>><br>
>> diff --git a/freebsd/lib/libc/net/nsparser.c b/freebsd/lib/libc/net/nsparser.c<br>
>> index ff705bd..f2fca01 100644<br>
>> --- a/freebsd/lib/libc/net/nsparser.c<br>
>> +++ b/freebsd/lib/libc/net/nsparser.c<br>
>> @@ -1,77 +1,102 @@<br>
>> -/* A Bison parser, made by GNU Bison 2.7. */<br>
>> -<br>
>> -/* Bison implementation for Yacc-like parsers in C<br>
>> -<br>
>> - Copyright (C) 1984, 1989-1990, 2000-2012 Free Software Foundation, Inc.<br>
>> -<br>
>> - This program is free software: you can redistribute it and/or modify<br>
>> - it under the terms of the GNU General Public License as published by<br>
>> - the Free Software Foundation, either version 3 of the License, or<br>
>> - (at your option) any later version.<br>
>> -<br>
>> - This program is distributed in the hope that it will be useful,<br>
>> - but WITHOUT ANY WARRANTY; without even the implied warranty of<br>
>> - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the<br>
>> - GNU General Public License for more details.<br>
>> -<br>
>> - You should have received a copy of the GNU General Public License<br>
>> - along with this program. If not, see <<a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>>. */<br>
>> -<br>
>> -/* As a special exception, you may create a larger work that contains<br>
>> - part or all of the Bison parser skeleton and distribute that work<br>
>> - under terms of your choice, so long as that work isn't itself a<br>
>> - parser generator using the skeleton or a modified version thereof<br>
>> - as a parser skeleton. Alternatively, if you modify or redistribute<br>
>> - the parser skeleton itself, you may (at your option) remove this<br>
>> - special exception, which will cause the skeleton and the resulting<br>
>> - Bison output files to be licensed under the GNU General Public<br>
>> - License without this special exception.<br>
>> -<br>
>> - This special exception was added by the Free Software Foundation in<br>
>> - version 2.2 of Bison. */<br>
>> -<br>
>> -/* C LALR(1) parser skeleton written by Richard Stallman, by<br>
>> - simplifying the original so-called "semantic" parser. */<br>
>> -<br>
>> -/* All symbols defined below should begin with yy or YY, to avoid<br>
>> - infringing on user name space. This should be done even for local<br>
>> - variables, as they might otherwise be expanded by user macros.<br>
>> - There are some unavoidable exceptions within include files to<br>
>> - define necessary library symbols; they are noted "INFRINGES ON<br>
>> - USER NAME SPACE" below. */<br>
>> -<br>
>> -/* Identify Bison output. */<br>
>> -#define YYBISON 1<br>
>> -<br>
>> -/* Bison version. */<br>
>> -#define YYBISON_VERSION "2.7"<br>
>> -<br>
>> -/* Skeleton name. */<br>
>> -#define YYSKELETON_NAME "yacc.c"<br>
>> -<br>
>> -/* Pure parsers. */<br>
>> -#define YYPURE 0<br>
>> -<br>
>> -/* Push parsers. */<br>
>> -#define YYPUSH 0<br>
>> -<br>
>> -/* Pull parsers. */<br>
>> -#define YYPULL 1<br>
>> -<br>
>> +/* original parser id follows */<br>
>> +/* yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93" */<br>
>> +/* (use YYMAJOR/YYMINOR for ifdefs dependent on parser version) */<br>
>> +<br>
>> +#define YYBYACC 1<br>
>> +#define YYMAJOR 1<br>
>> +#define YYMINOR 9<br>
>> +<br>
>> +#define YYEMPTY (-1)<br>
>> +#define yyclearin (yychar = YYEMPTY)<br>
>> +#define yyerrok (yyerrflag = 0)<br>
>> +#define YYRECOVERING() (yyerrflag != 0)<br>
>> +#define YYENOMEM (-2)<br>
>> +#define YYEOF 0<br>
>> +<br>
>> +#ifndef yyparse<br>
>> +#define yyparse _nsyyparse<br>
>> +#endif /* yyparse */<br>
>> +<br>
>> +#ifndef yylex<br>
>> +#define yylex _nsyylex<br>
>> +#endif /* yylex */<br>
>> +<br>
>> +#ifndef yyerror<br>
>> +#define yyerror _nsyyerror<br>
>> +#endif /* yyerror */<br>
>> +<br>
>> +#ifndef yychar<br>
>> +#define yychar _nsyychar<br>
>> +#endif /* yychar */<br>
>> +<br>
>> +#ifndef yyval<br>
>> +#define yyval _nsyyval<br>
>> +#endif /* yyval */<br>
>> +<br>
>> +#ifndef yylval<br>
>> +#define yylval _nsyylval<br>
>> +#endif /* yylval */<br>
>> +<br>
>> +#ifndef yydebug<br>
>> +#define yydebug _nsyydebug<br>
>> +#endif /* yydebug */<br>
>> +<br>
>> +#ifndef yynerrs<br>
>> +#define yynerrs _nsyynerrs<br>
>> +#endif /* yynerrs */<br>
>> +<br>
>> +#ifndef yyerrflag<br>
>> +#define yyerrflag _nsyyerrflag<br>
>> +#endif /* yyerrflag */<br>
>> +<br>
>> +#ifndef yylhs<br>
>> +#define yylhs _nsyylhs<br>
>> +#endif /* yylhs */<br>
>> +<br>
>> +#ifndef yylen<br>
>> +#define yylen _nsyylen<br>
>> +#endif /* yylen */<br>
>> +<br>
>> +#ifndef yydefred<br>
>> +#define yydefred _nsyydefred<br>
>> +#endif /* yydefred */<br>
>> +<br>
>> +#ifndef yydgoto<br>
>> +#define yydgoto _nsyydgoto<br>
>> +#endif /* yydgoto */<br>
>> +<br>
>> +#ifndef yysindex<br>
>> +#define yysindex _nsyysindex<br>
>> +#endif /* yysindex */<br>
>> +<br>
>> +#ifndef yyrindex<br>
>> +#define yyrindex _nsyyrindex<br>
>> +#endif /* yyrindex */<br>
>> +<br>
>> +#ifndef yygindex<br>
>> +#define yygindex _nsyygindex<br>
>> +#endif /* yygindex */<br>
>> +<br>
>> +#ifndef yytable<br>
>> +#define yytable _nsyytable<br>
>> +#endif /* yytable */<br>
>> +<br>
>> +#ifndef yycheck<br>
>> +#define yycheck _nsyycheck<br>
>> +#endif /* yycheck */<br>
>> +<br>
>> +#ifndef yyname<br>
>> +#define yyname _nsyyname<br>
>> +#endif /* yyname */<br>
>> +<br>
>> +#ifndef yyrule<br>
>> +#define yyrule _nsyyrule<br>
>> +#endif /* yyrule */<br>
>> +#define YYPREFIX "_nsyy"<br>
>><br>
>> -/* Substitute the variable and function names. */<br>
>> -#define yyparse _nsyyparse<br>
>> -#define yylex _nsyylex<br>
>> -#define yyerror _nsyyerror<br>
>> -#define yylval _nsyylval<br>
>> -#define yychar _nsyychar<br>
>> -#define yydebug _nsyydebug<br>
>> -#define yynerrs _nsyynerrs<br>
>> -<br>
>> -/* Copy the first part of user declarations. */<br>
>> -/* Line 371 of yacc.c */<br>
>> -#line 1 "freebsd/lib/libc/net/nsparser.y"<br>
>> +#define YYPURE 0<br>
>><br>
>> +#line 2 "../../freebsd/lib/libc/net/nsparser.y"<br>
>> /* $NetBSD: nsparser.y,v 1.3 1999/01/25 00:16:18 lukem Exp $ */<br>
>><br>
>> /*-<br>
>> @@ -126,1685 +151,586 @@ static void _nsaddsrctomap(const char *);<br>
>><br>
>> static ns_dbt curdbt;<br>
>> static ns_src cursrc;<br>
>> -<br>
>> -/* Line 371 of yacc.c */<br>
>> -#line 132 "_nsyy.tab.c"<br>
>> -<br>
>> -# ifndef YY_NULL<br>
>> -# if defined __cplusplus && 201103L <= __cplusplus<br>
>> -# define YY_NULL nullptr<br>
>> -# else<br>
>> -# define YY_NULL 0<br>
>> -# endif<br>
>> -# endif<br>
>> -<br>
>> -/* Enabling verbose error messages. */<br>
>> -#ifdef YYERROR_VERBOSE<br>
>> -# undef YYERROR_VERBOSE<br>
>> -# define YYERROR_VERBOSE 1<br>
>> -#else<br>
>> -# define YYERROR_VERBOSE 0<br>
>> -#endif<br>
>> -<br>
>> -/* In a future release of Bison, this section will be replaced<br>
>> - by #include "_nsyy.tab.h". */<br>
>> -#ifndef YY__NSYY_NSYY_TAB_H_INCLUDED<br>
>> -# define YY__NSYY_NSYY_TAB_H_INCLUDED<br>
>> -/* Enabling traces. */<br>
>> -#ifndef YYDEBUG<br>
>> -# define YYDEBUG 0<br>
>> -#endif<br>
>> -#if YYDEBUG<br>
>> -extern int _nsyydebug;<br>
>> -#endif<br>
>> -<br>
>> -/* Tokens. */<br>
>> -#ifndef YYTOKENTYPE<br>
>> -# define YYTOKENTYPE<br>
>> - /* Put the tokens into the symbol table, so that GDB and other debuggers<br>
>> - know about them. */<br>
>> - enum yytokentype {<br>
>> - NL = 258,<br>
>> - SUCCESS = 259,<br>
>> - UNAVAIL = 260,<br>
>> - NOTFOUND = 261,<br>
>> - TRYAGAIN = 262,<br>
>> - RETURN = 263,<br>
>> - CONTINUE = 264,<br>
>> - ERRORTOKEN = 265,<br>
>> - STRING = 266<br>
>> - };<br>
>> -#endif<br>
>> -/* Tokens. */<br>
>> -#define NL 258<br>
>> -#define SUCCESS 259<br>
>> -#define UNAVAIL 260<br>
>> -#define NOTFOUND 261<br>
>> -#define TRYAGAIN 262<br>
>> -#define RETURN 263<br>
>> -#define CONTINUE 264<br>
>> -#define ERRORTOKEN 265<br>
>> -#define STRING 266<br>
>> -<br>
>> -<br>
>> -<br>
>> -#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED<br>
>> -typedef union YYSTYPE<br>
>> -{<br>
>> -/* Line 387 of yacc.c */<br>
>> -#line 58 "freebsd/lib/libc/net/nsparser.y"<br>
>> -<br>
>> +#line 58 "../../freebsd/lib/libc/net/nsparser.y"<br>
>> +#ifdef YYSTYPE<br>
>> +#undef YYSTYPE_IS_DECLARED<br>
>> +#define YYSTYPE_IS_DECLARED 1<br>
>> +#endif<br>
>> +#ifndef YYSTYPE_IS_DECLARED<br>
>> +#define YYSTYPE_IS_DECLARED 1<br>
>> +typedef union {<br>
>> char *str;<br>
>> int mapval;<br>
>> -<br>
>> -<br>
>> -/* Line 387 of yacc.c */<br>
>> -#line 203 "_nsyy.tab.c"<br>
>> } YYSTYPE;<br>
>> -# define YYSTYPE_IS_TRIVIAL 1<br>
>> -# define yystype YYSTYPE /* obsolescent; will be withdrawn */<br>
>> -# define YYSTYPE_IS_DECLARED 1<br>
>> -#endif<br>
>> -<br>
>> -extern YYSTYPE _nsyylval;<br>
>> +#endif /* !YYSTYPE_IS_DECLARED */<br>
>> +#line 167 "_nsyy.tab.c"<br>
>><br>
>> +/* compatibility with bison */<br>
>> #ifdef YYPARSE_PARAM<br>
>> -#if defined __STDC__ || defined __cplusplus<br>
>> -int _nsyyparse (void *YYPARSE_PARAM);<br>
>> -#else<br>
>> -int _nsyyparse ();<br>
>> -#endif<br>
>> -#else /* ! YYPARSE_PARAM */<br>
>> -#if defined __STDC__ || defined __cplusplus<br>
>> -int _nsyyparse (void);<br>
>> -#else<br>
>> -int _nsyyparse ();<br>
>> -#endif<br>
>> -#endif /* ! YYPARSE_PARAM */<br>
>> -<br>
>> -#endif /* !YY__NSYY_NSYY_TAB_H_INCLUDED */<br>
>> -<br>
>> -/* Copy the second part of user declarations. */<br>
>> -<br>
>> -/* Line 390 of yacc.c */<br>
>> -#line 231 "_nsyy.tab.c"<br>
>> -<br>
>> -#ifdef short<br>
>> -# undef short<br>
>> -#endif<br>
>> -<br>
>> -#ifdef YYTYPE_UINT8<br>
>> -typedef YYTYPE_UINT8 yytype_uint8;<br>
>> -#else<br>
>> -typedef unsigned char yytype_uint8;<br>
>> -#endif<br>
>> -<br>
>> -#ifdef YYTYPE_INT8<br>
>> -typedef YYTYPE_INT8 yytype_int8;<br>
>> -#elif (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -typedef signed char yytype_int8;<br>
>> -#else<br>
>> -typedef short int yytype_int8;<br>
>> -#endif<br>
>> -<br>
>> -#ifdef YYTYPE_UINT16<br>
>> -typedef YYTYPE_UINT16 yytype_uint16;<br>
>> -#else<br>
>> -typedef unsigned short int yytype_uint16;<br>
>> -#endif<br>
>> -<br>
>> -#ifdef YYTYPE_INT16<br>
>> -typedef YYTYPE_INT16 yytype_int16;<br>
>> -#else<br>
>> -typedef short int yytype_int16;<br>
>> -#endif<br>
>> -<br>
>> -#ifndef YYSIZE_T<br>
>> -# ifdef __SIZE_TYPE__<br>
>> -# define YYSIZE_T __SIZE_TYPE__<br>
>> -# elif defined size_t<br>
>> -# define YYSIZE_T size_t<br>
>> -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -# include <stddef.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# define YYSIZE_T size_t<br>
>> +/* compatibility with FreeBSD */<br>
>> +# ifdef YYPARSE_PARAM_TYPE<br>
>> +# define YYPARSE_DECL() yyparse(YYPARSE_PARAM_TYPE YYPARSE_PARAM)<br>
>> # else<br>
>> -# define YYSIZE_T unsigned int<br>
>> -# endif<br>
>> -#endif<br>
>> -<br>
>> -#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)<br>
>> -<br>
>> -#ifndef YY_<br>
>> -# if defined YYENABLE_NLS && YYENABLE_NLS<br>
>> -# if ENABLE_NLS<br>
>> -# include <libintl.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# define YY_(Msgid) dgettext ("bison-runtime", Msgid)<br>
>> -# endif<br>
>> +# define YYPARSE_DECL() yyparse(void *YYPARSE_PARAM)<br>
>> # endif<br>
>> -# ifndef YY_<br>
>> -# define YY_(Msgid) Msgid<br>
>> -# endif<br>
>> -#endif<br>
>> -<br>
>> -/* Suppress unused-variable warnings by "using" E. */<br>
>> -#if ! defined lint || defined __GNUC__<br>
>> -# define YYUSE(E) ((void) (E))<br>
>> #else<br>
>> -# define YYUSE(E) /* empty */<br>
>> +# define YYPARSE_DECL() yyparse(void)<br>
>> #endif<br>
>><br>
>> -/* Identity function, used to suppress warnings about constant conditions. */<br>
>> -#ifndef lint<br>
>> -# define YYID(N) (N)<br>
>> -#else<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static int<br>
>> -YYID (int yyi)<br>
>> +/* Parameters sent to lex. */<br>
>> +#ifdef YYLEX_PARAM<br>
>> +# define YYLEX_DECL() yylex(void *YYLEX_PARAM)<br>
>> +# define YYLEX yylex(YYLEX_PARAM)<br>
>> #else<br>
>> -static int<br>
>> -YYID (yyi)<br>
>> - int yyi;<br>
>> -#endif<br>
>> -{<br>
>> - return yyi;<br>
>> -}<br>
>> -#endif<br>
>> -<br>
>> -#if ! defined yyoverflow || YYERROR_VERBOSE<br>
>> -<br>
>> -/* The parser invokes alloca or malloc; define the necessary symbols. */<br>
>> -<br>
>> -# ifdef YYSTACK_USE_ALLOCA<br>
>> -# if YYSTACK_USE_ALLOCA<br>
>> -# ifdef __GNUC__<br>
>> -# define YYSTACK_ALLOC __builtin_alloca<br>
>> -# elif defined __BUILTIN_VA_ARG_INCR<br>
>> -# include <alloca.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# elif defined _AIX<br>
>> -# define YYSTACK_ALLOC __alloca<br>
>> -# elif defined _MSC_VER<br>
>> -# include <malloc.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# define alloca _alloca<br>
>> -# else<br>
>> -# define YYSTACK_ALLOC alloca<br>
>> -# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */<br>
>> - /* Use EXIT_SUCCESS as a witness for stdlib.h. */<br>
>> -# ifndef EXIT_SUCCESS<br>
>> -# define EXIT_SUCCESS 0<br>
>> -# endif<br>
>> -# endif<br>
>> -# endif<br>
>> -# endif<br>
>> -# endif<br>
>> -<br>
>> -# ifdef YYSTACK_ALLOC<br>
>> - /* Pacify GCC's `empty if-body' warning. */<br>
>> -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))<br>
>> -# ifndef YYSTACK_ALLOC_MAXIMUM<br>
>> - /* The OS might guarantee only one guard page at the bottom of the stack,<br>
>> - and a page size can be as small as 4096 bytes. So we cannot safely<br>
>> - invoke alloca (N) if N exceeds 4096. Use a slightly smaller number<br>
>> - to allow for a few compiler-allocated temporary stack slots. */<br>
>> -# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */<br>
>> -# endif<br>
>> -# else<br>
>> -# define YYSTACK_ALLOC YYMALLOC<br>
>> -# define YYSTACK_FREE YYFREE<br>
>> -# ifndef YYSTACK_ALLOC_MAXIMUM<br>
>> -# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM<br>
>> -# endif<br>
>> -# if (defined __cplusplus && ! defined EXIT_SUCCESS \<br>
>> - && ! ((defined YYMALLOC || defined malloc) \<br>
>> - && (defined YYFREE || defined free)))<br>
>> -# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# ifndef EXIT_SUCCESS<br>
>> -# define EXIT_SUCCESS 0<br>
>> -# endif<br>
>> -# endif<br>
>> -# ifndef YYMALLOC<br>
>> -# define YYMALLOC malloc<br>
>> -# if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */<br>
>> -# endif<br>
>> -# endif<br>
>> -# ifndef YYFREE<br>
>> -# define YYFREE free<br>
>> -# if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -void free (void *); /* INFRINGES ON USER NAME SPACE */<br>
>> -# endif<br>
>> -# endif<br>
>> -# endif<br>
>> -#endif /* ! defined yyoverflow || YYERROR_VERBOSE */<br>
>> -<br>
>> -<br>
>> -#if (! defined yyoverflow \<br>
>> - && (! defined __cplusplus \<br>
>> - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))<br>
>> -<br>
>> -/* A type that is properly aligned for any stack member. */<br>
>> -union yyalloc<br>
>> -{<br>
>> - yytype_int16 yyss_alloc;<br>
>> - YYSTYPE yyvs_alloc;<br>
>> -};<br>
>> -<br>
>> -/* The size of the maximum gap between one aligned stack and the next. */<br>
>> -# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)<br>
>> -<br>
>> -/* The size of an array large to enough to hold all stacks, each with<br>
>> - N elements. */<br>
>> -# define YYSTACK_BYTES(N) \<br>
>> - ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \<br>
>> - + YYSTACK_GAP_MAXIMUM)<br>
>> -<br>
>> -# define YYCOPY_NEEDED 1<br>
>> -<br>
>> -/* Relocate STACK from its old location to the new one. The<br>
>> - local variables YYSIZE and YYSTACKSIZE give the old and new number of<br>
>> - elements in the stack, and YYPTR gives the new location of the<br>
>> - stack. Advance YYPTR to a properly aligned location for the next<br>
>> - stack. */<br>
>> -# define YYSTACK_RELOCATE(Stack_alloc, Stack) \<br>
>> - do \<br>
>> - { \<br>
>> - YYSIZE_T yynewbytes; \<br>
>> - YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \<br>
>> - Stack = &yyptr->Stack_alloc; \<br>
>> - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \<br>
>> - yyptr += yynewbytes / sizeof (*yyptr); \<br>
>> - } \<br>
>> - while (YYID (0))<br>
>> -<br>
>> -#endif<br>
>> -<br>
>> -#if defined YYCOPY_NEEDED && YYCOPY_NEEDED<br>
>> -/* Copy COUNT objects from SRC to DST. The source and destination do<br>
>> - not overlap. */<br>
>> -# ifndef YYCOPY<br>
>> -# if defined __GNUC__ && 1 < __GNUC__<br>
>> -# define YYCOPY(Dst, Src, Count) \<br>
>> - __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src)))<br>
>> -# else<br>
>> -# define YYCOPY(Dst, Src, Count) \<br>
>> - do \<br>
>> - { \<br>
>> - YYSIZE_T yyi; \<br>
>> - for (yyi = 0; yyi < (Count); yyi++) \<br>
>> - (Dst)[yyi] = (Src)[yyi]; \<br>
>> - } \<br>
>> - while (YYID (0))<br>
>> -# endif<br>
>> -# endif<br>
>> -#endif /* !YYCOPY_NEEDED */<br>
>> -<br>
>> -/* YYFINAL -- State number of the termination state. */<br>
>> -#define YYFINAL 9<br>
>> -/* YYLAST -- Last index in YYTABLE. */<br>
>> -#define YYLAST 30<br>
>> -<br>
>> -/* YYNTOKENS -- Number of terminals. */<br>
>> -#define YYNTOKENS 16<br>
>> -/* YYNNTS -- Number of nonterminals. */<br>
>> -#define YYNNTS 12<br>
>> -/* YYNRULES -- Number of rules. */<br>
>> -#define YYNRULES 24<br>
>> -/* YYNRULES -- Number of states. */<br>
>> -#define YYNSTATES 33<br>
>> -<br>
>> -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */<br>
>> -#define YYUNDEFTOK 2<br>
>> -#define YYMAXUTOK 266<br>
>> -<br>
>> -#define YYTRANSLATE(YYX) \<br>
>> - ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)<br>
>> -<br>
>> -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */<br>
>> -static const yytype_uint8 yytranslate[] =<br>
>> -{<br>
>> - 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,<br>
>> - 2, 15, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 13, 2, 14, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,<br>
>> - 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,<br>
>> - 5, 6, 7, 8, 9, 10, 11<br>
>> -};<br>
>> -<br>
>> -#if YYDEBUG<br>
>> -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in<br>
>> - YYRHS. */<br>
>> -static const yytype_uint8 yyprhs[] =<br>
>> -{<br>
>> - 0, 0, 3, 4, 6, 8, 11, 13, 17, 22,<br>
>> - 25, 27, 29, 32, 34, 35, 41, 43, 46, 50,<br>
>> - 52, 54, 56, 58, 60<br>
>> -};<br>
>> -<br>
>> -/* YYRHS -- A `-1'-separated list of the rules' RHS. */<br>
>> -static const yytype_int8 yyrhs[] =<br>
>> -{<br>
>> - 17, 0, -1, -1, 18, -1, 19, -1, 18, 19,<br>
>> - -1, 3, -1, 20, 12, 3, -1, 20, 12, 21,<br>
>> - 3, -1, 1, 3, -1, 11, -1, 22, -1, 21,<br>
>> - 22, -1, 11, -1, -1, 11, 13, 23, 24, 14,<br>
>> - -1, 25, -1, 24, 25, -1, 26, 15, 27, -1,<br>
>> - 4, -1, 5, -1, 6, -1, 7, -1, 8, -1,<br>
>> - 9, -1<br>
>> -};<br>
>> -<br>
>> -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */<br>
>> -static const yytype_uint8 yyrline[] =<br>
>> -{<br>
>> - 0, 73, 73, 75, 79, 80, 84, 85, 89, 93,<br>
>> - 100, 109, 110, 114, 119, 119, 126, 127, 131, 141,<br>
>> - 142, 143, 144, 148, 149<br>
>> -};<br>
>> -#endif<br>
>> -<br>
>> -#if YYDEBUG || YYERROR_VERBOSE || 0<br>
>> -/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.<br>
>> - First, the terminals, then, starting at YYNTOKENS, nonterminals. */<br>
>> -static const char *const yytname[] =<br>
>> -{<br>
>> - "$end", "error", "$undefined", "NL", "SUCCESS", "UNAVAIL", "NOTFOUND",<br>
>> - "TRYAGAIN", "RETURN", "CONTINUE", "ERRORTOKEN", "STRING", "':'", "'['",<br>
>> - "']'", "'='", "$accept", "File", "Lines", "Entry", "Database", "Srclist",<br>
>> - "Item", "$@1", "Criteria", "Criterion", "Status", "Action", YY_NULL<br>
>> +# define YYLEX_DECL() yylex(void)<br>
>> +# define YYLEX yylex()<br>
>> +#endif<br>
>> +<br>
>> +/* Parameters sent to yyerror. */<br>
>> +#ifndef YYERROR_DECL<br>
>> +#define YYERROR_DECL() yyerror(const char *s)<br>
>> +#endif<br>
>> +#ifndef YYERROR_CALL<br>
>> +#define YYERROR_CALL(msg) yyerror(msg)<br>
>> +#endif<br>
>> +<br>
>> +extern int YYPARSE_DECL();<br>
>> +<br>
>> +#define NL 257<br>
>> +#define SUCCESS 258<br>
>> +#define UNAVAIL 259<br>
>> +#define NOTFOUND 260<br>
>> +#define TRYAGAIN 261<br>
>> +#define RETURN 262<br>
>> +#define CONTINUE 263<br>
>> +#define ERRORTOKEN 264<br>
>> +#define STRING 265<br>
>> +#define YYERRCODE 256<br>
>> +typedef short YYINT;<br>
>> +static const YYINT _nsyylhs[] = { -1,<br>
>> + 0, 0, 3, 3, 4, 4, 4, 4, 5, 6,<br>
>> + 6, 7, 9, 7, 8, 8, 10, 1, 1, 1,<br>
>> + 1, 2, 2,<br>
>> };<br>
>> -#endif<br>
>> -<br>
>> -# ifdef YYPRINT<br>
>> -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to<br>
>> - token YYLEX-NUM. */<br>
>> -static const yytype_uint16 yytoknum[] =<br>
>> -{<br>
>> - 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,<br>
>> - 265, 266, 58, 91, 93, 61<br>
>> +static const YYINT _nsyylen[] = { 2,<br>
>> + 0, 1, 1, 2, 1, 3, 4, 2, 1, 1,<br>
>> + 2, 1, 0, 5, 1, 2, 3, 1, 1, 1,<br>
>> + 1, 1, 1,<br>
>> };<br>
>> -# endif<br>
>> -<br>
>> -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */<br>
>> -static const yytype_uint8 yyr1[] =<br>
>> -{<br>
>> - 0, 16, 17, 17, 18, 18, 19, 19, 19, 19,<br>
>> - 20, 21, 21, 22, 23, 22, 24, 24, 25, 26,<br>
>> - 26, 26, 26, 27, 27<br>
>> +static const YYINT _nsyydefred[] = { 0,<br>
>> + 0, 5, 9, 0, 0, 3, 0, 8, 4, 0,<br>
>> + 6, 0, 0, 10, 13, 7, 11, 0, 18, 19,<br>
>> + 20, 21, 0, 0, 15, 0, 14, 16, 22, 23,<br>
>> + 17,<br>
>> };<br>
>> -<br>
>> -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */<br>
>> -static const yytype_uint8 yyr2[] =<br>
>> -{<br>
>> - 0, 2, 0, 1, 1, 2, 1, 3, 4, 2,<br>
>> - 1, 1, 2, 1, 0, 5, 1, 2, 3, 1,<br>
>> - 1, 1, 1, 1, 1<br>
>> +static const YYINT _nsyydgoto[] = { 4,<br>
>> + 23, 31, 5, 6, 7, 13, 14, 24, 18, 25,<br>
>> };<br>
>> -<br>
>> -/* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.<br>
>> - Performed when YYTABLE doesn't specify something else to do. Zero<br>
>> - means the default is an error. */<br>
>> -static const yytype_uint8 yydefact[] =<br>
>> -{<br>
>> - 0, 0, 6, 10, 0, 0, 4, 0, 9, 1,<br>
>> - 5, 0, 7, 13, 0, 11, 14, 8, 12, 0,<br>
>> - 19, 20, 21, 22, 0, 16, 0, 15, 17, 0,<br>
>> - 23, 24, 18<br>
>> +static const YYINT _nsyysindex[] = { -255,<br>
>> + -249, 0, 0, 0, -255, 0, -49, 0, 0, -254,<br>
>> + 0, -73, -253, 0, 0, 0, 0, -244, 0, 0,<br>
>> + 0, 0, -42, -93, 0, -256, 0, 0, 0, 0,<br>
>> + 0,<br>
>> };<br>
>> -<br>
>> -/* YYDEFGOTO[NTERM-NUM]. */<br>
>> -static const yytype_int8 yydefgoto[] =<br>
>> -{<br>
>> - -1, 4, 5, 6, 7, 14, 15, 19, 24, 25,<br>
>> - 26, 32<br>
>> +static const YYINT _nsyyrindex[] = { 20,<br>
>> + 0, 0, 0, 0, 21, 0, 0, 0, 0, 0,<br>
>> + 0, -252, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0,<br>
>> };<br>
>> -<br>
>> -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing<br>
>> - STATE-NUM. */<br>
>> -#define YYPACT_NINF -4<br>
>> -static const yytype_int8 yypact[] =<br>
>> -{<br>
>> - 0, 5, -4, -4, 9, 4, -4, 1, -4, -4,<br>
>> - -4, -1, -4, 11, 3, -4, -4, -4, -4, 16,<br>
>> - -4, -4, -4, -4, 12, -4, -3, -4, -4, 19,<br>
>> - -4, -4, -4<br>
>> +static const YYINT _nsyygindex[] = { 0,<br>
>> + 0, 0, 0, 17, 0, 0, 10, 0, 0, 1,<br>
>> };<br>
>> -<br>
>> -/* YYPGOTO[NTERM-NUM]. */<br>
>> -static const yytype_int8 yypgoto[] =<br>
>> -{<br>
>> - -4, -4, -4, 20, -4, -4, 15, -4, -4, 6,<br>
>> - -4, -4<br>
>> +#define YYTABLESIZE 168<br>
>> +static const YYINT _nsyytable[] = { 27,<br>
>> + 1, 2, 11, 16, 12, 29, 30, 8, 10, 3,<br>
>> + 12, 12, 12, 19, 20, 21, 22, 15, 26, 1,<br>
>> + 2, 9, 17, 0, 28, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,<br>
>> + 0, 0, 0, 0, 19, 20, 21, 22,<br>
>> };<br>
>> -<br>
>> -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If<br>
>> - positive, shift that token. If negative, reduce the rule which<br>
>> - number is the opposite. If YYTABLE_NINF, syntax error. */<br>
>> -#define YYTABLE_NINF -4<br>
>> -static const yytype_int8 yytable[] =<br>
>> -{<br>
>> - -2, 1, 12, 2, -3, 1, 17, 2, 8, 9,<br>
>> - 13, 3, 29, 11, 13, 3, 20, 21, 22, 23,<br>
>> - 20, 21, 22, 23, 16, 10, 27, 30, 31, 18,<br>
>> - 28<br>
>> +static const YYINT _nsyycheck[] = { 93,<br>
>> + 256, 257, 257, 257, 257, 262, 263, 257, 58, 265,<br>
>> + 265, 265, 265, 258, 259, 260, 261, 91, 61, 0,<br>
>> + 0, 5, 13, -1, 24, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,<br>
>> + -1, -1, -1, -1, 258, 259, 260, 261,<br>
>> };<br>
>> -<br>
>> -#define yypact_value_is_default(Yystate) \<br>
>> - (!!((Yystate) == (-4)))<br>
>> -<br>
>> -#define yytable_value_is_error(Yytable_value) \<br>
>> - YYID (0)<br>
>> -<br>
>> -static const yytype_uint8 yycheck[] =<br>
>> -{<br>
>> - 0, 1, 3, 3, 0, 1, 3, 3, 3, 0,<br>
>> - 11, 11, 15, 12, 11, 11, 4, 5, 6, 7,<br>
>> - 4, 5, 6, 7, 13, 5, 14, 8, 9, 14,<br>
>> - 24<br>
>> +#define YYFINAL 4<br>
>> +#ifndef YYDEBUG<br>
>> +#define YYDEBUG 0<br>
>> +#endif<br>
>> +#define YYMAXTOKEN 265<br>
>> +#define YYUNDFTOKEN 278<br>
>> +#define YYTRANSLATE(a) ((a) > YYMAXTOKEN ? YYUNDFTOKEN : (a))<br>
>> +#if YYDEBUG<br>
>> +static const char *const _nsyyname[] = {<br>
>> +<br>
>> +"end-of-file",0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"':'",0,0,"'='",0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"'['",0,"']'",0,0,0,0,0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"NL","SUCCESS",<br>
>> +"UNAVAIL","NOTFOUND","TRYAGAIN","RETURN","CONTINUE","ERRORTOKEN","STRING",0,0,0,<br>
>> +0,0,0,0,0,0,0,0,0,"illegal-symbol",<br>
>> };<br>
>> +static const char *const _nsyyrule[] = {<br>
>> +"$accept : File",<br>
>> +"File :",<br>
>> +"File : Lines",<br>
>> +"Lines : Entry",<br>
>> +"Lines : Lines Entry",<br>
>> +"Entry : NL",<br>
>> +"Entry : Database ':' NL",<br>
>> +"Entry : Database ':' Srclist NL",<br>
>> +"Entry : error NL",<br>
>> +"Database : STRING",<br>
>> +"Srclist : Item",<br>
>> +"Srclist : Srclist Item",<br>
>> +"Item : STRING",<br>
>> +"$$1 :",<br>
>> +"Item : STRING '[' $$1 Criteria ']'",<br>
>> +"Criteria : Criterion",<br>
>> +"Criteria : Criteria Criterion",<br>
>> +"Criterion : Status '=' Action",<br>
>> +"Status : SUCCESS",<br>
>> +"Status : UNAVAIL",<br>
>> +"Status : NOTFOUND",<br>
>> +"Status : TRYAGAIN",<br>
>> +"Action : RETURN",<br>
>> +"Action : CONTINUE",<br>
>><br>
>> -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing<br>
>> - symbol of state STATE-NUM. */<br>
>> -static const yytype_uint8 yystos[] =<br>
>> -{<br>
>> - 0, 1, 3, 11, 17, 18, 19, 20, 3, 0,<br>
>> - 19, 12, 3, 11, 21, 22, 13, 3, 22, 23,<br>
>> - 4, 5, 6, 7, 24, 25, 26, 14, 25, 15,<br>
>> - 8, 9, 27<br>
>> };<br>
>> -<br>
>> -#define yyerrok (yyerrstatus = 0)<br>
>> -#define yyclearin (yychar = YYEMPTY)<br>
>> -#define YYEMPTY (-2)<br>
>> -#define YYEOF 0<br>
>> -<br>
>> -#define YYACCEPT goto yyacceptlab<br>
>> -#define YYABORT goto yyabortlab<br>
>> -#define YYERROR goto yyerrorlab<br>
>> -<br>
>> -<br>
>> -/* Like YYERROR except do call yyerror. This remains here temporarily<br>
>> - to ease the transition to the new meaning of YYERROR, for GCC.<br>
>> - Once GCC version 2 has supplanted version 1, this can go. However,<br>
>> - YYFAIL appears to be in use. Nevertheless, it is formally deprecated<br>
>> - in Bison 2.4.2's NEWS entry, where a plan to phase it out is<br>
>> - discussed. */<br>
>> -<br>
>> -#define YYFAIL goto yyerrlab<br>
>> -#if defined YYFAIL<br>
>> - /* This is here to suppress warnings from the GCC cpp's<br>
>> - -Wunused-macros. Normally we don't worry about that warning, but<br>
>> - some users do, and we want to make it easy for users to remove<br>
>> - YYFAIL uses, which will produce warnings from Bison 2.5. */<br>
>> #endif<br>
>><br>
>> -#define YYRECOVERING() (!!yyerrstatus)<br>
>> -<br>
>> -#define YYBACKUP(Token, Value) \<br>
>> -do \<br>
>> - if (yychar == YYEMPTY) \<br>
>> - { \<br>
>> - yychar = (Token); \<br>
>> - yylval = (Value); \<br>
>> - YYPOPSTACK (yylen); \<br>
>> - yystate = *yyssp; \<br>
>> - goto yybackup; \<br>
>> - } \<br>
>> - else \<br>
>> - { \<br>
>> - yyerror (YY_("syntax error: cannot back up")); \<br>
>> - YYERROR; \<br>
>> - } \<br>
>> -while (YYID (0))<br>
>> -<br>
>> -/* Error token number */<br>
>> -#define YYTERROR 1<br>
>> -#define YYERRCODE 256<br>
>> -<br>
>> -<br>
>> -/* This macro is provided for backward compatibility. */<br>
>> -#ifndef YY_LOCATION_PRINT<br>
>> -# define YY_LOCATION_PRINT(File, Loc) ((void) 0)<br>
>> -#endif<br>
>> +int yydebug;<br>
>> +int yynerrs;<br>
>><br>
>> +int yyerrflag;<br>
>> +int yychar;<br>
>> +YYSTYPE yyval;<br>
>> +YYSTYPE yylval;<br>
>><br>
>> -/* YYLEX -- calling `yylex' with the right arguments. */<br>
>> -#ifdef YYLEX_PARAM<br>
>> -# define YYLEX yylex (YYLEX_PARAM)<br>
>> +/* define the initial stack-sizes */<br>
>> +#ifdef YYSTACKSIZE<br>
>> +#undef YYMAXDEPTH<br>
>> +#define YYMAXDEPTH YYSTACKSIZE<br>
>> #else<br>
>> -# define YYLEX yylex ()<br>
>> -#endif<br>
>> -<br>
>> -/* Enable debugging if requested. */<br>
>> -#if YYDEBUG<br>
>> -<br>
>> -# ifndef YYFPRINTF<br>
>> -# include <stdio.h> /* INFRINGES ON USER NAME SPACE */<br>
>> -# define YYFPRINTF fprintf<br>
>> -# endif<br>
>> -<br>
>> -# define YYDPRINTF(Args) \<br>
>> -do { \<br>
>> - if (yydebug) \<br>
>> - YYFPRINTF Args; \<br>
>> -} while (YYID (0))<br>
>> -<br>
>> -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \<br>
>> -do { \<br>
>> - if (yydebug) \<br>
>> - { \<br>
>> - YYFPRINTF (stderr, "%s ", Title); \<br>
>> - yy_symbol_print (stderr, \<br>
>> - Type, Value); \<br>
>> - YYFPRINTF (stderr, "\n"); \<br>
>> - } \<br>
>> -} while (YYID (0))<br>
>> -<br>
>> -<br>
>> -/*--------------------------------.<br>
>> -| Print this symbol on YYOUTPUT. |<br>
>> -`--------------------------------*/<br>
>> -<br>
>> -/*ARGSUSED*/<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static void<br>
>> -yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)<br>
>> +#ifdef YYMAXDEPTH<br>
>> +#define YYSTACKSIZE YYMAXDEPTH<br>
>> #else<br>
>> -static void<br>
>> -yy_symbol_value_print (yyoutput, yytype, yyvaluep)<br>
>> - FILE *yyoutput;<br>
>> - int yytype;<br>
>> - YYSTYPE const * const yyvaluep;<br>
>> +#define YYSTACKSIZE 10000<br>
>> +#define YYMAXDEPTH 10000<br>
>> +#endif<br>
>> #endif<br>
>> -{<br>
>> - FILE *yyo = yyoutput;<br>
>> - YYUSE (yyo);<br>
>> - if (!yyvaluep)<br>
>> - return;<br>
>> -# ifdef YYPRINT<br>
>> - if (yytype < YYNTOKENS)<br>
>> - YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);<br>
>> -# else<br>
>> - YYUSE (yyoutput);<br>
>> -# endif<br>
>> - switch (yytype)<br>
>> - {<br>
>> - default:<br>
>> - break;<br>
>> - }<br>
>> -}<br>
>><br>
>> +#define YYINITSTACKSIZE 200<br>
>><br>
>> -/*--------------------------------.<br>
>> -| Print this symbol on YYOUTPUT. |<br>
>> -`--------------------------------*/<br>
>> +typedef struct {<br>
>> + unsigned stacksize;<br>
>> + YYINT *s_base;<br>
>> + YYINT *s_mark;<br>
>> + YYINT *s_last;<br>
>> + YYSTYPE *l_base;<br>
>> + YYSTYPE *l_mark;<br>
>> +} YYSTACKDATA;<br>
>> +/* variables for the parser stack */<br>
>> +static YYSTACKDATA yystack;<br>
>> +#line 153 "../../freebsd/lib/libc/net/nsparser.y"<br>
>><br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> static void<br>
>> -yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)<br>
>> -#else<br>
>> -static void<br>
>> -yy_symbol_print (yyoutput, yytype, yyvaluep)<br>
>> - FILE *yyoutput;<br>
>> - int yytype;<br>
>> - YYSTYPE const * const yyvaluep;<br>
>> -#endif<br>
>> +_nsaddsrctomap(elem)<br>
>> + const char *elem;<br>
>> {<br>
>> - if (yytype < YYNTOKENS)<br>
>> - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);<br>
>> - else<br>
>> - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);<br>
>> + int i, lineno;<br>
>> + extern int _nsyylineno;<br>
>> + extern char _nsyytext[];<br>
>><br>
>> - yy_symbol_value_print (yyoutput, yytype, yyvaluep);<br>
>> - YYFPRINTF (yyoutput, ")");<br>
>> + lineno = _nsyylineno - (_nsyytext[0] == '\n' ? 1 : 0);<br>
>> + if (curdbt.srclistsize > 0) {<br>
>> + if (((strcasecmp(elem, NSSRC_COMPAT) == 0) &&<br>
>> + (strcasecmp(curdbt.srclist[0].name, NSSRC_CACHE) != 0)) ||<br>
>> + (strcasecmp(curdbt.srclist[0].name, NSSRC_COMPAT) == 0)) {<br>
>> + syslog(LOG_ERR,<br>
>> + "NSSWITCH(nsparser): %s line %d: 'compat' used with sources, other than 'cache'",<br>
>> + _PATH_NS_CONF, lineno);<br>
>> + free((void*)elem);<br>
>> + return;<br>
>> + }<br>
>> + }<br>
>> + for (i = 0; i < curdbt.srclistsize; i++) {<br>
>> + if (strcasecmp(curdbt.srclist[i].name, elem) == 0) {<br>
>> + syslog(LOG_ERR,<br>
>> + "NSSWITCH(nsparser): %s line %d: duplicate source '%s'",<br>
>> + _PATH_NS_CONF, lineno, elem);<br>
>> + free((void*)elem);<br>
>> + return;<br>
>> + }<br>
>> + }<br>
>> + <a href="http://cursrc.name">cursrc.name</a> = elem;<br>
>> + _nsdbtaddsrc(&curdbt, &cursrc);<br>
>> }<br>
>> +#line 400 "_nsyy.tab.c"<br>
>><br>
>> -/*------------------------------------------------------------------.<br>
>> -| yy_stack_print -- Print the state stack from its BOTTOM up to its |<br>
>> -| TOP (included). |<br>
>> -`------------------------------------------------------------------*/<br>
>> -<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static void<br>
>> -yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)<br>
>> -#else<br>
>> -static void<br>
>> -yy_stack_print (yybottom, yytop)<br>
>> - yytype_int16 *yybottom;<br>
>> - yytype_int16 *yytop;<br>
>> +#if YYDEBUG<br>
>> +#include <stdio.h> /* needed for printf */<br>
>> #endif<br>
>> -{<br>
>> - YYFPRINTF (stderr, "Stack now");<br>
>> - for (; yybottom <= yytop; yybottom++)<br>
>> - {<br>
>> - int yybot = *yybottom;<br>
>> - YYFPRINTF (stderr, " %d", yybot);<br>
>> - }<br>
>> - YYFPRINTF (stderr, "\n");<br>
>> -}<br>
>> -<br>
>> -# define YY_STACK_PRINT(Bottom, Top) \<br>
>> -do { \<br>
>> - if (yydebug) \<br>
>> - yy_stack_print ((Bottom), (Top)); \<br>
>> -} while (YYID (0))<br>
>> -<br>
>><br>
>> -/*------------------------------------------------.<br>
>> -| Report that the YYRULE is going to be reduced. |<br>
>> -`------------------------------------------------*/<br>
>> +#include <stdlib.h> /* needed for malloc, etc */<br>
>> +#include <string.h> /* needed for memset */<br>
>><br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static void<br>
>> -yy_reduce_print (YYSTYPE *yyvsp, int yyrule)<br>
>> -#else<br>
>> -static void<br>
>> -yy_reduce_print (yyvsp, yyrule)<br>
>> - YYSTYPE *yyvsp;<br>
>> - int yyrule;<br>
>> -#endif<br>
>> +/* allocate initial stack or double stack size, up to YYMAXDEPTH */<br>
>> +static int yygrowstack(YYSTACKDATA *data)<br>
>> {<br>
>> - int yynrhs = yyr2[yyrule];<br>
>> - int yyi;<br>
>> - unsigned long int yylno = yyrline[yyrule];<br>
>> - YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",<br>
>> - yyrule - 1, yylno);<br>
>> - /* The symbols being reduced. */<br>
>> - for (yyi = 0; yyi < yynrhs; yyi++)<br>
>> - {<br>
>> - YYFPRINTF (stderr, " $%d = ", yyi + 1);<br>
>> - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],<br>
>> - &(yyvsp[(yyi + 1) - (yynrhs)])<br>
>> - );<br>
>> - YYFPRINTF (stderr, "\n");<br>
>> - }<br>
>> + int i;<br>
>> + unsigned newsize;<br>
>> + YYINT *newss;<br>
>> + YYSTYPE *newvs;<br>
>> +<br>
>> + if ((newsize = data->stacksize) == 0)<br>
>> + newsize = YYINITSTACKSIZE;<br>
>> + else if (newsize >= YYMAXDEPTH)<br>
>> + return YYENOMEM;<br>
>> + else if ((newsize *= 2) > YYMAXDEPTH)<br>
>> + newsize = YYMAXDEPTH;<br>
>> +<br>
>> + i = (int) (data->s_mark - data->s_base);<br>
>> + newss = (YYINT *)realloc(data->s_base, newsize * sizeof(*newss));<br>
>> + if (newss == 0)<br>
>> + return YYENOMEM;<br>
>> +<br>
>> + data->s_base = newss;<br>
>> + data->s_mark = newss + i;<br>
>> +<br>
>> + newvs = (YYSTYPE *)realloc(data->l_base, newsize * sizeof(*newvs));<br>
>> + if (newvs == 0)<br>
>> + return YYENOMEM;<br>
>> +<br>
>> + data->l_base = newvs;<br>
>> + data->l_mark = newvs + i;<br>
>> +<br>
>> + data->stacksize = newsize;<br>
>> + data->s_last = data->s_base + newsize - 1;<br>
>> + return 0;<br>
>> }<br>
>><br>
>> -# define YY_REDUCE_PRINT(Rule) \<br>
>> -do { \<br>
>> - if (yydebug) \<br>
>> - yy_reduce_print (yyvsp, Rule); \<br>
>> -} while (YYID (0))<br>
>> -<br>
>> -/* Nonzero means print parse trace. It is left uninitialized so that<br>
>> - multiple parsers can coexist. */<br>
>> -int yydebug;<br>
>> -#else /* !YYDEBUG */<br>
>> -# define YYDPRINTF(Args)<br>
>> -# define YY_SYMBOL_PRINT(Title, Type, Value, Location)<br>
>> -# define YY_STACK_PRINT(Bottom, Top)<br>
>> -# define YY_REDUCE_PRINT(Rule)<br>
>> -#endif /* !YYDEBUG */<br>
>> -<br>
>> -<br>
>> -/* YYINITDEPTH -- initial size of the parser's stacks. */<br>
>> -#ifndef YYINITDEPTH<br>
>> -# define YYINITDEPTH 200<br>
>> -#endif<br>
>> -<br>
>> -/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only<br>
>> - if the built-in stack extension method is used).<br>
>> -<br>
>> - Do not make this value too large; the results are undefined if<br>
>> - YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)<br>
>> - evaluated with infinite-precision integer arithmetic. */<br>
>> -<br>
>> -#ifndef YYMAXDEPTH<br>
>> -# define YYMAXDEPTH 10000<br>
>> -#endif<br>
>> -<br>
>> -<br>
>> -#if YYERROR_VERBOSE<br>
>> -<br>
>> -# ifndef yystrlen<br>
>> -# if defined __GLIBC__ && defined _STRING_H<br>
>> -# define yystrlen strlen<br>
>> -# else<br>
>> -/* Return the length of YYSTR. */<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static YYSIZE_T<br>
>> -yystrlen (const char *yystr)<br>
>> -#else<br>
>> -static YYSIZE_T<br>
>> -yystrlen (yystr)<br>
>> - const char *yystr;<br>
>> -#endif<br>
>> +#if YYPURE || defined(YY_NO_LEAKS)<br>
>> +static void yyfreestack(YYSTACKDATA *data)<br>
>> {<br>
>> - YYSIZE_T yylen;<br>
>> - for (yylen = 0; yystr[yylen]; yylen++)<br>
>> - continue;<br>
>> - return yylen;<br>
>> + free(data->s_base);<br>
>> + free(data->l_base);<br>
>> + memset(data, 0, sizeof(*data));<br>
>> }<br>
>> -# endif<br>
>> -# endif<br>
>> -<br>
>> -# ifndef yystpcpy<br>
>> -# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE<br>
>> -# define yystpcpy stpcpy<br>
>> -# else<br>
>> -/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in<br>
>> - YYDEST. */<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _MSC_VER)<br>
>> -static char *<br>
>> -yystpcpy (char *yydest, const char *yysrc)<br>
>> #else<br>
>> -static char *<br>
>> -yystpcpy (yydest, yysrc)<br>
>> - char *yydest;<br>
>> - const char *yysrc;<br>
>> +#define yyfreestack(data) /* nothing */<br>
>> #endif<br>
>> -{<br>
>> - char *yyd = yydest;<br>
>> - const char *yys = yysrc;<br>
>><br>
>> - while ((*yyd++ = *yys++) != '\0')<br>
>> - continue;<br>
>> +#define YYABORT goto yyabort<br>
>> +#define YYREJECT goto yyabort<br>
>> +#define YYACCEPT goto yyaccept<br>
>> +#define YYERROR goto yyerrlab<br>
>><br>
>> - return yyd - 1;<br>
>> -}<br>
>> -# endif<br>
>> -# endif<br>
>> -<br>
>> -# ifndef yytnamerr<br>
>> -/* Copy to YYRES the contents of YYSTR after stripping away unnecessary<br>
>> - quotes and backslashes, so that it's suitable for yyerror. The<br>
>> - heuristic is that double-quoting is unnecessary unless the string<br>
>> - contains an apostrophe, a comma, or backslash (other than<br>
>> - backslash-backslash). YYSTR is taken from yytname. If YYRES is<br>
>> - null, do not copy; instead, return the length of what the result<br>
>> - would have been. */<br>
>> -static YYSIZE_T<br>
>> -yytnamerr (char *yyres, const char *yystr)<br>
>> +int<br>
>> +YYPARSE_DECL()<br>
>> {<br>
>> - if (*yystr == '"')<br>
>> + int yym, yyn, yystate;<br>
>> +#if YYDEBUG<br>
>> + const char *yys;<br>
>> +<br>
>> + if ((yys = getenv("YYDEBUG")) != 0)<br>
>> {<br>
>> - YYSIZE_T yyn = 0;<br>
>> - char const *yyp = yystr;<br>
>> -<br>
>> - for (;;)<br>
>> - switch (*++yyp)<br>
>> - {<br>
>> - case '\'':<br>
>> - case ',':<br>
>> - goto do_not_strip_quotes;<br>
>> -<br>
>> - case '\\':<br>
>> - if (*++yyp != '\\')<br>
>> - goto do_not_strip_quotes;<br>
>> - /* Fall through. */<br>
>> - default:<br>
>> - if (yyres)<br>
>> - yyres[yyn] = *yyp;<br>
>> - yyn++;<br>
>> - break;<br>
>> -<br>
>> - case '"':<br>
>> - if (yyres)<br>
>> - yyres[yyn] = '\0';<br>
>> - return yyn;<br>
>> - }<br>
>> - do_not_strip_quotes: ;<br>
>> + yyn = *yys;<br>
>> + if (yyn >= '0' && yyn <= '9')<br>
>> + yydebug = yyn - '0';<br>
>> }<br>
>> +#endif<br>
>><br>
>> - if (! yyres)<br>
>> - return yystrlen (yystr);<br>
>> + yynerrs = 0;<br>
>> + yyerrflag = 0;<br>
>> + yychar = YYEMPTY;<br>
>> + yystate = 0;<br>
>><br>
>> - return yystpcpy (yyres, yystr) - yyres;<br>
>> -}<br>
>> -# endif<br>
>> +#if YYPURE<br>
>> + memset(&yystack, 0, sizeof(yystack));<br>
>> +#endif<br>
>><br>
>> -/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message<br>
>> - about the unexpected token YYTOKEN for the state stack whose top is<br>
>> - YYSSP.<br>
>> -<br>
>> - Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is<br>
>> - not large enough to hold the message. In that case, also set<br>
>> - *YYMSG_ALLOC to the required number of bytes. Return 2 if the<br>
>> - required number of bytes is too large to store. */<br>
>> -static int<br>
>> -yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,<br>
>> - yytype_int16 *yyssp, int yytoken)<br>
>> -{<br>
>> - YYSIZE_T yysize0 = yytnamerr (YY_NULL, yytname[yytoken]);<br>
>> - YYSIZE_T yysize = yysize0;<br>
>> - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };<br>
>> - /* Internationalized format string. */<br>
>> - const char *yyformat = YY_NULL;<br>
>> - /* Arguments of yyformat. */<br>
>> - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];<br>
>> - /* Number of reported tokens (one for the "unexpected", one per<br>
>> - "expected"). */<br>
>> - int yycount = 0;<br>
>> -<br>
>> - /* There are many possibilities here to consider:<br>
>> - - Assume YYFAIL is not used. It's too flawed to consider. See<br>
>> - <<a href="http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html">http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html</a>><br>
>> - for details. YYERROR is fine as it does not invoke this<br>
>> - function.<br>
>> - - If this state is a consistent state with a default action, then<br>
>> - the only way this function was invoked is if the default action<br>
>> - is an error action. In that case, don't check for expected<br>
>> - tokens because there are none.<br>
>> - - The only way there can be no lookahead present (in yychar) is if<br>
>> - this state is a consistent state with a default action. Thus,<br>
>> - detecting the absence of a lookahead is sufficient to determine<br>
>> - that there is no unexpected or expected token to report. In that<br>
>> - case, just report a simple "syntax error".<br>
>> - - Don't assume there isn't a lookahead just because this state is a<br>
>> - consistent state with a default action. There might have been a<br>
>> - previous inconsistent state, consistent state with a non-default<br>
>> - action, or user semantic action that manipulated yychar.<br>
>> - - Of course, the expected token list depends on states to have<br>
>> - correct lookahead information, and it depends on the parser not<br>
>> - to perform extra reductions after fetching a lookahead from the<br>
>> - scanner and before detecting a syntax error. Thus, state merging<br>
>> - (from LALR or IELR) and default reductions corrupt the expected<br>
>> - token list. However, the list is correct for canonical LR with<br>
>> - one exception: it will still contain any token that will not be<br>
>> - accepted due to an error action in a later state.<br>
>> - */<br>
>> - if (yytoken != YYEMPTY)<br>
>> + if (yystack.s_base == NULL && yygrowstack(&yystack) == YYENOMEM) goto yyoverflow;<br>
>> + yystack.s_mark = yystack.s_base;<br>
>> + yystack.l_mark = yystack.l_base;<br>
>> + yystate = 0;<br>
>> + *yystack.s_mark = 0;<br>
>> +<br>
>> +yyloop:<br>
>> + if ((yyn = yydefred[yystate]) != 0) goto yyreduce;<br>
>> + if (yychar < 0)<br>
>> {<br>
>> - int yyn = yypact[*yyssp];<br>
>> - yyarg[yycount++] = yytname[yytoken];<br>
>> - if (!yypact_value_is_default (yyn))<br>
>> + if ((yychar = YYLEX) < 0) yychar = YYEOF;<br>
>> +#if YYDEBUG<br>
>> + if (yydebug)<br>
>> {<br>
>> - /* Start YYX at -YYN if negative to avoid negative indexes in<br>
>> - YYCHECK. In other words, skip the first -YYN actions for<br>
>> - this state because they are default actions. */<br>
>> - int yyxbegin = yyn < 0 ? -yyn : 0;<br>
>> - /* Stay within bounds of both yycheck and yytname. */<br>
>> - int yychecklim = YYLAST - yyn + 1;<br>
>> - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;<br>
>> - int yyx;<br>
>> -<br>
>> - for (yyx = yyxbegin; yyx < yyxend; ++yyx)<br>
>> - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR<br>
>> - && !yytable_value_is_error (yytable[yyx + yyn]))<br>
>> - {<br>
>> - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)<br>
>> - {<br>
>> - yycount = 1;<br>
>> - yysize = yysize0;<br>
>> - break;<br>
>> - }<br>
>> - yyarg[yycount++] = yytname[yyx];<br>
>> - {<br>
>> - YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULL, yytname[yyx]);<br>
>> - if (! (yysize <= yysize1<br>
>> - && yysize1 <= YYSTACK_ALLOC_MAXIMUM))<br>
>> - return 2;<br>
>> - yysize = yysize1;<br>
>> - }<br>
>> - }<br>
>> + yys = yyname[YYTRANSLATE(yychar)];<br>
>> + printf("%sdebug: state %d, reading %d (%s)\n",<br>
>> + YYPREFIX, yystate, yychar, yys);<br>
>> }<br>
>> +#endif<br>
>> }<br>
>> -<br>
>> - switch (yycount)<br>
>> - {<br>
>> -# define YYCASE_(N, S) \<br>
>> - case N: \<br>
>> - yyformat = S; \<br>
>> - break<br>
>> - YYCASE_(0, YY_("syntax error"));<br>
>> - YYCASE_(1, YY_("syntax error, unexpected %s"));<br>
>> - YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));<br>
>> - YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));<br>
>> - YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));<br>
>> - YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));<br>
>> -# undef YYCASE_<br>
>> - }<br>
>> -<br>
>> - {<br>
>> - YYSIZE_T yysize1 = yysize + yystrlen (yyformat);<br>
>> - if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))<br>
>> - return 2;<br>
>> - yysize = yysize1;<br>
>> - }<br>
>> -<br>
>> - if (*yymsg_alloc < yysize)<br>
>> + if ((yyn = yysindex[yystate]) && (yyn += yychar) >= 0 &&<br>
>> + yyn <= YYTABLESIZE && yycheck[yyn] == yychar)<br>
>> {<br>
>> - *yymsg_alloc = 2 * yysize;<br>
>> - if (! (yysize <= *yymsg_alloc<br>
>> - && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))<br>
>> - *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;<br>
>> - return 1;<br>
>> - }<br>
>> -<br>
>> - /* Avoid sprintf, as that infringes on the user's name space.<br>
>> - Don't have undefined behavior even if the translation<br>
>> - produced a string with the wrong number of "%s"s. */<br>
>> - {<br>
>> - char *yyp = *yymsg;<br>
>> - int yyi = 0;<br>
>> - while ((*yyp = *yyformat) != '\0')<br>
>> - if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)<br>
>> - {<br>
>> - yyp += yytnamerr (yyp, yyarg[yyi++]);<br>
>> - yyformat += 2;<br>
>> - }<br>
>> - else<br>
>> +#if YYDEBUG<br>
>> + if (yydebug)<br>
>> + printf("%sdebug: state %d, shifting to state %d\n",<br>
>> + YYPREFIX, yystate, yytable[yyn]);<br>
>> +#endif<br>
>> + if (yystack.s_mark >= yystack.s_last && yygrowstack(&yystack) == YYENOMEM)<br>
>> {<br>
>> - yyp++;<br>
>> - yyformat++;<br>
>> + goto yyoverflow;<br>
>> }<br>
>> - }<br>
>> - return 0;<br>
>> -}<br>
>> -#endif /* YYERROR_VERBOSE */<br>
>> -<br>
>> -/*-----------------------------------------------.<br>
>> -| Release the memory associated to this symbol. |<br>
>> -`-----------------------------------------------*/<br>
>> -<br>
>> -/*ARGSUSED*/<br>
>> -#if (defined __STDC__ || defined __C99__FUNC__ \<br>
>> - || defined __cplusplus || defined _<br>
><br>
> ...</p>