2 /* A Bison parser, made by GNU Bison 2.4.1. */
4 /* Skeleton implementation for Bison's Yacc-like parsers in C
6 Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
7 Free Software Foundation, Inc.
9 This program is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program. If not, see <http://www.gnu.org/licenses/>. */
22 /* As a special exception, you may create a larger work that contains
23 part or all of the Bison parser skeleton and distribute that work
24 under terms of your choice, so long as that work isn't itself a
25 parser generator using the skeleton or a modified version thereof
26 as a parser skeleton. Alternatively, if you modify or redistribute
27 the parser skeleton itself, you may (at your option) remove this
28 special exception, which will cause the skeleton and the resulting
29 Bison output files to be licensed under the GNU General Public
30 License without this special exception.
32 This special exception was added by the Free Software Foundation in
33 version 2.2 of Bison. */
35 /* C LALR(1) parser skeleton written by Richard Stallman, by
36 simplifying the original so-called "semantic" parser. */
38 /* All symbols defined below should begin with yy or YY, to avoid
39 infringing on user name space. This should be done even for local
40 variables, as they might otherwise be expanded by user macros.
41 There are some unavoidable exceptions within include files to
42 define necessary library symbols; they are noted "INFRINGES ON
43 USER NAME SPACE" below. */
45 /* Identify Bison output. */
49 #define YYBISON_VERSION "2.4.1"
52 #define YYSKELETON_NAME "yacc.c"
63 /* Using locations. */
64 #define YYLSP_NEEDED 1
66 /* Substitute the variable and function names. */
67 #define yyparse scdocparse
68 #define yylex scdoclex
69 #define yyerror scdocerror
70 #define yylval scdoclval
71 #define yychar scdocchar
72 #define yydebug scdocdebug
73 #define yynerrs scdocnerrs
74 #define yylloc scdoclloc
76 /* Copy the first part of user declarations. */
78 /* Line 189 of yacc.c */
81 /************************************************************************
83 * Copyright 2012 Jonatan Liljedahl <lijon@kymatica.com>
85 * This program is free software: you can redistribute it and/or modify
86 * it under the terms of the GNU General Public License as published by
87 * the Free Software Foundation, either version 3 of the License, or
88 * (at your option) any later version.
90 * This program is distributed in the hope that it will be useful,
91 * but WITHOUT ANY WARRANTY; without even the implied warranty of
92 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
93 * GNU General Public License for more details.
95 * You should have received a copy of the GNU General Public License
96 * along with this program. If not, see <http://www.gnu.org/licenses/>.
98 ************************************************************************/
105 //#define YYLEX_PARAM &yylval, &yylloc
109 extern int scdoclineno
;
110 extern char *scdoctext
;
111 extern int scdoc_start_token
;
112 extern FILE *scdocin
;
113 //extern struct YYLTYPE scdoclloc;
115 //int scdoc_metadata_mode;
117 static const char * method_type
= NULL
;
119 static DocNode
* topnode
;
121 void scdocerror(const char *str
);
123 extern void error(const char *fmt
, ...);
124 extern void post(const char *fmt
, ...);
128 /* Line 189 of yacc.c */
129 #line 130 "SCDoc.tab.cpp"
131 /* Enabling traces. */
136 /* Enabling verbose error messages. */
137 #ifdef YYERROR_VERBOSE
138 # undef YYERROR_VERBOSE
139 # define YYERROR_VERBOSE 1
141 # define YYERROR_VERBOSE 1
144 /* Enabling the token table. */
145 #ifndef YYTOKEN_TABLE
146 # define YYTOKEN_TABLE 0
153 /* Put the tokens into the symbol table, so that GDB and other debuggers
173 INSTANCEMETHODS
= 274,
180 DEFINITIONLIST
= 281,
207 BAD_METHODNAME
= 308,
216 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
217 typedef union YYSTYPE
220 /* Line 214 of yacc.c */
230 /* Line 214 of yacc.c */
231 #line 232 "SCDoc.tab.cpp"
233 # define YYSTYPE_IS_TRIVIAL 1
234 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
235 # define YYSTYPE_IS_DECLARED 1
238 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
239 typedef struct YYLTYPE
246 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
247 # define YYLTYPE_IS_DECLARED 1
248 # define YYLTYPE_IS_TRIVIAL 1
252 /* Copy the second part of user declarations. */
254 /* Line 264 of yacc.c */
257 //int scdoclex (YYSTYPE * yylval_param, struct YYLTYPE * yylloc_param );
261 /* Line 264 of yacc.c */
262 #line 263 "SCDoc.tab.cpp"
269 typedef YYTYPE_UINT8 yytype_uint8
;
271 typedef unsigned char yytype_uint8
;
275 typedef YYTYPE_INT8 yytype_int8
;
276 #elif (defined __STDC__ || defined __C99__FUNC__ \
277 || defined __cplusplus || defined _MSC_VER)
278 typedef signed char yytype_int8
;
280 typedef short int yytype_int8
;
284 typedef YYTYPE_UINT16 yytype_uint16
;
286 typedef unsigned short int yytype_uint16
;
290 typedef YYTYPE_INT16 yytype_int16
;
292 typedef short int yytype_int16
;
296 # ifdef __SIZE_TYPE__
297 # define YYSIZE_T __SIZE_TYPE__
298 # elif defined size_t
299 # define YYSIZE_T size_t
300 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
301 || defined __cplusplus || defined _MSC_VER)
302 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
303 # define YYSIZE_T size_t
305 # define YYSIZE_T unsigned int
309 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
314 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
315 # define YY_(msgid) dgettext ("bison-runtime", msgid)
319 # define YY_(msgid) msgid
323 /* Suppress unused-variable warnings by "using" E. */
324 #if ! defined lint || defined __GNUC__
325 # define YYUSE(e) ((void) (e))
327 # define YYUSE(e) /* empty */
330 /* Identity function, used to suppress warnings about constant conditions. */
334 #if (defined __STDC__ || defined __C99__FUNC__ \
335 || defined __cplusplus || defined _MSC_VER)
348 #if ! defined yyoverflow || YYERROR_VERBOSE
350 /* The parser invokes alloca or malloc; define the necessary symbols. */
352 # ifdef YYSTACK_USE_ALLOCA
353 # if YYSTACK_USE_ALLOCA
355 # define YYSTACK_ALLOC __builtin_alloca
356 # elif defined __BUILTIN_VA_ARG_INCR
357 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
359 # define YYSTACK_ALLOC __alloca
360 # elif defined _MSC_VER
361 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
362 # define alloca _alloca
364 # define YYSTACK_ALLOC alloca
365 # if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
366 || defined __cplusplus || defined _MSC_VER)
367 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
376 # ifdef YYSTACK_ALLOC
377 /* Pacify GCC's `empty if-body' warning. */
378 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
379 # ifndef YYSTACK_ALLOC_MAXIMUM
380 /* The OS might guarantee only one guard page at the bottom of the stack,
381 and a page size can be as small as 4096 bytes. So we cannot safely
382 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
383 to allow for a few compiler-allocated temporary stack slots. */
384 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
387 # define YYSTACK_ALLOC YYMALLOC
388 # define YYSTACK_FREE YYFREE
389 # ifndef YYSTACK_ALLOC_MAXIMUM
390 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
392 # if (defined __cplusplus && ! defined _STDLIB_H \
393 && ! ((defined YYMALLOC || defined malloc) \
394 && (defined YYFREE || defined free)))
395 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
401 # define YYMALLOC malloc
402 # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
403 || defined __cplusplus || defined _MSC_VER)
404 void *malloc (YYSIZE_T
); /* INFRINGES ON USER NAME SPACE */
409 # if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
410 || defined __cplusplus || defined _MSC_VER)
411 void free (void *); /* INFRINGES ON USER NAME SPACE */
415 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
418 #if (! defined yyoverflow \
419 && (! defined __cplusplus \
420 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
421 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
423 /* A type that is properly aligned for any stack member. */
426 yytype_int16 yyss_alloc
;
431 /* The size of the maximum gap between one aligned stack and the next. */
432 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
434 /* The size of an array large to enough to hold all stacks, each with
436 # define YYSTACK_BYTES(N) \
437 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
438 + 2 * YYSTACK_GAP_MAXIMUM)
440 /* Copy COUNT objects from FROM to TO. The source and destination do
443 # if defined __GNUC__ && 1 < __GNUC__
444 # define YYCOPY(To, From, Count) \
445 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
447 # define YYCOPY(To, From, Count) \
451 for (yyi = 0; yyi < (Count); yyi++) \
452 (To)[yyi] = (From)[yyi]; \
458 /* Relocate STACK from its old location to the new one. The
459 local variables YYSIZE and YYSTACKSIZE give the old and new number of
460 elements in the stack, and YYPTR gives the new location of the
461 stack. Advance YYPTR to a properly aligned location for the next
463 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
466 YYSIZE_T yynewbytes; \
467 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
468 Stack = &yyptr->Stack_alloc; \
469 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
470 yyptr += yynewbytes / sizeof (*yyptr); \
476 /* YYFINAL -- State number of the termination state. */
478 /* YYLAST -- Last index in YYTABLE. */
481 /* YYNTOKENS -- Number of terminals. */
483 /* YYNNTS -- Number of nonterminals. */
485 /* YYNRULES -- Number of rules. */
487 /* YYNRULES -- Number of states. */
488 #define YYNSTATES 193
490 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
492 #define YYMAXUTOK 311
494 #define YYTRANSLATE(YYX) \
495 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
497 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
498 static const yytype_uint8 yytranslate
[] =
500 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
501 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
502 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
503 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
504 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
505 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
506 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
507 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
508 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
509 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
510 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
511 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
512 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
513 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
514 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
515 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
516 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
517 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
518 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
519 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
520 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
521 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
522 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
523 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
524 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
525 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
526 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
527 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
528 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
529 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
530 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
535 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
537 static const yytype_uint16 yyprhs
[] =
539 0, 0, 3, 5, 8, 13, 16, 20, 22, 23,
540 26, 28, 32, 36, 40, 42, 44, 46, 48, 50,
541 52, 54, 56, 58, 59, 62, 64, 66, 67, 73,
542 76, 78, 79, 82, 84, 86, 91, 93, 94, 97,
543 99, 101, 107, 111, 115, 116, 118, 120, 124, 126,
544 131, 133, 134, 136, 137, 140, 142, 147, 151, 154,
545 155, 158, 159, 161, 163, 166, 169, 171, 174, 176,
546 180, 184, 188, 192, 196, 200, 204, 206, 210, 213,
547 215, 217, 219, 223, 227, 229, 231, 233, 235, 237,
548 239, 241, 243, 245, 247, 249, 251, 253, 255, 257,
549 259, 261, 265, 268, 271, 274, 276, 280, 282, 286,
550 289, 293, 296, 298, 300, 302, 304, 306, 309, 311,
551 314, 316, 318, 320, 322, 324, 326, 328, 331, 333,
552 336, 339, 341, 343, 347
555 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
556 static const yytype_int8 yyrhs
[] =
558 58, 0, -1, 59, -1, 59, 1, -1, 54, 60,
559 61, 65, -1, 55, 66, -1, 56, 61, 65, -1,
560 106, -1, -1, 61, 62, -1, 62, -1, 63, 105,
561 106, -1, 7, 111, 106, -1, 6, 111, 106, -1,
562 3, -1, 4, -1, 5, -1, 8, -1, 18, -1,
563 19, -1, 17, -1, 20, -1, 66, -1, -1, 66,
564 67, -1, 67, -1, 73, -1, -1, 13, 68, 105,
565 106, 69, -1, 64, 69, -1, 70, -1, -1, 70,
566 71, -1, 71, -1, 73, -1, 14, 105, 106, 72,
567 -1, 73, -1, -1, 73, 74, -1, 74, -1, 85,
568 -1, 15, 77, 75, 106, 78, -1, 10, 104, 106,
569 -1, 12, 111, 107, -1, -1, 50, -1, 49, -1,
570 77, 48, 76, -1, 76, -1, 79, 80, 83, 84,
571 -1, 85, -1, -1, 81, -1, -1, 81, 82, -1,
572 82, -1, 16, 104, 106, 79, -1, 16, 106, 85,
573 -1, 21, 85, -1, -1, 22, 85, -1, -1, 86,
574 -1, 87, -1, 87, 88, -1, 86, 88, -1, 88,
575 -1, 86, 89, -1, 89, -1, 94, 85, 43, -1,
576 93, 95, 43, -1, 27, 97, 43, -1, 26, 101,
577 43, -1, 92, 109, 43, -1, 9, 104, 107, -1,
578 11, 111, 107, -1, 52, -1, 35, 105, 43, -1,
579 89, 90, -1, 90, -1, 103, -1, 47, -1, 91,
580 104, 43, -1, 28, 85, 43, -1, 51, -1, 32,
581 -1, 38, -1, 34, -1, 39, -1, 31, -1, 36,
582 -1, 37, -1, 33, -1, 40, -1, 41, -1, 42,
583 -1, 23, -1, 24, -1, 25, -1, 30, -1, 29,
584 -1, 95, 45, 85, -1, 45, 85, -1, 45, 98,
585 -1, 97, 96, -1, 96, -1, 98, 44, 79, -1,
586 79, -1, 99, 45, 85, -1, 45, 85, -1, 99,
587 44, 79, -1, 101, 100, -1, 100, -1, 103, -1,
588 47, -1, 46, -1, 48, -1, 104, 103, -1, 103,
589 -1, 105, 102, -1, 102, -1, 51, -1, 52, -1,
590 106, -1, 0, -1, 103, -1, 106, -1, 109, 108,
591 -1, 108, -1, 110, 46, -1, 110, 47, -1, 46,
592 -1, 47, -1, 111, 48, 110, -1, 110, -1
595 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
596 static const yytype_uint16 yyrline
[] =
598 0, 102, 102, 103, 106, 112, 116, 124, 125, 128,
599 129, 132, 133, 134, 137, 138, 139, 140, 143, 144,
600 145, 146, 149, 150, 153, 154, 155, 158, 158, 159,
601 162, 163, 166, 167, 168, 171, 174, 175, 178, 179,
602 180, 183, 190, 194, 197, 198, 209, 220, 221, 224,
603 233, 234, 237, 238, 241, 242, 245, 246, 249, 250,
604 253, 254, 262, 263, 266, 267, 268, 271, 272, 275,
605 276, 277, 278, 279, 280, 281, 284, 285, 288, 289,
606 292, 293, 294, 295, 296, 299, 300, 301, 302, 303,
607 304, 305, 306, 309, 310, 311, 314, 315, 316, 319,
608 320, 323, 324, 327, 330, 331, 334, 335, 338, 339,
609 342, 349, 350, 353, 354, 357, 358, 361, 362, 365,
610 366, 369, 370, 373, 374, 377, 378, 381, 382, 385,
611 386, 387, 388, 391, 392
615 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
616 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
617 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
618 static const char *const yytname
[] =
620 "\"end of file\"", "error", "$undefined", "CLASS", "TITLE", "SUMMARY",
621 "RELATED", "CATEGORIES", "REDIRECT", "CLASSTREE", "COPYMETHOD",
622 "KEYWORD", "PRIVATE", "SECTION", "SUBSECTION", "METHOD", "ARGUMENT",
623 "DESCRIPTION", "CLASSMETHODS", "INSTANCEMETHODS", "EXAMPLES", "RETURNS",
624 "DISCUSSION", "LIST", "TREE", "NUMBEREDLIST", "DEFINITIONLIST", "TABLE",
625 "FOOTNOTE", "NOTE", "WARNING", "CODE", "LINK", "ANCHOR", "SOFT", "IMAGE",
626 "TELETYPE", "MATH", "STRONG", "EMPHASIS", "\"CODE block\"",
627 "\"TELETYPE block\"", "\"MATH block\"", "\"::\"", "\"||\"", "\"##\"",
628 "\"text\"", "URL", "COMMA", "\"method name\"", "\"arguments string\"",
629 "\"newline\"", "\"empty lines\"", "\"bad method name\"", "START_FULL",
630 "START_PARTIAL", "START_METADATA", "$accept", "start", "document",
631 "eateol", "dochead", "headline", "headtag", "sectiontag", "optsections",
632 "sections", "section", "$@1", "optsubsections", "subsections",
633 "subsection", "optsubsubsections", "subsubsections", "subsubsection",
634 "optMETHODARGS", "methodname", "methnames", "methodbody", "optbody",
635 "optargs", "args", "arg", "optreturns", "optdiscussion", "body",
636 "blockA", "blockB", "bodyelem", "prose", "proseelem", "inlinetag",
637 "blocktag", "listtag", "rangetag", "listbody", "tablerow", "tablebody",
638 "tablecells", "defterms", "deflistrow", "deflistbody", "anywordurl",
639 "anyword", "words", "words2", "eol", "eoleof", "anywordnl", "wordsnl",
640 "nocommawords", "commalist", 0
645 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
647 static const yytype_uint16 yytoknum
[] =
649 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
650 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
651 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
652 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
653 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
654 305, 306, 307, 308, 309, 310, 311
658 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
659 static const yytype_uint8 yyr1
[] =
661 0, 57, 58, 58, 59, 59, 59, 60, 60, 61,
662 61, 62, 62, 62, 63, 63, 63, 63, 64, 64,
663 64, 64, 65, 65, 66, 66, 66, 68, 67, 67,
664 69, 69, 70, 70, 70, 71, 72, 72, 73, 73,
665 73, 74, 74, 74, 75, 75, 76, 77, 77, 78,
666 79, 79, 80, 80, 81, 81, 82, 82, 83, 83,
667 84, 84, 85, 85, 86, 86, 86, 87, 87, 88,
668 88, 88, 88, 88, 88, 88, 88, 88, 89, 89,
669 90, 90, 90, 90, 90, 91, 91, 91, 91, 91,
670 91, 91, 91, 92, 92, 92, 93, 93, 93, 94,
671 94, 95, 95, 96, 97, 97, 98, 98, 99, 99,
672 100, 101, 101, 102, 102, 103, 103, 104, 104, 105,
673 105, 106, 106, 107, 107, 108, 108, 109, 109, 110,
674 110, 110, 110, 111, 111
677 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
678 static const yytype_uint8 yyr2
[] =
680 0, 2, 1, 2, 4, 2, 3, 1, 0, 2,
681 1, 3, 3, 3, 1, 1, 1, 1, 1, 1,
682 1, 1, 1, 0, 2, 1, 1, 0, 5, 2,
683 1, 0, 2, 1, 1, 4, 1, 0, 2, 1,
684 1, 5, 3, 3, 0, 1, 1, 3, 1, 4,
685 1, 0, 1, 0, 2, 1, 4, 3, 2, 0,
686 2, 0, 1, 1, 2, 2, 1, 2, 1, 3,
687 3, 3, 3, 3, 3, 3, 1, 3, 2, 1,
688 1, 1, 3, 3, 1, 1, 1, 1, 1, 1,
689 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
690 1, 3, 2, 2, 2, 1, 3, 1, 3, 2,
691 3, 2, 1, 1, 1, 1, 1, 2, 1, 2,
692 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
696 /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
697 STATE-NUM when YYTABLE doesn't specify something else to do. Zero
698 means the default is an error. */
699 static const yytype_uint8 yydefact
[] =
701 0, 8, 0, 0, 0, 0, 121, 122, 0, 7,
702 0, 0, 0, 0, 27, 0, 20, 18, 19, 21,
703 96, 97, 98, 0, 0, 0, 100, 99, 89, 85,
704 92, 87, 0, 90, 91, 86, 88, 93, 94, 95,
705 115, 81, 116, 84, 76, 31, 5, 25, 26, 39,
706 40, 62, 63, 66, 68, 79, 0, 0, 0, 0,
707 80, 14, 15, 16, 0, 0, 17, 23, 10, 0,
708 1, 3, 23, 118, 0, 0, 131, 132, 134, 0,
709 0, 0, 46, 48, 44, 0, 0, 112, 0, 51,
710 105, 0, 0, 114, 120, 113, 0, 0, 29, 30,
711 33, 34, 24, 38, 65, 67, 64, 78, 0, 125,
712 126, 128, 0, 0, 0, 0, 0, 0, 9, 6,
713 22, 0, 4, 124, 117, 123, 74, 42, 129, 130,
714 0, 75, 43, 0, 0, 45, 0, 109, 51, 0,
715 72, 111, 107, 50, 103, 71, 104, 83, 77, 119,
716 0, 32, 82, 73, 127, 102, 70, 0, 69, 13,
717 12, 11, 133, 31, 47, 51, 110, 108, 51, 37,
718 101, 28, 41, 53, 106, 35, 36, 0, 59, 52,
719 55, 0, 0, 0, 61, 54, 51, 57, 58, 0,
723 /* YYDEFGOTO[NTERM-NUM]. */
724 static const yytype_int16 yydefgoto
[] =
726 -1, 4, 5, 8, 67, 68, 69, 45, 119, 120,
727 47, 81, 98, 99, 100, 175, 48, 49, 136, 83,
728 84, 172, 142, 178, 179, 180, 184, 190, 50, 51,
729 52, 53, 54, 55, 56, 57, 58, 59, 114, 90,
730 91, 144, 86, 87, 88, 94, 60, 74, 96, 125,
731 126, 111, 112, 78, 79
734 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
736 #define YYPACT_NINF -125
737 static const yytype_int16 yypact
[] =
739 -4, 78, 226, 150, 19, 139, -125, -125, 150, -125,
740 -35, -35, 100, 100, -125, -21, -125, -125, -125, -125,
741 -125, -125, -125, -10, -6, 348, -125, -125, -125, -125,
742 -125, -125, 54, -125, -125, -125, -125, -125, -125, -125,
743 -125, -125, -125, -125, -125, 270, 125, -125, 30, -125,
744 -125, 348, 382, -125, 58, -125, -35, 25, -2, 348,
745 -125, -125, -125, -125, 100, 100, -125, 182, -125, 54,
746 -125, -125, 182, -125, 7, 25, -125, -125, 104, 16,
747 16, 54, -125, -125, -23, 348, 117, -125, 74, 348,
748 -125, 80, 32, -125, -125, -125, 35, 54, -125, 71,
749 -125, 30, -125, -125, -125, 58, -125, -125, -31, -125,
750 -125, -125, -22, 348, 83, 64, 62, 62, -125, -125,
751 125, -15, -125, -125, -125, -125, -125, -125, -125, -125,
752 100, -125, -125, -15, -21, -125, 78, -125, 348, 348,
753 -125, -125, -125, -125, 93, -125, -125, -125, -125, -125,
754 -15, -125, -125, -125, -125, -125, -125, 348, -125, -125,
755 -125, -125, 104, 270, -125, 348, -125, -125, 348, 314,
756 -125, -125, -125, 102, -125, -125, 30, 25, 101, 102,
757 -125, 25, 348, 348, 109, -125, 348, -125, -125, 348,
761 /* YYPGOTO[NTERM-NUM]. */
762 static const yytype_int16 yypgoto
[] =
764 -125, -125, -125, -125, 140, 26, -125, -125, 97, 157,
765 -41, -125, 8, -125, 75, -125, -42, -40, -125, 39,
766 -125, -125, -124, -125, -125, 0, -125, -125, -5, -125,
767 -125, 113, 124, -48, -125, -125, -125, -125, -125, 91,
768 -125, -125, -125, 95, -125, -87, -9, -7, -59, -1,
772 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
773 positive, shift that token. If negative, reduce the rule which
774 number is the opposite. If zero, do what YYDEFACT says.
775 If YYTABLE_NINF, syntax error. */
776 #define YYTABLE_NINF -3
777 static const yytype_int16 yytable
[] =
779 9, 73, 73, 101, 75, 102, 107, 123, 103, 149,
780 121, 40, 152, 42, 166, 40, 123, 42, 80, 70,
781 92, 153, 133, 95, 40, 134, 42, 135, 82, 6,
782 7, 40, 93, 42, 149, 85, 6, 7, 150, 89,
783 11, 173, 13, 113, 174, 15, 149, 73, 109, 108,
784 1, 2, 3, 40, 115, 42, 110, 107, 6, 7,
785 95, 103, 191, 149, 130, 124, 124, 6, 7, 116,
786 117, 40, 95, 42, 127, 147, 6, 7, 148, 102,
787 137, 40, 93, 42, 143, 97, 25, 95, 95, 28,
788 29, 30, 31, 118, 33, 34, 35, 36, 118, 124,
789 40, 93, 42, 109, 40, 41, 42, 158, 155, 43,
790 130, 110, 95, 6, 7, 159, 160, 140, 177, 85,
791 161, 101, 183, 145, 95, 89, 156, 176, 157, 6,
792 7, 189, 163, 143, 167, 165, 103, 168, 14, -2,
793 71, 95, 16, 17, 18, 19, 76, 77, 72, 169,
794 128, 129, 170, 61, 62, 63, 64, 65, 66, 46,
795 143, 138, 139, 143, 104, 106, 131, 132, 73, 122,
796 181, 171, 124, 164, 151, 105, 182, 187, 188, 185,
797 186, 143, 146, 141, 192, 61, 62, 63, 64, 65,
798 66, 10, 11, 12, 13, 14, 154, 15, 162, 16,
799 17, 18, 19, 0, 0, 20, 21, 22, 23, 24,
800 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
801 35, 36, 37, 38, 39, 0, 0, 0, 40, 41,
802 42, 0, 0, 43, 44, 10, 11, 12, 13, 14,
803 0, 15, 0, 16, 17, 18, 19, 0, 0, 20,
804 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
805 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
806 0, 0, 40, 41, 42, 0, 0, 43, 44, 10,
807 11, 12, 13, 0, 97, 15, 0, 0, 0, 0,
808 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
809 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
810 37, 38, 39, 0, 0, 0, 40, 41, 42, 0,
811 0, 43, 44, 10, 11, 12, 13, 0, 0, 15,
812 0, 0, 0, 0, 0, 0, 0, 20, 21, 22,
813 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
814 33, 34, 35, 36, 37, 38, 39, 10, 0, 12,
815 40, 41, 42, 0, 0, 43, 44, 0, 0, 0,
816 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
817 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
818 39, 10, 0, 12, 40, 41, 42, 0, 0, 43,
819 44, 0, 0, 0, 0, 20, 21, 22, 23, 24,
820 0, 26, 27, 0, 0, 0, 0, 32, 0, 0,
821 0, 0, 37, 38, 39, 0, 0, 0, 0, 0,
825 static const yytype_int16 yycheck
[] =
827 1, 10, 11, 45, 11, 46, 54, 0, 48, 96,
828 69, 46, 43, 48, 138, 46, 0, 48, 13, 0,
829 25, 43, 81, 32, 46, 48, 48, 50, 49, 51,
830 52, 46, 47, 48, 121, 45, 51, 52, 97, 45,
831 10, 165, 12, 45, 168, 15, 133, 56, 57, 56,
832 54, 55, 56, 46, 59, 48, 57, 105, 51, 52,
833 69, 101, 186, 150, 48, 74, 75, 51, 52, 64,
834 65, 46, 81, 48, 75, 43, 51, 52, 43, 120,
835 85, 46, 47, 48, 89, 14, 28, 96, 97, 31,
836 32, 33, 34, 67, 36, 37, 38, 39, 72, 108,
837 46, 47, 48, 112, 46, 47, 48, 43, 113, 51,
838 48, 112, 121, 51, 52, 116, 117, 43, 16, 45,
839 121, 163, 21, 43, 133, 45, 43, 169, 45, 51,
840 52, 22, 133, 138, 139, 136, 176, 44, 13, 0,
841 1, 150, 17, 18, 19, 20, 46, 47, 8, 150,
842 46, 47, 157, 3, 4, 5, 6, 7, 8, 2,
843 165, 44, 45, 168, 51, 52, 79, 80, 177, 72,
844 177, 163, 181, 134, 99, 51, 177, 182, 183, 179,
845 181, 186, 91, 88, 189, 3, 4, 5, 6, 7,
846 8, 9, 10, 11, 12, 13, 112, 15, 130, 17,
847 18, 19, 20, -1, -1, 23, 24, 25, 26, 27,
848 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
849 38, 39, 40, 41, 42, -1, -1, -1, 46, 47,
850 48, -1, -1, 51, 52, 9, 10, 11, 12, 13,
851 -1, 15, -1, 17, 18, 19, 20, -1, -1, 23,
852 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
853 34, 35, 36, 37, 38, 39, 40, 41, 42, -1,
854 -1, -1, 46, 47, 48, -1, -1, 51, 52, 9,
855 10, 11, 12, -1, 14, 15, -1, -1, -1, -1,
856 -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
857 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
858 40, 41, 42, -1, -1, -1, 46, 47, 48, -1,
859 -1, 51, 52, 9, 10, 11, 12, -1, -1, 15,
860 -1, -1, -1, -1, -1, -1, -1, 23, 24, 25,
861 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
862 36, 37, 38, 39, 40, 41, 42, 9, -1, 11,
863 46, 47, 48, -1, -1, 51, 52, -1, -1, -1,
864 -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
865 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
866 42, 9, -1, 11, 46, 47, 48, -1, -1, 51,
867 52, -1, -1, -1, -1, 23, 24, 25, 26, 27,
868 -1, 29, 30, -1, -1, -1, -1, 35, -1, -1,
869 -1, -1, 40, 41, 42, -1, -1, -1, -1, -1,
873 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
874 symbol of state STATE-NUM. */
875 static const yytype_uint8 yystos
[] =
877 0, 54, 55, 56, 58, 59, 51, 52, 60, 106,
878 9, 10, 11, 12, 13, 15, 17, 18, 19, 20,
879 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
880 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
881 46, 47, 48, 51, 52, 64, 66, 67, 73, 74,
882 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
883 103, 3, 4, 5, 6, 7, 8, 61, 62, 63,
884 0, 1, 61, 103, 104, 104, 46, 47, 110, 111,
885 111, 68, 49, 76, 77, 45, 99, 100, 101, 45,
886 96, 97, 85, 47, 102, 103, 105, 14, 69, 70,
887 71, 73, 67, 74, 88, 89, 88, 90, 104, 103,
888 106, 108, 109, 45, 95, 85, 111, 111, 62, 65,
889 66, 105, 65, 0, 103, 106, 107, 106, 46, 47,
890 48, 107, 107, 105, 48, 50, 75, 85, 44, 45,
891 43, 100, 79, 85, 98, 43, 96, 43, 43, 102,
892 105, 71, 43, 43, 108, 85, 43, 45, 43, 106,
893 106, 106, 110, 106, 76, 106, 79, 85, 44, 106,
894 85, 69, 78, 79, 79, 72, 73, 16, 80, 81,
895 82, 104, 106, 21, 83, 82, 106, 85, 85, 22,
899 #define yyerrok (yyerrstatus = 0)
900 #define yyclearin (yychar = YYEMPTY)
904 #define YYACCEPT goto yyacceptlab
905 #define YYABORT goto yyabortlab
906 #define YYERROR goto yyerrorlab
909 /* Like YYERROR except do call yyerror. This remains here temporarily
910 to ease the transition to the new meaning of YYERROR, for GCC.
911 Once GCC version 2 has supplanted version 1, this can go. */
913 #define YYFAIL goto yyerrlab
915 #define YYRECOVERING() (!!yyerrstatus)
917 #define YYBACKUP(Token, Value) \
919 if (yychar == YYEMPTY && yylen == 1) \
923 yytoken = YYTRANSLATE (yychar); \
929 yyerror (YY_("syntax error: cannot back up")); \
936 #define YYERRCODE 256
939 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
940 If N is 0, then set CURRENT to the empty location which ends
941 the previous symbol: RHS[0] (always defined). */
943 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
944 #ifndef YYLLOC_DEFAULT
945 # define YYLLOC_DEFAULT(Current, Rhs, N) \
949 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
950 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
951 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
952 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
956 (Current).first_line = (Current).last_line = \
957 YYRHSLOC (Rhs, 0).last_line; \
958 (Current).first_column = (Current).last_column = \
959 YYRHSLOC (Rhs, 0).last_column; \
965 /* YY_LOCATION_PRINT -- Print the location on the stream.
966 This macro was not mandated originally: define only if we know
967 we won't break user code: when these are the locations we know. */
969 #ifndef YY_LOCATION_PRINT
970 # if YYLTYPE_IS_TRIVIAL
971 # define YY_LOCATION_PRINT(File, Loc) \
972 fprintf (File, "%d.%d-%d.%d", \
973 (Loc).first_line, (Loc).first_column, \
974 (Loc).last_line, (Loc).last_column)
976 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
981 /* YYLEX -- calling `yylex' with the right arguments. */
984 # define YYLEX yylex (YYLEX_PARAM)
986 # define YYLEX yylex ()
989 /* Enable debugging if requested. */
993 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
994 # define YYFPRINTF fprintf
997 # define YYDPRINTF(Args) \
1003 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1007 YYFPRINTF (stderr, "%s ", Title); \
1008 yy_symbol_print (stderr, \
1009 Type, Value, Location); \
1010 YYFPRINTF (stderr, "\n"); \
1015 /*--------------------------------.
1016 | Print this symbol on YYOUTPUT. |
1017 `--------------------------------*/
1020 #if (defined __STDC__ || defined __C99__FUNC__ \
1021 || defined __cplusplus || defined _MSC_VER)
1023 yy_symbol_value_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1026 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1029 YYSTYPE
const * const yyvaluep
;
1030 YYLTYPE
const * const yylocationp
;
1035 YYUSE (yylocationp
);
1037 if (yytype
< YYNTOKENS
)
1038 YYPRINT (yyoutput
, yytoknum
[yytype
], *yyvaluep
);
1050 /*--------------------------------.
1051 | Print this symbol on YYOUTPUT. |
1052 `--------------------------------*/
1054 #if (defined __STDC__ || defined __C99__FUNC__ \
1055 || defined __cplusplus || defined _MSC_VER)
1057 yy_symbol_print (FILE *yyoutput
, int yytype
, YYSTYPE
const * const yyvaluep
, YYLTYPE
const * const yylocationp
)
1060 yy_symbol_print (yyoutput
, yytype
, yyvaluep
, yylocationp
)
1063 YYSTYPE
const * const yyvaluep
;
1064 YYLTYPE
const * const yylocationp
;
1067 if (yytype
< YYNTOKENS
)
1068 YYFPRINTF (yyoutput
, "token %s (", yytname
[yytype
]);
1070 YYFPRINTF (yyoutput
, "nterm %s (", yytname
[yytype
]);
1072 YY_LOCATION_PRINT (yyoutput
, *yylocationp
);
1073 YYFPRINTF (yyoutput
, ": ");
1074 yy_symbol_value_print (yyoutput
, yytype
, yyvaluep
, yylocationp
);
1075 YYFPRINTF (yyoutput
, ")");
1078 /*------------------------------------------------------------------.
1079 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1081 `------------------------------------------------------------------*/
1083 #if (defined __STDC__ || defined __C99__FUNC__ \
1084 || defined __cplusplus || defined _MSC_VER)
1086 yy_stack_print (yytype_int16
*yybottom
, yytype_int16
*yytop
)
1089 yy_stack_print (yybottom
, yytop
)
1090 yytype_int16
*yybottom
;
1091 yytype_int16
*yytop
;
1094 YYFPRINTF (stderr
, "Stack now");
1095 for (; yybottom
<= yytop
; yybottom
++)
1097 int yybot
= *yybottom
;
1098 YYFPRINTF (stderr
, " %d", yybot
);
1100 YYFPRINTF (stderr
, "\n");
1103 # define YY_STACK_PRINT(Bottom, Top) \
1106 yy_stack_print ((Bottom), (Top)); \
1110 /*------------------------------------------------.
1111 | Report that the YYRULE is going to be reduced. |
1112 `------------------------------------------------*/
1114 #if (defined __STDC__ || defined __C99__FUNC__ \
1115 || defined __cplusplus || defined _MSC_VER)
1117 yy_reduce_print (YYSTYPE
*yyvsp
, YYLTYPE
*yylsp
, int yyrule
)
1120 yy_reduce_print (yyvsp
, yylsp
, yyrule
)
1126 int yynrhs
= yyr2
[yyrule
];
1128 unsigned long int yylno
= yyrline
[yyrule
];
1129 YYFPRINTF (stderr
, "Reducing stack by rule %d (line %lu):\n",
1131 /* The symbols being reduced. */
1132 for (yyi
= 0; yyi
< yynrhs
; yyi
++)
1134 YYFPRINTF (stderr
, " $%d = ", yyi
+ 1);
1135 yy_symbol_print (stderr
, yyrhs
[yyprhs
[yyrule
] + yyi
],
1136 &(yyvsp
[(yyi
+ 1) - (yynrhs
)])
1137 , &(yylsp
[(yyi
+ 1) - (yynrhs
)]) );
1138 YYFPRINTF (stderr
, "\n");
1142 # define YY_REDUCE_PRINT(Rule) \
1145 yy_reduce_print (yyvsp, yylsp, Rule); \
1148 /* Nonzero means print parse trace. It is left uninitialized so that
1149 multiple parsers can coexist. */
1151 #else /* !YYDEBUG */
1152 # define YYDPRINTF(Args)
1153 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1154 # define YY_STACK_PRINT(Bottom, Top)
1155 # define YY_REDUCE_PRINT(Rule)
1156 #endif /* !YYDEBUG */
1159 /* YYINITDEPTH -- initial size of the parser's stacks. */
1161 # define YYINITDEPTH 200
1164 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1165 if the built-in stack extension method is used).
1167 Do not make this value too large; the results are undefined if
1168 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1169 evaluated with infinite-precision integer arithmetic. */
1172 # define YYMAXDEPTH 10000
1180 # if defined __GLIBC__ && defined _STRING_H
1181 # define yystrlen strlen
1183 /* Return the length of YYSTR. */
1184 #if (defined __STDC__ || defined __C99__FUNC__ \
1185 || defined __cplusplus || defined _MSC_VER)
1187 yystrlen (const char *yystr
)
1195 for (yylen
= 0; yystr
[yylen
]; yylen
++)
1203 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1204 # define yystpcpy stpcpy
1206 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1208 #if (defined __STDC__ || defined __C99__FUNC__ \
1209 || defined __cplusplus || defined _MSC_VER)
1211 yystpcpy (char *yydest
, const char *yysrc
)
1214 yystpcpy (yydest
, yysrc
)
1220 const char *yys
= yysrc
;
1222 while ((*yyd
++ = *yys
++) != '\0')
1231 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1232 quotes and backslashes, so that it's suitable for yyerror. The
1233 heuristic is that double-quoting is unnecessary unless the string
1234 contains an apostrophe, a comma, or backslash (other than
1235 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1236 null, do not copy; instead, return the length of what the result
1239 yytnamerr (char *yyres
, const char *yystr
)
1244 char const *yyp
= yystr
;
1251 goto do_not_strip_quotes
;
1255 goto do_not_strip_quotes
;
1268 do_not_strip_quotes
: ;
1272 return yystrlen (yystr
);
1274 return yystpcpy (yyres
, yystr
) - yyres
;
1278 /* Copy into YYRESULT an error message about the unexpected token
1279 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1280 including the terminating null byte. If YYRESULT is null, do not
1281 copy anything; just return the number of bytes that would be
1282 copied. As a special case, return 0 if an ordinary "syntax error"
1283 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1284 size calculation. */
1286 yysyntax_error (char *yyresult
, int yystate
, int yychar
)
1288 int yyn
= yypact
[yystate
];
1290 if (! (YYPACT_NINF
< yyn
&& yyn
<= YYLAST
))
1294 int yytype
= YYTRANSLATE (yychar
);
1295 YYSIZE_T yysize0
= yytnamerr (0, yytname
[yytype
]);
1296 YYSIZE_T yysize
= yysize0
;
1298 int yysize_overflow
= 0;
1299 enum { YYERROR_VERBOSE_ARGS_MAXIMUM
= 5 };
1300 char const *yyarg
[YYERROR_VERBOSE_ARGS_MAXIMUM
];
1304 /* This is so xgettext sees the translatable formats that are
1305 constructed on the fly. */
1306 YY_("syntax error, unexpected %s");
1307 YY_("syntax error, unexpected %s, expecting %s");
1308 YY_("syntax error, unexpected %s, expecting %s or %s");
1309 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1310 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1314 static char const yyunexpected
[] = "syntax error, unexpected %s";
1315 static char const yyexpecting
[] = ", expecting %s";
1316 static char const yyor
[] = " or %s";
1317 char yyformat
[sizeof yyunexpected
1318 + sizeof yyexpecting
- 1
1319 + ((YYERROR_VERBOSE_ARGS_MAXIMUM
- 2)
1320 * (sizeof yyor
- 1))];
1321 char const *yyprefix
= yyexpecting
;
1323 /* Start YYX at -YYN if negative to avoid negative indexes in
1325 int yyxbegin
= yyn
< 0 ? -yyn
: 0;
1327 /* Stay within bounds of both yycheck and yytname. */
1328 int yychecklim
= YYLAST
- yyn
+ 1;
1329 int yyxend
= yychecklim
< YYNTOKENS
? yychecklim
: YYNTOKENS
;
1332 yyarg
[0] = yytname
[yytype
];
1333 yyfmt
= yystpcpy (yyformat
, yyunexpected
);
1335 for (yyx
= yyxbegin
; yyx
< yyxend
; ++yyx
)
1336 if (yycheck
[yyx
+ yyn
] == yyx
&& yyx
!= YYTERROR
)
1338 if (yycount
== YYERROR_VERBOSE_ARGS_MAXIMUM
)
1342 yyformat
[sizeof yyunexpected
- 1] = '\0';
1345 yyarg
[yycount
++] = yytname
[yyx
];
1346 yysize1
= yysize
+ yytnamerr (0, yytname
[yyx
]);
1347 yysize_overflow
|= (yysize1
< yysize
);
1349 yyfmt
= yystpcpy (yyfmt
, yyprefix
);
1353 yyf
= YY_(yyformat
);
1354 yysize1
= yysize
+ yystrlen (yyf
);
1355 yysize_overflow
|= (yysize1
< yysize
);
1358 if (yysize_overflow
)
1359 return YYSIZE_MAXIMUM
;
1363 /* Avoid sprintf, as that infringes on the user's name space.
1364 Don't have undefined behavior even if the translation
1365 produced a string with the wrong number of "%s"s. */
1366 char *yyp
= yyresult
;
1368 while ((*yyp
= *yyf
) != '\0')
1370 if (*yyp
== '%' && yyf
[1] == 's' && yyi
< yycount
)
1372 yyp
+= yytnamerr (yyp
, yyarg
[yyi
++]);
1385 #endif /* YYERROR_VERBOSE */
1388 /*-----------------------------------------------.
1389 | Release the memory associated to this symbol. |
1390 `-----------------------------------------------*/
1393 #if (defined __STDC__ || defined __C99__FUNC__ \
1394 || defined __cplusplus || defined _MSC_VER)
1396 yydestruct (const char *yymsg
, int yytype
, YYSTYPE
*yyvaluep
, YYLTYPE
*yylocationp
)
1399 yydestruct (yymsg
, yytype
, yyvaluep
, yylocationp
)
1403 YYLTYPE
*yylocationp
;
1407 YYUSE (yylocationp
);
1411 YY_SYMBOL_PRINT (yymsg
, yytype
, yyvaluep
, yylocationp
);
1415 case 46: /* "\"text\"" */
1417 /* Line 1000 of yacc.c */
1419 { free((yyvaluep
->str
)); };
1421 /* Line 1000 of yacc.c */
1422 #line 1423 "SCDoc.tab.cpp"
1424 case 47: /* "URL" */
1426 /* Line 1000 of yacc.c */
1428 { free((yyvaluep
->str
)); };
1430 /* Line 1000 of yacc.c */
1431 #line 1432 "SCDoc.tab.cpp"
1433 case 48: /* "COMMA" */
1435 /* Line 1000 of yacc.c */
1437 { free((yyvaluep
->str
)); };
1439 /* Line 1000 of yacc.c */
1440 #line 1441 "SCDoc.tab.cpp"
1442 case 49: /* "\"method name\"" */
1444 /* Line 1000 of yacc.c */
1446 { free((yyvaluep
->str
)); };
1448 /* Line 1000 of yacc.c */
1449 #line 1450 "SCDoc.tab.cpp"
1451 case 50: /* "\"arguments string\"" */
1453 /* Line 1000 of yacc.c */
1455 { free((yyvaluep
->str
)); };
1457 /* Line 1000 of yacc.c */
1458 #line 1459 "SCDoc.tab.cpp"
1460 case 59: /* "document" */
1462 /* Line 1000 of yacc.c */
1464 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1466 /* Line 1000 of yacc.c */
1467 #line 1468 "SCDoc.tab.cpp"
1469 case 61: /* "dochead" */
1471 /* Line 1000 of yacc.c */
1473 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1475 /* Line 1000 of yacc.c */
1476 #line 1477 "SCDoc.tab.cpp"
1478 case 62: /* "headline" */
1480 /* Line 1000 of yacc.c */
1482 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1484 /* Line 1000 of yacc.c */
1485 #line 1486 "SCDoc.tab.cpp"
1487 case 65: /* "optsections" */
1489 /* Line 1000 of yacc.c */
1491 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1493 /* Line 1000 of yacc.c */
1494 #line 1495 "SCDoc.tab.cpp"
1496 case 66: /* "sections" */
1498 /* Line 1000 of yacc.c */
1500 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1502 /* Line 1000 of yacc.c */
1503 #line 1504 "SCDoc.tab.cpp"
1505 case 67: /* "section" */
1507 /* Line 1000 of yacc.c */
1509 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1511 /* Line 1000 of yacc.c */
1512 #line 1513 "SCDoc.tab.cpp"
1514 case 69: /* "optsubsections" */
1516 /* Line 1000 of yacc.c */
1518 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1520 /* Line 1000 of yacc.c */
1521 #line 1522 "SCDoc.tab.cpp"
1523 case 70: /* "subsections" */
1525 /* Line 1000 of yacc.c */
1527 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1529 /* Line 1000 of yacc.c */
1530 #line 1531 "SCDoc.tab.cpp"
1532 case 71: /* "subsection" */
1534 /* Line 1000 of yacc.c */
1536 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1538 /* Line 1000 of yacc.c */
1539 #line 1540 "SCDoc.tab.cpp"
1541 case 72: /* "optsubsubsections" */
1543 /* Line 1000 of yacc.c */
1545 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1547 /* Line 1000 of yacc.c */
1548 #line 1549 "SCDoc.tab.cpp"
1550 case 73: /* "subsubsections" */
1552 /* Line 1000 of yacc.c */
1554 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1556 /* Line 1000 of yacc.c */
1557 #line 1558 "SCDoc.tab.cpp"
1559 case 74: /* "subsubsection" */
1561 /* Line 1000 of yacc.c */
1563 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1565 /* Line 1000 of yacc.c */
1566 #line 1567 "SCDoc.tab.cpp"
1568 case 75: /* "optMETHODARGS" */
1570 /* Line 1000 of yacc.c */
1572 { free((yyvaluep
->str
)); };
1574 /* Line 1000 of yacc.c */
1575 #line 1576 "SCDoc.tab.cpp"
1577 case 76: /* "methodname" */
1579 /* Line 1000 of yacc.c */
1581 { free((yyvaluep
->str
)); };
1583 /* Line 1000 of yacc.c */
1584 #line 1585 "SCDoc.tab.cpp"
1586 case 77: /* "methnames" */
1588 /* Line 1000 of yacc.c */
1590 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1592 /* Line 1000 of yacc.c */
1593 #line 1594 "SCDoc.tab.cpp"
1595 case 78: /* "methodbody" */
1597 /* Line 1000 of yacc.c */
1599 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1601 /* Line 1000 of yacc.c */
1602 #line 1603 "SCDoc.tab.cpp"
1604 case 79: /* "optbody" */
1606 /* Line 1000 of yacc.c */
1608 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1610 /* Line 1000 of yacc.c */
1611 #line 1612 "SCDoc.tab.cpp"
1613 case 80: /* "optargs" */
1615 /* Line 1000 of yacc.c */
1617 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1619 /* Line 1000 of yacc.c */
1620 #line 1621 "SCDoc.tab.cpp"
1622 case 81: /* "args" */
1624 /* Line 1000 of yacc.c */
1626 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1628 /* Line 1000 of yacc.c */
1629 #line 1630 "SCDoc.tab.cpp"
1631 case 82: /* "arg" */
1633 /* Line 1000 of yacc.c */
1635 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1637 /* Line 1000 of yacc.c */
1638 #line 1639 "SCDoc.tab.cpp"
1640 case 83: /* "optreturns" */
1642 /* Line 1000 of yacc.c */
1644 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1646 /* Line 1000 of yacc.c */
1647 #line 1648 "SCDoc.tab.cpp"
1649 case 84: /* "optdiscussion" */
1651 /* Line 1000 of yacc.c */
1653 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1655 /* Line 1000 of yacc.c */
1656 #line 1657 "SCDoc.tab.cpp"
1658 case 85: /* "body" */
1660 /* Line 1000 of yacc.c */
1662 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1664 /* Line 1000 of yacc.c */
1665 #line 1666 "SCDoc.tab.cpp"
1667 case 86: /* "blockA" */
1669 /* Line 1000 of yacc.c */
1671 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1673 /* Line 1000 of yacc.c */
1674 #line 1675 "SCDoc.tab.cpp"
1676 case 87: /* "blockB" */
1678 /* Line 1000 of yacc.c */
1680 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1682 /* Line 1000 of yacc.c */
1683 #line 1684 "SCDoc.tab.cpp"
1685 case 88: /* "bodyelem" */
1687 /* Line 1000 of yacc.c */
1689 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1691 /* Line 1000 of yacc.c */
1692 #line 1693 "SCDoc.tab.cpp"
1694 case 89: /* "prose" */
1696 /* Line 1000 of yacc.c */
1698 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1700 /* Line 1000 of yacc.c */
1701 #line 1702 "SCDoc.tab.cpp"
1703 case 90: /* "proseelem" */
1705 /* Line 1000 of yacc.c */
1707 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1709 /* Line 1000 of yacc.c */
1710 #line 1711 "SCDoc.tab.cpp"
1712 case 95: /* "listbody" */
1714 /* Line 1000 of yacc.c */
1716 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1718 /* Line 1000 of yacc.c */
1719 #line 1720 "SCDoc.tab.cpp"
1721 case 96: /* "tablerow" */
1723 /* Line 1000 of yacc.c */
1725 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1727 /* Line 1000 of yacc.c */
1728 #line 1729 "SCDoc.tab.cpp"
1730 case 97: /* "tablebody" */
1732 /* Line 1000 of yacc.c */
1734 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1736 /* Line 1000 of yacc.c */
1737 #line 1738 "SCDoc.tab.cpp"
1739 case 98: /* "tablecells" */
1741 /* Line 1000 of yacc.c */
1743 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1745 /* Line 1000 of yacc.c */
1746 #line 1747 "SCDoc.tab.cpp"
1748 case 99: /* "defterms" */
1750 /* Line 1000 of yacc.c */
1752 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1754 /* Line 1000 of yacc.c */
1755 #line 1756 "SCDoc.tab.cpp"
1757 case 100: /* "deflistrow" */
1759 /* Line 1000 of yacc.c */
1761 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1763 /* Line 1000 of yacc.c */
1764 #line 1765 "SCDoc.tab.cpp"
1766 case 101: /* "deflistbody" */
1768 /* Line 1000 of yacc.c */
1770 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1772 /* Line 1000 of yacc.c */
1773 #line 1774 "SCDoc.tab.cpp"
1775 case 102: /* "anywordurl" */
1777 /* Line 1000 of yacc.c */
1779 { free((yyvaluep
->str
)); };
1781 /* Line 1000 of yacc.c */
1782 #line 1783 "SCDoc.tab.cpp"
1784 case 103: /* "anyword" */
1786 /* Line 1000 of yacc.c */
1788 { free((yyvaluep
->str
)); };
1790 /* Line 1000 of yacc.c */
1791 #line 1792 "SCDoc.tab.cpp"
1793 case 104: /* "words" */
1795 /* Line 1000 of yacc.c */
1797 { free((yyvaluep
->str
)); };
1799 /* Line 1000 of yacc.c */
1800 #line 1801 "SCDoc.tab.cpp"
1802 case 105: /* "words2" */
1804 /* Line 1000 of yacc.c */
1806 { free((yyvaluep
->str
)); };
1808 /* Line 1000 of yacc.c */
1809 #line 1810 "SCDoc.tab.cpp"
1811 case 108: /* "anywordnl" */
1813 /* Line 1000 of yacc.c */
1815 { free((yyvaluep
->str
)); };
1817 /* Line 1000 of yacc.c */
1818 #line 1819 "SCDoc.tab.cpp"
1820 case 109: /* "wordsnl" */
1822 /* Line 1000 of yacc.c */
1824 { free((yyvaluep
->str
)); };
1826 /* Line 1000 of yacc.c */
1827 #line 1828 "SCDoc.tab.cpp"
1829 case 110: /* "nocommawords" */
1831 /* Line 1000 of yacc.c */
1833 { free((yyvaluep
->str
)); };
1835 /* Line 1000 of yacc.c */
1836 #line 1837 "SCDoc.tab.cpp"
1838 case 111: /* "commalist" */
1840 /* Line 1000 of yacc.c */
1842 { doc_node_free_tree((yyvaluep
->doc_node
)); };
1844 /* Line 1000 of yacc.c */
1845 #line 1846 "SCDoc.tab.cpp"
1853 /* Prevent warnings from -Wmissing-prototypes. */
1854 #ifdef YYPARSE_PARAM
1855 #if defined __STDC__ || defined __cplusplus
1856 int yyparse (void *YYPARSE_PARAM
);
1860 #else /* ! YYPARSE_PARAM */
1861 #if defined __STDC__ || defined __cplusplus
1866 #endif /* ! YYPARSE_PARAM */
1869 /* The lookahead symbol. */
1872 /* The semantic value of the lookahead symbol. */
1875 /* Location data for the lookahead symbol. */
1878 /* Number of syntax errors so far. */
1883 /*-------------------------.
1884 | yyparse or yypush_parse. |
1885 `-------------------------*/
1887 #ifdef YYPARSE_PARAM
1888 #if (defined __STDC__ || defined __C99__FUNC__ \
1889 || defined __cplusplus || defined _MSC_VER)
1891 yyparse (void *YYPARSE_PARAM
)
1894 yyparse (YYPARSE_PARAM
)
1895 void *YYPARSE_PARAM
;
1897 #else /* ! YYPARSE_PARAM */
1898 #if (defined __STDC__ || defined __C99__FUNC__ \
1899 || defined __cplusplus || defined _MSC_VER)
1912 /* Number of tokens to shift before error messages enabled. */
1915 /* The stacks and their tools:
1916 `yyss': related to states.
1917 `yyvs': related to semantic values.
1918 `yyls': related to locations.
1920 Refer to the stacks thru separate pointers, to allow yyoverflow
1921 to reallocate them elsewhere. */
1923 /* The state stack. */
1924 yytype_int16 yyssa
[YYINITDEPTH
];
1926 yytype_int16
*yyssp
;
1928 /* The semantic value stack. */
1929 YYSTYPE yyvsa
[YYINITDEPTH
];
1933 /* The location stack. */
1934 YYLTYPE yylsa
[YYINITDEPTH
];
1938 /* The locations where the error started and ended. */
1939 YYLTYPE yyerror_range
[2];
1941 YYSIZE_T yystacksize
;
1945 /* Lookahead token as an internal (translated) token number. */
1947 /* The variables used to return semantic value and location from the
1953 /* Buffer for error messages, and its allocated size. */
1955 char *yymsg
= yymsgbuf
;
1956 YYSIZE_T yymsg_alloc
= sizeof yymsgbuf
;
1959 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1961 /* The number of symbols on the RHS of the reduced rule.
1962 Keep to zero when no symbol should be popped. */
1969 yystacksize
= YYINITDEPTH
;
1971 YYDPRINTF ((stderr
, "Starting parse\n"));
1976 yychar
= YYEMPTY
; /* Cause a token to be read. */
1978 /* Initialize stack pointers.
1979 Waste one element of value and location stack
1980 so that they stay on the same level as the state stack.
1981 The wasted elements are never initialized. */
1986 #if YYLTYPE_IS_TRIVIAL
1987 /* Initialize the default location before parsing starts. */
1988 yylloc
.first_line
= yylloc
.last_line
= 1;
1989 yylloc
.first_column
= yylloc
.last_column
= 1;
1994 /*------------------------------------------------------------.
1995 | yynewstate -- Push a new state, which is found in yystate. |
1996 `------------------------------------------------------------*/
1998 /* In all cases, when you get here, the value and location stacks
1999 have just been pushed. So pushing a state here evens the stacks. */
2005 if (yyss
+ yystacksize
- 1 <= yyssp
)
2007 /* Get the current used size of the three stacks, in elements. */
2008 YYSIZE_T yysize
= yyssp
- yyss
+ 1;
2012 /* Give user a chance to reallocate the stack. Use copies of
2013 these so that the &'s don't force the real ones into
2015 YYSTYPE
*yyvs1
= yyvs
;
2016 yytype_int16
*yyss1
= yyss
;
2017 YYLTYPE
*yyls1
= yyls
;
2019 /* Each stack pointer address is followed by the size of the
2020 data in use in that stack, in bytes. This used to be a
2021 conditional around just the two extra args, but that might
2022 be undefined if yyoverflow is a macro. */
2023 yyoverflow (YY_("memory exhausted"),
2024 &yyss1
, yysize
* sizeof (*yyssp
),
2025 &yyvs1
, yysize
* sizeof (*yyvsp
),
2026 &yyls1
, yysize
* sizeof (*yylsp
),
2033 #else /* no yyoverflow */
2034 # ifndef YYSTACK_RELOCATE
2035 goto yyexhaustedlab
;
2037 /* Extend the stack our own way. */
2038 if (YYMAXDEPTH
<= yystacksize
)
2039 goto yyexhaustedlab
;
2041 if (YYMAXDEPTH
< yystacksize
)
2042 yystacksize
= YYMAXDEPTH
;
2045 yytype_int16
*yyss1
= yyss
;
2046 union yyalloc
*yyptr
=
2047 (union yyalloc
*) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize
));
2049 goto yyexhaustedlab
;
2050 YYSTACK_RELOCATE (yyss_alloc
, yyss
);
2051 YYSTACK_RELOCATE (yyvs_alloc
, yyvs
);
2052 YYSTACK_RELOCATE (yyls_alloc
, yyls
);
2053 # undef YYSTACK_RELOCATE
2055 YYSTACK_FREE (yyss1
);
2058 #endif /* no yyoverflow */
2060 yyssp
= yyss
+ yysize
- 1;
2061 yyvsp
= yyvs
+ yysize
- 1;
2062 yylsp
= yyls
+ yysize
- 1;
2064 YYDPRINTF ((stderr
, "Stack size increased to %lu\n",
2065 (unsigned long int) yystacksize
));
2067 if (yyss
+ yystacksize
- 1 <= yyssp
)
2071 YYDPRINTF ((stderr
, "Entering state %d\n", yystate
));
2073 if (yystate
== YYFINAL
)
2083 /* Do appropriate processing given the current state. Read a
2084 lookahead token if we need one and don't already have one. */
2086 /* First try to decide what to do without reference to lookahead token. */
2087 yyn
= yypact
[yystate
];
2088 if (yyn
== YYPACT_NINF
)
2091 /* Not known => get a lookahead token if don't already have one. */
2093 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2094 if (yychar
== YYEMPTY
)
2096 YYDPRINTF ((stderr
, "Reading a token: "));
2100 if (yychar
<= YYEOF
)
2102 yychar
= yytoken
= YYEOF
;
2103 YYDPRINTF ((stderr
, "Now at end of input.\n"));
2107 yytoken
= YYTRANSLATE (yychar
);
2108 YY_SYMBOL_PRINT ("Next token is", yytoken
, &yylval
, &yylloc
);
2111 /* If the proper action on seeing token YYTOKEN is to reduce or to
2112 detect an error, take that action. */
2114 if (yyn
< 0 || YYLAST
< yyn
|| yycheck
[yyn
] != yytoken
)
2119 if (yyn
== 0 || yyn
== YYTABLE_NINF
)
2125 /* Count tokens shifted since error; after three, turn off error
2130 /* Shift the lookahead token. */
2131 YY_SYMBOL_PRINT ("Shifting", yytoken
, &yylval
, &yylloc
);
2133 /* Discard the shifted token. */
2142 /*-----------------------------------------------------------.
2143 | yydefault -- do the default action for the current state. |
2144 `-----------------------------------------------------------*/
2146 yyn
= yydefact
[yystate
];
2152 /*-----------------------------.
2153 | yyreduce -- Do a reduction. |
2154 `-----------------------------*/
2156 /* yyn is the number of a rule to reduce with. */
2159 /* If YYLEN is nonzero, implement the default value of the action:
2162 Otherwise, the following line sets YYVAL to garbage.
2163 This behavior is undocumented and Bison
2164 users should not rely upon it. Assigning to YYVAL
2165 unconditionally makes the parser a bit smaller, and it avoids a
2166 GCC warning that YYVAL may be used uninitialized. */
2167 yyval
= yyvsp
[1-yylen
];
2169 /* Default location. */
2170 YYLLOC_DEFAULT (yyloc
, (yylsp
- yylen
), yylen
);
2171 YY_REDUCE_PRINT (yyn
);
2176 /* Line 1455 of yacc.c */
2178 { topnode
= (yyvsp
[(1) - (1)].doc_node
); ;}
2183 /* Line 1455 of yacc.c */
2185 { topnode
= NULL
; doc_node_free_tree((yyvsp
[(1) - (2)].doc_node
)); ;}
2190 /* Line 1455 of yacc.c */
2193 (yyval
.doc_node
) = doc_node_create("DOCUMENT");
2194 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(3) - (4)].doc_node
));
2195 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(4) - (4)].doc_node
));
2201 /* Line 1455 of yacc.c */
2204 (yyval
.doc_node
) = doc_node_make_take_children("BODY",NULL
,(yyvsp
[(2) - (2)].doc_node
));
2210 /* Line 1455 of yacc.c */
2213 (yyval
.doc_node
) = doc_node_create("DOCUMENT");
2214 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(2) - (3)].doc_node
));
2215 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(3) - (3)].doc_node
));
2221 /* Line 1455 of yacc.c */
2223 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2228 /* Line 1455 of yacc.c */
2230 { (yyval
.doc_node
) = doc_node_make("HEADER",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2235 /* Line 1455 of yacc.c */
2237 { (yyval
.doc_node
) = doc_node_make((yyvsp
[(1) - (3)].id
),(yyvsp
[(2) - (3)].str
),NULL
); ;}
2242 /* Line 1455 of yacc.c */
2244 { (yyval
.doc_node
) = doc_node_make_take_children("CATEGORIES",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2249 /* Line 1455 of yacc.c */
2251 { (yyval
.doc_node
) = doc_node_make_take_children("RELATED",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2256 /* Line 1455 of yacc.c */
2258 { (yyval
.id
) = "TITLE"; ;}
2263 /* Line 1455 of yacc.c */
2265 { (yyval
.id
) = "TITLE"; ;}
2270 /* Line 1455 of yacc.c */
2272 { (yyval
.id
) = "SUMMARY"; ;}
2277 /* Line 1455 of yacc.c */
2279 { (yyval
.id
) = "REDIRECT"; ;}
2284 /* Line 1455 of yacc.c */
2286 { (yyval
.id
) = "CLASSMETHODS"; method_type
= "CMETHOD"; ;}
2291 /* Line 1455 of yacc.c */
2293 { (yyval
.id
) = "INSTANCEMETHODS"; method_type
= "IMETHOD"; ;}
2298 /* Line 1455 of yacc.c */
2300 { (yyval
.id
) = "DESCRIPTION"; method_type
= "METHOD"; ;}
2305 /* Line 1455 of yacc.c */
2307 { (yyval
.id
) = "EXAMPLES"; method_type
= "METHOD"; ;}
2312 /* Line 1455 of yacc.c */
2314 { (yyval
.doc_node
) = doc_node_make("BODY",NULL
,NULL
); ;}
2319 /* Line 1455 of yacc.c */
2321 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2326 /* Line 1455 of yacc.c */
2328 { (yyval
.doc_node
) = doc_node_make("BODY",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2333 /* Line 1455 of yacc.c */
2335 { (yyval
.doc_node
) = doc_node_make_take_children("BODY",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2340 /* Line 1455 of yacc.c */
2342 { method_type
= "METHOD"; ;}
2347 /* Line 1455 of yacc.c */
2349 { (yyval
.doc_node
) = doc_node_make_take_children("SECTION",(yyvsp
[(3) - (5)].str
),(yyvsp
[(5) - (5)].doc_node
)); ;}
2354 /* Line 1455 of yacc.c */
2356 { (yyval
.doc_node
) = doc_node_make_take_children((yyvsp
[(1) - (2)].id
), NULL
,(yyvsp
[(2) - (2)].doc_node
)); ;}
2361 /* Line 1455 of yacc.c */
2363 { (yyval
.doc_node
) = NULL
; ;}
2368 /* Line 1455 of yacc.c */
2370 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2375 /* Line 1455 of yacc.c */
2377 { (yyval
.doc_node
) = doc_node_make("(SUBSECTIONS)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2382 /* Line 1455 of yacc.c */
2384 { (yyval
.doc_node
) = doc_node_make_take_children("SUBSECTION", (yyvsp
[(2) - (4)].str
), (yyvsp
[(4) - (4)].doc_node
)); ;}
2389 /* Line 1455 of yacc.c */
2391 { (yyval
.doc_node
) = NULL
; ;}
2396 /* Line 1455 of yacc.c */
2398 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2403 /* Line 1455 of yacc.c */
2405 { (yyval
.doc_node
) = doc_node_make("(SUBSUBSECTIONS)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2410 /* Line 1455 of yacc.c */
2412 { (yyval
.doc_node
) = doc_node_make_take_children("(SUBSUBSECTIONS)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2417 /* Line 1455 of yacc.c */
2420 (yyvsp
[(2) - (5)].doc_node
)->id
= "METHODNAMES";
2421 (yyval
.doc_node
) = doc_node_make(method_type
,(yyvsp
[(3) - (5)].str
),(yyvsp
[(2) - (5)].doc_node
));
2422 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(5) - (5)].doc_node
));
2423 // doc_node_add_child($2, $3);
2429 /* Line 1455 of yacc.c */
2431 { (yyval
.doc_node
) = doc_node_make(
2432 method_type
=="CMETHOD"?"CCOPYMETHOD":(method_type
=="IMETHOD"?"ICOPYMETHOD":"COPYMETHOD"),
2433 (yyvsp
[(2) - (3)].str
),NULL
2439 /* Line 1455 of yacc.c */
2441 { (yyval
.doc_node
) = doc_node_make_take_children(method_type
=="CMETHOD"?"CPRIVATE":"IPRIVATE",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2446 /* Line 1455 of yacc.c */
2448 { (yyval
.str
) = NULL
; ;}
2453 /* Line 1455 of yacc.c */
2456 // $$ = doc_node_make("ARGSTRING",$1,NULL);
2457 (yyval
.str
) = (yyvsp
[(1) - (1)].str
);
2458 if(method_type
!="METHOD") {
2459 yyerror("METHOD argument string is not allowed inside CLASSMETHODS or INSTANCEMETHODS");
2467 /* Line 1455 of yacc.c */
2470 char *p
= (yyvsp
[(1) - (1)].str
)+strlen((yyvsp
[(1) - (1)].str
))-1;
2472 post("WARNING: SCDoc: In %s\n Property setter %s should be documented without underscore.\n", scdoc_current_file
, (yyvsp
[(1) - (1)].str
));
2475 (yyval
.str
) = (yyvsp
[(1) - (1)].str
);
2481 /* Line 1455 of yacc.c */
2483 { free((yyvsp
[(2) - (3)].str
)); (yyvsp
[(2) - (3)].str
) = NULL
; (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (3)].doc_node
), doc_node_make("STRING",(yyvsp
[(3) - (3)].str
),NULL
)); ;}
2488 /* Line 1455 of yacc.c */
2490 { (yyval
.doc_node
) = doc_node_make("(METHODNAMES)",NULL
,doc_node_make("STRING",(yyvsp
[(1) - (1)].str
),NULL
)); ;}
2495 /* Line 1455 of yacc.c */
2498 (yyval
.doc_node
) = doc_node_make_take_children("METHODBODY",NULL
,(yyvsp
[(1) - (4)].doc_node
));
2499 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(2) - (4)].doc_node
));
2500 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(3) - (4)].doc_node
));
2501 doc_node_add_child((yyval
.doc_node
), (yyvsp
[(4) - (4)].doc_node
));
2507 /* Line 1455 of yacc.c */
2509 { (yyval
.doc_node
) = NULL
; ;}
2514 /* Line 1455 of yacc.c */
2516 { (yyval
.doc_node
) = NULL
; ;}
2521 /* Line 1455 of yacc.c */
2523 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2528 /* Line 1455 of yacc.c */
2530 { (yyval
.doc_node
) = doc_node_make("ARGUMENTS",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2535 /* Line 1455 of yacc.c */
2537 { (yyval
.doc_node
) = doc_node_make_take_children("ARGUMENT", (yyvsp
[(2) - (4)].str
), (yyvsp
[(4) - (4)].doc_node
)); ;}
2542 /* Line 1455 of yacc.c */
2544 { (yyval
.doc_node
) = doc_node_make_take_children("ARGUMENT", NULL
, (yyvsp
[(3) - (3)].doc_node
)); ;}
2549 /* Line 1455 of yacc.c */
2551 { (yyval
.doc_node
) = doc_node_make_take_children("RETURNS",NULL
,(yyvsp
[(2) - (2)].doc_node
)); ;}
2556 /* Line 1455 of yacc.c */
2558 { (yyval
.doc_node
) = NULL
; ;}
2563 /* Line 1455 of yacc.c */
2565 { (yyval
.doc_node
) = doc_node_make_take_children("DISCUSSION",NULL
,(yyvsp
[(2) - (2)].doc_node
)); ;}
2570 /* Line 1455 of yacc.c */
2572 { (yyval
.doc_node
) = NULL
; ;}
2577 /* Line 1455 of yacc.c */
2579 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2584 /* Line 1455 of yacc.c */
2586 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2591 /* Line 1455 of yacc.c */
2593 { (yyval
.doc_node
) = doc_node_make("(SECTIONBODY)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2598 /* Line 1455 of yacc.c */
2600 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2605 /* Line 1455 of yacc.c */
2607 { (yyval
.doc_node
) = doc_node_make("(SECTIONBODY)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2612 /* Line 1455 of yacc.c */
2614 { (yyval
.doc_node
) = doc_node_make_take_children((yyvsp
[(1) - (3)].id
),NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2619 /* Line 1455 of yacc.c */
2621 { (yyval
.doc_node
) = doc_node_make_take_children((yyvsp
[(1) - (3)].id
),NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2626 /* Line 1455 of yacc.c */
2628 { (yyval
.doc_node
) = doc_node_make_take_children("TABLE",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2633 /* Line 1455 of yacc.c */
2635 { (yyval
.doc_node
) = doc_node_make_take_children("DEFINITIONLIST",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2640 /* Line 1455 of yacc.c */
2642 { (yyval
.doc_node
) = doc_node_make((yyvsp
[(1) - (3)].id
),(yyvsp
[(2) - (3)].str
),NULL
); ;}
2647 /* Line 1455 of yacc.c */
2649 { (yyval
.doc_node
) = doc_node_make("CLASSTREE",(yyvsp
[(2) - (3)].str
),NULL
); ;}
2654 /* Line 1455 of yacc.c */
2656 { (yyval
.doc_node
) = doc_node_make_take_children("KEYWORD",NULL
,(yyvsp
[(2) - (3)].doc_node
));
2657 // printf("keyword '%s'\n",$2->children[0]->text);
2663 /* Line 1455 of yacc.c */
2665 { (yyval
.doc_node
) = NULL
; ;}
2670 /* Line 1455 of yacc.c */
2672 { (yyval
.doc_node
) = doc_node_make("IMAGE",(yyvsp
[(2) - (3)].str
),NULL
); ;}
2677 /* Line 1455 of yacc.c */
2679 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
), (yyvsp
[(2) - (2)].doc_node
)); ;}
2684 /* Line 1455 of yacc.c */
2686 { (yyval
.doc_node
) = doc_node_make("PROSE",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2691 /* Line 1455 of yacc.c */
2693 { (yyval
.doc_node
) = doc_node_make(NODE_TEXT
,(yyvsp
[(1) - (1)].str
),NULL
); ;}
2698 /* Line 1455 of yacc.c */
2700 { (yyval
.doc_node
) = doc_node_make("LINK",(yyvsp
[(1) - (1)].str
),NULL
); ;}
2705 /* Line 1455 of yacc.c */
2707 { (yyval
.doc_node
) = doc_node_make((yyvsp
[(1) - (3)].id
),(yyvsp
[(2) - (3)].str
),NULL
); ;}
2712 /* Line 1455 of yacc.c */
2714 { (yyval
.doc_node
) = doc_node_make_take_children("FOOTNOTE",NULL
,(yyvsp
[(2) - (3)].doc_node
)); ;}
2719 /* Line 1455 of yacc.c */
2721 { (yyval
.doc_node
) = doc_node_create(NODE_NL
); ;}
2726 /* Line 1455 of yacc.c */
2728 { (yyval
.id
) = "LINK"; ;}
2733 /* Line 1455 of yacc.c */
2735 { (yyval
.id
) = "STRONG"; ;}
2740 /* Line 1455 of yacc.c */
2742 { (yyval
.id
) = "SOFT"; ;}
2747 /* Line 1455 of yacc.c */
2749 { (yyval
.id
) = "EMPHASIS"; ;}
2754 /* Line 1455 of yacc.c */
2756 { (yyval
.id
) = "CODE"; ;}
2761 /* Line 1455 of yacc.c */
2763 { (yyval
.id
) = "TELETYPE"; ;}
2768 /* Line 1455 of yacc.c */
2770 { (yyval
.id
) = "MATH"; ;}
2775 /* Line 1455 of yacc.c */
2777 { (yyval
.id
) = "ANCHOR"; ;}
2782 /* Line 1455 of yacc.c */
2784 { (yyval
.id
) = "CODEBLOCK"; ;}
2789 /* Line 1455 of yacc.c */
2791 { (yyval
.id
) = "TELETYPEBLOCK"; ;}
2796 /* Line 1455 of yacc.c */
2798 { (yyval
.id
) = "MATHBLOCK"; ;}
2803 /* Line 1455 of yacc.c */
2805 { (yyval
.id
) = "LIST"; ;}
2810 /* Line 1455 of yacc.c */
2812 { (yyval
.id
) = "TREE"; ;}
2817 /* Line 1455 of yacc.c */
2819 { (yyval
.id
) = "NUMBEREDLIST"; ;}
2824 /* Line 1455 of yacc.c */
2826 { (yyval
.id
) = "WARNING"; ;}
2831 /* Line 1455 of yacc.c */
2833 { (yyval
.id
) = "NOTE"; ;}
2838 /* Line 1455 of yacc.c */
2840 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (3)].doc_node
), doc_node_make_take_children("ITEM",NULL
,(yyvsp
[(3) - (3)].doc_node
))); ;}
2845 /* Line 1455 of yacc.c */
2847 { (yyval
.doc_node
) = doc_node_make("(LISTBODY)",NULL
, doc_node_make_take_children("ITEM",NULL
,(yyvsp
[(2) - (2)].doc_node
))); ;}
2852 /* Line 1455 of yacc.c */
2854 { (yyval
.doc_node
) = doc_node_make_take_children("TABROW",NULL
,(yyvsp
[(2) - (2)].doc_node
)); ;}
2859 /* Line 1455 of yacc.c */
2861 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2866 /* Line 1455 of yacc.c */
2868 { (yyval
.doc_node
) = doc_node_make("(TABLEBODY)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2873 /* Line 1455 of yacc.c */
2875 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (3)].doc_node
), doc_node_make_take_children("TABCOL",NULL
,(yyvsp
[(3) - (3)].doc_node
))); ;}
2880 /* Line 1455 of yacc.c */
2882 { (yyval
.doc_node
) = doc_node_make("(TABLECELLS)",NULL
, doc_node_make_take_children("TABCOL",NULL
,(yyvsp
[(1) - (1)].doc_node
))); ;}
2887 /* Line 1455 of yacc.c */
2889 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (3)].doc_node
),doc_node_make_take_children("TERM",NULL
,(yyvsp
[(3) - (3)].doc_node
))); ;}
2894 /* Line 1455 of yacc.c */
2896 { (yyval
.doc_node
) = doc_node_make("(TERMS)",NULL
,doc_node_make_take_children("TERM",NULL
,(yyvsp
[(2) - (2)].doc_node
))); ;}
2901 /* Line 1455 of yacc.c */
2904 (yyval
.doc_node
) = doc_node_make_take_children("DEFLISTITEM", NULL
, (yyvsp
[(1) - (3)].doc_node
));
2905 doc_node_add_child((yyval
.doc_node
), doc_node_make_take_children("DEFINITION", NULL
, (yyvsp
[(3) - (3)].doc_node
)));
2911 /* Line 1455 of yacc.c */
2913 { (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (2)].doc_node
),(yyvsp
[(2) - (2)].doc_node
)); ;}
2918 /* Line 1455 of yacc.c */
2920 { (yyval
.doc_node
) = doc_node_make("(DEFLISTBODY)",NULL
,(yyvsp
[(1) - (1)].doc_node
)); ;}
2925 /* Line 1455 of yacc.c */
2927 { (yyval
.str
) = strmerge((yyvsp
[(1) - (2)].str
),(yyvsp
[(2) - (2)].str
)); ;}
2932 /* Line 1455 of yacc.c */
2934 { (yyval
.str
) = strmerge((yyvsp
[(1) - (2)].str
),(yyvsp
[(2) - (2)].str
)); ;}
2939 /* Line 1455 of yacc.c */
2941 { (yyval
.str
) = strdup("\n"); ;}
2946 /* Line 1455 of yacc.c */
2948 { (yyval
.str
) = strmerge((yyvsp
[(1) - (2)].str
),(yyvsp
[(2) - (2)].str
)); ;}
2953 /* Line 1455 of yacc.c */
2955 { (yyval
.str
) = strmerge((yyvsp
[(1) - (2)].str
),(yyvsp
[(2) - (2)].str
)); ;}
2960 /* Line 1455 of yacc.c */
2962 { (yyval
.str
) = strmerge((yyvsp
[(1) - (2)].str
),(yyvsp
[(2) - (2)].str
)); ;}
2967 /* Line 1455 of yacc.c */
2969 { free((yyvsp
[(2) - (3)].str
)); (yyvsp
[(2) - (3)].str
)=NULL
; (yyval
.doc_node
) = doc_node_add_child((yyvsp
[(1) - (3)].doc_node
),doc_node_make("STRING",(yyvsp
[(3) - (3)].str
),NULL
)); ;}
2974 /* Line 1455 of yacc.c */
2976 { (yyval
.doc_node
) = doc_node_make("(COMMALIST)",NULL
,doc_node_make("STRING",(yyvsp
[(1) - (1)].str
),NULL
)); ;}
2981 /* Line 1455 of yacc.c */
2982 #line 2983 "SCDoc.tab.cpp"
2985 YY_SYMBOL_PRINT ("-> $$ =", yyr1
[yyn
], &yyval
, &yyloc
);
2989 YY_STACK_PRINT (yyss
, yyssp
);
2994 /* Now `shift' the result of the reduction. Determine what state
2995 that goes to, based on the state we popped back to and the rule
2996 number reduced by. */
3000 yystate
= yypgoto
[yyn
- YYNTOKENS
] + *yyssp
;
3001 if (0 <= yystate
&& yystate
<= YYLAST
&& yycheck
[yystate
] == *yyssp
)
3002 yystate
= yytable
[yystate
];
3004 yystate
= yydefgoto
[yyn
- YYNTOKENS
];
3009 /*------------------------------------.
3010 | yyerrlab -- here on detecting error |
3011 `------------------------------------*/
3013 /* If not already recovering from an error, report this error. */
3017 #if ! YYERROR_VERBOSE
3018 yyerror (YY_("syntax error"));
3021 YYSIZE_T yysize
= yysyntax_error (0, yystate
, yychar
);
3022 if (yymsg_alloc
< yysize
&& yymsg_alloc
< YYSTACK_ALLOC_MAXIMUM
)
3024 YYSIZE_T yyalloc
= 2 * yysize
;
3025 if (! (yysize
<= yyalloc
&& yyalloc
<= YYSTACK_ALLOC_MAXIMUM
))
3026 yyalloc
= YYSTACK_ALLOC_MAXIMUM
;
3027 if (yymsg
!= yymsgbuf
)
3028 YYSTACK_FREE (yymsg
);
3029 yymsg
= (char *) YYSTACK_ALLOC (yyalloc
);
3031 yymsg_alloc
= yyalloc
;
3035 yymsg_alloc
= sizeof yymsgbuf
;
3039 if (0 < yysize
&& yysize
<= yymsg_alloc
)
3041 (void) yysyntax_error (yymsg
, yystate
, yychar
);
3046 yyerror (YY_("syntax error"));
3048 goto yyexhaustedlab
;
3054 yyerror_range
[0] = yylloc
;
3056 if (yyerrstatus
== 3)
3058 /* If just tried and failed to reuse lookahead token after an
3059 error, discard it. */
3061 if (yychar
<= YYEOF
)
3063 /* Return failure if at end of input. */
3064 if (yychar
== YYEOF
)
3069 yydestruct ("Error: discarding",
3070 yytoken
, &yylval
, &yylloc
);
3075 /* Else will try to reuse lookahead token after shifting the error
3080 /*---------------------------------------------------.
3081 | yyerrorlab -- error raised explicitly by YYERROR. |
3082 `---------------------------------------------------*/
3085 /* Pacify compilers like GCC when the user code never invokes
3086 YYERROR and the label yyerrorlab therefore never appears in user
3088 if (/*CONSTCOND*/ 0)
3091 yyerror_range
[0] = yylsp
[1-yylen
];
3092 /* Do not reclaim the symbols of the rule which action triggered
3096 YY_STACK_PRINT (yyss
, yyssp
);
3101 /*-------------------------------------------------------------.
3102 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3103 `-------------------------------------------------------------*/
3105 yyerrstatus
= 3; /* Each real token shifted decrements this. */
3109 yyn
= yypact
[yystate
];
3110 if (yyn
!= YYPACT_NINF
)
3113 if (0 <= yyn
&& yyn
<= YYLAST
&& yycheck
[yyn
] == YYTERROR
)
3121 /* Pop the current state because it cannot handle the error token. */
3125 yyerror_range
[0] = *yylsp
;
3126 yydestruct ("Error: popping",
3127 yystos
[yystate
], yyvsp
, yylsp
);
3130 YY_STACK_PRINT (yyss
, yyssp
);
3135 yyerror_range
[1] = yylloc
;
3136 /* Using YYLLOC is tempting, but would change the location of
3137 the lookahead. YYLOC is available though. */
3138 YYLLOC_DEFAULT (yyloc
, (yyerror_range
- 1), 2);
3141 /* Shift the error token. */
3142 YY_SYMBOL_PRINT ("Shifting", yystos
[yyn
], yyvsp
, yylsp
);
3148 /*-------------------------------------.
3149 | yyacceptlab -- YYACCEPT comes here. |
3150 `-------------------------------------*/
3155 /*-----------------------------------.
3156 | yyabortlab -- YYABORT comes here. |
3157 `-----------------------------------*/
3162 #if !defined(yyoverflow) || YYERROR_VERBOSE
3163 /*-------------------------------------------------.
3164 | yyexhaustedlab -- memory exhaustion comes here. |
3165 `-------------------------------------------------*/
3167 yyerror (YY_("memory exhausted"));
3173 if (yychar
!= YYEMPTY
)
3174 yydestruct ("Cleanup: discarding lookahead",
3175 yytoken
, &yylval
, &yylloc
);
3176 /* Do not reclaim the symbols of the rule which action triggered
3177 this YYABORT or YYACCEPT. */
3179 YY_STACK_PRINT (yyss
, yyssp
);
3180 while (yyssp
!= yyss
)
3182 yydestruct ("Cleanup: popping",
3183 yystos
[*yyssp
], yyvsp
, yylsp
);
3188 YYSTACK_FREE (yyss
);
3191 if (yymsg
!= yymsgbuf
)
3192 YYSTACK_FREE (yymsg
);
3194 /* Make sure YYID is used. */
3195 return YYID (yyresult
);
3200 /* Line 1675 of yacc.c */
3204 DocNode
* scdoc_parse_run(int mode
) {
3205 int modes
[] = {START_FULL
, START_PARTIAL
, START_METADATA
};
3206 if(mode
<0 || mode
>=sizeof(modes
)) {
3207 error("scdoc_parse_run(): unknown mode: %d\n",mode
);
3209 scdoc_start_token
= modes
[mode
];
3210 /* scdoc_start_token = START_FULL;
3211 scdoc_metadata_mode = 0;
3212 if(mode==SCDOC_PARSE_PARTIAL) {
3213 scdoc_start_token = START_PARTIAL;
3215 if(mode==SCDOC_PARSE_METADATA) {
3216 scdoc_metadata_mode = 1;
3219 method_type
= "METHOD";
3220 if(scdocparse()!=0) {
3226 void scdocerror(const char *str
)
3228 error("In %s:\n At line %d: %s\n\n",scdoc_current_file
,scdoclineno
,str
);
3230 /* FIXME: this does not work well, since the reported linenumber is often *after* the actual error line
3231 fseek(scdocin, 0, SEEK_SET);
3234 while(line!=scdoclineno && !feof(scdocin)) {
3235 int c = fgetc(scdocin);
3238 txt = fgets(buf, 256, scdocin);
3240 fprintf(stderr," %s\n-------------------\n", txt);