DiskIn help: prioritise object-style example over OSC example
[supercollider.git] / SCDoc / SCDoc.tab.cpp
blob5a94c30ff6bd9620efdaf8299f0b51033d1f1d07
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 70
478 /* YYLAST -- Last index in YYTABLE. */
479 #define YYLAST 434
481 /* YYNTOKENS -- Number of terminals. */
482 #define YYNTOKENS 57
483 /* YYNNTS -- Number of nonterminals. */
484 #define YYNNTS 55
485 /* YYNRULES -- Number of rules. */
486 #define YYNRULES 134
487 /* YYNRULES -- Number of states. */
488 #define YYNSTATES 193
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, 328, 331, 333,
552 336, 339, 341, 343, 347
555 /* YYRHS -- A `-1'-separated list of the rules' RHS. */
556 static const yytype_int8 yyrhs[] =
558 58, 0, -1, 59, -1, 59, 1, -1, 54, 60,
559 61, 65, -1, 55, 66, -1, 56, 61, 65, -1,
560 106, -1, -1, 61, 62, -1, 62, -1, 63, 105,
561 106, -1, 7, 111, 106, -1, 6, 111, 106, -1,
562 3, -1, 4, -1, 5, -1, 8, -1, 18, -1,
563 19, -1, 17, -1, 20, -1, 66, -1, -1, 66,
564 67, -1, 67, -1, 73, -1, -1, 13, 68, 105,
565 106, 69, -1, 64, 69, -1, 70, -1, -1, 70,
566 71, -1, 71, -1, 73, -1, 14, 105, 106, 72,
567 -1, 73, -1, -1, 73, 74, -1, 74, -1, 85,
568 -1, 15, 77, 75, 106, 78, -1, 10, 104, 106,
569 -1, 12, 111, 107, -1, -1, 50, -1, 49, -1,
570 77, 48, 76, -1, 76, -1, 79, 80, 83, 84,
571 -1, 85, -1, -1, 81, -1, -1, 81, 82, -1,
572 82, -1, 16, 104, 106, 79, -1, 16, 106, 85,
573 -1, 21, 85, -1, -1, 22, 85, -1, -1, 86,
574 -1, 87, -1, 87, 88, -1, 86, 88, -1, 88,
575 -1, 86, 89, -1, 89, -1, 94, 85, 43, -1,
576 93, 95, 43, -1, 27, 97, 43, -1, 26, 101,
577 43, -1, 92, 109, 43, -1, 9, 104, 107, -1,
578 11, 111, 107, -1, 52, -1, 35, 105, 43, -1,
579 89, 90, -1, 90, -1, 103, -1, 47, -1, 91,
580 104, 43, -1, 28, 85, 43, -1, 51, -1, 32,
581 -1, 38, -1, 34, -1, 39, -1, 31, -1, 36,
582 -1, 37, -1, 33, -1, 40, -1, 41, -1, 42,
583 -1, 23, -1, 24, -1, 25, -1, 30, -1, 29,
584 -1, 95, 45, 85, -1, 45, 85, -1, 45, 98,
585 -1, 97, 96, -1, 96, -1, 98, 44, 79, -1,
586 79, -1, 99, 45, 85, -1, 45, 85, -1, 99,
587 44, 79, -1, 101, 100, -1, 100, -1, 103, -1,
588 47, -1, 46, -1, 48, -1, 104, 103, -1, 103,
589 -1, 105, 102, -1, 102, -1, 51, -1, 52, -1,
590 106, -1, 0, -1, 103, -1, 106, -1, 109, 108,
591 -1, 108, -1, 110, 46, -1, 110, 47, -1, 46,
592 -1, 47, -1, 111, 48, 110, -1, 110, -1
595 /* YYRLINE[YYN] -- source line where rule number YYN was defined. */
596 static const yytype_uint16 yyrline[] =
598 0, 102, 102, 103, 106, 112, 116, 124, 125, 128,
599 129, 132, 133, 134, 137, 138, 139, 140, 143, 144,
600 145, 146, 149, 150, 153, 154, 155, 158, 158, 159,
601 162, 163, 166, 167, 168, 171, 174, 175, 178, 179,
602 180, 183, 190, 194, 197, 198, 209, 220, 221, 224,
603 233, 234, 237, 238, 241, 242, 245, 246, 249, 250,
604 253, 254, 262, 263, 266, 267, 268, 271, 272, 275,
605 276, 277, 278, 279, 280, 281, 284, 285, 288, 289,
606 292, 293, 294, 295, 296, 299, 300, 301, 302, 303,
607 304, 305, 306, 309, 310, 311, 314, 315, 316, 319,
608 320, 323, 324, 327, 330, 331, 334, 335, 338, 339,
609 342, 349, 350, 353, 354, 357, 358, 361, 362, 365,
610 366, 369, 370, 373, 374, 377, 378, 381, 382, 385,
611 386, 387, 388, 391, 392
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", "eoleof", "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, 107, 107, 108, 108, 109, 109, 110,
674 110, 110, 110, 111, 111
677 /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
678 static const yytype_uint8 yyr2[] =
680 0, 2, 1, 2, 4, 2, 3, 1, 0, 2,
681 1, 3, 3, 3, 1, 1, 1, 1, 1, 1,
682 1, 1, 1, 0, 2, 1, 1, 0, 5, 2,
683 1, 0, 2, 1, 1, 4, 1, 0, 2, 1,
684 1, 5, 3, 3, 0, 1, 1, 3, 1, 4,
685 1, 0, 1, 0, 2, 1, 4, 3, 2, 0,
686 2, 0, 1, 1, 2, 2, 1, 2, 1, 3,
687 3, 3, 3, 3, 3, 3, 1, 3, 2, 1,
688 1, 1, 3, 3, 1, 1, 1, 1, 1, 1,
689 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
690 1, 3, 2, 2, 2, 1, 3, 1, 3, 2,
691 3, 2, 1, 1, 1, 1, 1, 2, 1, 2,
692 1, 1, 1, 1, 1, 1, 1, 2, 1, 2,
693 2, 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, 121, 122, 0, 7,
702 0, 0, 0, 0, 27, 0, 20, 18, 19, 21,
703 96, 97, 98, 0, 0, 0, 100, 99, 89, 85,
704 92, 87, 0, 90, 91, 86, 88, 93, 94, 95,
705 115, 81, 116, 84, 76, 31, 5, 25, 26, 39,
706 40, 62, 63, 66, 68, 79, 0, 0, 0, 0,
707 80, 14, 15, 16, 0, 0, 17, 23, 10, 0,
708 1, 3, 23, 118, 0, 0, 131, 132, 134, 0,
709 0, 0, 46, 48, 44, 0, 0, 112, 0, 51,
710 105, 0, 0, 114, 120, 113, 0, 0, 29, 30,
711 33, 34, 24, 38, 65, 67, 64, 78, 0, 125,
712 126, 128, 0, 0, 0, 0, 0, 0, 9, 6,
713 22, 0, 4, 124, 117, 123, 74, 42, 129, 130,
714 0, 75, 43, 0, 0, 45, 0, 109, 51, 0,
715 72, 111, 107, 50, 103, 71, 104, 83, 77, 119,
716 0, 32, 82, 73, 127, 102, 70, 0, 69, 13,
717 12, 11, 133, 31, 47, 51, 110, 108, 51, 37,
718 101, 28, 41, 53, 106, 35, 36, 0, 59, 52,
719 55, 0, 0, 0, 61, 54, 51, 57, 58, 0,
720 49, 56, 60
723 /* YYDEFGOTO[NTERM-NUM]. */
724 static const yytype_int16 yydefgoto[] =
726 -1, 4, 5, 8, 67, 68, 69, 45, 119, 120,
727 47, 81, 98, 99, 100, 175, 48, 49, 136, 83,
728 84, 172, 142, 178, 179, 180, 184, 190, 50, 51,
729 52, 53, 54, 55, 56, 57, 58, 59, 114, 90,
730 91, 144, 86, 87, 88, 94, 60, 74, 96, 125,
731 126, 111, 112, 78, 79
734 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
735 STATE-NUM. */
736 #define YYPACT_NINF -125
737 static const yytype_int16 yypact[] =
739 -4, 78, 226, 150, 19, 139, -125, -125, 150, -125,
740 -35, -35, 100, 100, -125, -21, -125, -125, -125, -125,
741 -125, -125, -125, -10, -6, 348, -125, -125, -125, -125,
742 -125, -125, 54, -125, -125, -125, -125, -125, -125, -125,
743 -125, -125, -125, -125, -125, 270, 125, -125, 30, -125,
744 -125, 348, 382, -125, 58, -125, -35, 25, -2, 348,
745 -125, -125, -125, -125, 100, 100, -125, 182, -125, 54,
746 -125, -125, 182, -125, 7, 25, -125, -125, 104, 16,
747 16, 54, -125, -125, -23, 348, 117, -125, 74, 348,
748 -125, 80, 32, -125, -125, -125, 35, 54, -125, 71,
749 -125, 30, -125, -125, -125, 58, -125, -125, -31, -125,
750 -125, -125, -22, 348, 83, 64, 62, 62, -125, -125,
751 125, -15, -125, -125, -125, -125, -125, -125, -125, -125,
752 100, -125, -125, -15, -21, -125, 78, -125, 348, 348,
753 -125, -125, -125, -125, 93, -125, -125, -125, -125, -125,
754 -15, -125, -125, -125, -125, -125, -125, 348, -125, -125,
755 -125, -125, 104, 270, -125, 348, -125, -125, 348, 314,
756 -125, -125, -125, 102, -125, -125, 30, 25, 101, 102,
757 -125, 25, 348, 348, 109, -125, 348, -125, -125, 348,
758 -125, -125, -125
761 /* YYPGOTO[NTERM-NUM]. */
762 static const yytype_int16 yypgoto[] =
764 -125, -125, -125, -125, 140, 26, -125, -125, 97, 157,
765 -41, -125, 8, -125, 75, -125, -42, -40, -125, 39,
766 -125, -125, -124, -125, -125, 0, -125, -125, -5, -125,
767 -125, 113, 124, -48, -125, -125, -125, -125, -125, 91,
768 -125, -125, -125, 95, -125, -87, -9, -7, -59, -1,
769 87, 84, -125, 68, 5
772 /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
773 positive, shift that token. If negative, reduce the rule which
774 number is the opposite. If zero, do what YYDEFACT says.
775 If YYTABLE_NINF, syntax error. */
776 #define YYTABLE_NINF -3
777 static const yytype_int16 yytable[] =
779 9, 73, 73, 101, 75, 102, 107, 123, 103, 149,
780 121, 40, 152, 42, 166, 40, 123, 42, 80, 70,
781 92, 153, 133, 95, 40, 134, 42, 135, 82, 6,
782 7, 40, 93, 42, 149, 85, 6, 7, 150, 89,
783 11, 173, 13, 113, 174, 15, 149, 73, 109, 108,
784 1, 2, 3, 40, 115, 42, 110, 107, 6, 7,
785 95, 103, 191, 149, 130, 124, 124, 6, 7, 116,
786 117, 40, 95, 42, 127, 147, 6, 7, 148, 102,
787 137, 40, 93, 42, 143, 97, 25, 95, 95, 28,
788 29, 30, 31, 118, 33, 34, 35, 36, 118, 124,
789 40, 93, 42, 109, 40, 41, 42, 158, 155, 43,
790 130, 110, 95, 6, 7, 159, 160, 140, 177, 85,
791 161, 101, 183, 145, 95, 89, 156, 176, 157, 6,
792 7, 189, 163, 143, 167, 165, 103, 168, 14, -2,
793 71, 95, 16, 17, 18, 19, 76, 77, 72, 169,
794 128, 129, 170, 61, 62, 63, 64, 65, 66, 46,
795 143, 138, 139, 143, 104, 106, 131, 132, 73, 122,
796 181, 171, 124, 164, 151, 105, 182, 187, 188, 185,
797 186, 143, 146, 141, 192, 61, 62, 63, 64, 65,
798 66, 10, 11, 12, 13, 14, 154, 15, 162, 16,
799 17, 18, 19, 0, 0, 20, 21, 22, 23, 24,
800 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
801 35, 36, 37, 38, 39, 0, 0, 0, 40, 41,
802 42, 0, 0, 43, 44, 10, 11, 12, 13, 14,
803 0, 15, 0, 16, 17, 18, 19, 0, 0, 20,
804 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
805 31, 32, 33, 34, 35, 36, 37, 38, 39, 0,
806 0, 0, 40, 41, 42, 0, 0, 43, 44, 10,
807 11, 12, 13, 0, 97, 15, 0, 0, 0, 0,
808 0, 0, 0, 20, 21, 22, 23, 24, 25, 26,
809 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
810 37, 38, 39, 0, 0, 0, 40, 41, 42, 0,
811 0, 43, 44, 10, 11, 12, 13, 0, 0, 15,
812 0, 0, 0, 0, 0, 0, 0, 20, 21, 22,
813 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
814 33, 34, 35, 36, 37, 38, 39, 10, 0, 12,
815 40, 41, 42, 0, 0, 43, 44, 0, 0, 0,
816 0, 20, 21, 22, 23, 24, 25, 26, 27, 28,
817 29, 30, 31, 32, 33, 34, 35, 36, 37, 38,
818 39, 10, 0, 12, 40, 41, 42, 0, 0, 43,
819 44, 0, 0, 0, 0, 20, 21, 22, 23, 24,
820 0, 26, 27, 0, 0, 0, 0, 32, 0, 0,
821 0, 0, 37, 38, 39, 0, 0, 0, 0, 0,
822 0, 0, 0, 0, 44
825 static const yytype_int16 yycheck[] =
827 1, 10, 11, 45, 11, 46, 54, 0, 48, 96,
828 69, 46, 43, 48, 138, 46, 0, 48, 13, 0,
829 25, 43, 81, 32, 46, 48, 48, 50, 49, 51,
830 52, 46, 47, 48, 121, 45, 51, 52, 97, 45,
831 10, 165, 12, 45, 168, 15, 133, 56, 57, 56,
832 54, 55, 56, 46, 59, 48, 57, 105, 51, 52,
833 69, 101, 186, 150, 48, 74, 75, 51, 52, 64,
834 65, 46, 81, 48, 75, 43, 51, 52, 43, 120,
835 85, 46, 47, 48, 89, 14, 28, 96, 97, 31,
836 32, 33, 34, 67, 36, 37, 38, 39, 72, 108,
837 46, 47, 48, 112, 46, 47, 48, 43, 113, 51,
838 48, 112, 121, 51, 52, 116, 117, 43, 16, 45,
839 121, 163, 21, 43, 133, 45, 43, 169, 45, 51,
840 52, 22, 133, 138, 139, 136, 176, 44, 13, 0,
841 1, 150, 17, 18, 19, 20, 46, 47, 8, 150,
842 46, 47, 157, 3, 4, 5, 6, 7, 8, 2,
843 165, 44, 45, 168, 51, 52, 79, 80, 177, 72,
844 177, 163, 181, 134, 99, 51, 177, 182, 183, 179,
845 181, 186, 91, 88, 189, 3, 4, 5, 6, 7,
846 8, 9, 10, 11, 12, 13, 112, 15, 130, 17,
847 18, 19, 20, -1, -1, 23, 24, 25, 26, 27,
848 28, 29, 30, 31, 32, 33, 34, 35, 36, 37,
849 38, 39, 40, 41, 42, -1, -1, -1, 46, 47,
850 48, -1, -1, 51, 52, 9, 10, 11, 12, 13,
851 -1, 15, -1, 17, 18, 19, 20, -1, -1, 23,
852 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
853 34, 35, 36, 37, 38, 39, 40, 41, 42, -1,
854 -1, -1, 46, 47, 48, -1, -1, 51, 52, 9,
855 10, 11, 12, -1, 14, 15, -1, -1, -1, -1,
856 -1, -1, -1, 23, 24, 25, 26, 27, 28, 29,
857 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
858 40, 41, 42, -1, -1, -1, 46, 47, 48, -1,
859 -1, 51, 52, 9, 10, 11, 12, -1, -1, 15,
860 -1, -1, -1, -1, -1, -1, -1, 23, 24, 25,
861 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
862 36, 37, 38, 39, 40, 41, 42, 9, -1, 11,
863 46, 47, 48, -1, -1, 51, 52, -1, -1, -1,
864 -1, 23, 24, 25, 26, 27, 28, 29, 30, 31,
865 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
866 42, 9, -1, 11, 46, 47, 48, -1, -1, 51,
867 52, -1, -1, -1, -1, 23, 24, 25, 26, 27,
868 -1, 29, 30, -1, -1, -1, -1, 35, -1, -1,
869 -1, -1, 40, 41, 42, -1, -1, -1, -1, -1,
870 -1, -1, -1, -1, 52
873 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
874 symbol of state STATE-NUM. */
875 static const yytype_uint8 yystos[] =
877 0, 54, 55, 56, 58, 59, 51, 52, 60, 106,
878 9, 10, 11, 12, 13, 15, 17, 18, 19, 20,
879 23, 24, 25, 26, 27, 28, 29, 30, 31, 32,
880 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
881 46, 47, 48, 51, 52, 64, 66, 67, 73, 74,
882 85, 86, 87, 88, 89, 90, 91, 92, 93, 94,
883 103, 3, 4, 5, 6, 7, 8, 61, 62, 63,
884 0, 1, 61, 103, 104, 104, 46, 47, 110, 111,
885 111, 68, 49, 76, 77, 45, 99, 100, 101, 45,
886 96, 97, 85, 47, 102, 103, 105, 14, 69, 70,
887 71, 73, 67, 74, 88, 89, 88, 90, 104, 103,
888 106, 108, 109, 45, 95, 85, 111, 111, 62, 65,
889 66, 105, 65, 0, 103, 106, 107, 106, 46, 47,
890 48, 107, 107, 105, 48, 50, 75, 85, 44, 45,
891 43, 100, 79, 85, 98, 43, 96, 43, 43, 102,
892 105, 71, 43, 43, 108, 85, 43, 45, 43, 106,
893 106, 106, 110, 106, 76, 106, 79, 85, 44, 106,
894 85, 69, 78, 79, 79, 72, 73, 16, 80, 81,
895 82, 104, 106, 21, 83, 82, 106, 85, 85, 22,
896 84, 79, 85
899 #define yyerrok (yyerrstatus = 0)
900 #define yyclearin (yychar = YYEMPTY)
901 #define YYEMPTY (-2)
902 #define YYEOF 0
904 #define YYACCEPT goto yyacceptlab
905 #define YYABORT goto yyabortlab
906 #define YYERROR goto yyerrorlab
909 /* Like YYERROR except do call yyerror. This remains here temporarily
910 to ease the transition to the new meaning of YYERROR, for GCC.
911 Once GCC version 2 has supplanted version 1, this can go. */
913 #define YYFAIL goto yyerrlab
915 #define YYRECOVERING() (!!yyerrstatus)
917 #define YYBACKUP(Token, Value) \
918 do \
919 if (yychar == YYEMPTY && yylen == 1) \
921 yychar = (Token); \
922 yylval = (Value); \
923 yytoken = YYTRANSLATE (yychar); \
924 YYPOPSTACK (1); \
925 goto yybackup; \
927 else \
929 yyerror (YY_("syntax error: cannot back up")); \
930 YYERROR; \
932 while (YYID (0))
935 #define YYTERROR 1
936 #define YYERRCODE 256
939 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
940 If N is 0, then set CURRENT to the empty location which ends
941 the previous symbol: RHS[0] (always defined). */
943 #define YYRHSLOC(Rhs, K) ((Rhs)[K])
944 #ifndef YYLLOC_DEFAULT
945 # define YYLLOC_DEFAULT(Current, Rhs, N) \
946 do \
947 if (YYID (N)) \
949 (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
950 (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
951 (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
952 (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
954 else \
956 (Current).first_line = (Current).last_line = \
957 YYRHSLOC (Rhs, 0).last_line; \
958 (Current).first_column = (Current).last_column = \
959 YYRHSLOC (Rhs, 0).last_column; \
961 while (YYID (0))
962 #endif
965 /* YY_LOCATION_PRINT -- Print the location on the stream.
966 This macro was not mandated originally: define only if we know
967 we won't break user code: when these are the locations we know. */
969 #ifndef YY_LOCATION_PRINT
970 # if YYLTYPE_IS_TRIVIAL
971 # define YY_LOCATION_PRINT(File, Loc) \
972 fprintf (File, "%d.%d-%d.%d", \
973 (Loc).first_line, (Loc).first_column, \
974 (Loc).last_line, (Loc).last_column)
975 # else
976 # define YY_LOCATION_PRINT(File, Loc) ((void) 0)
977 # endif
978 #endif
981 /* YYLEX -- calling `yylex' with the right arguments. */
983 #ifdef YYLEX_PARAM
984 # define YYLEX yylex (YYLEX_PARAM)
985 #else
986 # define YYLEX yylex ()
987 #endif
989 /* Enable debugging if requested. */
990 #if YYDEBUG
992 # ifndef YYFPRINTF
993 # include <stdio.h> /* INFRINGES ON USER NAME SPACE */
994 # define YYFPRINTF fprintf
995 # endif
997 # define YYDPRINTF(Args) \
998 do { \
999 if (yydebug) \
1000 YYFPRINTF Args; \
1001 } while (YYID (0))
1003 # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1004 do { \
1005 if (yydebug) \
1007 YYFPRINTF (stderr, "%s ", Title); \
1008 yy_symbol_print (stderr, \
1009 Type, Value, Location); \
1010 YYFPRINTF (stderr, "\n"); \
1012 } while (YYID (0))
1015 /*--------------------------------.
1016 | Print this symbol on YYOUTPUT. |
1017 `--------------------------------*/
1019 /*ARGSUSED*/
1020 #if (defined __STDC__ || defined __C99__FUNC__ \
1021 || defined __cplusplus || defined _MSC_VER)
1022 static void
1023 yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1024 #else
1025 static void
1026 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp)
1027 FILE *yyoutput;
1028 int yytype;
1029 YYSTYPE const * const yyvaluep;
1030 YYLTYPE const * const yylocationp;
1031 #endif
1033 if (!yyvaluep)
1034 return;
1035 YYUSE (yylocationp);
1036 # ifdef YYPRINT
1037 if (yytype < YYNTOKENS)
1038 YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
1039 # else
1040 YYUSE (yyoutput);
1041 # endif
1042 switch (yytype)
1044 default:
1045 break;
1050 /*--------------------------------.
1051 | Print this symbol on YYOUTPUT. |
1052 `--------------------------------*/
1054 #if (defined __STDC__ || defined __C99__FUNC__ \
1055 || defined __cplusplus || defined _MSC_VER)
1056 static void
1057 yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp)
1058 #else
1059 static void
1060 yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp)
1061 FILE *yyoutput;
1062 int yytype;
1063 YYSTYPE const * const yyvaluep;
1064 YYLTYPE const * const yylocationp;
1065 #endif
1067 if (yytype < YYNTOKENS)
1068 YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
1069 else
1070 YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
1072 YY_LOCATION_PRINT (yyoutput, *yylocationp);
1073 YYFPRINTF (yyoutput, ": ");
1074 yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp);
1075 YYFPRINTF (yyoutput, ")");
1078 /*------------------------------------------------------------------.
1079 | yy_stack_print -- Print the state stack from its BOTTOM up to its |
1080 | TOP (included). |
1081 `------------------------------------------------------------------*/
1083 #if (defined __STDC__ || defined __C99__FUNC__ \
1084 || defined __cplusplus || defined _MSC_VER)
1085 static void
1086 yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
1087 #else
1088 static void
1089 yy_stack_print (yybottom, yytop)
1090 yytype_int16 *yybottom;
1091 yytype_int16 *yytop;
1092 #endif
1094 YYFPRINTF (stderr, "Stack now");
1095 for (; yybottom <= yytop; yybottom++)
1097 int yybot = *yybottom;
1098 YYFPRINTF (stderr, " %d", yybot);
1100 YYFPRINTF (stderr, "\n");
1103 # define YY_STACK_PRINT(Bottom, Top) \
1104 do { \
1105 if (yydebug) \
1106 yy_stack_print ((Bottom), (Top)); \
1107 } while (YYID (0))
1110 /*------------------------------------------------.
1111 | Report that the YYRULE is going to be reduced. |
1112 `------------------------------------------------*/
1114 #if (defined __STDC__ || defined __C99__FUNC__ \
1115 || defined __cplusplus || defined _MSC_VER)
1116 static void
1117 yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule)
1118 #else
1119 static void
1120 yy_reduce_print (yyvsp, yylsp, yyrule)
1121 YYSTYPE *yyvsp;
1122 YYLTYPE *yylsp;
1123 int yyrule;
1124 #endif
1126 int yynrhs = yyr2[yyrule];
1127 int yyi;
1128 unsigned long int yylno = yyrline[yyrule];
1129 YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
1130 yyrule - 1, yylno);
1131 /* The symbols being reduced. */
1132 for (yyi = 0; yyi < yynrhs; yyi++)
1134 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1135 yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
1136 &(yyvsp[(yyi + 1) - (yynrhs)])
1137 , &(yylsp[(yyi + 1) - (yynrhs)]) );
1138 YYFPRINTF (stderr, "\n");
1142 # define YY_REDUCE_PRINT(Rule) \
1143 do { \
1144 if (yydebug) \
1145 yy_reduce_print (yyvsp, yylsp, Rule); \
1146 } while (YYID (0))
1148 /* Nonzero means print parse trace. It is left uninitialized so that
1149 multiple parsers can coexist. */
1150 int yydebug;
1151 #else /* !YYDEBUG */
1152 # define YYDPRINTF(Args)
1153 # define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1154 # define YY_STACK_PRINT(Bottom, Top)
1155 # define YY_REDUCE_PRINT(Rule)
1156 #endif /* !YYDEBUG */
1159 /* YYINITDEPTH -- initial size of the parser's stacks. */
1160 #ifndef YYINITDEPTH
1161 # define YYINITDEPTH 200
1162 #endif
1164 /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1165 if the built-in stack extension method is used).
1167 Do not make this value too large; the results are undefined if
1168 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1169 evaluated with infinite-precision integer arithmetic. */
1171 #ifndef YYMAXDEPTH
1172 # define YYMAXDEPTH 10000
1173 #endif
1177 #if YYERROR_VERBOSE
1179 # ifndef yystrlen
1180 # if defined __GLIBC__ && defined _STRING_H
1181 # define yystrlen strlen
1182 # else
1183 /* Return the length of YYSTR. */
1184 #if (defined __STDC__ || defined __C99__FUNC__ \
1185 || defined __cplusplus || defined _MSC_VER)
1186 static YYSIZE_T
1187 yystrlen (const char *yystr)
1188 #else
1189 static YYSIZE_T
1190 yystrlen (yystr)
1191 const char *yystr;
1192 #endif
1194 YYSIZE_T yylen;
1195 for (yylen = 0; yystr[yylen]; yylen++)
1196 continue;
1197 return yylen;
1199 # endif
1200 # endif
1202 # ifndef yystpcpy
1203 # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1204 # define yystpcpy stpcpy
1205 # else
1206 /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1207 YYDEST. */
1208 #if (defined __STDC__ || defined __C99__FUNC__ \
1209 || defined __cplusplus || defined _MSC_VER)
1210 static char *
1211 yystpcpy (char *yydest, const char *yysrc)
1212 #else
1213 static char *
1214 yystpcpy (yydest, yysrc)
1215 char *yydest;
1216 const char *yysrc;
1217 #endif
1219 char *yyd = yydest;
1220 const char *yys = yysrc;
1222 while ((*yyd++ = *yys++) != '\0')
1223 continue;
1225 return yyd - 1;
1227 # endif
1228 # endif
1230 # ifndef yytnamerr
1231 /* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1232 quotes and backslashes, so that it's suitable for yyerror. The
1233 heuristic is that double-quoting is unnecessary unless the string
1234 contains an apostrophe, a comma, or backslash (other than
1235 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1236 null, do not copy; instead, return the length of what the result
1237 would have been. */
1238 static YYSIZE_T
1239 yytnamerr (char *yyres, const char *yystr)
1241 if (*yystr == '"')
1243 YYSIZE_T yyn = 0;
1244 char const *yyp = yystr;
1246 for (;;)
1247 switch (*++yyp)
1249 case '\'':
1250 case ',':
1251 goto do_not_strip_quotes;
1253 case '\\':
1254 if (*++yyp != '\\')
1255 goto do_not_strip_quotes;
1256 /* Fall through. */
1257 default:
1258 if (yyres)
1259 yyres[yyn] = *yyp;
1260 yyn++;
1261 break;
1263 case '"':
1264 if (yyres)
1265 yyres[yyn] = '\0';
1266 return yyn;
1268 do_not_strip_quotes: ;
1271 if (! yyres)
1272 return yystrlen (yystr);
1274 return yystpcpy (yyres, yystr) - yyres;
1276 # endif
1278 /* Copy into YYRESULT an error message about the unexpected token
1279 YYCHAR while in state YYSTATE. Return the number of bytes copied,
1280 including the terminating null byte. If YYRESULT is null, do not
1281 copy anything; just return the number of bytes that would be
1282 copied. As a special case, return 0 if an ordinary "syntax error"
1283 message will do. Return YYSIZE_MAXIMUM if overflow occurs during
1284 size calculation. */
1285 static YYSIZE_T
1286 yysyntax_error (char *yyresult, int yystate, int yychar)
1288 int yyn = yypact[yystate];
1290 if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
1291 return 0;
1292 else
1294 int yytype = YYTRANSLATE (yychar);
1295 YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
1296 YYSIZE_T yysize = yysize0;
1297 YYSIZE_T yysize1;
1298 int yysize_overflow = 0;
1299 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1300 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1301 int yyx;
1303 # if 0
1304 /* This is so xgettext sees the translatable formats that are
1305 constructed on the fly. */
1306 YY_("syntax error, unexpected %s");
1307 YY_("syntax error, unexpected %s, expecting %s");
1308 YY_("syntax error, unexpected %s, expecting %s or %s");
1309 YY_("syntax error, unexpected %s, expecting %s or %s or %s");
1310 YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
1311 # endif
1312 char *yyfmt;
1313 char const *yyf;
1314 static char const yyunexpected[] = "syntax error, unexpected %s";
1315 static char const yyexpecting[] = ", expecting %s";
1316 static char const yyor[] = " or %s";
1317 char yyformat[sizeof yyunexpected
1318 + sizeof yyexpecting - 1
1319 + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
1320 * (sizeof yyor - 1))];
1321 char const *yyprefix = yyexpecting;
1323 /* Start YYX at -YYN if negative to avoid negative indexes in
1324 YYCHECK. */
1325 int yyxbegin = yyn < 0 ? -yyn : 0;
1327 /* Stay within bounds of both yycheck and yytname. */
1328 int yychecklim = YYLAST - yyn + 1;
1329 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1330 int yycount = 1;
1332 yyarg[0] = yytname[yytype];
1333 yyfmt = yystpcpy (yyformat, yyunexpected);
1335 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1336 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
1338 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1340 yycount = 1;
1341 yysize = yysize0;
1342 yyformat[sizeof yyunexpected - 1] = '\0';
1343 break;
1345 yyarg[yycount++] = yytname[yyx];
1346 yysize1 = yysize + yytnamerr (0, yytname[yyx]);
1347 yysize_overflow |= (yysize1 < yysize);
1348 yysize = yysize1;
1349 yyfmt = yystpcpy (yyfmt, yyprefix);
1350 yyprefix = yyor;
1353 yyf = YY_(yyformat);
1354 yysize1 = yysize + yystrlen (yyf);
1355 yysize_overflow |= (yysize1 < yysize);
1356 yysize = yysize1;
1358 if (yysize_overflow)
1359 return YYSIZE_MAXIMUM;
1361 if (yyresult)
1363 /* Avoid sprintf, as that infringes on the user's name space.
1364 Don't have undefined behavior even if the translation
1365 produced a string with the wrong number of "%s"s. */
1366 char *yyp = yyresult;
1367 int yyi = 0;
1368 while ((*yyp = *yyf) != '\0')
1370 if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
1372 yyp += yytnamerr (yyp, yyarg[yyi++]);
1373 yyf += 2;
1375 else
1377 yyp++;
1378 yyf++;
1382 return yysize;
1385 #endif /* YYERROR_VERBOSE */
1388 /*-----------------------------------------------.
1389 | Release the memory associated to this symbol. |
1390 `-----------------------------------------------*/
1392 /*ARGSUSED*/
1393 #if (defined __STDC__ || defined __C99__FUNC__ \
1394 || defined __cplusplus || defined _MSC_VER)
1395 static void
1396 yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp)
1397 #else
1398 static void
1399 yydestruct (yymsg, yytype, yyvaluep, yylocationp)
1400 const char *yymsg;
1401 int yytype;
1402 YYSTYPE *yyvaluep;
1403 YYLTYPE *yylocationp;
1404 #endif
1406 YYUSE (yyvaluep);
1407 YYUSE (yylocationp);
1409 if (!yymsg)
1410 yymsg = "Deleting";
1411 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1413 switch (yytype)
1415 case 46: /* "\"text\"" */
1417 /* Line 1000 of yacc.c */
1418 #line 93 "SCDoc.y"
1419 { free((yyvaluep->str)); };
1421 /* Line 1000 of yacc.c */
1422 #line 1423 "SCDoc.tab.cpp"
1423 break;
1424 case 47: /* "URL" */
1426 /* Line 1000 of yacc.c */
1427 #line 93 "SCDoc.y"
1428 { free((yyvaluep->str)); };
1430 /* Line 1000 of yacc.c */
1431 #line 1432 "SCDoc.tab.cpp"
1432 break;
1433 case 48: /* "COMMA" */
1435 /* Line 1000 of yacc.c */
1436 #line 93 "SCDoc.y"
1437 { free((yyvaluep->str)); };
1439 /* Line 1000 of yacc.c */
1440 #line 1441 "SCDoc.tab.cpp"
1441 break;
1442 case 49: /* "\"method name\"" */
1444 /* Line 1000 of yacc.c */
1445 #line 93 "SCDoc.y"
1446 { free((yyvaluep->str)); };
1448 /* Line 1000 of yacc.c */
1449 #line 1450 "SCDoc.tab.cpp"
1450 break;
1451 case 50: /* "\"arguments string\"" */
1453 /* Line 1000 of yacc.c */
1454 #line 93 "SCDoc.y"
1455 { free((yyvaluep->str)); };
1457 /* Line 1000 of yacc.c */
1458 #line 1459 "SCDoc.tab.cpp"
1459 break;
1460 case 59: /* "document" */
1462 /* Line 1000 of yacc.c */
1463 #line 92 "SCDoc.y"
1464 { doc_node_free_tree((yyvaluep->doc_node)); };
1466 /* Line 1000 of yacc.c */
1467 #line 1468 "SCDoc.tab.cpp"
1468 break;
1469 case 61: /* "dochead" */
1471 /* Line 1000 of yacc.c */
1472 #line 92 "SCDoc.y"
1473 { doc_node_free_tree((yyvaluep->doc_node)); };
1475 /* Line 1000 of yacc.c */
1476 #line 1477 "SCDoc.tab.cpp"
1477 break;
1478 case 62: /* "headline" */
1480 /* Line 1000 of yacc.c */
1481 #line 92 "SCDoc.y"
1482 { doc_node_free_tree((yyvaluep->doc_node)); };
1484 /* Line 1000 of yacc.c */
1485 #line 1486 "SCDoc.tab.cpp"
1486 break;
1487 case 65: /* "optsections" */
1489 /* Line 1000 of yacc.c */
1490 #line 92 "SCDoc.y"
1491 { doc_node_free_tree((yyvaluep->doc_node)); };
1493 /* Line 1000 of yacc.c */
1494 #line 1495 "SCDoc.tab.cpp"
1495 break;
1496 case 66: /* "sections" */
1498 /* Line 1000 of yacc.c */
1499 #line 92 "SCDoc.y"
1500 { doc_node_free_tree((yyvaluep->doc_node)); };
1502 /* Line 1000 of yacc.c */
1503 #line 1504 "SCDoc.tab.cpp"
1504 break;
1505 case 67: /* "section" */
1507 /* Line 1000 of yacc.c */
1508 #line 92 "SCDoc.y"
1509 { doc_node_free_tree((yyvaluep->doc_node)); };
1511 /* Line 1000 of yacc.c */
1512 #line 1513 "SCDoc.tab.cpp"
1513 break;
1514 case 69: /* "optsubsections" */
1516 /* Line 1000 of yacc.c */
1517 #line 92 "SCDoc.y"
1518 { doc_node_free_tree((yyvaluep->doc_node)); };
1520 /* Line 1000 of yacc.c */
1521 #line 1522 "SCDoc.tab.cpp"
1522 break;
1523 case 70: /* "subsections" */
1525 /* Line 1000 of yacc.c */
1526 #line 92 "SCDoc.y"
1527 { doc_node_free_tree((yyvaluep->doc_node)); };
1529 /* Line 1000 of yacc.c */
1530 #line 1531 "SCDoc.tab.cpp"
1531 break;
1532 case 71: /* "subsection" */
1534 /* Line 1000 of yacc.c */
1535 #line 92 "SCDoc.y"
1536 { doc_node_free_tree((yyvaluep->doc_node)); };
1538 /* Line 1000 of yacc.c */
1539 #line 1540 "SCDoc.tab.cpp"
1540 break;
1541 case 72: /* "optsubsubsections" */
1543 /* Line 1000 of yacc.c */
1544 #line 92 "SCDoc.y"
1545 { doc_node_free_tree((yyvaluep->doc_node)); };
1547 /* Line 1000 of yacc.c */
1548 #line 1549 "SCDoc.tab.cpp"
1549 break;
1550 case 73: /* "subsubsections" */
1552 /* Line 1000 of yacc.c */
1553 #line 92 "SCDoc.y"
1554 { doc_node_free_tree((yyvaluep->doc_node)); };
1556 /* Line 1000 of yacc.c */
1557 #line 1558 "SCDoc.tab.cpp"
1558 break;
1559 case 74: /* "subsubsection" */
1561 /* Line 1000 of yacc.c */
1562 #line 92 "SCDoc.y"
1563 { doc_node_free_tree((yyvaluep->doc_node)); };
1565 /* Line 1000 of yacc.c */
1566 #line 1567 "SCDoc.tab.cpp"
1567 break;
1568 case 75: /* "optMETHODARGS" */
1570 /* Line 1000 of yacc.c */
1571 #line 93 "SCDoc.y"
1572 { free((yyvaluep->str)); };
1574 /* Line 1000 of yacc.c */
1575 #line 1576 "SCDoc.tab.cpp"
1576 break;
1577 case 76: /* "methodname" */
1579 /* Line 1000 of yacc.c */
1580 #line 93 "SCDoc.y"
1581 { free((yyvaluep->str)); };
1583 /* Line 1000 of yacc.c */
1584 #line 1585 "SCDoc.tab.cpp"
1585 break;
1586 case 77: /* "methnames" */
1588 /* Line 1000 of yacc.c */
1589 #line 92 "SCDoc.y"
1590 { doc_node_free_tree((yyvaluep->doc_node)); };
1592 /* Line 1000 of yacc.c */
1593 #line 1594 "SCDoc.tab.cpp"
1594 break;
1595 case 78: /* "methodbody" */
1597 /* Line 1000 of yacc.c */
1598 #line 92 "SCDoc.y"
1599 { doc_node_free_tree((yyvaluep->doc_node)); };
1601 /* Line 1000 of yacc.c */
1602 #line 1603 "SCDoc.tab.cpp"
1603 break;
1604 case 79: /* "optbody" */
1606 /* Line 1000 of yacc.c */
1607 #line 92 "SCDoc.y"
1608 { doc_node_free_tree((yyvaluep->doc_node)); };
1610 /* Line 1000 of yacc.c */
1611 #line 1612 "SCDoc.tab.cpp"
1612 break;
1613 case 80: /* "optargs" */
1615 /* Line 1000 of yacc.c */
1616 #line 92 "SCDoc.y"
1617 { doc_node_free_tree((yyvaluep->doc_node)); };
1619 /* Line 1000 of yacc.c */
1620 #line 1621 "SCDoc.tab.cpp"
1621 break;
1622 case 81: /* "args" */
1624 /* Line 1000 of yacc.c */
1625 #line 92 "SCDoc.y"
1626 { doc_node_free_tree((yyvaluep->doc_node)); };
1628 /* Line 1000 of yacc.c */
1629 #line 1630 "SCDoc.tab.cpp"
1630 break;
1631 case 82: /* "arg" */
1633 /* Line 1000 of yacc.c */
1634 #line 92 "SCDoc.y"
1635 { doc_node_free_tree((yyvaluep->doc_node)); };
1637 /* Line 1000 of yacc.c */
1638 #line 1639 "SCDoc.tab.cpp"
1639 break;
1640 case 83: /* "optreturns" */
1642 /* Line 1000 of yacc.c */
1643 #line 92 "SCDoc.y"
1644 { doc_node_free_tree((yyvaluep->doc_node)); };
1646 /* Line 1000 of yacc.c */
1647 #line 1648 "SCDoc.tab.cpp"
1648 break;
1649 case 84: /* "optdiscussion" */
1651 /* Line 1000 of yacc.c */
1652 #line 92 "SCDoc.y"
1653 { doc_node_free_tree((yyvaluep->doc_node)); };
1655 /* Line 1000 of yacc.c */
1656 #line 1657 "SCDoc.tab.cpp"
1657 break;
1658 case 85: /* "body" */
1660 /* Line 1000 of yacc.c */
1661 #line 92 "SCDoc.y"
1662 { doc_node_free_tree((yyvaluep->doc_node)); };
1664 /* Line 1000 of yacc.c */
1665 #line 1666 "SCDoc.tab.cpp"
1666 break;
1667 case 86: /* "blockA" */
1669 /* Line 1000 of yacc.c */
1670 #line 92 "SCDoc.y"
1671 { doc_node_free_tree((yyvaluep->doc_node)); };
1673 /* Line 1000 of yacc.c */
1674 #line 1675 "SCDoc.tab.cpp"
1675 break;
1676 case 87: /* "blockB" */
1678 /* Line 1000 of yacc.c */
1679 #line 92 "SCDoc.y"
1680 { doc_node_free_tree((yyvaluep->doc_node)); };
1682 /* Line 1000 of yacc.c */
1683 #line 1684 "SCDoc.tab.cpp"
1684 break;
1685 case 88: /* "bodyelem" */
1687 /* Line 1000 of yacc.c */
1688 #line 92 "SCDoc.y"
1689 { doc_node_free_tree((yyvaluep->doc_node)); };
1691 /* Line 1000 of yacc.c */
1692 #line 1693 "SCDoc.tab.cpp"
1693 break;
1694 case 89: /* "prose" */
1696 /* Line 1000 of yacc.c */
1697 #line 92 "SCDoc.y"
1698 { doc_node_free_tree((yyvaluep->doc_node)); };
1700 /* Line 1000 of yacc.c */
1701 #line 1702 "SCDoc.tab.cpp"
1702 break;
1703 case 90: /* "proseelem" */
1705 /* Line 1000 of yacc.c */
1706 #line 92 "SCDoc.y"
1707 { doc_node_free_tree((yyvaluep->doc_node)); };
1709 /* Line 1000 of yacc.c */
1710 #line 1711 "SCDoc.tab.cpp"
1711 break;
1712 case 95: /* "listbody" */
1714 /* Line 1000 of yacc.c */
1715 #line 92 "SCDoc.y"
1716 { doc_node_free_tree((yyvaluep->doc_node)); };
1718 /* Line 1000 of yacc.c */
1719 #line 1720 "SCDoc.tab.cpp"
1720 break;
1721 case 96: /* "tablerow" */
1723 /* Line 1000 of yacc.c */
1724 #line 92 "SCDoc.y"
1725 { doc_node_free_tree((yyvaluep->doc_node)); };
1727 /* Line 1000 of yacc.c */
1728 #line 1729 "SCDoc.tab.cpp"
1729 break;
1730 case 97: /* "tablebody" */
1732 /* Line 1000 of yacc.c */
1733 #line 92 "SCDoc.y"
1734 { doc_node_free_tree((yyvaluep->doc_node)); };
1736 /* Line 1000 of yacc.c */
1737 #line 1738 "SCDoc.tab.cpp"
1738 break;
1739 case 98: /* "tablecells" */
1741 /* Line 1000 of yacc.c */
1742 #line 92 "SCDoc.y"
1743 { doc_node_free_tree((yyvaluep->doc_node)); };
1745 /* Line 1000 of yacc.c */
1746 #line 1747 "SCDoc.tab.cpp"
1747 break;
1748 case 99: /* "defterms" */
1750 /* Line 1000 of yacc.c */
1751 #line 92 "SCDoc.y"
1752 { doc_node_free_tree((yyvaluep->doc_node)); };
1754 /* Line 1000 of yacc.c */
1755 #line 1756 "SCDoc.tab.cpp"
1756 break;
1757 case 100: /* "deflistrow" */
1759 /* Line 1000 of yacc.c */
1760 #line 92 "SCDoc.y"
1761 { doc_node_free_tree((yyvaluep->doc_node)); };
1763 /* Line 1000 of yacc.c */
1764 #line 1765 "SCDoc.tab.cpp"
1765 break;
1766 case 101: /* "deflistbody" */
1768 /* Line 1000 of yacc.c */
1769 #line 92 "SCDoc.y"
1770 { doc_node_free_tree((yyvaluep->doc_node)); };
1772 /* Line 1000 of yacc.c */
1773 #line 1774 "SCDoc.tab.cpp"
1774 break;
1775 case 102: /* "anywordurl" */
1777 /* Line 1000 of yacc.c */
1778 #line 93 "SCDoc.y"
1779 { free((yyvaluep->str)); };
1781 /* Line 1000 of yacc.c */
1782 #line 1783 "SCDoc.tab.cpp"
1783 break;
1784 case 103: /* "anyword" */
1786 /* Line 1000 of yacc.c */
1787 #line 93 "SCDoc.y"
1788 { free((yyvaluep->str)); };
1790 /* Line 1000 of yacc.c */
1791 #line 1792 "SCDoc.tab.cpp"
1792 break;
1793 case 104: /* "words" */
1795 /* Line 1000 of yacc.c */
1796 #line 93 "SCDoc.y"
1797 { free((yyvaluep->str)); };
1799 /* Line 1000 of yacc.c */
1800 #line 1801 "SCDoc.tab.cpp"
1801 break;
1802 case 105: /* "words2" */
1804 /* Line 1000 of yacc.c */
1805 #line 93 "SCDoc.y"
1806 { free((yyvaluep->str)); };
1808 /* Line 1000 of yacc.c */
1809 #line 1810 "SCDoc.tab.cpp"
1810 break;
1811 case 108: /* "anywordnl" */
1813 /* Line 1000 of yacc.c */
1814 #line 93 "SCDoc.y"
1815 { free((yyvaluep->str)); };
1817 /* Line 1000 of yacc.c */
1818 #line 1819 "SCDoc.tab.cpp"
1819 break;
1820 case 109: /* "wordsnl" */
1822 /* Line 1000 of yacc.c */
1823 #line 93 "SCDoc.y"
1824 { free((yyvaluep->str)); };
1826 /* Line 1000 of yacc.c */
1827 #line 1828 "SCDoc.tab.cpp"
1828 break;
1829 case 110: /* "nocommawords" */
1831 /* Line 1000 of yacc.c */
1832 #line 93 "SCDoc.y"
1833 { free((yyvaluep->str)); };
1835 /* Line 1000 of yacc.c */
1836 #line 1837 "SCDoc.tab.cpp"
1837 break;
1838 case 111: /* "commalist" */
1840 /* Line 1000 of yacc.c */
1841 #line 92 "SCDoc.y"
1842 { doc_node_free_tree((yyvaluep->doc_node)); };
1844 /* Line 1000 of yacc.c */
1845 #line 1846 "SCDoc.tab.cpp"
1846 break;
1848 default:
1849 break;
1853 /* Prevent warnings from -Wmissing-prototypes. */
1854 #ifdef YYPARSE_PARAM
1855 #if defined __STDC__ || defined __cplusplus
1856 int yyparse (void *YYPARSE_PARAM);
1857 #else
1858 int yyparse ();
1859 #endif
1860 #else /* ! YYPARSE_PARAM */
1861 #if defined __STDC__ || defined __cplusplus
1862 int yyparse (void);
1863 #else
1864 int yyparse ();
1865 #endif
1866 #endif /* ! YYPARSE_PARAM */
1869 /* The lookahead symbol. */
1870 int yychar;
1872 /* The semantic value of the lookahead symbol. */
1873 YYSTYPE yylval;
1875 /* Location data for the lookahead symbol. */
1876 YYLTYPE yylloc;
1878 /* Number of syntax errors so far. */
1879 int yynerrs;
1883 /*-------------------------.
1884 | yyparse or yypush_parse. |
1885 `-------------------------*/
1887 #ifdef YYPARSE_PARAM
1888 #if (defined __STDC__ || defined __C99__FUNC__ \
1889 || defined __cplusplus || defined _MSC_VER)
1891 yyparse (void *YYPARSE_PARAM)
1892 #else
1894 yyparse (YYPARSE_PARAM)
1895 void *YYPARSE_PARAM;
1896 #endif
1897 #else /* ! YYPARSE_PARAM */
1898 #if (defined __STDC__ || defined __C99__FUNC__ \
1899 || defined __cplusplus || defined _MSC_VER)
1901 yyparse (void)
1902 #else
1904 yyparse ()
1906 #endif
1907 #endif
1911 int yystate;
1912 /* Number of tokens to shift before error messages enabled. */
1913 int yyerrstatus;
1915 /* The stacks and their tools:
1916 `yyss': related to states.
1917 `yyvs': related to semantic values.
1918 `yyls': related to locations.
1920 Refer to the stacks thru separate pointers, to allow yyoverflow
1921 to reallocate them elsewhere. */
1923 /* The state stack. */
1924 yytype_int16 yyssa[YYINITDEPTH];
1925 yytype_int16 *yyss;
1926 yytype_int16 *yyssp;
1928 /* The semantic value stack. */
1929 YYSTYPE yyvsa[YYINITDEPTH];
1930 YYSTYPE *yyvs;
1931 YYSTYPE *yyvsp;
1933 /* The location stack. */
1934 YYLTYPE yylsa[YYINITDEPTH];
1935 YYLTYPE *yyls;
1936 YYLTYPE *yylsp;
1938 /* The locations where the error started and ended. */
1939 YYLTYPE yyerror_range[2];
1941 YYSIZE_T yystacksize;
1943 int yyn;
1944 int yyresult;
1945 /* Lookahead token as an internal (translated) token number. */
1946 int yytoken;
1947 /* The variables used to return semantic value and location from the
1948 action routines. */
1949 YYSTYPE yyval;
1950 YYLTYPE yyloc;
1952 #if YYERROR_VERBOSE
1953 /* Buffer for error messages, and its allocated size. */
1954 char yymsgbuf[128];
1955 char *yymsg = yymsgbuf;
1956 YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
1957 #endif
1959 #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N))
1961 /* The number of symbols on the RHS of the reduced rule.
1962 Keep to zero when no symbol should be popped. */
1963 int yylen = 0;
1965 yytoken = 0;
1966 yyss = yyssa;
1967 yyvs = yyvsa;
1968 yyls = yylsa;
1969 yystacksize = YYINITDEPTH;
1971 YYDPRINTF ((stderr, "Starting parse\n"));
1973 yystate = 0;
1974 yyerrstatus = 0;
1975 yynerrs = 0;
1976 yychar = YYEMPTY; /* Cause a token to be read. */
1978 /* Initialize stack pointers.
1979 Waste one element of value and location stack
1980 so that they stay on the same level as the state stack.
1981 The wasted elements are never initialized. */
1982 yyssp = yyss;
1983 yyvsp = yyvs;
1984 yylsp = yyls;
1986 #if YYLTYPE_IS_TRIVIAL
1987 /* Initialize the default location before parsing starts. */
1988 yylloc.first_line = yylloc.last_line = 1;
1989 yylloc.first_column = yylloc.last_column = 1;
1990 #endif
1992 goto yysetstate;
1994 /*------------------------------------------------------------.
1995 | yynewstate -- Push a new state, which is found in yystate. |
1996 `------------------------------------------------------------*/
1997 yynewstate:
1998 /* In all cases, when you get here, the value and location stacks
1999 have just been pushed. So pushing a state here evens the stacks. */
2000 yyssp++;
2002 yysetstate:
2003 *yyssp = yystate;
2005 if (yyss + yystacksize - 1 <= yyssp)
2007 /* Get the current used size of the three stacks, in elements. */
2008 YYSIZE_T yysize = yyssp - yyss + 1;
2010 #ifdef yyoverflow
2012 /* Give user a chance to reallocate the stack. Use copies of
2013 these so that the &'s don't force the real ones into
2014 memory. */
2015 YYSTYPE *yyvs1 = yyvs;
2016 yytype_int16 *yyss1 = yyss;
2017 YYLTYPE *yyls1 = yyls;
2019 /* Each stack pointer address is followed by the size of the
2020 data in use in that stack, in bytes. This used to be a
2021 conditional around just the two extra args, but that might
2022 be undefined if yyoverflow is a macro. */
2023 yyoverflow (YY_("memory exhausted"),
2024 &yyss1, yysize * sizeof (*yyssp),
2025 &yyvs1, yysize * sizeof (*yyvsp),
2026 &yyls1, yysize * sizeof (*yylsp),
2027 &yystacksize);
2029 yyls = yyls1;
2030 yyss = yyss1;
2031 yyvs = yyvs1;
2033 #else /* no yyoverflow */
2034 # ifndef YYSTACK_RELOCATE
2035 goto yyexhaustedlab;
2036 # else
2037 /* Extend the stack our own way. */
2038 if (YYMAXDEPTH <= yystacksize)
2039 goto yyexhaustedlab;
2040 yystacksize *= 2;
2041 if (YYMAXDEPTH < yystacksize)
2042 yystacksize = YYMAXDEPTH;
2045 yytype_int16 *yyss1 = yyss;
2046 union yyalloc *yyptr =
2047 (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
2048 if (! yyptr)
2049 goto yyexhaustedlab;
2050 YYSTACK_RELOCATE (yyss_alloc, yyss);
2051 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
2052 YYSTACK_RELOCATE (yyls_alloc, yyls);
2053 # undef YYSTACK_RELOCATE
2054 if (yyss1 != yyssa)
2055 YYSTACK_FREE (yyss1);
2057 # endif
2058 #endif /* no yyoverflow */
2060 yyssp = yyss + yysize - 1;
2061 yyvsp = yyvs + yysize - 1;
2062 yylsp = yyls + yysize - 1;
2064 YYDPRINTF ((stderr, "Stack size increased to %lu\n",
2065 (unsigned long int) yystacksize));
2067 if (yyss + yystacksize - 1 <= yyssp)
2068 YYABORT;
2071 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
2073 if (yystate == YYFINAL)
2074 YYACCEPT;
2076 goto yybackup;
2078 /*-----------.
2079 | yybackup. |
2080 `-----------*/
2081 yybackup:
2083 /* Do appropriate processing given the current state. Read a
2084 lookahead token if we need one and don't already have one. */
2086 /* First try to decide what to do without reference to lookahead token. */
2087 yyn = yypact[yystate];
2088 if (yyn == YYPACT_NINF)
2089 goto yydefault;
2091 /* Not known => get a lookahead token if don't already have one. */
2093 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
2094 if (yychar == YYEMPTY)
2096 YYDPRINTF ((stderr, "Reading a token: "));
2097 yychar = YYLEX;
2100 if (yychar <= YYEOF)
2102 yychar = yytoken = YYEOF;
2103 YYDPRINTF ((stderr, "Now at end of input.\n"));
2105 else
2107 yytoken = YYTRANSLATE (yychar);
2108 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
2111 /* If the proper action on seeing token YYTOKEN is to reduce or to
2112 detect an error, take that action. */
2113 yyn += yytoken;
2114 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
2115 goto yydefault;
2116 yyn = yytable[yyn];
2117 if (yyn <= 0)
2119 if (yyn == 0 || yyn == YYTABLE_NINF)
2120 goto yyerrlab;
2121 yyn = -yyn;
2122 goto yyreduce;
2125 /* Count tokens shifted since error; after three, turn off error
2126 status. */
2127 if (yyerrstatus)
2128 yyerrstatus--;
2130 /* Shift the lookahead token. */
2131 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
2133 /* Discard the shifted token. */
2134 yychar = YYEMPTY;
2136 yystate = yyn;
2137 *++yyvsp = yylval;
2138 *++yylsp = yylloc;
2139 goto yynewstate;
2142 /*-----------------------------------------------------------.
2143 | yydefault -- do the default action for the current state. |
2144 `-----------------------------------------------------------*/
2145 yydefault:
2146 yyn = yydefact[yystate];
2147 if (yyn == 0)
2148 goto yyerrlab;
2149 goto yyreduce;
2152 /*-----------------------------.
2153 | yyreduce -- Do a reduction. |
2154 `-----------------------------*/
2155 yyreduce:
2156 /* yyn is the number of a rule to reduce with. */
2157 yylen = yyr2[yyn];
2159 /* If YYLEN is nonzero, implement the default value of the action:
2160 `$$ = $1'.
2162 Otherwise, the following line sets YYVAL to garbage.
2163 This behavior is undocumented and Bison
2164 users should not rely upon it. Assigning to YYVAL
2165 unconditionally makes the parser a bit smaller, and it avoids a
2166 GCC warning that YYVAL may be used uninitialized. */
2167 yyval = yyvsp[1-yylen];
2169 /* Default location. */
2170 YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
2171 YY_REDUCE_PRINT (yyn);
2172 switch (yyn)
2174 case 2:
2176 /* Line 1455 of yacc.c */
2177 #line 102 "SCDoc.y"
2178 { topnode = (yyvsp[(1) - (1)].doc_node); ;}
2179 break;
2181 case 3:
2183 /* Line 1455 of yacc.c */
2184 #line 103 "SCDoc.y"
2185 { topnode = NULL; doc_node_free_tree((yyvsp[(1) - (2)].doc_node)); ;}
2186 break;
2188 case 4:
2190 /* Line 1455 of yacc.c */
2191 #line 107 "SCDoc.y"
2193 (yyval.doc_node) = doc_node_create("DOCUMENT");
2194 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2195 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2197 break;
2199 case 5:
2201 /* Line 1455 of yacc.c */
2202 #line 113 "SCDoc.y"
2204 (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(2) - (2)].doc_node));
2206 break;
2208 case 6:
2210 /* Line 1455 of yacc.c */
2211 #line 117 "SCDoc.y"
2213 (yyval.doc_node) = doc_node_create("DOCUMENT");
2214 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (3)].doc_node));
2215 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (3)].doc_node));
2217 break;
2219 case 9:
2221 /* Line 1455 of yacc.c */
2222 #line 128 "SCDoc.y"
2223 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2224 break;
2226 case 10:
2228 /* Line 1455 of yacc.c */
2229 #line 129 "SCDoc.y"
2230 { (yyval.doc_node) = doc_node_make("HEADER",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2231 break;
2233 case 11:
2235 /* Line 1455 of yacc.c */
2236 #line 132 "SCDoc.y"
2237 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2238 break;
2240 case 12:
2242 /* Line 1455 of yacc.c */
2243 #line 133 "SCDoc.y"
2244 { (yyval.doc_node) = doc_node_make_take_children("CATEGORIES",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2245 break;
2247 case 13:
2249 /* Line 1455 of yacc.c */
2250 #line 134 "SCDoc.y"
2251 { (yyval.doc_node) = doc_node_make_take_children("RELATED",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2252 break;
2254 case 14:
2256 /* Line 1455 of yacc.c */
2257 #line 137 "SCDoc.y"
2258 { (yyval.id) = "TITLE"; ;}
2259 break;
2261 case 15:
2263 /* Line 1455 of yacc.c */
2264 #line 138 "SCDoc.y"
2265 { (yyval.id) = "TITLE"; ;}
2266 break;
2268 case 16:
2270 /* Line 1455 of yacc.c */
2271 #line 139 "SCDoc.y"
2272 { (yyval.id) = "SUMMARY"; ;}
2273 break;
2275 case 17:
2277 /* Line 1455 of yacc.c */
2278 #line 140 "SCDoc.y"
2279 { (yyval.id) = "REDIRECT"; ;}
2280 break;
2282 case 18:
2284 /* Line 1455 of yacc.c */
2285 #line 143 "SCDoc.y"
2286 { (yyval.id) = "CLASSMETHODS"; method_type = "CMETHOD"; ;}
2287 break;
2289 case 19:
2291 /* Line 1455 of yacc.c */
2292 #line 144 "SCDoc.y"
2293 { (yyval.id) = "INSTANCEMETHODS"; method_type = "IMETHOD"; ;}
2294 break;
2296 case 20:
2298 /* Line 1455 of yacc.c */
2299 #line 145 "SCDoc.y"
2300 { (yyval.id) = "DESCRIPTION"; method_type = "METHOD"; ;}
2301 break;
2303 case 21:
2305 /* Line 1455 of yacc.c */
2306 #line 146 "SCDoc.y"
2307 { (yyval.id) = "EXAMPLES"; method_type = "METHOD"; ;}
2308 break;
2310 case 23:
2312 /* Line 1455 of yacc.c */
2313 #line 150 "SCDoc.y"
2314 { (yyval.doc_node) = doc_node_make("BODY",NULL,NULL); ;}
2315 break;
2317 case 24:
2319 /* Line 1455 of yacc.c */
2320 #line 153 "SCDoc.y"
2321 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2322 break;
2324 case 25:
2326 /* Line 1455 of yacc.c */
2327 #line 154 "SCDoc.y"
2328 { (yyval.doc_node) = doc_node_make("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2329 break;
2331 case 26:
2333 /* Line 1455 of yacc.c */
2334 #line 155 "SCDoc.y"
2335 { (yyval.doc_node) = doc_node_make_take_children("BODY",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2336 break;
2338 case 27:
2340 /* Line 1455 of yacc.c */
2341 #line 158 "SCDoc.y"
2342 { method_type = "METHOD"; ;}
2343 break;
2345 case 28:
2347 /* Line 1455 of yacc.c */
2348 #line 158 "SCDoc.y"
2349 { (yyval.doc_node) = doc_node_make_take_children("SECTION",(yyvsp[(3) - (5)].str),(yyvsp[(5) - (5)].doc_node)); ;}
2350 break;
2352 case 29:
2354 /* Line 1455 of yacc.c */
2355 #line 159 "SCDoc.y"
2356 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (2)].id), NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2357 break;
2359 case 31:
2361 /* Line 1455 of yacc.c */
2362 #line 163 "SCDoc.y"
2363 { (yyval.doc_node) = NULL; ;}
2364 break;
2366 case 32:
2368 /* Line 1455 of yacc.c */
2369 #line 166 "SCDoc.y"
2370 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2371 break;
2373 case 33:
2375 /* Line 1455 of yacc.c */
2376 #line 167 "SCDoc.y"
2377 { (yyval.doc_node) = doc_node_make("(SUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2378 break;
2380 case 35:
2382 /* Line 1455 of yacc.c */
2383 #line 171 "SCDoc.y"
2384 { (yyval.doc_node) = doc_node_make_take_children("SUBSECTION", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); ;}
2385 break;
2387 case 37:
2389 /* Line 1455 of yacc.c */
2390 #line 175 "SCDoc.y"
2391 { (yyval.doc_node) = NULL; ;}
2392 break;
2394 case 38:
2396 /* Line 1455 of yacc.c */
2397 #line 178 "SCDoc.y"
2398 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2399 break;
2401 case 39:
2403 /* Line 1455 of yacc.c */
2404 #line 179 "SCDoc.y"
2405 { (yyval.doc_node) = doc_node_make("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2406 break;
2408 case 40:
2410 /* Line 1455 of yacc.c */
2411 #line 180 "SCDoc.y"
2412 { (yyval.doc_node) = doc_node_make_take_children("(SUBSUBSECTIONS)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2413 break;
2415 case 41:
2417 /* Line 1455 of yacc.c */
2418 #line 184 "SCDoc.y"
2420 (yyvsp[(2) - (5)].doc_node)->id = "METHODNAMES";
2421 (yyval.doc_node) = doc_node_make(method_type,(yyvsp[(3) - (5)].str),(yyvsp[(2) - (5)].doc_node));
2422 doc_node_add_child((yyval.doc_node), (yyvsp[(5) - (5)].doc_node));
2423 // doc_node_add_child($2, $3);
2425 break;
2427 case 42:
2429 /* Line 1455 of yacc.c */
2430 #line 190 "SCDoc.y"
2431 { (yyval.doc_node) = doc_node_make(
2432 method_type=="CMETHOD"?"CCOPYMETHOD":(method_type=="IMETHOD"?"ICOPYMETHOD":"COPYMETHOD"),
2433 (yyvsp[(2) - (3)].str),NULL
2434 ); ;}
2435 break;
2437 case 43:
2439 /* Line 1455 of yacc.c */
2440 #line 194 "SCDoc.y"
2441 { (yyval.doc_node) = doc_node_make_take_children(method_type=="CMETHOD"?"CPRIVATE":"IPRIVATE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2442 break;
2444 case 44:
2446 /* Line 1455 of yacc.c */
2447 #line 197 "SCDoc.y"
2448 { (yyval.str) = NULL; ;}
2449 break;
2451 case 45:
2453 /* Line 1455 of yacc.c */
2454 #line 199 "SCDoc.y"
2456 // $$ = doc_node_make("ARGSTRING",$1,NULL);
2457 (yyval.str) = (yyvsp[(1) - (1)].str);
2458 if(method_type!="METHOD") {
2459 yyerror("METHOD argument string is not allowed inside CLASSMETHODS or INSTANCEMETHODS");
2460 YYERROR;
2463 break;
2465 case 46:
2467 /* Line 1455 of yacc.c */
2468 #line 210 "SCDoc.y"
2470 char *p = (yyvsp[(1) - (1)].str)+strlen((yyvsp[(1) - (1)].str))-1;
2471 if(*p=='_') {
2472 post("WARNING: SCDoc: In %s\n Property setter %s should be documented without underscore.\n", scdoc_current_file, (yyvsp[(1) - (1)].str));
2473 *p = '\0';
2475 (yyval.str) = (yyvsp[(1) - (1)].str);
2477 break;
2479 case 47:
2481 /* Line 1455 of yacc.c */
2482 #line 220 "SCDoc.y"
2483 { free((yyvsp[(2) - (3)].str)); (yyvsp[(2) - (3)].str) = NULL; (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make("STRING",(yyvsp[(3) - (3)].str),NULL)); ;}
2484 break;
2486 case 48:
2488 /* Line 1455 of yacc.c */
2489 #line 221 "SCDoc.y"
2490 { (yyval.doc_node) = doc_node_make("(METHODNAMES)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); ;}
2491 break;
2493 case 49:
2495 /* Line 1455 of yacc.c */
2496 #line 225 "SCDoc.y"
2498 (yyval.doc_node) = doc_node_make_take_children("METHODBODY",NULL,(yyvsp[(1) - (4)].doc_node));
2499 doc_node_add_child((yyval.doc_node), (yyvsp[(2) - (4)].doc_node));
2500 doc_node_add_child((yyval.doc_node), (yyvsp[(3) - (4)].doc_node));
2501 doc_node_add_child((yyval.doc_node), (yyvsp[(4) - (4)].doc_node));
2503 break;
2505 case 51:
2507 /* Line 1455 of yacc.c */
2508 #line 234 "SCDoc.y"
2509 { (yyval.doc_node) = NULL; ;}
2510 break;
2512 case 53:
2514 /* Line 1455 of yacc.c */
2515 #line 238 "SCDoc.y"
2516 { (yyval.doc_node) = NULL; ;}
2517 break;
2519 case 54:
2521 /* Line 1455 of yacc.c */
2522 #line 241 "SCDoc.y"
2523 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2524 break;
2526 case 55:
2528 /* Line 1455 of yacc.c */
2529 #line 242 "SCDoc.y"
2530 { (yyval.doc_node) = doc_node_make("ARGUMENTS",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2531 break;
2533 case 56:
2535 /* Line 1455 of yacc.c */
2536 #line 245 "SCDoc.y"
2537 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", (yyvsp[(2) - (4)].str), (yyvsp[(4) - (4)].doc_node)); ;}
2538 break;
2540 case 57:
2542 /* Line 1455 of yacc.c */
2543 #line 246 "SCDoc.y"
2544 { (yyval.doc_node) = doc_node_make_take_children("ARGUMENT", NULL, (yyvsp[(3) - (3)].doc_node)); ;}
2545 break;
2547 case 58:
2549 /* Line 1455 of yacc.c */
2550 #line 249 "SCDoc.y"
2551 { (yyval.doc_node) = doc_node_make_take_children("RETURNS",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2552 break;
2554 case 59:
2556 /* Line 1455 of yacc.c */
2557 #line 250 "SCDoc.y"
2558 { (yyval.doc_node) = NULL; ;}
2559 break;
2561 case 60:
2563 /* Line 1455 of yacc.c */
2564 #line 253 "SCDoc.y"
2565 { (yyval.doc_node) = doc_node_make_take_children("DISCUSSION",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2566 break;
2568 case 61:
2570 /* Line 1455 of yacc.c */
2571 #line 254 "SCDoc.y"
2572 { (yyval.doc_node) = NULL; ;}
2573 break;
2575 case 64:
2577 /* Line 1455 of yacc.c */
2578 #line 266 "SCDoc.y"
2579 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2580 break;
2582 case 65:
2584 /* Line 1455 of yacc.c */
2585 #line 267 "SCDoc.y"
2586 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2587 break;
2589 case 66:
2591 /* Line 1455 of yacc.c */
2592 #line 268 "SCDoc.y"
2593 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2594 break;
2596 case 67:
2598 /* Line 1455 of yacc.c */
2599 #line 271 "SCDoc.y"
2600 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2601 break;
2603 case 68:
2605 /* Line 1455 of yacc.c */
2606 #line 272 "SCDoc.y"
2607 { (yyval.doc_node) = doc_node_make("(SECTIONBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2608 break;
2610 case 69:
2612 /* Line 1455 of yacc.c */
2613 #line 275 "SCDoc.y"
2614 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2615 break;
2617 case 70:
2619 /* Line 1455 of yacc.c */
2620 #line 276 "SCDoc.y"
2621 { (yyval.doc_node) = doc_node_make_take_children((yyvsp[(1) - (3)].id),NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2622 break;
2624 case 71:
2626 /* Line 1455 of yacc.c */
2627 #line 277 "SCDoc.y"
2628 { (yyval.doc_node) = doc_node_make_take_children("TABLE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2629 break;
2631 case 72:
2633 /* Line 1455 of yacc.c */
2634 #line 278 "SCDoc.y"
2635 { (yyval.doc_node) = doc_node_make_take_children("DEFINITIONLIST",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2636 break;
2638 case 73:
2640 /* Line 1455 of yacc.c */
2641 #line 279 "SCDoc.y"
2642 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2643 break;
2645 case 74:
2647 /* Line 1455 of yacc.c */
2648 #line 280 "SCDoc.y"
2649 { (yyval.doc_node) = doc_node_make("CLASSTREE",(yyvsp[(2) - (3)].str),NULL); ;}
2650 break;
2652 case 75:
2654 /* Line 1455 of yacc.c */
2655 #line 281 "SCDoc.y"
2656 { (yyval.doc_node) = doc_node_make_take_children("KEYWORD",NULL,(yyvsp[(2) - (3)].doc_node));
2657 // printf("keyword '%s'\n",$2->children[0]->text);
2659 break;
2661 case 76:
2663 /* Line 1455 of yacc.c */
2664 #line 284 "SCDoc.y"
2665 { (yyval.doc_node) = NULL; ;}
2666 break;
2668 case 77:
2670 /* Line 1455 of yacc.c */
2671 #line 285 "SCDoc.y"
2672 { (yyval.doc_node) = doc_node_make("IMAGE",(yyvsp[(2) - (3)].str),NULL); ;}
2673 break;
2675 case 78:
2677 /* Line 1455 of yacc.c */
2678 #line 288 "SCDoc.y"
2679 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node), (yyvsp[(2) - (2)].doc_node)); ;}
2680 break;
2682 case 79:
2684 /* Line 1455 of yacc.c */
2685 #line 289 "SCDoc.y"
2686 { (yyval.doc_node) = doc_node_make("PROSE",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2687 break;
2689 case 80:
2691 /* Line 1455 of yacc.c */
2692 #line 292 "SCDoc.y"
2693 { (yyval.doc_node) = doc_node_make("TEXT",(yyvsp[(1) - (1)].str),NULL); ;}
2694 break;
2696 case 81:
2698 /* Line 1455 of yacc.c */
2699 #line 293 "SCDoc.y"
2700 { (yyval.doc_node) = doc_node_make("LINK",(yyvsp[(1) - (1)].str),NULL); ;}
2701 break;
2703 case 82:
2705 /* Line 1455 of yacc.c */
2706 #line 294 "SCDoc.y"
2707 { (yyval.doc_node) = doc_node_make((yyvsp[(1) - (3)].id),(yyvsp[(2) - (3)].str),NULL); ;}
2708 break;
2710 case 83:
2712 /* Line 1455 of yacc.c */
2713 #line 295 "SCDoc.y"
2714 { (yyval.doc_node) = doc_node_make_take_children("FOOTNOTE",NULL,(yyvsp[(2) - (3)].doc_node)); ;}
2715 break;
2717 case 84:
2719 /* Line 1455 of yacc.c */
2720 #line 296 "SCDoc.y"
2721 { (yyval.doc_node) = doc_node_create("NL"); ;}
2722 break;
2724 case 85:
2726 /* Line 1455 of yacc.c */
2727 #line 299 "SCDoc.y"
2728 { (yyval.id) = "LINK"; ;}
2729 break;
2731 case 86:
2733 /* Line 1455 of yacc.c */
2734 #line 300 "SCDoc.y"
2735 { (yyval.id) = "STRONG"; ;}
2736 break;
2738 case 87:
2740 /* Line 1455 of yacc.c */
2741 #line 301 "SCDoc.y"
2742 { (yyval.id) = "SOFT"; ;}
2743 break;
2745 case 88:
2747 /* Line 1455 of yacc.c */
2748 #line 302 "SCDoc.y"
2749 { (yyval.id) = "EMPHASIS"; ;}
2750 break;
2752 case 89:
2754 /* Line 1455 of yacc.c */
2755 #line 303 "SCDoc.y"
2756 { (yyval.id) = "CODE"; ;}
2757 break;
2759 case 90:
2761 /* Line 1455 of yacc.c */
2762 #line 304 "SCDoc.y"
2763 { (yyval.id) = "TELETYPE"; ;}
2764 break;
2766 case 91:
2768 /* Line 1455 of yacc.c */
2769 #line 305 "SCDoc.y"
2770 { (yyval.id) = "MATH"; ;}
2771 break;
2773 case 92:
2775 /* Line 1455 of yacc.c */
2776 #line 306 "SCDoc.y"
2777 { (yyval.id) = "ANCHOR"; ;}
2778 break;
2780 case 93:
2782 /* Line 1455 of yacc.c */
2783 #line 309 "SCDoc.y"
2784 { (yyval.id) = "CODEBLOCK"; ;}
2785 break;
2787 case 94:
2789 /* Line 1455 of yacc.c */
2790 #line 310 "SCDoc.y"
2791 { (yyval.id) = "TELETYPEBLOCK"; ;}
2792 break;
2794 case 95:
2796 /* Line 1455 of yacc.c */
2797 #line 311 "SCDoc.y"
2798 { (yyval.id) = "MATHBLOCK"; ;}
2799 break;
2801 case 96:
2803 /* Line 1455 of yacc.c */
2804 #line 314 "SCDoc.y"
2805 { (yyval.id) = "LIST"; ;}
2806 break;
2808 case 97:
2810 /* Line 1455 of yacc.c */
2811 #line 315 "SCDoc.y"
2812 { (yyval.id) = "TREE"; ;}
2813 break;
2815 case 98:
2817 /* Line 1455 of yacc.c */
2818 #line 316 "SCDoc.y"
2819 { (yyval.id) = "NUMBEREDLIST"; ;}
2820 break;
2822 case 99:
2824 /* Line 1455 of yacc.c */
2825 #line 319 "SCDoc.y"
2826 { (yyval.id) = "WARNING"; ;}
2827 break;
2829 case 100:
2831 /* Line 1455 of yacc.c */
2832 #line 320 "SCDoc.y"
2833 { (yyval.id) = "NOTE"; ;}
2834 break;
2836 case 101:
2838 /* Line 1455 of yacc.c */
2839 #line 323 "SCDoc.y"
2840 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("ITEM",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2841 break;
2843 case 102:
2845 /* Line 1455 of yacc.c */
2846 #line 324 "SCDoc.y"
2847 { (yyval.doc_node) = doc_node_make("(LISTBODY)",NULL, doc_node_make_take_children("ITEM",NULL,(yyvsp[(2) - (2)].doc_node))); ;}
2848 break;
2850 case 103:
2852 /* Line 1455 of yacc.c */
2853 #line 327 "SCDoc.y"
2854 { (yyval.doc_node) = doc_node_make_take_children("TABROW",NULL,(yyvsp[(2) - (2)].doc_node)); ;}
2855 break;
2857 case 104:
2859 /* Line 1455 of yacc.c */
2860 #line 330 "SCDoc.y"
2861 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2862 break;
2864 case 105:
2866 /* Line 1455 of yacc.c */
2867 #line 331 "SCDoc.y"
2868 { (yyval.doc_node) = doc_node_make("(TABLEBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2869 break;
2871 case 106:
2873 /* Line 1455 of yacc.c */
2874 #line 334 "SCDoc.y"
2875 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node), doc_node_make_take_children("TABCOL",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2876 break;
2878 case 107:
2880 /* Line 1455 of yacc.c */
2881 #line 335 "SCDoc.y"
2882 { (yyval.doc_node) = doc_node_make("(TABLECELLS)",NULL, doc_node_make_take_children("TABCOL",NULL,(yyvsp[(1) - (1)].doc_node))); ;}
2883 break;
2885 case 108:
2887 /* Line 1455 of yacc.c */
2888 #line 338 "SCDoc.y"
2889 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node),doc_node_make_take_children("TERM",NULL,(yyvsp[(3) - (3)].doc_node))); ;}
2890 break;
2892 case 109:
2894 /* Line 1455 of yacc.c */
2895 #line 339 "SCDoc.y"
2896 { (yyval.doc_node) = doc_node_make("(TERMS)",NULL,doc_node_make_take_children("TERM",NULL,(yyvsp[(2) - (2)].doc_node))); ;}
2897 break;
2899 case 110:
2901 /* Line 1455 of yacc.c */
2902 #line 343 "SCDoc.y"
2904 (yyval.doc_node) = doc_node_make_take_children("DEFLISTITEM", NULL, (yyvsp[(1) - (3)].doc_node));
2905 doc_node_add_child((yyval.doc_node), doc_node_make_take_children("DEFINITION", NULL, (yyvsp[(3) - (3)].doc_node)));
2907 break;
2909 case 111:
2911 /* Line 1455 of yacc.c */
2912 #line 349 "SCDoc.y"
2913 { (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (2)].doc_node),(yyvsp[(2) - (2)].doc_node)); ;}
2914 break;
2916 case 112:
2918 /* Line 1455 of yacc.c */
2919 #line 350 "SCDoc.y"
2920 { (yyval.doc_node) = doc_node_make("(DEFLISTBODY)",NULL,(yyvsp[(1) - (1)].doc_node)); ;}
2921 break;
2923 case 117:
2925 /* Line 1455 of yacc.c */
2926 #line 361 "SCDoc.y"
2927 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2928 break;
2930 case 119:
2932 /* Line 1455 of yacc.c */
2933 #line 365 "SCDoc.y"
2934 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2935 break;
2937 case 126:
2939 /* Line 1455 of yacc.c */
2940 #line 378 "SCDoc.y"
2941 { (yyval.str) = strdup("\n"); ;}
2942 break;
2944 case 127:
2946 /* Line 1455 of yacc.c */
2947 #line 381 "SCDoc.y"
2948 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2949 break;
2951 case 129:
2953 /* Line 1455 of yacc.c */
2954 #line 385 "SCDoc.y"
2955 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2956 break;
2958 case 130:
2960 /* Line 1455 of yacc.c */
2961 #line 386 "SCDoc.y"
2962 { (yyval.str) = strmerge((yyvsp[(1) - (2)].str),(yyvsp[(2) - (2)].str)); ;}
2963 break;
2965 case 133:
2967 /* Line 1455 of yacc.c */
2968 #line 391 "SCDoc.y"
2969 { free((yyvsp[(2) - (3)].str)); (yyvsp[(2) - (3)].str)=NULL; (yyval.doc_node) = doc_node_add_child((yyvsp[(1) - (3)].doc_node),doc_node_make("STRING",(yyvsp[(3) - (3)].str),NULL)); ;}
2970 break;
2972 case 134:
2974 /* Line 1455 of yacc.c */
2975 #line 392 "SCDoc.y"
2976 { (yyval.doc_node) = doc_node_make("(COMMALIST)",NULL,doc_node_make("STRING",(yyvsp[(1) - (1)].str),NULL)); ;}
2977 break;
2981 /* Line 1455 of yacc.c */
2982 #line 2983 "SCDoc.tab.cpp"
2983 default: break;
2985 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2987 YYPOPSTACK (yylen);
2988 yylen = 0;
2989 YY_STACK_PRINT (yyss, yyssp);
2991 *++yyvsp = yyval;
2992 *++yylsp = yyloc;
2994 /* Now `shift' the result of the reduction. Determine what state
2995 that goes to, based on the state we popped back to and the rule
2996 number reduced by. */
2998 yyn = yyr1[yyn];
3000 yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
3001 if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
3002 yystate = yytable[yystate];
3003 else
3004 yystate = yydefgoto[yyn - YYNTOKENS];
3006 goto yynewstate;
3009 /*------------------------------------.
3010 | yyerrlab -- here on detecting error |
3011 `------------------------------------*/
3012 yyerrlab:
3013 /* If not already recovering from an error, report this error. */
3014 if (!yyerrstatus)
3016 ++yynerrs;
3017 #if ! YYERROR_VERBOSE
3018 yyerror (YY_("syntax error"));
3019 #else
3021 YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
3022 if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
3024 YYSIZE_T yyalloc = 2 * yysize;
3025 if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
3026 yyalloc = YYSTACK_ALLOC_MAXIMUM;
3027 if (yymsg != yymsgbuf)
3028 YYSTACK_FREE (yymsg);
3029 yymsg = (char *) YYSTACK_ALLOC (yyalloc);
3030 if (yymsg)
3031 yymsg_alloc = yyalloc;
3032 else
3034 yymsg = yymsgbuf;
3035 yymsg_alloc = sizeof yymsgbuf;
3039 if (0 < yysize && yysize <= yymsg_alloc)
3041 (void) yysyntax_error (yymsg, yystate, yychar);
3042 yyerror (yymsg);
3044 else
3046 yyerror (YY_("syntax error"));
3047 if (yysize != 0)
3048 goto yyexhaustedlab;
3051 #endif
3054 yyerror_range[0] = yylloc;
3056 if (yyerrstatus == 3)
3058 /* If just tried and failed to reuse lookahead token after an
3059 error, discard it. */
3061 if (yychar <= YYEOF)
3063 /* Return failure if at end of input. */
3064 if (yychar == YYEOF)
3065 YYABORT;
3067 else
3069 yydestruct ("Error: discarding",
3070 yytoken, &yylval, &yylloc);
3071 yychar = YYEMPTY;
3075 /* Else will try to reuse lookahead token after shifting the error
3076 token. */
3077 goto yyerrlab1;
3080 /*---------------------------------------------------.
3081 | yyerrorlab -- error raised explicitly by YYERROR. |
3082 `---------------------------------------------------*/
3083 yyerrorlab:
3085 /* Pacify compilers like GCC when the user code never invokes
3086 YYERROR and the label yyerrorlab therefore never appears in user
3087 code. */
3088 if (/*CONSTCOND*/ 0)
3089 goto yyerrorlab;
3091 yyerror_range[0] = yylsp[1-yylen];
3092 /* Do not reclaim the symbols of the rule which action triggered
3093 this YYERROR. */
3094 YYPOPSTACK (yylen);
3095 yylen = 0;
3096 YY_STACK_PRINT (yyss, yyssp);
3097 yystate = *yyssp;
3098 goto yyerrlab1;
3101 /*-------------------------------------------------------------.
3102 | yyerrlab1 -- common code for both syntax error and YYERROR. |
3103 `-------------------------------------------------------------*/
3104 yyerrlab1:
3105 yyerrstatus = 3; /* Each real token shifted decrements this. */
3107 for (;;)
3109 yyn = yypact[yystate];
3110 if (yyn != YYPACT_NINF)
3112 yyn += YYTERROR;
3113 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
3115 yyn = yytable[yyn];
3116 if (0 < yyn)
3117 break;
3121 /* Pop the current state because it cannot handle the error token. */
3122 if (yyssp == yyss)
3123 YYABORT;
3125 yyerror_range[0] = *yylsp;
3126 yydestruct ("Error: popping",
3127 yystos[yystate], yyvsp, yylsp);
3128 YYPOPSTACK (1);
3129 yystate = *yyssp;
3130 YY_STACK_PRINT (yyss, yyssp);
3133 *++yyvsp = yylval;
3135 yyerror_range[1] = yylloc;
3136 /* Using YYLLOC is tempting, but would change the location of
3137 the lookahead. YYLOC is available though. */
3138 YYLLOC_DEFAULT (yyloc, (yyerror_range - 1), 2);
3139 *++yylsp = yyloc;
3141 /* Shift the error token. */
3142 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
3144 yystate = yyn;
3145 goto yynewstate;
3148 /*-------------------------------------.
3149 | yyacceptlab -- YYACCEPT comes here. |
3150 `-------------------------------------*/
3151 yyacceptlab:
3152 yyresult = 0;
3153 goto yyreturn;
3155 /*-----------------------------------.
3156 | yyabortlab -- YYABORT comes here. |
3157 `-----------------------------------*/
3158 yyabortlab:
3159 yyresult = 1;
3160 goto yyreturn;
3162 #if !defined(yyoverflow) || YYERROR_VERBOSE
3163 /*-------------------------------------------------.
3164 | yyexhaustedlab -- memory exhaustion comes here. |
3165 `-------------------------------------------------*/
3166 yyexhaustedlab:
3167 yyerror (YY_("memory exhausted"));
3168 yyresult = 2;
3169 /* Fall through. */
3170 #endif
3172 yyreturn:
3173 if (yychar != YYEMPTY)
3174 yydestruct ("Cleanup: discarding lookahead",
3175 yytoken, &yylval, &yylloc);
3176 /* Do not reclaim the symbols of the rule which action triggered
3177 this YYABORT or YYACCEPT. */
3178 YYPOPSTACK (yylen);
3179 YY_STACK_PRINT (yyss, yyssp);
3180 while (yyssp != yyss)
3182 yydestruct ("Cleanup: popping",
3183 yystos[*yyssp], yyvsp, yylsp);
3184 YYPOPSTACK (1);
3186 #ifndef yyoverflow
3187 if (yyss != yyssa)
3188 YYSTACK_FREE (yyss);
3189 #endif
3190 #if YYERROR_VERBOSE
3191 if (yymsg != yymsgbuf)
3192 YYSTACK_FREE (yymsg);
3193 #endif
3194 /* Make sure YYID is used. */
3195 return YYID (yyresult);
3200 /* Line 1675 of yacc.c */
3201 #line 395 "SCDoc.y"
3204 DocNode * scdoc_parse_run(int mode) {
3205 int modes[] = {START_FULL, START_PARTIAL, START_METADATA};
3206 if(mode<0 || mode>=sizeof(modes)) {
3207 error("scdoc_parse_run(): unknown mode: %d\n",mode);
3209 scdoc_start_token = modes[mode];
3210 /* scdoc_start_token = START_FULL;
3211 scdoc_metadata_mode = 0;
3212 if(mode==SCDOC_PARSE_PARTIAL) {
3213 scdoc_start_token = START_PARTIAL;
3214 } else
3215 if(mode==SCDOC_PARSE_METADATA) {
3216 scdoc_metadata_mode = 1;
3218 topnode = NULL;
3219 method_type = "METHOD";
3220 if(scdocparse()!=0) {
3221 return NULL;
3223 return topnode;
3226 void scdocerror(const char *str)
3228 error("In %s:\n At line %d: %s\n\n",scdoc_current_file,scdoclineno,str);
3230 /* FIXME: this does not work well, since the reported linenumber is often *after* the actual error line
3231 fseek(scdocin, 0, SEEK_SET);
3232 int line = 1;
3233 char buf[256],*txt;
3234 while(line!=scdoclineno && !feof(scdocin)) {
3235 int c = fgetc(scdocin);
3236 if(c=='\n') line++;
3238 txt = fgets(buf, 256, scdocin);
3239 if(txt)
3240 fprintf(stderr," %s\n-------------------\n", txt);