diff options
| author | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
|---|---|---|
| committer | Simeon Simeonov | 2018-02-26 11:23:00 +0100 |
| commit | 0b3cbf57875fd692e4ba0b336fefa4bee1ed00dc (patch) | |
| tree | af916a30553c78ce9d4f2d8658656a175c5b6921 /src/quote_fmt_parse.c | |
Initial commit for sylpheed 3.7.0
Diffstat (limited to 'src/quote_fmt_parse.c')
| -rw-r--r-- | src/quote_fmt_parse.c | 2199 |
1 files changed, 2199 insertions, 0 deletions
diff --git a/src/quote_fmt_parse.c b/src/quote_fmt_parse.c new file mode 100644 index 0000000..066033f --- /dev/null +++ b/src/quote_fmt_parse.c | |||
| @@ -0,0 +1,2199 @@ | |||
| 1 | /* A Bison parser, made by GNU Bison 2.3. */ | ||
| 2 | |||
| 3 | /* Skeleton implementation for Bison's Yacc-like parsers in C | ||
| 4 | |||
| 5 | Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006 | ||
| 6 | Free Software Foundation, Inc. | ||
| 7 | |||
| 8 | This program is free software; you can redistribute it and/or modify | ||
| 9 | it under the terms of the GNU General Public License as published by | ||
| 10 | the Free Software Foundation; either version 2, or (at your option) | ||
| 11 | any later version. | ||
| 12 | |||
| 13 | This program is distributed in the hope that it will be useful, | ||
| 14 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 16 | GNU General Public License for more details. | ||
| 17 | |||
| 18 | You should have received a copy of the GNU General Public License | ||
| 19 | along with this program; if not, write to the Free Software | ||
| 20 | Foundation, Inc., 51 Franklin Street, Fifth Floor, | ||
| 21 | Boston, MA 02110-1301, USA. */ | ||
| 22 | |||
| 23 | /* As a special exception, you may create a larger work that contains | ||
| 24 | part or all of the Bison parser skeleton and distribute that work | ||
| 25 | under terms of your choice, so long as that work isn't itself a | ||
| 26 | parser generator using the skeleton or a modified version thereof | ||
| 27 | as a parser skeleton. Alternatively, if you modify or redistribute | ||
| 28 | the parser skeleton itself, you may (at your option) remove this | ||
| 29 | special exception, which will cause the skeleton and the resulting | ||
| 30 | Bison output files to be licensed under the GNU General Public | ||
| 31 | License without this special exception. | ||
| 32 | |||
| 33 | This special exception was added by the Free Software Foundation in | ||
| 34 | version 2.2 of Bison. */ | ||
| 35 | |||
| 36 | /* C LALR(1) parser skeleton written by Richard Stallman, by | ||
| 37 | simplifying the original so-called "semantic" parser. */ | ||
| 38 | |||
| 39 | /* All symbols defined below should begin with yy or YY, to avoid | ||
| 40 | infringing on user name space. This should be done even for local | ||
| 41 | variables, as they might otherwise be expanded by user macros. | ||
| 42 | There are some unavoidable exceptions within include files to | ||
| 43 | define necessary library symbols; they are noted "INFRINGES ON | ||
| 44 | USER NAME SPACE" below. */ | ||
| 45 | |||
| 46 | /* Identify Bison output. */ | ||
| 47 | #define YYBISON 1 | ||
| 48 | |||
| 49 | /* Bison version. */ | ||
| 50 | #define YYBISON_VERSION "2.3" | ||
| 51 | |||
| 52 | /* Skeleton name. */ | ||
| 53 | #define YYSKELETON_NAME "yacc.c" | ||
| 54 | |||
| 55 | /* Pure parsers. */ | ||
| 56 | #define YYPURE 0 | ||
| 57 | |||
| 58 | /* Using locations. */ | ||
| 59 | #define YYLSP_NEEDED 0 | ||
| 60 | |||
| 61 | |||
| 62 | |||
| 63 | /* Tokens. */ | ||
| 64 | #ifndef YYTOKENTYPE | ||
| 65 | # define YYTOKENTYPE | ||
| 66 | /* Put the tokens into the symbol table, so that GDB and other debuggers | ||
| 67 | know about them. */ | ||
| 68 | enum yytokentype { | ||
| 69 | SHOW_NEWSGROUPS = 258, | ||
| 70 | SHOW_DATE = 259, | ||
| 71 | SHOW_FROM = 260, | ||
| 72 | SHOW_FULLNAME = 261, | ||
| 73 | SHOW_FIRST_NAME = 262, | ||
| 74 | SHOW_SENDER_INITIAL = 263, | ||
| 75 | SHOW_SUBJECT = 264, | ||
| 76 | SHOW_TO = 265, | ||
| 77 | SHOW_MESSAGEID = 266, | ||
| 78 | SHOW_PERCENT = 267, | ||
| 79 | SHOW_CC = 268, | ||
| 80 | SHOW_REFERENCES = 269, | ||
| 81 | SHOW_MESSAGE = 270, | ||
| 82 | SHOW_QUOTED_MESSAGE = 271, | ||
| 83 | SHOW_BACKSLASH = 272, | ||
| 84 | SHOW_TAB = 273, | ||
| 85 | SHOW_QUOTED_MESSAGE_NO_SIGNATURE = 274, | ||
| 86 | SHOW_MESSAGE_NO_SIGNATURE = 275, | ||
| 87 | SHOW_EOL = 276, | ||
| 88 | SHOW_QUESTION_MARK = 277, | ||
| 89 | SHOW_OPARENT = 278, | ||
| 90 | SHOW_CPARENT = 279, | ||
| 91 | QUERY_DATE = 280, | ||
| 92 | QUERY_FROM = 281, | ||
| 93 | QUERY_FULLNAME = 282, | ||
| 94 | QUERY_SUBJECT = 283, | ||
| 95 | QUERY_TO = 284, | ||
| 96 | QUERY_NEWSGROUPS = 285, | ||
| 97 | QUERY_MESSAGEID = 286, | ||
| 98 | QUERY_CC = 287, | ||
| 99 | QUERY_REFERENCES = 288, | ||
| 100 | OPARENT = 289, | ||
| 101 | CPARENT = 290, | ||
| 102 | CHARACTER = 291 | ||
| 103 | }; | ||
| 104 | #endif | ||
| 105 | /* Tokens. */ | ||
| 106 | #define SHOW_NEWSGROUPS 258 | ||
| 107 | #define SHOW_DATE 259 | ||
| 108 | #define SHOW_FROM 260 | ||
| 109 | #define SHOW_FULLNAME 261 | ||
| 110 | #define SHOW_FIRST_NAME 262 | ||
| 111 | #define SHOW_SENDER_INITIAL 263 | ||
| 112 | #define SHOW_SUBJECT 264 | ||
| 113 | #define SHOW_TO 265 | ||
| 114 | #define SHOW_MESSAGEID 266 | ||
| 115 | #define SHOW_PERCENT 267 | ||
| 116 | #define SHOW_CC 268 | ||
| 117 | #define SHOW_REFERENCES 269 | ||
| 118 | #define SHOW_MESSAGE 270 | ||
| 119 | #define SHOW_QUOTED_MESSAGE 271 | ||
| 120 | #define SHOW_BACKSLASH 272 | ||
| 121 | #define SHOW_TAB 273 | ||
| 122 | #define SHOW_QUOTED_MESSAGE_NO_SIGNATURE 274 | ||
| 123 | #define SHOW_MESSAGE_NO_SIGNATURE 275 | ||
| 124 | #define SHOW_EOL 276 | ||
| 125 | #define SHOW_QUESTION_MARK 277 | ||
| 126 | #define SHOW_OPARENT 278 | ||
| 127 | #define SHOW_CPARENT 279 | ||
| 128 | #define QUERY_DATE 280 | ||
| 129 | #define QUERY_FROM 281 | ||
| 130 | #define QUERY_FULLNAME 282 | ||
| 131 | #define QUERY_SUBJECT 283 | ||
| 132 | #define QUERY_TO 284 | ||
| 133 | #define QUERY_NEWSGROUPS 285 | ||
| 134 | #define QUERY_MESSAGEID 286 | ||
| 135 | #define QUERY_CC 287 | ||
| 136 | #define QUERY_REFERENCES 288 | ||
| 137 | #define OPARENT 289 | ||
| 138 | #define CPARENT 290 | ||
| 139 | #define CHARACTER 291 | ||
| 140 | |||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | /* Copy the first part of user declarations. */ | ||
| 145 | #line 1 "quote_fmt_parse.y" | ||
| 146 | |||
| 147 | |||
| 148 | #include "defs.h" | ||
| 149 | |||
| 150 | #include <glib.h> | ||
| 151 | #include <ctype.h> | ||
| 152 | |||
| 153 | #include "procmsg.h" | ||
| 154 | #include "procmime.h" | ||
| 155 | #include "utils.h" | ||
| 156 | |||
| 157 | #include "quote_fmt.h" | ||
| 158 | #include "quote_fmt_lex.h" | ||
| 159 | |||
| 160 | /* decl */ | ||
| 161 | /* | ||
| 162 | flex quote_fmt.l | ||
| 163 | bison -p quote_fmt quote_fmt.y | ||
| 164 | */ | ||
| 165 | |||
| 166 | int yylex(void); | ||
| 167 | |||
| 168 | static MsgInfo *msginfo = NULL; | ||
| 169 | static gboolean *visible = NULL; | ||
| 170 | static gint maxsize = 0; | ||
| 171 | static gint stacksize = 0; | ||
| 172 | |||
| 173 | static gchar *buffer = NULL; | ||
| 174 | static gint bufmax = 0; | ||
| 175 | static gint bufsize = 0; | ||
| 176 | static const gchar *quote_str = NULL; | ||
| 177 | static const gchar *body = NULL; | ||
| 178 | static gint error = 0; | ||
| 179 | |||
| 180 | static void add_visibility(gboolean val) | ||
| 181 | { | ||
| 182 | stacksize++; | ||
| 183 | if (maxsize < stacksize) { | ||
| 184 | maxsize += 128; | ||
| 185 | visible = g_realloc(visible, maxsize * sizeof(gboolean)); | ||
| 186 | if (visible == NULL) | ||
| 187 | maxsize = 0; | ||
| 188 | } | ||
| 189 | |||
| 190 | visible[stacksize - 1] = val; | ||
| 191 | } | ||
| 192 | |||
| 193 | static void remove_visibility(void) | ||
| 194 | { | ||
| 195 | stacksize--; | ||
| 196 | } | ||
| 197 | |||
| 198 | static void add_buffer(const gchar *s) | ||
| 199 | { | ||
| 200 | gint len; | ||
| 201 | |||
| 202 | len = strlen(s); | ||
| 203 | if (bufsize + len + 1 > bufmax) { | ||
| 204 | if (bufmax == 0) | ||
| 205 | bufmax = 128; | ||
| 206 | while (bufsize + len + 1 > bufmax) | ||
| 207 | bufmax *= 2; | ||
| 208 | buffer = g_realloc(buffer, bufmax); | ||
| 209 | } | ||
| 210 | strcpy(buffer + bufsize, s); | ||
| 211 | bufsize += len; | ||
| 212 | } | ||
| 213 | |||
| 214 | #if 0 | ||
| 215 | static void flush_buffer(void) | ||
| 216 | { | ||
| 217 | if (buffer != NULL) | ||
| 218 | *buffer = '\0'; | ||
| 219 | bufsize = 0; | ||
| 220 | } | ||
| 221 | #endif | ||
| 222 | |||
| 223 | gchar *quote_fmt_get_buffer(void) | ||
| 224 | { | ||
| 225 | if (error != 0) | ||
| 226 | return NULL; | ||
| 227 | else | ||
| 228 | return buffer; | ||
| 229 | } | ||
| 230 | |||
| 231 | #define INSERT(buf) \ | ||
| 232 | if (stacksize != 0 && visible[stacksize - 1]) \ | ||
| 233 | add_buffer(buf) | ||
| 234 | |||
| 235 | #define INSERT_CHARACTER(chr) \ | ||
| 236 | if (stacksize != 0 && visible[stacksize - 1]) { \ | ||
| 237 | gchar tmp[2]; \ | ||
| 238 | tmp[0] = (chr); \ | ||
| 239 | tmp[1] = '\0'; \ | ||
| 240 | add_buffer(tmp); \ | ||
| 241 | } | ||
| 242 | |||
| 243 | void quote_fmt_init(MsgInfo *info, const gchar *my_quote_str, | ||
| 244 | const gchar *my_body) | ||
| 245 | { | ||
| 246 | quote_str = my_quote_str; | ||
| 247 | body = my_body; | ||
| 248 | msginfo = info; | ||
| 249 | stacksize = 0; | ||
| 250 | add_visibility(TRUE); | ||
| 251 | if (buffer != NULL) | ||
| 252 | *buffer = 0; | ||
| 253 | bufsize = 0; | ||
| 254 | error = 0; | ||
| 255 | } | ||
| 256 | |||
| 257 | void quote_fmterror(char *str) | ||
| 258 | { | ||
| 259 | g_warning("Error: %s\n", str); | ||
| 260 | error = 1; | ||
| 261 | } | ||
| 262 | |||
| 263 | int quote_fmtwrap(void) | ||
| 264 | { | ||
| 265 | return 1; | ||
| 266 | } | ||
| 267 | |||
| 268 | static int isseparator(int ch) | ||
| 269 | { | ||
| 270 | return g_ascii_isspace(ch) || ch == '.' || ch == '-'; | ||
| 271 | } | ||
| 272 | |||
| 273 | |||
| 274 | /* Enabling traces. */ | ||
| 275 | #ifndef YYDEBUG | ||
| 276 | # define YYDEBUG 0 | ||
| 277 | #endif | ||
| 278 | |||
| 279 | /* Enabling verbose error messages. */ | ||
| 280 | #ifdef YYERROR_VERBOSE | ||
| 281 | # undef YYERROR_VERBOSE | ||
| 282 | # define YYERROR_VERBOSE 1 | ||
| 283 | #else | ||
| 284 | # define YYERROR_VERBOSE 0 | ||
| 285 | #endif | ||
| 286 | |||
| 287 | /* Enabling the token table. */ | ||
| 288 | #ifndef YYTOKEN_TABLE | ||
| 289 | # define YYTOKEN_TABLE 0 | ||
| 290 | #endif | ||
| 291 | |||
| 292 | #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED | ||
| 293 | typedef union YYSTYPE | ||
| 294 | #line 129 "quote_fmt_parse.y" | ||
| 295 | { | ||
| 296 | char chr; | ||
| 297 | } | ||
| 298 | /* Line 187 of yacc.c. */ | ||
| 299 | #line 300 "quote_fmt_parse.c" | ||
| 300 | YYSTYPE; | ||
| 301 | # define yystype YYSTYPE /* obsolescent; will be withdrawn */ | ||
| 302 | # define YYSTYPE_IS_DECLARED 1 | ||
| 303 | # define YYSTYPE_IS_TRIVIAL 1 | ||
| 304 | #endif | ||
| 305 | |||
| 306 | |||
| 307 | |||
| 308 | /* Copy the second part of user declarations. */ | ||
| 309 | |||
| 310 | |||
| 311 | /* Line 216 of yacc.c. */ | ||
| 312 | #line 313 "quote_fmt_parse.c" | ||
| 313 | |||
| 314 | #ifdef short | ||
| 315 | # undef short | ||
| 316 | #endif | ||
| 317 | |||
| 318 | #ifdef YYTYPE_UINT8 | ||
| 319 | typedef YYTYPE_UINT8 yytype_uint8; | ||
| 320 | #else | ||
| 321 | typedef unsigned char yytype_uint8; | ||
| 322 | #endif | ||
| 323 | |||
| 324 | #ifdef YYTYPE_INT8 | ||
| 325 | typedef YYTYPE_INT8 yytype_int8; | ||
| 326 | #elif (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 327 | || defined __cplusplus || defined _MSC_VER) | ||
| 328 | typedef signed char yytype_int8; | ||
| 329 | #else | ||
| 330 | typedef short int yytype_int8; | ||
| 331 | #endif | ||
| 332 | |||
| 333 | #ifdef YYTYPE_UINT16 | ||
| 334 | typedef YYTYPE_UINT16 yytype_uint16; | ||
| 335 | #else | ||
| 336 | typedef unsigned short int yytype_uint16; | ||
| 337 | #endif | ||
| 338 | |||
| 339 | #ifdef YYTYPE_INT16 | ||
| 340 | typedef YYTYPE_INT16 yytype_int16; | ||
| 341 | #else | ||
| 342 | typedef short int yytype_int16; | ||
| 343 | #endif | ||
| 344 | |||
| 345 | #ifndef YYSIZE_T | ||
| 346 | # ifdef __SIZE_TYPE__ | ||
| 347 | # define YYSIZE_T __SIZE_TYPE__ | ||
| 348 | # elif defined size_t | ||
| 349 | # define YYSIZE_T size_t | ||
| 350 | # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 351 | || defined __cplusplus || defined _MSC_VER) | ||
| 352 | # include <stddef.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 353 | # define YYSIZE_T size_t | ||
| 354 | # else | ||
| 355 | # define YYSIZE_T unsigned int | ||
| 356 | # endif | ||
| 357 | #endif | ||
| 358 | |||
| 359 | #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) | ||
| 360 | |||
| 361 | #ifndef YY_ | ||
| 362 | # if YYENABLE_NLS | ||
| 363 | # if ENABLE_NLS | ||
| 364 | # include <libintl.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 365 | # define YY_(msgid) dgettext ("bison-runtime", msgid) | ||
| 366 | # endif | ||
| 367 | # endif | ||
| 368 | # ifndef YY_ | ||
| 369 | # define YY_(msgid) msgid | ||
| 370 | # endif | ||
| 371 | #endif | ||
| 372 | |||
| 373 | /* Suppress unused-variable warnings by "using" E. */ | ||
| 374 | #if ! defined lint || defined __GNUC__ | ||
| 375 | # define YYUSE(e) ((void) (e)) | ||
| 376 | #else | ||
| 377 | # define YYUSE(e) /* empty */ | ||
| 378 | #endif | ||
| 379 | |||
| 380 | /* Identity function, used to suppress warnings about constant conditions. */ | ||
| 381 | #ifndef lint | ||
| 382 | # define YYID(n) (n) | ||
| 383 | #else | ||
| 384 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 385 | || defined __cplusplus || defined _MSC_VER) | ||
| 386 | static int | ||
| 387 | YYID (int i) | ||
| 388 | #else | ||
| 389 | static int | ||
| 390 | YYID (i) | ||
| 391 | int i; | ||
| 392 | #endif | ||
| 393 | { | ||
| 394 | return i; | ||
| 395 | } | ||
| 396 | #endif | ||
| 397 | |||
| 398 | #if ! defined yyoverflow || YYERROR_VERBOSE | ||
| 399 | |||
| 400 | /* The parser invokes alloca or malloc; define the necessary symbols. */ | ||
| 401 | |||
| 402 | # ifdef YYSTACK_USE_ALLOCA | ||
| 403 | # if YYSTACK_USE_ALLOCA | ||
| 404 | # ifdef __GNUC__ | ||
| 405 | # define YYSTACK_ALLOC __builtin_alloca | ||
| 406 | # elif defined __BUILTIN_VA_ARG_INCR | ||
| 407 | # include <alloca.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 408 | # elif defined _AIX | ||
| 409 | # define YYSTACK_ALLOC __alloca | ||
| 410 | # elif defined _MSC_VER | ||
| 411 | # include <malloc.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 412 | # define alloca _alloca | ||
| 413 | # else | ||
| 414 | # define YYSTACK_ALLOC alloca | ||
| 415 | # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 416 | || defined __cplusplus || defined _MSC_VER) | ||
| 417 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 418 | # ifndef _STDLIB_H | ||
| 419 | # define _STDLIB_H 1 | ||
| 420 | # endif | ||
| 421 | # endif | ||
| 422 | # endif | ||
| 423 | # endif | ||
| 424 | # endif | ||
| 425 | |||
| 426 | # ifdef YYSTACK_ALLOC | ||
| 427 | /* Pacify GCC's `empty if-body' warning. */ | ||
| 428 | # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) | ||
| 429 | # ifndef YYSTACK_ALLOC_MAXIMUM | ||
| 430 | /* The OS might guarantee only one guard page at the bottom of the stack, | ||
| 431 | and a page size can be as small as 4096 bytes. So we cannot safely | ||
| 432 | invoke alloca (N) if N exceeds 4096. Use a slightly smaller number | ||
| 433 | to allow for a few compiler-allocated temporary stack slots. */ | ||
| 434 | # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ | ||
| 435 | # endif | ||
| 436 | # else | ||
| 437 | # define YYSTACK_ALLOC YYMALLOC | ||
| 438 | # define YYSTACK_FREE YYFREE | ||
| 439 | # ifndef YYSTACK_ALLOC_MAXIMUM | ||
| 440 | # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM | ||
| 441 | # endif | ||
| 442 | # if (defined __cplusplus && ! defined _STDLIB_H \ | ||
| 443 | && ! ((defined YYMALLOC || defined malloc) \ | ||
| 444 | && (defined YYFREE || defined free))) | ||
| 445 | # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 446 | # ifndef _STDLIB_H | ||
| 447 | # define _STDLIB_H 1 | ||
| 448 | # endif | ||
| 449 | # endif | ||
| 450 | # ifndef YYMALLOC | ||
| 451 | # define YYMALLOC malloc | ||
| 452 | # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 453 | || defined __cplusplus || defined _MSC_VER) | ||
| 454 | void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ | ||
| 455 | # endif | ||
| 456 | # endif | ||
| 457 | # ifndef YYFREE | ||
| 458 | # define YYFREE free | ||
| 459 | # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 460 | || defined __cplusplus || defined _MSC_VER) | ||
| 461 | void free (void *); /* INFRINGES ON USER NAME SPACE */ | ||
| 462 | # endif | ||
| 463 | # endif | ||
| 464 | # endif | ||
| 465 | #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ | ||
| 466 | |||
| 467 | |||
| 468 | #if (! defined yyoverflow \ | ||
| 469 | && (! defined __cplusplus \ | ||
| 470 | || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) | ||
| 471 | |||
| 472 | /* A type that is properly aligned for any stack member. */ | ||
| 473 | union yyalloc | ||
| 474 | { | ||
| 475 | yytype_int16 yyss; | ||
| 476 | YYSTYPE yyvs; | ||
| 477 | }; | ||
| 478 | |||
| 479 | /* The size of the maximum gap between one aligned stack and the next. */ | ||
| 480 | # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) | ||
| 481 | |||
| 482 | /* The size of an array large to enough to hold all stacks, each with | ||
| 483 | N elements. */ | ||
| 484 | # define YYSTACK_BYTES(N) \ | ||
| 485 | ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ | ||
| 486 | + YYSTACK_GAP_MAXIMUM) | ||
| 487 | |||
| 488 | /* Copy COUNT objects from FROM to TO. The source and destination do | ||
| 489 | not overlap. */ | ||
| 490 | # ifndef YYCOPY | ||
| 491 | # if defined __GNUC__ && 1 < __GNUC__ | ||
| 492 | # define YYCOPY(To, From, Count) \ | ||
| 493 | __builtin_memcpy (To, From, (Count) * sizeof (*(From))) | ||
| 494 | # else | ||
| 495 | # define YYCOPY(To, From, Count) \ | ||
| 496 | do \ | ||
| 497 | { \ | ||
| 498 | YYSIZE_T yyi; \ | ||
| 499 | for (yyi = 0; yyi < (Count); yyi++) \ | ||
| 500 | (To)[yyi] = (From)[yyi]; \ | ||
| 501 | } \ | ||
| 502 | while (YYID (0)) | ||
| 503 | # endif | ||
| 504 | # endif | ||
| 505 | |||
| 506 | /* Relocate STACK from its old location to the new one. The | ||
| 507 | local variables YYSIZE and YYSTACKSIZE give the old and new number of | ||
| 508 | elements in the stack, and YYPTR gives the new location of the | ||
| 509 | stack. Advance YYPTR to a properly aligned location for the next | ||
| 510 | stack. */ | ||
| 511 | # define YYSTACK_RELOCATE(Stack) \ | ||
| 512 | do \ | ||
| 513 | { \ | ||
| 514 | YYSIZE_T yynewbytes; \ | ||
| 515 | YYCOPY (&yyptr->Stack, Stack, yysize); \ | ||
| 516 | Stack = &yyptr->Stack; \ | ||
| 517 | yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ | ||
| 518 | yyptr += yynewbytes / sizeof (*yyptr); \ | ||
| 519 | } \ | ||
| 520 | while (YYID (0)) | ||
| 521 | |||
| 522 | #endif | ||
| 523 | |||
| 524 | /* YYFINAL -- State number of the termination state. */ | ||
| 525 | #define YYFINAL 48 | ||
| 526 | /* YYLAST -- Last index in YYTABLE. */ | ||
| 527 | #define YYLAST 61 | ||
| 528 | |||
| 529 | /* YYNTOKENS -- Number of terminals. */ | ||
| 530 | #define YYNTOKENS 37 | ||
| 531 | /* YYNNTS -- Number of nonterminals. */ | ||
| 532 | #define YYNNTS 16 | ||
| 533 | /* YYNRULES -- Number of rules. */ | ||
| 534 | #define YYNRULES 48 | ||
| 535 | /* YYNRULES -- Number of states. */ | ||
| 536 | #define YYNSTATES 77 | ||
| 537 | |||
| 538 | /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ | ||
| 539 | #define YYUNDEFTOK 2 | ||
| 540 | #define YYMAXUTOK 291 | ||
| 541 | |||
| 542 | #define YYTRANSLATE(YYX) \ | ||
| 543 | ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) | ||
| 544 | |||
| 545 | /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ | ||
| 546 | static const yytype_uint8 yytranslate[] = | ||
| 547 | { | ||
| 548 | 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 549 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 550 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 551 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 552 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 553 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 554 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 555 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 556 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 557 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 558 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 559 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 560 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 561 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 562 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 563 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 564 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 565 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 566 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 567 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 568 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 569 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 570 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 571 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 572 | 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, | ||
| 573 | 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, | ||
| 574 | 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | ||
| 575 | 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, | ||
| 576 | 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, | ||
| 577 | 35, 36 | ||
| 578 | }; | ||
| 579 | |||
| 580 | #if YYDEBUG | ||
| 581 | /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in | ||
| 582 | YYRHS. */ | ||
| 583 | static const yytype_uint8 yyprhs[] = | ||
| 584 | { | ||
| 585 | 0, 0, 3, 5, 8, 10, 12, 14, 16, 18, | ||
| 586 | 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, | ||
| 587 | 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, | ||
| 588 | 60, 62, 63, 69, 70, 76, 77, 83, 84, 90, | ||
| 589 | 91, 97, 98, 104, 105, 111, 112, 118, 119 | ||
| 590 | }; | ||
| 591 | |||
| 592 | /* YYRHS -- A `-1'-separated list of the rules' RHS. */ | ||
| 593 | static const yytype_int8 yyrhs[] = | ||
| 594 | { | ||
| 595 | 38, 0, -1, 39, -1, 40, 39, -1, 40, -1, | ||
| 596 | 42, -1, 41, -1, 43, -1, 36, -1, 3, -1, | ||
| 597 | 4, -1, 5, -1, 6, -1, 7, -1, 8, -1, | ||
| 598 | 9, -1, 10, -1, 11, -1, 12, -1, 13, -1, | ||
| 599 | 14, -1, 15, -1, 16, -1, 20, -1, 19, -1, | ||
| 600 | 17, -1, 18, -1, 21, -1, 22, -1, 23, -1, | ||
| 601 | 24, -1, -1, 25, 44, 34, 38, 35, -1, -1, | ||
| 602 | 26, 45, 34, 38, 35, -1, -1, 27, 46, 34, | ||
| 603 | 38, 35, -1, -1, 28, 47, 34, 38, 35, -1, | ||
| 604 | -1, 29, 48, 34, 38, 35, -1, -1, 30, 49, | ||
| 605 | 34, 38, 35, -1, -1, 31, 50, 34, 38, 35, | ||
| 606 | -1, -1, 32, 51, 34, 38, 35, -1, -1, 33, | ||
| 607 | 52, 34, 38, 35, -1 | ||
| 608 | }; | ||
| 609 | |||
| 610 | /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ | ||
| 611 | static const yytype_uint16 yyrline[] = | ||
| 612 | { | ||
| 613 | 0, 154, 154, 157, 158, 161, 162, 166, 170, 174, | ||
| 614 | 179, 190, 195, 200, 216, 243, 248, 253, 258, 262, | ||
| 615 | 267, 272, 293, 316, 339, 364, 368, 372, 376, 380, | ||
| 616 | 384, 391, 390, 399, 398, 407, 406, 415, 414, 423, | ||
| 617 | 422, 431, 430, 439, 438, 447, 446, 455, 454 | ||
| 618 | }; | ||
| 619 | #endif | ||
| 620 | |||
| 621 | #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE | ||
| 622 | /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. | ||
| 623 | First, the terminals, then, starting at YYNTOKENS, nonterminals. */ | ||
| 624 | static const char *const yytname[] = | ||
| 625 | { | ||
| 626 | "$end", "error", "$undefined", "SHOW_NEWSGROUPS", "SHOW_DATE", | ||
| 627 | "SHOW_FROM", "SHOW_FULLNAME", "SHOW_FIRST_NAME", "SHOW_SENDER_INITIAL", | ||
| 628 | "SHOW_SUBJECT", "SHOW_TO", "SHOW_MESSAGEID", "SHOW_PERCENT", "SHOW_CC", | ||
| 629 | "SHOW_REFERENCES", "SHOW_MESSAGE", "SHOW_QUOTED_MESSAGE", | ||
| 630 | "SHOW_BACKSLASH", "SHOW_TAB", "SHOW_QUOTED_MESSAGE_NO_SIGNATURE", | ||
| 631 | "SHOW_MESSAGE_NO_SIGNATURE", "SHOW_EOL", "SHOW_QUESTION_MARK", | ||
| 632 | "SHOW_OPARENT", "SHOW_CPARENT", "QUERY_DATE", "QUERY_FROM", | ||
| 633 | "QUERY_FULLNAME", "QUERY_SUBJECT", "QUERY_TO", "QUERY_NEWSGROUPS", | ||
| 634 | "QUERY_MESSAGEID", "QUERY_CC", "QUERY_REFERENCES", "OPARENT", "CPARENT", | ||
| 635 | "CHARACTER", "$accept", "quote_fmt", | ||
| 636 | "character_or_special_or_query_list", "character_or_special_or_query", | ||
| 637 | "character", "special", "query", "@1", "@2", "@3", "@4", "@5", "@6", | ||
| 638 | "@7", "@8", "@9", 0 | ||
| 639 | }; | ||
| 640 | #endif | ||
| 641 | |||
| 642 | # ifdef YYPRINT | ||
| 643 | /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to | ||
| 644 | token YYLEX-NUM. */ | ||
| 645 | static const yytype_uint16 yytoknum[] = | ||
| 646 | { | ||
| 647 | 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, | ||
| 648 | 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, | ||
| 649 | 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, | ||
| 650 | 285, 286, 287, 288, 289, 290, 291 | ||
| 651 | }; | ||
| 652 | # endif | ||
| 653 | |||
| 654 | /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ | ||
| 655 | static const yytype_uint8 yyr1[] = | ||
| 656 | { | ||
| 657 | 0, 37, 38, 39, 39, 40, 40, 40, 41, 42, | ||
| 658 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, | ||
| 659 | 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, | ||
| 660 | 42, 44, 43, 45, 43, 46, 43, 47, 43, 48, | ||
| 661 | 43, 49, 43, 50, 43, 51, 43, 52, 43 | ||
| 662 | }; | ||
| 663 | |||
| 664 | /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ | ||
| 665 | static const yytype_uint8 yyr2[] = | ||
| 666 | { | ||
| 667 | 0, 2, 1, 2, 1, 1, 1, 1, 1, 1, | ||
| 668 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 669 | 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, | ||
| 670 | 1, 0, 5, 0, 5, 0, 5, 0, 5, 0, | ||
| 671 | 5, 0, 5, 0, 5, 0, 5, 0, 5 | ||
| 672 | }; | ||
| 673 | |||
| 674 | /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state | ||
| 675 | STATE-NUM when YYTABLE doesn't specify something else to do. Zero | ||
| 676 | means the default is an error. */ | ||
| 677 | static const yytype_uint8 yydefact[] = | ||
| 678 | { | ||
| 679 | 0, 9, 10, 11, 12, 13, 14, 15, 16, 17, | ||
| 680 | 18, 19, 20, 21, 22, 25, 26, 24, 23, 27, | ||
| 681 | 28, 29, 30, 31, 33, 35, 37, 39, 41, 43, | ||
| 682 | 45, 47, 8, 0, 2, 4, 6, 5, 7, 0, | ||
| 683 | 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, | ||
| 684 | 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, | ||
| 685 | 0, 0, 0, 0, 0, 0, 0, 0, 32, 34, | ||
| 686 | 36, 38, 40, 42, 44, 46, 48 | ||
| 687 | }; | ||
| 688 | |||
| 689 | /* YYDEFGOTO[NTERM-NUM]. */ | ||
| 690 | static const yytype_int8 yydefgoto[] = | ||
| 691 | { | ||
| 692 | -1, 33, 34, 35, 36, 37, 38, 39, 40, 41, | ||
| 693 | 42, 43, 44, 45, 46, 47 | ||
| 694 | }; | ||
| 695 | |||
| 696 | /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing | ||
| 697 | STATE-NUM. */ | ||
| 698 | #define YYPACT_NINF -17 | ||
| 699 | static const yytype_int8 yypact[] = | ||
| 700 | { | ||
| 701 | -3, -17, -17, -17, -17, -17, -17, -17, -17, -17, | ||
| 702 | -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, | ||
| 703 | -17, -17, -17, -17, -17, -17, -17, -17, -17, -17, | ||
| 704 | -17, -17, -17, 31, -17, -3, -17, -17, -17, -2, | ||
| 705 | 9, 10, 11, 12, 13, 14, 15, 16, -17, -17, | ||
| 706 | -3, -3, -3, -3, -3, -3, -3, -3, -3, 17, | ||
| 707 | 18, 19, 20, 21, 22, 23, 24, 25, -17, -17, | ||
| 708 | -17, -17, -17, -17, -17, -17, -17 | ||
| 709 | }; | ||
| 710 | |||
| 711 | /* YYPGOTO[NTERM-NUM]. */ | ||
| 712 | static const yytype_int8 yypgoto[] = | ||
| 713 | { | ||
| 714 | -17, -16, 26, -17, -17, -17, -17, -17, -17, -17, | ||
| 715 | -17, -17, -17, -17, -17, -17 | ||
| 716 | }; | ||
| 717 | |||
| 718 | /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If | ||
| 719 | positive, shift that token. If negative, reduce the rule which | ||
| 720 | number is the opposite. If zero, do what YYDEFACT says. | ||
| 721 | If YYTABLE_NINF, syntax error. */ | ||
| 722 | #define YYTABLE_NINF -1 | ||
| 723 | static const yytype_uint8 yytable[] = | ||
| 724 | { | ||
| 725 | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, | ||
| 726 | 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, | ||
| 727 | 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, | ||
| 728 | 31, 48, 50, 32, 59, 60, 61, 62, 63, 64, | ||
| 729 | 65, 66, 67, 51, 52, 53, 54, 55, 56, 57, | ||
| 730 | 58, 0, 68, 69, 70, 71, 72, 73, 74, 75, | ||
| 731 | 76, 49 | ||
| 732 | }; | ||
| 733 | |||
| 734 | static const yytype_int8 yycheck[] = | ||
| 735 | { | ||
| 736 | 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, | ||
| 737 | 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, | ||
| 738 | 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, | ||
| 739 | 33, 0, 34, 36, 50, 51, 52, 53, 54, 55, | ||
| 740 | 56, 57, 58, 34, 34, 34, 34, 34, 34, 34, | ||
| 741 | 34, -1, 35, 35, 35, 35, 35, 35, 35, 35, | ||
| 742 | 35, 35 | ||
| 743 | }; | ||
| 744 | |||
| 745 | /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing | ||
| 746 | symbol of state STATE-NUM. */ | ||
| 747 | static const yytype_uint8 yystos[] = | ||
| 748 | { | ||
| 749 | 0, 3, 4, 5, 6, 7, 8, 9, 10, 11, | ||
| 750 | 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, | ||
| 751 | 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, | ||
| 752 | 32, 33, 36, 38, 39, 40, 41, 42, 43, 44, | ||
| 753 | 45, 46, 47, 48, 49, 50, 51, 52, 0, 39, | ||
| 754 | 34, 34, 34, 34, 34, 34, 34, 34, 34, 38, | ||
| 755 | 38, 38, 38, 38, 38, 38, 38, 38, 35, 35, | ||
| 756 | 35, 35, 35, 35, 35, 35, 35 | ||
| 757 | }; | ||
| 758 | |||
| 759 | #define yyerrok (yyerrstatus = 0) | ||
| 760 | #define yyclearin (yychar = YYEMPTY) | ||
| 761 | #define YYEMPTY (-2) | ||
| 762 | #define YYEOF 0 | ||
| 763 | |||
| 764 | #define YYACCEPT goto yyacceptlab | ||
| 765 | #define YYABORT goto yyabortlab | ||
| 766 | #define YYERROR goto yyerrorlab | ||
| 767 | |||
| 768 | |||
| 769 | /* Like YYERROR except do call yyerror. This remains here temporarily | ||
| 770 | to ease the transition to the new meaning of YYERROR, for GCC. | ||
| 771 | Once GCC version 2 has supplanted version 1, this can go. */ | ||
| 772 | |||
| 773 | #define YYFAIL goto yyerrlab | ||
| 774 | |||
| 775 | #define YYRECOVERING() (!!yyerrstatus) | ||
| 776 | |||
| 777 | #define YYBACKUP(Token, Value) \ | ||
| 778 | do \ | ||
| 779 | if (yychar == YYEMPTY && yylen == 1) \ | ||
| 780 | { \ | ||
| 781 | yychar = (Token); \ | ||
| 782 | yylval = (Value); \ | ||
| 783 | yytoken = YYTRANSLATE (yychar); \ | ||
| 784 | YYPOPSTACK (1); \ | ||
| 785 | goto yybackup; \ | ||
| 786 | } \ | ||
| 787 | else \ | ||
| 788 | { \ | ||
| 789 | yyerror (YY_("syntax error: cannot back up")); \ | ||
| 790 | YYERROR; \ | ||
| 791 | } \ | ||
| 792 | while (YYID (0)) | ||
| 793 | |||
| 794 | |||
| 795 | #define YYTERROR 1 | ||
| 796 | #define YYERRCODE 256 | ||
| 797 | |||
| 798 | |||
| 799 | /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. | ||
| 800 | If N is 0, then set CURRENT to the empty location which ends | ||
| 801 | the previous symbol: RHS[0] (always defined). */ | ||
| 802 | |||
| 803 | #define YYRHSLOC(Rhs, K) ((Rhs)[K]) | ||
| 804 | #ifndef YYLLOC_DEFAULT | ||
| 805 | # define YYLLOC_DEFAULT(Current, Rhs, N) \ | ||
| 806 | do \ | ||
| 807 | if (YYID (N)) \ | ||
| 808 | { \ | ||
| 809 | (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ | ||
| 810 | (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ | ||
| 811 | (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ | ||
| 812 | (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ | ||
| 813 | } \ | ||
| 814 | else \ | ||
| 815 | { \ | ||
| 816 | (Current).first_line = (Current).last_line = \ | ||
| 817 | YYRHSLOC (Rhs, 0).last_line; \ | ||
| 818 | (Current).first_column = (Current).last_column = \ | ||
| 819 | YYRHSLOC (Rhs, 0).last_column; \ | ||
| 820 | } \ | ||
| 821 | while (YYID (0)) | ||
| 822 | #endif | ||
| 823 | |||
| 824 | |||
| 825 | /* YY_LOCATION_PRINT -- Print the location on the stream. | ||
| 826 | This macro was not mandated originally: define only if we know | ||
| 827 | we won't break user code: when these are the locations we know. */ | ||
| 828 | |||
| 829 | #ifndef YY_LOCATION_PRINT | ||
| 830 | # if YYLTYPE_IS_TRIVIAL | ||
| 831 | # define YY_LOCATION_PRINT(File, Loc) \ | ||
| 832 | fprintf (File, "%d.%d-%d.%d", \ | ||
| 833 | (Loc).first_line, (Loc).first_column, \ | ||
| 834 | (Loc).last_line, (Loc).last_column) | ||
| 835 | # else | ||
| 836 | # define YY_LOCATION_PRINT(File, Loc) ((void) 0) | ||
| 837 | # endif | ||
| 838 | #endif | ||
| 839 | |||
| 840 | |||
| 841 | /* YYLEX -- calling `yylex' with the right arguments. */ | ||
| 842 | |||
| 843 | #ifdef YYLEX_PARAM | ||
| 844 | # define YYLEX yylex (YYLEX_PARAM) | ||
| 845 | #else | ||
| 846 | # define YYLEX yylex () | ||
| 847 | #endif | ||
| 848 | |||
| 849 | /* Enable debugging if requested. */ | ||
| 850 | #if YYDEBUG | ||
| 851 | |||
| 852 | # ifndef YYFPRINTF | ||
| 853 | # include <stdio.h> /* INFRINGES ON USER NAME SPACE */ | ||
| 854 | # define YYFPRINTF fprintf | ||
| 855 | # endif | ||
| 856 | |||
| 857 | # define YYDPRINTF(Args) \ | ||
| 858 | do { \ | ||
| 859 | if (yydebug) \ | ||
| 860 | YYFPRINTF Args; \ | ||
| 861 | } while (YYID (0)) | ||
| 862 | |||
| 863 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ | ||
| 864 | do { \ | ||
| 865 | if (yydebug) \ | ||
| 866 | { \ | ||
| 867 | YYFPRINTF (stderr, "%s ", Title); \ | ||
| 868 | yy_symbol_print (stderr, \ | ||
| 869 | Type, Value); \ | ||
| 870 | YYFPRINTF (stderr, "\n"); \ | ||
| 871 | } \ | ||
| 872 | } while (YYID (0)) | ||
| 873 | |||
| 874 | |||
| 875 | /*--------------------------------. | ||
| 876 | | Print this symbol on YYOUTPUT. | | ||
| 877 | `--------------------------------*/ | ||
| 878 | |||
| 879 | /*ARGSUSED*/ | ||
| 880 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 881 | || defined __cplusplus || defined _MSC_VER) | ||
| 882 | static void | ||
| 883 | yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | ||
| 884 | #else | ||
| 885 | static void | ||
| 886 | yy_symbol_value_print (yyoutput, yytype, yyvaluep) | ||
| 887 | FILE *yyoutput; | ||
| 888 | int yytype; | ||
| 889 | YYSTYPE const * const yyvaluep; | ||
| 890 | #endif | ||
| 891 | { | ||
| 892 | if (!yyvaluep) | ||
| 893 | return; | ||
| 894 | # ifdef YYPRINT | ||
| 895 | if (yytype < YYNTOKENS) | ||
| 896 | YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); | ||
| 897 | # else | ||
| 898 | YYUSE (yyoutput); | ||
| 899 | # endif | ||
| 900 | switch (yytype) | ||
| 901 | { | ||
| 902 | default: | ||
| 903 | break; | ||
| 904 | } | ||
| 905 | } | ||
| 906 | |||
| 907 | |||
| 908 | /*--------------------------------. | ||
| 909 | | Print this symbol on YYOUTPUT. | | ||
| 910 | `--------------------------------*/ | ||
| 911 | |||
| 912 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 913 | || defined __cplusplus || defined _MSC_VER) | ||
| 914 | static void | ||
| 915 | yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) | ||
| 916 | #else | ||
| 917 | static void | ||
| 918 | yy_symbol_print (yyoutput, yytype, yyvaluep) | ||
| 919 | FILE *yyoutput; | ||
| 920 | int yytype; | ||
| 921 | YYSTYPE const * const yyvaluep; | ||
| 922 | #endif | ||
| 923 | { | ||
| 924 | if (yytype < YYNTOKENS) | ||
| 925 | YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); | ||
| 926 | else | ||
| 927 | YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); | ||
| 928 | |||
| 929 | yy_symbol_value_print (yyoutput, yytype, yyvaluep); | ||
| 930 | YYFPRINTF (yyoutput, ")"); | ||
| 931 | } | ||
| 932 | |||
| 933 | /*------------------------------------------------------------------. | ||
| 934 | | yy_stack_print -- Print the state stack from its BOTTOM up to its | | ||
| 935 | | TOP (included). | | ||
| 936 | `------------------------------------------------------------------*/ | ||
| 937 | |||
| 938 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 939 | || defined __cplusplus || defined _MSC_VER) | ||
| 940 | static void | ||
| 941 | yy_stack_print (yytype_int16 *bottom, yytype_int16 *top) | ||
| 942 | #else | ||
| 943 | static void | ||
| 944 | yy_stack_print (bottom, top) | ||
| 945 | yytype_int16 *bottom; | ||
| 946 | yytype_int16 *top; | ||
| 947 | #endif | ||
| 948 | { | ||
| 949 | YYFPRINTF (stderr, "Stack now"); | ||
| 950 | for (; bottom <= top; ++bottom) | ||
| 951 | YYFPRINTF (stderr, " %d", *bottom); | ||
| 952 | YYFPRINTF (stderr, "\n"); | ||
| 953 | } | ||
| 954 | |||
| 955 | # define YY_STACK_PRINT(Bottom, Top) \ | ||
| 956 | do { \ | ||
| 957 | if (yydebug) \ | ||
| 958 | yy_stack_print ((Bottom), (Top)); \ | ||
| 959 | } while (YYID (0)) | ||
| 960 | |||
| 961 | |||
| 962 | /*------------------------------------------------. | ||
| 963 | | Report that the YYRULE is going to be reduced. | | ||
| 964 | `------------------------------------------------*/ | ||
| 965 | |||
| 966 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 967 | || defined __cplusplus || defined _MSC_VER) | ||
| 968 | static void | ||
| 969 | yy_reduce_print (YYSTYPE *yyvsp, int yyrule) | ||
| 970 | #else | ||
| 971 | static void | ||
| 972 | yy_reduce_print (yyvsp, yyrule) | ||
| 973 | YYSTYPE *yyvsp; | ||
| 974 | int yyrule; | ||
| 975 | #endif | ||
| 976 | { | ||
| 977 | int yynrhs = yyr2[yyrule]; | ||
| 978 | int yyi; | ||
| 979 | unsigned long int yylno = yyrline[yyrule]; | ||
| 980 | YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", | ||
| 981 | yyrule - 1, yylno); | ||
| 982 | /* The symbols being reduced. */ | ||
| 983 | for (yyi = 0; yyi < yynrhs; yyi++) | ||
| 984 | { | ||
| 985 | fprintf (stderr, " $%d = ", yyi + 1); | ||
| 986 | yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], | ||
| 987 | &(yyvsp[(yyi + 1) - (yynrhs)]) | ||
| 988 | ); | ||
| 989 | fprintf (stderr, "\n"); | ||
| 990 | } | ||
| 991 | } | ||
| 992 | |||
| 993 | # define YY_REDUCE_PRINT(Rule) \ | ||
| 994 | do { \ | ||
| 995 | if (yydebug) \ | ||
| 996 | yy_reduce_print (yyvsp, Rule); \ | ||
| 997 | } while (YYID (0)) | ||
| 998 | |||
| 999 | /* Nonzero means print parse trace. It is left uninitialized so that | ||
| 1000 | multiple parsers can coexist. */ | ||
| 1001 | int yydebug; | ||
| 1002 | #else /* !YYDEBUG */ | ||
| 1003 | # define YYDPRINTF(Args) | ||
| 1004 | # define YY_SYMBOL_PRINT(Title, Type, Value, Location) | ||
| 1005 | # define YY_STACK_PRINT(Bottom, Top) | ||
| 1006 | # define YY_REDUCE_PRINT(Rule) | ||
| 1007 | #endif /* !YYDEBUG */ | ||
| 1008 | |||
| 1009 | |||
| 1010 | /* YYINITDEPTH -- initial size of the parser's stacks. */ | ||
| 1011 | #ifndef YYINITDEPTH | ||
| 1012 | # define YYINITDEPTH 200 | ||
| 1013 | #endif | ||
| 1014 | |||
| 1015 | /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only | ||
| 1016 | if the built-in stack extension method is used). | ||
| 1017 | |||
| 1018 | Do not make this value too large; the results are undefined if | ||
| 1019 | YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) | ||
| 1020 | evaluated with infinite-precision integer arithmetic. */ | ||
| 1021 | |||
| 1022 | #ifndef YYMAXDEPTH | ||
| 1023 | # define YYMAXDEPTH 10000 | ||
| 1024 | #endif | ||
| 1025 | |||
| 1026 | |||
| 1027 | |||
| 1028 | #if YYERROR_VERBOSE | ||
| 1029 | |||
| 1030 | # ifndef yystrlen | ||
| 1031 | # if defined __GLIBC__ && defined _STRING_H | ||
| 1032 | # define yystrlen strlen | ||
| 1033 | # else | ||
| 1034 | /* Return the length of YYSTR. */ | ||
| 1035 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 1036 | || defined __cplusplus || defined _MSC_VER) | ||
| 1037 | static YYSIZE_T | ||
| 1038 | yystrlen (const char *yystr) | ||
| 1039 | #else | ||
| 1040 | static YYSIZE_T | ||
| 1041 | yystrlen (yystr) | ||
| 1042 | const char *yystr; | ||
| 1043 | #endif | ||
| 1044 | { | ||
| 1045 | YYSIZE_T yylen; | ||
| 1046 | for (yylen = 0; yystr[yylen]; yylen++) | ||
| 1047 | continue; | ||
| 1048 | return yylen; | ||
| 1049 | } | ||
| 1050 | # endif | ||
| 1051 | # endif | ||
| 1052 | |||
| 1053 | # ifndef yystpcpy | ||
| 1054 | # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE | ||
| 1055 | # define yystpcpy stpcpy | ||
| 1056 | # else | ||
| 1057 | /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in | ||
| 1058 | YYDEST. */ | ||
| 1059 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 1060 | || defined __cplusplus || defined _MSC_VER) | ||
| 1061 | static char * | ||
| 1062 | yystpcpy (char *yydest, const char *yysrc) | ||
| 1063 | #else | ||
| 1064 | static char * | ||
| 1065 | yystpcpy (yydest, yysrc) | ||
| 1066 | char *yydest; | ||
| 1067 | const char *yysrc; | ||
| 1068 | #endif | ||
| 1069 | { | ||
| 1070 | char *yyd = yydest; | ||
| 1071 | const char *yys = yysrc; | ||
| 1072 | |||
| 1073 | while ((*yyd++ = *yys++) != '\0') | ||
| 1074 | continue; | ||
| 1075 | |||
| 1076 | return yyd - 1; | ||
| 1077 | } | ||
| 1078 | # endif | ||
| 1079 | # endif | ||
| 1080 | |||
| 1081 | # ifndef yytnamerr | ||
| 1082 | /* Copy to YYRES the contents of YYSTR after stripping away unnecessary | ||
| 1083 | quotes and backslashes, so that it's suitable for yyerror. The | ||
| 1084 | heuristic is that double-quoting is unnecessary unless the string | ||
| 1085 | contains an apostrophe, a comma, or backslash (other than | ||
| 1086 | backslash-backslash). YYSTR is taken from yytname. If YYRES is | ||
| 1087 | null, do not copy; instead, return the length of what the result | ||
| 1088 | would have been. */ | ||
| 1089 | static YYSIZE_T | ||
| 1090 | yytnamerr (char *yyres, const char *yystr) | ||
| 1091 | { | ||
| 1092 | if (*yystr == '"') | ||
| 1093 | { | ||
| 1094 | YYSIZE_T yyn = 0; | ||
| 1095 | char const *yyp = yystr; | ||
| 1096 | |||
| 1097 | for (;;) | ||
| 1098 | switch (*++yyp) | ||
| 1099 | { | ||
| 1100 | case '\'': | ||
| 1101 | case ',': | ||
| 1102 | goto do_not_strip_quotes; | ||
| 1103 | |||
| 1104 | case '\\': | ||
| 1105 | if (*++yyp != '\\') | ||
| 1106 | goto do_not_strip_quotes; | ||
| 1107 | /* Fall through. */ | ||
| 1108 | default: | ||
| 1109 | if (yyres) | ||
| 1110 | yyres[yyn] = *yyp; | ||
| 1111 | yyn++; | ||
| 1112 | break; | ||
| 1113 | |||
| 1114 | case '"': | ||
| 1115 | if (yyres) | ||
| 1116 | yyres[yyn] = '\0'; | ||
| 1117 | return yyn; | ||
| 1118 | } | ||
| 1119 | do_not_strip_quotes: ; | ||
| 1120 | } | ||
| 1121 | |||
| 1122 | if (! yyres) | ||
| 1123 | return yystrlen (yystr); | ||
| 1124 | |||
| 1125 | return yystpcpy (yyres, yystr) - yyres; | ||
| 1126 | } | ||
| 1127 | # endif | ||
| 1128 | |||
| 1129 | /* Copy into YYRESULT an error message about the unexpected token | ||
| 1130 | YYCHAR while in state YYSTATE. Return the number of bytes copied, | ||
| 1131 | including the terminating null byte. If YYRESULT is null, do not | ||
| 1132 | copy anything; just return the number of bytes that would be | ||
| 1133 | copied. As a special case, return 0 if an ordinary "syntax error" | ||
| 1134 | message will do. Return YYSIZE_MAXIMUM if overflow occurs during | ||
| 1135 | size calculation. */ | ||
| 1136 | static YYSIZE_T | ||
| 1137 | yysyntax_error (char *yyresult, int yystate, int yychar) | ||
| 1138 | { | ||
| 1139 | int yyn = yypact[yystate]; | ||
| 1140 | |||
| 1141 | if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) | ||
| 1142 | return 0; | ||
| 1143 | else | ||
| 1144 | { | ||
| 1145 | int yytype = YYTRANSLATE (yychar); | ||
| 1146 | YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); | ||
| 1147 | YYSIZE_T yysize = yysize0; | ||
| 1148 | YYSIZE_T yysize1; | ||
| 1149 | int yysize_overflow = 0; | ||
| 1150 | enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; | ||
| 1151 | char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; | ||
| 1152 | int yyx; | ||
| 1153 | |||
| 1154 | # if 0 | ||
| 1155 | /* This is so xgettext sees the translatable formats that are | ||
| 1156 | constructed on the fly. */ | ||
| 1157 | YY_("syntax error, unexpected %s"); | ||
| 1158 | YY_("syntax error, unexpected %s, expecting %s"); | ||
| 1159 | YY_("syntax error, unexpected %s, expecting %s or %s"); | ||
| 1160 | YY_("syntax error, unexpected %s, expecting %s or %s or %s"); | ||
| 1161 | YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); | ||
| 1162 | # endif | ||
| 1163 | char *yyfmt; | ||
| 1164 | char const *yyf; | ||
| 1165 | static char const yyunexpected[] = "syntax error, unexpected %s"; | ||
| 1166 | static char const yyexpecting[] = ", expecting %s"; | ||
| 1167 | static char const yyor[] = " or %s"; | ||
| 1168 | char yyformat[sizeof yyunexpected | ||
| 1169 | + sizeof yyexpecting - 1 | ||
| 1170 | + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) | ||
| 1171 | * (sizeof yyor - 1))]; | ||
| 1172 | char const *yyprefix = yyexpecting; | ||
| 1173 | |||
| 1174 | /* Start YYX at -YYN if negative to avoid negative indexes in | ||
| 1175 | YYCHECK. */ | ||
| 1176 | int yyxbegin = yyn < 0 ? -yyn : 0; | ||
| 1177 | |||
| 1178 | /* Stay within bounds of both yycheck and yytname. */ | ||
| 1179 | int yychecklim = YYLAST - yyn + 1; | ||
| 1180 | int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; | ||
| 1181 | int yycount = 1; | ||
| 1182 | |||
| 1183 | yyarg[0] = yytname[yytype]; | ||
| 1184 | yyfmt = yystpcpy (yyformat, yyunexpected); | ||
| 1185 | |||
| 1186 | for (yyx = yyxbegin; yyx < yyxend; ++yyx) | ||
| 1187 | if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) | ||
| 1188 | { | ||
| 1189 | if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) | ||
| 1190 | { | ||
| 1191 | yycount = 1; | ||
| 1192 | yysize = yysize0; | ||
| 1193 | yyformat[sizeof yyunexpected - 1] = '\0'; | ||
| 1194 | break; | ||
| 1195 | } | ||
| 1196 | yyarg[yycount++] = yytname[yyx]; | ||
| 1197 | yysize1 = yysize + yytnamerr (0, yytname[yyx]); | ||
| 1198 | yysize_overflow |= (yysize1 < yysize); | ||
| 1199 | yysize = yysize1; | ||
| 1200 | yyfmt = yystpcpy (yyfmt, yyprefix); | ||
| 1201 | yyprefix = yyor; | ||
| 1202 | } | ||
| 1203 | |||
| 1204 | yyf = YY_(yyformat); | ||
| 1205 | yysize1 = yysize + yystrlen (yyf); | ||
| 1206 | yysize_overflow |= (yysize1 < yysize); | ||
| 1207 | yysize = yysize1; | ||
| 1208 | |||
| 1209 | if (yysize_overflow) | ||
| 1210 | return YYSIZE_MAXIMUM; | ||
| 1211 | |||
| 1212 | if (yyresult) | ||
| 1213 | { | ||
| 1214 | /* Avoid sprintf, as that infringes on the user's name space. | ||
| 1215 | Don't have undefined behavior even if the translation | ||
| 1216 | produced a string with the wrong number of "%s"s. */ | ||
| 1217 | char *yyp = yyresult; | ||
| 1218 | int yyi = 0; | ||
| 1219 | while ((*yyp = *yyf) != '\0') | ||
| 1220 | { | ||
| 1221 | if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) | ||
| 1222 | { | ||
| 1223 | yyp += yytnamerr (yyp, yyarg[yyi++]); | ||
| 1224 | yyf += 2; | ||
| 1225 | } | ||
| 1226 | else | ||
| 1227 | { | ||
| 1228 | yyp++; | ||
| 1229 | yyf++; | ||
| 1230 | } | ||
| 1231 | } | ||
| 1232 | } | ||
| 1233 | return yysize; | ||
| 1234 | } | ||
| 1235 | } | ||
| 1236 | #endif /* YYERROR_VERBOSE */ | ||
| 1237 | |||
| 1238 | |||
| 1239 | /*-----------------------------------------------. | ||
| 1240 | | Release the memory associated to this symbol. | | ||
| 1241 | `-----------------------------------------------*/ | ||
| 1242 | |||
| 1243 | /*ARGSUSED*/ | ||
| 1244 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 1245 | || defined __cplusplus || defined _MSC_VER) | ||
| 1246 | static void | ||
| 1247 | yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) | ||
| 1248 | #else | ||
| 1249 | static void | ||
| 1250 | yydestruct (yymsg, yytype, yyvaluep) | ||
| 1251 | const char *yymsg; | ||
| 1252 | int yytype; | ||
| 1253 | YYSTYPE *yyvaluep; | ||
| 1254 | #endif | ||
| 1255 | { | ||
| 1256 | YYUSE (yyvaluep); | ||
| 1257 | |||
| 1258 | if (!yymsg) | ||
| 1259 | yymsg = "Deleting"; | ||
| 1260 | YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); | ||
| 1261 | |||
| 1262 | switch (yytype) | ||
| 1263 | { | ||
| 1264 | |||
| 1265 | default: | ||
| 1266 | break; | ||
| 1267 | } | ||
| 1268 | } | ||
| 1269 | |||
| 1270 | |||
| 1271 | /* Prevent warnings from -Wmissing-prototypes. */ | ||
| 1272 | |||
| 1273 | #ifdef YYPARSE_PARAM | ||
| 1274 | #if defined __STDC__ || defined __cplusplus | ||
| 1275 | int yyparse (void *YYPARSE_PARAM); | ||
| 1276 | #else | ||
| 1277 | int yyparse (); | ||
| 1278 | #endif | ||
| 1279 | #else /* ! YYPARSE_PARAM */ | ||
| 1280 | #if defined __STDC__ || defined __cplusplus | ||
| 1281 | int yyparse (void); | ||
| 1282 | #else | ||
| 1283 | int yyparse (); | ||
| 1284 | #endif | ||
| 1285 | #endif /* ! YYPARSE_PARAM */ | ||
| 1286 | |||
| 1287 | |||
| 1288 | |||
| 1289 | /* The look-ahead symbol. */ | ||
| 1290 | int yychar; | ||
| 1291 | |||
| 1292 | /* The semantic value of the look-ahead symbol. */ | ||
| 1293 | YYSTYPE yylval; | ||
| 1294 | |||
| 1295 | /* Number of syntax errors so far. */ | ||
| 1296 | int yynerrs; | ||
| 1297 | |||
| 1298 | |||
| 1299 | |||
| 1300 | /*----------. | ||
| 1301 | | yyparse. | | ||
| 1302 | `----------*/ | ||
| 1303 | |||
| 1304 | #ifdef YYPARSE_PARAM | ||
| 1305 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 1306 | || defined __cplusplus || defined _MSC_VER) | ||
| 1307 | int | ||
| 1308 | yyparse (void *YYPARSE_PARAM) | ||
| 1309 | #else | ||
| 1310 | int | ||
| 1311 | yyparse (YYPARSE_PARAM) | ||
| 1312 | void *YYPARSE_PARAM; | ||
| 1313 | #endif | ||
| 1314 | #else /* ! YYPARSE_PARAM */ | ||
| 1315 | #if (defined __STDC__ || defined __C99__FUNC__ \ | ||
| 1316 | || defined __cplusplus || defined _MSC_VER) | ||
| 1317 | int | ||
| 1318 | yyparse (void) | ||
| 1319 | #else | ||
| 1320 | int | ||
| 1321 | yyparse () | ||
| 1322 | |||
| 1323 | #endif | ||
| 1324 | #endif | ||
| 1325 | { | ||
| 1326 | |||
| 1327 | int yystate; | ||
| 1328 | int yyn; | ||
| 1329 | int yyresult; | ||
| 1330 | /* Number of tokens to shift before error messages enabled. */ | ||
| 1331 | int yyerrstatus; | ||
| 1332 | /* Look-ahead token as an internal (translated) token number. */ | ||
| 1333 | int yytoken = 0; | ||
| 1334 | #if YYERROR_VERBOSE | ||
| 1335 | /* Buffer for error messages, and its allocated size. */ | ||
| 1336 | char yymsgbuf[128]; | ||
| 1337 | char *yymsg = yymsgbuf; | ||
| 1338 | YYSIZE_T yymsg_alloc = sizeof yymsgbuf; | ||
| 1339 | #endif | ||
| 1340 | |||
| 1341 | /* Three stacks and their tools: | ||
| 1342 | `yyss': related to states, | ||
| 1343 | `yyvs': related to semantic values, | ||
| 1344 | `yyls': related to locations. | ||
| 1345 | |||
| 1346 | Refer to the stacks thru separate pointers, to allow yyoverflow | ||
| 1347 | to reallocate them elsewhere. */ | ||
| 1348 | |||
| 1349 | /* The state stack. */ | ||
| 1350 | yytype_int16 yyssa[YYINITDEPTH]; | ||
| 1351 | yytype_int16 *yyss = yyssa; | ||
| 1352 | yytype_int16 *yyssp; | ||
| 1353 | |||
| 1354 | /* The semantic value stack. */ | ||
| 1355 | YYSTYPE yyvsa[YYINITDEPTH]; | ||
| 1356 | YYSTYPE *yyvs = yyvsa; | ||
| 1357 | YYSTYPE *yyvsp; | ||
| 1358 | |||
| 1359 | |||
| 1360 | |||
| 1361 | #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) | ||
| 1362 | |||
| 1363 | YYSIZE_T yystacksize = YYINITDEPTH; | ||
| 1364 | |||
| 1365 | /* The variables used to return semantic value and location from the | ||
| 1366 | action routines. */ | ||
| 1367 | YYSTYPE yyval; | ||
| 1368 | |||
| 1369 | |||
| 1370 | /* The number of symbols on the RHS of the reduced rule. | ||
| 1371 | Keep to zero when no symbol should be popped. */ | ||
| 1372 | int yylen = 0; | ||
| 1373 | |||
| 1374 | YYDPRINTF ((stderr, "Starting parse\n")); | ||
| 1375 | |||
| 1376 | yystate = 0; | ||
| 1377 | yyerrstatus = 0; | ||
| 1378 | yynerrs = 0; | ||
| 1379 | yychar = YYEMPTY; /* Cause a token to be read. */ | ||
| 1380 | |||
| 1381 | /* Initialize stack pointers. | ||
| 1382 | Waste one element of value and location stack | ||
| 1383 | so that they stay on the same level as the state stack. | ||
| 1384 | The wasted elements are never initialized. */ | ||
| 1385 | |||
| 1386 | yyssp = yyss; | ||
| 1387 | yyvsp = yyvs; | ||
| 1388 | |||
| 1389 | goto yysetstate; | ||
| 1390 | |||
| 1391 | /*------------------------------------------------------------. | ||
| 1392 | | yynewstate -- Push a new state, which is found in yystate. | | ||
| 1393 | `------------------------------------------------------------*/ | ||
| 1394 | yynewstate: | ||
| 1395 | /* In all cases, when you get here, the value and location stacks | ||
| 1396 | have just been pushed. So pushing a state here evens the stacks. */ | ||
| 1397 | yyssp++; | ||
| 1398 | |||
| 1399 | yysetstate: | ||
| 1400 | *yyssp = yystate; | ||
| 1401 | |||
| 1402 | if (yyss + yystacksize - 1 <= yyssp) | ||
| 1403 | { | ||
| 1404 | /* Get the current used size of the three stacks, in elements. */ | ||
| 1405 | YYSIZE_T yysize = yyssp - yyss + 1; | ||
| 1406 | |||
| 1407 | #ifdef yyoverflow | ||
| 1408 | { | ||
| 1409 | /* Give user a chance to reallocate the stack. Use copies of | ||
| 1410 | these so that the &'s don't force the real ones into | ||
| 1411 | memory. */ | ||
| 1412 | YYSTYPE *yyvs1 = yyvs; | ||
| 1413 | yytype_int16 *yyss1 = yyss; | ||
| 1414 | |||
| 1415 | |||
| 1416 | /* Each stack pointer address is followed by the size of the | ||
| 1417 | data in use in that stack, in bytes. This used to be a | ||
| 1418 | conditional around just the two extra args, but that might | ||
| 1419 | be undefined if yyoverflow is a macro. */ | ||
| 1420 | yyoverflow (YY_("memory exhausted"), | ||
| 1421 | &yyss1, yysize * sizeof (*yyssp), | ||
| 1422 | &yyvs1, yysize * sizeof (*yyvsp), | ||
| 1423 | |||
| 1424 | &yystacksize); | ||
| 1425 | |||
| 1426 | yyss = yyss1; | ||
| 1427 | yyvs = yyvs1; | ||
| 1428 | } | ||
| 1429 | #else /* no yyoverflow */ | ||
| 1430 | # ifndef YYSTACK_RELOCATE | ||
| 1431 | goto yyexhaustedlab; | ||
| 1432 | # else | ||
| 1433 | /* Extend the stack our own way. */ | ||
| 1434 | if (YYMAXDEPTH <= yystacksize) | ||
| 1435 | goto yyexhaustedlab; | ||
| 1436 | yystacksize *= 2; | ||
| 1437 | if (YYMAXDEPTH < yystacksize) | ||
| 1438 | yystacksize = YYMAXDEPTH; | ||
| 1439 | |||
| 1440 | { | ||
| 1441 | yytype_int16 *yyss1 = yyss; | ||
| 1442 | union yyalloc *yyptr = | ||
| 1443 | (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); | ||
| 1444 | if (! yyptr) | ||
| 1445 | goto yyexhaustedlab; | ||
| 1446 | YYSTACK_RELOCATE (yyss); | ||
| 1447 | YYSTACK_RELOCATE (yyvs); | ||
| 1448 | |||
| 1449 | # undef YYSTACK_RELOCATE | ||
| 1450 | if (yyss1 != yyssa) | ||
| 1451 | YYSTACK_FREE (yyss1); | ||
| 1452 | } | ||
| 1453 | # endif | ||
| 1454 | #endif /* no yyoverflow */ | ||
| 1455 | |||
| 1456 | yyssp = yyss + yysize - 1; | ||
| 1457 | yyvsp = yyvs + yysize - 1; | ||
| 1458 | |||
| 1459 | |||
| 1460 | YYDPRINTF ((stderr, "Stack size increased to %lu\n", | ||
| 1461 | (unsigned long int) yystacksize)); | ||
| 1462 | |||
| 1463 | if (yyss + yystacksize - 1 <= yyssp) | ||
| 1464 | YYABORT; | ||
| 1465 | } | ||
| 1466 | |||
| 1467 | YYDPRINTF ((stderr, "Entering state %d\n", yystate)); | ||
| 1468 | |||
| 1469 | goto yybackup; | ||
| 1470 | |||
| 1471 | /*-----------. | ||
| 1472 | | yybackup. | | ||
| 1473 | `-----------*/ | ||
| 1474 | yybackup: | ||
| 1475 | |||
| 1476 | /* Do appropriate processing given the current state. Read a | ||
| 1477 | look-ahead token if we need one and don't already have one. */ | ||
| 1478 | |||
| 1479 | /* First try to decide what to do without reference to look-ahead token. */ | ||
| 1480 | yyn = yypact[yystate]; | ||
| 1481 | if (yyn == YYPACT_NINF) | ||
| 1482 | goto yydefault; | ||
| 1483 | |||
| 1484 | /* Not known => get a look-ahead token if don't already have one. */ | ||
| 1485 | |||
| 1486 | /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */ | ||
| 1487 | if (yychar == YYEMPTY) | ||
| 1488 | { | ||
| 1489 | YYDPRINTF ((stderr, "Reading a token: ")); | ||
| 1490 | yychar = YYLEX; | ||
| 1491 | } | ||
| 1492 | |||
| 1493 | if (yychar <= YYEOF) | ||
| 1494 | { | ||
| 1495 | yychar = yytoken = YYEOF; | ||
| 1496 | YYDPRINTF ((stderr, "Now at end of input.\n")); | ||
| 1497 | } | ||
| 1498 | else | ||
| 1499 | { | ||
| 1500 | yytoken = YYTRANSLATE (yychar); | ||
| 1501 | YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); | ||
| 1502 | } | ||
| 1503 | |||
| 1504 | /* If the proper action on seeing token YYTOKEN is to reduce or to | ||
| 1505 | detect an error, take that action. */ | ||
| 1506 | yyn += yytoken; | ||
| 1507 | if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) | ||
| 1508 | goto yydefault; | ||
| 1509 | yyn = yytable[yyn]; | ||
| 1510 | if (yyn <= 0) | ||
| 1511 | { | ||
| 1512 | if (yyn == 0 || yyn == YYTABLE_NINF) | ||
| 1513 | goto yyerrlab; | ||
| 1514 | yyn = -yyn; | ||
| 1515 | goto yyreduce; | ||
| 1516 | } | ||
| 1517 | |||
| 1518 | if (yyn == YYFINAL) | ||
| 1519 | YYACCEPT; | ||
| 1520 | |||
| 1521 | /* Count tokens shifted since error; after three, turn off error | ||
| 1522 | status. */ | ||
| 1523 | if (yyerrstatus) | ||
| 1524 | yyerrstatus--; | ||
| 1525 | |||
| 1526 | /* Shift the look-ahead token. */ | ||
| 1527 | YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); | ||
| 1528 | |||
| 1529 | /* Discard the shifted token unless it is eof. */ | ||
| 1530 | if (yychar != YYEOF) | ||
| 1531 | yychar = YYEMPTY; | ||
| 1532 | |||
| 1533 | yystate = yyn; | ||
| 1534 | *++yyvsp = yylval; | ||
| 1535 | |||
| 1536 | goto yynewstate; | ||
| 1537 | |||
| 1538 | |||
| 1539 | /*-----------------------------------------------------------. | ||
| 1540 | | yydefault -- do the default action for the current state. | | ||
| 1541 | `-----------------------------------------------------------*/ | ||
| 1542 | yydefault: | ||
| 1543 | yyn = yydefact[yystate]; | ||
| 1544 | if (yyn == 0) | ||
| 1545 | goto yyerrlab; | ||
| 1546 | goto yyreduce; | ||
| 1547 | |||
| 1548 | |||
| 1549 | /*-----------------------------. | ||
| 1550 | | yyreduce -- Do a reduction. | | ||
| 1551 | `-----------------------------*/ | ||
| 1552 | yyreduce: | ||
| 1553 | /* yyn is the number of a rule to reduce with. */ | ||
| 1554 | yylen = yyr2[yyn]; | ||
| 1555 | |||
| 1556 | /* If YYLEN is nonzero, implement the default value of the action: | ||
| 1557 | `$$ = $1'. | ||
| 1558 | |||
| 1559 | Otherwise, the following line sets YYVAL to garbage. | ||
| 1560 | This behavior is undocumented and Bison | ||
| 1561 | users should not rely upon it. Assigning to YYVAL | ||
| 1562 | unconditionally makes the parser a bit smaller, and it avoids a | ||
| 1563 | GCC warning that YYVAL may be used uninitialized. */ | ||
| 1564 | yyval = yyvsp[1-yylen]; | ||
| 1565 | |||
| 1566 | |||
| 1567 | YY_REDUCE_PRINT (yyn); | ||
| 1568 | switch (yyn) | ||
| 1569 | { | ||
| 1570 | case 6: | ||
| 1571 | #line 163 "quote_fmt_parse.y" | ||
| 1572 | { | ||
| 1573 | INSERT_CHARACTER((yyvsp[(1) - (1)].chr)); | ||
| 1574 | } | ||
| 1575 | break; | ||
| 1576 | |||
| 1577 | case 9: | ||
| 1578 | #line 175 "quote_fmt_parse.y" | ||
| 1579 | { | ||
| 1580 | if (msginfo->newsgroups) | ||
| 1581 | INSERT(msginfo->newsgroups); | ||
| 1582 | } | ||
| 1583 | break; | ||
| 1584 | |||
| 1585 | case 10: | ||
| 1586 | #line 180 "quote_fmt_parse.y" | ||
| 1587 | { | ||
| 1588 | if (msginfo->date) { | ||
| 1589 | INSERT(msginfo->date); | ||
| 1590 | } else if (msginfo->size == 0) { | ||
| 1591 | gchar buf[64]; | ||
| 1592 | |||
| 1593 | get_rfc822_date(buf, sizeof(buf)); | ||
| 1594 | INSERT(buf); | ||
| 1595 | } | ||
| 1596 | } | ||
| 1597 | break; | ||
| 1598 | |||
| 1599 | case 11: | ||
| 1600 | #line 191 "quote_fmt_parse.y" | ||
| 1601 | { | ||
| 1602 | if (msginfo->from) | ||
| 1603 | INSERT(msginfo->from); | ||
| 1604 | } | ||
| 1605 | break; | ||
| 1606 | |||
| 1607 | case 12: | ||
| 1608 | #line 196 "quote_fmt_parse.y" | ||
| 1609 | { | ||
| 1610 | if (msginfo->fromname) | ||
| 1611 | INSERT(msginfo->fromname); | ||
| 1612 | } | ||
| 1613 | break; | ||
| 1614 | |||
| 1615 | case 13: | ||
| 1616 | #line 201 "quote_fmt_parse.y" | ||
| 1617 | { | ||
| 1618 | if (msginfo->fromname) { | ||
| 1619 | gchar *p; | ||
| 1620 | gchar *str; | ||
| 1621 | |||
| 1622 | str = alloca(strlen(msginfo->fromname) + 1); | ||
| 1623 | if (str != NULL) { | ||
| 1624 | strcpy(str, msginfo->fromname); | ||
| 1625 | p = str; | ||
| 1626 | while (*p && !g_ascii_isspace(*p)) p++; | ||
| 1627 | *p = '\0'; | ||
| 1628 | INSERT(str); | ||
| 1629 | } | ||
| 1630 | } | ||
| 1631 | } | ||
| 1632 | break; | ||
| 1633 | |||
| 1634 | case 14: | ||
| 1635 | #line 217 "quote_fmt_parse.y" | ||
| 1636 | { | ||
| 1637 | #define MAX_SENDER_INITIAL 20 | ||
| 1638 | if (msginfo->fromname) { | ||
| 1639 | gchar tmp[MAX_SENDER_INITIAL]; | ||
| 1640 | gchar *p; | ||
| 1641 | gchar *cur; | ||
| 1642 | gint len = 0; | ||
| 1643 | |||
| 1644 | p = msginfo->fromname; | ||
| 1645 | cur = tmp; | ||
| 1646 | while (*p) { | ||
| 1647 | if (*p && g_ascii_isalnum(*p)) { | ||
| 1648 | *cur = g_ascii_toupper(*p); | ||
| 1649 | cur++; | ||
| 1650 | len++; | ||
| 1651 | if (len >= MAX_SENDER_INITIAL - 1) | ||
| 1652 | break; | ||
| 1653 | } else | ||
| 1654 | break; | ||
| 1655 | while (*p && !isseparator(*p)) p++; | ||
| 1656 | while (*p && isseparator(*p)) p++; | ||
| 1657 | } | ||
| 1658 | *cur = '\0'; | ||
| 1659 | INSERT(tmp); | ||
| 1660 | } | ||
| 1661 | } | ||
| 1662 | break; | ||
| 1663 | |||
| 1664 | case 15: | ||
| 1665 | #line 244 "quote_fmt_parse.y" | ||
| 1666 | { | ||
| 1667 | if (msginfo->subject) | ||
| 1668 | INSERT(msginfo->subject); | ||
| 1669 | } | ||
| 1670 | break; | ||
| 1671 | |||
| 1672 | case 16: | ||
| 1673 | #line 249 "quote_fmt_parse.y" | ||
| 1674 | { | ||
| 1675 | if (msginfo->to) | ||
| 1676 | INSERT(msginfo->to); | ||
| 1677 | } | ||
| 1678 | break; | ||
| 1679 | |||
| 1680 | case 17: | ||
| 1681 | #line 254 "quote_fmt_parse.y" | ||
| 1682 | { | ||
| 1683 | if (msginfo->msgid) | ||
| 1684 | INSERT(msginfo->msgid); | ||
| 1685 | } | ||
| 1686 | break; | ||
| 1687 | |||
| 1688 | case 18: | ||
| 1689 | #line 259 "quote_fmt_parse.y" | ||
| 1690 | { | ||
| 1691 | INSERT("%"); | ||
| 1692 | } | ||
| 1693 | break; | ||
| 1694 | |||
| 1695 | case 19: | ||
| 1696 | #line 263 "quote_fmt_parse.y" | ||
| 1697 | { | ||
| 1698 | if (msginfo->cc) | ||
| 1699 | INSERT(msginfo->cc); | ||
| 1700 | } | ||
| 1701 | break; | ||
| 1702 | |||
| 1703 | case 20: | ||
| 1704 | #line 268 "quote_fmt_parse.y" | ||
| 1705 | { | ||
| 1706 | /* if (msginfo->references) | ||
| 1707 | INSERT(msginfo->references); */ | ||
| 1708 | } | ||
| 1709 | break; | ||
| 1710 | |||
| 1711 | case 21: | ||
| 1712 | #line 273 "quote_fmt_parse.y" | ||
| 1713 | { | ||
| 1714 | gchar buf[BUFFSIZE]; | ||
| 1715 | FILE *fp = NULL; | ||
| 1716 | |||
| 1717 | if (body) | ||
| 1718 | fp = str_open_as_stream(body); | ||
| 1719 | else if (msginfo->size > 0) { | ||
| 1720 | fp = procmime_get_first_text_content(msginfo, NULL); | ||
| 1721 | if (fp == NULL) | ||
| 1722 | g_warning("quote_fmt_parse.y: Can't get text part\n"); | ||
| 1723 | } | ||
| 1724 | |||
| 1725 | if (fp) { | ||
| 1726 | while (fgets(buf, sizeof(buf), fp) != NULL) { | ||
| 1727 | strcrchomp(buf); | ||
| 1728 | INSERT(buf); | ||
| 1729 | } | ||
| 1730 | fclose(fp); | ||
| 1731 | } | ||
| 1732 | } | ||
| 1733 | break; | ||
| 1734 | |||
| 1735 | case 22: | ||
| 1736 | #line 294 "quote_fmt_parse.y" | ||
| 1737 | { | ||
| 1738 | gchar buf[BUFFSIZE]; | ||
| 1739 | FILE *fp = NULL; | ||
| 1740 | |||
| 1741 | if (body) | ||
| 1742 | fp = str_open_as_stream(body); | ||
| 1743 | else if (msginfo->size > 0) { | ||
| 1744 | fp = procmime_get_first_text_content(msginfo, NULL); | ||
| 1745 | if (fp == NULL) | ||
| 1746 | g_warning("quote_fmt_parse.y: Can't get text part\n"); | ||
| 1747 | } | ||
| 1748 | |||
| 1749 | if (fp) { | ||
| 1750 | while (fgets(buf, sizeof(buf), fp) != NULL) { | ||
| 1751 | strcrchomp(buf); | ||
| 1752 | if (quote_str) | ||
| 1753 | INSERT(quote_str); | ||
| 1754 | INSERT(buf); | ||
| 1755 | } | ||
| 1756 | fclose(fp); | ||
| 1757 | } | ||
| 1758 | } | ||
| 1759 | break; | ||
| 1760 | |||
| 1761 | case 23: | ||
| 1762 | #line 317 "quote_fmt_parse.y" | ||
| 1763 | { | ||
| 1764 | gchar buf[BUFFSIZE]; | ||
| 1765 | FILE *fp = NULL; | ||
| 1766 | |||
| 1767 | if (body) | ||
| 1768 | fp = str_open_as_stream(body); | ||
| 1769 | else if (msginfo->size > 0) { | ||
| 1770 | fp = procmime_get_first_text_content(msginfo, NULL); | ||
| 1771 | if (fp == NULL) | ||
| 1772 | g_warning("quote_fmt_parse.y: Can't get text part\n"); | ||
| 1773 | } | ||
| 1774 | |||
| 1775 | if (fp) { | ||
| 1776 | while (fgets(buf, sizeof(buf), fp) != NULL) { | ||
| 1777 | strcrchomp(buf); | ||
| 1778 | if (strncmp(buf, "-- \n", 4) == 0) | ||
| 1779 | break; | ||
| 1780 | INSERT(buf); | ||
| 1781 | } | ||
| 1782 | fclose(fp); | ||
| 1783 | } | ||
| 1784 | } | ||
| 1785 | break; | ||
| 1786 | |||
| 1787 | case 24: | ||
| 1788 | #line 340 "quote_fmt_parse.y" | ||
| 1789 | { | ||
| 1790 | gchar buf[BUFFSIZE]; | ||
| 1791 | FILE *fp = NULL; | ||
| 1792 | |||
| 1793 | if (body) | ||
| 1794 | fp = str_open_as_stream(body); | ||
| 1795 | else if (msginfo->size > 0) { | ||
| 1796 | fp = procmime_get_first_text_content(msginfo, NULL); | ||
| 1797 | if (fp == NULL) | ||
| 1798 | g_warning("Can't get text part\n"); | ||
| 1799 | } | ||
| 1800 | |||
| 1801 | if (fp) { | ||
| 1802 | while (fgets(buf, sizeof(buf), fp) != NULL) { | ||
| 1803 | strcrchomp(buf); | ||
| 1804 | if (strncmp(buf, "-- \n", 4) == 0) | ||
| 1805 | break; | ||
| 1806 | if (quote_str) | ||
| 1807 | INSERT(quote_str); | ||
| 1808 | INSERT(buf); | ||
| 1809 | } | ||
| 1810 | fclose(fp); | ||
| 1811 | } | ||
| 1812 | } | ||
| 1813 | break; | ||
| 1814 | |||
| 1815 | case 25: | ||
| 1816 | #line 365 "quote_fmt_parse.y" | ||
| 1817 | { | ||
| 1818 | INSERT("\\"); | ||
| 1819 | } | ||
| 1820 | break; | ||
| 1821 | |||
| 1822 | case 26: | ||
| 1823 | #line 369 "quote_fmt_parse.y" | ||
| 1824 | { | ||
| 1825 | INSERT("\t"); | ||
| 1826 | } | ||
| 1827 | break; | ||
| 1828 | |||
| 1829 | case 27: | ||
| 1830 | #line 373 "quote_fmt_parse.y" | ||
| 1831 | { | ||
| 1832 | INSERT("\n"); | ||
| 1833 | } | ||
| 1834 | break; | ||
| 1835 | |||
| 1836 | case 28: | ||
| 1837 | #line 377 "quote_fmt_parse.y" | ||
| 1838 | { | ||
| 1839 | INSERT("?"); | ||
| 1840 | } | ||
| 1841 | break; | ||
| 1842 | |||
| 1843 | case 29: | ||
| 1844 | #line 381 "quote_fmt_parse.y" | ||
| 1845 | { | ||
| 1846 | INSERT("{"); | ||
| 1847 | } | ||
| 1848 | break; | ||
| 1849 | |||
| 1850 | case 30: | ||
| 1851 | #line 385 "quote_fmt_parse.y" | ||
| 1852 | { | ||
| 1853 | INSERT("}"); | ||
| 1854 | } | ||
| 1855 | break; | ||
| 1856 | |||
| 1857 | case 31: | ||
| 1858 | #line 391 "quote_fmt_parse.y" | ||
| 1859 | { | ||
| 1860 | add_visibility(msginfo->date != NULL); | ||
| 1861 | } | ||
| 1862 | break; | ||
| 1863 | |||
| 1864 | case 32: | ||
| 1865 | #line 395 "quote_fmt_parse.y" | ||
| 1866 | { | ||
| 1867 | remove_visibility(); | ||
| 1868 | } | ||
| 1869 | break; | ||
| 1870 | |||
| 1871 | case 33: | ||
| 1872 | #line 399 "quote_fmt_parse.y" | ||
| 1873 | { | ||
| 1874 | add_visibility(msginfo->from != NULL); | ||
| 1875 | } | ||
| 1876 | break; | ||
| 1877 | |||
| 1878 | case 34: | ||
| 1879 | #line 403 "quote_fmt_parse.y" | ||
| 1880 | { | ||
| 1881 | remove_visibility(); | ||
| 1882 | } | ||
| 1883 | break; | ||
| 1884 | |||
| 1885 | case 35: | ||
| 1886 | #line 407 "quote_fmt_parse.y" | ||
| 1887 | { | ||
| 1888 | add_visibility(msginfo->fromname != NULL); | ||
| 1889 | } | ||
| 1890 | break; | ||
| 1891 | |||
| 1892 | case 36: | ||
| 1893 | #line 411 "quote_fmt_parse.y" | ||
| 1894 | { | ||
| 1895 | remove_visibility(); | ||
| 1896 | } | ||
| 1897 | break; | ||
| 1898 | |||
| 1899 | case 37: | ||
| 1900 | #line 415 "quote_fmt_parse.y" | ||
| 1901 | { | ||
| 1902 | add_visibility(msginfo->subject != NULL); | ||
| 1903 | } | ||
| 1904 | break; | ||
| 1905 | |||
| 1906 | case 38: | ||
| 1907 | #line 419 "quote_fmt_parse.y" | ||
| 1908 | { | ||
| 1909 | remove_visibility(); | ||
| 1910 | } | ||
| 1911 | break; | ||
| 1912 | |||
| 1913 | case 39: | ||
| 1914 | #line 423 "quote_fmt_parse.y" | ||
| 1915 | { | ||
| 1916 | add_visibility(msginfo->to != NULL); | ||
| 1917 | } | ||
| 1918 | break; | ||
| 1919 | |||
| 1920 | case 40: | ||
| 1921 | #line 427 "quote_fmt_parse.y" | ||
| 1922 | { | ||
| 1923 | remove_visibility(); | ||
| 1924 | } | ||
| 1925 | break; | ||
| 1926 | |||
| 1927 | case 41: | ||
| 1928 | #line 431 "quote_fmt_parse.y" | ||
| 1929 | { | ||
| 1930 | add_visibility(msginfo->newsgroups != NULL); | ||
| 1931 | } | ||
| 1932 | break; | ||
| 1933 | |||
| 1934 | case 42: | ||
| 1935 | #line 435 "quote_fmt_parse.y" | ||
| 1936 | { | ||
| 1937 | remove_visibility(); | ||
| 1938 | } | ||
| 1939 | break; | ||
| 1940 | |||
| 1941 | case 43: | ||
| 1942 | #line 439 "quote_fmt_parse.y" | ||
| 1943 | { | ||
| 1944 | add_visibility(msginfo->msgid != NULL); | ||
| 1945 | } | ||
| 1946 | break; | ||
| 1947 | |||
| 1948 | case 44: | ||
| 1949 | #line 443 "quote_fmt_parse.y" | ||
| 1950 | { | ||
| 1951 | remove_visibility(); | ||
| 1952 | } | ||
| 1953 | break; | ||
| 1954 | |||
| 1955 | case 45: | ||
| 1956 | #line 447 "quote_fmt_parse.y" | ||
| 1957 | { | ||
| 1958 | add_visibility(msginfo->cc != NULL); | ||
| 1959 | } | ||
| 1960 | break; | ||
| 1961 | |||
| 1962 | case 46: | ||
| 1963 | #line 451 "quote_fmt_parse.y" | ||
| 1964 | { | ||
| 1965 | remove_visibility(); | ||
| 1966 | } | ||
| 1967 | break; | ||
| 1968 | |||
| 1969 | case 47: | ||
| 1970 | #line 455 "quote_fmt_parse.y" | ||
| 1971 | { | ||
| 1972 | /* add_visibility(msginfo->references != NULL); */ | ||
| 1973 | } | ||
| 1974 | break; | ||
| 1975 | |||
| 1976 | case 48: | ||
| 1977 | #line 459 "quote_fmt_parse.y" | ||
| 1978 | { | ||
| 1979 | remove_visibility(); | ||
| 1980 | } | ||
| 1981 | break; | ||
| 1982 | |||
| 1983 | |||
| 1984 | /* Line 1267 of yacc.c. */ | ||
| 1985 | #line 1986 "quote_fmt_parse.c" | ||
| 1986 | default: break; | ||
| 1987 | } | ||
| 1988 | YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); | ||
| 1989 | |||
| 1990 | YYPOPSTACK (yylen); | ||
| 1991 | yylen = 0; | ||
| 1992 | YY_STACK_PRINT (yyss, yyssp); | ||
| 1993 | |||
| 1994 | *++yyvsp = yyval; | ||
| 1995 | |||
| 1996 | |||
| 1997 | /* Now `shift' the result of the reduction. Determine what state | ||
| 1998 | that goes to, based on the state we popped back to and the rule | ||
| 1999 | number reduced by. */ | ||
| 2000 | |||
| 2001 | yyn = yyr1[yyn]; | ||
| 2002 | |||
| 2003 | yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; | ||
| 2004 | if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) | ||
| 2005 | yystate = yytable[yystate]; | ||
| 2006 | else | ||
| 2007 | yystate = yydefgoto[yyn - YYNTOKENS]; | ||
| 2008 | |||
| 2009 | goto yynewstate; | ||
| 2010 | |||
| 2011 | |||
| 2012 | /*------------------------------------. | ||
| 2013 | | yyerrlab -- here on detecting error | | ||
| 2014 | `------------------------------------*/ | ||
| 2015 | yyerrlab: | ||
| 2016 | /* If not already recovering from an error, report this error. */ | ||
| 2017 | if (!yyerrstatus) | ||
| 2018 | { | ||
| 2019 | ++yynerrs; | ||
| 2020 | #if ! YYERROR_VERBOSE | ||
| 2021 | yyerror (YY_("syntax error")); | ||
| 2022 | #else | ||
| 2023 | { | ||
| 2024 | YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); | ||
| 2025 | if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) | ||
| 2026 | { | ||
| 2027 | YYSIZE_T yyalloc = 2 * yysize; | ||
| 2028 | if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) | ||
| 2029 | yyalloc = YYSTACK_ALLOC_MAXIMUM; | ||
| 2030 | if (yymsg != yymsgbuf) | ||
| 2031 | YYSTACK_FREE (yymsg); | ||
| 2032 | yymsg = (char *) YYSTACK_ALLOC (yyalloc); | ||
| 2033 | if (yymsg) | ||
| 2034 | yymsg_alloc = yyalloc; | ||
| 2035 | else | ||
| 2036 | { | ||
| 2037 | yymsg = yymsgbuf; | ||
| 2038 | yymsg_alloc = sizeof yymsgbuf; | ||
| 2039 | } | ||
| 2040 | } | ||
| 2041 | |||
| 2042 | if (0 < yysize && yysize <= yymsg_alloc) | ||
| 2043 | { | ||
| 2044 | (void) yysyntax_error (yymsg, yystate, yychar); | ||
| 2045 | yyerror (yymsg); | ||
| 2046 | } | ||
| 2047 | else | ||
| 2048 | { | ||
| 2049 | yyerror (YY_("syntax error")); | ||
| 2050 | if (yysize != 0) | ||
| 2051 | goto yyexhaustedlab; | ||
| 2052 | } | ||
| 2053 | } | ||
| 2054 | #endif | ||
| 2055 | } | ||
| 2056 | |||
| 2057 | |||
| 2058 | |||
| 2059 | if (yyerrstatus == 3) | ||
| 2060 | { | ||
| 2061 | /* If just tried and failed to reuse look-ahead token after an | ||
| 2062 | error, discard it. */ | ||
| 2063 | |||
| 2064 | if (yychar <= YYEOF) | ||
| 2065 | { | ||
| 2066 | /* Return failure if at end of input. */ | ||
| 2067 | if (yychar == YYEOF) | ||
| 2068 | YYABORT; | ||
| 2069 | } | ||
| 2070 | else | ||
| 2071 | { | ||
| 2072 | yydestruct ("Error: discarding", | ||
| 2073 | yytoken, &yylval); | ||
| 2074 | yychar = YYEMPTY; | ||
| 2075 | } | ||
| 2076 | } | ||
| 2077 | |||
| 2078 | /* Else will try to reuse look-ahead token after shifting the error | ||
| 2079 | token. */ | ||
| 2080 | goto yyerrlab1; | ||
| 2081 | |||
| 2082 | |||
| 2083 | /*---------------------------------------------------. | ||
| 2084 | | yyerrorlab -- error raised explicitly by YYERROR. | | ||
| 2085 | `---------------------------------------------------*/ | ||
| 2086 | yyerrorlab: | ||
| 2087 | |||
| 2088 | /* Pacify compilers like GCC when the user code never invokes | ||
| 2089 | YYERROR and the label yyerrorlab therefore never appears in user | ||
| 2090 | code. */ | ||
| 2091 | if (/*CONSTCOND*/ 0) | ||
| 2092 | goto yyerrorlab; | ||
| 2093 | |||
| 2094 | /* Do not reclaim the symbols of the rule which action triggered | ||
| 2095 | this YYERROR. */ | ||
| 2096 | YYPOPSTACK (yylen); | ||
| 2097 | yylen = 0; | ||
| 2098 | YY_STACK_PRINT (yyss, yyssp); | ||
| 2099 | yystate = *yyssp; | ||
| 2100 | goto yyerrlab1; | ||
| 2101 | |||
| 2102 | |||
| 2103 | /*-------------------------------------------------------------. | ||
| 2104 | | yyerrlab1 -- common code for both syntax error and YYERROR. | | ||
| 2105 | `-------------------------------------------------------------*/ | ||
| 2106 | yyerrlab1: | ||
| 2107 | yyerrstatus = 3; /* Each real token shifted decrements this. */ | ||
| 2108 | |||
| 2109 | for (;;) | ||
| 2110 | { | ||
| 2111 | yyn = yypact[yystate]; | ||
| 2112 | if (yyn != YYPACT_NINF) | ||
| 2113 | { | ||
| 2114 | yyn += YYTERROR; | ||
| 2115 | if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) | ||
| 2116 | { | ||
| 2117 | yyn = yytable[yyn]; | ||
| 2118 | if (0 < yyn) | ||
| 2119 | break; | ||
| 2120 | } | ||
| 2121 | } | ||
| 2122 | |||
| 2123 | /* Pop the current state because it cannot handle the error token. */ | ||
| 2124 | if (yyssp == yyss) | ||
| 2125 | YYABORT; | ||
| 2126 | |||
| 2127 | |||
| 2128 | yydestruct ("Error: popping", | ||
| 2129 | yystos[yystate], yyvsp); | ||
| 2130 | YYPOPSTACK (1); | ||
| 2131 | yystate = *yyssp; | ||
| 2132 | YY_STACK_PRINT (yyss, yyssp); | ||
| 2133 | } | ||
| 2134 | |||
| 2135 | if (yyn == YYFINAL) | ||
| 2136 | YYACCEPT; | ||
| 2137 | |||
| 2138 | *++yyvsp = yylval; | ||
| 2139 | |||
| 2140 | |||
| 2141 | /* Shift the error token. */ | ||
| 2142 | YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); | ||
| 2143 | |||
| 2144 | yystate = yyn; | ||
| 2145 | goto yynewstate; | ||
| 2146 | |||
| 2147 | |||
| 2148 | /*-------------------------------------. | ||
| 2149 | | yyacceptlab -- YYACCEPT comes here. | | ||
| 2150 | `-------------------------------------*/ | ||
| 2151 | yyacceptlab: | ||
| 2152 | yyresult = 0; | ||
| 2153 | goto yyreturn; | ||
| 2154 | |||
| 2155 | /*-----------------------------------. | ||
| 2156 | | yyabortlab -- YYABORT comes here. | | ||
| 2157 | `-----------------------------------*/ | ||
| 2158 | yyabortlab: | ||
| 2159 | yyresult = 1; | ||
| 2160 | goto yyreturn; | ||
| 2161 | |||
| 2162 | #ifndef yyoverflow | ||
| 2163 | /*-------------------------------------------------. | ||
| 2164 | | yyexhaustedlab -- memory exhaustion comes here. | | ||
| 2165 | `-------------------------------------------------*/ | ||
| 2166 | yyexhaustedlab: | ||
| 2167 | yyerror (YY_("memory exhausted")); | ||
| 2168 | yyresult = 2; | ||
| 2169 | /* Fall through. */ | ||
| 2170 | #endif | ||
| 2171 | |||
| 2172 | yyreturn: | ||
| 2173 | if (yychar != YYEOF && yychar != YYEMPTY) | ||
| 2174 | yydestruct ("Cleanup: discarding lookahead", | ||
| 2175 | yytoken, &yylval); | ||
| 2176 | /* Do not reclaim the symbols of the rule which action triggered | ||
| 2177 | this YYABORT or YYACCEPT. */ | ||
| 2178 | YYPOPSTACK (yylen); | ||
| 2179 | YY_STACK_PRINT (yyss, yyssp); | ||
| 2180 | while (yyssp != yyss) | ||
| 2181 | { | ||
| 2182 | yydestruct ("Cleanup: popping", | ||
| 2183 | yystos[*yyssp], yyvsp); | ||
| 2184 | YYPOPSTACK (1); | ||
| 2185 | } | ||
| 2186 | #ifndef yyoverflow | ||
| 2187 | if (yyss != yyssa) | ||
| 2188 | YYSTACK_FREE (yyss); | ||
| 2189 | #endif | ||
| 2190 | #if YYERROR_VERBOSE | ||
| 2191 | if (yymsg != yymsgbuf) | ||
| 2192 | YYSTACK_FREE (yymsg); | ||
| 2193 | #endif | ||
| 2194 | /* Make sure YYID is used. */ | ||
| 2195 | return YYID (yyresult); | ||
| 2196 | } | ||
| 2197 | |||
| 2198 | |||
| 2199 | |||
