From 34576298d8cf7bbb599eb1cfc7e5c9290aaa5c43 Mon Sep 17 00:00:00 2001 From: michael Date: Mon, 22 Dec 2014 14:36:44 +0000 Subject: [PATCH] - config_parser.y: removed invalid redeclaration of PROTOCOLTYPE git-svn-id: svn://svn.ircd-hybrid.org/svnroot/hopm/trunk@5067 82007160-df01-0410-b94d-b575c5fd34c7 --- src/config-lexer.c | 415 +++++---- src/config-parser.c | 2066 ++++++++++++++++++++----------------------- src/config-parser.h | 186 ++-- src/config-parser.y | 1 - 4 files changed, 1338 insertions(+), 1330 deletions(-) diff --git a/src/config-lexer.c b/src/config-lexer.c index 610bd8c..dbb2142 100644 --- a/src/config-lexer.c +++ b/src/config-lexer.c @@ -8,7 +8,7 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 33 +#define YY_FLEX_SUBMINOR_VERSION 39 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -30,7 +30,7 @@ /* C99 systems have . Non-C99 systems may or may not. */ -#if __STDC_VERSION__ >= 199901L +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. @@ -53,7 +53,6 @@ typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; -#endif /* ! C99 */ /* Limits of integral types. */ #ifndef INT8_MIN @@ -84,6 +83,8 @@ typedef unsigned int flex_uint32_t; #define UINT32_MAX (4294967295U) #endif +#endif /* ! C99 */ + #endif /* ! FLEXINT_H */ #ifdef __cplusplus @@ -93,11 +94,12 @@ typedef unsigned int flex_uint32_t; #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST @@ -151,7 +153,12 @@ typedef unsigned int flex_uint32_t; typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif -extern int yyleng; +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + +extern yy_size_t yyleng; extern FILE *yyin, *yyout; @@ -160,6 +167,7 @@ extern FILE *yyin, *yyout; #define EOB_ACT_LAST_MATCH 2 #define YY_LESS_LINENO(n) + #define YY_LINENO_REWIND_TO(ptr) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -177,16 +185,6 @@ extern FILE *yyin, *yyout; #define unput(c) yyunput( c, (yytext_ptr) ) -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ - -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef unsigned int yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -204,7 +202,7 @@ struct yy_buffer_state /* Number of characters read into yy_ch_buf, not including EOB * characters. */ - int yy_n_chars; + yy_size_t yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to @@ -274,8 +272,8 @@ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; -static int yy_n_chars; /* number of characters read into yy_ch_buf */ -int yyleng; +static yy_size_t yy_n_chars; /* number of characters read into yy_ch_buf */ +yy_size_t yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; @@ -303,7 +301,7 @@ static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); -YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,yy_size_t len ); void *yyalloc (yy_size_t ); void *yyrealloc (void *,yy_size_t ); @@ -404,10 +402,10 @@ static yyconst flex_int16_t yy_accept[284] = 52, 0, 0, 0, 38, 49, 50, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 29, 30, 0, 0, 35, 36, - 0, 0, 42, 0, 51, 0, 0, 0, 0, 0, - 11, 48, 19, 22, 24, 28, 32, 33, 37, 0, + 0, 0, 42, 0, 51, 0, 0, 0, 0, 11, + 0, 48, 19, 22, 24, 28, 32, 33, 37, 0, 0, 0, 45, 0, 6, 8, 0, 0, 39, 0, - 0, 0, 0, 10, 0, 0, 5, 9, 40, 0, + 0, 0, 10, 0, 0, 0, 5, 9, 40, 0, 0, 41, 0 } ; @@ -419,14 +417,14 @@ static yyconst flex_int32_t yy_ec[256] = 1, 2, 1, 4, 5, 1, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 7, 8, 8, 8, 8, 9, 10, 8, 8, 8, 8, 1, 1, 1, - 1, 1, 1, 1, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 1, 21, 22, 23, 24, 25, 26, - 1, 27, 28, 29, 30, 31, 32, 33, 34, 1, - 1, 1, 1, 1, 11, 1, 12, 13, 14, 15, - - 16, 17, 18, 19, 20, 1, 21, 22, 23, 24, - 25, 26, 1, 27, 28, 29, 30, 31, 32, 33, - 34, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 11, 12, 13, 14, 15, 16, + 17, 18, 19, 1, 20, 21, 22, 23, 24, 25, + 1, 26, 27, 28, 29, 30, 31, 32, 33, 1, + 1, 1, 1, 1, 34, 1, 35, 36, 37, 38, + + 39, 40, 41, 42, 43, 1, 44, 45, 46, 47, + 48, 49, 1, 50, 51, 52, 53, 54, 55, 56, + 57, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -443,47 +441,49 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[35] = +static yyconst flex_int32_t yy_meta[58] = { 0, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int16_t yy_base[287] = { 0, - 0, 0, 297, 298, 294, 0, 32, 0, 289, 29, - 262, 28, 22, 269, 259, 30, 262, 19, 32, 32, - 39, 32, 49, 37, 52, 51, 262, 270, 268, 271, - 284, 0, 69, 298, 0, 298, 71, 273, 260, 271, - 270, 257, 252, 263, 256, 298, 248, 245, 261, 240, - 253, 42, 257, 248, 252, 255, 298, 251, 298, 66, - 239, 239, 250, 237, 238, 71, 232, 249, 60, 246, - 232, 235, 227, 230, 239, 229, 229, 224, 217, 239, - 235, 224, 223, 75, 223, 217, 218, 223, 298, 298, - 218, 220, 229, 223, 222, 223, 215, 298, 208, 298, - - 214, 205, 215, 214, 201, 200, 206, 205, 197, 201, - 209, 192, 201, 203, 204, 203, 202, 190, 188, 197, - 298, 298, 184, 192, 188, 184, 193, 187, 182, 191, - 180, 176, 188, 298, 176, 298, 298, 190, 173, 298, - 175, 167, 173, 177, 298, 171, 171, 160, 177, 68, - 169, 175, 162, 173, 163, 298, 298, 163, 157, 173, - 160, 161, 166, 165, 165, 168, 149, 298, 152, 160, - 298, 159, 160, 157, 148, 146, 143, 147, 154, 155, - 298, 139, 140, 148, 151, 135, 84, 132, 130, 147, - 298, 129, 136, 136, 133, 136, 131, 74, 298, 124, - - 298, 139, 131, 122, 120, 120, 123, 129, 119, 120, - 298, 124, 114, 120, 298, 298, 298, 128, 109, 114, - 120, 111, 106, 298, 117, 112, 104, 105, 100, 113, - 111, 95, 298, 110, 298, 298, 102, 107, 298, 298, - 100, 76, 298, 105, 298, 95, 90, 85, 94, 91, - 298, 298, 298, 298, 298, 298, 298, 298, 298, 89, - 89, 84, 298, 80, 298, 298, 91, 87, 298, 82, - 81, 83, 72, 298, 71, 79, 298, 298, 298, 74, - 49, 298, 298, 59, 104, 51 + 0, 0, 497, 568, 493, 0, 55, 0, 239, 52, + 32, 53, 47, 43, 35, 58, 40, 47, 60, 89, + 91, 91, 130, 88, 96, 131, 50, 62, 65, 104, + 130, 0, 75, 568, 0, 568, 113, 117, 106, 135, + 136, 125, 124, 140, 137, 568, 131, 130, 148, 129, + 144, 162, 153, 146, 159, 164, 568, 174, 568, 180, + 166, 170, 183, 172, 175, 199, 174, 193, 183, 192, + 181, 189, 183, 190, 201, 201, 214, 211, 208, 91, + 229, 220, 221, 235, 224, 223, 226, 233, 568, 568, + 230, 234, 84, 240, 241, 244, 238, 568, 233, 568, + + 241, 236, 248, 256, 245, 257, 265, 268, 262, 268, + 278, 263, 274, 278, 283, 284, 285, 275, 275, 286, + 568, 568, 275, 285, 283, 281, 287, 295, 287, 305, + 296, 305, 319, 568, 311, 568, 568, 327, 312, 568, + 316, 310, 318, 324, 568, 322, 324, 315, 334, 329, + 329, 338, 327, 340, 332, 568, 568, 336, 332, 357, + 346, 360, 367, 370, 83, 372, 359, 568, 364, 374, + 568, 375, 378, 379, 372, 372, 371, 377, 386, 389, + 568, 375, 378, 388, 393, 381, 73, 380, 387, 406, + 568, 401, 410, 414, 413, 418, 420, 416, 568, 411, + + 568, 428, 424, 417, 417, 419, 424, 432, 425, 428, + 568, 434, 426, 436, 568, 568, 568, 52, 428, 442, + 450, 454, 451, 568, 466, 456, 459, 465, 457, 472, + 472, 460, 568, 477, 568, 568, 471, 478, 568, 568, + 473, 494, 568, 481, 568, 474, 471, 468, 479, 568, + 482, 568, 568, 568, 568, 568, 568, 568, 568, 487, + 501, 498, 568, 498, 568, 568, 508, 512, 568, 506, + 507, 511, 568, 507, 510, 520, 568, 568, 568, 517, + 524, 568, 568, 84, 565, 75 } ; static yyconst flex_int16_t yy_def[287] = @@ -521,86 +521,150 @@ static yyconst flex_int16_t yy_def[287] = 283, 283, 0, 283, 283, 283 } ; -static yyconst flex_int16_t yy_nxt[333] = +static yyconst flex_int16_t yy_nxt[626] = { 0, 4, 5, 6, 7, 8, 4, 9, 10, 10, 10, - 4, 11, 12, 13, 14, 15, 16, 4, 17, 18, - 19, 4, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 4, 30, 34, 34, 37, 37, 37, 39, - 41, 45, 48, 52, 46, 49, 42, 50, 58, 40, - 54, 35, 66, 51, 55, 59, 53, 60, 56, 32, - 61, 67, 71, 57, 62, 68, 282, 69, 63, 92, - 72, 34, 34, 64, 93, 65, 70, 73, 37, 37, - 37, 99, 107, 111, 74, 127, 112, 128, 100, 183, - 227, 184, 216, 217, 101, 260, 108, 281, 280, 279, - - 278, 261, 228, 262, 33, 33, 277, 276, 275, 274, - 273, 272, 271, 270, 269, 268, 267, 266, 265, 264, - 263, 259, 258, 257, 256, 255, 254, 253, 252, 251, - 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, - 240, 239, 238, 237, 236, 235, 234, 233, 232, 231, - 230, 229, 226, 225, 224, 223, 222, 221, 220, 219, - 218, 215, 214, 213, 212, 211, 210, 209, 208, 207, - 206, 205, 204, 203, 202, 201, 200, 199, 198, 197, - 196, 195, 194, 193, 192, 191, 190, 189, 188, 187, - 186, 185, 182, 181, 180, 179, 178, 177, 176, 175, - - 174, 173, 172, 171, 170, 169, 168, 167, 166, 165, - 164, 163, 162, 161, 160, 159, 158, 157, 156, 155, - 154, 153, 152, 151, 150, 149, 148, 147, 146, 145, - 144, 143, 142, 141, 140, 139, 138, 137, 136, 135, - 134, 133, 132, 131, 130, 129, 126, 125, 124, 123, - 122, 121, 120, 119, 118, 117, 116, 115, 114, 113, - 110, 109, 106, 105, 104, 103, 102, 98, 97, 96, - 95, 94, 91, 90, 89, 88, 87, 86, 85, 84, - 83, 82, 81, 80, 79, 31, 78, 77, 76, 75, - 47, 44, 43, 38, 36, 31, 283, 3, 283, 283, - + 11, 12, 13, 14, 15, 16, 4, 17, 18, 19, + 4, 20, 21, 22, 23, 24, 25, 26, 27, 28, + 29, 4, 30, 4, 11, 12, 13, 14, 15, 16, + 4, 17, 18, 19, 4, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 4, 30, 34, 34, 37, + 37, 37, 38, 39, 41, 43, 44, 47, 45, 48, + 42, 46, 49, 40, 50, 35, 75, 34, 34, 76, + 51, 216, 217, 77, 32, 242, 38, 39, 41, 43, + 44, 47, 45, 48, 42, 46, 49, 40, 50, 52, + + 75, 54, 66, 76, 51, 55, 58, 77, 68, 56, + 69, 67, 53, 59, 57, 60, 197, 135, 78, 70, + 37, 37, 37, 52, 123, 54, 66, 79, 80, 55, + 58, 31, 68, 56, 69, 67, 53, 59, 57, 60, + 61, 71, 78, 70, 62, 81, 82, 83, 63, 72, + 84, 79, 80, 64, 85, 65, 73, 86, 87, 88, + 89, 90, 91, 74, 61, 71, 94, 95, 62, 81, + 82, 83, 63, 72, 84, 96, 97, 64, 85, 65, + 73, 86, 87, 88, 89, 90, 91, 74, 92, 98, + 94, 95, 102, 93, 99, 103, 104, 105, 106, 96, + + 97, 100, 109, 110, 113, 111, 114, 101, 112, 107, + 115, 116, 92, 98, 117, 118, 102, 93, 99, 103, + 104, 105, 106, 108, 119, 100, 109, 110, 113, 111, + 114, 101, 112, 107, 115, 116, 120, 121, 117, 118, + 122, 124, 125, 126, 36, 129, 127, 108, 119, 130, + 131, 132, 133, 134, 136, 137, 138, 139, 140, 141, + 120, 121, 142, 143, 122, 124, 125, 126, 128, 129, + 127, 144, 145, 130, 131, 132, 133, 134, 136, 137, + 138, 139, 140, 141, 146, 147, 142, 143, 148, 149, + 150, 151, 152, 153, 154, 144, 145, 155, 156, 157, + + 158, 159, 160, 161, 162, 163, 164, 165, 146, 147, + 166, 167, 148, 149, 150, 151, 152, 153, 154, 168, + 169, 155, 156, 157, 158, 159, 160, 161, 162, 163, + 164, 165, 170, 171, 166, 167, 172, 173, 174, 175, + 176, 177, 178, 168, 169, 179, 180, 181, 182, 183, + 185, 184, 186, 187, 188, 189, 170, 171, 190, 191, + 172, 173, 174, 175, 176, 177, 178, 192, 193, 179, + 180, 181, 182, 183, 185, 184, 186, 187, 188, 189, + 194, 195, 190, 191, 196, 198, 199, 200, 201, 202, + 203, 192, 193, 204, 205, 206, 207, 208, 209, 210, + + 211, 212, 213, 214, 194, 195, 215, 218, 196, 198, + 199, 200, 201, 202, 203, 219, 220, 204, 205, 206, + 207, 208, 209, 210, 211, 212, 213, 214, 221, 222, + 215, 218, 223, 224, 225, 226, 228, 229, 230, 219, + 220, 231, 232, 233, 234, 235, 236, 227, 237, 238, + 239, 240, 221, 222, 241, 243, 223, 224, 225, 226, + 228, 229, 230, 244, 245, 231, 232, 233, 234, 235, + 236, 227, 237, 238, 239, 240, 246, 247, 241, 243, + 248, 249, 250, 251, 252, 253, 254, 244, 245, 255, + 256, 257, 258, 259, 31, 263, 283, 264, 265, 266, + + 246, 247, 267, 268, 248, 249, 250, 251, 252, 253, + 254, 269, 260, 255, 256, 257, 258, 259, 261, 263, + 262, 264, 265, 266, 270, 271, 267, 268, 272, 273, + 274, 275, 276, 277, 278, 269, 260, 279, 280, 281, + 282, 283, 261, 283, 262, 283, 283, 283, 270, 271, + 283, 283, 272, 273, 274, 275, 276, 277, 278, 283, + 283, 279, 280, 281, 282, 33, 33, 3, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283 + + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283 } ; -static yyconst flex_int16_t yy_chk[333] = +static yyconst flex_int16_t yy_chk[626] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 7, 7, 10, 10, 10, 12, - 13, 16, 18, 20, 16, 18, 13, 19, 22, 12, - 21, 286, 24, 19, 21, 22, 20, 22, 21, 284, - 23, 24, 26, 21, 23, 25, 281, 25, 23, 52, - 26, 33, 33, 23, 52, 23, 25, 26, 37, 37, - 37, 60, 66, 69, 26, 84, 69, 84, 60, 150, - 198, 150, 187, 187, 60, 242, 66, 280, 276, 275, - - 273, 242, 198, 242, 285, 285, 272, 271, 270, 268, - 267, 264, 262, 261, 260, 250, 249, 248, 247, 246, - 244, 241, 238, 237, 234, 232, 231, 230, 229, 228, - 227, 226, 225, 223, 222, 221, 220, 219, 218, 214, - 213, 212, 210, 209, 208, 207, 206, 205, 204, 203, - 202, 200, 197, 196, 195, 194, 193, 192, 190, 189, - 188, 186, 185, 184, 183, 182, 180, 179, 178, 177, - 176, 175, 174, 173, 172, 170, 169, 167, 166, 165, - 164, 163, 162, 161, 160, 159, 158, 155, 154, 153, - 152, 151, 149, 148, 147, 146, 144, 143, 142, 141, - - 139, 138, 135, 133, 132, 131, 130, 129, 128, 127, - 126, 125, 124, 123, 120, 119, 118, 117, 116, 115, - 114, 113, 112, 111, 110, 109, 108, 107, 106, 105, - 104, 103, 102, 101, 99, 97, 96, 95, 94, 93, - 92, 91, 88, 87, 86, 85, 83, 82, 81, 80, - 79, 78, 77, 76, 75, 74, 73, 72, 71, 70, - 68, 67, 65, 64, 63, 62, 61, 58, 56, 55, - 54, 53, 51, 50, 49, 48, 47, 45, 44, 43, - 42, 41, 40, 39, 38, 31, 30, 29, 28, 27, - 17, 15, 14, 11, 9, 5, 3, 283, 283, 283, - + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 7, 7, 10, + 10, 10, 11, 12, 13, 14, 15, 17, 16, 18, + 13, 16, 18, 12, 19, 286, 27, 33, 33, 28, + 19, 187, 187, 29, 284, 218, 11, 12, 13, 14, + 15, 17, 16, 18, 13, 16, 18, 12, 19, 20, + + 27, 21, 24, 28, 19, 21, 22, 29, 25, 21, + 25, 24, 20, 22, 21, 22, 165, 93, 30, 25, + 37, 37, 37, 20, 80, 21, 24, 38, 39, 21, + 22, 31, 25, 21, 25, 24, 20, 22, 21, 22, + 23, 26, 30, 25, 23, 40, 41, 42, 23, 26, + 43, 38, 39, 23, 44, 23, 26, 45, 47, 48, + 49, 50, 51, 26, 23, 26, 53, 54, 23, 40, + 41, 42, 23, 26, 43, 55, 56, 23, 44, 23, + 26, 45, 47, 48, 49, 50, 51, 26, 52, 58, + 53, 54, 61, 52, 60, 62, 63, 64, 65, 55, + + 56, 60, 67, 68, 70, 69, 71, 60, 69, 66, + 72, 73, 52, 58, 74, 75, 61, 52, 60, 62, + 63, 64, 65, 66, 76, 60, 67, 68, 70, 69, + 71, 60, 69, 66, 72, 73, 77, 78, 74, 75, + 79, 81, 82, 83, 9, 85, 84, 66, 76, 86, + 87, 88, 91, 92, 94, 95, 96, 97, 99, 101, + 77, 78, 102, 103, 79, 81, 82, 83, 84, 85, + 84, 104, 105, 86, 87, 88, 91, 92, 94, 95, + 96, 97, 99, 101, 106, 107, 102, 103, 108, 109, + 110, 111, 112, 113, 114, 104, 105, 115, 116, 117, + + 118, 119, 120, 123, 124, 125, 126, 127, 106, 107, + 128, 129, 108, 109, 110, 111, 112, 113, 114, 130, + 131, 115, 116, 117, 118, 119, 120, 123, 124, 125, + 126, 127, 132, 133, 128, 129, 135, 138, 139, 141, + 142, 143, 144, 130, 131, 146, 147, 148, 149, 150, + 151, 150, 152, 153, 154, 155, 132, 133, 158, 159, + 135, 138, 139, 141, 142, 143, 144, 160, 161, 146, + 147, 148, 149, 150, 151, 150, 152, 153, 154, 155, + 162, 163, 158, 159, 164, 166, 167, 169, 170, 172, + 173, 160, 161, 174, 175, 176, 177, 178, 179, 180, + + 182, 183, 184, 185, 162, 163, 186, 188, 164, 166, + 167, 169, 170, 172, 173, 189, 190, 174, 175, 176, + 177, 178, 179, 180, 182, 183, 184, 185, 192, 193, + 186, 188, 194, 195, 196, 197, 198, 200, 202, 189, + 190, 203, 204, 205, 206, 207, 208, 197, 209, 210, + 212, 213, 192, 193, 214, 219, 194, 195, 196, 197, + 198, 200, 202, 220, 221, 203, 204, 205, 206, 207, + 208, 197, 209, 210, 212, 213, 222, 223, 214, 219, + 225, 226, 227, 228, 229, 230, 231, 220, 221, 232, + 234, 237, 238, 241, 5, 244, 3, 246, 247, 248, + + 222, 223, 249, 251, 225, 226, 227, 228, 229, 230, + 231, 260, 242, 232, 234, 237, 238, 241, 242, 244, + 242, 246, 247, 248, 261, 262, 249, 251, 264, 267, + 268, 270, 271, 272, 274, 260, 242, 275, 276, 280, + 281, 0, 242, 0, 242, 0, 0, 0, 261, 262, + 0, 0, 264, 267, 268, 270, 271, 272, 274, 0, + 0, 275, 276, 280, 281, 285, 285, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, + 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, 283, - 283, 283 + 283, 283, 283, 283, 283 } ; static yy_state_type yy_last_accepting_state; @@ -658,7 +722,7 @@ void hashcomment(void); int linenum = 1; char linebuf[512]; -#line 662 "config-lexer.c" +#line 726 "config-lexer.c" #define INITIAL 0 @@ -676,6 +740,35 @@ char linebuf[512]; static int yy_init_globals (void ); +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +yy_size_t yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); + /* Macros after this point can all be overridden by user definitions in * section 1. */ @@ -716,7 +809,7 @@ static int input (void ); /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -809,11 +902,6 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 50 "config-lexer.l" - - -#line 816 "config-lexer.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -840,6 +928,12 @@ YY_DECL yy_load_buffer_state( ); } + { +#line 50 "config-lexer.l" + + +#line 936 "config-lexer.c" + while ( 1 ) /* loops until end-of-file is reached */ { (yy_more_len) = 0; @@ -862,7 +956,7 @@ YY_DECL yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -877,7 +971,7 @@ yy_match: yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_base[yy_current_state] != 298 ); + while ( yy_base[yy_current_state] != 568 ); yy_find_action: yy_act = yy_accept[yy_current_state]; @@ -1298,7 +1392,7 @@ YY_RULE_SETUP #line 222 "config-lexer.l" ECHO; YY_BREAK -#line 1302 "config-lexer.c" +#line 1396 "config-lexer.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1429,6 +1523,7 @@ case YY_STATE_EOF(INITIAL): "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1484,21 +1579,21 @@ static int yy_get_next_buffer (void) else { - int num_to_read = + yy_size_t num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { - int new_size = b->yy_buf_size * 2; + yy_size_t new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; @@ -1553,6 +1648,14 @@ static int yy_get_next_buffer (void) else ret_val = EOB_ACT_CONTINUE_SCAN; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } + (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; @@ -1616,7 +1719,7 @@ static int yy_get_next_buffer (void) yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 283); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } #ifndef YY_NO_INPUT @@ -1643,7 +1746,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (yy_c_buf_p) - (yytext_ptr); + yy_size_t offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -1803,10 +1906,6 @@ static void yy_load_buffer_state (void) yyfree((void *) b ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -1919,7 +2018,7 @@ void yypop_buffer_state (void) */ static void yyensure_buffer_stack (void) { - int num_to_alloc; + yy_size_t num_to_alloc; if (!(yy_buffer_stack)) { @@ -1931,7 +2030,9 @@ static void yyensure_buffer_stack (void) (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); - + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; @@ -1949,6 +2050,8 @@ static void yyensure_buffer_stack (void) ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); @@ -2007,17 +2110,17 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) /** Setup the input buffer state to scan the given bytes. The next call to yylex() will * scan from a @e copy of @a bytes. - * @param bytes the byte buffer to scan - * @param len the number of bytes in the buffer pointed to by @a bytes. + * @param yybytes the byte buffer to scan + * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ -YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, yy_size_t _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; @@ -2099,7 +2202,7 @@ FILE *yyget_out (void) /** Get the length of the current token. * */ -int yyget_leng (void) +yy_size_t yyget_leng (void) { return yyleng; } diff --git a/src/config-parser.c b/src/config-parser.c index 4e6b3e9..6235a05 100644 --- a/src/config-parser.c +++ b/src/config-parser.c @@ -1,14 +1,13 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ -/* Skeleton implementation for Bison's Yacc-like parsers in C +/* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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 2, or (at your option) - any later version. + 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 @@ -16,9 +15,7 @@ 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -47,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "2.3" +#define YYBISON_VERSION "3.0.2" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -55,64 +52,109 @@ /* Pure parsers. */ #define YYPURE 0 -/* Using locations. */ -#define YYLSP_NEEDED 0 +/* Push parsers. */ +#define YYPUSH 0 +/* Pull parsers. */ +#define YYPULL 1 -/* Tokens. */ + + +/* Copy the first part of user declarations. */ +#line 25 "config-parser.y" /* yacc.c:339 */ + +#include +#include +#include "malloc.h" +#include "config.h" + +int yydebug=0; +void *tmp; /* Variable to temporarily hold nodes before insertion to list */ + + +#line 77 "config-parser.c" /* yacc.c:339 */ + +# ifndef YY_NULLPTR +# if defined __cplusplus && 201103L <= __cplusplus +# define YY_NULLPTR nullptr +# else +# define YY_NULLPTR 0 +# endif +# endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* In a future release of Bison, this section will be replaced + by #include "y.tab.h". */ +#ifndef YY_YY_CONFIG_PARSER_H_INCLUDED +# define YY_YY_CONFIG_PARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - AWAY = 258, - BAN_UNKNOWN = 259, - BLACKLIST = 260, - CHANNEL = 261, - CONNREGEX = 262, - DNS_FDLIMIT = 263, - DNSBL_FROM = 264, - DNSBL_TO = 265, - EXEMPT = 266, - FD = 267, - INVITE = 268, - IRC = 269, - KLINE = 270, - KEY = 271, - MASK = 272, - MAX_READ = 273, - MODE = 274, - NAME = 275, - NEGCACHE = 276, - NICK = 277, - NICKSERV = 278, - OPER = 279, - OPM = 280, - OPTIONS = 281, - PASSWORD = 282, - PERFORM = 283, - PIDFILE = 284, - PORT = 285, - PROTOCOL = 286, - PROTOCOLTYPE = 287, - REALNAME = 288, - REPLY = 289, - SCANLOG = 290, - SCANNER = 291, - SENDMAIL = 292, - SERVER = 293, - TARGET_IP = 294, - TARGET_PORT = 295, - TARGET_STRING = 296, - TIMEOUT = 297, - TYPE = 298, - USERNAME = 299, - USER = 300, - VHOST = 301, - NUMBER = 302, - STRING = 303 - }; + enum yytokentype + { + AWAY = 258, + BAN_UNKNOWN = 259, + BLACKLIST = 260, + CHANNEL = 261, + CONNREGEX = 262, + DNS_FDLIMIT = 263, + DNSBL_FROM = 264, + DNSBL_TO = 265, + EXEMPT = 266, + FD = 267, + INVITE = 268, + IRC = 269, + KLINE = 270, + KEY = 271, + MASK = 272, + MAX_READ = 273, + MODE = 274, + NAME = 275, + NEGCACHE = 276, + NICK = 277, + NICKSERV = 278, + OPER = 279, + OPM = 280, + OPTIONS = 281, + PASSWORD = 282, + PERFORM = 283, + PIDFILE = 284, + PORT = 285, + PROTOCOL = 286, + REALNAME = 287, + REPLY = 288, + SCANLOG = 289, + SCANNER = 290, + SENDMAIL = 291, + SERVER = 292, + TARGET_IP = 293, + TARGET_PORT = 294, + TARGET_STRING = 295, + TIMEOUT = 296, + TYPE = 297, + USERNAME = 298, + USER = 299, + VHOST = 300, + NUMBER = 301, + STRING = 302, + PROTOCOLTYPE = 303 + }; #endif /* Tokens. */ #define AWAY 258 @@ -144,80 +186,50 @@ #define PIDFILE 284 #define PORT 285 #define PROTOCOL 286 -#define PROTOCOLTYPE 287 -#define REALNAME 288 -#define REPLY 289 -#define SCANLOG 290 -#define SCANNER 291 -#define SENDMAIL 292 -#define SERVER 293 -#define TARGET_IP 294 -#define TARGET_PORT 295 -#define TARGET_STRING 296 -#define TIMEOUT 297 -#define TYPE 298 -#define USERNAME 299 -#define USER 300 -#define VHOST 301 -#define NUMBER 302 -#define STRING 303 - - - - -/* Copy the first part of user declarations. */ -#line 25 "config-parser.y" - -#include -#include -#include "malloc.h" -#include "config.h" - -int yydebug=0; -void *tmp; /* Variable to temporarily hold nodes before insertion to list */ - - - -/* Enabling traces. */ -#ifndef YYDEBUG -# define YYDEBUG 0 -#endif - -/* Enabling verbose error messages. */ -#ifdef YYERROR_VERBOSE -# undef YYERROR_VERBOSE -# define YYERROR_VERBOSE 1 -#else -# define YYERROR_VERBOSE 0 -#endif - -/* Enabling the token table. */ -#ifndef YYTOKEN_TABLE -# define YYTOKEN_TABLE 0 -#endif - +#define REALNAME 287 +#define REPLY 288 +#define SCANLOG 289 +#define SCANNER 290 +#define SENDMAIL 291 +#define SERVER 292 +#define TARGET_IP 293 +#define TARGET_PORT 294 +#define TARGET_STRING 295 +#define TIMEOUT 296 +#define TYPE 297 +#define USERNAME 298 +#define USER 299 +#define VHOST 300 +#define NUMBER 301 +#define STRING 302 +#define PROTOCOLTYPE 303 + +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 82 "config-parser.y" +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { +#line 81 "config-parser.y" /* yacc.c:355 */ + int number; char *string; -} -/* Line 193 of yacc.c. */ -#line 208 "config-parser.c" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 + +#line 218 "config-parser.c" /* yacc.c:355 */ +}; # define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif +extern YYSTYPE yylval; -/* Copy the second part of user declarations. */ +int yyparse (void); + +#endif /* !YY_YY_CONFIG_PARSER_H_INCLUDED */ +/* Copy the second part of user declarations. */ -/* Line 216 of yacc.c. */ -#line 221 "config-parser.c" +#line 233 "config-parser.c" /* yacc.c:358 */ #ifdef short # undef short @@ -231,11 +243,8 @@ typedef unsigned char yytype_uint8; #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; -#elif (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -typedef signed char yytype_int8; #else -typedef short int yytype_int8; +typedef signed char yytype_int8; #endif #ifdef YYTYPE_UINT16 @@ -255,8 +264,7 @@ typedef short int yytype_int16; # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t -# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# elif ! defined YYSIZE_T # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else @@ -267,42 +275,71 @@ typedef short int yytype_int16; #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ -# if YYENABLE_NLS +# if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ -# define YY_(msgid) dgettext ("bison-runtime", msgid) +# define YY_(Msgid) dgettext ("bison-runtime", Msgid) # endif # endif # ifndef YY_ -# define YY_(msgid) msgid +# define YY_(Msgid) Msgid +# endif +#endif + +#ifndef YY_ATTRIBUTE +# if (defined __GNUC__ \ + && (2 < __GNUC__ || (__GNUC__ == 2 && 96 <= __GNUC_MINOR__))) \ + || defined __SUNPRO_C && 0x5110 <= __SUNPRO_C +# define YY_ATTRIBUTE(Spec) __attribute__(Spec) +# else +# define YY_ATTRIBUTE(Spec) /* empty */ +# endif +#endif + +#ifndef YY_ATTRIBUTE_PURE +# define YY_ATTRIBUTE_PURE YY_ATTRIBUTE ((__pure__)) +#endif + +#ifndef YY_ATTRIBUTE_UNUSED +# define YY_ATTRIBUTE_UNUSED YY_ATTRIBUTE ((__unused__)) +#endif + +#if !defined _Noreturn \ + && (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112) +# if defined _MSC_VER && 1200 <= _MSC_VER +# define _Noreturn __declspec (noreturn) +# else +# define _Noreturn YY_ATTRIBUTE ((__noreturn__)) # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ -# define YYUSE(e) ((void) (e)) +# define YYUSE(E) ((void) (E)) #else -# define YYUSE(e) /* empty */ +# define YYUSE(E) /* empty */ #endif -/* Identity function, used to suppress warnings about constant conditions. */ -#ifndef lint -# define YYID(n) (n) -#else -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -static int -YYID (int i) +#if defined __GNUC__ && 407 <= __GNUC__ * 100 + __GNUC_MINOR__ +/* Suppress an incorrect diagnostic about yylval being uninitialized. */ +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \ + _Pragma ("GCC diagnostic push") \ + _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"")\ + _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"") +# define YY_IGNORE_MAYBE_UNINITIALIZED_END \ + _Pragma ("GCC diagnostic pop") #else -static int -YYID (i) - int i; +# define YY_INITIAL_VALUE(Value) Value #endif -{ - return i; -} +#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN +# define YY_IGNORE_MAYBE_UNINITIALIZED_END +#endif +#ifndef YY_INITIAL_VALUE +# define YY_INITIAL_VALUE(Value) /* Nothing. */ #endif + #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ @@ -320,11 +357,11 @@ YYID (i) # define alloca _alloca # else # define YYSTACK_ALLOC alloca -# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 + /* Use EXIT_SUCCESS as a witness for stdlib.h. */ +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # endif @@ -332,8 +369,8 @@ YYID (i) # endif # ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) + /* Pacify GCC's 'empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely @@ -347,25 +384,23 @@ YYID (i) # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif -# if (defined __cplusplus && ! defined _STDLIB_H \ +# if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ - && (defined YYFREE || defined free))) + && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ -# ifndef _STDLIB_H -# define _STDLIB_H 1 +# ifndef EXIT_SUCCESS +# define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc -# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined malloc && ! defined EXIT_SUCCESS void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free -# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +# if ! defined free && ! defined EXIT_SUCCESS void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif @@ -375,14 +410,14 @@ void free (void *); /* INFRINGES ON USER NAME SPACE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ - || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { - yytype_int16 yyss; - YYSTYPE yyvs; - }; + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) @@ -393,46 +428,50 @@ union yyalloc ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) -/* Copy COUNT objects from FROM to TO. The source and destination do - not overlap. */ -# ifndef YYCOPY -# if defined __GNUC__ && 1 < __GNUC__ -# define YYCOPY(To, From, Count) \ - __builtin_memcpy (To, From, (Count) * sizeof (*(From))) -# else -# define YYCOPY(To, From, Count) \ - do \ - { \ - YYSIZE_T yyi; \ - for (yyi = 0; yyi < (Count); yyi++) \ - (To)[yyi] = (From)[yyi]; \ - } \ - while (YYID (0)) -# endif -# endif +# define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ -# define YYSTACK_RELOCATE(Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - YYCOPY (&yyptr->Stack, Stack, yysize); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (YYID (0)) +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (0) #endif +#if defined YYCOPY_NEEDED && YYCOPY_NEEDED +/* Copy COUNT objects from SRC to DST. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(Dst, Src, Count) \ + __builtin_memcpy (Dst, Src, (Count) * sizeof (*(Src))) +# else +# define YYCOPY(Dst, Src, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (Dst)[yyi] = (Src)[yyi]; \ + } \ + while (0) +# endif +# endif +#endif /* !YYCOPY_NEEDED */ + /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 281 +#define YYLAST 282 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 54 @@ -440,17 +479,19 @@ union yyalloc #define YYNNTS 74 /* YYNRULES -- Number of rules. */ #define YYNRULES 136 -/* YYNRULES -- Number of states. */ +/* YYNSTATES -- Number of states. */ #define YYNSTATES 293 -/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[YYX] -- Symbol number corresponding to YYX as returned + by yylex, with out-of-bounds checking. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 303 -#define YYTRANSLATE(YYX) \ +#define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) -/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM + as returned by yylex, without out-of-bounds checking. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -487,96 +528,27 @@ static const yytype_uint8 yytranslate[] = }; #if YYDEBUG -/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in - YYRHS. */ -static const yytype_uint16 yyprhs[] = -{ - 0, 0, 3, 4, 7, 9, 11, 13, 15, 17, - 19, 25, 26, 29, 31, 33, 35, 37, 39, 41, - 46, 51, 56, 61, 67, 70, 72, 74, 76, 78, - 80, 82, 84, 86, 88, 90, 92, 94, 96, 98, - 100, 102, 104, 109, 114, 119, 124, 129, 134, 139, - 144, 149, 154, 159, 164, 169, 174, 175, 182, 185, - 187, 189, 191, 193, 198, 203, 208, 209, 216, 219, - 221, 223, 225, 227, 232, 237, 238, 245, 248, 250, - 252, 254, 256, 258, 260, 262, 264, 266, 268, 270, - 275, 280, 285, 290, 295, 300, 305, 310, 317, 323, - 324, 327, 329, 331, 333, 335, 337, 339, 344, 349, - 354, 355, 362, 363, 366, 368, 370, 372, 374, 376, - 378, 380, 385, 390, 395, 400, 406, 407, 410, 412, - 417, 423, 424, 427, 429, 431, 433 -}; - -/* YYRHS -- A `-1'-separated list of the rules' RHS. */ -static const yytype_int8 yyrhs[] = -{ - 55, 0, -1, -1, 55, 56, -1, 64, -1, 57, - -1, 107, -1, 88, -1, 94, -1, 124, -1, 26, - 49, 58, 50, 51, -1, -1, 58, 59, -1, 59, - -1, 60, -1, 61, -1, 62, -1, 63, -1, 1, - -1, 21, 52, 47, 51, -1, 29, 52, 48, 51, - -1, 8, 52, 47, 51, -1, 35, 52, 48, 51, - -1, 14, 49, 65, 50, 51, -1, 65, 66, -1, - 66, -1, 67, -1, 80, -1, 68, -1, 70, -1, - 71, -1, 69, -1, 72, -1, 73, -1, 75, -1, - 76, -1, 77, -1, 78, -1, 79, -1, 74, -1, - 81, -1, 1, -1, 3, 52, 48, 51, -1, 15, - 52, 48, 51, -1, 19, 52, 48, 51, -1, 22, - 52, 48, 51, -1, 23, 52, 48, 51, -1, 24, - 52, 48, 51, -1, 27, 52, 48, 51, -1, 28, - 52, 48, 51, -1, 30, 52, 47, 51, -1, 33, - 52, 48, 51, -1, 38, 52, 48, 51, -1, 44, - 52, 48, 51, -1, 46, 52, 48, 51, -1, 7, - 52, 48, 51, -1, -1, 82, 6, 49, 83, 50, - 51, -1, 83, 84, -1, 84, -1, 85, -1, 86, - -1, 87, -1, 20, 52, 48, 51, -1, 16, 52, - 48, 51, -1, 13, 52, 48, 51, -1, -1, 89, - 45, 49, 90, 50, 51, -1, 90, 91, -1, 91, - -1, 92, -1, 93, -1, 1, -1, 17, 52, 48, - 51, -1, 36, 52, 48, 51, -1, -1, 95, 36, - 49, 96, 50, 51, -1, 96, 97, -1, 97, -1, - 98, -1, 99, -1, 102, -1, 100, -1, 103, -1, - 101, -1, 106, -1, 104, -1, 105, -1, 1, -1, - 20, 52, 48, 51, -1, 46, 52, 48, 51, -1, - 39, 52, 48, 51, -1, 41, 52, 48, 51, -1, - 12, 52, 47, 51, -1, 40, 52, 47, 51, -1, - 42, 52, 47, 51, -1, 18, 52, 47, 51, -1, - 31, 52, 32, 53, 47, 51, -1, 25, 49, 108, - 50, 51, -1, -1, 108, 109, -1, 109, -1, 110, - -1, 111, -1, 112, -1, 113, -1, 1, -1, 9, - 52, 48, 51, -1, 10, 52, 48, 51, -1, 37, - 52, 48, 51, -1, -1, 114, 5, 49, 115, 50, - 51, -1, -1, 115, 116, -1, 116, -1, 117, -1, - 119, -1, 118, -1, 120, -1, 121, -1, 1, -1, - 20, 52, 48, 51, -1, 15, 52, 48, 51, -1, - 43, 52, 48, 51, -1, 4, 52, 47, 51, -1, - 34, 49, 122, 50, 51, -1, -1, 122, 123, -1, - 123, -1, 47, 52, 48, 51, -1, 11, 49, 125, - 50, 51, -1, -1, 125, 126, -1, 126, -1, 127, - -1, 1, -1, 17, 52, 48, 51, -1 -}; - -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ + /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { - 0, 93, 93, 94, 97, 98, 99, 100, 101, 102, - 107, 109, 110, 111, 113, 114, 115, 116, 117, 119, - 124, 130, 135, 143, 145, 146, 148, 149, 150, 151, - 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, 165, 171, 177, 183, 189, 195, 201, 207, - 215, 220, 226, 232, 238, 244, 254, 254, 271, 272, - 274, 275, 276, 278, 286, 294, 305, 305, 321, 322, - 324, 325, 326, 328, 338, 351, 351, 396, 397, 399, - 400, 401, 402, 403, 404, 405, 406, 407, 408, 410, - 417, 424, 431, 447, 453, 459, 465, 471, 490, 492, - 493, 494, 496, 497, 498, 499, 500, 502, 508, 514, - 523, 523, 542, 543, 544, 546, 547, 548, 549, 550, - 551, 553, 560, 567, 578, 584, 586, 587, 588, 590, - 608, 610, 611, 612, 614, 615, 617 + 0, 92, 92, 93, 96, 97, 98, 99, 100, 101, + 106, 108, 109, 110, 112, 113, 114, 115, 116, 118, + 123, 129, 134, 142, 144, 145, 147, 148, 149, 150, + 151, 152, 153, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 164, 170, 176, 182, 188, 194, 200, 206, + 214, 219, 225, 231, 237, 243, 253, 253, 270, 271, + 273, 274, 275, 277, 285, 293, 304, 304, 320, 321, + 323, 324, 325, 327, 337, 350, 350, 395, 396, 398, + 399, 400, 401, 402, 403, 404, 405, 406, 407, 409, + 416, 423, 430, 446, 452, 458, 464, 470, 489, 491, + 492, 493, 495, 496, 497, 498, 499, 501, 507, 513, + 522, 522, 541, 542, 543, 545, 546, 547, 548, 549, + 550, 552, 559, 566, 577, 583, 585, 586, 587, 589, + 607, 609, 610, 611, 613, 614, 616 }; #endif -#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +#if YYDEBUG || YYERROR_VERBOSE || 0 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = @@ -585,34 +557,34 @@ static const char *const yytname[] = "CHANNEL", "CONNREGEX", "DNS_FDLIMIT", "DNSBL_FROM", "DNSBL_TO", "EXEMPT", "FD", "INVITE", "IRC", "KLINE", "KEY", "MASK", "MAX_READ", "MODE", "NAME", "NEGCACHE", "NICK", "NICKSERV", "OPER", "OPM", "OPTIONS", - "PASSWORD", "PERFORM", "PIDFILE", "PORT", "PROTOCOL", "PROTOCOLTYPE", - "REALNAME", "REPLY", "SCANLOG", "SCANNER", "SENDMAIL", "SERVER", - "TARGET_IP", "TARGET_PORT", "TARGET_STRING", "TIMEOUT", "TYPE", - "USERNAME", "USER", "VHOST", "NUMBER", "STRING", "'{'", "'}'", "';'", - "'='", "':'", "$accept", "config", "config_items", "options_entry", + "PASSWORD", "PERFORM", "PIDFILE", "PORT", "PROTOCOL", "REALNAME", + "REPLY", "SCANLOG", "SCANNER", "SENDMAIL", "SERVER", "TARGET_IP", + "TARGET_PORT", "TARGET_STRING", "TIMEOUT", "TYPE", "USERNAME", "USER", + "VHOST", "NUMBER", "STRING", "PROTOCOLTYPE", "'{'", "'}'", "';'", "'='", + "':'", "$accept", "config", "config_items", "options_entry", "options_items", "options_item", "options_negcache", "options_pidfile", "options_dns_fdlimit", "options_scanlog", "irc_entry", "irc_items", "irc_item", "irc_away", "irc_kline", "irc_mode", "irc_nick", "irc_nickserv", "irc_oper", "irc_password", "irc_perform", "irc_port", "irc_realname", "irc_server", "irc_username", "irc_vhost", - "irc_connregex", "channel_entry", "@1", "channel_items", "channel_item", - "channel_name", "channel_key", "channel_invite", "user_entry", "@2", + "irc_connregex", "channel_entry", "$@1", "channel_items", "channel_item", + "channel_name", "channel_key", "channel_invite", "user_entry", "$@2", "user_items", "user_item", "user_mask", "user_scanner", "scanner_entry", - "@3", "scanner_items", "scanner_item", "scanner_name", "scanner_vhost", + "$@3", "scanner_items", "scanner_item", "scanner_name", "scanner_vhost", "scanner_target_ip", "scanner_target_string", "scanner_fd", "scanner_target_port", "scanner_timeout", "scanner_max_read", "scanner_protocol", "opm_entry", "opm_items", "opm_item", "opm_dnsbl_from", "opm_dnsbl_to", "opm_sendmail", "opm_blacklist_entry", - "@4", "blacklist_items", "blacklist_item", "blacklist_name", + "$@4", "blacklist_items", "blacklist_item", "blacklist_name", "blacklist_kline", "blacklist_type", "blacklist_ban_unknown", "blacklist_reply", "blacklist_reply_items", "blacklist_reply_item", - "exempt_entry", "exempt_items", "exempt_item", "exempt_mask", 0 + "exempt_entry", "exempt_items", "exempt_item", "exempt_mask", YY_NULLPTR }; #endif # ifdef YYPRINT -/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to - token YYLEX-NUM. */ +/* YYTOKNUM[NUM] -- (External) token number corresponding to the + (internal) symbol number NUM (which must be that of a token). */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, @@ -624,47 +596,55 @@ static const yytype_uint16 yytoknum[] = }; # endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const yytype_uint8 yyr1[] = -{ - 0, 54, 55, 55, 56, 56, 56, 56, 56, 56, - 57, 58, 58, 58, 59, 59, 59, 59, 59, 60, - 61, 62, 63, 64, 65, 65, 66, 66, 66, 66, - 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, - 66, 66, 67, 68, 69, 70, 71, 72, 73, 74, - 75, 76, 77, 78, 79, 80, 82, 81, 83, 83, - 84, 84, 84, 85, 86, 87, 89, 88, 90, 90, - 91, 91, 91, 92, 93, 95, 94, 96, 96, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, - 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, - 108, 108, 109, 109, 109, 109, 109, 110, 111, 112, - 114, 113, 115, 115, 115, 116, 116, 116, 116, 116, - 116, 117, 118, 119, 120, 121, 122, 122, 122, 123, - 124, 125, 125, 125, 126, 126, 127 -}; +#define YYPACT_NINF -45 -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const yytype_uint8 yyr2[] = +#define yypact_value_is_default(Yystate) \ + (!!((Yystate) == (-45))) + +#define YYTABLE_NINF -132 + +#define yytable_value_is_error(Yytable_value) \ + 0 + + /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +static const yytype_int16 yypact[] = { - 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, - 5, 0, 2, 1, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 5, 2, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 0, 6, 2, 1, - 1, 1, 1, 4, 4, 4, 0, 6, 2, 1, - 1, 1, 1, 4, 4, 0, 6, 2, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, - 4, 4, 4, 4, 4, 4, 4, 6, 5, 0, - 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, - 0, 6, 0, 2, 1, 1, 1, 1, 1, 1, - 1, 4, 4, 4, 4, 5, 0, 2, 1, 4, - 5, 0, 2, 1, 1, 1, 4 + -45, 129, -45, -40, -39, -33, -24, -45, -45, -45, + -45, -9, -45, 4, -45, -45, 11, 94, 10, 55, + -2, 18, -45, 26, 16, -45, -45, -45, 29, 30, + 31, 38, 39, 40, 50, 58, 59, 60, 71, 76, + 78, 80, -1, -45, -45, -45, -45, -45, -45, -45, + -45, -45, -45, -45, -45, -45, -45, -45, -45, 34, + -45, 82, 83, 84, 70, -45, -45, -45, -45, -45, + 63, -45, 89, 90, 92, 97, 64, -45, -45, -45, + -45, -45, 98, 107, 103, 22, -45, 104, 106, 109, + 110, 111, 112, 113, 114, 115, 61, 116, 118, 119, + 120, 117, -45, 121, 122, 124, 125, 123, -45, 126, + 127, 130, 131, 132, 133, -45, -45, 128, 134, 53, + -45, -45, -45, -45, 135, 136, 137, 138, 139, 140, + 141, 142, 143, 12, -45, -45, -45, -45, -45, -45, + -45, -45, -45, -45, 145, -45, 146, 147, 148, 149, + 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, + -45, 21, 160, 161, 162, -45, 44, 163, 164, 165, + 166, -45, 171, 172, 169, -45, 175, 176, 177, 178, + 180, 179, 181, 183, 184, 182, -45, -45, -45, -45, + -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, + -45, -45, 185, 186, 187, -12, -45, -45, -45, -45, + -45, -45, -45, -45, 188, 189, 190, 174, 191, 54, + -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, + 193, 194, -45, 195, 196, 197, 198, 199, 201, 202, + 203, 204, -45, 209, 210, 211, 208, -45, 214, 215, + 216, 218, 219, 217, -45, -45, -45, -45, -45, -45, + 221, -45, -45, -45, -45, -45, 220, 222, 223, -45, + 224, 225, 226, 213, -43, -45, 227, -45, 228, -45, + -45, -45, -45, -45, -45, 233, 230, -45, -45, -45, + 231, -45, -45 }; -/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state - STATE-NUM when YYTABLE doesn't specify something else to do. Zero - means the default is an error. */ + /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. + Performed when YYTABLE does not specify something else to do. Zero + means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 66, 1, 0, 0, 0, 0, 3, 5, 4, @@ -699,7 +679,20 @@ static const yytype_uint8 yydefact[] = 0, 125, 129 }; -/* YYDEFGOTO[NTERM-NUM]. */ + /* YYPGOTO[NTERM-NUM]. */ +static const yytype_int16 yypgoto[] = +{ + -45, -45, -45, -45, -45, 101, -45, -45, -45, -45, + -45, -45, 192, -45, -45, -45, -45, -45, -45, -45, + -45, -45, -45, -45, -45, -45, -45, -45, -45, -45, + -23, -45, -45, -45, -45, -45, -45, 62, -45, -45, + -45, -45, -45, 52, -45, -45, -45, -45, -45, -45, + -45, -45, -45, -45, -45, 168, -45, -45, -45, -45, + -45, -45, -36, -45, -45, -45, -45, -45, -45, -44, + -45, -45, 212, -45 +}; + + /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 7, 8, 76, 77, 78, 79, 80, 81, @@ -712,253 +705,185 @@ static const yytype_int16 yydefgoto[] = 15, 24, 25, 26 }; -/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing - STATE-NUM. */ -#define YYPACT_NINF -91 -static const yytype_int16 yypact[] = -{ - -91, 132, -91, -40, -39, -34, -30, -91, -91, -91, - -91, -14, -91, -3, -91, -91, 24, 107, 2, 59, - -7, -5, -91, -17, 29, -91, -91, -91, -4, 9, - 11, 19, 30, 35, 38, 43, 44, 51, 53, 55, - 63, 66, -1, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, 69, - -91, 68, 71, 72, 67, -91, -91, -91, -91, -91, - 86, -91, 76, 81, 87, 89, 77, -91, -91, -91, - -91, -91, 80, 124, 54, 60, -91, 73, 90, 99, - 100, 101, 102, 104, 106, 108, 112, 113, 114, 119, - 121, 109, -91, 52, 123, 125, 126, 127, -91, 70, - 128, 129, 131, 133, 134, -91, -91, 120, 130, 23, - -91, -91, -91, -91, 135, 136, 137, 138, 139, 140, - 141, 142, 143, 16, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, 145, -91, 146, 147, 148, 149, - 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, - -91, 0, 160, 161, 162, -91, 49, 163, 164, 165, - 166, -91, 170, 171, 169, -91, 174, 175, 176, 191, - 177, 179, 180, 182, 183, 181, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -91, -91, 178, 184, 185, -12, -91, -91, -91, -91, - -91, -91, -91, -91, 186, 187, 188, 192, 190, 50, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - 193, 194, -91, 195, 196, 197, 198, 199, 201, 202, - 203, 204, -91, 208, 209, 210, 211, -91, 212, 213, - 215, 217, 218, 214, -91, -91, -91, -91, -91, -91, - 220, -91, -91, -91, -91, -91, 219, 221, 222, -91, - 223, 224, 225, 216, 39, -91, 226, -91, 227, -91, - -91, -91, -91, -91, -91, 231, 229, -91, -91, -91, - 230, -91, -91 -}; - -/* YYPGOTO[NTERM-NUM]. */ -static const yytype_int16 yypgoto[] = -{ - -91, -91, -91, -91, -91, 110, -91, -91, -91, -91, - -91, -91, 207, -91, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, -91, -91, -91, -91, -91, - -28, -91, -91, -91, -91, -91, -91, 61, -91, -91, - -91, -91, -91, 94, -91, -91, -91, -91, -91, -91, - -91, -91, -91, -91, -91, 205, -91, -91, -91, -91, - -91, -91, -36, -91, -91, -91, -91, -91, -91, -90, - -91, -91, 236, -91 -}; - -/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If - positive, shift that token. If negative, reduce the rule which - number is the opposite. If zero, do what YYDEFACT says. - If YYTABLE_NINF, syntax error. */ -#define YYTABLE_NINF -132 + /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule whose + number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 27, 202, 28, 60, 203, -56, 29, -99, 204, 16, - 17, 61, 62, 202, 30, 18, 203, 123, 31, 19, - 204, 32, 33, 34, 116, 22, 35, 36, 124, 37, - 22, 20, 38, 21, 125, 84, 126, 39, 246, 63, - 117, 23, 82, 40, 83, 41, 23, 127, 87, 101, - 213, 213, -99, 214, 214, 128, 129, 130, 131, 118, - 71, 88, 132, 89, 215, 215, 185, 72, 60, 216, - 216, 90, -110, 174, -131, 103, 61, 62, 71, 85, - 73, 116, 91, 217, 217, 72, 273, 92, 74, 286, - 93, 109, 218, 218, 75, 94, 95, 117, 73, -112, - 253, 161, 144, 96, 63, 97, 74, 98, 27, -11, - 28, 145, 75, -56, 29, 99, 118, 107, 100, 166, - 104, 146, 30, 105, 106, 123, 31, 114, 110, 32, - 33, 34, 2, 111, 35, 36, 124, 37, 147, 112, - 38, 113, 125, 3, 126, 39, 4, 148, 149, 150, - 151, 40, 152, 41, 153, 127, 154, 5, 6, 155, - 160, 156, 157, 128, 129, 130, 131, 158, -75, 159, - 132, 162, 172, 163, 164, 167, 168, 247, 165, 169, - 175, 170, 173, 254, 287, 171, 115, 176, 177, 178, + 27, 202, 28, 273, 203, -56, 29, 286, 204, 16, + 17, 60, 22, 123, 30, -99, 18, 22, 31, 61, + 62, 32, 33, 34, 124, 19, 35, 36, 23, 37, + 125, 38, 126, 23, 202, 20, 39, 203, 246, 21, + 103, 204, 40, 127, 41, 213, 63, 82, 214, 101, + 128, 129, 130, 131, 116, 213, 71, 132, 214, 215, + -99, -131, 185, 72, 216, 71, 85, 83, 109, 215, + 117, 60, 72, 145, 216, -110, 73, 217, 84, 61, + 62, 87, 88, 89, 74, 73, 218, 217, 118, 75, + 90, 91, 92, 74, -112, 27, 218, 28, 75, 116, + -56, 29, 93, 174, 253, -11, 63, 155, 123, 30, + 94, 95, 96, 31, 114, 117, 32, 33, 34, 124, + 107, 35, 36, 97, 37, 125, 38, 126, 98, 2, + 99, 39, 100, 118, 104, 105, 106, 40, 127, 41, + 3, 110, 111, 4, 112, 128, 129, 130, 131, 113, + 144, 146, 132, 147, 5, 6, 148, 149, 150, 151, + 152, 153, 154, 156, -75, 157, 158, 159, 160, 162, + 161, 163, 164, 167, 165, 166, 168, 115, 169, 170, + 172, 175, 247, 254, 171, 186, 173, 176, 177, 178, 179, 180, 181, 182, 183, 184, 187, 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, 199, 200, 201, 210, 211, 212, 226, 227, 228, 229, 230, 231, - 232, 233, 234, 236, 235, 237, 238, 186, 239, 240, - 243, 241, 242, 0, 0, 0, 244, 245, 248, 249, - 250, 251, 252, 0, 255, 256, 257, 258, 259, 102, - 261, 260, 262, 263, 264, 265, 266, 267, 268, 270, - 86, 271, 269, 272, 273, 277, 276, 278, 285, 108, - 279, 0, 280, 281, 282, 283, 284, 288, 289, 290, - 291, 292 + 232, 233, 234, 251, 235, 238, 236, 237, 239, 240, + 287, 241, 108, 242, 102, 0, 86, 243, 244, 245, + 248, 249, 250, 252, 255, 256, 257, 258, 259, 0, + 261, 260, 262, 263, 264, 265, 266, 267, 268, 269, + 270, 0, 271, 272, 273, 285, 276, 278, 277, 0, + 0, 279, 0, 280, 281, 282, 283, 284, 288, 289, + 290, 291, 292 }; static const yytype_int16 yycheck[] = { - 1, 13, 3, 1, 16, 6, 7, 5, 20, 49, - 49, 9, 10, 13, 15, 49, 16, 1, 19, 49, - 20, 22, 23, 24, 1, 1, 27, 28, 12, 30, - 1, 45, 33, 36, 18, 52, 20, 38, 50, 37, - 17, 17, 49, 44, 49, 46, 17, 31, 52, 50, - 1, 1, 50, 4, 4, 39, 40, 41, 42, 36, - 1, 52, 46, 52, 15, 15, 50, 8, 1, 20, - 20, 52, 5, 50, 50, 6, 9, 10, 1, 50, - 21, 1, 52, 34, 34, 8, 47, 52, 29, 50, - 52, 5, 43, 43, 35, 52, 52, 17, 21, 50, - 50, 49, 48, 52, 37, 52, 29, 52, 1, 50, - 3, 51, 35, 6, 7, 52, 36, 50, 52, 49, - 52, 48, 15, 52, 52, 1, 19, 50, 52, 22, - 23, 24, 0, 52, 27, 28, 12, 30, 48, 52, - 33, 52, 18, 11, 20, 38, 14, 48, 48, 48, - 48, 44, 48, 46, 48, 31, 48, 25, 26, 47, - 51, 48, 48, 39, 40, 41, 42, 48, 36, 48, - 46, 48, 52, 48, 48, 47, 47, 205, 51, 48, - 119, 48, 52, 219, 274, 51, 76, 52, 52, 52, + 1, 13, 3, 46, 16, 6, 7, 50, 20, 49, + 49, 1, 1, 1, 15, 5, 49, 1, 19, 9, + 10, 22, 23, 24, 12, 49, 27, 28, 17, 30, + 18, 32, 20, 17, 13, 44, 37, 16, 50, 35, + 6, 20, 43, 31, 45, 1, 36, 49, 4, 50, + 38, 39, 40, 41, 1, 1, 1, 45, 4, 15, + 50, 50, 50, 8, 20, 1, 50, 49, 5, 15, + 17, 1, 8, 51, 20, 5, 21, 33, 52, 9, + 10, 52, 52, 52, 29, 21, 42, 33, 35, 34, + 52, 52, 52, 29, 50, 1, 42, 3, 34, 1, + 6, 7, 52, 50, 50, 50, 36, 46, 1, 15, + 52, 52, 52, 19, 50, 17, 22, 23, 24, 12, + 50, 27, 28, 52, 30, 18, 32, 20, 52, 0, + 52, 37, 52, 35, 52, 52, 52, 43, 31, 45, + 11, 52, 52, 14, 52, 38, 39, 40, 41, 52, + 47, 47, 45, 47, 25, 26, 47, 47, 47, 47, + 47, 47, 47, 47, 35, 47, 47, 47, 51, 47, + 49, 47, 47, 46, 51, 49, 46, 76, 47, 47, + 52, 119, 205, 219, 51, 133, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, - 51, 51, 51, 51, 51, 51, 51, 51, 48, 48, - 51, 47, 47, 32, 48, 48, 47, 133, 48, 47, - 52, 48, 51, -1, -1, -1, 52, 52, 52, 52, - 52, 49, 52, -1, 51, 51, 51, 51, 51, 42, - 51, 53, 51, 51, 51, 51, 48, 48, 48, 47, - 24, 48, 51, 48, 47, 51, 48, 47, 52, 64, - 51, -1, 51, 51, 51, 51, 51, 51, 51, 48, - 51, 51 + 51, 51, 51, 51, 51, 51, 51, 51, 47, 47, + 51, 46, 46, 49, 47, 46, 48, 47, 47, 46, + 274, 47, 64, 51, 42, -1, 24, 52, 52, 52, + 52, 52, 52, 52, 51, 51, 51, 51, 51, -1, + 51, 53, 51, 51, 51, 51, 47, 47, 47, 51, + 46, -1, 47, 47, 46, 52, 47, 46, 51, -1, + -1, 51, -1, 51, 51, 51, 51, 51, 51, 51, + 47, 51, 51 }; -/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing - symbol of state STATE-NUM. */ + /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 55, 0, 11, 14, 25, 26, 56, 57, 64, 88, 89, 94, 95, 107, 124, 49, 49, 49, 49, - 45, 36, 1, 17, 125, 126, 127, 1, 3, 7, - 15, 19, 22, 23, 24, 27, 28, 30, 33, 38, - 44, 46, 65, 66, 67, 68, 69, 70, 71, 72, + 44, 35, 1, 17, 125, 126, 127, 1, 3, 7, + 15, 19, 22, 23, 24, 27, 28, 30, 32, 37, + 43, 45, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, - 1, 9, 10, 37, 108, 109, 110, 111, 112, 113, - 114, 1, 8, 21, 29, 35, 58, 59, 60, 61, + 1, 9, 10, 36, 108, 109, 110, 111, 112, 113, + 114, 1, 8, 21, 29, 34, 58, 59, 60, 61, 62, 63, 49, 49, 52, 50, 126, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 50, 66, 6, 52, 52, 52, 50, 109, 5, - 52, 52, 52, 52, 50, 59, 1, 17, 36, 90, - 91, 92, 93, 1, 12, 18, 20, 31, 39, 40, - 41, 42, 46, 96, 97, 98, 99, 100, 101, 102, - 103, 104, 105, 106, 48, 51, 48, 48, 48, 48, - 48, 48, 48, 48, 48, 47, 48, 48, 48, 48, - 51, 49, 48, 48, 48, 51, 49, 47, 47, 48, - 48, 51, 52, 52, 50, 91, 52, 52, 52, 52, + 52, 52, 52, 52, 50, 59, 1, 17, 35, 90, + 91, 92, 93, 1, 12, 18, 20, 31, 38, 39, + 40, 41, 45, 96, 97, 98, 99, 100, 101, 102, + 103, 104, 105, 106, 47, 51, 47, 47, 47, 47, + 47, 47, 47, 47, 47, 46, 47, 47, 47, 47, + 51, 49, 47, 47, 47, 51, 49, 46, 46, 47, + 47, 51, 52, 52, 50, 91, 52, 52, 52, 52, 52, 52, 52, 52, 52, 50, 97, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 51, 13, 16, 20, 83, 84, 85, 86, 87, - 51, 51, 51, 1, 4, 15, 20, 34, 43, 115, + 51, 51, 51, 1, 4, 15, 20, 33, 42, 115, 116, 117, 118, 119, 120, 121, 51, 51, 51, 51, - 48, 48, 51, 47, 47, 48, 32, 48, 47, 48, - 47, 48, 51, 52, 52, 52, 50, 84, 52, 52, + 47, 47, 51, 46, 46, 47, 48, 47, 46, 47, + 46, 47, 51, 52, 52, 52, 50, 84, 52, 52, 52, 49, 52, 50, 116, 51, 51, 51, 51, 51, - 53, 51, 51, 51, 51, 51, 48, 48, 48, 51, - 47, 48, 48, 47, 122, 123, 48, 51, 47, 51, + 53, 51, 51, 51, 51, 51, 47, 47, 47, 51, + 46, 47, 47, 46, 122, 123, 47, 51, 46, 51, 51, 51, 51, 51, 51, 52, 50, 123, 51, 51, - 48, 51, 51 + 47, 51, 51 +}; + + /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = +{ + 0, 54, 55, 55, 56, 56, 56, 56, 56, 56, + 57, 58, 58, 58, 59, 59, 59, 59, 59, 60, + 61, 62, 63, 64, 65, 65, 66, 66, 66, 66, + 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, + 66, 66, 67, 68, 69, 70, 71, 72, 73, 74, + 75, 76, 77, 78, 79, 80, 82, 81, 83, 83, + 84, 84, 84, 85, 86, 87, 89, 88, 90, 90, + 91, 91, 91, 92, 93, 95, 94, 96, 96, 97, + 97, 97, 97, 97, 97, 97, 97, 97, 97, 98, + 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, + 108, 108, 109, 109, 109, 109, 109, 110, 111, 112, + 114, 113, 115, 115, 115, 116, 116, 116, 116, 116, + 116, 117, 118, 119, 120, 121, 122, 122, 122, 123, + 124, 125, 125, 125, 126, 126, 127 }; -#define yyerrok (yyerrstatus = 0) -#define yyclearin (yychar = YYEMPTY) -#define YYEMPTY (-2) -#define YYEOF 0 + /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = +{ + 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, + 5, 0, 2, 1, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 5, 2, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, + 4, 4, 4, 4, 4, 4, 0, 6, 2, 1, + 1, 1, 1, 4, 4, 4, 0, 6, 2, 1, + 1, 1, 1, 4, 4, 0, 6, 2, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, + 4, 4, 4, 4, 4, 4, 4, 6, 5, 0, + 2, 1, 1, 1, 1, 1, 1, 4, 4, 4, + 0, 6, 0, 2, 1, 1, 1, 1, 1, 1, + 1, 4, 4, 4, 4, 5, 0, 2, 1, 4, + 5, 0, 2, 1, 1, 1, 4 +}; -#define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrorlab +#define yyerrok (yyerrstatus = 0) +#define yyclearin (yychar = YYEMPTY) +#define YYEMPTY (-2) +#define YYEOF 0 -/* Like YYERROR except do call yyerror. This remains here temporarily - to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ +#define YYACCEPT goto yyacceptlab +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab -#define YYFAIL goto yyerrlab #define YYRECOVERING() (!!yyerrstatus) -#define YYBACKUP(Token, Value) \ -do \ - if (yychar == YYEMPTY && yylen == 1) \ - { \ - yychar = (Token); \ - yylval = (Value); \ - yytoken = YYTRANSLATE (yychar); \ - YYPOPSTACK (1); \ - goto yybackup; \ - } \ - else \ - { \ +#define YYBACKUP(Token, Value) \ +do \ + if (yychar == YYEMPTY) \ + { \ + yychar = (Token); \ + yylval = (Value); \ + YYPOPSTACK (yylen); \ + yystate = *yyssp; \ + goto yybackup; \ + } \ + else \ + { \ yyerror (YY_("syntax error: cannot back up")); \ - YYERROR; \ - } \ -while (YYID (0)) - - -#define YYTERROR 1 -#define YYERRCODE 256 - - -/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. - If N is 0, then set CURRENT to the empty location which ends - the previous symbol: RHS[0] (always defined). */ - -#define YYRHSLOC(Rhs, K) ((Rhs)[K]) -#ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - do \ - if (YYID (N)) \ - { \ - (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ - (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ - (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ - (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ - } \ - else \ - { \ - (Current).first_line = (Current).last_line = \ - YYRHSLOC (Rhs, 0).last_line; \ - (Current).first_column = (Current).last_column = \ - YYRHSLOC (Rhs, 0).last_column; \ - } \ - while (YYID (0)) -#endif + YYERROR; \ + } \ +while (0) +/* Error token number */ +#define YYTERROR 1 +#define YYERRCODE 256 -/* YY_LOCATION_PRINT -- Print the location on the stream. - This macro was not mandated originally: define only if we know - we won't break user code: when these are the locations we know. */ - -#ifndef YY_LOCATION_PRINT -# if YYLTYPE_IS_TRIVIAL -# define YY_LOCATION_PRINT(File, Loc) \ - fprintf (File, "%d.%d-%d.%d", \ - (Loc).first_line, (Loc).first_column, \ - (Loc).last_line, (Loc).last_column) -# else -# define YY_LOCATION_PRINT(File, Loc) ((void) 0) -# endif -#endif -/* YYLEX -- calling `yylex' with the right arguments. */ - -#ifdef YYLEX_PARAM -# define YYLEX yylex (YYLEX_PARAM) -#else -# define YYLEX yylex () -#endif - /* Enable debugging if requested. */ #if YYDEBUG @@ -967,54 +892,46 @@ while (YYID (0)) # define YYFPRINTF fprintf # endif -# define YYDPRINTF(Args) \ -do { \ - if (yydebug) \ - YYFPRINTF Args; \ -} while (YYID (0)) +# define YYDPRINTF(Args) \ +do { \ + if (yydebug) \ + YYFPRINTF Args; \ +} while (0) + +/* This macro is provided for backward compatibility. */ +#ifndef YY_LOCATION_PRINT +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +#endif -# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ -do { \ - if (yydebug) \ - { \ - YYFPRINTF (stderr, "%s ", Title); \ - yy_symbol_print (stderr, \ - Type, Value); \ - YYFPRINTF (stderr, "\n"); \ - } \ -} while (YYID (0)) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (0) -/*--------------------------------. -| Print this symbol on YYOUTPUT. | -`--------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) +/*----------------------------------------. +| Print this symbol's value on YYOUTPUT. | +`----------------------------------------*/ + static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_value_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { + FILE *yyo = yyoutput; + YYUSE (yyo); if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); -# else - YYUSE (yyoutput); # endif - switch (yytype) - { - default: - break; - } + YYUSE (yytype); } @@ -1022,22 +939,11 @@ yy_symbol_value_print (yyoutput, yytype, yyvaluep) | Print this symbol on YYOUTPUT. | `--------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) -#else -static void -yy_symbol_print (yyoutput, yytype, yyvaluep) - FILE *yyoutput; - int yytype; - YYSTYPE const * const yyvaluep; -#endif { - if (yytype < YYNTOKENS) - YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); - else - YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + YYFPRINTF (yyoutput, "%s %s (", + yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); @@ -1048,66 +954,54 @@ yy_symbol_print (yyoutput, yytype, yyvaluep) | TOP (included). | `------------------------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) -#else -static void -yy_stack_print (bottom, top) - yytype_int16 *bottom; - yytype_int16 *top; -#endif +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) { YYFPRINTF (stderr, "Stack now"); - for (; bottom <= top; ++bottom) - YYFPRINTF (stderr, " %d", *bottom); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } YYFPRINTF (stderr, "\n"); } -# define YY_STACK_PRINT(Bottom, Top) \ -do { \ - if (yydebug) \ - yy_stack_print ((Bottom), (Top)); \ -} while (YYID (0)) +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (0) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void -yy_reduce_print (YYSTYPE *yyvsp, int yyrule) -#else -static void -yy_reduce_print (yyvsp, yyrule) - YYSTYPE *yyvsp; - int yyrule; -#endif +yy_reduce_print (yytype_int16 *yyssp, YYSTYPE *yyvsp, int yyrule) { + unsigned long int yylno = yyrline[yyrule]; int yynrhs = yyr2[yyrule]; int yyi; - unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", - yyrule - 1, yylno); + yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { - fprintf (stderr, " $%d = ", yyi + 1); - yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], - &(yyvsp[(yyi + 1) - (yynrhs)]) - ); - fprintf (stderr, "\n"); + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, + yystos[yyssp[yyi + 1 - yynrhs]], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); } } -# define YY_REDUCE_PRINT(Rule) \ -do { \ - if (yydebug) \ - yy_reduce_print (yyvsp, Rule); \ -} while (YYID (0)) +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyssp, yyvsp, Rule); \ +} while (0) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ @@ -1121,7 +1015,7 @@ int yydebug; /* YYINITDEPTH -- initial size of the parser's stacks. */ -#ifndef YYINITDEPTH +#ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif @@ -1136,7 +1030,6 @@ int yydebug; # define YYMAXDEPTH 10000 #endif - #if YYERROR_VERBOSE @@ -1145,15 +1038,8 @@ int yydebug; # define yystrlen strlen # else /* Return the length of YYSTR. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) -#else -static YYSIZE_T -yystrlen (yystr) - const char *yystr; -#endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) @@ -1169,16 +1055,8 @@ yystrlen (yystr) # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) -#else -static char * -yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -#endif { char *yyd = yydest; const char *yys = yysrc; @@ -1208,27 +1086,27 @@ yytnamerr (char *yyres, const char *yystr) char const *yyp = yystr; for (;;) - switch (*++yyp) - { - case '\'': - case ',': - goto do_not_strip_quotes; - - case '\\': - if (*++yyp != '\\') - goto do_not_strip_quotes; - /* Fall through. */ - default: - if (yyres) - yyres[yyn] = *yyp; - yyn++; - break; - - case '"': - if (yyres) - yyres[yyn] = '\0'; - return yyn; - } + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } do_not_strip_quotes: ; } @@ -1239,211 +1117,209 @@ yytnamerr (char *yyres, const char *yystr) } # endif -/* Copy into YYRESULT an error message about the unexpected token - YYCHAR while in state YYSTATE. Return the number of bytes copied, - including the terminating null byte. If YYRESULT is null, do not - copy anything; just return the number of bytes that would be - copied. As a special case, return 0 if an ordinary "syntax error" - message will do. Return YYSIZE_MAXIMUM if overflow occurs during - size calculation. */ -static YYSIZE_T -yysyntax_error (char *yyresult, int yystate, int yychar) +/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message + about the unexpected token YYTOKEN for the state stack whose top is + YYSSP. + + Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is + not large enough to hold the message. In that case, also set + *YYMSG_ALLOC to the required number of bytes. Return 2 if the + required number of bytes is too large to store. */ +static int +yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, + yytype_int16 *yyssp, int yytoken) { - int yyn = yypact[yystate]; + YYSIZE_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]); + YYSIZE_T yysize = yysize0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + /* Internationalized format string. */ + const char *yyformat = YY_NULLPTR; + /* Arguments of yyformat. */ + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + /* Number of reported tokens (one for the "unexpected", one per + "expected"). */ + int yycount = 0; + + /* There are many possibilities here to consider: + - If this state is a consistent state with a default action, then + the only way this function was invoked is if the default action + is an error action. In that case, don't check for expected + tokens because there are none. + - The only way there can be no lookahead present (in yychar) is if + this state is a consistent state with a default action. Thus, + detecting the absence of a lookahead is sufficient to determine + that there is no unexpected or expected token to report. In that + case, just report a simple "syntax error". + - Don't assume there isn't a lookahead just because this state is a + consistent state with a default action. There might have been a + previous inconsistent state, consistent state with a non-default + action, or user semantic action that manipulated yychar. + - Of course, the expected token list depends on states to have + correct lookahead information, and it depends on the parser not + to perform extra reductions after fetching a lookahead from the + scanner and before detecting a syntax error. Thus, state merging + (from LALR or IELR) and default reductions corrupt the expected + token list. However, the list is correct for canonical LR with + one exception: it will still contain any token that will not be + accepted due to an error action in a later state. + */ + if (yytoken != YYEMPTY) + { + int yyn = yypact[*yyssp]; + yyarg[yycount++] = yytname[yytoken]; + if (!yypact_value_is_default (yyn)) + { + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. In other words, skip the first -YYN actions for + this state because they are default actions. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yyx; + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR + && !yytable_value_is_error (yytable[yyx + yyn])) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + break; + } + yyarg[yycount++] = yytname[yyx]; + { + YYSIZE_T yysize1 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]); + if (! (yysize <= yysize1 + && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + } + } + } - if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) - return 0; - else + switch (yycount) { - int yytype = YYTRANSLATE (yychar); - YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); - YYSIZE_T yysize = yysize0; - YYSIZE_T yysize1; - int yysize_overflow = 0; - enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; - char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; - int yyx; - -# if 0 - /* This is so xgettext sees the translatable formats that are - constructed on the fly. */ - YY_("syntax error, unexpected %s"); - YY_("syntax error, unexpected %s, expecting %s"); - YY_("syntax error, unexpected %s, expecting %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s"); - YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); -# endif - char *yyfmt; - char const *yyf; - static char const yyunexpected[] = "syntax error, unexpected %s"; - static char const yyexpecting[] = ", expecting %s"; - static char const yyor[] = " or %s"; - char yyformat[sizeof yyunexpected - + sizeof yyexpecting - 1 - + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) - * (sizeof yyor - 1))]; - char const *yyprefix = yyexpecting; - - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - int yyxbegin = yyn < 0 ? -yyn : 0; - - /* Stay within bounds of both yycheck and yytname. */ - int yychecklim = YYLAST - yyn + 1; - int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; - int yycount = 1; - - yyarg[0] = yytname[yytype]; - yyfmt = yystpcpy (yyformat, yyunexpected); - - for (yyx = yyxbegin; yyx < yyxend; ++yyx) - if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) - { - if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) - { - yycount = 1; - yysize = yysize0; - yyformat[sizeof yyunexpected - 1] = '\0'; - break; - } - yyarg[yycount++] = yytname[yyx]; - yysize1 = yysize + yytnamerr (0, yytname[yyx]); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - yyfmt = yystpcpy (yyfmt, yyprefix); - yyprefix = yyor; - } - - yyf = YY_(yyformat); - yysize1 = yysize + yystrlen (yyf); - yysize_overflow |= (yysize1 < yysize); - yysize = yysize1; - - if (yysize_overflow) - return YYSIZE_MAXIMUM; - - if (yyresult) - { - /* Avoid sprintf, as that infringes on the user's name space. - Don't have undefined behavior even if the translation - produced a string with the wrong number of "%s"s. */ - char *yyp = yyresult; - int yyi = 0; - while ((*yyp = *yyf) != '\0') - { - if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) - { - yyp += yytnamerr (yyp, yyarg[yyi++]); - yyf += 2; - } - else - { - yyp++; - yyf++; - } - } - } - return yysize; +# define YYCASE_(N, S) \ + case N: \ + yyformat = S; \ + break + YYCASE_(0, YY_("syntax error")); + YYCASE_(1, YY_("syntax error, unexpected %s")); + YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); + YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); + YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); + YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); +# undef YYCASE_ } + + { + YYSIZE_T yysize1 = yysize + yystrlen (yyformat); + if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) + return 2; + yysize = yysize1; + } + + if (*yymsg_alloc < yysize) + { + *yymsg_alloc = 2 * yysize; + if (! (yysize <= *yymsg_alloc + && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) + *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; + return 1; + } + + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + { + char *yyp = *yymsg; + int yyi = 0; + while ((*yyp = *yyformat) != '\0') + if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyformat += 2; + } + else + { + yyp++; + yyformat++; + } + } + return 0; } #endif /* YYERROR_VERBOSE */ - /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ -/*ARGSUSED*/ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) -#else -static void -yydestruct (yymsg, yytype, yyvaluep) - const char *yymsg; - int yytype; - YYSTYPE *yyvaluep; -#endif { YYUSE (yyvaluep); - if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); - switch (yytype) - { - - default: - break; - } + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN + YYUSE (yytype); + YY_IGNORE_MAYBE_UNINITIALIZED_END } - -/* Prevent warnings from -Wmissing-prototypes. */ - -#ifdef YYPARSE_PARAM -#if defined __STDC__ || defined __cplusplus -int yyparse (void *YYPARSE_PARAM); -#else -int yyparse (); -#endif -#else /* ! YYPARSE_PARAM */ -#if defined __STDC__ || defined __cplusplus -int yyparse (void); -#else -int yyparse (); -#endif -#endif /* ! YYPARSE_PARAM */ -/* The look-ahead symbol. */ +/* The lookahead symbol. */ int yychar; -/* The semantic value of the look-ahead symbol. */ +/* The semantic value of the lookahead symbol. */ YYSTYPE yylval; - /* Number of syntax errors so far. */ int yynerrs; - /*----------. | yyparse. | `----------*/ -#ifdef YYPARSE_PARAM -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) -int -yyparse (void *YYPARSE_PARAM) -#else -int -yyparse (YYPARSE_PARAM) - void *YYPARSE_PARAM; -#endif -#else /* ! YYPARSE_PARAM */ -#if (defined __STDC__ || defined __C99__FUNC__ \ - || defined __cplusplus || defined _MSC_VER) int yyparse (void) -#else -int -yyparse () - -#endif -#endif { - - int yystate; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; + + /* The stacks and their tools: + 'yyss': related to states. + 'yyvs': related to semantic values. + + Refer to the stacks through separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ + + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; + + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + + YYSIZE_T yystacksize; + int yyn; int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Look-ahead token as an internal (translated) token number. */ + /* Lookahead token as an internal (translated) token number. */ int yytoken = 0; + /* The variables used to return semantic value and location from the + action routines. */ + YYSTYPE yyval; + #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; @@ -1451,54 +1327,22 @@ yyparse () YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. - - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - - /* The state stack. */ - yytype_int16 yyssa[YYINITDEPTH]; - yytype_int16 *yyss = yyssa; - yytype_int16 *yyssp; - - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - YYSTYPE *yyvsp; - - - #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) - YYSIZE_T yystacksize = YYINITDEPTH; - - /* The variables used to return semantic value and location from the - action routines. */ - YYSTYPE yyval; - - /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; + yyssp = yyss = yyssa; + yyvsp = yyvs = yyvsa; + yystacksize = YYINITDEPTH; + YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ - - /* Initialize stack pointers. - Waste one element of value and location stack - so that they stay on the same level as the state stack. - The wasted elements are never initialized. */ - - yyssp = yyss; - yyvsp = yyvs; - + yychar = YYEMPTY; /* Cause a token to be read. */ goto yysetstate; /*------------------------------------------------------------. @@ -1519,25 +1363,23 @@ yyparse () #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of - these so that the &'s don't force the real ones into - memory. */ - YYSTYPE *yyvs1 = yyvs; - yytype_int16 *yyss1 = yyss; - - - /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. This used to be a - conditional around just the two extra args, but that might - be undefined if yyoverflow is a macro. */ - yyoverflow (YY_("memory exhausted"), - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - - &yystacksize); - - yyss = yyss1; - yyvs = yyvs1; + /* Give user a chance to reallocate the stack. Use copies of + these so that the &'s don't force the real ones into + memory. */ + YYSTYPE *yyvs1 = yyvs; + yytype_int16 *yyss1 = yyss; + + /* Each stack pointer address is followed by the size of the + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), + &yyss1, yysize * sizeof (*yyssp), + &yyvs1, yysize * sizeof (*yyvsp), + &yystacksize); + + yyss = yyss1; + yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE @@ -1545,23 +1387,22 @@ yyparse () # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) - goto yyexhaustedlab; + goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) - yystacksize = YYMAXDEPTH; + yystacksize = YYMAXDEPTH; { - yytype_int16 *yyss1 = yyss; - union yyalloc *yyptr = - (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); - if (! yyptr) - goto yyexhaustedlab; - YYSTACK_RELOCATE (yyss); - YYSTACK_RELOCATE (yyvs); - + yytype_int16 *yyss1 = yyss; + union yyalloc *yyptr = + (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); + if (! yyptr) + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE - if (yyss1 != yyssa) - YYSTACK_FREE (yyss1); + if (yyss1 != yyssa) + YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ @@ -1569,16 +1410,18 @@ yyparse () yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; - YYDPRINTF ((stderr, "Stack size increased to %lu\n", - (unsigned long int) yystacksize)); + (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) - YYABORT; + YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. @@ -1587,20 +1430,20 @@ yyparse () yybackup: /* Do appropriate processing given the current state. Read a - look-ahead token if we need one and don't already have one. */ + lookahead token if we need one and don't already have one. */ - /* First try to decide what to do without reference to look-ahead token. */ + /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; - if (yyn == YYPACT_NINF) + if (yypact_value_is_default (yyn)) goto yydefault; - /* Not known => get a look-ahead token if don't already have one. */ + /* Not known => get a lookahead token if don't already have one. */ - /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); - yychar = YYLEX; + yychar = yylex (); } if (yychar <= YYEOF) @@ -1622,29 +1465,27 @@ yybackup: yyn = yytable[yyn]; if (yyn <= 0) { - if (yyn == 0 || yyn == YYTABLE_NINF) - goto yyerrlab; + if (yytable_value_is_error (yyn)) + goto yyerrlab; yyn = -yyn; goto yyreduce; } - if (yyn == YYFINAL) - YYACCEPT; - /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; - /* Shift the look-ahead token. */ + /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); - /* Discard the shifted token unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; + /* Discard the shifted token. */ + yychar = YYEMPTY; yystate = yyn; + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END goto yynewstate; @@ -1667,7 +1508,7 @@ yyreduce: yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: - `$$ = $1'. + '$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison @@ -1681,150 +1522,168 @@ yyreduce: switch (yyn) { case 19: -#line 120 "config-parser.y" +#line 119 "config-parser.y" /* yacc.c:1646 */ { - OptionsItem->negcache = (yyvsp[(3) - (4)].number); + OptionsItem->negcache = (yyvsp[-1].number); } +#line 1530 "config-parser.c" /* yacc.c:1646 */ break; case 20: -#line 125 "config-parser.y" +#line 124 "config-parser.y" /* yacc.c:1646 */ { MyFree(OptionsItem->pidfile); - OptionsItem->pidfile = DupString((yyvsp[(3) - (4)].string)); + OptionsItem->pidfile = DupString((yyvsp[-1].string)); } +#line 1539 "config-parser.c" /* yacc.c:1646 */ break; case 21: -#line 131 "config-parser.y" +#line 130 "config-parser.y" /* yacc.c:1646 */ { - OptionsItem->dns_fdlimit = (yyvsp[(3) - (4)].number); + OptionsItem->dns_fdlimit = (yyvsp[-1].number); } +#line 1547 "config-parser.c" /* yacc.c:1646 */ break; case 22: -#line 136 "config-parser.y" +#line 135 "config-parser.y" /* yacc.c:1646 */ { MyFree(OptionsItem->scanlog); - OptionsItem->scanlog = DupString((yyvsp[(3) - (4)].string)); + OptionsItem->scanlog = DupString((yyvsp[-1].string)); } +#line 1556 "config-parser.c" /* yacc.c:1646 */ break; case 42: -#line 166 "config-parser.y" +#line 165 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->away); - IRCItem->away = DupString((yyvsp[(3) - (4)].string)); + IRCItem->away = DupString((yyvsp[-1].string)); } +#line 1565 "config-parser.c" /* yacc.c:1646 */ break; case 43: -#line 172 "config-parser.y" +#line 171 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->kline); - IRCItem->kline = DupString((yyvsp[(3) - (4)].string)); + IRCItem->kline = DupString((yyvsp[-1].string)); } +#line 1574 "config-parser.c" /* yacc.c:1646 */ break; case 44: -#line 178 "config-parser.y" +#line 177 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->mode); - IRCItem->mode = DupString((yyvsp[(3) - (4)].string)); + IRCItem->mode = DupString((yyvsp[-1].string)); } +#line 1583 "config-parser.c" /* yacc.c:1646 */ break; case 45: -#line 184 "config-parser.y" +#line 183 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->nick); - IRCItem->nick = DupString((yyvsp[(3) - (4)].string)); + IRCItem->nick = DupString((yyvsp[-1].string)); } +#line 1592 "config-parser.c" /* yacc.c:1646 */ break; case 46: -#line 190 "config-parser.y" +#line 189 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->nickserv); - IRCItem->nickserv = DupString((yyvsp[(3) - (4)].string)); + IRCItem->nickserv = DupString((yyvsp[-1].string)); } +#line 1601 "config-parser.c" /* yacc.c:1646 */ break; case 47: -#line 196 "config-parser.y" +#line 195 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->oper); - IRCItem->oper = DupString((yyvsp[(3) - (4)].string)); + IRCItem->oper = DupString((yyvsp[-1].string)); } +#line 1610 "config-parser.c" /* yacc.c:1646 */ break; case 48: -#line 202 "config-parser.y" +#line 201 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->password); - IRCItem->password = DupString((yyvsp[(3) - (4)].string)); + IRCItem->password = DupString((yyvsp[-1].string)); } +#line 1619 "config-parser.c" /* yacc.c:1646 */ break; case 49: -#line 208 "config-parser.y" +#line 207 "config-parser.y" /* yacc.c:1646 */ { node_t *node; - node = node_create(DupString((yyvsp[(3) - (4)].string))); + node = node_create(DupString((yyvsp[-1].string))); list_add(IRCItem->performs, node); } +#line 1630 "config-parser.c" /* yacc.c:1646 */ break; case 50: -#line 216 "config-parser.y" +#line 215 "config-parser.y" /* yacc.c:1646 */ { - IRCItem->port = (yyvsp[(3) - (4)].number); + IRCItem->port = (yyvsp[-1].number); } +#line 1638 "config-parser.c" /* yacc.c:1646 */ break; case 51: -#line 221 "config-parser.y" +#line 220 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->realname); - IRCItem->realname = DupString((yyvsp[(3) - (4)].string)); + IRCItem->realname = DupString((yyvsp[-1].string)); } +#line 1647 "config-parser.c" /* yacc.c:1646 */ break; case 52: -#line 227 "config-parser.y" +#line 226 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->server); - IRCItem->server = DupString((yyvsp[(3) - (4)].string)); + IRCItem->server = DupString((yyvsp[-1].string)); } +#line 1656 "config-parser.c" /* yacc.c:1646 */ break; case 53: -#line 233 "config-parser.y" +#line 232 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->username); - IRCItem->username = DupString((yyvsp[(3) - (4)].string)); + IRCItem->username = DupString((yyvsp[-1].string)); } +#line 1665 "config-parser.c" /* yacc.c:1646 */ break; case 54: -#line 239 "config-parser.y" +#line 238 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->vhost); - IRCItem->vhost = DupString((yyvsp[(3) - (4)].string)); + IRCItem->vhost = DupString((yyvsp[-1].string)); } +#line 1674 "config-parser.c" /* yacc.c:1646 */ break; case 55: -#line 245 "config-parser.y" +#line 244 "config-parser.y" /* yacc.c:1646 */ { MyFree(IRCItem->connregex); - IRCItem->connregex = DupString((yyvsp[(3) - (4)].string)); + IRCItem->connregex = DupString((yyvsp[-1].string)); } +#line 1683 "config-parser.c" /* yacc.c:1646 */ break; case 56: -#line 254 "config-parser.y" +#line 253 "config-parser.y" /* yacc.c:1646 */ { node_t *node; struct ChannelConf *item; @@ -1840,40 +1699,44 @@ yyreduce: tmp = (void *) item; } +#line 1703 "config-parser.c" /* yacc.c:1646 */ break; case 63: -#line 279 "config-parser.y" +#line 278 "config-parser.y" /* yacc.c:1646 */ { struct ChannelConf *item = tmp; MyFree(item->name); - item->name = DupString((yyvsp[(3) - (4)].string)); + item->name = DupString((yyvsp[-1].string)); } +#line 1714 "config-parser.c" /* yacc.c:1646 */ break; case 64: -#line 287 "config-parser.y" +#line 286 "config-parser.y" /* yacc.c:1646 */ { struct ChannelConf *item = tmp; MyFree(item->key); - item->key = DupString((yyvsp[(3) - (4)].string)); + item->key = DupString((yyvsp[-1].string)); } +#line 1725 "config-parser.c" /* yacc.c:1646 */ break; case 65: -#line 295 "config-parser.y" +#line 294 "config-parser.y" /* yacc.c:1646 */ { struct ChannelConf *item = tmp; MyFree(item->invite); - item->invite = DupString((yyvsp[(3) - (4)].string)); + item->invite = DupString((yyvsp[-1].string)); } +#line 1736 "config-parser.c" /* yacc.c:1646 */ break; case 66: -#line 305 "config-parser.y" +#line 304 "config-parser.y" /* yacc.c:1646 */ { node_t *node; struct UserConf *item; @@ -1888,34 +1751,37 @@ yyreduce: tmp = (void *) item; } +#line 1755 "config-parser.c" /* yacc.c:1646 */ break; case 73: -#line 329 "config-parser.y" +#line 328 "config-parser.y" /* yacc.c:1646 */ { struct UserConf *item = (struct UserConf *) tmp; node_t *node; - node = node_create((void *) DupString((yyvsp[(3) - (4)].string))); + node = node_create((void *) DupString((yyvsp[-1].string))); list_add(item->masks, node); } +#line 1768 "config-parser.c" /* yacc.c:1646 */ break; case 74: -#line 339 "config-parser.y" +#line 338 "config-parser.y" /* yacc.c:1646 */ { struct UserConf *item = (struct UserConf *) tmp; node_t *node; - node = node_create((void *) DupString((yyvsp[(3) - (4)].string))); + node = node_create((void *) DupString((yyvsp[-1].string))); list_add(item->scanners, node); } +#line 1781 "config-parser.c" /* yacc.c:1646 */ break; case 75: -#line 351 "config-parser.y" +#line 350 "config-parser.y" /* yacc.c:1646 */ { node_t *node; struct ScannerConf *item, *olditem; @@ -1959,42 +1825,46 @@ yyreduce: list_add(ScannerItemList, node); tmp = (void *) item; } +#line 1829 "config-parser.c" /* yacc.c:1646 */ break; case 89: -#line 411 "config-parser.y" +#line 410 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; MyFree(item->name); - item->name = DupString((yyvsp[(3) - (4)].string)); + item->name = DupString((yyvsp[-1].string)); } +#line 1839 "config-parser.c" /* yacc.c:1646 */ break; case 90: -#line 418 "config-parser.y" +#line 417 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; MyFree(item->vhost); - item->vhost = DupString((yyvsp[(3) - (4)].string)); + item->vhost = DupString((yyvsp[-1].string)); } +#line 1849 "config-parser.c" /* yacc.c:1646 */ break; case 91: -#line 425 "config-parser.y" +#line 424 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; MyFree(item->target_ip); - item->target_ip = DupString((yyvsp[(3) - (4)].string)); + item->target_ip = DupString((yyvsp[-1].string)); } +#line 1859 "config-parser.c" /* yacc.c:1646 */ break; case 92: -#line 432 "config-parser.y" +#line 431 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; node_t *node; - node = node_create((yyvsp[(3) - (4)].string)); + node = node_create((yyvsp[-1].string)); if(item->target_string_created == 0) { @@ -2004,42 +1874,47 @@ yyreduce: list_add(item->target_string, node); } +#line 1878 "config-parser.c" /* yacc.c:1646 */ break; case 93: -#line 448 "config-parser.y" +#line 447 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; - item->fd = (yyvsp[(3) - (4)].number); + item->fd = (yyvsp[-1].number); } +#line 1887 "config-parser.c" /* yacc.c:1646 */ break; case 94: -#line 454 "config-parser.y" +#line 453 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; - item->target_port = (yyvsp[(3) - (4)].number); + item->target_port = (yyvsp[-1].number); } +#line 1896 "config-parser.c" /* yacc.c:1646 */ break; case 95: -#line 460 "config-parser.y" +#line 459 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; - item->timeout = (yyvsp[(3) - (4)].number); + item->timeout = (yyvsp[-1].number); } +#line 1905 "config-parser.c" /* yacc.c:1646 */ break; case 96: -#line 466 "config-parser.y" +#line 465 "config-parser.y" /* yacc.c:1646 */ { struct ScannerConf *item = (struct ScannerConf *) tmp; - item->max_read = (yyvsp[(3) - (4)].number); + item->max_read = (yyvsp[-1].number); } +#line 1914 "config-parser.c" /* yacc.c:1646 */ break; case 97: -#line 472 "config-parser.y" +#line 471 "config-parser.y" /* yacc.c:1646 */ { struct ProtocolConf *item; struct ScannerConf *item2; @@ -2047,42 +1922,46 @@ yyreduce: node_t *node; item = MyMalloc(sizeof *item); - item->type = (yyvsp[(3) - (6)].number); - item->port = (yyvsp[(5) - (6)].number); + item->type = (yyvsp[-3].number); + item->port = (yyvsp[-1].number); item2 = (struct ScannerConf *) tmp; node = node_create(item); list_add(item2->protocols, node); } +#line 1934 "config-parser.c" /* yacc.c:1646 */ break; case 107: -#line 503 "config-parser.y" +#line 502 "config-parser.y" /* yacc.c:1646 */ { MyFree(OpmItem->dnsbl_from); - OpmItem->dnsbl_from = DupString((yyvsp[(3) - (4)].string)); + OpmItem->dnsbl_from = DupString((yyvsp[-1].string)); } +#line 1943 "config-parser.c" /* yacc.c:1646 */ break; case 108: -#line 509 "config-parser.y" +#line 508 "config-parser.y" /* yacc.c:1646 */ { MyFree(OpmItem->dnsbl_to); - OpmItem->dnsbl_to = DupString((yyvsp[(3) - (4)].string)); + OpmItem->dnsbl_to = DupString((yyvsp[-1].string)); } +#line 1952 "config-parser.c" /* yacc.c:1646 */ break; case 109: -#line 515 "config-parser.y" +#line 514 "config-parser.y" /* yacc.c:1646 */ { MyFree(OpmItem->sendmail); - OpmItem->sendmail = DupString((yyvsp[(3) - (4)].string)); + OpmItem->sendmail = DupString((yyvsp[-1].string)); } +#line 1961 "config-parser.c" /* yacc.c:1646 */ break; case 110: -#line 523 "config-parser.y" +#line 522 "config-parser.y" /* yacc.c:1646 */ { node_t *node; struct BlacklistConf *item; @@ -2100,53 +1979,58 @@ yyreduce: tmp = (void *) item; } +#line 1983 "config-parser.c" /* yacc.c:1646 */ break; case 121: -#line 553 "config-parser.y" +#line 552 "config-parser.y" /* yacc.c:1646 */ { struct BlacklistConf *item = tmp; MyFree(item->name); - item->name = DupString((yyvsp[(3) - (4)].string)); + item->name = DupString((yyvsp[-1].string)); } +#line 1994 "config-parser.c" /* yacc.c:1646 */ break; case 122: -#line 560 "config-parser.y" +#line 559 "config-parser.y" /* yacc.c:1646 */ { struct BlacklistConf *item = tmp; MyFree(item->kline); - item->kline = DupString((yyvsp[(3) - (4)].string)); + item->kline = DupString((yyvsp[-1].string)); } +#line 2005 "config-parser.c" /* yacc.c:1646 */ break; case 123: -#line 567 "config-parser.y" +#line 566 "config-parser.y" /* yacc.c:1646 */ { struct BlacklistConf *item = tmp; - if(strcmp("A record bitmask", (yyvsp[(3) - (4)].string)) == 0) + if(strcmp("A record bitmask", (yyvsp[-1].string)) == 0) item->type = A_BITMASK; - else if(strcmp("A record reply", (yyvsp[(3) - (4)].string)) == 0) + else if(strcmp("A record reply", (yyvsp[-1].string)) == 0) item->type = A_REPLY; else yyerror("Unknown blacklist type defined"); } +#line 2020 "config-parser.c" /* yacc.c:1646 */ break; case 124: -#line 578 "config-parser.y" +#line 577 "config-parser.y" /* yacc.c:1646 */ { struct BlacklistConf *item = tmp; - item->ban_unknown = (yyvsp[(3) - (4)].number); + item->ban_unknown = (yyvsp[-1].number); } +#line 2030 "config-parser.c" /* yacc.c:1646 */ break; case 129: -#line 591 "config-parser.y" +#line 590 "config-parser.y" /* yacc.c:1646 */ { struct BlacklistReplyConf *item; struct BlacklistConf *blacklist = tmp; @@ -2154,29 +2038,41 @@ yyreduce: item = MyMalloc(sizeof *item); - item->number = (yyvsp[(1) - (4)].number); - item->type = DupString((yyvsp[(3) - (4)].string)); + item->number = (yyvsp[-3].number); + item->type = DupString((yyvsp[-1].string)); node = node_create(item); list_add(blacklist->reply, node); } +#line 2048 "config-parser.c" /* yacc.c:1646 */ break; case 136: -#line 618 "config-parser.y" +#line 617 "config-parser.y" /* yacc.c:1646 */ { node_t *node; - node = node_create(DupString((yyvsp[(3) - (4)].string))); + node = node_create(DupString((yyvsp[-1].string))); list_add(ExemptItem->masks, node); } +#line 2059 "config-parser.c" /* yacc.c:1646 */ break; -/* Line 1267 of yacc.c. */ -#line 2178 "config-parser.c" +#line 2063 "config-parser.c" /* yacc.c:1646 */ default: break; } + /* User semantic actions sometimes alter yychar, and that requires + that yytoken be updated with the new translation. We take the + approach of translating immediately before every use of yytoken. + One alternative is translating here after every semantic action, + but that translation would be missed if the semantic action invokes + YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or + if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an + incorrect destructor might then be invoked immediately. In the + case of YYERROR or YYBACKUP, subsequent parser actions might lead + to an incorrect destructor call or verbose syntax error message + before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); @@ -2185,8 +2081,7 @@ yyreduce: *++yyvsp = yyval; - - /* Now `shift' the result of the reduction. Determine what state + /* Now 'shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ @@ -2201,10 +2096,14 @@ yyreduce: goto yynewstate; -/*------------------------------------. -| yyerrlab -- here on detecting error | -`------------------------------------*/ +/*--------------------------------------. +| yyerrlab -- here on detecting error. | +`--------------------------------------*/ yyerrlab: + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); + /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { @@ -2212,37 +2111,36 @@ yyerrlab: #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else +# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ + yyssp, yytoken) { - YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); - if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) - { - YYSIZE_T yyalloc = 2 * yysize; - if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) - yyalloc = YYSTACK_ALLOC_MAXIMUM; - if (yymsg != yymsgbuf) - YYSTACK_FREE (yymsg); - yymsg = (char *) YYSTACK_ALLOC (yyalloc); - if (yymsg) - yymsg_alloc = yyalloc; - else - { - yymsg = yymsgbuf; - yymsg_alloc = sizeof yymsgbuf; - } - } - - if (0 < yysize && yysize <= yymsg_alloc) - { - (void) yysyntax_error (yymsg, yystate, yychar); - yyerror (yymsg); - } - else - { - yyerror (YY_("syntax error")); - if (yysize != 0) - goto yyexhaustedlab; - } + char const *yymsgp = YY_("syntax error"); + int yysyntax_error_status; + yysyntax_error_status = YYSYNTAX_ERROR; + if (yysyntax_error_status == 0) + yymsgp = yymsg; + else if (yysyntax_error_status == 1) + { + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); + yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); + if (!yymsg) + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + yysyntax_error_status = 2; + } + else + { + yysyntax_error_status = YYSYNTAX_ERROR; + yymsgp = yymsg; + } + } + yyerror (yymsgp); + if (yysyntax_error_status == 2) + goto yyexhaustedlab; } +# undef YYSYNTAX_ERROR #endif } @@ -2250,24 +2148,24 @@ yyerrlab: if (yyerrstatus == 3) { - /* If just tried and failed to reuse look-ahead token after an - error, discard it. */ + /* If just tried and failed to reuse lookahead token after an + error, discard it. */ if (yychar <= YYEOF) - { - /* Return failure if at end of input. */ - if (yychar == YYEOF) - YYABORT; - } + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } else - { - yydestruct ("Error: discarding", - yytoken, &yylval); - yychar = YYEMPTY; - } + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } - /* Else will try to reuse look-ahead token after shifting the error + /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; @@ -2283,7 +2181,7 @@ yyerrorlab: if (/*CONSTCOND*/ 0) goto yyerrorlab; - /* Do not reclaim the symbols of the rule which action triggered + /* Do not reclaim the symbols of the rule whose action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; @@ -2296,38 +2194,37 @@ yyerrorlab: | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: - yyerrstatus = 3; /* Each real token shifted decrements this. */ + yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; - if (yyn != YYPACT_NINF) - { - yyn += YYTERROR; - if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) - { - yyn = yytable[yyn]; - if (0 < yyn) - break; - } - } + if (!yypact_value_is_default (yyn)) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) - YYABORT; + YYABORT; yydestruct ("Error: popping", - yystos[yystate], yyvsp); + yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } - if (yyn == YYFINAL) - YYACCEPT; - + YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN *++yyvsp = yylval; + YY_IGNORE_MAYBE_UNINITIALIZED_END /* Shift the error token. */ @@ -2351,7 +2248,7 @@ yyabortlab: yyresult = 1; goto yyreturn; -#ifndef yyoverflow +#if !defined yyoverflow || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ @@ -2362,17 +2259,22 @@ yyexhaustedlab: #endif yyreturn: - if (yychar != YYEOF && yychar != YYEMPTY) - yydestruct ("Cleanup: discarding lookahead", - yytoken, &yylval); - /* Do not reclaim the symbols of the rule which action triggered + if (yychar != YYEMPTY) + { + /* Make sure we have latest lookahead translation. See comments at + user semantic actions for why this is necessary. */ + yytoken = YYTRANSLATE (yychar); + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + } + /* Do not reclaim the symbols of the rule whose action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", - yystos[*yyssp], yyvsp); + yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow @@ -2383,11 +2285,7 @@ yyreturn: if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif - /* Make sure YYID is used. */ - return YYID (yyresult); + return yyresult; } - - -#line 625 "config-parser.y" - +#line 624 "config-parser.y" /* yacc.c:1906 */ diff --git a/src/config-parser.h b/src/config-parser.h index 35ee1a6..b2e7144 100644 --- a/src/config-parser.h +++ b/src/config-parser.h @@ -1,14 +1,13 @@ -/* A Bison parser, made by GNU Bison 2.3. */ +/* A Bison parser, made by GNU Bison 3.0.2. */ -/* Skeleton interface for Bison's Yacc-like parsers in C +/* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 - Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. - This program is free software; you can redistribute it and/or modify + 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 2, or (at your option) - any later version. + 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 @@ -16,9 +15,7 @@ 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, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, - Boston, MA 02110-1301, USA. */ + along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work @@ -33,59 +30,68 @@ This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ -/* Tokens. */ +#ifndef YY_YY_CONFIG_PARSER_H_INCLUDED +# define YY_YY_CONFIG_PARSER_H_INCLUDED +/* Debug traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif +#if YYDEBUG +extern int yydebug; +#endif + +/* Token type. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE - /* Put the tokens into the symbol table, so that GDB and other debuggers - know about them. */ - enum yytokentype { - AWAY = 258, - BAN_UNKNOWN = 259, - BLACKLIST = 260, - CHANNEL = 261, - CONNREGEX = 262, - DNS_FDLIMIT = 263, - DNSBL_FROM = 264, - DNSBL_TO = 265, - EXEMPT = 266, - FD = 267, - INVITE = 268, - IRC = 269, - KLINE = 270, - KEY = 271, - MASK = 272, - MAX_READ = 273, - MODE = 274, - NAME = 275, - NEGCACHE = 276, - NICK = 277, - NICKSERV = 278, - OPER = 279, - OPM = 280, - OPTIONS = 281, - PASSWORD = 282, - PERFORM = 283, - PIDFILE = 284, - PORT = 285, - PROTOCOL = 286, - PROTOCOLTYPE = 287, - REALNAME = 288, - REPLY = 289, - SCANLOG = 290, - SCANNER = 291, - SENDMAIL = 292, - SERVER = 293, - TARGET_IP = 294, - TARGET_PORT = 295, - TARGET_STRING = 296, - TIMEOUT = 297, - TYPE = 298, - USERNAME = 299, - USER = 300, - VHOST = 301, - NUMBER = 302, - STRING = 303 - }; + enum yytokentype + { + AWAY = 258, + BAN_UNKNOWN = 259, + BLACKLIST = 260, + CHANNEL = 261, + CONNREGEX = 262, + DNS_FDLIMIT = 263, + DNSBL_FROM = 264, + DNSBL_TO = 265, + EXEMPT = 266, + FD = 267, + INVITE = 268, + IRC = 269, + KLINE = 270, + KEY = 271, + MASK = 272, + MAX_READ = 273, + MODE = 274, + NAME = 275, + NEGCACHE = 276, + NICK = 277, + NICKSERV = 278, + OPER = 279, + OPM = 280, + OPTIONS = 281, + PASSWORD = 282, + PERFORM = 283, + PIDFILE = 284, + PORT = 285, + PROTOCOL = 286, + REALNAME = 287, + REPLY = 288, + SCANLOG = 289, + SCANNER = 290, + SENDMAIL = 291, + SERVER = 292, + TARGET_IP = 293, + TARGET_PORT = 294, + TARGET_STRING = 295, + TIMEOUT = 296, + TYPE = 297, + USERNAME = 298, + USER = 299, + VHOST = 300, + NUMBER = 301, + STRING = 302, + PROTOCOLTYPE = 303 + }; #endif /* Tokens. */ #define AWAY 258 @@ -117,41 +123,43 @@ #define PIDFILE 284 #define PORT 285 #define PROTOCOL 286 -#define PROTOCOLTYPE 287 -#define REALNAME 288 -#define REPLY 289 -#define SCANLOG 290 -#define SCANNER 291 -#define SENDMAIL 292 -#define SERVER 293 -#define TARGET_IP 294 -#define TARGET_PORT 295 -#define TARGET_STRING 296 -#define TIMEOUT 297 -#define TYPE 298 -#define USERNAME 299 -#define USER 300 -#define VHOST 301 -#define NUMBER 302 -#define STRING 303 - - - +#define REALNAME 287 +#define REPLY 288 +#define SCANLOG 289 +#define SCANNER 290 +#define SENDMAIL 291 +#define SERVER 292 +#define TARGET_IP 293 +#define TARGET_PORT 294 +#define TARGET_STRING 295 +#define TIMEOUT 296 +#define TYPE 297 +#define USERNAME 298 +#define USER 299 +#define VHOST 300 +#define NUMBER 301 +#define STRING 302 +#define PROTOCOLTYPE 303 +/* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE -#line 82 "config-parser.y" +typedef union YYSTYPE YYSTYPE; +union YYSTYPE { +#line 81 "config-parser.y" /* yacc.c:1909 */ + int number; char *string; -} -/* Line 1529 of yacc.c. */ -#line 150 "y.tab.h" - YYSTYPE; -# define yystype YYSTYPE /* obsolescent; will be withdrawn */ -# define YYSTYPE_IS_DECLARED 1 + +#line 155 "config-parser.h" /* yacc.c:1909 */ +}; # define YYSTYPE_IS_TRIVIAL 1 +# define YYSTYPE_IS_DECLARED 1 #endif + extern YYSTYPE yylval; +int yyparse (void); + +#endif /* !YY_YY_CONFIG_PARSER_H_INCLUDED */ diff --git a/src/config-parser.y b/src/config-parser.y index 5429037..31da576 100644 --- a/src/config-parser.y +++ b/src/config-parser.y @@ -62,7 +62,6 @@ void *tmp; /* Variable to temporarily hold nodes before insertion to list %token PIDFILE %token PORT %token PROTOCOL -%token PROTOCOLTYPE %token REALNAME %token REPLY %token SCANLOG -- 2.30.2