Cannot use indentation for CMAKE example - on mac it is rendered as
[supercollider.git] / SCDoc / SCDoc.tab.cpp
blob7cf50acf9821f5fd4eea3b5081a67e910eb002d8
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. */
46 #define YYBISON 1
48 /* Bison version. */
49 #define YYBISON_VERSION "2.4.1"
51 /* Skeleton name. */
52 #define YYSKELETON_NAME "yacc.c"
54 /* Pure parsers. */
55 #define YYPURE 0
57 /* Push parsers. */
58 #define YYPUSH 0
60 /* Pull parsers. */
61 #define YYPULL 1
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 */
79 #line 1 "SCDoc.y"
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 ************************************************************************/
100 #include <stdio.h>
101 #include <string.h>
102 #include <stdlib.h>
103 #include "SCDoc.h"
105 //#define YYLEX_PARAM &yylval, &yylloc
107 int scdocparse();
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. */
132 #ifndef YYDEBUG
133 # define YYDEBUG 0
134 #endif
136 /* Enabling verbose error messages. */
137 #ifdef YYERROR_VERBOSE
138 # undef YYERROR_VERBOSE
139 # define YYERROR_VERBOSE 1
140 #else
141 # define YYERROR_VERBOSE 1
142 #endif
144 /* Enabling the token table. */
145 #ifndef YYTOKEN_TABLE
146 # define YYTOKEN_TABLE 0
147 #endif
150 /* Tokens. */
151 #ifndef YYTOKENTYPE
152 # define YYTOKENTYPE
153 /* Put the tokens into the symbol table, so that GDB and other debuggers
154 know about them. */
155 enum yytokentype {
156 END = 0,
157 CLASS = 258,
158 TITLE = 259,
159 SUMMARY = 260,
160 RELATED = 261,
161 CATEGORIES = 262,
162 REDIRECT = 263,
163 CLASSTREE = 264,
164 COPYMETHOD = 265,
165 KEYWORD = 266,
166 PRIVATE = 267,
167 SECTION = 268,
168 SUBSECTION = 269,
169 METHOD = 270,
170 ARGUMENT = 271,
171 DESCRIPTION = 272,
172 CLASSMETHODS = 273,
173 INSTANCEMETHODS = 274,
174 EXAMPLES = 275,
175 RETURNS = 276,
176 DISCUSSION = 277,
177 LIST = 278,
178 TREE = 279,
179 NUMBEREDLIST = 280,
180 DEFINITIONLIST = 281,
181 TABLE = 282,
182 FOOTNOTE = 283,
183 NOTE = 284,
184 WARNING = 285,
185 CODE = 286,
186 LINK = 287,
187 ANCHOR = 288,
188 SOFT = 289,
189 IMAGE = 290,
190 TELETYPE = 291,
191 MATH = 292,
192 STRONG = 293,
193 EMPHASIS = 294,
194 CODEBLOCK = 295,
195 TELETYPEBLOCK = 296,
196 MATHBLOCK = 297,
197 TAGSYM = 298,
198 BARS = 299,
199 HASHES = 300,
200 TEXT = 301,
201 URL = 302,
202 COMMA = 303,
203 METHODNAME = 304,
204 METHODARGS = 305,
205 NEWLINE = 306,
206 EMPTYLINES = 307,
207 BAD_METHODNAME = 308,
208 START_FULL = 309,
209 START_PARTIAL = 310,
210 START_METADATA = 311
212 #endif
216 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
217 typedef union YYSTYPE
220 /* Line 214 of yacc.c */
221 #line 50 "SCDoc.y"
223 int i;
224 const char *id;
225 char *str;
226 DocNode *doc_node;
230 /* Line 214 of yacc.c */
231 #line 232 "SCDoc.tab.cpp"
232 } YYSTYPE;
233 # define YYSTYPE_IS_TRIVIAL 1
234 # define yystype YYSTYPE /* obsolescent; will be withdrawn */
235 # define YYSTYPE_IS_DECLARED 1
236 #endif
238 #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
239 typedef struct YYLTYPE
241 int first_line;
242 int first_column;
243 int last_line;
244 int last_column;
245 } YYLTYPE;
246 # define yyltype YYLTYPE /* obsolescent; will be withdrawn */
247 # define YYLTYPE_IS_DECLARED 1
248 # define YYLTYPE_IS_TRIVIAL 1
249 #endif
252 /* Copy the second part of user declarations. */
254 /* Line 264 of yacc.c */
255 #line 95 "SCDoc.y"
257 //int scdoclex (YYSTYPE * yylval_param, struct YYLTYPE * yylloc_param );
258 int scdoclex (void);
261 /* Line 264 of yacc.c */
262 #line 263 "SCDoc.tab.cpp"
264 #ifdef short
265 # undef short
266 #endif
268 #ifdef YYTYPE_UINT8
269 typedef YYTYPE_UINT8 yytype_uint8;
270 #else
271 typedef unsigned char yytype_uint8;
272 #endif
274 #ifdef YYTYPE_INT8
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;
279 #else
280 typedef short int yytype_int8;
281 #endif
283 #ifdef YYTYPE_UINT16
284 typedef YYTYPE_UINT16 yytype_uint16;
285 #else
286 typedef unsigned short int yytype_uint16;
287 #endif
289 #ifdef YYTYPE_INT16
290 typedef YYTYPE_INT16 yytype_int16;
291 #else
292 typedef short int yytype_int16;
293 #endif
295 #ifndef YYSIZE_T
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
304 # else
305 # define YYSIZE_T unsigned int
306 # endif
307 #endif
309 #define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
311 #ifndef YY_
312 # if YYENABLE_NLS
313 # if ENABLE_NLS
314 # include <libintl.h> /* INFRINGES ON USER NAME SPACE */
315 # define YY_(msgid) dgettext ("bison-runtime", msgid)
316 # endif
317 # endif
318 # ifndef YY_
319 # define YY_(msgid) msgid
320 # endif
321 #endif
323 /* Suppress unused-variable warnings by "using" E. */
324 #if ! defined lint || defined __GNUC__
325 # define YYUSE(e) ((void) (e))
326 #else
327 # define YYUSE(e) /* empty */
328 #endif
330 /* Identity function, used to suppress warnings about constant conditions. */
331 #ifndef lint
332 # define YYID(n) (n)
333 #else
334 #if (defined __STDC__ || defined __C99__FUNC__ \
335 || defined __cplusplus || defined _MSC_VER)
336 static int
337 YYID (int yyi)
338 #else
339 static int
340 YYID (yyi)
341 int yyi;
342 #endif
344 return yyi;
346 #endif
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
354 # ifdef __GNUC__
355 # define YYSTACK_ALLOC __builtin_alloca
356 # elif defined __BUILTIN_VA_ARG_INCR
357 # include <alloca.h> /* INFRINGES ON USER NAME SPACE */
358 # elif defined _AIX
359 # define YYSTACK_ALLOC __alloca
360 # elif defined _MSC_VER
361 # include <malloc.h> /* INFRINGES ON USER NAME SPACE */
362 # define alloca _alloca
363 # else
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 */
368 # ifndef _STDLIB_H
369 # define _STDLIB_H 1
370 # endif
371 # endif
372 # endif
373 # endif
374 # endif
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 */
385 # endif
386 # else
387 # define YYSTACK_ALLOC YYMALLOC
388 # define YYSTACK_FREE YYFREE
389 # ifndef YYSTACK_ALLOC_MAXIMUM
390 # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
391 # endif
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 */
396 # ifndef _STDLIB_H
397 # define _STDLIB_H 1
398 # endif
399 # endif
400 # ifndef YYMALLOC
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 */
405 # endif
406 # endif
407 # ifndef YYFREE
408 # define YYFREE free
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 */
412 # endif
413 # endif
414 # endif
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. */
424 union yyalloc
426 yytype_int16 yyss_alloc;
427 YYSTYPE yyvs_alloc;
428 YYLTYPE yyls_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
435 N elements. */
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
441 not overlap. */
442 # ifndef YYCOPY
443 # if defined __GNUC__ && 1 < __GNUC__
444 # define YYCOPY(To, From, Count) \
445 __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
446 # else
447 # define YYCOPY(To, From, Count) \
448 do \
450 YYSIZE_T yyi; \
451 for (yyi = 0; yyi < (Count); yyi++) \
452 (To)[yyi] = (From)[yyi]; \
454 while (YYID (0))
455 # endif
456 # endif
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
462 stack. */
463 # define YYSTACK_RELOCATE(Stack_alloc, Stack) \
464 do \
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); \
472 while (YYID (0))
474 #endif
476 /* YYFINAL -- State number of the termination state. */
477 #define YYFINAL 71
478 /* YYLAST -- Last index in YYTABLE. */
479 #define YYLAST 445
481 /* YYNTOKENS -- Number of terminals. */
482 #define YYNTOKENS 57
483 /* YYNNTS -- Number of nonterminals. */
484 #define YYNNTS 54
485 /* YYNRULES -- Number of rules. */
486 #define YYNRULES 133
487 /* YYNRULES -- Number of states. */
488 #define YYNSTATES 192
490 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
491 #define YYUNDEFTOK 2
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,
531 55, 56
534 #if YYDEBUG
535 /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
536 YYRHS. */
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, 329, 331, 334,
552 337, 339, 341, 345
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, 110, 106, -1, 6, 110, 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, 110, 106, -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, 108, 43, -1, 9, 104, 106, -1,
578 11, 110, 106, -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 0, -1, 103, -1, 106, -1, 108, 107, -1, 107,
591 -1, 109, 46, -1, 109, 47, -1, 46, -1, 47,
592 -1, 110, 48, 109, -1, 109, -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, 371, 374, 375, 378, 379, 382, 383,
611 384, 385, 388, 389
613 #endif
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", "anywordnl", "wordsnl",
640 "nocommawords", "commalist", 0
642 #endif
644 # ifdef YYPRINT
645 /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
646 token YYLEX-NUM. */
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
656 # endif
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, 106, 107, 107, 108, 108, 109, 109,
674 109, 109, 110, 110
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, 2, 1, 2, 2,
693 1, 1, 3, 1
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, 123, 121, 122, 0,
702 7, 0, 0, 0, 0, 27, 0, 20, 18, 19,
703 21, 96, 97, 98, 0, 0, 0, 100, 99, 89,
704 85, 92, 87, 0, 90, 91, 86, 88, 93, 94,
705 95, 115, 81, 116, 84, 76, 31, 5, 25, 26,
706 39, 40, 62, 63, 66, 68, 79, 0, 0, 0,
707 0, 80, 14, 15, 16, 0, 0, 17, 23, 10,
708 0, 1, 3, 23, 118, 0, 0, 130, 131, 133,
709 0, 0, 0, 46, 48, 44, 0, 0, 112, 0,
710 51, 105, 0, 0, 114, 120, 113, 0, 0, 29,
711 30, 33, 34, 24, 38, 65, 67, 64, 78, 0,
712 124, 125, 127, 0, 0, 0, 0, 0, 0, 9,
713 6, 22, 0, 4, 117, 74, 42, 128, 129, 0,
714 75, 43, 0, 0, 45, 0, 109, 51, 0, 72,
715 111, 107, 50, 103, 71, 104, 83, 77, 119, 0,
716 32, 82, 73, 126, 102, 70, 0, 69, 13, 12,
717 11, 132, 31, 47, 51, 110, 108, 51, 37, 101,
718 28, 41, 53, 106, 35, 36, 0, 59, 52, 55,
719 0, 0, 0, 61, 54, 51, 57, 58, 0, 49,
720 56, 60
723 /* YYDEFGOTO[NTERM-NUM]. */
724 static const yytype_int16 yydefgoto[] =
726 -1, 4, 5, 9, 68, 69, 70, 46, 120, 121,
727 48, 82, 99, 100, 101, 174, 49, 50, 135, 84,
728 85, 171, 141, 177, 178, 179, 183, 189, 51, 52,
729 53, 54, 55, 56, 57, 58, 59, 60, 115, 91,
730 92, 143, 87, 88, 89, 95, 61, 75, 97, 111,
731 112, 113, 79, 80
734 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
735 STATE-NUM. */
736 #define YYPACT_NINF -113
737 static const yytype_int16 yypact[] =
739 64, 18, 221, 101, 8, 31, -113, -113, -113, 101,
740 -113, -34, -34, 96, 96, -113, -14, -113, -113, -113,
741 -113, -113, -113, -113, 1, 5, 343, -113, -113, -113,
742 -113, -113, -113, 78, -113, -113, -113, -113, -113, -113,
743 -113, -113, -113, -113, -113, -113, 265, 2, -113, 24,
744 -113, -113, 343, 377, -113, 394, -113, -34, 38, 9,
745 343, -113, -113, -113, -113, 96, 96, -113, 177, -113,
746 78, -113, -113, 177, -113, 38, 38, -113, -113, 99,
747 44, 44, 78, -113, -113, 50, 343, 105, -113, 68,
748 343, -113, 85, -32, -113, -113, -113, -19, 78, -113,
749 12, -113, 24, -113, -113, -113, 394, -113, -113, -3,
750 -113, -113, -113, 10, 343, 92, 14, 44, 44, -113,
751 -113, 2, 30, -113, -113, -113, -113, -113, -113, 96,
752 -113, -113, 30, -14, -113, 18, -113, 343, 343, -113,
753 -113, -113, -113, 27, -113, -113, -113, -113, -113, 30,
754 -113, -113, -113, -113, -113, -113, 343, -113, -113, -113,
755 -113, 99, 265, -113, 343, -113, -113, 343, 309, -113,
756 -113, -113, 69, -113, -113, 24, 38, 80, 69, -113,
757 38, 343, 343, 88, -113, 343, -113, -113, 343, -113,
758 -113, -113
761 /* YYPGOTO[NTERM-NUM]. */
762 static const yytype_int16 yypgoto[] =
764 -113, -113, -113, -113, 118, 29, -113, -113, 63, 136,
765 -38, -113, -22, -113, 47, -113, -39, -43, -113, 21,
766 -113, -113, -112, -113, -113, -27, -113, -113, -23, -113,
767 -113, 100, 103, -42, -113, -113, -113, -113, -113, 65,
768 -113, -113, -113, 67, -113, -81, -10, -8, -65, -1,
769 48, -113, 34, 28
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 10, 74, 74, 93, 76, 122, 104, 102, 71, 103,
780 6, 146, 41, 108, 43, 15, 148, 132, 6, 17,
781 18, 19, 20, 96, 147, 165, 98, 41, 94, 43,
782 6, -2, 72, 149, 12, 83, 14, 116, 6, 16,
783 151, 148, 81, 41, 6, 43, 86, 74, 110, 109,
784 90, 148, 172, 152, 114, 173, 41, 157, 43, 104,
785 96, 7, 8, 136, 108, 124, 124, 142, 148, 7,
786 8, 167, 96, 190, 125, 126, 41, 94, 43, 130,
787 131, 7, 8, 103, 41, 176, 43, 96, 96, 7,
788 8, 154, 129, 117, 118, 7, 8, 119, 133, 124,
789 134, 182, 119, 110, 62, 63, 64, 65, 66, 67,
790 188, 139, 96, 86, 142, 166, 158, 159, 1, 2,
791 3, 160, 96, 102, 41, 94, 43, 73, 144, 175,
792 90, 162, 104, 169, 164, 155, 123, 156, 47, 96,
793 170, 142, 77, 78, 142, 127, 128, 150, 168, 137,
794 138, 184, 105, 107, 163, 106, 140, 145, 186, 187,
795 0, 153, 142, 161, 0, 191, 74, 0, 180, 0,
796 124, 0, 0, 0, 0, 181, 0, 0, 0, 185,
797 62, 63, 64, 65, 66, 67, 11, 12, 13, 14,
798 15, 0, 16, 0, 17, 18, 19, 20, 0, 0,
799 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
800 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
801 0, 0, 0, 41, 42, 43, 0, 0, 44, 45,
802 11, 12, 13, 14, 15, 0, 16, 0, 17, 18,
803 19, 20, 0, 0, 21, 22, 23, 24, 25, 26,
804 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
805 37, 38, 39, 40, 0, 0, 0, 41, 42, 43,
806 0, 0, 44, 45, 11, 12, 13, 14, 0, 98,
807 16, 0, 0, 0, 0, 0, 0, 0, 21, 22,
808 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
809 33, 34, 35, 36, 37, 38, 39, 40, 0, 0,
810 0, 41, 42, 43, 0, 0, 44, 45, 11, 12,
811 13, 14, 0, 0, 16, 0, 0, 0, 0, 0,
812 0, 0, 21, 22, 23, 24, 25, 26, 27, 28,
813 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
814 39, 40, 11, 0, 13, 41, 42, 43, 0, 0,
815 44, 45, 0, 0, 0, 0, 21, 22, 23, 24,
816 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
817 35, 36, 37, 38, 39, 40, 11, 0, 13, 41,
818 42, 43, 0, 0, 44, 45, 0, 0, 0, 0,
819 21, 22, 23, 24, 25, 0, 27, 28, 0, 0,
820 0, 0, 33, 0, 0, 0, 0, 38, 39, 40,
821 0, 0, 26, 0, 0, 29, 30, 31, 32, 45,
822 34, 35, 36, 37, 0, 0, 0, 0, 0, 0,
823 41, 42, 43, 0, 0, 44
826 static const yytype_int16 yycheck[] =
828 1, 11, 12, 26, 12, 70, 49, 46, 0, 47,
829 0, 43, 46, 55, 48, 13, 97, 82, 0, 17,
830 18, 19, 20, 33, 43, 137, 14, 46, 47, 48,
831 0, 0, 1, 98, 10, 49, 12, 60, 0, 15,
832 43, 122, 14, 46, 0, 48, 45, 57, 58, 57,
833 45, 132, 164, 43, 45, 167, 46, 43, 48, 102,
834 70, 51, 52, 86, 106, 75, 76, 90, 149, 51,
835 52, 44, 82, 185, 75, 76, 46, 47, 48, 80,
836 81, 51, 52, 121, 46, 16, 48, 97, 98, 51,
837 52, 114, 48, 65, 66, 51, 52, 68, 48, 109,
838 50, 21, 73, 113, 3, 4, 5, 6, 7, 8,
839 22, 43, 122, 45, 137, 138, 117, 118, 54, 55,
840 56, 122, 132, 162, 46, 47, 48, 9, 43, 168,
841 45, 132, 175, 156, 135, 43, 73, 45, 2, 149,
842 162, 164, 46, 47, 167, 46, 47, 100, 149, 44,
843 45, 178, 52, 53, 133, 52, 89, 92, 181, 182,
844 -1, 113, 185, 129, -1, 188, 176, -1, 176, -1,
845 180, -1, -1, -1, -1, 176, -1, -1, -1, 180,
846 3, 4, 5, 6, 7, 8, 9, 10, 11, 12,
847 13, -1, 15, -1, 17, 18, 19, 20, -1, -1,
848 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
849 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
850 -1, -1, -1, 46, 47, 48, -1, -1, 51, 52,
851 9, 10, 11, 12, 13, -1, 15, -1, 17, 18,
852 19, 20, -1, -1, 23, 24, 25, 26, 27, 28,
853 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
854 39, 40, 41, 42, -1, -1, -1, 46, 47, 48,
855 -1, -1, 51, 52, 9, 10, 11, 12, -1, 14,
856 15, -1, -1, -1, -1, -1, -1, -1, 23, 24,
857 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
858 35, 36, 37, 38, 39, 40, 41, 42, -1, -1,
859 -1, 46, 47, 48, -1, -1, 51, 52, 9, 10,
860 11, 12, -1, -1, 15, -1, -1, -1, -1, -1,
861 -1, -1, 23, 24, 25, 26, 27, 28, 29, 30,
862 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
863 41, 42, 9, -1, 11, 46, 47, 48, -1, -1,
864 51, 52, -1, -1, -1, -1, 23, 24, 25, 26,
865 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
866 37, 38, 39, 40, 41, 42, 9, -1, 11, 46,
867 47, 48, -1, -1, 51, 52, -1, -1, -1, -1,
868 23, 24, 25, 26, 27, -1, 29, 30, -1, -1,
869 -1, -1, 35, -1, -1, -1, -1, 40, 41, 42,
870 -1, -1, 28, -1, -1, 31, 32, 33, 34, 52,
871 36, 37, 38, 39, -1, -1, -1, -1, -1, -1,
872 46, 47, 48, -1, -1, 51
875 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
876 symbol of state STATE-NUM. */
877 static const yytype_uint8 yystos[] =
879 0, 54, 55, 56, 58, 59, 0, 51, 52, 60,
880 106, 9, 10, 11, 12, 13, 15, 17, 18, 19,
881 20, 23, 24, 25, 26, 27, 28, 29, 30, 31,
882 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
883 42, 46, 47, 48, 51, 52, 64, 66, 67, 73,
884 74, 85, 86, 87, 88, 89, 90, 91, 92, 93,
885 94, 103, 3, 4, 5, 6, 7, 8, 61, 62,
886 63, 0, 1, 61, 103, 104, 104, 46, 47, 109,
887 110, 110, 68, 49, 76, 77, 45, 99, 100, 101,
888 45, 96, 97, 85, 47, 102, 103, 105, 14, 69,
889 70, 71, 73, 67, 74, 88, 89, 88, 90, 104,
890 103, 106, 107, 108, 45, 95, 85, 110, 110, 62,
891 65, 66, 105, 65, 103, 106, 106, 46, 47, 48,
892 106, 106, 105, 48, 50, 75, 85, 44, 45, 43,
893 100, 79, 85, 98, 43, 96, 43, 43, 102, 105,
894 71, 43, 43, 107, 85, 43, 45, 43, 106, 106,
895 106, 109, 106, 76, 106, 79, 85, 44, 106, 85,
896 69, 78, 79, 79, 72, 73, 16, 80, 81, 82,
897 104, 106, 21, 83, 82, 106, 85, 85, 22, 84,
898 79, 85
901 #define yyerrok (yyerrstatus = 0)
902 #define yyclearin (yychar = YYEMPTY)
903 #define YYEMPTY (-2)
904 #define YYEOF 0
906 #define YYACCEPT goto yyacceptlab
907 #define YYABORT goto yyabortlab
908 #define YYERROR goto yyerrorlab
911 /* Like YYERROR except do call yyerror. This remains here temporarily
912 to ease the transition to the new meaning of YYERROR, for GCC.
913 Once GCC version 2 has supplanted version 1, this can go. */
915 #define YYFAIL goto yyerrlab
917 #define YYRECOVERING() (!!yyerrstatus)
919 #define YYBACKUP(Token, Value) \
920 do \
921 if (yychar == YYEMPTY && yylen == 1) \
923 yychar = (Token); \
924 yylval = (Value); \
925 yytoken = YYTRANSLATE (yychar); \
926 YYPOPSTACK (1); \
927 goto yybackup; \
929 else \
931 yyerror (YY_("syntax error: cannot back up")); \
932 YYERROR; \
934 while (YYID (0))
937 #define YYTERROR 1
938 #define YYERRCODE 256
941 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
942 If N is 0, then set CURRENT to the empty location which ends
943 the previous symbol: RHS[0] (always defined). */
945 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
946 #ifndef YYLLOC_DEFAULT
947 # define YYLLOC_DEFAULT(Current, Rhs, N) \
948 do \
949 if (YYID (N)) \
951 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
952 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
953 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
954 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
956 else \
958 (Current).first_line = (Current).last_line = \
959 YYRHSLOC (Rhs, 0).last_line; \
960 (Current).first_column = (Current).last_column = \
961 YYRHSLOC (Rhs, 0).last_column; \
963 while (YYID (0))
964 #endif
967 /* YY_LOCATION_PRINT -- Print the location on the stream.
968 This macro was not mandated originally: define only if we know
969 we won't break user code: when these are the locations we know. */
971 #ifndef YY_LOCATION_PRINT
972 # if YYLTYPE_IS_TRIVIAL
973 # define YY_LOCATION_PRINT(File, Loc) \
974 fprintf (File, "%d.%d-%d.%d", \
975 (Loc).first_line, (Loc).first_column, \
976 (Loc).last_line, (Loc).last_column)
977 # else
978 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
979 # endif
980 #endif
983 /* YYLEX -- calling `yylex' with the right arguments. */
985 #ifdef YYLEX_PARAM
986 # define YYLEX yylex (YYLEX_PARAM)
987 #else
988 # define YYLEX yylex ()
989 #endif
991 /* Enable debugging if requested. */
992 #if YYDEBUG
994 # ifndef YYFPRINTF
995 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
996 # define YYFPRINTF fprintf
997 # endif
999 # define YYDPRINTF(Args) \
1000 do { \
1001 if (yydebug) \
1002 YYFPRINTF Args; \
1003 } while (YYID (0))
1005 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1006 do { \
1007 if (yydebug) \
1009 YYFPRINTF (stderr, "%s ", Title); \
1010 yy_symbol_print (stderr, \
1011 Type, Value, Location); \
1012 YYFPRINTF (stderr, "\n"); \
1014 } while (YYID (0))
1017 /*--------------------------------.
1018 | Print this symbol on YYOUTPUT. |
1019 `--------------------------------*/
1021 /*ARGSUSED*/
1022 #if (defined __STDC__ || defined __C99__FUNC__ \
1023 || defined __cplusplus || defined _MSC_VER)
1024 static void
1025 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1026 #else
1027 static void
1028 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
1029 FILE *yyoutput;
1030 int yytype;
1031 YYSTYPE const * const yyvaluep;
1032 YYLTYPE const * const yylocationp;
1033 #endif
1035 if (!yyvaluep)
1036 return;
1037 YYUSE (yylocationp);
1038 # ifdef YYPRINT
1039 if (yytype < YYNTOKENS)
1040 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1041 # else
1042 YYUSE (yyoutput);
1043 # endif
1044 switch (yytype)
1046 default:
1047 break;
1052 /*--------------------------------.
1053 | Print this symbol on YYOUTPUT. |
1054 `--------------------------------*/
1056 #if (defined __STDC__ || defined __C99__FUNC__ \
1057 || defined __cplusplus || defined _MSC_VER)
1058 static void
1059 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1060 #else
1061 static void
1062 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
1063 FILE *yyoutput;
1064 int yytype;
1065 YYSTYPE const * const yyvaluep;
1066 YYLTYPE const * const yylocationp;
1067 #endif
1069 if (yytype < YYNTOKENS)
1070 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1071 else
1072 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1074 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1075 YYFPRINTF (yyoutput, ": ");
1076 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
1077 YYFPRINTF (yyoutput, ")");
1080 /*------------------------------------------------------------------.
1081 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1082 | TOP (included). |
1083 `------------------------------------------------------------------*/
1085 #if (defined __STDC__ || defined __C99__FUNC__ \
1086 || defined __cplusplus || defined _MSC_VER)
1087 static void
1088 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1089 #else
1090 static void
1091 yy_stack_print (yybottom, yytop)
1092 yytype_int16 *yybottom;
1093 yytype_int16 *yytop;
1094 #endif
1096 YYFPRINTF (stderr, "Stack now");
1097 for (; yybottom <= yytop; yybottom++)
1099 int yybot = *yybottom;
1100 YYFPRINTF (stderr, " %d", yybot);
1102 YYFPRINTF (stderr, "\n");
1105 # define YY_STACK_PRINT(Bottom, Top) \
1106 do { \
1107 if (yydebug) \
1108 yy_stack_print ((Bottom), (Top)); \
1109 } while (YYID (0))
1112 /*------------------------------------------------.
1113 | Report that the YYRULE is going to be reduced. |
1114 `------------------------------------------------*/
1116 #if (defined __STDC__ || defined __C99__FUNC__ \
1117 || defined __cplusplus || defined _MSC_VER)
1118 static void
1119 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
1120 #else
1121 static void
1122 yy_reduce_print (yyvsp, yylsp, yyrule)
1123 YYSTYPE *yyvsp;
1124 YYLTYPE *yylsp;
1125 int yyrule;
1126 #endif
1128 int yynrhs = yyr2[yyrule];
1129 int yyi;
1130 unsigned long int yylno = yyrline[yyrule];
1131 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1132 yyrule - 1, yylno);
1133 /* The symbols being reduced. */
1134 for (yyi = 0; yyi < yynrhs; yyi++)
1136 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1137 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1138 &(yyvsp[(yyi + 1) - (yynrhs)])
1139 , &(yylsp[(yyi + 1) - (yynrhs)]) );
1140 YYFPRINTF (stderr, "\n");
1144 # define YY_REDUCE_PRINT(Rule) \
1145 do { \
1146 if (yydebug) \
1147 yy_reduce_print (yyvsp, yylsp, Rule); \
1148 } while (YYID (0))
1150 /* Nonzero means print parse trace. It is left uninitialized so that
1151 multiple parsers can coexist. */
1152 int yydebug;
1153 #else /* !YYDEBUG */
1154 # define YYDPRINTF(Args)
1155 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1156 # define YY_STACK_PRINT(Bottom, Top)
1157 # define YY_REDUCE_PRINT(Rule)
1158 #endif /* !YYDEBUG */
1161 /* YYINITDEPTH -- initial size of the parser's stacks. */
1162 #ifndef YYINITDEPTH
1163 # define YYINITDEPTH 200
1164 #endif
1166 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1167 if the built-in stack extension method is used).
1169 Do not make this value too large; the results are undefined if
1170 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1171 evaluated with infinite-precision integer arithmetic. */
1173 #ifndef YYMAXDEPTH
1174 # define YYMAXDEPTH 10000
1175 #endif
1179 #if YYERROR_VERBOSE
1181 # ifndef yystrlen
1182 # if defined __GLIBC__ && defined _STRING_H
1183 # define yystrlen strlen
1184 # else
1185 /* Return the length of YYSTR. */
1186 #if (defined __STDC__ || defined __C99__FUNC__ \
1187 || defined __cplusplus || defined _MSC_VER)
1188 static YYSIZE_T
1189 yystrlen (const char *yystr)
1190 #else
1191 static YYSIZE_T
1192 yystrlen (yystr)
1193 const char *yystr;
1194 #endif
1196 YYSIZE_T yylen;
1197 for (yylen = 0; yystr[yylen]; yylen++)
1198 continue;
1199 return yylen;
1201 # endif
1202 # endif
1204 # ifndef yystpcpy
1205 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1206 # define yystpcpy stpcpy
1207 # else
1208 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1209 YYDEST. */
1210 #if (defined __STDC__ || defined __C99__FUNC__ \
1211 || defined __cplusplus || defined _MSC_VER)
1212 static char *
1213 yystpcpy (char *yydest, const char *yysrc)
1214 #else
1215 static char *
1216 yystpcpy (yydest, yysrc)
1217 char *yydest;
1218 const char *yysrc;
1219 #endif
1221 char *yyd = yydest;
1222 const char *yys = yysrc;
1224 while ((*yyd++ = *yys++) != '\0')
1225 continue;
1227 return yyd - 1;
1229 # endif
1230 # endif
1232 # ifndef yytnamerr
1233 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1234 quotes and backslashes, so that it's suitable for yyerror. The
1235 heuristic is that double-quoting is unnecessary unless the string
1236 contains an apostrophe, a comma, or backslash (other than
1237 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1238 null, do not copy; instead, return the length of what the result
1239 would have been. */
1240 static YYSIZE_T
1241 yytnamerr (char *yyres, const char *yystr)
1243 if (*yystr == '"')
1245 YYSIZE_T yyn = 0;
1246 char const *yyp = yystr;
1248 for (;;)
1249 switch (*++yyp)
1251 case '\'':
1252 case ',':
1253 goto do_not_strip_quotes;
1255 case '\\':
1256 if (*++yyp != '\\')
1257 goto do_not_strip_quotes;
1258 /* Fall through. */
1259 default:
1260 if (yyres)
1261 yyres[yyn] = *yyp;
1262 yyn++;
1263 break;
1265 case '"':
1266 if (yyres)
1267 yyres[yyn] = '\0';
1268 return yyn;
1270 do_not_strip_quotes: ;
1273 if (! yyres)
1274 return yystrlen (yystr);
1276 return yystpcpy (yyres, yystr) - yyres;
1278 # endif
1280 /* Copy into YYRESULT an error message about the unexpected token
1281 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1282 including the terminating null byte. If YYRESULT is null, do not
1283 copy anything; just return the number of bytes that would be
1284 copied. As a special case, return 0 if an ordinary "syntax error"
1285 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1286 size calculation. */
1287 static YYSIZE_T
1288 yysyntax_error (char *yyresult, int yystate, int yychar)
1290 int yyn = yypact[yystate];
1292 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1293 return 0;
1294 else
1296 int yytype = YYTRANSLATE (yychar);
1297 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1298 YYSIZE_T yysize = yysize0;
1299 YYSIZE_T yysize1;
1300 int yysize_overflow = 0;
1301 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1302 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1303 int yyx;
1305 # if 0
1306 /* This is so xgettext sees the translatable formats that are
1307 constructed on the fly. */
1308 YY_("syntax error, unexpected %s");
1309 YY_("syntax error, unexpected %s, expecting %s");
1310 YY_("syntax error, unexpected %s, expecting %s or %s");
1311 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1312 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1313 # endif
1314 char *yyfmt;
1315 char const *yyf;
1316 static char const yyunexpected[] = "syntax error, unexpected %s";
1317 static char const yyexpecting[] = ", expecting %s";
1318 static char const yyor[] = " or %s";
1319 char yyformat[sizeof yyunexpected
1320 + sizeof yyexpecting - 1
1321 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1322 * (sizeof yyor - 1))];
1323 char const *yyprefix = yyexpecting;
1325 /* Start YYX at -YYN if negative to avoid negative indexes in
1326 YYCHECK. */
1327 int yyxbegin = yyn < 0 ? -yyn : 0;
1329 /* Stay within bounds of both yycheck and yytname. */
1330 int yychecklim = YYLAST - yyn + 1;
1331 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1332 int yycount = 1;
1334 yyarg[0] = yytname[yytype];
1335 yyfmt = yystpcpy (yyformat, yyunexpected);
1337 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1338 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1340 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1342 yycount = 1;
1343 yysize = yysize0;
1344 yyformat[sizeof yyunexpected - 1] = '\0';
1345 break;
1347 yyarg[yycount++] = yytname[yyx];
1348 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1349 yysize_overflow |= (yysize1 < yysize);
1350 yysize = yysize1;
1351 yyfmt = yystpcpy (yyfmt, yyprefix);
1352 yyprefix = yyor;
1355 yyf = YY_(yyformat);
1356 yysize1 = yysize + yystrlen (yyf);
1357 yysize_overflow |= (yysize1 < yysize);
1358 yysize = yysize1;
1360 if (yysize_overflow)
1361 return YYSIZE_MAXIMUM;
1363 if (yyresult)
1365 /* Avoid sprintf, as that infringes on the user's name space.
1366 Don't have undefined behavior even if the translation
1367 produced a string with the wrong number of "%s"s. */
1368 char *yyp = yyresult;
1369 int yyi = 0;
1370 while ((*yyp = *yyf) != '\0')
1372 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1374 yyp += yytnamerr (yyp, yyarg[yyi++]);
1375 yyf += 2;
1377 else
1379 yyp++;
1380 yyf++;
1384 return yysize;
1387 #endif /* YYERROR_VERBOSE */
1390 /*-----------------------------------------------.
1391 | Release the memory associated to this symbol. |
1392 `-----------------------------------------------*/
1394 /*ARGSUSED*/
1395 #if (defined __STDC__ || defined __C99__FUNC__ \
1396 || defined __cplusplus || defined _MSC_VER)
1397 static void
1398 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1399 #else
1400 static void
1401 yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1402 const char *yymsg;
1403 int yytype;
1404 YYSTYPE *yyvaluep;
1405 YYLTYPE *yylocationp;
1406 #endif
1408 YYUSE (yyvaluep);
1409 YYUSE (yylocationp);
1411 if (!yymsg)
1412 yymsg = "Deleting";
1413 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1415 switch (yytype)
1417 case 46: /* "\"text\"" */
1419 /* Line 1000 of yacc.c */
1420 #line 93 "SCDoc.y"
1421 { free((yyvaluep->str)); };
1423 /* Line 1000 of yacc.c */
1424 #line 1425 "SCDoc.tab.cpp"
1425 break;
1426 case 47: /* "URL" */
1428 /* Line 1000 of yacc.c */
1429 #line 93 "SCDoc.y"
1430 { free((yyvaluep->str)); };
1432 /* Line 1000 of yacc.c */
1433 #line 1434 "SCDoc.tab.cpp"
1434 break;
1435 case 48: /* "COMMA" */
1437 /* Line 1000 of yacc.c */
1438 #line 93 "SCDoc.y"
1439 { free((yyvaluep->str)); };
1441 /* Line 1000 of yacc.c */
1442 #line 1443 "SCDoc.tab.cpp"
1443 break;
1444 case 49: /* "\"method name\"" */
1446 /* Line 1000 of yacc.c */
1447 #line 93 "SCDoc.y"
1448 { free((yyvaluep->str)); };
1450 /* Line 1000 of yacc.c */
1451 #line 1452 "SCDoc.tab.cpp"
1452 break;
1453 case 50: /* "\"arguments string\"" */
1455 /* Line 1000 of yacc.c */
1456 #line 93 "SCDoc.y"
1457 { free((yyvaluep->str)); };
1459 /* Line 1000 of yacc.c */
1460 #line 1461 "SCDoc.tab.cpp"
1461 break;
1462 case 59: /* "document" */
1464 /* Line 1000 of yacc.c */
1465 #line 92 "SCDoc.y"
1466 { doc_node_free_tree((yyvaluep->doc_node)); };
1468 /* Line 1000 of yacc.c */
1469 #line 1470 "SCDoc.tab.cpp"
1470 break;
1471 case 61: /* "dochead" */
1473 /* Line 1000 of yacc.c */
1474 #line 92 "SCDoc.y"
1475 { doc_node_free_tree((yyvaluep->doc_node)); };
1477 /* Line 1000 of yacc.c */
1478 #line 1479 "SCDoc.tab.cpp"
1479 break;
1480 case 62: /* "headline" */
1482 /* Line 1000 of yacc.c */
1483 #line 92 "SCDoc.y"
1484 { doc_node_free_tree((yyvaluep->doc_node)); };
1486 /* Line 1000 of yacc.c */
1487 #line 1488 "SCDoc.tab.cpp"
1488 break;
1489 case 65: /* "optsections" */
1491 /* Line 1000 of yacc.c */
1492 #line 92 "SCDoc.y"
1493 { doc_node_free_tree((yyvaluep->doc_node)); };
1495 /* Line 1000 of yacc.c */
1496 #line 1497 "SCDoc.tab.cpp"
1497 break;
1498 case 66: /* "sections" */
1500 /* Line 1000 of yacc.c */
1501 #line 92 "SCDoc.y"
1502 { doc_node_free_tree((yyvaluep->doc_node)); };
1504 /* Line 1000 of yacc.c */
1505 #line 1506 "SCDoc.tab.cpp"
1506 break;
1507 case 67: /* "section" */
1509 /* Line 1000 of yacc.c */
1510 #line 92 "SCDoc.y"
1511 { doc_node_free_tree((yyvaluep->doc_node)); };
1513 /* Line 1000 of yacc.c */
1514 #line 1515 "SCDoc.tab.cpp"
1515 break;
1516 case 69: /* "optsubsections" */
1518 /* Line 1000 of yacc.c */
1519 #line 92 "SCDoc.y"
1520 { doc_node_free_tree((yyvaluep->doc_node)); };
1522 /* Line 1000 of yacc.c */
1523 #line 1524 "SCDoc.tab.cpp"
1524 break;
1525 case 70: /* "subsections" */
1527 /* Line 1000 of yacc.c */
1528 #line 92 "SCDoc.y"
1529 { doc_node_free_tree((yyvaluep->doc_node)); };
1531 /* Line 1000 of yacc.c */
1532 #line 1533 "SCDoc.tab.cpp"
1533 break;
1534 case 71: /* "subsection" */
1536 /* Line 1000 of yacc.c */
1537 #line 92 "SCDoc.y"
1538 { doc_node_free_tree((yyvaluep->doc_node)); };
1540 /* Line 1000 of yacc.c */
1541 #line 1542 "SCDoc.tab.cpp"
1542 break;
1543 case 72: /* "optsubsubsections" */
1545 /* Line 1000 of yacc.c */
1546 #line 92 "SCDoc.y"
1547 { doc_node_free_tree((yyvaluep->doc_node)); };
1549 /* Line 1000 of yacc.c */
1550 #line 1551 "SCDoc.tab.cpp"
1551 break;
1552 case 73: /* "subsubsections" */
1554 /* Line 1000 of yacc.c */
1555 #line 92 "SCDoc.y"
1556 { doc_node_free_tree((yyvaluep->doc_node)); };
1558 /* Line 1000 of yacc.c */
1559 #line 1560 "SCDoc.tab.cpp"
1560 break;
1561 case 74: /* "subsubsection" */
1563 /* Line 1000 of yacc.c */
1564 #line 92 "SCDoc.y"
1565 { doc_node_free_tree((yyvaluep->doc_node)); };
1567 /* Line 1000 of yacc.c */
1568 #line 1569 "SCDoc.tab.cpp"
1569 break;
1570 case 75: /* "optMETHODARGS" */
1572 /* Line 1000 of yacc.c */
1573 #line 93 "SCDoc.y"
1574 { free((yyvaluep->str)); };
1576 /* Line 1000 of yacc.c */
1577 #line 1578 "SCDoc.tab.cpp"
1578 break;
1579 case 76: /* "methodname" */
1581 /* Line 1000 of yacc.c */
1582 #line 93 "SCDoc.y"
1583 { free((yyvaluep->str)); };
1585 /* Line 1000 of yacc.c */
1586 #line 1587 "SCDoc.tab.cpp"
1587 break;
1588 case 77: /* "methnames" */
1590 /* Line 1000 of yacc.c */
1591 #line 92 "SCDoc.y"
1592 { doc_node_free_tree((yyvaluep->doc_node)); };
1594 /* Line 1000 of yacc.c */
1595 #line 1596 "SCDoc.tab.cpp"
1596 break;
1597 case 78: /* "methodbody" */
1599 /* Line 1000 of yacc.c */
1600 #line 92 "SCDoc.y"
1601 { doc_node_free_tree((yyvaluep->doc_node)); };
1603 /* Line 1000 of yacc.c */
1604 #line 1605 "SCDoc.tab.cpp"
1605 break;
1606 case 79: /* "optbody" */
1608 /* Line 1000 of yacc.c */
1609 #line 92 "SCDoc.y"
1610 { doc_node_free_tree((yyvaluep->doc_node)); };
1612 /* Line 1000 of yacc.c */
1613 #line 1614 "SCDoc.tab.cpp"
1614 break;
1615 case 80: /* "optargs" */
1617 /* Line 1000 of yacc.c */
1618 #line 92 "SCDoc.y"
1619 { doc_node_free_tree((yyvaluep->doc_node)); };
1621 /* Line 1000 of yacc.c */
1622 #line 1623 "SCDoc.tab.cpp"
1623 break;
1624 case 81: /* "args" */
1626 /* Line 1000 of yacc.c */
1627 #line 92 "SCDoc.y"
1628 { doc_node_free_tree((yyvaluep->doc_node)); };
1630 /* Line 1000 of yacc.c */
1631 #line 1632 "SCDoc.tab.cpp"
1632 break;
1633 case 82: /* "arg" */
1635 /* Line 1000 of yacc.c */
1636 #line 92 "SCDoc.y"
1637 { doc_node_free_tree((yyvaluep->doc_node)); };
1639 /* Line 1000 of yacc.c */
1640 #line 1641 "SCDoc.tab.cpp"
1641 break;
1642 case 83: /* "optreturns" */
1644 /* Line 1000 of yacc.c */
1645 #line 92 "SCDoc.y"
1646 { doc_node_free_tree((yyvaluep->doc_node)); };
1648 /* Line 1000 of yacc.c */
1649 #line 1650 "SCDoc.tab.cpp"
1650 break;
1651 case 84: /* "optdiscussion" */
1653 /* Line 1000 of yacc.c */
1654 #line 92 "SCDoc.y"
1655 { doc_node_free_tree((yyvaluep->doc_node)); };
1657 /* Line 1000 of yacc.c */
1658 #line 1659 "SCDoc.tab.cpp"
1659 break;
1660 case 85: /* "body" */
1662 /* Line 1000 of yacc.c */
1663 #line 92 "SCDoc.y"
1664 { doc_node_free_tree((yyvaluep->doc_node)); };
1666 /* Line 1000 of yacc.c */
1667 #line 1668 "SCDoc.tab.cpp"
1668 break;
1669 case 86: /* "blockA" */
1671 /* Line 1000 of yacc.c */
1672 #line 92 "SCDoc.y"
1673 { doc_node_free_tree((yyvaluep->doc_node)); };
1675 /* Line 1000 of yacc.c */
1676 #line 1677 "SCDoc.tab.cpp"
1677 break;
1678 case 87: /* "blockB" */
1680 /* Line 1000 of yacc.c */
1681 #line 92 "SCDoc.y"
1682 { doc_node_free_tree((yyvaluep->doc_node)); };
1684 /* Line 1000 of yacc.c */
1685 #line 1686 "SCDoc.tab.cpp"
1686 break;
1687 case 88: /* "bodyelem" */
1689 /* Line 1000 of yacc.c */
1690 #line 92 "SCDoc.y"
1691 { doc_node_free_tree((yyvaluep->doc_node)); };
1693 /* Line 1000 of yacc.c */
1694 #line 1695 "SCDoc.tab.cpp"
1695 break;
1696 case 89: /* "prose" */
1698 /* Line 1000 of yacc.c */
1699 #line 92 "SCDoc.y"
1700 { doc_node_free_tree((yyvaluep->doc_node)); };
1702 /* Line 1000 of yacc.c */
1703 #line 1704 "SCDoc.tab.cpp"
1704 break;
1705 case 90: /* "proseelem" */
1707 /* Line 1000 of yacc.c */
1708 #line 92 "SCDoc.y"
1709 { doc_node_free_tree((yyvaluep->doc_node)); };
1711 /* Line 1000 of yacc.c */
1712 #line 1713 "SCDoc.tab.cpp"
1713 break;
1714 case 95: /* "listbody" */
1716 /* Line 1000 of yacc.c */
1717 #line 92 "SCDoc.y"
1718 { doc_node_free_tree((yyvaluep->doc_node)); };
1720 /* Line 1000 of yacc.c */
1721 #line 1722 "SCDoc.tab.cpp"
1722 break;
1723 case 96: /* "tablerow" */
1725 /* Line 1000 of yacc.c */
1726 #line 92 "SCDoc.y"
1727 { doc_node_free_tree((yyvaluep->doc_node)); };
1729 /* Line 1000 of yacc.c */
1730 #line 1731 "SCDoc.tab.cpp"
1731 break;
1732 case 97: /* "tablebody" */
1734 /* Line 1000 of yacc.c */
1735 #line 92 "SCDoc.y"
1736 { doc_node_free_tree((yyvaluep->doc_node)); };
1738 /* Line 1000 of yacc.c */
1739 #line 1740 "SCDoc.tab.cpp"
1740 break;
1741 case 98: /* "tablecells" */
1743 /* Line 1000 of yacc.c */
1744 #line 92 "SCDoc.y"
1745 { doc_node_free_tree((yyvaluep->doc_node)); };
1747 /* Line 1000 of yacc.c */
1748 #line 1749 "SCDoc.tab.cpp"
1749 break;
1750 case 99: /* "defterms" */
1752 /* Line 1000 of yacc.c */
1753 #line 92 "SCDoc.y"
1754 { doc_node_free_tree((yyvaluep->doc_node)); };
1756 /* Line 1000 of yacc.c */
1757 #line 1758 "SCDoc.tab.cpp"
1758 break;
1759 case 100: /* "deflistrow" */
1761 /* Line 1000 of yacc.c */
1762 #line 92 "SCDoc.y"
1763 { doc_node_free_tree((yyvaluep->doc_node)); };
1765 /* Line 1000 of yacc.c */
1766 #line 1767 "SCDoc.tab.cpp"
1767 break;
1768 case 101: /* "deflistbody" */
1770 /* Line 1000 of yacc.c */
1771 #line 92 "SCDoc.y"
1772 { doc_node_free_tree((yyvaluep->doc_node)); };
1774 /* Line 1000 of yacc.c */
1775 #line 1776 "SCDoc.tab.cpp"
1776 break;
1777 case 102: /* "anywordurl" */
1779 /* Line 1000 of yacc.c */
1780 #line 93 "SCDoc.y"
1781 { free((yyvaluep->str)); };
1783 /* Line 1000 of yacc.c */
1784 #line 1785 "SCDoc.tab.cpp"
1785 break;
1786 case 103: /* "anyword" */
1788 /* Line 1000 of yacc.c */
1789 #line 93 "SCDoc.y"
1790 { free((yyvaluep->str)); };
1792 /* Line 1000 of yacc.c */
1793 #line 1794 "SCDoc.tab.cpp"
1794 break;
1795 case 104: /* "words" */
1797 /* Line 1000 of yacc.c */
1798 #line 93 "SCDoc.y"
1799 { free((yyvaluep->str)); };
1801 /* Line 1000 of yacc.c */
1802 #line 1803 "SCDoc.tab.cpp"
1803 break;
1804 case 105: /* "words2" */
1806 /* Line 1000 of yacc.c */
1807 #line 93 "SCDoc.y"
1808 { free((yyvaluep->str)); };
1810 /* Line 1000 of yacc.c */
1811 #line 1812 "SCDoc.tab.cpp"
1812 break;
1813 case 107: /* "anywordnl" */
1815 /* Line 1000 of yacc.c */
1816 #line 93 "SCDoc.y"
1817 { free((yyvaluep->str)); };
1819 /* Line 1000 of yacc.c */
1820 #line 1821 "SCDoc.tab.cpp"
1821 break;
1822 case 108: /* "wordsnl" */
1824 /* Line 1000 of yacc.c */
1825 #line 93 "SCDoc.y"
1826 { free((yyvaluep->str)); };
1828 /* Line 1000 of yacc.c */
1829 #line 1830 "SCDoc.tab.cpp"
1830 break;
1831 case 109: /* "nocommawords" */
1833 /* Line 1000 of yacc.c */
1834 #line 93 "SCDoc.y"
1835 { free((yyvaluep->str)); };
1837 /* Line 1000 of yacc.c */
1838 #line 1839 "SCDoc.tab.cpp"
1839 break;
1840 case 110: /* "commalist" */
1842 /* Line 1000 of yacc.c */
1843 #line 92 "SCDoc.y"
1844 { doc_node_free_tree((yyvaluep->doc_node)); };
1846 /* Line 1000 of yacc.c */
1847 #line 1848 "SCDoc.tab.cpp"
1848 break;
1850 default:
1851 break;
1855 /* Prevent warnings from -Wmissing-prototypes. */
1856 #ifdef YYPARSE_PARAM
1857 #if defined __STDC__ || defined __cplusplus
1858 int yyparse (void *YYPARSE_PARAM);
1859 #else
1860 int yyparse ();
1861 #endif
1862 #else /* ! YYPARSE_PARAM */
1863 #if defined __STDC__ || defined __cplusplus
1864 int yyparse (void);
1865 #else
1866 int yyparse ();
1867 #endif
1868 #endif /* ! YYPARSE_PARAM */
1871 /* The lookahead symbol. */
1872 int yychar;
1874 /* The semantic value of the lookahead symbol. */
1875 YYSTYPE yylval;
1877 /* Location data for the lookahead symbol. */
1878 YYLTYPE yylloc;
1880 /* Number of syntax errors so far. */
1881 int yynerrs;
1885 /*-------------------------.
1886 | yyparse or yypush_parse. |
1887 `-------------------------*/
1889 #ifdef YYPARSE_PARAM
1890 #if (defined __STDC__ || defined __C99__FUNC__ \
1891 || defined __cplusplus || defined _MSC_VER)
1893 yyparse (void *YYPARSE_PARAM)
1894 #else
1896 yyparse (YYPARSE_PARAM)
1897 void *YYPARSE_PARAM;
1898 #endif
1899 #else /* ! YYPARSE_PARAM */
1900 #if (defined __STDC__ || defined __C99__FUNC__ \
1901 || defined __cplusplus || defined _MSC_VER)
1903 yyparse (void)
1904 #else
1906 yyparse ()
1908 #endif
1909 #endif
1913 int yystate;
1914 /* Number of tokens to shift before error messages enabled. */
1915 int yyerrstatus;
1917 /* The stacks and their tools:
1918 `yyss': related to states.
1919 `yyvs': related to semantic values.
1920 `yyls': related to locations.
1922 Refer to the stacks thru separate pointers, to allow yyoverflow
1923 to reallocate them elsewhere. */
1925 /* The state stack. */
1926 yytype_int16 yyssa[YYINITDEPTH];
1927 yytype_int16 *yyss;
1928 yytype_int16 *yyssp;
1930 /* The semantic value stack. */
1931 YYSTYPE yyvsa[YYINITDEPTH];
1932 YYSTYPE *yyvs;
1933 YYSTYPE *yyvsp;
1935 /* The location stack. */
1936 YYLTYPE yylsa[YYINITDEPTH];
1937 YYLTYPE *yyls;
1938 YYLTYPE *yylsp;
1940 /* The locations where the error started and ended. */
1941 YYLTYPE yyerror_range[2];
1943 YYSIZE_T yystacksize;
1945 int yyn;
1946 int yyresult;
1947 /* Lookahead token as an internal (translated) token number. */
1948 int yytoken;
1949 /* The variables used to return semantic value and location from the
1950 action routines. */
1951 YYSTYPE yyval;
1952 YYLTYPE yyloc;
1954 #if YYERROR_VERBOSE
1955 /* Buffer for error messages, and its allocated size. */
1956 char yymsgbuf[128];
1957 char *yymsg = yymsgbuf;
1958 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1959 #endif
1961 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1963 /* The number of symbols on the RHS of the reduced rule.
1964 Keep to zero when no symbol should be popped. */
1965 int yylen = 0;
1967 yytoken = 0;
1968 yyss = yyssa;
1969 yyvs = yyvsa;
1970 yyls = yylsa;
1971 yystacksize = YYINITDEPTH;
1973 YYDPRINTF ((stderr, "Starting parse\n"));
1975 yystate = 0;
1976 yyerrstatus = 0;
1977 yynerrs = 0;
1978 yychar = YYEMPTY; /* Cause a token to be read. */
1980 /* Initialize stack pointers.
1981 Waste one element of value and location stack
1982 so that they stay on the same level as the state stack.
1983 The wasted elements are never initialized. */
1984 yyssp = yyss;
1985 yyvsp = yyvs;
1986 yylsp = yyls;
1988 #if YYLTYPE_IS_TRIVIAL
1989 /* Initialize the default location before parsing starts. */
1990 yylloc.first_line = yylloc.last_line = 1;
1991 yylloc.first_column = yylloc.last_column = 1;
1992 #endif
1994 goto yysetstate;
1996 /*------------------------------------------------------------.
1997 | yynewstate -- Push a new state, which is found in yystate. |
1998 `------------------------------------------------------------*/
1999 yynewstate:
2000 /* In all cases, when you get here, the value and location stacks
2001 have just been pushed. So pushing a state here evens the stacks. */
2002 yyssp++;
2004 yysetstate:
2005 *yyssp = yystate;
2007 if (yyss + yystacksize - 1 <= yyssp)
2009 /* Get the current used size of the three stacks, in elements. */
2010 YYSIZE_T yysize = yyssp - yyss + 1;
2012 #ifdef yyoverflow
2014 /* Give user a chance to reallocate the stack. Use copies of
2015 these so that the &'s don't force the real ones into
2016 memory. */
2017 YYSTYPE *yyvs1 = yyvs;
2018 yytype_int16 *yyss1 = yyss;
2019 YYLTYPE *yyls1 = yyls;
2021 /* Each stack pointer address is followed by the size of the
2022 data in use in that stack, in bytes. This used to be a
2023 conditional around just the two extra args, but that might
2024 be undefined if yyoverflow is a macro. */
2025 yyoverflow (YY_("memory exhausted"),
2026 &yyss1, yysize * sizeof (*yyssp),
2027 &yyvs1, yysize * sizeof (*yyvsp),
2028 &yyls1, yysize * sizeof (*yylsp),
2029 &yystacksize);
2031 yyls = yyls1;
2032 yyss = yyss1;
2033 yyvs = yyvs1;
2035 #else /* no yyoverflow */
2036 # ifndef YYSTACK_RELOCATE
2037 goto yyexhaustedlab;
2038 # else
2039 /* Extend the stack our own way. */
2040 if (YYMAXDEPTH <= yystacksize)
2041 goto yyexhaustedlab;
2042 yystacksize *= 2;
2043 if (YYMAXDEPTH < yystacksize)
2044 yystacksize = YYMAXDEPTH;
2047 yytype_int16 *yyss1 = yyss;
2048 union yyalloc *yyptr =
2049 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2050 if (! yyptr)
2051 goto yyexhaustedlab;
2052 YYSTACK_RELOCATE (yyss_alloc, yyss);
2053 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2054 YYSTACK_RELOCATE (yyls_alloc, yyls);
2055 # undef YYSTACK_RELOCATE
2056 if (yyss1 != yyssa)
2057 YYSTACK_FREE (yyss1);
2059 # endif
2060 #endif /* no yyoverflow */
2062 yyssp = yyss + yysize - 1;
2063 yyvsp = yyvs + yysize - 1;
2064 yylsp = yyls + yysize - 1;
2066 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2067 (unsigned long int) yystacksize));
2069 if (yyss + yystacksize - 1 <= yyssp)
2070 YYABORT;
2073 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2075 if (yystate == YYFINAL)
2076 YYACCEPT;
2078 goto yybackup;
2080 /*-----------.
2081 | yybackup. |
2082 `-----------*/
2083 yybackup:
2085 /* Do appropriate processing given the current state. Read a
2086 lookahead token if we need one and don't already have one. */
2088 /* First try to decide what to do without reference to lookahead token. */
2089 yyn = yypact[yystate];
2090 if (yyn == YYPACT_NINF)
2091 goto yydefault;
2093 /* Not known => get a lookahead token if don't already have one. */
2095 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2096 if (yychar == YYEMPTY)
2098 YYDPRINTF ((stderr, "Reading a token: "));
2099 yychar = YYLEX;
2102 if (yychar <= YYEOF)
2104 yychar = yytoken = YYEOF;
2105 YYDPRINTF ((stderr, "Now at end of input.\n"));
2107 else
2109 yytoken = YYTRANSLATE (yychar);
2110 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2113 /* If the proper action on seeing token YYTOKEN is to reduce or to
2114 detect an error, take that action. */
2115 yyn += yytoken;
2116 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2117 goto yydefault;
2118 yyn = yytable[yyn];
2119 if (yyn <= 0)
2121 if (yyn == 0 || yyn == YYTABLE_NINF)
2122 goto yyerrlab;
2123 yyn = -yyn;
2124 goto yyreduce;
2127 /* Count tokens shifted since error; after three, turn off error
2128 status. */
2129 if (yyerrstatus)
2130 yyerrstatus--;
2132 /* Shift the lookahead token. */
2133 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2135 /* Discard the shifted token. */
2136 yychar = YYEMPTY;
2138 yystate = yyn;
2139 *++yyvsp = yylval;
2140 *++yylsp = yylloc;
2141 goto yynewstate;
2144 /*-----------------------------------------------------------.
2145 | yydefault -- do the default action for the current state. |
2146 `-----------------------------------------------------------*/
2147 yydefault:
2148 yyn = yydefact[yystate];
2149 if (yyn == 0)
2150 goto yyerrlab;
2151 goto yyreduce;
2154 /*-----------------------------.
2155 | yyreduce -- Do a reduction. |
2156 `-----------------------------*/
2157 yyreduce:
2158 /* yyn is the number of a rule to reduce with. */
2159 yylen = yyr2[yyn];
2161 /* If YYLEN is nonzero, implement the default value of the action:
2162 `$$ = $1'.
2164 Otherwise, the following line sets YYVAL to garbage.
2165 This behavior is undocumented and Bison
2166 users should not rely upon it. Assigning to YYVAL
2167 unconditionally makes the parser a bit smaller, and it avoids a
2168 GCC warning that YYVAL may be used uninitialized. */
2169 yyval = yyvsp[1-yylen];
2171 /* Default location. */
2172 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2173 YY_REDUCE_PRINT (yyn);
2174 switch (yyn)
2176 case 2:
2178 /* Line 1455 of yacc.c */
2179 #line 102 "SCDoc.y"
2180 { topnode = (yyvsp[(1) - (1)].doc_node); ;}
2181 break;
2183 case 3:
2185 /* Line 1455 of yacc.c */
2186 #line 103 "SCDoc.y"
2187 { topnode = NULL; doc_node_free_tree((yyvsp[(1) - (2)].doc_node)); ;}
2188 break;
2190 case 4:
2192 /* Line 1455 of yacc.c */
2193 #line 107 "SCDoc.y"
2195 (yyval.doc_node) = doc_node_create("DOCUMENT");
2196 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2197 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2199 break;
2201 case 5:
2203 /* Line 1455 of yacc.c */
2204 #line 113 "SCDoc.y"
2206 (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(2) - (2)].doc_node));
2208 break;
2210 case 6:
2212 /* Line 1455 of yacc.c */
2213 #line 117 "SCDoc.y"
2215 (yyval.doc_node) = doc_node_create("DOCUMENT");
2216 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (3)].doc_node));
2217 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (3)].doc_node));
2219 break;
2221 case 9:
2223 /* Line 1455 of yacc.c */
2224 #line 128 "SCDoc.y"
2225 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2226 break;
2228 case 10:
2230 /* Line 1455 of yacc.c */
2231 #line 129 "SCDoc.y"
2232 { (yyval.doc_node) = doc_node_make("HEADER",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2233 break;
2235 case 11:
2237 /* Line 1455 of yacc.c */
2238 #line 132 "SCDoc.y"
2239 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2240 break;
2242 case 12:
2244 /* Line 1455 of yacc.c */
2245 #line 133 "SCDoc.y"
2246 { (yyval.doc_node) = doc_node_make_take_children("CATEGORIES",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2247 break;
2249 case 13:
2251 /* Line 1455 of yacc.c */
2252 #line 134 "SCDoc.y"
2253 { (yyval.doc_node) = doc_node_make_take_children("RELATED",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2254 break;
2256 case 14:
2258 /* Line 1455 of yacc.c */
2259 #line 137 "SCDoc.y"
2260 { (yyval.id) = "TITLE"; ;}
2261 break;
2263 case 15:
2265 /* Line 1455 of yacc.c */
2266 #line 138 "SCDoc.y"
2267 { (yyval.id) = "TITLE"; ;}
2268 break;
2270 case 16:
2272 /* Line 1455 of yacc.c */
2273 #line 139 "SCDoc.y"
2274 { (yyval.id) = "SUMMARY"; ;}
2275 break;
2277 case 17:
2279 /* Line 1455 of yacc.c */
2280 #line 140 "SCDoc.y"
2281 { (yyval.id) = "REDIRECT"; ;}
2282 break;
2284 case 18:
2286 /* Line 1455 of yacc.c */
2287 #line 143 "SCDoc.y"
2288 { (yyval.id) = "CLASSMETHODS"; method_type = "CMETHOD"; ;}
2289 break;
2291 case 19:
2293 /* Line 1455 of yacc.c */
2294 #line 144 "SCDoc.y"
2295 { (yyval.id) = "INSTANCEMETHODS"; method_type = "IMETHOD"; ;}
2296 break;
2298 case 20:
2300 /* Line 1455 of yacc.c */
2301 #line 145 "SCDoc.y"
2302 { (yyval.id) = "DESCRIPTION"; method_type = "METHOD"; ;}
2303 break;
2305 case 21:
2307 /* Line 1455 of yacc.c */
2308 #line 146 "SCDoc.y"
2309 { (yyval.id) = "EXAMPLES"; method_type = "METHOD"; ;}
2310 break;
2312 case 23:
2314 /* Line 1455 of yacc.c */
2315 #line 150 "SCDoc.y"
2316 { (yyval.doc_node) = doc_node_make("BODY",NULL,NULL); ;}
2317 break;
2319 case 24:
2321 /* Line 1455 of yacc.c */
2322 #line 153 "SCDoc.y"
2323 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2324 break;
2326 case 25:
2328 /* Line 1455 of yacc.c */
2329 #line 154 "SCDoc.y"
2330 { (yyval.doc_node) = doc_node_make("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2331 break;
2333 case 26:
2335 /* Line 1455 of yacc.c */
2336 #line 155 "SCDoc.y"
2337 { (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2338 break;
2340 case 27:
2342 /* Line 1455 of yacc.c */
2343 #line 158 "SCDoc.y"
2344 { method_type = "METHOD"; ;}
2345 break;
2347 case 28:
2349 /* Line 1455 of yacc.c */
2350 #line 158 "SCDoc.y"
2351 { (yyval.doc_node) = doc_node_make_take_children("SECTION",(yyvsp[(3) - (5)].str),(yyvsp[(5) - (5)].doc_node)); ;}
2352 break;
2354 case 29:
2356 /* Line 1455 of yacc.c */
2357 #line 159 "SCDoc.y"
2358 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (2)].id), NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2359 break;
2361 case 31:
2363 /* Line 1455 of yacc.c */
2364 #line 163 "SCDoc.y"
2365 { (yyval.doc_node) = NULL; ;}
2366 break;
2368 case 32:
2370 /* Line 1455 of yacc.c */
2371 #line 166 "SCDoc.y"
2372 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2373 break;
2375 case 33:
2377 /* Line 1455 of yacc.c */
2378 #line 167 "SCDoc.y"
2379 { (yyval.doc_node) = doc_node_make("(SUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2380 break;
2382 case 35:
2384 /* Line 1455 of yacc.c */
2385 #line 171 "SCDoc.y"
2386 { (yyval.doc_node) = doc_node_make_take_children("SUBSECTION", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); ;}
2387 break;
2389 case 37:
2391 /* Line 1455 of yacc.c */
2392 #line 175 "SCDoc.y"
2393 { (yyval.doc_node) = NULL; ;}
2394 break;
2396 case 38:
2398 /* Line 1455 of yacc.c */
2399 #line 178 "SCDoc.y"
2400 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2401 break;
2403 case 39:
2405 /* Line 1455 of yacc.c */
2406 #line 179 "SCDoc.y"
2407 { (yyval.doc_node) = doc_node_make("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2408 break;
2410 case 40:
2412 /* Line 1455 of yacc.c */
2413 #line 180 "SCDoc.y"
2414 { (yyval.doc_node) = doc_node_make_take_children("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2415 break;
2417 case 41:
2419 /* Line 1455 of yacc.c */
2420 #line 184 "SCDoc.y"
2422 (yyvsp[(2) - (5)].doc_node)->id = "METHODNAMES";
2423 (yyval.doc_node) = doc_node_make(method_type,(yyvsp[(3) - (5)].str),(yyvsp[(2) - (5)].doc_node));
2424 doc_node_add_child((yyval.doc_node), (yyvsp[(5) - (5)].doc_node));
2425 // doc_node_add_child($2, $3);
2427 break;
2429 case 42:
2431 /* Line 1455 of yacc.c */
2432 #line 190 "SCDoc.y"
2433 { (yyval.doc_node) = doc_node_make(
2434 method_type=="CMETHOD"?"CCOPYMETHOD":(method_type=="IMETHOD"?"ICOPYMETHOD":"COPYMETHOD"),
2435 (yyvsp[(2) - (3)].str),NULL
2436 ); ;}
2437 break;
2439 case 43:
2441 /* Line 1455 of yacc.c */
2442 #line 194 "SCDoc.y"
2443 { (yyval.doc_node) = doc_node_make_take_children(method_type=="CMETHOD"?"CPRIVATE":"IPRIVATE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2444 break;
2446 case 44:
2448 /* Line 1455 of yacc.c */
2449 #line 197 "SCDoc.y"
2450 { (yyval.str) = NULL; ;}
2451 break;
2453 case 45:
2455 /* Line 1455 of yacc.c */
2456 #line 199 "SCDoc.y"
2458 // $$ = doc_node_make("ARGSTRING",$1,NULL);
2459 (yyval.str) = (yyvsp[(1) - (1)].str);
2460 if(method_type!="METHOD") {
2461 yyerror("METHOD argument string is not allowed inside CLASSMETHODS or INSTANCEMETHODS");
2462 YYERROR;
2465 break;
2467 case 46:
2469 /* Line 1455 of yacc.c */
2470 #line 210 "SCDoc.y"
2472 char *p = (yyvsp[(1) - (1)].str)+strlen((yyvsp[(1) - (1)].str))-1;
2473 if(*p=='_') {
2474 post("WARNING: SCDoc: In %s\n Property setter %s should be documented without underscore.\n", scdoc_current_file, (yyvsp[(1) - (1)].str));
2475 *p = '\0';
2477 (yyval.str) = (yyvsp[(1) - (1)].str);
2479 break;
2481 case 47:
2483 /* Line 1455 of yacc.c */
2484 #line 220 "SCDoc.y"
2485 { 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)); ;}
2486 break;
2488 case 48:
2490 /* Line 1455 of yacc.c */
2491 #line 221 "SCDoc.y"
2492 { (yyval.doc_node) = doc_node_make("(METHODNAMES)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); ;}
2493 break;
2495 case 49:
2497 /* Line 1455 of yacc.c */
2498 #line 225 "SCDoc.y"
2500 (yyval.doc_node) = doc_node_make_take_children("METHODBODY",NULL,(yyvsp[(1) - (4)].doc_node));
2501 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (4)].doc_node));
2502 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2503 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2505 break;
2507 case 51:
2509 /* Line 1455 of yacc.c */
2510 #line 234 "SCDoc.y"
2511 { (yyval.doc_node) = NULL; ;}
2512 break;
2514 case 53:
2516 /* Line 1455 of yacc.c */
2517 #line 238 "SCDoc.y"
2518 { (yyval.doc_node) = NULL; ;}
2519 break;
2521 case 54:
2523 /* Line 1455 of yacc.c */
2524 #line 241 "SCDoc.y"
2525 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2526 break;
2528 case 55:
2530 /* Line 1455 of yacc.c */
2531 #line 242 "SCDoc.y"
2532 { (yyval.doc_node) = doc_node_make("ARGUMENTS",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2533 break;
2535 case 56:
2537 /* Line 1455 of yacc.c */
2538 #line 245 "SCDoc.y"
2539 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); ;}
2540 break;
2542 case 57:
2544 /* Line 1455 of yacc.c */
2545 #line 246 "SCDoc.y"
2546 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", NULL, (yyvsp[(3) - (3)].doc_node)); ;}
2547 break;
2549 case 58:
2551 /* Line 1455 of yacc.c */
2552 #line 249 "SCDoc.y"
2553 { (yyval.doc_node) = doc_node_make_take_children("RETURNS",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2554 break;
2556 case 59:
2558 /* Line 1455 of yacc.c */
2559 #line 250 "SCDoc.y"
2560 { (yyval.doc_node) = NULL; ;}
2561 break;
2563 case 60:
2565 /* Line 1455 of yacc.c */
2566 #line 253 "SCDoc.y"
2567 { (yyval.doc_node) = doc_node_make_take_children("DISCUSSION",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2568 break;
2570 case 61:
2572 /* Line 1455 of yacc.c */
2573 #line 254 "SCDoc.y"
2574 { (yyval.doc_node) = NULL; ;}
2575 break;
2577 case 64:
2579 /* Line 1455 of yacc.c */
2580 #line 266 "SCDoc.y"
2581 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2582 break;
2584 case 65:
2586 /* Line 1455 of yacc.c */
2587 #line 267 "SCDoc.y"
2588 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2589 break;
2591 case 66:
2593 /* Line 1455 of yacc.c */
2594 #line 268 "SCDoc.y"
2595 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2596 break;
2598 case 67:
2600 /* Line 1455 of yacc.c */
2601 #line 271 "SCDoc.y"
2602 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2603 break;
2605 case 68:
2607 /* Line 1455 of yacc.c */
2608 #line 272 "SCDoc.y"
2609 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2610 break;
2612 case 69:
2614 /* Line 1455 of yacc.c */
2615 #line 275 "SCDoc.y"
2616 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2617 break;
2619 case 70:
2621 /* Line 1455 of yacc.c */
2622 #line 276 "SCDoc.y"
2623 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2624 break;
2626 case 71:
2628 /* Line 1455 of yacc.c */
2629 #line 277 "SCDoc.y"
2630 { (yyval.doc_node) = doc_node_make_take_children("TABLE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2631 break;
2633 case 72:
2635 /* Line 1455 of yacc.c */
2636 #line 278 "SCDoc.y"
2637 { (yyval.doc_node) = doc_node_make_take_children("DEFINITIONLIST",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2638 break;
2640 case 73:
2642 /* Line 1455 of yacc.c */
2643 #line 279 "SCDoc.y"
2644 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2645 break;
2647 case 74:
2649 /* Line 1455 of yacc.c */
2650 #line 280 "SCDoc.y"
2651 { (yyval.doc_node) = doc_node_make("CLASSTREE",(yyvsp[(2) - (3)].str),NULL); ;}
2652 break;
2654 case 75:
2656 /* Line 1455 of yacc.c */
2657 #line 281 "SCDoc.y"
2658 { (yyval.doc_node) = doc_node_make_take_children("KEYWORD",NULL,(yyvsp[(2) - (3)].doc_node));
2659 // printf("keyword '%s'\n",$2->children[0]->text);
2661 break;
2663 case 76:
2665 /* Line 1455 of yacc.c */
2666 #line 284 "SCDoc.y"
2667 { (yyval.doc_node) = NULL; ;}
2668 break;
2670 case 77:
2672 /* Line 1455 of yacc.c */
2673 #line 285 "SCDoc.y"
2674 { (yyval.doc_node) = doc_node_make("IMAGE",(yyvsp[(2) - (3)].str),NULL); ;}
2675 break;
2677 case 78:
2679 /* Line 1455 of yacc.c */
2680 #line 288 "SCDoc.y"
2681 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node), (yyvsp[(2) - (2)].doc_node)); ;}
2682 break;
2684 case 79:
2686 /* Line 1455 of yacc.c */
2687 #line 289 "SCDoc.y"
2688 { (yyval.doc_node) = doc_node_make("PROSE",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2689 break;
2691 case 80:
2693 /* Line 1455 of yacc.c */
2694 #line 292 "SCDoc.y"
2695 { (yyval.doc_node) = doc_node_make("TEXT",(yyvsp[(1) - (1)].str),NULL); ;}
2696 break;
2698 case 81:
2700 /* Line 1455 of yacc.c */
2701 #line 293 "SCDoc.y"
2702 { (yyval.doc_node) = doc_node_make("LINK",(yyvsp[(1) - (1)].str),NULL); ;}
2703 break;
2705 case 82:
2707 /* Line 1455 of yacc.c */
2708 #line 294 "SCDoc.y"
2709 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2710 break;
2712 case 83:
2714 /* Line 1455 of yacc.c */
2715 #line 295 "SCDoc.y"
2716 { (yyval.doc_node) = doc_node_make_take_children("FOOTNOTE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2717 break;
2719 case 84:
2721 /* Line 1455 of yacc.c */
2722 #line 296 "SCDoc.y"
2723 { (yyval.doc_node) = doc_node_create("NL"); ;}
2724 break;
2726 case 85:
2728 /* Line 1455 of yacc.c */
2729 #line 299 "SCDoc.y"
2730 { (yyval.id) = "LINK"; ;}
2731 break;
2733 case 86:
2735 /* Line 1455 of yacc.c */
2736 #line 300 "SCDoc.y"
2737 { (yyval.id) = "STRONG"; ;}
2738 break;
2740 case 87:
2742 /* Line 1455 of yacc.c */
2743 #line 301 "SCDoc.y"
2744 { (yyval.id) = "SOFT"; ;}
2745 break;
2747 case 88:
2749 /* Line 1455 of yacc.c */
2750 #line 302 "SCDoc.y"
2751 { (yyval.id) = "EMPHASIS"; ;}
2752 break;
2754 case 89:
2756 /* Line 1455 of yacc.c */
2757 #line 303 "SCDoc.y"
2758 { (yyval.id) = "CODE"; ;}
2759 break;
2761 case 90:
2763 /* Line 1455 of yacc.c */
2764 #line 304 "SCDoc.y"
2765 { (yyval.id) = "TELETYPE"; ;}
2766 break;
2768 case 91:
2770 /* Line 1455 of yacc.c */
2771 #line 305 "SCDoc.y"
2772 { (yyval.id) = "MATH"; ;}
2773 break;
2775 case 92:
2777 /* Line 1455 of yacc.c */
2778 #line 306 "SCDoc.y"
2779 { (yyval.id) = "ANCHOR"; ;}
2780 break;
2782 case 93:
2784 /* Line 1455 of yacc.c */
2785 #line 309 "SCDoc.y"
2786 { (yyval.id) = "CODEBLOCK"; ;}
2787 break;
2789 case 94:
2791 /* Line 1455 of yacc.c */
2792 #line 310 "SCDoc.y"
2793 { (yyval.id) = "TELETYPEBLOCK"; ;}
2794 break;
2796 case 95:
2798 /* Line 1455 of yacc.c */
2799 #line 311 "SCDoc.y"
2800 { (yyval.id) = "MATHBLOCK"; ;}
2801 break;
2803 case 96:
2805 /* Line 1455 of yacc.c */
2806 #line 314 "SCDoc.y"
2807 { (yyval.id) = "LIST"; ;}
2808 break;
2810 case 97:
2812 /* Line 1455 of yacc.c */
2813 #line 315 "SCDoc.y"
2814 { (yyval.id) = "TREE"; ;}
2815 break;
2817 case 98:
2819 /* Line 1455 of yacc.c */
2820 #line 316 "SCDoc.y"
2821 { (yyval.id) = "NUMBEREDLIST"; ;}
2822 break;
2824 case 99:
2826 /* Line 1455 of yacc.c */
2827 #line 319 "SCDoc.y"
2828 { (yyval.id) = "WARNING"; ;}
2829 break;
2831 case 100:
2833 /* Line 1455 of yacc.c */
2834 #line 320 "SCDoc.y"
2835 { (yyval.id) = "NOTE"; ;}
2836 break;
2838 case 101:
2840 /* Line 1455 of yacc.c */
2841 #line 323 "SCDoc.y"
2842 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("ITEM",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2843 break;
2845 case 102:
2847 /* Line 1455 of yacc.c */
2848 #line 324 "SCDoc.y"
2849 { (yyval.doc_node) = doc_node_make("(LISTBODY)",NULL, doc_node_make_take_children("ITEM",NULL,(yyvsp[(2) - (2)].doc_node))); ;}
2850 break;
2852 case 103:
2854 /* Line 1455 of yacc.c */
2855 #line 327 "SCDoc.y"
2856 { (yyval.doc_node) = doc_node_make_take_children("TABROW",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2857 break;
2859 case 104:
2861 /* Line 1455 of yacc.c */
2862 #line 330 "SCDoc.y"
2863 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2864 break;
2866 case 105:
2868 /* Line 1455 of yacc.c */
2869 #line 331 "SCDoc.y"
2870 { (yyval.doc_node) = doc_node_make("(TABLEBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2871 break;
2873 case 106:
2875 /* Line 1455 of yacc.c */
2876 #line 334 "SCDoc.y"
2877 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("TABCOL",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2878 break;
2880 case 107:
2882 /* Line 1455 of yacc.c */
2883 #line 335 "SCDoc.y"
2884 { (yyval.doc_node) = doc_node_make("(TABLECELLS)",NULL, doc_node_make_take_children("TABCOL",NULL,(yyvsp[(1) - (1)].doc_node))); ;}
2885 break;
2887 case 108:
2889 /* Line 1455 of yacc.c */
2890 #line 338 "SCDoc.y"
2891 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node),doc_node_make_take_children("TERM",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2892 break;
2894 case 109:
2896 /* Line 1455 of yacc.c */
2897 #line 339 "SCDoc.y"
2898 { (yyval.doc_node) = doc_node_make("(TERMS)",NULL,doc_node_make_take_children("TERM",NULL,(yyvsp[(2) - (2)].doc_node))); ;}
2899 break;
2901 case 110:
2903 /* Line 1455 of yacc.c */
2904 #line 343 "SCDoc.y"
2906 (yyval.doc_node) = doc_node_make_take_children("DEFLISTITEM", NULL, (yyvsp[(1) - (3)].doc_node));
2907 doc_node_add_child((yyval.doc_node), doc_node_make_take_children("DEFINITION", NULL, (yyvsp[(3) - (3)].doc_node)));
2909 break;
2911 case 111:
2913 /* Line 1455 of yacc.c */
2914 #line 349 "SCDoc.y"
2915 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2916 break;
2918 case 112:
2920 /* Line 1455 of yacc.c */
2921 #line 350 "SCDoc.y"
2922 { (yyval.doc_node) = doc_node_make("(DEFLISTBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2923 break;
2925 case 117:
2927 /* Line 1455 of yacc.c */
2928 #line 361 "SCDoc.y"
2929 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2930 break;
2932 case 119:
2934 /* Line 1455 of yacc.c */
2935 #line 365 "SCDoc.y"
2936 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2937 break;
2939 case 125:
2941 /* Line 1455 of yacc.c */
2942 #line 375 "SCDoc.y"
2943 { (yyval.str) = strdup("\n"); ;}
2944 break;
2946 case 126:
2948 /* Line 1455 of yacc.c */
2949 #line 378 "SCDoc.y"
2950 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2951 break;
2953 case 128:
2955 /* Line 1455 of yacc.c */
2956 #line 382 "SCDoc.y"
2957 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2958 break;
2960 case 129:
2962 /* Line 1455 of yacc.c */
2963 #line 383 "SCDoc.y"
2964 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2965 break;
2967 case 132:
2969 /* Line 1455 of yacc.c */
2970 #line 388 "SCDoc.y"
2971 { 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)); ;}
2972 break;
2974 case 133:
2976 /* Line 1455 of yacc.c */
2977 #line 389 "SCDoc.y"
2978 { (yyval.doc_node) = doc_node_make("(COMMALIST)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); ;}
2979 break;
2983 /* Line 1455 of yacc.c */
2984 #line 2985 "SCDoc.tab.cpp"
2985 default: break;
2987 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2989 YYPOPSTACK (yylen);
2990 yylen = 0;
2991 YY_STACK_PRINT (yyss, yyssp);
2993 *++yyvsp = yyval;
2994 *++yylsp = yyloc;
2996 /* Now `shift' the result of the reduction. Determine what state
2997 that goes to, based on the state we popped back to and the rule
2998 number reduced by. */
3000 yyn = yyr1[yyn];
3002 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3003 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3004 yystate = yytable[yystate];
3005 else
3006 yystate = yydefgoto[yyn - YYNTOKENS];
3008 goto yynewstate;
3011 /*------------------------------------.
3012 | yyerrlab -- here on detecting error |
3013 `------------------------------------*/
3014 yyerrlab:
3015 /* If not already recovering from an error, report this error. */
3016 if (!yyerrstatus)
3018 ++yynerrs;
3019 #if ! YYERROR_VERBOSE
3020 yyerror (YY_("syntax error"));
3021 #else
3023 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3024 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3026 YYSIZE_T yyalloc = 2 * yysize;
3027 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3028 yyalloc = YYSTACK_ALLOC_MAXIMUM;
3029 if (yymsg != yymsgbuf)
3030 YYSTACK_FREE (yymsg);
3031 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3032 if (yymsg)
3033 yymsg_alloc = yyalloc;
3034 else
3036 yymsg = yymsgbuf;
3037 yymsg_alloc = sizeof yymsgbuf;
3041 if (0 < yysize && yysize <= yymsg_alloc)
3043 (void) yysyntax_error (yymsg, yystate, yychar);
3044 yyerror (yymsg);
3046 else
3048 yyerror (YY_("syntax error"));
3049 if (yysize != 0)
3050 goto yyexhaustedlab;
3053 #endif
3056 yyerror_range[0] = yylloc;
3058 if (yyerrstatus == 3)
3060 /* If just tried and failed to reuse lookahead token after an
3061 error, discard it. */
3063 if (yychar <= YYEOF)
3065 /* Return failure if at end of input. */
3066 if (yychar == YYEOF)
3067 YYABORT;
3069 else
3071 yydestruct ("Error: discarding",
3072 yytoken, &yylval, &yylloc);
3073 yychar = YYEMPTY;
3077 /* Else will try to reuse lookahead token after shifting the error
3078 token. */
3079 goto yyerrlab1;
3082 /*---------------------------------------------------.
3083 | yyerrorlab -- error raised explicitly by YYERROR. |
3084 `---------------------------------------------------*/
3085 yyerrorlab:
3087 /* Pacify compilers like GCC when the user code never invokes
3088 YYERROR and the label yyerrorlab therefore never appears in user
3089 code. */
3090 if (/*CONSTCOND*/ 0)
3091 goto yyerrorlab;
3093 yyerror_range[0] = yylsp[1-yylen];
3094 /* Do not reclaim the symbols of the rule which action triggered
3095 this YYERROR. */
3096 YYPOPSTACK (yylen);
3097 yylen = 0;
3098 YY_STACK_PRINT (yyss, yyssp);
3099 yystate = *yyssp;
3100 goto yyerrlab1;
3103 /*-------------------------------------------------------------.
3104 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3105 `-------------------------------------------------------------*/
3106 yyerrlab1:
3107 yyerrstatus = 3; /* Each real token shifted decrements this. */
3109 for (;;)
3111 yyn = yypact[yystate];
3112 if (yyn != YYPACT_NINF)
3114 yyn += YYTERROR;
3115 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3117 yyn = yytable[yyn];
3118 if (0 < yyn)
3119 break;
3123 /* Pop the current state because it cannot handle the error token. */
3124 if (yyssp == yyss)
3125 YYABORT;
3127 yyerror_range[0] = *yylsp;
3128 yydestruct ("Error: popping",
3129 yystos[yystate], yyvsp, yylsp);
3130 YYPOPSTACK (1);
3131 yystate = *yyssp;
3132 YY_STACK_PRINT (yyss, yyssp);
3135 *++yyvsp = yylval;
3137 yyerror_range[1] = yylloc;
3138 /* Using YYLLOC is tempting, but would change the location of
3139 the lookahead. YYLOC is available though. */
3140 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
3141 *++yylsp = yyloc;
3143 /* Shift the error token. */
3144 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3146 yystate = yyn;
3147 goto yynewstate;
3150 /*-------------------------------------.
3151 | yyacceptlab -- YYACCEPT comes here. |
3152 `-------------------------------------*/
3153 yyacceptlab:
3154 yyresult = 0;
3155 goto yyreturn;
3157 /*-----------------------------------.
3158 | yyabortlab -- YYABORT comes here. |
3159 `-----------------------------------*/
3160 yyabortlab:
3161 yyresult = 1;
3162 goto yyreturn;
3164 #if !defined(yyoverflow) || YYERROR_VERBOSE
3165 /*-------------------------------------------------.
3166 | yyexhaustedlab -- memory exhaustion comes here. |
3167 `-------------------------------------------------*/
3168 yyexhaustedlab:
3169 yyerror (YY_("memory exhausted"));
3170 yyresult = 2;
3171 /* Fall through. */
3172 #endif
3174 yyreturn:
3175 if (yychar != YYEMPTY)
3176 yydestruct ("Cleanup: discarding lookahead",
3177 yytoken, &yylval, &yylloc);
3178 /* Do not reclaim the symbols of the rule which action triggered
3179 this YYABORT or YYACCEPT. */
3180 YYPOPSTACK (yylen);
3181 YY_STACK_PRINT (yyss, yyssp);
3182 while (yyssp != yyss)
3184 yydestruct ("Cleanup: popping",
3185 yystos[*yyssp], yyvsp, yylsp);
3186 YYPOPSTACK (1);
3188 #ifndef yyoverflow
3189 if (yyss != yyssa)
3190 YYSTACK_FREE (yyss);
3191 #endif
3192 #if YYERROR_VERBOSE
3193 if (yymsg != yymsgbuf)
3194 YYSTACK_FREE (yymsg);
3195 #endif
3196 /* Make sure YYID is used. */
3197 return YYID (yyresult);
3202 /* Line 1675 of yacc.c */
3203 #line 392 "SCDoc.y"
3206 DocNode * scdoc_parse_run(int mode) {
3207 int modes[] = {START_FULL, START_PARTIAL, START_METADATA};
3208 if(mode<0 || mode>=sizeof(modes)) {
3209 error("scdoc_parse_run(): unknown mode: %d\n",mode);
3211 scdoc_start_token = modes[mode];
3212 /* scdoc_start_token = START_FULL;
3213 scdoc_metadata_mode = 0;
3214 if(mode==SCDOC_PARSE_PARTIAL) {
3215 scdoc_start_token = START_PARTIAL;
3216 } else
3217 if(mode==SCDOC_PARSE_METADATA) {
3218 scdoc_metadata_mode = 1;
3220 topnode = NULL;
3221 method_type = "METHOD";
3222 if(scdocparse()!=0) {
3223 return NULL;
3225 return topnode;
3228 void scdocerror(const char *str)
3230 error("In %s:\n At line %d: %s\n\n",scdoc_current_file,scdoclineno,str);
3232 /* FIXME: this does not work well, since the reported linenumber is often *after* the actual error line
3233 fseek(scdocin, 0, SEEK_SET);
3234 int line = 1;
3235 char buf[256],*txt;
3236 while(line!=scdoclineno && !feof(scdocin)) {
3237 int c = fgetc(scdocin);
3238 if(c=='\n') line++;
3240 txt = fgets(buf, 256, scdocin);
3241 if(txt)
3242 fprintf(stderr," %s\n-------------------\n", txt);