Merge pull request #506 from andrewcsmith/patch-2
[supercollider.git] / SCDoc / SCDoc.tab.cpp
blob8f5554cf84ad73f668568ee8ad3dbc2391c1f883
1 /* A Bison parser, made by GNU Bison 2.5. */
3 /* Bison implementation for Yacc-like parsers in C
5 Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc.
7 This program is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20 /* As a special exception, you may create a larger work that contains
21 part or all of the Bison parser skeleton and distribute that work
22 under terms of your choice, so long as that work isn't itself a
23 parser generator using the skeleton or a modified version thereof
24 as a parser skeleton. Alternatively, if you modify or redistribute
25 the parser skeleton itself, you may (at your option) remove this
26 special exception, which will cause the skeleton and the resulting
27 Bison output files to be licensed under the GNU General Public
28 License without this special exception.
30 This special exception was added by the Free Software Foundation in
31 version 2.2 of Bison. */
33 /* C LALR(1) parser skeleton written by Richard Stallman, by
34 simplifying the original so-called "semantic" parser. */
36 /* All symbols defined below should begin with yy or YY, to avoid
37 infringing on user name space. This should be done even for local
38 variables, as they might otherwise be expanded by user macros.
39 There are some unavoidable exceptions within include files to
40 define necessary library symbols; they are noted "INFRINGES ON
41 USER NAME SPACE" below. */
43 /* Identify Bison output. */
44 #define YYBISON 1
46 /* Bison version. */
47 #define YYBISON_VERSION "2.5"
49 /* Skeleton name. */
50 #define YYSKELETON_NAME "yacc.c"
52 /* Pure parsers. */
53 #define YYPURE 0
55 /* Push parsers. */
56 #define YYPUSH 0
58 /* Pull parsers. */
59 #define YYPULL 1
61 /* Using locations. */
62 #define YYLSP_NEEDED 1
64 /* Substitute the variable and function names. */
65 #define yyparse scdocparse
66 #define yylex scdoclex
67 #define yyerror scdocerror
68 #define yylval scdoclval
69 #define yychar scdocchar
70 #define yydebug scdocdebug
71 #define yynerrs scdocnerrs
72 #define yylloc scdoclloc
74 /* Copy the first part of user declarations. */
76 /* Line 268 of yacc.c */
77 #line 1 "SCDoc.y"
79 /************************************************************************
81 * Copyright 2012 Jonatan Liljedahl <lijon@kymatica.com>
83 * This program is free software: you can redistribute it and/or modify
84 * it under the terms of the GNU General Public License as published by
85 * the Free Software Foundation, either version 3 of the License, or
86 * (at your option) any later version.
88 * This program is distributed in the hope that it will be useful,
89 * but WITHOUT ANY WARRANTY; without even the implied warranty of
90 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
91 * GNU General Public License for more details.
93 * You should have received a copy of the GNU General Public License
94 * along with this program. If not, see <http://www.gnu.org/licenses/>.
96 ************************************************************************/
98 #include <stdio.h>
99 #include <string.h>
100 #include <stdlib.h>
101 #include "SCDoc.h"
103 //#define YYLEX_PARAM &yylval, &yylloc
105 int scdocparse();
107 extern int scdoclineno;
108 extern char *scdoctext;
109 extern int scdoc_start_token;
110 extern FILE *scdocin;
111 //extern struct YYLTYPE scdoclloc;
113 //int scdoc_metadata_mode;
115 static const char * method_type = NULL;
117 static DocNode * topnode;
119 void scdocerror(const char *str);
121 extern void error(const char *fmt, ...);
122 extern void post(const char *fmt, ...);
124 static inline bool stringEqual(const char * a, const char * b)
126 return strcmp(a, b) == 0;
131 /* Line 268 of yacc.c */
132 #line 133 "SCDoc.tab.cpp"
134 /* Enabling traces. */
135 #ifndef YYDEBUG
136 # define YYDEBUG 0
137 #endif
139 /* Enabling verbose error messages. */
140 #ifdef YYERROR_VERBOSE
141 # undef YYERROR_VERBOSE
142 # define YYERROR_VERBOSE 1
143 #else
144 # define YYERROR_VERBOSE 1
145 #endif
147 /* Enabling the token table. */
148 #ifndef YYTOKEN_TABLE
149 # define YYTOKEN_TABLE 0
150 #endif
153 /* Tokens. */
154 #ifndef YYTOKENTYPE
155 # define YYTOKENTYPE
156 /* Put the tokens into the symbol table, so that GDB and other debuggers
157 know about them. */
158 enum yytokentype {
159 END = 0,
160 CLASS = 258,
161 TITLE = 259,
162 SUMMARY = 260,
163 RELATED = 261,
164 CATEGORIES = 262,
165 REDIRECT = 263,
166 CLASSTREE = 264,
167 COPYMETHOD = 265,
168 KEYWORD = 266,
169 PRIVATE = 267,
170 SECTION = 268,
171 SUBSECTION = 269,
172 METHOD = 270,
173 ARGUMENT = 271,
174 DESCRIPTION = 272,
175 CLASSMETHODS = 273,
176 INSTANCEMETHODS = 274,
177 EXAMPLES = 275,
178 RETURNS = 276,
179 DISCUSSION = 277,
180 LIST = 278,
181 TREE = 279,
182 NUMBEREDLIST = 280,
183 DEFINITIONLIST = 281,
184 TABLE = 282,
185 FOOTNOTE = 283,
186 NOTE = 284,
187 WARNING = 285,
188 CODE = 286,
189 LINK = 287,
190 ANCHOR = 288,
191 SOFT = 289,
192 IMAGE = 290,
193 TELETYPE = 291,
194 MATH = 292,
195 STRONG = 293,
196 EMPHASIS = 294,
197 CODEBLOCK = 295,
198 TELETYPEBLOCK = 296,
199 MATHBLOCK = 297,
200 TAGSYM = 298,
201 BARS = 299,
202 HASHES = 300,
203 TEXT = 301,
204 URL = 302,
205 COMMA = 303,
206 METHODNAME = 304,
207 METHODARGS = 305,
208 NEWLINE = 306,
209 EMPTYLINES = 307,
210 BAD_METHODNAME = 308,
211 START_FULL = 309,
212 START_PARTIAL = 310,
213 START_METADATA = 311
215 #endif
219 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
220 typedef union YYSTYPE
223 /* Line 293 of yacc.c */
224 #line 55 "SCDoc.y"
226 int i;
227 const char *id;
228 char *str;
229 DocNode *doc_node;
233 /* Line 293 of yacc.c */
234 #line 235 "SCDoc.tab.cpp"
235 } YYSTYPE;
236 # define YYSTYPE_IS_TRIVIAL 1
237 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
238 # define YYSTYPE_IS_DECLARED 1
239 #endif
241 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
242 typedef struct YYLTYPE
244 int first_line;
245 int first_column;
246 int last_line;
247 int last_column;
248 } YYLTYPE;
249 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
250 # define YYLTYPE_IS_DECLARED 1
251 # define YYLTYPE_IS_TRIVIAL 1
252 #endif
255 /* Copy the second part of user declarations. */
257 /* Line 343 of yacc.c */
258 #line 100 "SCDoc.y"
260 //int scdoclex (YYSTYPE * yylval_param, struct YYLTYPE * yylloc_param );
261 int scdoclex (void);
264 /* Line 343 of yacc.c */
265 #line 266 "SCDoc.tab.cpp"
267 #ifdef short
268 # undef short
269 #endif
271 #ifdef YYTYPE_UINT8
272 typedef YYTYPE_UINT8 yytype_uint8;
273 #else
274 typedef unsigned char yytype_uint8;
275 #endif
277 #ifdef YYTYPE_INT8
278 typedef YYTYPE_INT8 yytype_int8;
279 #elif (defined __STDC__ || defined __C99__FUNC__ \
280 || defined __cplusplus || defined _MSC_VER)
281 typedef signed char yytype_int8;
282 #else
283 typedef short int yytype_int8;
284 #endif
286 #ifdef YYTYPE_UINT16
287 typedef YYTYPE_UINT16 yytype_uint16;
288 #else
289 typedef unsigned short int yytype_uint16;
290 #endif
292 #ifdef YYTYPE_INT16
293 typedef YYTYPE_INT16 yytype_int16;
294 #else
295 typedef short int yytype_int16;
296 #endif
298 #ifndef YYSIZE_T
299 # ifdef __SIZE_TYPE__
300 # define YYSIZE_T __SIZE_TYPE__
301 # elif defined size_t
302 # define YYSIZE_T size_t
303 # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
304 || defined __cplusplus || defined _MSC_VER)
305 # include <stddef.h> /* INFRINGES ON USER NAME SPACE */
306 # define YYSIZE_T size_t
307 # else
308 # define YYSIZE_T unsigned int
309 # endif
310 #endif
312 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
314 #ifndef YY_
315 # if defined YYENABLE_NLS && YYENABLE_NLS
316 # if ENABLE_NLS
317 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
318 # define YY_(msgid) dgettext ("bison-runtime", msgid)
319 # endif
320 # endif
321 # ifndef YY_
322 # define YY_(msgid) msgid
323 # endif
324 #endif
326 /* Suppress unused-variable warnings by "using" E. */
327 #if ! defined lint || defined __GNUC__
328 # define YYUSE(e) ((void) (e))
329 #else
330 # define YYUSE(e) /* empty */
331 #endif
333 /* Identity function, used to suppress warnings about constant conditions. */
334 #ifndef lint
335 # define YYID(n) (n)
336 #else
337 #if (defined __STDC__ || defined __C99__FUNC__ \
338 || defined __cplusplus || defined _MSC_VER)
339 static int
340 YYID (int yyi)
341 #else
342 static int
343 YYID (yyi)
344 int yyi;
345 #endif
347 return yyi;
349 #endif
351 #if ! defined yyoverflow || YYERROR_VERBOSE
353 /* The parser invokes alloca or malloc; define the necessary symbols. */
355 # ifdef YYSTACK_USE_ALLOCA
356 # if YYSTACK_USE_ALLOCA
357 # ifdef __GNUC__
358 # define YYSTACK_ALLOC __builtin_alloca
359 # elif defined __BUILTIN_VA_ARG_INCR
360 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
361 # elif defined _AIX
362 # define YYSTACK_ALLOC __alloca
363 # elif defined _MSC_VER
364 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
365 # define alloca _alloca
366 # else
367 # define YYSTACK_ALLOC alloca
368 # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
369 || defined __cplusplus || defined _MSC_VER)
370 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
371 # ifndef EXIT_SUCCESS
372 # define EXIT_SUCCESS 0
373 # endif
374 # endif
375 # endif
376 # endif
377 # endif
379 # ifdef YYSTACK_ALLOC
380 /* Pacify GCC's `empty if-body' warning. */
381 # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
382 # ifndef YYSTACK_ALLOC_MAXIMUM
383 /* The OS might guarantee only one guard page at the bottom of the stack,
384 and a page size can be as small as 4096 bytes. So we cannot safely
385 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
386 to allow for a few compiler-allocated temporary stack slots. */
387 # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
388 # endif
389 # else
390 # define YYSTACK_ALLOC YYMALLOC
391 # define YYSTACK_FREE YYFREE
392 # ifndef YYSTACK_ALLOC_MAXIMUM
393 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
394 # endif
395 # if (defined __cplusplus && ! defined EXIT_SUCCESS \
396 && ! ((defined YYMALLOC || defined malloc) \
397 && (defined YYFREE || defined free)))
398 # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
399 # ifndef EXIT_SUCCESS
400 # define EXIT_SUCCESS 0
401 # endif
402 # endif
403 # ifndef YYMALLOC
404 # define YYMALLOC malloc
405 # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
406 || defined __cplusplus || defined _MSC_VER)
407 void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
408 # endif
409 # endif
410 # ifndef YYFREE
411 # define YYFREE free
412 # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \
413 || defined __cplusplus || defined _MSC_VER)
414 void free (void *); /* INFRINGES ON USER NAME SPACE */
415 # endif
416 # endif
417 # endif
418 #endif /* ! defined yyoverflow || YYERROR_VERBOSE */
421 #if (! defined yyoverflow \
422 && (! defined __cplusplus \
423 || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \
424 && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
426 /* A type that is properly aligned for any stack member. */
427 union yyalloc
429 yytype_int16 yyss_alloc;
430 YYSTYPE yyvs_alloc;
431 YYLTYPE yyls_alloc;
434 /* The size of the maximum gap between one aligned stack and the next. */
435 # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
437 /* The size of an array large to enough to hold all stacks, each with
438 N elements. */
439 # define YYSTACK_BYTES(N) \
440 ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
441 + 2 * YYSTACK_GAP_MAXIMUM)
443 # define YYCOPY_NEEDED 1
445 /* Relocate STACK from its old location to the new one. The
446 local variables YYSIZE and YYSTACKSIZE give the old and new number of
447 elements in the stack, and YYPTR gives the new location of the
448 stack. Advance YYPTR to a properly aligned location for the next
449 stack. */
450 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
451 do \
453 YYSIZE_T yynewbytes; \
454 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
455 Stack = &yyptr->Stack_alloc; \
456 yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
457 yyptr += yynewbytes / sizeof (*yyptr); \
459 while (YYID (0))
461 #endif
463 #if defined YYCOPY_NEEDED && YYCOPY_NEEDED
464 /* Copy COUNT objects from FROM to TO. The source and destination do
465 not overlap. */
466 # ifndef YYCOPY
467 # if defined __GNUC__ && 1 < __GNUC__
468 # define YYCOPY(To, From, Count) \
469 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
470 # else
471 # define YYCOPY(To, From, Count) \
472 do \
474 YYSIZE_T yyi; \
475 for (yyi = 0; yyi < (Count); yyi++) \
476 (To)[yyi] = (From)[yyi]; \
478 while (YYID (0))
479 # endif
480 # endif
481 #endif /* !YYCOPY_NEEDED */
483 /* YYFINAL -- State number of the termination state. */
484 #define YYFINAL 70
485 /* YYLAST -- Last index in YYTABLE. */
486 #define YYLAST 434
488 /* YYNTOKENS -- Number of terminals. */
489 #define YYNTOKENS 57
490 /* YYNNTS -- Number of nonterminals. */
491 #define YYNNTS 55
492 /* YYNRULES -- Number of rules. */
493 #define YYNRULES 134
494 /* YYNRULES -- Number of states. */
495 #define YYNSTATES 193
497 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
498 #define YYUNDEFTOK 2
499 #define YYMAXUTOK 311
501 #define YYTRANSLATE(YYX) \
502 ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
504 /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
505 static const yytype_uint8 yytranslate[] =
507 0, 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, 2, 2, 2, 2,
526 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
527 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
528 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
529 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
530 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
531 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
532 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
533 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
534 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
535 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
536 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
537 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
538 55, 56
541 #if YYDEBUG
542 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
543 YYRHS. */
544 static const yytype_uint16 yyprhs[] =
546 0, 0, 3, 5, 8, 13, 16, 20, 22, 23,
547 26, 28, 32, 36, 40, 42, 44, 46, 48, 50,
548 52, 54, 56, 58, 59, 62, 64, 66, 67, 73,
549 76, 78, 79, 82, 84, 86, 91, 93, 94, 97,
550 99, 101, 107, 111, 115, 116, 118, 120, 124, 126,
551 131, 133, 134, 136, 137, 140, 142, 147, 151, 154,
552 155, 158, 159, 161, 163, 166, 169, 171, 174, 176,
553 180, 184, 188, 192, 196, 200, 204, 206, 210, 213,
554 215, 217, 219, 223, 227, 229, 231, 233, 235, 237,
555 239, 241, 243, 245, 247, 249, 251, 253, 255, 257,
556 259, 261, 265, 268, 271, 274, 276, 280, 282, 286,
557 289, 293, 296, 298, 300, 302, 304, 306, 309, 311,
558 314, 316, 318, 320, 322, 324, 326, 328, 331, 333,
559 336, 339, 341, 343, 347
562 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
563 static const yytype_int8 yyrhs[] =
565 58, 0, -1, 59, -1, 59, 1, -1, 54, 60,
566 61, 65, -1, 55, 66, -1, 56, 61, 65, -1,
567 106, -1, -1, 61, 62, -1, 62, -1, 63, 105,
568 106, -1, 7, 111, 106, -1, 6, 111, 106, -1,
569 3, -1, 4, -1, 5, -1, 8, -1, 18, -1,
570 19, -1, 17, -1, 20, -1, 66, -1, -1, 66,
571 67, -1, 67, -1, 73, -1, -1, 13, 68, 105,
572 106, 69, -1, 64, 69, -1, 70, -1, -1, 70,
573 71, -1, 71, -1, 73, -1, 14, 105, 106, 72,
574 -1, 73, -1, -1, 73, 74, -1, 74, -1, 85,
575 -1, 15, 77, 75, 106, 78, -1, 10, 104, 106,
576 -1, 12, 111, 107, -1, -1, 50, -1, 49, -1,
577 77, 48, 76, -1, 76, -1, 79, 80, 83, 84,
578 -1, 85, -1, -1, 81, -1, -1, 81, 82, -1,
579 82, -1, 16, 104, 106, 79, -1, 16, 106, 85,
580 -1, 21, 85, -1, -1, 22, 85, -1, -1, 86,
581 -1, 87, -1, 87, 88, -1, 86, 88, -1, 88,
582 -1, 86, 89, -1, 89, -1, 94, 85, 43, -1,
583 93, 95, 43, -1, 27, 97, 43, -1, 26, 101,
584 43, -1, 92, 109, 43, -1, 9, 104, 107, -1,
585 11, 111, 107, -1, 52, -1, 35, 105, 43, -1,
586 89, 90, -1, 90, -1, 103, -1, 47, -1, 91,
587 104, 43, -1, 28, 85, 43, -1, 51, -1, 32,
588 -1, 38, -1, 34, -1, 39, -1, 31, -1, 36,
589 -1, 37, -1, 33, -1, 40, -1, 41, -1, 42,
590 -1, 23, -1, 24, -1, 25, -1, 30, -1, 29,
591 -1, 95, 45, 85, -1, 45, 85, -1, 45, 98,
592 -1, 97, 96, -1, 96, -1, 98, 44, 79, -1,
593 79, -1, 99, 45, 85, -1, 45, 85, -1, 99,
594 44, 79, -1, 101, 100, -1, 100, -1, 103, -1,
595 47, -1, 46, -1, 48, -1, 104, 103, -1, 103,
596 -1, 105, 102, -1, 102, -1, 51, -1, 52, -1,
597 106, -1, 0, -1, 103, -1, 106, -1, 109, 108,
598 -1, 108, -1, 110, 46, -1, 110, 47, -1, 46,
599 -1, 47, -1, 111, 48, 110, -1, 110, -1
602 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
603 static const yytype_uint16 yyrline[] =
605 0, 107, 107, 108, 111, 117, 121, 129, 130, 133,
606 134, 137, 138, 139, 142, 143, 144, 145, 148, 149,
607 150, 151, 154, 155, 158, 159, 160, 163, 163, 164,
608 167, 168, 171, 172, 173, 176, 179, 180, 183, 184,
609 185, 188, 195, 201, 206, 207, 218, 229, 230, 233,
610 242, 243, 246, 247, 250, 251, 254, 255, 258, 259,
611 262, 263, 271, 272, 275, 276, 277, 280, 281, 284,
612 285, 286, 287, 288, 289, 290, 293, 294, 297, 298,
613 301, 302, 303, 304, 305, 308, 309, 310, 311, 312,
614 313, 314, 315, 318, 319, 320, 323, 324, 325, 328,
615 329, 332, 333, 336, 339, 340, 343, 344, 347, 348,
616 351, 358, 359, 362, 363, 366, 367, 370, 371, 374,
617 375, 378, 379, 382, 383, 386, 387, 390, 391, 394,
618 395, 396, 397, 400, 401
620 #endif
622 #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
623 /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
624 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
625 static const char *const yytname[] =
627 "\"end of file\"", "error", "$undefined", "CLASS", "TITLE", "SUMMARY",
628 "RELATED", "CATEGORIES", "REDIRECT", "CLASSTREE", "COPYMETHOD",
629 "KEYWORD", "PRIVATE", "SECTION", "SUBSECTION", "METHOD", "ARGUMENT",
630 "DESCRIPTION", "CLASSMETHODS", "INSTANCEMETHODS", "EXAMPLES", "RETURNS",
631 "DISCUSSION", "LIST", "TREE", "NUMBEREDLIST", "DEFINITIONLIST", "TABLE",
632 "FOOTNOTE", "NOTE", "WARNING", "CODE", "LINK", "ANCHOR", "SOFT", "IMAGE",
633 "TELETYPE", "MATH", "STRONG", "EMPHASIS", "\"CODE block\"",
634 "\"TELETYPE block\"", "\"MATH block\"", "\"::\"", "\"||\"", "\"##\"",
635 "\"text\"", "URL", "COMMA", "\"method name\"", "\"arguments string\"",
636 "\"newline\"", "\"empty lines\"", "\"bad method name\"", "START_FULL",
637 "START_PARTIAL", "START_METADATA", "$accept", "start", "document",
638 "eateol", "dochead", "headline", "headtag", "sectiontag", "optsections",
639 "sections", "section", "$@1", "optsubsections", "subsections",
640 "subsection", "optsubsubsections", "subsubsections", "subsubsection",
641 "optMETHODARGS", "methodname", "methnames", "methodbody", "optbody",
642 "optargs", "args", "arg", "optreturns", "optdiscussion", "body",
643 "blockA", "blockB", "bodyelem", "prose", "proseelem", "inlinetag",
644 "blocktag", "listtag", "rangetag", "listbody", "tablerow", "tablebody",
645 "tablecells", "defterms", "deflistrow", "deflistbody", "anywordurl",
646 "anyword", "words", "words2", "eol", "eoleof", "anywordnl", "wordsnl",
647 "nocommawords", "commalist", 0
649 #endif
651 # ifdef YYPRINT
652 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
653 token YYLEX-NUM. */
654 static const yytype_uint16 yytoknum[] =
656 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
657 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
658 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
659 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
660 295, 296, 297, 298, 299, 300, 301, 302, 303, 304,
661 305, 306, 307, 308, 309, 310, 311
663 # endif
665 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
666 static const yytype_uint8 yyr1[] =
668 0, 57, 58, 58, 59, 59, 59, 60, 60, 61,
669 61, 62, 62, 62, 63, 63, 63, 63, 64, 64,
670 64, 64, 65, 65, 66, 66, 66, 68, 67, 67,
671 69, 69, 70, 70, 70, 71, 72, 72, 73, 73,
672 73, 74, 74, 74, 75, 75, 76, 77, 77, 78,
673 79, 79, 80, 80, 81, 81, 82, 82, 83, 83,
674 84, 84, 85, 85, 86, 86, 86, 87, 87, 88,
675 88, 88, 88, 88, 88, 88, 88, 88, 89, 89,
676 90, 90, 90, 90, 90, 91, 91, 91, 91, 91,
677 91, 91, 91, 92, 92, 92, 93, 93, 93, 94,
678 94, 95, 95, 96, 97, 97, 98, 98, 99, 99,
679 100, 101, 101, 102, 102, 103, 103, 104, 104, 105,
680 105, 106, 106, 107, 107, 108, 108, 109, 109, 110,
681 110, 110, 110, 111, 111
684 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
685 static const yytype_uint8 yyr2[] =
687 0, 2, 1, 2, 4, 2, 3, 1, 0, 2,
688 1, 3, 3, 3, 1, 1, 1, 1, 1, 1,
689 1, 1, 1, 0, 2, 1, 1, 0, 5, 2,
690 1, 0, 2, 1, 1, 4, 1, 0, 2, 1,
691 1, 5, 3, 3, 0, 1, 1, 3, 1, 4,
692 1, 0, 1, 0, 2, 1, 4, 3, 2, 0,
693 2, 0, 1, 1, 2, 2, 1, 2, 1, 3,
694 3, 3, 3, 3, 3, 3, 1, 3, 2, 1,
695 1, 1, 3, 3, 1, 1, 1, 1, 1, 1,
696 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
697 1, 3, 2, 2, 2, 1, 3, 1, 3, 2,
698 3, 2, 1, 1, 1, 1, 1, 2, 1, 2,
699 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
700 2, 1, 1, 3, 1
703 /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM.
704 Performed when YYTABLE doesn't specify something else to do. Zero
705 means the default is an error. */
706 static const yytype_uint8 yydefact[] =
708 0, 8, 0, 0, 0, 0, 121, 122, 0, 7,
709 0, 0, 0, 0, 27, 0, 20, 18, 19, 21,
710 96, 97, 98, 0, 0, 0, 100, 99, 89, 85,
711 92, 87, 0, 90, 91, 86, 88, 93, 94, 95,
712 115, 81, 116, 84, 76, 31, 5, 25, 26, 39,
713 40, 62, 63, 66, 68, 79, 0, 0, 0, 0,
714 80, 14, 15, 16, 0, 0, 17, 23, 10, 0,
715 1, 3, 23, 118, 0, 0, 131, 132, 134, 0,
716 0, 0, 46, 48, 44, 0, 0, 112, 0, 51,
717 105, 0, 0, 114, 120, 113, 0, 0, 29, 30,
718 33, 34, 24, 38, 65, 67, 64, 78, 0, 125,
719 126, 128, 0, 0, 0, 0, 0, 0, 9, 6,
720 22, 0, 4, 124, 117, 123, 74, 42, 129, 130,
721 0, 75, 43, 0, 0, 45, 0, 109, 51, 0,
722 72, 111, 107, 50, 103, 71, 104, 83, 77, 119,
723 0, 32, 82, 73, 127, 102, 70, 0, 69, 13,
724 12, 11, 133, 31, 47, 51, 110, 108, 51, 37,
725 101, 28, 41, 53, 106, 35, 36, 0, 59, 52,
726 55, 0, 0, 0, 61, 54, 51, 57, 58, 0,
727 49, 56, 60
730 /* YYDEFGOTO[NTERM-NUM]. */
731 static const yytype_int16 yydefgoto[] =
733 -1, 4, 5, 8, 67, 68, 69, 45, 119, 120,
734 47, 81, 98, 99, 100, 175, 48, 49, 136, 83,
735 84, 172, 142, 178, 179, 180, 184, 190, 50, 51,
736 52, 53, 54, 55, 56, 57, 58, 59, 114, 90,
737 91, 144, 86, 87, 88, 94, 60, 74, 96, 125,
738 126, 111, 112, 78, 79
741 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
742 STATE-NUM. */
743 #define YYPACT_NINF -125
744 static const yytype_int16 yypact[] =
746 -4, 78, 226, 150, 19, 139, -125, -125, 150, -125,
747 -35, -35, 100, 100, -125, -21, -125, -125, -125, -125,
748 -125, -125, -125, -10, -6, 348, -125, -125, -125, -125,
749 -125, -125, 54, -125, -125, -125, -125, -125, -125, -125,
750 -125, -125, -125, -125, -125, 270, 125, -125, 30, -125,
751 -125, 348, 382, -125, 58, -125, -35, 25, -2, 348,
752 -125, -125, -125, -125, 100, 100, -125, 182, -125, 54,
753 -125, -125, 182, -125, 7, 25, -125, -125, 104, 16,
754 16, 54, -125, -125, -23, 348, 117, -125, 74, 348,
755 -125, 80, 32, -125, -125, -125, 35, 54, -125, 71,
756 -125, 30, -125, -125, -125, 58, -125, -125, -31, -125,
757 -125, -125, -22, 348, 83, 64, 62, 62, -125, -125,
758 125, -15, -125, -125, -125, -125, -125, -125, -125, -125,
759 100, -125, -125, -15, -21, -125, 78, -125, 348, 348,
760 -125, -125, -125, -125, 93, -125, -125, -125, -125, -125,
761 -15, -125, -125, -125, -125, -125, -125, 348, -125, -125,
762 -125, -125, 104, 270, -125, 348, -125, -125, 348, 314,
763 -125, -125, -125, 102, -125, -125, 30, 25, 101, 102,
764 -125, 25, 348, 348, 109, -125, 348, -125, -125, 348,
765 -125, -125, -125
768 /* YYPGOTO[NTERM-NUM]. */
769 static const yytype_int16 yypgoto[] =
771 -125, -125, -125, -125, 140, 26, -125, -125, 97, 157,
772 -41, -125, 8, -125, 75, -125, -42, -40, -125, 39,
773 -125, -125, -124, -125, -125, 0, -125, -125, -5, -125,
774 -125, 113, 124, -48, -125, -125, -125, -125, -125, 91,
775 -125, -125, -125, 95, -125, -87, -9, -7, -59, -1,
776 87, 84, -125, 68, 5
779 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
780 positive, shift that token. If negative, reduce the rule which
781 number is the opposite. If YYTABLE_NINF, syntax error. */
782 #define YYTABLE_NINF -3
783 static const yytype_int16 yytable[] =
785 9, 73, 73, 101, 75, 102, 107, 123, 103, 149,
786 121, 40, 152, 42, 166, 40, 123, 42, 80, 70,
787 92, 153, 133, 95, 40, 134, 42, 135, 82, 6,
788 7, 40, 93, 42, 149, 85, 6, 7, 150, 89,
789 11, 173, 13, 113, 174, 15, 149, 73, 109, 108,
790 1, 2, 3, 40, 115, 42, 110, 107, 6, 7,
791 95, 103, 191, 149, 130, 124, 124, 6, 7, 116,
792 117, 40, 95, 42, 127, 147, 6, 7, 148, 102,
793 137, 40, 93, 42, 143, 97, 25, 95, 95, 28,
794 29, 30, 31, 118, 33, 34, 35, 36, 118, 124,
795 40, 93, 42, 109, 40, 41, 42, 158, 155, 43,
796 130, 110, 95, 6, 7, 159, 160, 140, 177, 85,
797 161, 101, 183, 145, 95, 89, 156, 176, 157, 6,
798 7, 189, 163, 143, 167, 165, 103, 168, 14, -2,
799 71, 95, 16, 17, 18, 19, 76, 77, 72, 169,
800 128, 129, 170, 61, 62, 63, 64, 65, 66, 46,
801 143, 138, 139, 143, 104, 106, 131, 132, 73, 122,
802 181, 171, 124, 164, 151, 105, 182, 187, 188, 185,
803 186, 143, 146, 141, 192, 61, 62, 63, 64, 65,
804 66, 10, 11, 12, 13, 14, 154, 15, 162, 16,
805 17, 18, 19, 0, 0, 20, 21, 22, 23, 24,
806 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
807 35, 36, 37, 38, 39, 0, 0, 0, 40, 41,
808 42, 0, 0, 43, 44, 10, 11, 12, 13, 14,
809 0, 15, 0, 16, 17, 18, 19, 0, 0, 20,
810 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
811 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
812 0, 0, 40, 41, 42, 0, 0, 43, 44, 10,
813 11, 12, 13, 0, 97, 15, 0, 0, 0, 0,
814 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
815 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
816 37, 38, 39, 0, 0, 0, 40, 41, 42, 0,
817 0, 43, 44, 10, 11, 12, 13, 0, 0, 15,
818 0, 0, 0, 0, 0, 0, 0, 20, 21, 22,
819 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
820 33, 34, 35, 36, 37, 38, 39, 10, 0, 12,
821 40, 41, 42, 0, 0, 43, 44, 0, 0, 0,
822 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
823 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
824 39, 10, 0, 12, 40, 41, 42, 0, 0, 43,
825 44, 0, 0, 0, 0, 20, 21, 22, 23, 24,
826 0, 26, 27, 0, 0, 0, 0, 32, 0, 0,
827 0, 0, 37, 38, 39, 0, 0, 0, 0, 0,
828 0, 0, 0, 0, 44
831 #define yypact_value_is_default(yystate) \
832 ((yystate) == (-125))
834 #define yytable_value_is_error(yytable_value) \
835 YYID (0)
837 static const yytype_int16 yycheck[] =
839 1, 10, 11, 45, 11, 46, 54, 0, 48, 96,
840 69, 46, 43, 48, 138, 46, 0, 48, 13, 0,
841 25, 43, 81, 32, 46, 48, 48, 50, 49, 51,
842 52, 46, 47, 48, 121, 45, 51, 52, 97, 45,
843 10, 165, 12, 45, 168, 15, 133, 56, 57, 56,
844 54, 55, 56, 46, 59, 48, 57, 105, 51, 52,
845 69, 101, 186, 150, 48, 74, 75, 51, 52, 64,
846 65, 46, 81, 48, 75, 43, 51, 52, 43, 120,
847 85, 46, 47, 48, 89, 14, 28, 96, 97, 31,
848 32, 33, 34, 67, 36, 37, 38, 39, 72, 108,
849 46, 47, 48, 112, 46, 47, 48, 43, 113, 51,
850 48, 112, 121, 51, 52, 116, 117, 43, 16, 45,
851 121, 163, 21, 43, 133, 45, 43, 169, 45, 51,
852 52, 22, 133, 138, 139, 136, 176, 44, 13, 0,
853 1, 150, 17, 18, 19, 20, 46, 47, 8, 150,
854 46, 47, 157, 3, 4, 5, 6, 7, 8, 2,
855 165, 44, 45, 168, 51, 52, 79, 80, 177, 72,
856 177, 163, 181, 134, 99, 51, 177, 182, 183, 179,
857 181, 186, 91, 88, 189, 3, 4, 5, 6, 7,
858 8, 9, 10, 11, 12, 13, 112, 15, 130, 17,
859 18, 19, 20, -1, -1, 23, 24, 25, 26, 27,
860 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
861 38, 39, 40, 41, 42, -1, -1, -1, 46, 47,
862 48, -1, -1, 51, 52, 9, 10, 11, 12, 13,
863 -1, 15, -1, 17, 18, 19, 20, -1, -1, 23,
864 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
865 34, 35, 36, 37, 38, 39, 40, 41, 42, -1,
866 -1, -1, 46, 47, 48, -1, -1, 51, 52, 9,
867 10, 11, 12, -1, 14, 15, -1, -1, -1, -1,
868 -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
869 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
870 40, 41, 42, -1, -1, -1, 46, 47, 48, -1,
871 -1, 51, 52, 9, 10, 11, 12, -1, -1, 15,
872 -1, -1, -1, -1, -1, -1, -1, 23, 24, 25,
873 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
874 36, 37, 38, 39, 40, 41, 42, 9, -1, 11,
875 46, 47, 48, -1, -1, 51, 52, -1, -1, -1,
876 -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
877 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
878 42, 9, -1, 11, 46, 47, 48, -1, -1, 51,
879 52, -1, -1, -1, -1, 23, 24, 25, 26, 27,
880 -1, 29, 30, -1, -1, -1, -1, 35, -1, -1,
881 -1, -1, 40, 41, 42, -1, -1, -1, -1, -1,
882 -1, -1, -1, -1, 52
885 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
886 symbol of state STATE-NUM. */
887 static const yytype_uint8 yystos[] =
889 0, 54, 55, 56, 58, 59, 51, 52, 60, 106,
890 9, 10, 11, 12, 13, 15, 17, 18, 19, 20,
891 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
892 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
893 46, 47, 48, 51, 52, 64, 66, 67, 73, 74,
894 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
895 103, 3, 4, 5, 6, 7, 8, 61, 62, 63,
896 0, 1, 61, 103, 104, 104, 46, 47, 110, 111,
897 111, 68, 49, 76, 77, 45, 99, 100, 101, 45,
898 96, 97, 85, 47, 102, 103, 105, 14, 69, 70,
899 71, 73, 67, 74, 88, 89, 88, 90, 104, 103,
900 106, 108, 109, 45, 95, 85, 111, 111, 62, 65,
901 66, 105, 65, 0, 103, 106, 107, 106, 46, 47,
902 48, 107, 107, 105, 48, 50, 75, 85, 44, 45,
903 43, 100, 79, 85, 98, 43, 96, 43, 43, 102,
904 105, 71, 43, 43, 108, 85, 43, 45, 43, 106,
905 106, 106, 110, 106, 76, 106, 79, 85, 44, 106,
906 85, 69, 78, 79, 79, 72, 73, 16, 80, 81,
907 82, 104, 106, 21, 83, 82, 106, 85, 85, 22,
908 84, 79, 85
911 #define yyerrok (yyerrstatus = 0)
912 #define yyclearin (yychar = YYEMPTY)
913 #define YYEMPTY (-2)
914 #define YYEOF 0
916 #define YYACCEPT goto yyacceptlab
917 #define YYABORT goto yyabortlab
918 #define YYERROR goto yyerrorlab
921 /* Like YYERROR except do call yyerror. This remains here temporarily
922 to ease the transition to the new meaning of YYERROR, for GCC.
923 Once GCC version 2 has supplanted version 1, this can go. However,
924 YYFAIL appears to be in use. Nevertheless, it is formally deprecated
925 in Bison 2.4.2's NEWS entry, where a plan to phase it out is
926 discussed. */
928 #define YYFAIL goto yyerrlab
929 #if defined YYFAIL
930 /* This is here to suppress warnings from the GCC cpp's
931 -Wunused-macros. Normally we don't worry about that warning, but
932 some users do, and we want to make it easy for users to remove
933 YYFAIL uses, which will produce warnings from Bison 2.5. */
934 #endif
936 #define YYRECOVERING() (!!yyerrstatus)
938 #define YYBACKUP(Token, Value) \
939 do \
940 if (yychar == YYEMPTY && yylen == 1) \
942 yychar = (Token); \
943 yylval = (Value); \
944 YYPOPSTACK (1); \
945 goto yybackup; \
947 else \
949 yyerror (YY_("syntax error: cannot back up")); \
950 YYERROR; \
952 while (YYID (0))
955 #define YYTERROR 1
956 #define YYERRCODE 256
959 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
960 If N is 0, then set CURRENT to the empty location which ends
961 the previous symbol: RHS[0] (always defined). */
963 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
964 #ifndef YYLLOC_DEFAULT
965 # define YYLLOC_DEFAULT(Current, Rhs, N) \
966 do \
967 if (YYID (N)) \
969 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
970 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
971 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
972 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
974 else \
976 (Current).first_line = (Current).last_line = \
977 YYRHSLOC (Rhs, 0).last_line; \
978 (Current).first_column = (Current).last_column = \
979 YYRHSLOC (Rhs, 0).last_column; \
981 while (YYID (0))
982 #endif
985 /* YY_LOCATION_PRINT -- Print the location on the stream.
986 This macro was not mandated originally: define only if we know
987 we won't break user code: when these are the locations we know. */
989 #ifndef YY_LOCATION_PRINT
990 # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
991 # define YY_LOCATION_PRINT(File, Loc) \
992 fprintf (File, "%d.%d-%d.%d", \
993 (Loc).first_line, (Loc).first_column, \
994 (Loc).last_line, (Loc).last_column)
995 # else
996 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
997 # endif
998 #endif
1001 /* YYLEX -- calling `yylex' with the right arguments. */
1003 #ifdef YYLEX_PARAM
1004 # define YYLEX yylex (YYLEX_PARAM)
1005 #else
1006 # define YYLEX yylex ()
1007 #endif
1009 /* Enable debugging if requested. */
1010 #if YYDEBUG
1012 # ifndef YYFPRINTF
1013 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1014 # define YYFPRINTF fprintf
1015 # endif
1017 # define YYDPRINTF(Args) \
1018 do { \
1019 if (yydebug) \
1020 YYFPRINTF Args; \
1021 } while (YYID (0))
1023 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1024 do { \
1025 if (yydebug) \
1027 YYFPRINTF (stderr, "%s ", Title); \
1028 yy_symbol_print (stderr, \
1029 Type, Value, Location); \
1030 YYFPRINTF (stderr, "\n"); \
1032 } while (YYID (0))
1035 /*--------------------------------.
1036 | Print this symbol on YYOUTPUT. |
1037 `--------------------------------*/
1039 /*ARGSUSED*/
1040 #if (defined __STDC__ || defined __C99__FUNC__ \
1041 || defined __cplusplus || defined _MSC_VER)
1042 static void
1043 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1044 #else
1045 static void
1046 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
1047 FILE *yyoutput;
1048 int yytype;
1049 YYSTYPE const * const yyvaluep;
1050 YYLTYPE const * const yylocationp;
1051 #endif
1053 if (!yyvaluep)
1054 return;
1055 YYUSE (yylocationp);
1056 # ifdef YYPRINT
1057 if (yytype < YYNTOKENS)
1058 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1059 # else
1060 YYUSE (yyoutput);
1061 # endif
1062 switch (yytype)
1064 default:
1065 break;
1070 /*--------------------------------.
1071 | Print this symbol on YYOUTPUT. |
1072 `--------------------------------*/
1074 #if (defined __STDC__ || defined __C99__FUNC__ \
1075 || defined __cplusplus || defined _MSC_VER)
1076 static void
1077 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1078 #else
1079 static void
1080 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
1081 FILE *yyoutput;
1082 int yytype;
1083 YYSTYPE const * const yyvaluep;
1084 YYLTYPE const * const yylocationp;
1085 #endif
1087 if (yytype < YYNTOKENS)
1088 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1089 else
1090 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1092 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1093 YYFPRINTF (yyoutput, ": ");
1094 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
1095 YYFPRINTF (yyoutput, ")");
1098 /*------------------------------------------------------------------.
1099 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1100 | TOP (included). |
1101 `------------------------------------------------------------------*/
1103 #if (defined __STDC__ || defined __C99__FUNC__ \
1104 || defined __cplusplus || defined _MSC_VER)
1105 static void
1106 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1107 #else
1108 static void
1109 yy_stack_print (yybottom, yytop)
1110 yytype_int16 *yybottom;
1111 yytype_int16 *yytop;
1112 #endif
1114 YYFPRINTF (stderr, "Stack now");
1115 for (; yybottom <= yytop; yybottom++)
1117 int yybot = *yybottom;
1118 YYFPRINTF (stderr, " %d", yybot);
1120 YYFPRINTF (stderr, "\n");
1123 # define YY_STACK_PRINT(Bottom, Top) \
1124 do { \
1125 if (yydebug) \
1126 yy_stack_print ((Bottom), (Top)); \
1127 } while (YYID (0))
1130 /*------------------------------------------------.
1131 | Report that the YYRULE is going to be reduced. |
1132 `------------------------------------------------*/
1134 #if (defined __STDC__ || defined __C99__FUNC__ \
1135 || defined __cplusplus || defined _MSC_VER)
1136 static void
1137 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
1138 #else
1139 static void
1140 yy_reduce_print (yyvsp, yylsp, yyrule)
1141 YYSTYPE *yyvsp;
1142 YYLTYPE *yylsp;
1143 int yyrule;
1144 #endif
1146 int yynrhs = yyr2[yyrule];
1147 int yyi;
1148 unsigned long int yylno = yyrline[yyrule];
1149 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1150 yyrule - 1, yylno);
1151 /* The symbols being reduced. */
1152 for (yyi = 0; yyi < yynrhs; yyi++)
1154 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1155 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1156 &(yyvsp[(yyi + 1) - (yynrhs)])
1157 , &(yylsp[(yyi + 1) - (yynrhs)]) );
1158 YYFPRINTF (stderr, "\n");
1162 # define YY_REDUCE_PRINT(Rule) \
1163 do { \
1164 if (yydebug) \
1165 yy_reduce_print (yyvsp, yylsp, Rule); \
1166 } while (YYID (0))
1168 /* Nonzero means print parse trace. It is left uninitialized so that
1169 multiple parsers can coexist. */
1170 int yydebug;
1171 #else /* !YYDEBUG */
1172 # define YYDPRINTF(Args)
1173 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1174 # define YY_STACK_PRINT(Bottom, Top)
1175 # define YY_REDUCE_PRINT(Rule)
1176 #endif /* !YYDEBUG */
1179 /* YYINITDEPTH -- initial size of the parser's stacks. */
1180 #ifndef YYINITDEPTH
1181 # define YYINITDEPTH 200
1182 #endif
1184 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1185 if the built-in stack extension method is used).
1187 Do not make this value too large; the results are undefined if
1188 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1189 evaluated with infinite-precision integer arithmetic. */
1191 #ifndef YYMAXDEPTH
1192 # define YYMAXDEPTH 10000
1193 #endif
1196 #if YYERROR_VERBOSE
1198 # ifndef yystrlen
1199 # if defined __GLIBC__ && defined _STRING_H
1200 # define yystrlen strlen
1201 # else
1202 /* Return the length of YYSTR. */
1203 #if (defined __STDC__ || defined __C99__FUNC__ \
1204 || defined __cplusplus || defined _MSC_VER)
1205 static YYSIZE_T
1206 yystrlen (const char *yystr)
1207 #else
1208 static YYSIZE_T
1209 yystrlen (yystr)
1210 const char *yystr;
1211 #endif
1213 YYSIZE_T yylen;
1214 for (yylen = 0; yystr[yylen]; yylen++)
1215 continue;
1216 return yylen;
1218 # endif
1219 # endif
1221 # ifndef yystpcpy
1222 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1223 # define yystpcpy stpcpy
1224 # else
1225 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1226 YYDEST. */
1227 #if (defined __STDC__ || defined __C99__FUNC__ \
1228 || defined __cplusplus || defined _MSC_VER)
1229 static char *
1230 yystpcpy (char *yydest, const char *yysrc)
1231 #else
1232 static char *
1233 yystpcpy (yydest, yysrc)
1234 char *yydest;
1235 const char *yysrc;
1236 #endif
1238 char *yyd = yydest;
1239 const char *yys = yysrc;
1241 while ((*yyd++ = *yys++) != '\0')
1242 continue;
1244 return yyd - 1;
1246 # endif
1247 # endif
1249 # ifndef yytnamerr
1250 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1251 quotes and backslashes, so that it's suitable for yyerror. The
1252 heuristic is that double-quoting is unnecessary unless the string
1253 contains an apostrophe, a comma, or backslash (other than
1254 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1255 null, do not copy; instead, return the length of what the result
1256 would have been. */
1257 static YYSIZE_T
1258 yytnamerr (char *yyres, const char *yystr)
1260 if (*yystr == '"')
1262 YYSIZE_T yyn = 0;
1263 char const *yyp = yystr;
1265 for (;;)
1266 switch (*++yyp)
1268 case '\'':
1269 case ',':
1270 goto do_not_strip_quotes;
1272 case '\\':
1273 if (*++yyp != '\\')
1274 goto do_not_strip_quotes;
1275 /* Fall through. */
1276 default:
1277 if (yyres)
1278 yyres[yyn] = *yyp;
1279 yyn++;
1280 break;
1282 case '"':
1283 if (yyres)
1284 yyres[yyn] = '\0';
1285 return yyn;
1287 do_not_strip_quotes: ;
1290 if (! yyres)
1291 return yystrlen (yystr);
1293 return yystpcpy (yyres, yystr) - yyres;
1295 # endif
1297 /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1298 about the unexpected token YYTOKEN for the state stack whose top is
1299 YYSSP.
1301 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1302 not large enough to hold the message. In that case, also set
1303 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1304 required number of bytes is too large to store. */
1305 static int
1306 yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg,
1307 yytype_int16 *yyssp, int yytoken)
1309 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]);
1310 YYSIZE_T yysize = yysize0;
1311 YYSIZE_T yysize1;
1312 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1313 /* Internationalized format string. */
1314 const char *yyformat = 0;
1315 /* Arguments of yyformat. */
1316 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1317 /* Number of reported tokens (one for the "unexpected", one per
1318 "expected"). */
1319 int yycount = 0;
1321 /* There are many possibilities here to consider:
1322 - Assume YYFAIL is not used. It's too flawed to consider. See
1323 <http://lists.gnu.org/archive/html/bison-patches/2009-12/msg00024.html>
1324 for details. YYERROR is fine as it does not invoke this
1325 function.
1326 - If this state is a consistent state with a default action, then
1327 the only way this function was invoked is if the default action
1328 is an error action. In that case, don't check for expected
1329 tokens because there are none.
1330 - The only way there can be no lookahead present (in yychar) is if
1331 this state is a consistent state with a default action. Thus,
1332 detecting the absence of a lookahead is sufficient to determine
1333 that there is no unexpected or expected token to report. In that
1334 case, just report a simple "syntax error".
1335 - Don't assume there isn't a lookahead just because this state is a
1336 consistent state with a default action. There might have been a
1337 previous inconsistent state, consistent state with a non-default
1338 action, or user semantic action that manipulated yychar.
1339 - Of course, the expected token list depends on states to have
1340 correct lookahead information, and it depends on the parser not
1341 to perform extra reductions after fetching a lookahead from the
1342 scanner and before detecting a syntax error. Thus, state merging
1343 (from LALR or IELR) and default reductions corrupt the expected
1344 token list. However, the list is correct for canonical LR with
1345 one exception: it will still contain any token that will not be
1346 accepted due to an error action in a later state.
1348 if (yytoken != YYEMPTY)
1350 int yyn = yypact[*yyssp];
1351 yyarg[yycount++] = yytname[yytoken];
1352 if (!yypact_value_is_default (yyn))
1354 /* Start YYX at -YYN if negative to avoid negative indexes in
1355 YYCHECK. In other words, skip the first -YYN actions for
1356 this state because they are default actions. */
1357 int yyxbegin = yyn < 0 ? -yyn : 0;
1358 /* Stay within bounds of both yycheck and yytname. */
1359 int yychecklim = YYLAST - yyn + 1;
1360 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1361 int yyx;
1363 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1364 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1365 && !yytable_value_is_error (yytable[yyx + yyn]))
1367 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1369 yycount = 1;
1370 yysize = yysize0;
1371 break;
1373 yyarg[yycount++] = yytname[yyx];
1374 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1375 if (! (yysize <= yysize1
1376 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1377 return 2;
1378 yysize = yysize1;
1383 switch (yycount)
1385 # define YYCASE_(N, S) \
1386 case N: \
1387 yyformat = S; \
1388 break
1389 YYCASE_(0, YY_("syntax error"));
1390 YYCASE_(1, YY_("syntax error, unexpected %s"));
1391 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1392 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1393 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1394 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1395 # undef YYCASE_
1398 yysize1 = yysize + yystrlen (yyformat);
1399 if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM))
1400 return 2;
1401 yysize = yysize1;
1403 if (*yymsg_alloc < yysize)
1405 *yymsg_alloc = 2 * yysize;
1406 if (! (yysize <= *yymsg_alloc
1407 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1408 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1409 return 1;
1412 /* Avoid sprintf, as that infringes on the user's name space.
1413 Don't have undefined behavior even if the translation
1414 produced a string with the wrong number of "%s"s. */
1416 char *yyp = *yymsg;
1417 int yyi = 0;
1418 while ((*yyp = *yyformat) != '\0')
1419 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1421 yyp += yytnamerr (yyp, yyarg[yyi++]);
1422 yyformat += 2;
1424 else
1426 yyp++;
1427 yyformat++;
1430 return 0;
1432 #endif /* YYERROR_VERBOSE */
1434 /*-----------------------------------------------.
1435 | Release the memory associated to this symbol. |
1436 `-----------------------------------------------*/
1438 /*ARGSUSED*/
1439 #if (defined __STDC__ || defined __C99__FUNC__ \
1440 || defined __cplusplus || defined _MSC_VER)
1441 static void
1442 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1443 #else
1444 static void
1445 yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1446 const char *yymsg;
1447 int yytype;
1448 YYSTYPE *yyvaluep;
1449 YYLTYPE *yylocationp;
1450 #endif
1452 YYUSE (yyvaluep);
1453 YYUSE (yylocationp);
1455 if (!yymsg)
1456 yymsg = "Deleting";
1457 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1459 switch (yytype)
1461 case 46: /* "\"text\"" */
1463 /* Line 1391 of yacc.c */
1464 #line 98 "SCDoc.y"
1465 { free((yyvaluep->str)); };
1467 /* Line 1391 of yacc.c */
1468 #line 1469 "SCDoc.tab.cpp"
1469 break;
1470 case 47: /* "URL" */
1472 /* Line 1391 of yacc.c */
1473 #line 98 "SCDoc.y"
1474 { free((yyvaluep->str)); };
1476 /* Line 1391 of yacc.c */
1477 #line 1478 "SCDoc.tab.cpp"
1478 break;
1479 case 48: /* "COMMA" */
1481 /* Line 1391 of yacc.c */
1482 #line 98 "SCDoc.y"
1483 { free((yyvaluep->str)); };
1485 /* Line 1391 of yacc.c */
1486 #line 1487 "SCDoc.tab.cpp"
1487 break;
1488 case 49: /* "\"method name\"" */
1490 /* Line 1391 of yacc.c */
1491 #line 98 "SCDoc.y"
1492 { free((yyvaluep->str)); };
1494 /* Line 1391 of yacc.c */
1495 #line 1496 "SCDoc.tab.cpp"
1496 break;
1497 case 50: /* "\"arguments string\"" */
1499 /* Line 1391 of yacc.c */
1500 #line 98 "SCDoc.y"
1501 { free((yyvaluep->str)); };
1503 /* Line 1391 of yacc.c */
1504 #line 1505 "SCDoc.tab.cpp"
1505 break;
1506 case 59: /* "document" */
1508 /* Line 1391 of yacc.c */
1509 #line 97 "SCDoc.y"
1510 { doc_node_free_tree((yyvaluep->doc_node)); };
1512 /* Line 1391 of yacc.c */
1513 #line 1514 "SCDoc.tab.cpp"
1514 break;
1515 case 61: /* "dochead" */
1517 /* Line 1391 of yacc.c */
1518 #line 97 "SCDoc.y"
1519 { doc_node_free_tree((yyvaluep->doc_node)); };
1521 /* Line 1391 of yacc.c */
1522 #line 1523 "SCDoc.tab.cpp"
1523 break;
1524 case 62: /* "headline" */
1526 /* Line 1391 of yacc.c */
1527 #line 97 "SCDoc.y"
1528 { doc_node_free_tree((yyvaluep->doc_node)); };
1530 /* Line 1391 of yacc.c */
1531 #line 1532 "SCDoc.tab.cpp"
1532 break;
1533 case 65: /* "optsections" */
1535 /* Line 1391 of yacc.c */
1536 #line 97 "SCDoc.y"
1537 { doc_node_free_tree((yyvaluep->doc_node)); };
1539 /* Line 1391 of yacc.c */
1540 #line 1541 "SCDoc.tab.cpp"
1541 break;
1542 case 66: /* "sections" */
1544 /* Line 1391 of yacc.c */
1545 #line 97 "SCDoc.y"
1546 { doc_node_free_tree((yyvaluep->doc_node)); };
1548 /* Line 1391 of yacc.c */
1549 #line 1550 "SCDoc.tab.cpp"
1550 break;
1551 case 67: /* "section" */
1553 /* Line 1391 of yacc.c */
1554 #line 97 "SCDoc.y"
1555 { doc_node_free_tree((yyvaluep->doc_node)); };
1557 /* Line 1391 of yacc.c */
1558 #line 1559 "SCDoc.tab.cpp"
1559 break;
1560 case 69: /* "optsubsections" */
1562 /* Line 1391 of yacc.c */
1563 #line 97 "SCDoc.y"
1564 { doc_node_free_tree((yyvaluep->doc_node)); };
1566 /* Line 1391 of yacc.c */
1567 #line 1568 "SCDoc.tab.cpp"
1568 break;
1569 case 70: /* "subsections" */
1571 /* Line 1391 of yacc.c */
1572 #line 97 "SCDoc.y"
1573 { doc_node_free_tree((yyvaluep->doc_node)); };
1575 /* Line 1391 of yacc.c */
1576 #line 1577 "SCDoc.tab.cpp"
1577 break;
1578 case 71: /* "subsection" */
1580 /* Line 1391 of yacc.c */
1581 #line 97 "SCDoc.y"
1582 { doc_node_free_tree((yyvaluep->doc_node)); };
1584 /* Line 1391 of yacc.c */
1585 #line 1586 "SCDoc.tab.cpp"
1586 break;
1587 case 72: /* "optsubsubsections" */
1589 /* Line 1391 of yacc.c */
1590 #line 97 "SCDoc.y"
1591 { doc_node_free_tree((yyvaluep->doc_node)); };
1593 /* Line 1391 of yacc.c */
1594 #line 1595 "SCDoc.tab.cpp"
1595 break;
1596 case 73: /* "subsubsections" */
1598 /* Line 1391 of yacc.c */
1599 #line 97 "SCDoc.y"
1600 { doc_node_free_tree((yyvaluep->doc_node)); };
1602 /* Line 1391 of yacc.c */
1603 #line 1604 "SCDoc.tab.cpp"
1604 break;
1605 case 74: /* "subsubsection" */
1607 /* Line 1391 of yacc.c */
1608 #line 97 "SCDoc.y"
1609 { doc_node_free_tree((yyvaluep->doc_node)); };
1611 /* Line 1391 of yacc.c */
1612 #line 1613 "SCDoc.tab.cpp"
1613 break;
1614 case 75: /* "optMETHODARGS" */
1616 /* Line 1391 of yacc.c */
1617 #line 98 "SCDoc.y"
1618 { free((yyvaluep->str)); };
1620 /* Line 1391 of yacc.c */
1621 #line 1622 "SCDoc.tab.cpp"
1622 break;
1623 case 76: /* "methodname" */
1625 /* Line 1391 of yacc.c */
1626 #line 98 "SCDoc.y"
1627 { free((yyvaluep->str)); };
1629 /* Line 1391 of yacc.c */
1630 #line 1631 "SCDoc.tab.cpp"
1631 break;
1632 case 77: /* "methnames" */
1634 /* Line 1391 of yacc.c */
1635 #line 97 "SCDoc.y"
1636 { doc_node_free_tree((yyvaluep->doc_node)); };
1638 /* Line 1391 of yacc.c */
1639 #line 1640 "SCDoc.tab.cpp"
1640 break;
1641 case 78: /* "methodbody" */
1643 /* Line 1391 of yacc.c */
1644 #line 97 "SCDoc.y"
1645 { doc_node_free_tree((yyvaluep->doc_node)); };
1647 /* Line 1391 of yacc.c */
1648 #line 1649 "SCDoc.tab.cpp"
1649 break;
1650 case 79: /* "optbody" */
1652 /* Line 1391 of yacc.c */
1653 #line 97 "SCDoc.y"
1654 { doc_node_free_tree((yyvaluep->doc_node)); };
1656 /* Line 1391 of yacc.c */
1657 #line 1658 "SCDoc.tab.cpp"
1658 break;
1659 case 80: /* "optargs" */
1661 /* Line 1391 of yacc.c */
1662 #line 97 "SCDoc.y"
1663 { doc_node_free_tree((yyvaluep->doc_node)); };
1665 /* Line 1391 of yacc.c */
1666 #line 1667 "SCDoc.tab.cpp"
1667 break;
1668 case 81: /* "args" */
1670 /* Line 1391 of yacc.c */
1671 #line 97 "SCDoc.y"
1672 { doc_node_free_tree((yyvaluep->doc_node)); };
1674 /* Line 1391 of yacc.c */
1675 #line 1676 "SCDoc.tab.cpp"
1676 break;
1677 case 82: /* "arg" */
1679 /* Line 1391 of yacc.c */
1680 #line 97 "SCDoc.y"
1681 { doc_node_free_tree((yyvaluep->doc_node)); };
1683 /* Line 1391 of yacc.c */
1684 #line 1685 "SCDoc.tab.cpp"
1685 break;
1686 case 83: /* "optreturns" */
1688 /* Line 1391 of yacc.c */
1689 #line 97 "SCDoc.y"
1690 { doc_node_free_tree((yyvaluep->doc_node)); };
1692 /* Line 1391 of yacc.c */
1693 #line 1694 "SCDoc.tab.cpp"
1694 break;
1695 case 84: /* "optdiscussion" */
1697 /* Line 1391 of yacc.c */
1698 #line 97 "SCDoc.y"
1699 { doc_node_free_tree((yyvaluep->doc_node)); };
1701 /* Line 1391 of yacc.c */
1702 #line 1703 "SCDoc.tab.cpp"
1703 break;
1704 case 85: /* "body" */
1706 /* Line 1391 of yacc.c */
1707 #line 97 "SCDoc.y"
1708 { doc_node_free_tree((yyvaluep->doc_node)); };
1710 /* Line 1391 of yacc.c */
1711 #line 1712 "SCDoc.tab.cpp"
1712 break;
1713 case 86: /* "blockA" */
1715 /* Line 1391 of yacc.c */
1716 #line 97 "SCDoc.y"
1717 { doc_node_free_tree((yyvaluep->doc_node)); };
1719 /* Line 1391 of yacc.c */
1720 #line 1721 "SCDoc.tab.cpp"
1721 break;
1722 case 87: /* "blockB" */
1724 /* Line 1391 of yacc.c */
1725 #line 97 "SCDoc.y"
1726 { doc_node_free_tree((yyvaluep->doc_node)); };
1728 /* Line 1391 of yacc.c */
1729 #line 1730 "SCDoc.tab.cpp"
1730 break;
1731 case 88: /* "bodyelem" */
1733 /* Line 1391 of yacc.c */
1734 #line 97 "SCDoc.y"
1735 { doc_node_free_tree((yyvaluep->doc_node)); };
1737 /* Line 1391 of yacc.c */
1738 #line 1739 "SCDoc.tab.cpp"
1739 break;
1740 case 89: /* "prose" */
1742 /* Line 1391 of yacc.c */
1743 #line 97 "SCDoc.y"
1744 { doc_node_free_tree((yyvaluep->doc_node)); };
1746 /* Line 1391 of yacc.c */
1747 #line 1748 "SCDoc.tab.cpp"
1748 break;
1749 case 90: /* "proseelem" */
1751 /* Line 1391 of yacc.c */
1752 #line 97 "SCDoc.y"
1753 { doc_node_free_tree((yyvaluep->doc_node)); };
1755 /* Line 1391 of yacc.c */
1756 #line 1757 "SCDoc.tab.cpp"
1757 break;
1758 case 95: /* "listbody" */
1760 /* Line 1391 of yacc.c */
1761 #line 97 "SCDoc.y"
1762 { doc_node_free_tree((yyvaluep->doc_node)); };
1764 /* Line 1391 of yacc.c */
1765 #line 1766 "SCDoc.tab.cpp"
1766 break;
1767 case 96: /* "tablerow" */
1769 /* Line 1391 of yacc.c */
1770 #line 97 "SCDoc.y"
1771 { doc_node_free_tree((yyvaluep->doc_node)); };
1773 /* Line 1391 of yacc.c */
1774 #line 1775 "SCDoc.tab.cpp"
1775 break;
1776 case 97: /* "tablebody" */
1778 /* Line 1391 of yacc.c */
1779 #line 97 "SCDoc.y"
1780 { doc_node_free_tree((yyvaluep->doc_node)); };
1782 /* Line 1391 of yacc.c */
1783 #line 1784 "SCDoc.tab.cpp"
1784 break;
1785 case 98: /* "tablecells" */
1787 /* Line 1391 of yacc.c */
1788 #line 97 "SCDoc.y"
1789 { doc_node_free_tree((yyvaluep->doc_node)); };
1791 /* Line 1391 of yacc.c */
1792 #line 1793 "SCDoc.tab.cpp"
1793 break;
1794 case 99: /* "defterms" */
1796 /* Line 1391 of yacc.c */
1797 #line 97 "SCDoc.y"
1798 { doc_node_free_tree((yyvaluep->doc_node)); };
1800 /* Line 1391 of yacc.c */
1801 #line 1802 "SCDoc.tab.cpp"
1802 break;
1803 case 100: /* "deflistrow" */
1805 /* Line 1391 of yacc.c */
1806 #line 97 "SCDoc.y"
1807 { doc_node_free_tree((yyvaluep->doc_node)); };
1809 /* Line 1391 of yacc.c */
1810 #line 1811 "SCDoc.tab.cpp"
1811 break;
1812 case 101: /* "deflistbody" */
1814 /* Line 1391 of yacc.c */
1815 #line 97 "SCDoc.y"
1816 { doc_node_free_tree((yyvaluep->doc_node)); };
1818 /* Line 1391 of yacc.c */
1819 #line 1820 "SCDoc.tab.cpp"
1820 break;
1821 case 102: /* "anywordurl" */
1823 /* Line 1391 of yacc.c */
1824 #line 98 "SCDoc.y"
1825 { free((yyvaluep->str)); };
1827 /* Line 1391 of yacc.c */
1828 #line 1829 "SCDoc.tab.cpp"
1829 break;
1830 case 103: /* "anyword" */
1832 /* Line 1391 of yacc.c */
1833 #line 98 "SCDoc.y"
1834 { free((yyvaluep->str)); };
1836 /* Line 1391 of yacc.c */
1837 #line 1838 "SCDoc.tab.cpp"
1838 break;
1839 case 104: /* "words" */
1841 /* Line 1391 of yacc.c */
1842 #line 98 "SCDoc.y"
1843 { free((yyvaluep->str)); };
1845 /* Line 1391 of yacc.c */
1846 #line 1847 "SCDoc.tab.cpp"
1847 break;
1848 case 105: /* "words2" */
1850 /* Line 1391 of yacc.c */
1851 #line 98 "SCDoc.y"
1852 { free((yyvaluep->str)); };
1854 /* Line 1391 of yacc.c */
1855 #line 1856 "SCDoc.tab.cpp"
1856 break;
1857 case 108: /* "anywordnl" */
1859 /* Line 1391 of yacc.c */
1860 #line 98 "SCDoc.y"
1861 { free((yyvaluep->str)); };
1863 /* Line 1391 of yacc.c */
1864 #line 1865 "SCDoc.tab.cpp"
1865 break;
1866 case 109: /* "wordsnl" */
1868 /* Line 1391 of yacc.c */
1869 #line 98 "SCDoc.y"
1870 { free((yyvaluep->str)); };
1872 /* Line 1391 of yacc.c */
1873 #line 1874 "SCDoc.tab.cpp"
1874 break;
1875 case 110: /* "nocommawords" */
1877 /* Line 1391 of yacc.c */
1878 #line 98 "SCDoc.y"
1879 { free((yyvaluep->str)); };
1881 /* Line 1391 of yacc.c */
1882 #line 1883 "SCDoc.tab.cpp"
1883 break;
1884 case 111: /* "commalist" */
1886 /* Line 1391 of yacc.c */
1887 #line 97 "SCDoc.y"
1888 { doc_node_free_tree((yyvaluep->doc_node)); };
1890 /* Line 1391 of yacc.c */
1891 #line 1892 "SCDoc.tab.cpp"
1892 break;
1894 default:
1895 break;
1900 /* Prevent warnings from -Wmissing-prototypes. */
1901 #ifdef YYPARSE_PARAM
1902 #if defined __STDC__ || defined __cplusplus
1903 int yyparse (void *YYPARSE_PARAM);
1904 #else
1905 int yyparse ();
1906 #endif
1907 #else /* ! YYPARSE_PARAM */
1908 #if defined __STDC__ || defined __cplusplus
1909 int yyparse (void);
1910 #else
1911 int yyparse ();
1912 #endif
1913 #endif /* ! YYPARSE_PARAM */
1916 /* The lookahead symbol. */
1917 int yychar;
1919 /* The semantic value of the lookahead symbol. */
1920 YYSTYPE yylval;
1922 /* Location data for the lookahead symbol. */
1923 YYLTYPE yylloc;
1925 /* Number of syntax errors so far. */
1926 int yynerrs;
1929 /*----------.
1930 | yyparse. |
1931 `----------*/
1933 #ifdef YYPARSE_PARAM
1934 #if (defined __STDC__ || defined __C99__FUNC__ \
1935 || defined __cplusplus || defined _MSC_VER)
1937 yyparse (void *YYPARSE_PARAM)
1938 #else
1940 yyparse (YYPARSE_PARAM)
1941 void *YYPARSE_PARAM;
1942 #endif
1943 #else /* ! YYPARSE_PARAM */
1944 #if (defined __STDC__ || defined __C99__FUNC__ \
1945 || defined __cplusplus || defined _MSC_VER)
1947 yyparse (void)
1948 #else
1950 yyparse ()
1952 #endif
1953 #endif
1955 int yystate;
1956 /* Number of tokens to shift before error messages enabled. */
1957 int yyerrstatus;
1959 /* The stacks and their tools:
1960 `yyss': related to states.
1961 `yyvs': related to semantic values.
1962 `yyls': related to locations.
1964 Refer to the stacks thru separate pointers, to allow yyoverflow
1965 to reallocate them elsewhere. */
1967 /* The state stack. */
1968 yytype_int16 yyssa[YYINITDEPTH];
1969 yytype_int16 *yyss;
1970 yytype_int16 *yyssp;
1972 /* The semantic value stack. */
1973 YYSTYPE yyvsa[YYINITDEPTH];
1974 YYSTYPE *yyvs;
1975 YYSTYPE *yyvsp;
1977 /* The location stack. */
1978 YYLTYPE yylsa[YYINITDEPTH];
1979 YYLTYPE *yyls;
1980 YYLTYPE *yylsp;
1982 /* The locations where the error started and ended. */
1983 YYLTYPE yyerror_range[3];
1985 YYSIZE_T yystacksize;
1987 int yyn;
1988 int yyresult;
1989 /* Lookahead token as an internal (translated) token number. */
1990 int yytoken;
1991 /* The variables used to return semantic value and location from the
1992 action routines. */
1993 YYSTYPE yyval;
1994 YYLTYPE yyloc;
1996 #if YYERROR_VERBOSE
1997 /* Buffer for error messages, and its allocated size. */
1998 char yymsgbuf[128];
1999 char *yymsg = yymsgbuf;
2000 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
2001 #endif
2003 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
2005 /* The number of symbols on the RHS of the reduced rule.
2006 Keep to zero when no symbol should be popped. */
2007 int yylen = 0;
2009 yytoken = 0;
2010 yyss = yyssa;
2011 yyvs = yyvsa;
2012 yyls = yylsa;
2013 yystacksize = YYINITDEPTH;
2015 YYDPRINTF ((stderr, "Starting parse\n"));
2017 yystate = 0;
2018 yyerrstatus = 0;
2019 yynerrs = 0;
2020 yychar = YYEMPTY; /* Cause a token to be read. */
2022 /* Initialize stack pointers.
2023 Waste one element of value and location stack
2024 so that they stay on the same level as the state stack.
2025 The wasted elements are never initialized. */
2026 yyssp = yyss;
2027 yyvsp = yyvs;
2028 yylsp = yyls;
2030 #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL
2031 /* Initialize the default location before parsing starts. */
2032 yylloc.first_line = yylloc.last_line = 1;
2033 yylloc.first_column = yylloc.last_column = 1;
2034 #endif
2036 goto yysetstate;
2038 /*------------------------------------------------------------.
2039 | yynewstate -- Push a new state, which is found in yystate. |
2040 `------------------------------------------------------------*/
2041 yynewstate:
2042 /* In all cases, when you get here, the value and location stacks
2043 have just been pushed. So pushing a state here evens the stacks. */
2044 yyssp++;
2046 yysetstate:
2047 *yyssp = yystate;
2049 if (yyss + yystacksize - 1 <= yyssp)
2051 /* Get the current used size of the three stacks, in elements. */
2052 YYSIZE_T yysize = yyssp - yyss + 1;
2054 #ifdef yyoverflow
2056 /* Give user a chance to reallocate the stack. Use copies of
2057 these so that the &'s don't force the real ones into
2058 memory. */
2059 YYSTYPE *yyvs1 = yyvs;
2060 yytype_int16 *yyss1 = yyss;
2061 YYLTYPE *yyls1 = yyls;
2063 /* Each stack pointer address is followed by the size of the
2064 data in use in that stack, in bytes. This used to be a
2065 conditional around just the two extra args, but that might
2066 be undefined if yyoverflow is a macro. */
2067 yyoverflow (YY_("memory exhausted"),
2068 &yyss1, yysize * sizeof (*yyssp),
2069 &yyvs1, yysize * sizeof (*yyvsp),
2070 &yyls1, yysize * sizeof (*yylsp),
2071 &yystacksize);
2073 yyls = yyls1;
2074 yyss = yyss1;
2075 yyvs = yyvs1;
2077 #else /* no yyoverflow */
2078 # ifndef YYSTACK_RELOCATE
2079 goto yyexhaustedlab;
2080 # else
2081 /* Extend the stack our own way. */
2082 if (YYMAXDEPTH <= yystacksize)
2083 goto yyexhaustedlab;
2084 yystacksize *= 2;
2085 if (YYMAXDEPTH < yystacksize)
2086 yystacksize = YYMAXDEPTH;
2089 yytype_int16 *yyss1 = yyss;
2090 union yyalloc *yyptr =
2091 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2092 if (! yyptr)
2093 goto yyexhaustedlab;
2094 YYSTACK_RELOCATE (yyss_alloc, yyss);
2095 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2096 YYSTACK_RELOCATE (yyls_alloc, yyls);
2097 # undef YYSTACK_RELOCATE
2098 if (yyss1 != yyssa)
2099 YYSTACK_FREE (yyss1);
2101 # endif
2102 #endif /* no yyoverflow */
2104 yyssp = yyss + yysize - 1;
2105 yyvsp = yyvs + yysize - 1;
2106 yylsp = yyls + yysize - 1;
2108 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2109 (unsigned long int) yystacksize));
2111 if (yyss + yystacksize - 1 <= yyssp)
2112 YYABORT;
2115 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2117 if (yystate == YYFINAL)
2118 YYACCEPT;
2120 goto yybackup;
2122 /*-----------.
2123 | yybackup. |
2124 `-----------*/
2125 yybackup:
2127 /* Do appropriate processing given the current state. Read a
2128 lookahead token if we need one and don't already have one. */
2130 /* First try to decide what to do without reference to lookahead token. */
2131 yyn = yypact[yystate];
2132 if (yypact_value_is_default (yyn))
2133 goto yydefault;
2135 /* Not known => get a lookahead token if don't already have one. */
2137 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2138 if (yychar == YYEMPTY)
2140 YYDPRINTF ((stderr, "Reading a token: "));
2141 yychar = YYLEX;
2144 if (yychar <= YYEOF)
2146 yychar = yytoken = YYEOF;
2147 YYDPRINTF ((stderr, "Now at end of input.\n"));
2149 else
2151 yytoken = YYTRANSLATE (yychar);
2152 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2155 /* If the proper action on seeing token YYTOKEN is to reduce or to
2156 detect an error, take that action. */
2157 yyn += yytoken;
2158 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2159 goto yydefault;
2160 yyn = yytable[yyn];
2161 if (yyn <= 0)
2163 if (yytable_value_is_error (yyn))
2164 goto yyerrlab;
2165 yyn = -yyn;
2166 goto yyreduce;
2169 /* Count tokens shifted since error; after three, turn off error
2170 status. */
2171 if (yyerrstatus)
2172 yyerrstatus--;
2174 /* Shift the lookahead token. */
2175 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2177 /* Discard the shifted token. */
2178 yychar = YYEMPTY;
2180 yystate = yyn;
2181 *++yyvsp = yylval;
2182 *++yylsp = yylloc;
2183 goto yynewstate;
2186 /*-----------------------------------------------------------.
2187 | yydefault -- do the default action for the current state. |
2188 `-----------------------------------------------------------*/
2189 yydefault:
2190 yyn = yydefact[yystate];
2191 if (yyn == 0)
2192 goto yyerrlab;
2193 goto yyreduce;
2196 /*-----------------------------.
2197 | yyreduce -- Do a reduction. |
2198 `-----------------------------*/
2199 yyreduce:
2200 /* yyn is the number of a rule to reduce with. */
2201 yylen = yyr2[yyn];
2203 /* If YYLEN is nonzero, implement the default value of the action:
2204 `$$ = $1'.
2206 Otherwise, the following line sets YYVAL to garbage.
2207 This behavior is undocumented and Bison
2208 users should not rely upon it. Assigning to YYVAL
2209 unconditionally makes the parser a bit smaller, and it avoids a
2210 GCC warning that YYVAL may be used uninitialized. */
2211 yyval = yyvsp[1-yylen];
2213 /* Default location. */
2214 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2215 YY_REDUCE_PRINT (yyn);
2216 switch (yyn)
2218 case 2:
2220 /* Line 1806 of yacc.c */
2221 #line 107 "SCDoc.y"
2222 { topnode = (yyvsp[(1) - (1)].doc_node); }
2223 break;
2225 case 3:
2227 /* Line 1806 of yacc.c */
2228 #line 108 "SCDoc.y"
2229 { topnode = NULL; doc_node_free_tree((yyvsp[(1) - (2)].doc_node)); }
2230 break;
2232 case 4:
2234 /* Line 1806 of yacc.c */
2235 #line 112 "SCDoc.y"
2237 (yyval.doc_node) = doc_node_create("DOCUMENT");
2238 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2239 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2241 break;
2243 case 5:
2245 /* Line 1806 of yacc.c */
2246 #line 118 "SCDoc.y"
2248 (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(2) - (2)].doc_node));
2250 break;
2252 case 6:
2254 /* Line 1806 of yacc.c */
2255 #line 122 "SCDoc.y"
2257 (yyval.doc_node) = doc_node_create("DOCUMENT");
2258 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (3)].doc_node));
2259 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (3)].doc_node));
2261 break;
2263 case 9:
2265 /* Line 1806 of yacc.c */
2266 #line 133 "SCDoc.y"
2267 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2268 break;
2270 case 10:
2272 /* Line 1806 of yacc.c */
2273 #line 134 "SCDoc.y"
2274 { (yyval.doc_node) = doc_node_make("HEADER",NULL,(yyvsp[(1) - (1)].doc_node)); }
2275 break;
2277 case 11:
2279 /* Line 1806 of yacc.c */
2280 #line 137 "SCDoc.y"
2281 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); }
2282 break;
2284 case 12:
2286 /* Line 1806 of yacc.c */
2287 #line 138 "SCDoc.y"
2288 { (yyval.doc_node) = doc_node_make_take_children("CATEGORIES",NULL,(yyvsp[(2) - (3)].doc_node)); }
2289 break;
2291 case 13:
2293 /* Line 1806 of yacc.c */
2294 #line 139 "SCDoc.y"
2295 { (yyval.doc_node) = doc_node_make_take_children("RELATED",NULL,(yyvsp[(2) - (3)].doc_node)); }
2296 break;
2298 case 14:
2300 /* Line 1806 of yacc.c */
2301 #line 142 "SCDoc.y"
2302 { (yyval.id) = "TITLE"; }
2303 break;
2305 case 15:
2307 /* Line 1806 of yacc.c */
2308 #line 143 "SCDoc.y"
2309 { (yyval.id) = "TITLE"; }
2310 break;
2312 case 16:
2314 /* Line 1806 of yacc.c */
2315 #line 144 "SCDoc.y"
2316 { (yyval.id) = "SUMMARY"; }
2317 break;
2319 case 17:
2321 /* Line 1806 of yacc.c */
2322 #line 145 "SCDoc.y"
2323 { (yyval.id) = "REDIRECT"; }
2324 break;
2326 case 18:
2328 /* Line 1806 of yacc.c */
2329 #line 148 "SCDoc.y"
2330 { (yyval.id) = "CLASSMETHODS"; method_type = "CMETHOD"; }
2331 break;
2333 case 19:
2335 /* Line 1806 of yacc.c */
2336 #line 149 "SCDoc.y"
2337 { (yyval.id) = "INSTANCEMETHODS"; method_type = "IMETHOD"; }
2338 break;
2340 case 20:
2342 /* Line 1806 of yacc.c */
2343 #line 150 "SCDoc.y"
2344 { (yyval.id) = "DESCRIPTION"; method_type = "METHOD"; }
2345 break;
2347 case 21:
2349 /* Line 1806 of yacc.c */
2350 #line 151 "SCDoc.y"
2351 { (yyval.id) = "EXAMPLES"; method_type = "METHOD"; }
2352 break;
2354 case 23:
2356 /* Line 1806 of yacc.c */
2357 #line 155 "SCDoc.y"
2358 { (yyval.doc_node) = doc_node_make("BODY",NULL,NULL); }
2359 break;
2361 case 24:
2363 /* Line 1806 of yacc.c */
2364 #line 158 "SCDoc.y"
2365 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2366 break;
2368 case 25:
2370 /* Line 1806 of yacc.c */
2371 #line 159 "SCDoc.y"
2372 { (yyval.doc_node) = doc_node_make("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); }
2373 break;
2375 case 26:
2377 /* Line 1806 of yacc.c */
2378 #line 160 "SCDoc.y"
2379 { (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); }
2380 break;
2382 case 27:
2384 /* Line 1806 of yacc.c */
2385 #line 163 "SCDoc.y"
2386 { method_type = "METHOD"; }
2387 break;
2389 case 28:
2391 /* Line 1806 of yacc.c */
2392 #line 163 "SCDoc.y"
2393 { (yyval.doc_node) = doc_node_make_take_children("SECTION",(yyvsp[(3) - (5)].str),(yyvsp[(5) - (5)].doc_node)); }
2394 break;
2396 case 29:
2398 /* Line 1806 of yacc.c */
2399 #line 164 "SCDoc.y"
2400 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (2)].id), NULL,(yyvsp[(2) - (2)].doc_node)); }
2401 break;
2403 case 31:
2405 /* Line 1806 of yacc.c */
2406 #line 168 "SCDoc.y"
2407 { (yyval.doc_node) = NULL; }
2408 break;
2410 case 32:
2412 /* Line 1806 of yacc.c */
2413 #line 171 "SCDoc.y"
2414 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2415 break;
2417 case 33:
2419 /* Line 1806 of yacc.c */
2420 #line 172 "SCDoc.y"
2421 { (yyval.doc_node) = doc_node_make("(SUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2422 break;
2424 case 35:
2426 /* Line 1806 of yacc.c */
2427 #line 176 "SCDoc.y"
2428 { (yyval.doc_node) = doc_node_make_take_children("SUBSECTION", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); }
2429 break;
2431 case 37:
2433 /* Line 1806 of yacc.c */
2434 #line 180 "SCDoc.y"
2435 { (yyval.doc_node) = NULL; }
2436 break;
2438 case 38:
2440 /* Line 1806 of yacc.c */
2441 #line 183 "SCDoc.y"
2442 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2443 break;
2445 case 39:
2447 /* Line 1806 of yacc.c */
2448 #line 184 "SCDoc.y"
2449 { (yyval.doc_node) = doc_node_make("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2450 break;
2452 case 40:
2454 /* Line 1806 of yacc.c */
2455 #line 185 "SCDoc.y"
2456 { (yyval.doc_node) = doc_node_make_take_children("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2457 break;
2459 case 41:
2461 /* Line 1806 of yacc.c */
2462 #line 189 "SCDoc.y"
2464 (yyvsp[(2) - (5)].doc_node)->id = "METHODNAMES";
2465 (yyval.doc_node) = doc_node_make(method_type,(yyvsp[(3) - (5)].str),(yyvsp[(2) - (5)].doc_node));
2466 doc_node_add_child((yyval.doc_node), (yyvsp[(5) - (5)].doc_node));
2467 // doc_node_add_child($2, $3);
2469 break;
2471 case 42:
2473 /* Line 1806 of yacc.c */
2474 #line 195 "SCDoc.y"
2475 { (yyval.doc_node) = doc_node_make(
2476 stringEqual(method_type, "CMETHOD") ? "CCOPYMETHOD"
2477 : (stringEqual(method_type, "IMETHOD") ? "ICOPYMETHOD"
2478 : "COPYMETHOD"),
2479 (yyvsp[(2) - (3)].str), NULL
2480 ); }
2481 break;
2483 case 43:
2485 /* Line 1806 of yacc.c */
2486 #line 201 "SCDoc.y"
2487 { (yyval.doc_node) = doc_node_make_take_children( stringEqual(method_type, "CMETHOD") ? "CPRIVATE"
2488 : "IPRIVATE",
2489 NULL, (yyvsp[(2) - (3)].doc_node)); }
2490 break;
2492 case 44:
2494 /* Line 1806 of yacc.c */
2495 #line 206 "SCDoc.y"
2496 { (yyval.str) = NULL; }
2497 break;
2499 case 45:
2501 /* Line 1806 of yacc.c */
2502 #line 208 "SCDoc.y"
2504 // $$ = doc_node_make("ARGSTRING",$1,NULL);
2505 (yyval.str) = (yyvsp[(1) - (1)].str);
2506 if(!stringEqual(method_type, "METHOD")) {
2507 yyerror("METHOD argument string is not allowed inside CLASSMETHODS or INSTANCEMETHODS");
2508 YYERROR;
2511 break;
2513 case 46:
2515 /* Line 1806 of yacc.c */
2516 #line 219 "SCDoc.y"
2518 char *p = (yyvsp[(1) - (1)].str)+strlen((yyvsp[(1) - (1)].str))-1;
2519 if(*p=='_') {
2520 post("WARNING: SCDoc: In %s\n Property setter %s should be documented without underscore.\n", scdoc_current_file, (yyvsp[(1) - (1)].str));
2521 *p = '\0';
2523 (yyval.str) = (yyvsp[(1) - (1)].str);
2525 break;
2527 case 47:
2529 /* Line 1806 of yacc.c */
2530 #line 229 "SCDoc.y"
2531 { 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)); }
2532 break;
2534 case 48:
2536 /* Line 1806 of yacc.c */
2537 #line 230 "SCDoc.y"
2538 { (yyval.doc_node) = doc_node_make("(METHODNAMES)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); }
2539 break;
2541 case 49:
2543 /* Line 1806 of yacc.c */
2544 #line 234 "SCDoc.y"
2546 (yyval.doc_node) = doc_node_make_take_children("METHODBODY",NULL,(yyvsp[(1) - (4)].doc_node));
2547 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (4)].doc_node));
2548 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2549 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2551 break;
2553 case 51:
2555 /* Line 1806 of yacc.c */
2556 #line 243 "SCDoc.y"
2557 { (yyval.doc_node) = NULL; }
2558 break;
2560 case 53:
2562 /* Line 1806 of yacc.c */
2563 #line 247 "SCDoc.y"
2564 { (yyval.doc_node) = NULL; }
2565 break;
2567 case 54:
2569 /* Line 1806 of yacc.c */
2570 #line 250 "SCDoc.y"
2571 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2572 break;
2574 case 55:
2576 /* Line 1806 of yacc.c */
2577 #line 251 "SCDoc.y"
2578 { (yyval.doc_node) = doc_node_make("ARGUMENTS",NULL,(yyvsp[(1) - (1)].doc_node)); }
2579 break;
2581 case 56:
2583 /* Line 1806 of yacc.c */
2584 #line 254 "SCDoc.y"
2585 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); }
2586 break;
2588 case 57:
2590 /* Line 1806 of yacc.c */
2591 #line 255 "SCDoc.y"
2592 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", NULL, (yyvsp[(3) - (3)].doc_node)); }
2593 break;
2595 case 58:
2597 /* Line 1806 of yacc.c */
2598 #line 258 "SCDoc.y"
2599 { (yyval.doc_node) = doc_node_make_take_children("RETURNS",NULL,(yyvsp[(2) - (2)].doc_node)); }
2600 break;
2602 case 59:
2604 /* Line 1806 of yacc.c */
2605 #line 259 "SCDoc.y"
2606 { (yyval.doc_node) = NULL; }
2607 break;
2609 case 60:
2611 /* Line 1806 of yacc.c */
2612 #line 262 "SCDoc.y"
2613 { (yyval.doc_node) = doc_node_make_take_children("DISCUSSION",NULL,(yyvsp[(2) - (2)].doc_node)); }
2614 break;
2616 case 61:
2618 /* Line 1806 of yacc.c */
2619 #line 263 "SCDoc.y"
2620 { (yyval.doc_node) = NULL; }
2621 break;
2623 case 64:
2625 /* Line 1806 of yacc.c */
2626 #line 275 "SCDoc.y"
2627 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2628 break;
2630 case 65:
2632 /* Line 1806 of yacc.c */
2633 #line 276 "SCDoc.y"
2634 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2635 break;
2637 case 66:
2639 /* Line 1806 of yacc.c */
2640 #line 277 "SCDoc.y"
2641 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2642 break;
2644 case 67:
2646 /* Line 1806 of yacc.c */
2647 #line 280 "SCDoc.y"
2648 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2649 break;
2651 case 68:
2653 /* Line 1806 of yacc.c */
2654 #line 281 "SCDoc.y"
2655 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2656 break;
2658 case 69:
2660 /* Line 1806 of yacc.c */
2661 #line 284 "SCDoc.y"
2662 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); }
2663 break;
2665 case 70:
2667 /* Line 1806 of yacc.c */
2668 #line 285 "SCDoc.y"
2669 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); }
2670 break;
2672 case 71:
2674 /* Line 1806 of yacc.c */
2675 #line 286 "SCDoc.y"
2676 { (yyval.doc_node) = doc_node_make_take_children("TABLE",NULL,(yyvsp[(2) - (3)].doc_node)); }
2677 break;
2679 case 72:
2681 /* Line 1806 of yacc.c */
2682 #line 287 "SCDoc.y"
2683 { (yyval.doc_node) = doc_node_make_take_children("DEFINITIONLIST",NULL,(yyvsp[(2) - (3)].doc_node)); }
2684 break;
2686 case 73:
2688 /* Line 1806 of yacc.c */
2689 #line 288 "SCDoc.y"
2690 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); }
2691 break;
2693 case 74:
2695 /* Line 1806 of yacc.c */
2696 #line 289 "SCDoc.y"
2697 { (yyval.doc_node) = doc_node_make("CLASSTREE",(yyvsp[(2) - (3)].str),NULL); }
2698 break;
2700 case 75:
2702 /* Line 1806 of yacc.c */
2703 #line 290 "SCDoc.y"
2704 { (yyval.doc_node) = doc_node_make_take_children("KEYWORD",NULL,(yyvsp[(2) - (3)].doc_node));
2705 // printf("keyword '%s'\n",$2->children[0]->text);
2707 break;
2709 case 76:
2711 /* Line 1806 of yacc.c */
2712 #line 293 "SCDoc.y"
2713 { (yyval.doc_node) = NULL; }
2714 break;
2716 case 77:
2718 /* Line 1806 of yacc.c */
2719 #line 294 "SCDoc.y"
2720 { (yyval.doc_node) = doc_node_make("IMAGE",(yyvsp[(2) - (3)].str),NULL); }
2721 break;
2723 case 78:
2725 /* Line 1806 of yacc.c */
2726 #line 297 "SCDoc.y"
2727 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node), (yyvsp[(2) - (2)].doc_node)); }
2728 break;
2730 case 79:
2732 /* Line 1806 of yacc.c */
2733 #line 298 "SCDoc.y"
2734 { (yyval.doc_node) = doc_node_make("PROSE",NULL,(yyvsp[(1) - (1)].doc_node)); }
2735 break;
2737 case 80:
2739 /* Line 1806 of yacc.c */
2740 #line 301 "SCDoc.y"
2741 { (yyval.doc_node) = doc_node_make(NODE_TEXT,(yyvsp[(1) - (1)].str),NULL); }
2742 break;
2744 case 81:
2746 /* Line 1806 of yacc.c */
2747 #line 302 "SCDoc.y"
2748 { (yyval.doc_node) = doc_node_make("LINK",(yyvsp[(1) - (1)].str),NULL); }
2749 break;
2751 case 82:
2753 /* Line 1806 of yacc.c */
2754 #line 303 "SCDoc.y"
2755 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); }
2756 break;
2758 case 83:
2760 /* Line 1806 of yacc.c */
2761 #line 304 "SCDoc.y"
2762 { (yyval.doc_node) = doc_node_make_take_children("FOOTNOTE",NULL,(yyvsp[(2) - (3)].doc_node)); }
2763 break;
2765 case 84:
2767 /* Line 1806 of yacc.c */
2768 #line 305 "SCDoc.y"
2769 { (yyval.doc_node) = doc_node_create(NODE_NL); }
2770 break;
2772 case 85:
2774 /* Line 1806 of yacc.c */
2775 #line 308 "SCDoc.y"
2776 { (yyval.id) = "LINK"; }
2777 break;
2779 case 86:
2781 /* Line 1806 of yacc.c */
2782 #line 309 "SCDoc.y"
2783 { (yyval.id) = "STRONG"; }
2784 break;
2786 case 87:
2788 /* Line 1806 of yacc.c */
2789 #line 310 "SCDoc.y"
2790 { (yyval.id) = "SOFT"; }
2791 break;
2793 case 88:
2795 /* Line 1806 of yacc.c */
2796 #line 311 "SCDoc.y"
2797 { (yyval.id) = "EMPHASIS"; }
2798 break;
2800 case 89:
2802 /* Line 1806 of yacc.c */
2803 #line 312 "SCDoc.y"
2804 { (yyval.id) = "CODE"; }
2805 break;
2807 case 90:
2809 /* Line 1806 of yacc.c */
2810 #line 313 "SCDoc.y"
2811 { (yyval.id) = "TELETYPE"; }
2812 break;
2814 case 91:
2816 /* Line 1806 of yacc.c */
2817 #line 314 "SCDoc.y"
2818 { (yyval.id) = "MATH"; }
2819 break;
2821 case 92:
2823 /* Line 1806 of yacc.c */
2824 #line 315 "SCDoc.y"
2825 { (yyval.id) = "ANCHOR"; }
2826 break;
2828 case 93:
2830 /* Line 1806 of yacc.c */
2831 #line 318 "SCDoc.y"
2832 { (yyval.id) = "CODEBLOCK"; }
2833 break;
2835 case 94:
2837 /* Line 1806 of yacc.c */
2838 #line 319 "SCDoc.y"
2839 { (yyval.id) = "TELETYPEBLOCK"; }
2840 break;
2842 case 95:
2844 /* Line 1806 of yacc.c */
2845 #line 320 "SCDoc.y"
2846 { (yyval.id) = "MATHBLOCK"; }
2847 break;
2849 case 96:
2851 /* Line 1806 of yacc.c */
2852 #line 323 "SCDoc.y"
2853 { (yyval.id) = "LIST"; }
2854 break;
2856 case 97:
2858 /* Line 1806 of yacc.c */
2859 #line 324 "SCDoc.y"
2860 { (yyval.id) = "TREE"; }
2861 break;
2863 case 98:
2865 /* Line 1806 of yacc.c */
2866 #line 325 "SCDoc.y"
2867 { (yyval.id) = "NUMBEREDLIST"; }
2868 break;
2870 case 99:
2872 /* Line 1806 of yacc.c */
2873 #line 328 "SCDoc.y"
2874 { (yyval.id) = "WARNING"; }
2875 break;
2877 case 100:
2879 /* Line 1806 of yacc.c */
2880 #line 329 "SCDoc.y"
2881 { (yyval.id) = "NOTE"; }
2882 break;
2884 case 101:
2886 /* Line 1806 of yacc.c */
2887 #line 332 "SCDoc.y"
2888 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("ITEM",NULL,(yyvsp[(3) - (3)].doc_node))); }
2889 break;
2891 case 102:
2893 /* Line 1806 of yacc.c */
2894 #line 333 "SCDoc.y"
2895 { (yyval.doc_node) = doc_node_make("(LISTBODY)",NULL, doc_node_make_take_children("ITEM",NULL,(yyvsp[(2) - (2)].doc_node))); }
2896 break;
2898 case 103:
2900 /* Line 1806 of yacc.c */
2901 #line 336 "SCDoc.y"
2902 { (yyval.doc_node) = doc_node_make_take_children("TABROW",NULL,(yyvsp[(2) - (2)].doc_node)); }
2903 break;
2905 case 104:
2907 /* Line 1806 of yacc.c */
2908 #line 339 "SCDoc.y"
2909 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2910 break;
2912 case 105:
2914 /* Line 1806 of yacc.c */
2915 #line 340 "SCDoc.y"
2916 { (yyval.doc_node) = doc_node_make("(TABLEBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2917 break;
2919 case 106:
2921 /* Line 1806 of yacc.c */
2922 #line 343 "SCDoc.y"
2923 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("TABCOL",NULL,(yyvsp[(3) - (3)].doc_node))); }
2924 break;
2926 case 107:
2928 /* Line 1806 of yacc.c */
2929 #line 344 "SCDoc.y"
2930 { (yyval.doc_node) = doc_node_make("(TABLECELLS)",NULL, doc_node_make_take_children("TABCOL",NULL,(yyvsp[(1) - (1)].doc_node))); }
2931 break;
2933 case 108:
2935 /* Line 1806 of yacc.c */
2936 #line 347 "SCDoc.y"
2937 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node),doc_node_make_take_children("TERM",NULL,(yyvsp[(3) - (3)].doc_node))); }
2938 break;
2940 case 109:
2942 /* Line 1806 of yacc.c */
2943 #line 348 "SCDoc.y"
2944 { (yyval.doc_node) = doc_node_make("(TERMS)",NULL,doc_node_make_take_children("TERM",NULL,(yyvsp[(2) - (2)].doc_node))); }
2945 break;
2947 case 110:
2949 /* Line 1806 of yacc.c */
2950 #line 352 "SCDoc.y"
2952 (yyval.doc_node) = doc_node_make_take_children("DEFLISTITEM", NULL, (yyvsp[(1) - (3)].doc_node));
2953 doc_node_add_child((yyval.doc_node), doc_node_make_take_children("DEFINITION", NULL, (yyvsp[(3) - (3)].doc_node)));
2955 break;
2957 case 111:
2959 /* Line 1806 of yacc.c */
2960 #line 358 "SCDoc.y"
2961 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); }
2962 break;
2964 case 112:
2966 /* Line 1806 of yacc.c */
2967 #line 359 "SCDoc.y"
2968 { (yyval.doc_node) = doc_node_make("(DEFLISTBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); }
2969 break;
2971 case 117:
2973 /* Line 1806 of yacc.c */
2974 #line 370 "SCDoc.y"
2975 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); }
2976 break;
2978 case 119:
2980 /* Line 1806 of yacc.c */
2981 #line 374 "SCDoc.y"
2982 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); }
2983 break;
2985 case 126:
2987 /* Line 1806 of yacc.c */
2988 #line 387 "SCDoc.y"
2989 { (yyval.str) = strdup("\n"); }
2990 break;
2992 case 127:
2994 /* Line 1806 of yacc.c */
2995 #line 390 "SCDoc.y"
2996 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); }
2997 break;
2999 case 129:
3001 /* Line 1806 of yacc.c */
3002 #line 394 "SCDoc.y"
3003 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); }
3004 break;
3006 case 130:
3008 /* Line 1806 of yacc.c */
3009 #line 395 "SCDoc.y"
3010 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); }
3011 break;
3013 case 133:
3015 /* Line 1806 of yacc.c */
3016 #line 400 "SCDoc.y"
3017 { 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)); }
3018 break;
3020 case 134:
3022 /* Line 1806 of yacc.c */
3023 #line 401 "SCDoc.y"
3024 { (yyval.doc_node) = doc_node_make("(COMMALIST)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); }
3025 break;
3029 /* Line 1806 of yacc.c */
3030 #line 3031 "SCDoc.tab.cpp"
3031 default: break;
3033 /* User semantic actions sometimes alter yychar, and that requires
3034 that yytoken be updated with the new translation. We take the
3035 approach of translating immediately before every use of yytoken.
3036 One alternative is translating here after every semantic action,
3037 but that translation would be missed if the semantic action invokes
3038 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
3039 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
3040 incorrect destructor might then be invoked immediately. In the
3041 case of YYERROR or YYBACKUP, subsequent parser actions might lead
3042 to an incorrect destructor call or verbose syntax error message
3043 before the lookahead is translated. */
3044 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
3046 YYPOPSTACK (yylen);
3047 yylen = 0;
3048 YY_STACK_PRINT (yyss, yyssp);
3050 *++yyvsp = yyval;
3051 *++yylsp = yyloc;
3053 /* Now `shift' the result of the reduction. Determine what state
3054 that goes to, based on the state we popped back to and the rule
3055 number reduced by. */
3057 yyn = yyr1[yyn];
3059 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3060 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3061 yystate = yytable[yystate];
3062 else
3063 yystate = yydefgoto[yyn - YYNTOKENS];
3065 goto yynewstate;
3068 /*------------------------------------.
3069 | yyerrlab -- here on detecting error |
3070 `------------------------------------*/
3071 yyerrlab:
3072 /* Make sure we have latest lookahead translation. See comments at
3073 user semantic actions for why this is necessary. */
3074 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
3076 /* If not already recovering from an error, report this error. */
3077 if (!yyerrstatus)
3079 ++yynerrs;
3080 #if ! YYERROR_VERBOSE
3081 yyerror (YY_("syntax error"));
3082 #else
3083 # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
3084 yyssp, yytoken)
3086 char const *yymsgp = YY_("syntax error");
3087 int yysyntax_error_status;
3088 yysyntax_error_status = YYSYNTAX_ERROR;
3089 if (yysyntax_error_status == 0)
3090 yymsgp = yymsg;
3091 else if (yysyntax_error_status == 1)
3093 if (yymsg != yymsgbuf)
3094 YYSTACK_FREE (yymsg);
3095 yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc);
3096 if (!yymsg)
3098 yymsg = yymsgbuf;
3099 yymsg_alloc = sizeof yymsgbuf;
3100 yysyntax_error_status = 2;
3102 else
3104 yysyntax_error_status = YYSYNTAX_ERROR;
3105 yymsgp = yymsg;
3108 yyerror (yymsgp);
3109 if (yysyntax_error_status == 2)
3110 goto yyexhaustedlab;
3112 # undef YYSYNTAX_ERROR
3113 #endif
3116 yyerror_range[1] = yylloc;
3118 if (yyerrstatus == 3)
3120 /* If just tried and failed to reuse lookahead token after an
3121 error, discard it. */
3123 if (yychar <= YYEOF)
3125 /* Return failure if at end of input. */
3126 if (yychar == YYEOF)
3127 YYABORT;
3129 else
3131 yydestruct ("Error: discarding",
3132 yytoken, &yylval, &yylloc);
3133 yychar = YYEMPTY;
3137 /* Else will try to reuse lookahead token after shifting the error
3138 token. */
3139 goto yyerrlab1;
3142 /*---------------------------------------------------.
3143 | yyerrorlab -- error raised explicitly by YYERROR. |
3144 `---------------------------------------------------*/
3145 yyerrorlab:
3147 /* Pacify compilers like GCC when the user code never invokes
3148 YYERROR and the label yyerrorlab therefore never appears in user
3149 code. */
3150 if (/*CONSTCOND*/ 0)
3151 goto yyerrorlab;
3153 yyerror_range[1] = yylsp[1-yylen];
3154 /* Do not reclaim the symbols of the rule which action triggered
3155 this YYERROR. */
3156 YYPOPSTACK (yylen);
3157 yylen = 0;
3158 YY_STACK_PRINT (yyss, yyssp);
3159 yystate = *yyssp;
3160 goto yyerrlab1;
3163 /*-------------------------------------------------------------.
3164 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3165 `-------------------------------------------------------------*/
3166 yyerrlab1:
3167 yyerrstatus = 3; /* Each real token shifted decrements this. */
3169 for (;;)
3171 yyn = yypact[yystate];
3172 if (!yypact_value_is_default (yyn))
3174 yyn += YYTERROR;
3175 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3177 yyn = yytable[yyn];
3178 if (0 < yyn)
3179 break;
3183 /* Pop the current state because it cannot handle the error token. */
3184 if (yyssp == yyss)
3185 YYABORT;
3187 yyerror_range[1] = *yylsp;
3188 yydestruct ("Error: popping",
3189 yystos[yystate], yyvsp, yylsp);
3190 YYPOPSTACK (1);
3191 yystate = *yyssp;
3192 YY_STACK_PRINT (yyss, yyssp);
3195 *++yyvsp = yylval;
3197 yyerror_range[2] = yylloc;
3198 /* Using YYLLOC is tempting, but would change the location of
3199 the lookahead. YYLOC is available though. */
3200 YYLLOC_DEFAULT (yyloc, yyerror_range, 2);
3201 *++yylsp = yyloc;
3203 /* Shift the error token. */
3204 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3206 yystate = yyn;
3207 goto yynewstate;
3210 /*-------------------------------------.
3211 | yyacceptlab -- YYACCEPT comes here. |
3212 `-------------------------------------*/
3213 yyacceptlab:
3214 yyresult = 0;
3215 goto yyreturn;
3217 /*-----------------------------------.
3218 | yyabortlab -- YYABORT comes here. |
3219 `-----------------------------------*/
3220 yyabortlab:
3221 yyresult = 1;
3222 goto yyreturn;
3224 #if !defined(yyoverflow) || YYERROR_VERBOSE
3225 /*-------------------------------------------------.
3226 | yyexhaustedlab -- memory exhaustion comes here. |
3227 `-------------------------------------------------*/
3228 yyexhaustedlab:
3229 yyerror (YY_("memory exhausted"));
3230 yyresult = 2;
3231 /* Fall through. */
3232 #endif
3234 yyreturn:
3235 if (yychar != YYEMPTY)
3237 /* Make sure we have latest lookahead translation. See comments at
3238 user semantic actions for why this is necessary. */
3239 yytoken = YYTRANSLATE (yychar);
3240 yydestruct ("Cleanup: discarding lookahead",
3241 yytoken, &yylval, &yylloc);
3243 /* Do not reclaim the symbols of the rule which action triggered
3244 this YYABORT or YYACCEPT. */
3245 YYPOPSTACK (yylen);
3246 YY_STACK_PRINT (yyss, yyssp);
3247 while (yyssp != yyss)
3249 yydestruct ("Cleanup: popping",
3250 yystos[*yyssp], yyvsp, yylsp);
3251 YYPOPSTACK (1);
3253 #ifndef yyoverflow
3254 if (yyss != yyssa)
3255 YYSTACK_FREE (yyss);
3256 #endif
3257 #if YYERROR_VERBOSE
3258 if (yymsg != yymsgbuf)
3259 YYSTACK_FREE (yymsg);
3260 #endif
3261 /* Make sure YYID is used. */
3262 return YYID (yyresult);
3267 /* Line 2067 of yacc.c */
3268 #line 404 "SCDoc.y"
3271 DocNode * scdoc_parse_run(int mode) {
3272 int modes[] = {START_FULL, START_PARTIAL, START_METADATA};
3273 if(mode<0 || mode>=sizeof(modes)) {
3274 error("scdoc_parse_run(): unknown mode: %d\n",mode);
3276 scdoc_start_token = modes[mode];
3277 /* scdoc_start_token = START_FULL;
3278 scdoc_metadata_mode = 0;
3279 if(mode==SCDOC_PARSE_PARTIAL) {
3280 scdoc_start_token = START_PARTIAL;
3281 } else
3282 if(mode==SCDOC_PARSE_METADATA) {
3283 scdoc_metadata_mode = 1;
3285 topnode = NULL;
3286 method_type = "METHOD";
3287 if(scdocparse()!=0) {
3288 return NULL;
3290 return topnode;
3293 void scdocerror(const char *str)
3295 error("In %s:\n At line %d: %s\n\n",scdoc_current_file,scdoclineno,str);
3297 /* FIXME: this does not work well, since the reported linenumber is often *after* the actual error line
3298 fseek(scdocin, 0, SEEK_SET);
3299 int line = 1;
3300 char buf[256],*txt;
3301 while(line!=scdoclineno && !feof(scdocin)) {
3302 int c = fgetc(scdocin);
3303 if(c=='\n') line++;
3305 txt = fgets(buf, 256, scdocin);
3306 if(txt)
3307 fprintf(stderr," %s\n-------------------\n", txt);