Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
htmlparse.c
Go to the documentation of this file.
1/* A Bison parser, made by GNU Bison 3.5.1. */
2
3/* Bison implementation for Yacc-like parsers in C
4
5 Copyright (C) 1984, 1989-1990, 2000-2015, 2018-2020 Free Software Foundation,
6 Inc.
7
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>. */
20
21/* As a special exception, you may create a larger work that contains
22 part or all of the Bison parser skeleton and distribute that work
23 under terms of your choice, so long as that work isn't itself a
24 parser generator using the skeleton or a modified version thereof
25 as a parser skeleton. Alternatively, if you modify or redistribute
26 the parser skeleton itself, you may (at your option) remove this
27 special exception, which will cause the skeleton and the resulting
28 Bison output files to be licensed under the GNU General Public
29 License without this special exception.
30
31 This special exception was added by the Free Software Foundation in
32 version 2.2 of Bison. */
33
34/* C LALR(1) parser skeleton written by Richard Stallman, by
35 simplifying the original so-called "semantic" parser. */
36
37/* All symbols defined below should begin with yy or YY, to avoid
38 infringing on user name space. This should be done even for local
39 variables, as they might otherwise be expanded by user macros.
40 There are some unavoidable exceptions within include files to
41 define necessary library symbols; they are noted "INFRINGES ON
42 USER NAME SPACE" below. */
43
44/* Undocumented macros, especially those whose name start with YY_,
45 are private implementation details. Do not rely on them. */
46
47/* Identify Bison output. */
48#define YYBISON 1
49
50/* Bison version. */
51#define YYBISON_VERSION "3.5.1"
52
53/* Skeleton name. */
54#define YYSKELETON_NAME "yacc.c"
55
56/* Pure parsers. */
57#define YYPURE 0
58
59/* Push parsers. */
60#define YYPUSH 0
61
62/* Pull parsers. */
63#define YYPULL 1
64
65/* Substitute the type names. */
66#define YYSTYPE HTMLSTYPE
67/* Substitute the variable and function names. */
68#define yyparse htmlparse
69#define yylex htmllex
70#define yyerror htmlerror
71#define yydebug htmldebug
72#define yynerrs htmlnerrs
73#define yylval htmllval
74#define yychar htmlchar
75
76/* First part of user prologue. */
77#line 21 "../../lib/common/htmlparse.y"
78
79
80#include <cgraph/alloc.h>
81#include <common/render.h>
82#include <common/htmltable.h>
83#include <common/htmllex.h>
84
85extern int htmlparse(void);
86
87typedef struct sfont_t {
89 struct sfont_t *pfont;
91
92static struct {
93 htmllabel_t* lbl; /* Generated label */
94 htmltbl_t* tblstack; /* Stack of tables maintained during parsing */
95 Dt_t* fitemList; /* Dictionary for font text items */
97 agxbuf* str; /* Buffer for text */
101
102/* free_ritem:
103 * Free row. This closes and frees row's list, then
104 * the pitem itself is freed.
105 */
106static void free_ritem(void *item) {
107 pitem *p = item;
108 dtclose (p->u.rp);
109 free (p);
110}
111
112/* cleanTbl:
113 * Clean up table if error in parsing.
114 */
115static void
117{
118 dtclose (tp->u.p.rows);
119 free_html_data (&tp->data);
120 free (tp);
121}
122
123/* cleanCell:
124 * Clean up cell if error in parsing.
125 */
126static void
128{
129 if (cp->child.kind == HTML_TBL) cleanTbl (cp->child.u.tbl);
130 else if (cp->child.kind == HTML_TEXT) free_html_text (cp->child.u.txt);
131 free_html_data (&cp->data);
132 free (cp);
133}
134
135/* free_citem:
136 * Free cell item during parsing. This frees cell and pitem.
137 */
138static void free_citem(void *item) {
139 pitem *p = item;
140 cleanCell (p->u.cp);
141 free (p);
142}
143
145 .key = offsetof(pitem, u),
146 .size = sizeof(void *),
147 .link = offsetof(pitem, link),
148 .freef = free_ritem,
149};
151 .key = offsetof(pitem, u),
152 .size = sizeof(void *),
153 .link = offsetof(pitem, link),
154 .freef = free,
155};
156
157typedef struct {
160} fitem;
161
162typedef struct {
165} fspan;
166
167static void free_fitem(void *item) {
168 fitem *p = item;
169 free (p->ti.str);
170 free (p);
171}
172
173static void free_fspan(void *span) {
174 fspan *p = span;
175 textspan_t* ti;
176
177 if (p->lp.nitems) {
178 ti = p->lp.items;
179 for (size_t i = 0; i < p->lp.nitems; i++) {
180 free (ti->str);
181 ti++;
182 }
183 free (p->lp.items);
184 }
185 free (p);
186}
187
189 .link = offsetof(fitem, link),
190 .freef = free,
191};
192
194 .link = offsetof(fspan, link),
195 .freef = free,
196};
197
198/* appendFItemList:
199 * Append a new fitem to the list.
200 */
201static void
203{
204 fitem *fi = gv_alloc(sizeof(fitem));
205
206 fi->ti.str = agxbdisown(ag);
207 fi->ti.font = HTMLstate.fontstack->cfont;
208 dtinsert(HTMLstate.fitemList, fi);
209}
210
211/* appendFLineList:
212 */
213static void
215{
216 fspan *ln = gv_alloc(sizeof(fspan));
217 fitem *fi;
218 Dt_t *ilist = HTMLstate.fitemList;
219
220 size_t cnt = (size_t)dtsize(ilist);
221 ln->lp.just = v;
222 if (cnt) {
223 int i = 0;
224 ln->lp.nitems = cnt;
225 ln->lp.items = gv_calloc(cnt, sizeof(textspan_t));
226
227 fi = (fitem*)dtflatten(ilist);
228 for (; fi; fi = (fitem*)dtlink(fitemList, fi)) {
229 /* NOTE: When fitemList is closed, it uses free, which only frees the container,
230 * not the contents, so this copy is safe.
231 */
232 ln->lp.items[i] = fi->ti;
233 i++;
234 }
235 }
236 else {
237 ln->lp.items = gv_alloc(sizeof(textspan_t));
238 ln->lp.nitems = 1;
239 ln->lp.items[0].str = gv_strdup("");
240 ln->lp.items[0].font = HTMLstate.fontstack->cfont;
241 }
242
243 dtclear(ilist);
244
245 dtinsert(HTMLstate.fspanList, ln);
246}
247
248static htmltxt_t*
250{
251 Dt_t * ispan = HTMLstate.fspanList;
252 fspan *fl ;
253 htmltxt_t *hft = gv_alloc(sizeof(htmltxt_t));
254
255 if (dtsize (HTMLstate.fitemList))
257
258 size_t cnt = (size_t)dtsize(ispan);
259 hft->nspans = cnt;
260
261 if (cnt) {
262 int i = 0;
263 hft->spans = gv_calloc(cnt, sizeof(htextspan_t));
264 for(fl=dtfirst(ispan); fl; fl=dtnext(ispan,fl)) {
265 hft->spans[i] = fl->lp;
266 i++;
267 }
268 }
269
270 dtclear(ispan);
271
272 return hft;
273}
274
275static pitem* lastRow (void)
276{
277 htmltbl_t* tbl = HTMLstate.tblstack;
278 pitem* sp = dtlast (tbl->u.p.rows);
279 return sp;
280}
281
282/* addRow:
283 * Add new cell row to current table.
284 */
285static pitem* addRow (void)
286{
287 Dt_t* dp = dtopen(&cellDisc, Dtqueue);
288 htmltbl_t* tbl = HTMLstate.tblstack;
289 pitem* sp = gv_alloc(sizeof(pitem));
290 sp->u.rp = dp;
291 if (tbl->hrule)
292 sp->ruled = 1;
293 dtinsert (tbl->u.p.rows, sp);
294 return sp;
295}
296
297/* setCell:
298 * Set cell body and type and attach to row
299 */
300static void setCell(htmlcell_t *cp, void *obj, char kind) {
301 pitem* sp = gv_alloc(sizeof(pitem));
302 htmltbl_t* tbl = HTMLstate.tblstack;
303 pitem* rp = dtlast (tbl->u.p.rows);
304 Dt_t* row = rp->u.rp;
305 sp->u.cp = cp;
306 dtinsert (row, sp);
307 cp->child.kind = kind;
308 if (tbl->vrule)
309 cp->ruled = HTML_VRULE;
310
311 if(kind == HTML_TEXT)
312 cp->child.u.txt = obj;
313 else if (kind == HTML_IMAGE)
314 cp->child.u.img = obj;
315 else
316 cp->child.u.tbl = obj;
317}
318
319/* mkLabel:
320 * Create label, given body and type.
321 */
322static htmllabel_t *mkLabel(void *obj, char kind) {
323 htmllabel_t* lp = gv_alloc(sizeof(htmllabel_t));
324
325 lp->kind = kind;
326 if (kind == HTML_TEXT)
327 lp->u.txt = obj;
328 else
329 lp->u.tbl = obj;
330 return lp;
331}
332
333/* freeFontstack:
334 * Free all stack items but the last, which is
335 * put on artificially during in parseHTML.
336 */
337static void
339{
340 sfont_t* s;
341 sfont_t* next;
342
343 for (s = HTMLstate.fontstack; (next = s->pfont); s = next) {
344 free(s);
345 }
346}
347
348/* cleanup:
349 * Called on error. Frees resources allocated during parsing.
350 * This includes a label, plus a walk down the stack of
351 * tables. Note that we use the free_citem function to actually
352 * free cells.
353 */
354static void cleanup (void)
355{
356 htmltbl_t* tp = HTMLstate.tblstack;
357 htmltbl_t* next;
358
359 if (HTMLstate.lbl) {
361 HTMLstate.lbl = NULL;
362 }
364 while (tp) {
365 next = tp->u.p.prev;
366 cleanTbl (tp);
367 tp = next;
368 }
370
372 dtclear (HTMLstate.fitemList);
374
376 dtclear (HTMLstate.fspanList);
378
380}
381
382/* nonSpace:
383 * Return 1 if s contains a non-space character.
384 */
385static int nonSpace (char* s)
386{
387 char c;
388
389 while ((c = *s++)) {
390 if (c != ' ') return 1;
391 }
392 return 0;
393}
394
395/* pushFont:
396 * Fonts are allocated in the lexer.
397 */
398static void
400{
401 sfont_t *ft = gv_alloc(sizeof(sfont_t));
402 textfont_t* curfont = HTMLstate.fontstack->cfont;
403 textfont_t f = *fp;
404
405 if (curfont) {
406 if (!f.color && curfont->color)
407 f.color = curfont->color;
408 if ((f.size < 0.0) && (curfont->size >= 0.0))
409 f.size = curfont->size;
410 if (!f.name && curfont->name)
411 f.name = curfont->name;
412 if (curfont->flags)
413 f.flags |= curfont->flags;
414 }
415
416 ft->cfont = dtinsert(HTMLstate.gvc->textfont_dt, &f);
417 ft->pfont = HTMLstate.fontstack;
418 HTMLstate.fontstack = ft;
419}
420
421/* popFont:
422 */
423static void
425{
426 sfont_t* curfont = HTMLstate.fontstack;
427 sfont_t* prevfont = curfont->pfont;
428
429 free (curfont);
430 HTMLstate.fontstack = prevfont;
431}
432
433
434#line 435 "htmlparse.c"
435
436# ifndef YY_CAST
437# ifdef __cplusplus
438# define YY_CAST(Type, Val) static_cast<Type> (Val)
439# define YY_REINTERPRET_CAST(Type, Val) reinterpret_cast<Type> (Val)
440# else
441# define YY_CAST(Type, Val) ((Type) (Val))
442# define YY_REINTERPRET_CAST(Type, Val) ((Type) (Val))
443# endif
444# endif
445# ifndef YY_NULLPTR
446# if defined __cplusplus
447# if 201103L <= __cplusplus
448# define YY_NULLPTR nullptr
449# else
450# define YY_NULLPTR 0
451# endif
452# else
453# define YY_NULLPTR ((void*)0)
454# endif
455# endif
456
457/* Enabling verbose error messages. */
458#ifdef YYERROR_VERBOSE
459# undef YYERROR_VERBOSE
460# define YYERROR_VERBOSE 1
461#else
462# define YYERROR_VERBOSE 0
463#endif
464
465/* Use api.header.include to #include this header
466 instead of duplicating it here. */
467#ifndef YY_HTML_HTMLPARSE_H_INCLUDED
468# define YY_HTML_HTMLPARSE_H_INCLUDED
469/* Debug traces. */
470#ifndef HTMLDEBUG
471# if defined YYDEBUG
472#if YYDEBUG
473# define HTMLDEBUG 1
474# else
475# define HTMLDEBUG 0
476# endif
477# else /* ! defined YYDEBUG */
478# define HTMLDEBUG 0
479# endif /* ! defined YYDEBUG */
480#endif /* ! defined HTMLDEBUG */
481#if HTMLDEBUG
482extern int htmldebug;
483#endif
484
485/* Token type. */
486#ifndef HTMLTOKENTYPE
487# define HTMLTOKENTYPE
489 {
490 T_end_br = 258,
492 T_row = 260,
494 T_html = 262,
499 T_string = 267,
500 T_error = 268,
502 T_n_bold = 270,
505 T_n_sup = 273,
506 T_n_sub = 274,
507 T_n_s = 275,
508 T_HR = 276,
509 T_hr = 277,
510 T_end_hr = 278,
511 T_VR = 279,
512 T_vr = 280,
513 T_end_vr = 281,
514 T_BR = 282,
515 T_br = 283,
516 T_IMG = 284,
517 T_img = 285,
518 T_table = 286,
519 T_cell = 287,
520 T_font = 288,
521 T_italic = 289,
522 T_bold = 290,
525 T_sup = 293,
526 T_sub = 294,
527 T_s = 295
528 };
529#endif
530/* Tokens. */
531#define T_end_br 258
532#define T_end_img 259
533#define T_row 260
534#define T_end_row 261
535#define T_html 262
536#define T_end_html 263
537#define T_end_table 264
538#define T_end_cell 265
539#define T_end_font 266
540#define T_string 267
541#define T_error 268
542#define T_n_italic 269
543#define T_n_bold 270
544#define T_n_underline 271
545#define T_n_overline 272
546#define T_n_sup 273
547#define T_n_sub 274
548#define T_n_s 275
549#define T_HR 276
550#define T_hr 277
551#define T_end_hr 278
552#define T_VR 279
553#define T_vr 280
554#define T_end_vr 281
555#define T_BR 282
556#define T_br 283
557#define T_IMG 284
558#define T_img 285
559#define T_table 286
560#define T_cell 287
561#define T_font 288
562#define T_italic 289
563#define T_bold 290
564#define T_underline 291
565#define T_overline 292
566#define T_sup 293
567#define T_sub 294
568#define T_s 295
569
570/* Value type. */
571#if ! defined HTMLSTYPE && ! defined HTMLSTYPE_IS_DECLARED
573{
574#line 378 "../../lib/common/htmlparse.y"
575
576 int i;
583
584#line 585 "htmlparse.c"
585
586};
587typedef union HTMLSTYPE HTMLSTYPE;
588# define HTMLSTYPE_IS_TRIVIAL 1
589# define HTMLSTYPE_IS_DECLARED 1
590#endif
591
592
593extern HTMLSTYPE htmllval;
594
595int htmlparse (void);
596
597#endif /* !YY_HTML_HTMLPARSE_H_INCLUDED */
598
599
600
601#ifdef short
602# undef short
603#endif
604
605/* On compilers that do not define __PTRDIFF_MAX__ etc., make sure
606 <limits.h> and (if available) <stdint.h> are included
607 so that the code can choose integer types of a good width. */
608
609#ifndef __PTRDIFF_MAX__
610# include <limits.h> /* INFRINGES ON USER NAME SPACE */
611# if defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
612# include <stdint.h> /* INFRINGES ON USER NAME SPACE */
613# define YY_STDINT_H
614# endif
615#endif
616
617/* Narrow types that promote to a signed type and that can represent a
618 signed or unsigned integer of at least N bits. In tables they can
619 save space and decrease cache pressure. Promoting to a signed type
620 helps avoid bugs in integer arithmetic. */
621
622#ifdef __INT_LEAST8_MAX__
624#elif defined YY_STDINT_H
625typedef int_least8_t yytype_int8;
626#else
627typedef signed char yytype_int8;
628#endif
629
630#ifdef __INT_LEAST16_MAX__
632#elif defined YY_STDINT_H
633typedef int_least16_t yytype_int16;
634#else
635typedef short yytype_int16;
636#endif
637
638#if defined __UINT_LEAST8_MAX__ && __UINT_LEAST8_MAX__ <= __INT_MAX__
640#elif (!defined __UINT_LEAST8_MAX__ && defined YY_STDINT_H \
641 && UINT_LEAST8_MAX <= INT_MAX)
642typedef uint_least8_t yytype_uint8;
643#elif !defined __UINT_LEAST8_MAX__ && UCHAR_MAX <= INT_MAX
644typedef unsigned char yytype_uint8;
645#else
646typedef short yytype_uint8;
647#endif
648
649#if defined __UINT_LEAST16_MAX__ && __UINT_LEAST16_MAX__ <= __INT_MAX__
651#elif (!defined __UINT_LEAST16_MAX__ && defined YY_STDINT_H \
652 && UINT_LEAST16_MAX <= INT_MAX)
653typedef uint_least16_t yytype_uint16;
654#elif !defined __UINT_LEAST16_MAX__ && USHRT_MAX <= INT_MAX
655typedef unsigned short yytype_uint16;
656#else
657typedef int yytype_uint16;
658#endif
659
660#ifndef YYPTRDIFF_T
661# if defined __PTRDIFF_TYPE__ && defined __PTRDIFF_MAX__
662# define YYPTRDIFF_T __PTRDIFF_TYPE__
663# define YYPTRDIFF_MAXIMUM __PTRDIFF_MAX__
664# elif defined PTRDIFF_MAX
665# ifndef ptrdiff_t
666# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
667# endif
668# define YYPTRDIFF_T ptrdiff_t
669# define YYPTRDIFF_MAXIMUM PTRDIFF_MAX
670# else
671# define YYPTRDIFF_T long
672# define YYPTRDIFF_MAXIMUM LONG_MAX
673# endif
674#endif
675
676#ifndef YYSIZE_T
677# ifdef __SIZE_TYPE__
678# define YYSIZE_T __SIZE_TYPE__
679# elif defined size_t
680# define YYSIZE_T size_t
681# elif defined __STDC_VERSION__ && 199901 <= __STDC_VERSION__
682# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
683# define YYSIZE_T size_t
684# else
685# define YYSIZE_T unsigned
686# endif
687#endif
688
689#define YYSIZE_MAXIMUM \
690 YY_CAST (YYPTRDIFF_T, \
691 (YYPTRDIFF_MAXIMUM < YY_CAST (YYSIZE_T, -1) \
692 ? YYPTRDIFF_MAXIMUM \
693 : YY_CAST (YYSIZE_T, -1)))
694
695#define YYSIZEOF(X) YY_CAST (YYPTRDIFF_T, sizeof (X))
696
697/* Stored state numbers (used for stacks). */
699
700/* State numbers in computations. */
701typedef int yy_state_fast_t;
702
703#ifndef YY_
704# if defined YYENABLE_NLS && YYENABLE_NLS
705# if ENABLE_NLS
706# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
707# define YY_(Msgid) dgettext ("bison-runtime", Msgid)
708# endif
709# endif
710# ifndef YY_
711# define YY_(Msgid) Msgid
712# endif
713#endif
714
715#ifndef YY_ATTRIBUTE_PURE
716# if defined __GNUC__ && 2 < __GNUC__ + (96 <= __GNUC_MINOR__)
717# define YY_ATTRIBUTE_PURE __attribute__ ((__pure__))
718# else
719# define YY_ATTRIBUTE_PURE
720# endif
721#endif
722
723#ifndef YY_ATTRIBUTE_UNUSED
724# if defined __GNUC__ && 2 < __GNUC__ + (7 <= __GNUC_MINOR__)
725# define YY_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
726# else
727# define YY_ATTRIBUTE_UNUSED
728# endif
729#endif
730
731/* Suppress unused-variable warnings by "using" E. */
732#if ! defined lint || defined __GNUC__
733# define YYUSE(E) ((void) (E))
734#else
735# define YYUSE(E) /* empty */
736#endif
737
738#if defined __GNUC__ && ! defined __ICC && 407 <= __GNUC__ * 100 + __GNUC_MINOR__
739/* Suppress an incorrect diagnostic about yylval being uninitialized. */
740# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN \
741 _Pragma ("GCC diagnostic push") \
742 _Pragma ("GCC diagnostic ignored \"-Wuninitialized\"") \
743 _Pragma ("GCC diagnostic ignored \"-Wmaybe-uninitialized\"")
744# define YY_IGNORE_MAYBE_UNINITIALIZED_END \
745 _Pragma ("GCC diagnostic pop")
746#else
747# define YY_INITIAL_VALUE(Value) Value
748#endif
749#ifndef YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
750# define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
751# define YY_IGNORE_MAYBE_UNINITIALIZED_END
752#endif
753#ifndef YY_INITIAL_VALUE
754# define YY_INITIAL_VALUE(Value) /* Nothing. */
755#endif
756
757#if defined __cplusplus && defined __GNUC__ && ! defined __ICC && 6 <= __GNUC__
758# define YY_IGNORE_USELESS_CAST_BEGIN \
759 _Pragma ("GCC diagnostic push") \
760 _Pragma ("GCC diagnostic ignored \"-Wuseless-cast\"")
761# define YY_IGNORE_USELESS_CAST_END \
762 _Pragma ("GCC diagnostic pop")
763#endif
764#ifndef YY_IGNORE_USELESS_CAST_BEGIN
765# define YY_IGNORE_USELESS_CAST_BEGIN
766# define YY_IGNORE_USELESS_CAST_END
767#endif
768
769
770#define YY_ASSERT(E) ((void) (0 && (E)))
771
772#if ! defined yyoverflow || YYERROR_VERBOSE
773
774/* The parser invokes alloca or malloc; define the necessary symbols. */
775
776# ifdef YYSTACK_USE_ALLOCA
777# if YYSTACK_USE_ALLOCA
778# ifdef __GNUC__
779# define YYSTACK_ALLOC __builtin_alloca
780# elif defined __BUILTIN_VA_ARG_INCR
781# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
782# elif defined _AIX
783# define YYSTACK_ALLOC __alloca
784# elif defined _MSC_VER
785# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
786# define alloca _alloca
787# else
788# define YYSTACK_ALLOC alloca
789# if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS
790# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
791 /* Use EXIT_SUCCESS as a witness for stdlib.h. */
792# ifndef EXIT_SUCCESS
793# define EXIT_SUCCESS 0
794# endif
795# endif
796# endif
797# endif
798# endif
799
800# ifdef YYSTACK_ALLOC
801 /* Pacify GCC's 'empty if-body' warning. */
802# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
803# ifndef YYSTACK_ALLOC_MAXIMUM
804 /* The OS might guarantee only one guard page at the bottom of the stack,
805 and a page size can be as small as 4096 bytes. So we cannot safely
806 invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
807 to allow for a few compiler-allocated temporary stack slots. */
808# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
809# endif
810# else
811# define YYSTACK_ALLOC YYMALLOC
812# define YYSTACK_FREE YYFREE
813# ifndef YYSTACK_ALLOC_MAXIMUM
814# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
815# endif
816# if (defined __cplusplus && ! defined EXIT_SUCCESS \
817 && ! ((defined YYMALLOC || defined malloc) \
818 && (defined YYFREE || defined free)))
819# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
820# ifndef EXIT_SUCCESS
821# define EXIT_SUCCESS 0
822# endif
823# endif
824# ifndef YYMALLOC
825# define YYMALLOC malloc
826# if ! defined malloc && ! defined EXIT_SUCCESS
827void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
828# endif
829# endif
830# ifndef YYFREE
831# define YYFREE free
832# if ! defined free && ! defined EXIT_SUCCESS
833void free (void *); /* INFRINGES ON USER NAME SPACE */
834# endif
835# endif
836# endif
837#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
838
839
840#if (! defined yyoverflow \
841 && (! defined __cplusplus \
842 || (defined HTMLSTYPE_IS_TRIVIAL && HTMLSTYPE_IS_TRIVIAL)))
843
844/* A type that is properly aligned for any stack member. */
845union yyalloc
846{
847 yy_state_t yyss_alloc;
848 YYSTYPE yyvs_alloc;
849};
850
851/* The size of the maximum gap between one aligned stack and the next. */
852# define YYSTACK_GAP_MAXIMUM (YYSIZEOF (union yyalloc) - 1)
853
854/* The size of an array large to enough to hold all stacks, each with
855 N elements. */
856# define YYSTACK_BYTES(N) \
857 ((N) * (YYSIZEOF (yy_state_t) + YYSIZEOF (YYSTYPE)) \
858 + YYSTACK_GAP_MAXIMUM)
859
860# define YYCOPY_NEEDED 1
861
862/* Relocate STACK from its old location to the new one. The
863 local variables YYSIZE and YYSTACKSIZE give the old and new number of
864 elements in the stack, and YYPTR gives the new location of the
865 stack. Advance YYPTR to a properly aligned location for the next
866 stack. */
867# define YYSTACK_RELOCATE(Stack_alloc, Stack) \
868 do \
869 { \
870 YYPTRDIFF_T yynewbytes; \
871 YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
872 Stack = &yyptr->Stack_alloc; \
873 yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
874 yyptr += yynewbytes / YYSIZEOF (*yyptr); \
875 } \
876 while (0)
877
878#endif
879
880#if defined YYCOPY_NEEDED && YYCOPY_NEEDED
881/* Copy COUNT objects from SRC to DST. The source and destination do
882 not overlap. */
883# ifndef YYCOPY
884# if defined __GNUC__ && 1 < __GNUC__
885# define YYCOPY(Dst, Src, Count) \
886 __builtin_memcpy (Dst, Src, YY_CAST (YYSIZE_T, (Count)) * sizeof (*(Src)))
887# else
888# define YYCOPY(Dst, Src, Count) \
889 do \
890 { \
891 YYPTRDIFF_T yyi; \
892 for (yyi = 0; yyi < (Count); yyi++) \
893 (Dst)[yyi] = (Src)[yyi]; \
894 } \
895 while (0)
896# endif
897# endif
898#endif /* !YYCOPY_NEEDED */
899
900/* YYFINAL -- State number of the termination state. */
901#define YYFINAL 31
902/* YYLAST -- Last index in YYTABLE. */
903#define YYLAST 271
904
905/* YYNTOKENS -- Number of terminals. */
906#define YYNTOKENS 41
907/* YYNNTS -- Number of nonterminals. */
908#define YYNNTS 39
909/* YYNRULES -- Number of rules. */
910#define YYNRULES 69
911/* YYNSTATES -- Number of states. */
912#define YYNSTATES 116
913
914#define YYUNDEFTOK 2
915#define YYMAXUTOK 295
916
917
918/* YYTRANSLATE(TOKEN-NUM) -- Symbol number corresponding to TOKEN-NUM
919 as returned by yylex, with out-of-bounds checking. */
920#define YYTRANSLATE(YYX) \
921 (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
922
923/* YYTRANSLATE[TOKEN-NUM] -- Symbol number corresponding to TOKEN-NUM
924 as returned by yylex. */
925static const yytype_int8 yytranslate[] =
926{
927 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
928 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
929 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
930 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
931 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
932 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
933 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
934 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
935 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
936 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
937 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
938 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
939 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
940 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
941 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
942 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
943 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
944 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
945 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
946 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
947 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
948 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
949 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
950 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
951 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
952 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
953 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
954 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
955 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
956 35, 36, 37, 38, 39, 40
957};
958
959#if HTMLDEBUG
960 /* YYRLINE[YYN] -- Source line where rule number YYN was defined. */
961static const yytype_int16 yyrline[] =
962{
963 0, 410, 410, 411, 412, 415, 418, 419, 422, 423,
964 424, 425, 426, 427, 428, 429, 430, 431, 434, 437,
965 440, 443, 446, 449, 452, 455, 458, 461, 464, 467,
966 470, 473, 476, 479, 482, 483, 486, 487, 490, 490,
967 511, 512, 513, 514, 515, 516, 519, 520, 523, 524,
968 525, 528, 528, 531, 532, 533, 536, 536, 537, 537,
969 538, 538, 539, 539, 542, 543, 546, 547, 550, 551
970};
971#endif
972
973#if HTMLDEBUG || YYERROR_VERBOSE || 0
974/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
975 First, the terminals, then, starting at YYNTOKENS, nonterminals. */
976static const char *const yytname[] =
977{
978 "$end", "error", "$undefined", "T_end_br", "T_end_img", "T_row",
979 "T_end_row", "T_html", "T_end_html", "T_end_table", "T_end_cell",
980 "T_end_font", "T_string", "T_error", "T_n_italic", "T_n_bold",
981 "T_n_underline", "T_n_overline", "T_n_sup", "T_n_sub", "T_n_s", "T_HR",
982 "T_hr", "T_end_hr", "T_VR", "T_vr", "T_end_vr", "T_BR", "T_br", "T_IMG",
983 "T_img", "T_table", "T_cell", "T_font", "T_italic", "T_bold",
984 "T_underline", "T_overline", "T_sup", "T_sub", "T_s", "$accept", "html",
985 "fonttext", "text", "textitem", "font", "n_font", "italic", "n_italic",
986 "bold", "n_bold", "strike", "n_strike", "underline", "n_underline",
987 "overline", "n_overline", "sup", "n_sup", "sub", "n_sub", "br", "string",
988 "table", "@1", "fonttable", "opt_space", "rows", "row", "$@2", "cells",
989 "cell", "$@3", "$@4", "$@5", "$@6", "image", "HR", "VR", YY_NULLPTR
990};
991#endif
992
993# ifdef YYPRINT
994/* YYTOKNUM[NUM] -- (External) token number corresponding to the
995 (internal) symbol number NUM (which must be that of a token). */
996static const yytype_int16 yytoknum[] =
997{
998 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
999 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
1000 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
1001 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
1002 295
1003};
1004# endif
1005
1006#define YYPACT_NINF (-82)
1007
1008#define yypact_value_is_default(Yyn) \
1009 ((Yyn) == YYPACT_NINF)
1010
1011#define YYTABLE_NINF (-63)
1012
1013#define yytable_value_is_error(Yyn) \
1014 0
1015
1016 /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
1017 STATE-NUM. */
1018static const yytype_int16 yypact[] =
1019{
1020 8, -82, 209, 10, -82, -82, 11, -82, -82, -82,
1021 -82, -82, -82, -82, -82, 5, 209, -82, 209, 209,
1022 209, 209, 209, 209, 209, 209, -82, -5, -82, 14,
1023 -20, -82, -82, -82, -82, 209, 209, 209, 209, 209,
1024 13, 37, 12, 66, 16, 80, 19, 109, 123, 20,
1025 152, 15, 166, 195, -82, -82, -82, -82, -82, -82,
1026 -82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
1027 -82, -82, -82, -82, -82, -82, -82, -82, 23, -82,
1028 119, -82, 7, 46, -82, 38, -82, 23, 17, 35,
1029 -82, 13, -82, -82, -82, -82, 58, -82, -82, 53,
1030 -82, -82, -82, 40, -82, 7, -82, 59, 69, -82,
1031 72, -82, -82, -82, -82, -82
1032};
1033
1034 /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM.
1035 Performed when YYTABLE does not specify something else to do. Zero
1036 means the default is an error. */
1037static const yytype_int8 yydefact[] =
1038{
1039 0, 4, 47, 0, 36, 35, 0, 18, 20, 22,
1040 26, 28, 30, 32, 24, 0, 5, 7, 47, 47,
1041 47, 0, 47, 47, 0, 0, 9, 8, 40, 0,
1042 0, 1, 34, 2, 6, 0, 0, 0, 0, 0,
1043 8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1044 0, 0, 0, 0, 37, 3, 38, 19, 10, 41,
1045 21, 11, 42, 23, 14, 45, 25, 17, 27, 12,
1046 43, 29, 13, 44, 31, 15, 33, 16, 0, 51,
1047 0, 48, 0, 47, 67, 0, 49, 0, 47, 0,
1048 53, 46, 39, 66, 50, 65, 0, 58, 56, 0,
1049 60, 52, 69, 0, 54, 0, 64, 0, 0, 63,
1050 0, 68, 55, 59, 57, 61
1051};
1052
1053 /* YYPGOTO[NTERM-NUM]. */
1054static const yytype_int16 yypgoto[] =
1055{
1056 -82, -82, -4, 232, -10, -1, 26, 0, 39, 1,
1057 50, -82, -82, 2, 36, 3, 47, -82, -82, -82,
1058 -82, -82, -2, 148, -82, 9, 27, -82, -68, -82,
1059 -82, -81, -82, -82, -82, -82, -82, -82, -82
1060};
1061
1062 /* YYDEFGOTO[NTERM-NUM]. */
1063static const yytype_int8 yydefgoto[] =
1064{
1065 -1, 3, 15, 16, 17, 35, 58, 36, 61, 37,
1066 64, 21, 67, 38, 69, 39, 72, 24, 75, 25,
1067 77, 26, 40, 28, 78, 29, 30, 80, 81, 82,
1068 89, 90, 108, 107, 110, 99, 100, 87, 105
1069};
1070
1071 /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If
1072 positive, shift that token. If negative, reduce the rule whose
1073 number is the opposite. If YYTABLE_NINF, syntax error. */
1074static const yytype_int8 yytable[] =
1075{
1076 27, 18, 19, 20, 22, 23, 34, 54, 104, 1,
1077 31, 56, 86, 33, 32, 2, 27, 27, 27, 94,
1078 27, 27, 55, 57, 112, 54, -46, -62, 79, 4,
1079 60, 34, 71, 34, 63, 34, 68, 34, 34, 88,
1080 34, 101, 34, 34, 5, 6, 95, 96, 57, 4,
1081 7, 8, 9, 10, 11, 12, 13, 14, 4, 102,
1082 103, 93, 106, 109, 5, 6, 111, 88, 59, 113,
1083 7, 8, 9, 10, 11, 12, 13, 14, 4, 114,
1084 60, 91, 115, 62, 97, 70, 27, 18, 19, 20,
1085 22, 23, 4, 5, 6, 63, 65, 98, 73, 7,
1086 8, 9, 10, 11, 12, 13, 14, 5, 6, 0,
1087 92, 0, 0, 7, 8, 9, 10, 11, 12, 13,
1088 14, 4, 0, 0, 79, 0, 0, 0, 83, 66,
1089 0, 0, 0, 0, 0, 4, 5, 6, 0, 68,
1090 84, 85, 7, 8, 9, 10, 11, 12, 13, 14,
1091 5, 6, 0, 0, 0, 0, 7, 8, 9, 10,
1092 11, 12, 13, 14, 4, 0, 42, 44, 46, 71,
1093 49, 51, 0, 0, 0, 0, 0, 0, 4, 5,
1094 6, 0, 0, 0, 74, 7, 8, 9, 10, 11,
1095 12, 13, 14, 5, 6, 0, 0, 0, 0, 7,
1096 8, 9, 10, 11, 12, 13, 14, 4, 0, 0,
1097 0, 0, 0, 0, 76, 0, 0, 0, 0, 0,
1098 0, 4, 5, 6, 0, 0, 0, 0, 7, 8,
1099 9, 10, 11, 12, 13, 14, 5, 6, 0, 0,
1100 0, 0, 7, 8, 9, 10, 11, 12, 13, 14,
1101 41, 43, 45, 47, 48, 50, 52, 53, 0, 0,
1102 0, 0, 0, 0, 0, 0, 0, 41, 43, 45,
1103 48, 50
1104};
1105
1106static const yytype_int8 yycheck[] =
1107{
1108 2, 2, 2, 2, 2, 2, 16, 12, 89, 1,
1109 0, 31, 80, 8, 3, 7, 18, 19, 20, 87,
1110 22, 23, 8, 11, 105, 12, 31, 10, 5, 12,
1111 14, 41, 17, 43, 15, 45, 16, 47, 48, 32,
1112 50, 6, 52, 53, 27, 28, 29, 30, 11, 12,
1113 33, 34, 35, 36, 37, 38, 39, 40, 12, 24,
1114 25, 23, 4, 10, 27, 28, 26, 32, 42, 10,
1115 33, 34, 35, 36, 37, 38, 39, 40, 12, 10,
1116 14, 83, 10, 44, 88, 49, 88, 88, 88, 88,
1117 88, 88, 12, 27, 28, 15, 46, 88, 51, 33,
1118 34, 35, 36, 37, 38, 39, 40, 27, 28, -1,
1119 83, -1, -1, 33, 34, 35, 36, 37, 38, 39,
1120 40, 12, -1, -1, 5, -1, -1, -1, 9, 20,
1121 -1, -1, -1, -1, -1, 12, 27, 28, -1, 16,
1122 21, 22, 33, 34, 35, 36, 37, 38, 39, 40,
1123 27, 28, -1, -1, -1, -1, 33, 34, 35, 36,
1124 37, 38, 39, 40, 12, -1, 18, 19, 20, 17,
1125 22, 23, -1, -1, -1, -1, -1, -1, 12, 27,
1126 28, -1, -1, -1, 18, 33, 34, 35, 36, 37,
1127 38, 39, 40, 27, 28, -1, -1, -1, -1, 33,
1128 34, 35, 36, 37, 38, 39, 40, 12, -1, -1,
1129 -1, -1, -1, -1, 19, -1, -1, -1, -1, -1,
1130 -1, 12, 27, 28, -1, -1, -1, -1, 33, 34,
1131 35, 36, 37, 38, 39, 40, 27, 28, -1, -1,
1132 -1, -1, 33, 34, 35, 36, 37, 38, 39, 40,
1133 18, 19, 20, 21, 22, 23, 24, 25, -1, -1,
1134 -1, -1, -1, -1, -1, -1, -1, 35, 36, 37,
1135 38, 39
1136};
1137
1138 /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
1139 symbol of state STATE-NUM. */
1140static const yytype_int8 yystos[] =
1141{
1142 0, 1, 7, 42, 12, 27, 28, 33, 34, 35,
1143 36, 37, 38, 39, 40, 43, 44, 45, 46, 48,
1144 50, 52, 54, 56, 58, 60, 62, 63, 64, 66,
1145 67, 0, 3, 8, 45, 46, 48, 50, 54, 56,
1146 63, 44, 64, 44, 64, 44, 64, 44, 44, 64,
1147 44, 64, 44, 44, 12, 8, 31, 11, 47, 47,
1148 14, 49, 49, 15, 51, 51, 20, 53, 16, 55,
1149 55, 17, 57, 57, 18, 59, 19, 61, 65, 5,
1150 68, 69, 70, 9, 21, 22, 69, 78, 32, 71,
1151 72, 63, 67, 23, 69, 29, 30, 43, 66, 76,
1152 77, 6, 24, 25, 72, 79, 4, 74, 73, 10,
1153 75, 26, 72, 10, 10, 10
1154};
1155
1156 /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
1157static const yytype_int8 yyr1[] =
1158{
1159 0, 41, 42, 42, 42, 43, 44, 44, 45, 45,
1160 45, 45, 45, 45, 45, 45, 45, 45, 46, 47,
1161 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
1162 58, 59, 60, 61, 62, 62, 63, 63, 65, 64,
1163 66, 66, 66, 66, 66, 66, 67, 67, 68, 68,
1164 68, 70, 69, 71, 71, 71, 73, 72, 74, 72,
1165 75, 72, 76, 72, 77, 77, 78, 78, 79, 79
1166};
1167
1168 /* YYR2[YYN] -- Number of symbols on the right hand side of rule YYN. */
1169static const yytype_int8 yyr2[] =
1170{
1171 0, 2, 3, 3, 1, 1, 2, 1, 1, 1,
1172 3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
1173 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1174 1, 1, 1, 1, 2, 1, 1, 2, 0, 6,
1175 1, 3, 3, 3, 3, 3, 1, 0, 1, 2,
1176 3, 0, 4, 1, 2, 3, 0, 4, 0, 4,
1177 0, 4, 0, 3, 2, 1, 2, 1, 2, 1
1178};
1179
1180
1181#define yyerrok (yyerrstatus = 0)
1182#define yyclearin (yychar = YYEMPTY)
1183#define YYEMPTY (-2)
1184#define YYEOF 0
1185
1186#define YYACCEPT goto yyacceptlab
1187#define YYABORT goto yyabortlab
1188#define YYERROR goto yyerrorlab
1189
1190
1191#define YYRECOVERING() (!!yyerrstatus)
1192
1193#define YYBACKUP(Token, Value) \
1194 do \
1195 if (yychar == YYEMPTY) \
1196 { \
1197 yychar = (Token); \
1198 yylval = (Value); \
1199 YYPOPSTACK (yylen); \
1200 yystate = *yyssp; \
1201 goto yybackup; \
1202 } \
1203 else \
1204 { \
1205 yyerror (YY_("syntax error: cannot back up")); \
1206 YYERROR; \
1207 } \
1208 while (0)
1209
1210/* Error token number */
1211#define YYTERROR 1
1212#define YYERRCODE 256
1213
1214
1215
1216/* Enable debugging if requested. */
1217#if HTMLDEBUG
1218
1219# ifndef YYFPRINTF
1220# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
1221# define YYFPRINTF fprintf
1222# endif
1223
1224# define YYDPRINTF(Args) \
1225do { \
1226 if (yydebug) \
1227 YYFPRINTF Args; \
1228} while (0)
1229
1230/* This macro is provided for backward compatibility. */
1231#ifndef YY_LOCATION_PRINT
1232# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
1233#endif
1234
1235
1236# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
1237do { \
1238 if (yydebug) \
1239 { \
1240 YYFPRINTF (stderr, "%s ", Title); \
1241 yy_symbol_print (stderr, \
1242 Type, Value); \
1243 YYFPRINTF (stderr, "\n"); \
1244 } \
1245} while (0)
1246
1247
1248/*-----------------------------------.
1249| Print this symbol's value on YYO. |
1250`-----------------------------------*/
1251
1252static void
1253yy_symbol_value_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1254{
1255 FILE *yyoutput = yyo;
1256 YYUSE (yyoutput);
1257 if (!yyvaluep)
1258 return;
1259# ifdef YYPRINT
1260 if (yytype < YYNTOKENS)
1261 YYPRINT (yyo, yytoknum[yytype], *yyvaluep);
1262# endif
1264 YYUSE (yytype);
1266}
1267
1268
1269/*---------------------------.
1270| Print this symbol on YYO. |
1271`---------------------------*/
1272
1273static void
1274yy_symbol_print (FILE *yyo, int yytype, YYSTYPE const * const yyvaluep)
1275{
1276 YYFPRINTF (yyo, "%s %s (",
1277 yytype < YYNTOKENS ? "token" : "nterm", yytname[yytype]);
1278
1279 yy_symbol_value_print (yyo, yytype, yyvaluep);
1280 YYFPRINTF (yyo, ")");
1281}
1282
1283/*------------------------------------------------------------------.
1284| yy_stack_print -- Print the state stack from its BOTTOM up to its |
1285| TOP (included). |
1286`------------------------------------------------------------------*/
1287
1288static void
1289yy_stack_print (yy_state_t *yybottom, yy_state_t *yytop)
1290{
1291 YYFPRINTF (stderr, "Stack now");
1292 for (; yybottom <= yytop; yybottom++)
1293 {
1294 int yybot = *yybottom;
1295 YYFPRINTF (stderr, " %d", yybot);
1296 }
1297 YYFPRINTF (stderr, "\n");
1298}
1299
1300# define YY_STACK_PRINT(Bottom, Top) \
1301do { \
1302 if (yydebug) \
1303 yy_stack_print ((Bottom), (Top)); \
1304} while (0)
1305
1306
1307/*------------------------------------------------.
1308| Report that the YYRULE is going to be reduced. |
1309`------------------------------------------------*/
1310
1311static void
1312yy_reduce_print (yy_state_t *yyssp, YYSTYPE *yyvsp, int yyrule)
1313{
1314 int yylno = yyrline[yyrule];
1315 int yynrhs = yyr2[yyrule];
1316 int yyi;
1317 YYFPRINTF (stderr, "Reducing stack by rule %d (line %d):\n",
1318 yyrule - 1, yylno);
1319 /* The symbols being reduced. */
1320 for (yyi = 0; yyi < yynrhs; yyi++)
1321 {
1322 YYFPRINTF (stderr, " $%d = ", yyi + 1);
1323 yy_symbol_print (stderr,
1324 yystos[+yyssp[yyi + 1 - yynrhs]],
1325 &yyvsp[(yyi + 1) - (yynrhs)]
1326 );
1327 YYFPRINTF (stderr, "\n");
1328 }
1329}
1330
1331# define YY_REDUCE_PRINT(Rule) \
1332do { \
1333 if (yydebug) \
1334 yy_reduce_print (yyssp, yyvsp, Rule); \
1335} while (0)
1336
1337/* Nonzero means print parse trace. It is left uninitialized so that
1338 multiple parsers can coexist. */
1339int yydebug;
1340#else /* !HTMLDEBUG */
1341# define YYDPRINTF(Args)
1342# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
1343# define YY_STACK_PRINT(Bottom, Top)
1344# define YY_REDUCE_PRINT(Rule)
1345#endif /* !HTMLDEBUG */
1346
1347
1348/* YYINITDEPTH -- initial size of the parser's stacks. */
1349#ifndef YYINITDEPTH
1350# define YYINITDEPTH 200
1351#endif
1352
1353/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
1354 if the built-in stack extension method is used).
1355
1356 Do not make this value too large; the results are undefined if
1357 YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
1358 evaluated with infinite-precision integer arithmetic. */
1359
1360#ifndef YYMAXDEPTH
1361# define YYMAXDEPTH 10000
1362#endif
1363
1364
1365#if YYERROR_VERBOSE
1366
1367# ifndef yystrlen
1368# if defined __GLIBC__ && defined _STRING_H
1369# define yystrlen(S) (YY_CAST (YYPTRDIFF_T, strlen (S)))
1370# else
1371/* Return the length of YYSTR. */
1372static YYPTRDIFF_T
1373yystrlen (const char *yystr)
1374{
1375 YYPTRDIFF_T yylen;
1376 for (yylen = 0; yystr[yylen]; yylen++)
1377 continue;
1378 return yylen;
1379}
1380# endif
1381# endif
1382
1383# ifndef yystpcpy
1384# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
1385# define yystpcpy stpcpy
1386# else
1387/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
1388 YYDEST. */
1389static char *
1390yystpcpy (char *yydest, const char *yysrc)
1391{
1392 char *yyd = yydest;
1393 const char *yys = yysrc;
1394
1395 while ((*yyd++ = *yys++) != '\0')
1396 continue;
1397
1398 return yyd - 1;
1399}
1400# endif
1401# endif
1402
1403# ifndef yytnamerr
1404/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
1405 quotes and backslashes, so that it's suitable for yyerror. The
1406 heuristic is that double-quoting is unnecessary unless the string
1407 contains an apostrophe, a comma, or backslash (other than
1408 backslash-backslash). YYSTR is taken from yytname. If YYRES is
1409 null, do not copy; instead, return the length of what the result
1410 would have been. */
1411static YYPTRDIFF_T
1412yytnamerr (char *yyres, const char *yystr)
1413{
1414 if (*yystr == '"')
1415 {
1416 YYPTRDIFF_T yyn = 0;
1417 char const *yyp = yystr;
1418
1419 for (;;)
1420 switch (*++yyp)
1421 {
1422 case '\'':
1423 case ',':
1424 goto do_not_strip_quotes;
1425
1426 case '\\':
1427 if (*++yyp != '\\')
1428 goto do_not_strip_quotes;
1429 else
1430 goto append;
1431
1432 append:
1433 default:
1434 if (yyres)
1435 yyres[yyn] = *yyp;
1436 yyn++;
1437 break;
1438
1439 case '"':
1440 if (yyres)
1441 yyres[yyn] = '\0';
1442 return yyn;
1443 }
1444 do_not_strip_quotes: ;
1445 }
1446
1447 if (yyres)
1448 return yystpcpy (yyres, yystr) - yyres;
1449 else
1450 return yystrlen (yystr);
1451}
1452# endif
1453
1454/* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message
1455 about the unexpected token YYTOKEN for the state stack whose top is
1456 YYSSP.
1457
1458 Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is
1459 not large enough to hold the message. In that case, also set
1460 *YYMSG_ALLOC to the required number of bytes. Return 2 if the
1461 required number of bytes is too large to store. */
1462static int
1463yysyntax_error (YYPTRDIFF_T *yymsg_alloc, char **yymsg,
1464 yy_state_t *yyssp, int yytoken)
1465{
1466 enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
1467 /* Internationalized format string. */
1468 const char *yyformat = YY_NULLPTR;
1469 /* Arguments of yyformat: reported tokens (one for the "unexpected",
1470 one per "expected"). */
1471 char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
1472 /* Actual size of YYARG. */
1473 int yycount = 0;
1474 /* Cumulated lengths of YYARG. */
1475 YYPTRDIFF_T yysize = 0;
1476
1477 /* There are many possibilities here to consider:
1478 - If this state is a consistent state with a default action, then
1479 the only way this function was invoked is if the default action
1480 is an error action. In that case, don't check for expected
1481 tokens because there are none.
1482 - The only way there can be no lookahead present (in yychar) is if
1483 this state is a consistent state with a default action. Thus,
1484 detecting the absence of a lookahead is sufficient to determine
1485 that there is no unexpected or expected token to report. In that
1486 case, just report a simple "syntax error".
1487 - Don't assume there isn't a lookahead just because this state is a
1488 consistent state with a default action. There might have been a
1489 previous inconsistent state, consistent state with a non-default
1490 action, or user semantic action that manipulated yychar.
1491 - Of course, the expected token list depends on states to have
1492 correct lookahead information, and it depends on the parser not
1493 to perform extra reductions after fetching a lookahead from the
1494 scanner and before detecting a syntax error. Thus, state merging
1495 (from LALR or IELR) and default reductions corrupt the expected
1496 token list. However, the list is correct for canonical LR with
1497 one exception: it will still contain any token that will not be
1498 accepted due to an error action in a later state.
1499 */
1500 if (yytoken != YYEMPTY)
1501 {
1502 int yyn = yypact[+*yyssp];
1503 YYPTRDIFF_T yysize0 = yytnamerr (YY_NULLPTR, yytname[yytoken]);
1504 yysize = yysize0;
1505 yyarg[yycount++] = yytname[yytoken];
1506 if (!yypact_value_is_default (yyn))
1507 {
1508 /* Start YYX at -YYN if negative to avoid negative indexes in
1509 YYCHECK. In other words, skip the first -YYN actions for
1510 this state because they are default actions. */
1511 int yyxbegin = yyn < 0 ? -yyn : 0;
1512 /* Stay within bounds of both yycheck and yytname. */
1513 int yychecklim = YYLAST - yyn + 1;
1514 int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
1515 int yyx;
1516
1517 for (yyx = yyxbegin; yyx < yyxend; ++yyx)
1518 if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR
1519 && !yytable_value_is_error (yytable[yyx + yyn]))
1520 {
1521 if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
1522 {
1523 yycount = 1;
1524 yysize = yysize0;
1525 break;
1526 }
1527 yyarg[yycount++] = yytname[yyx];
1528 {
1529 YYPTRDIFF_T yysize1
1530 = yysize + yytnamerr (YY_NULLPTR, yytname[yyx]);
1531 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1532 yysize = yysize1;
1533 else
1534 return 2;
1535 }
1536 }
1537 }
1538 }
1539
1540 switch (yycount)
1541 {
1542# define YYCASE_(N, S) \
1543 case N: \
1544 yyformat = S; \
1545 break
1546 default: /* Avoid compiler warnings. */
1547 YYCASE_(0, YY_("syntax error"));
1548 YYCASE_(1, YY_("syntax error, unexpected %s"));
1549 YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s"));
1550 YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s"));
1551 YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s"));
1552 YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"));
1553# undef YYCASE_
1554 }
1555
1556 {
1557 /* Don't count the "%s"s in the final size, but reserve room for
1558 the terminator. */
1559 YYPTRDIFF_T yysize1 = yysize + (yystrlen (yyformat) - 2 * yycount) + 1;
1560 if (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)
1561 yysize = yysize1;
1562 else
1563 return 2;
1564 }
1565
1566 if (*yymsg_alloc < yysize)
1567 {
1568 *yymsg_alloc = 2 * yysize;
1569 if (! (yysize <= *yymsg_alloc
1570 && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM))
1571 *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM;
1572 return 1;
1573 }
1574
1575 /* Avoid sprintf, as that infringes on the user's name space.
1576 Don't have undefined behavior even if the translation
1577 produced a string with the wrong number of "%s"s. */
1578 {
1579 char *yyp = *yymsg;
1580 int yyi = 0;
1581 while ((*yyp = *yyformat) != '\0')
1582 if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount)
1583 {
1584 yyp += yytnamerr (yyp, yyarg[yyi++]);
1585 yyformat += 2;
1586 }
1587 else
1588 {
1589 ++yyp;
1590 ++yyformat;
1591 }
1592 }
1593 return 0;
1594}
1595#endif /* YYERROR_VERBOSE */
1596
1597/*-----------------------------------------------.
1598| Release the memory associated to this symbol. |
1599`-----------------------------------------------*/
1600
1601static void
1602yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
1603{
1604 YYUSE (yyvaluep);
1605 if (!yymsg)
1606 yymsg = "Deleting";
1607 YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
1608
1610 YYUSE (yytype);
1612}
1613
1614
1615
1616
1617/* The lookahead symbol. */
1619
1620/* The semantic value of the lookahead symbol. */
1622/* Number of syntax errors so far. */
1624
1625
1626/*----------.
1627| yyparse. |
1628`----------*/
1629
1630int
1632{
1633 yy_state_fast_t yystate;
1634 /* Number of tokens to shift before error messages enabled. */
1635 int yyerrstatus;
1636
1637 /* The stacks and their tools:
1638 'yyss': related to states.
1639 'yyvs': related to semantic values.
1640
1641 Refer to the stacks through separate pointers, to allow yyoverflow
1642 to reallocate them elsewhere. */
1643
1644 /* The state stack. */
1645 yy_state_t yyssa[YYINITDEPTH];
1646 yy_state_t *yyss;
1647 yy_state_t *yyssp;
1648
1649 /* The semantic value stack. */
1650 YYSTYPE yyvsa[YYINITDEPTH];
1651 YYSTYPE *yyvs;
1652 YYSTYPE *yyvsp;
1653
1654 YYPTRDIFF_T yystacksize;
1655
1656 int yyn;
1657 int yyresult;
1658 /* Lookahead token as an internal (translated) token number. */
1659 int yytoken = 0;
1660 /* The variables used to return semantic value and location from the
1661 action routines. */
1662 YYSTYPE yyval;
1663
1664#if YYERROR_VERBOSE
1665 /* Buffer for error messages, and its allocated size. */
1666 char yymsgbuf[128];
1667 char *yymsg = yymsgbuf;
1668 YYPTRDIFF_T yymsg_alloc = sizeof yymsgbuf;
1669#endif
1670
1671#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
1672
1673 /* The number of symbols on the RHS of the reduced rule.
1674 Keep to zero when no symbol should be popped. */
1675 int yylen = 0;
1676
1677 yyssp = yyss = yyssa;
1678 yyvsp = yyvs = yyvsa;
1679 yystacksize = YYINITDEPTH;
1680
1681 YYDPRINTF ((stderr, "Starting parse\n"));
1682
1683 yystate = 0;
1684 yyerrstatus = 0;
1685 yynerrs = 0;
1686 yychar = YYEMPTY; /* Cause a token to be read. */
1687 goto yysetstate;
1688
1689
1690/*------------------------------------------------------------.
1691| yynewstate -- push a new state, which is found in yystate. |
1692`------------------------------------------------------------*/
1693yynewstate:
1694 /* In all cases, when you get here, the value and location stacks
1695 have just been pushed. So pushing a state here evens the stacks. */
1696 yyssp++;
1697
1698
1699/*--------------------------------------------------------------------.
1700| yysetstate -- set current state (the top of the stack) to yystate. |
1701`--------------------------------------------------------------------*/
1702yysetstate:
1703 YYDPRINTF ((stderr, "Entering state %d\n", yystate));
1704 YY_ASSERT (0 <= yystate && yystate < YYNSTATES);
1706 *yyssp = YY_CAST (yy_state_t, yystate);
1708
1709 if (yyss + yystacksize - 1 <= yyssp)
1710#if !defined yyoverflow && !defined YYSTACK_RELOCATE
1711 goto yyexhaustedlab;
1712#else
1713 {
1714 /* Get the current used size of the three stacks, in elements. */
1715 YYPTRDIFF_T yysize = yyssp - yyss + 1;
1716
1717# if defined yyoverflow
1718 {
1719 /* Give user a chance to reallocate the stack. Use copies of
1720 these so that the &'s don't force the real ones into
1721 memory. */
1722 yy_state_t *yyss1 = yyss;
1723 YYSTYPE *yyvs1 = yyvs;
1724
1725 /* Each stack pointer address is followed by the size of the
1726 data in use in that stack, in bytes. This used to be a
1727 conditional around just the two extra args, but that might
1728 be undefined if yyoverflow is a macro. */
1729 yyoverflow (YY_("memory exhausted"),
1730 &yyss1, yysize * YYSIZEOF (*yyssp),
1731 &yyvs1, yysize * YYSIZEOF (*yyvsp),
1732 &yystacksize);
1733 yyss = yyss1;
1734 yyvs = yyvs1;
1735 }
1736# else /* defined YYSTACK_RELOCATE */
1737 /* Extend the stack our own way. */
1738 if (YYMAXDEPTH <= yystacksize)
1739 goto yyexhaustedlab;
1740 yystacksize *= 2;
1741 if (YYMAXDEPTH < yystacksize)
1742 yystacksize = YYMAXDEPTH;
1743
1744 {
1745 yy_state_t *yyss1 = yyss;
1746 union yyalloc *yyptr =
1747 YY_CAST (union yyalloc *,
1748 YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
1749 if (! yyptr)
1750 goto yyexhaustedlab;
1751 YYSTACK_RELOCATE (yyss_alloc, yyss);
1752 YYSTACK_RELOCATE (yyvs_alloc, yyvs);
1753# undef YYSTACK_RELOCATE
1754 if (yyss1 != yyssa)
1755 YYSTACK_FREE (yyss1);
1756 }
1757# endif
1758
1759 yyssp = yyss + yysize - 1;
1760 yyvsp = yyvs + yysize - 1;
1761
1763 YYDPRINTF ((stderr, "Stack size increased to %ld\n",
1764 YY_CAST (long, yystacksize)));
1766
1767 if (yyss + yystacksize - 1 <= yyssp)
1768 YYABORT;
1769 }
1770#endif /* !defined yyoverflow && !defined YYSTACK_RELOCATE */
1771
1772 if (yystate == YYFINAL)
1773 YYACCEPT;
1774
1775 goto yybackup;
1776
1777
1778/*-----------.
1779| yybackup. |
1780`-----------*/
1781yybackup:
1782 /* Do appropriate processing given the current state. Read a
1783 lookahead token if we need one and don't already have one. */
1784
1785 /* First try to decide what to do without reference to lookahead token. */
1786 yyn = yypact[yystate];
1787 if (yypact_value_is_default (yyn))
1788 goto yydefault;
1789
1790 /* Not known => get a lookahead token if don't already have one. */
1791
1792 /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */
1793 if (yychar == YYEMPTY)
1794 {
1795 YYDPRINTF ((stderr, "Reading a token: "));
1796 yychar = yylex ();
1797 }
1798
1799 if (yychar <= YYEOF)
1800 {
1801 yychar = yytoken = YYEOF;
1802 YYDPRINTF ((stderr, "Now at end of input.\n"));
1803 }
1804 else
1805 {
1806 yytoken = YYTRANSLATE (yychar);
1807 YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
1808 }
1809
1810 /* If the proper action on seeing token YYTOKEN is to reduce or to
1811 detect an error, take that action. */
1812 yyn += yytoken;
1813 if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
1814 goto yydefault;
1815 yyn = yytable[yyn];
1816 if (yyn <= 0)
1817 {
1818 if (yytable_value_is_error (yyn))
1819 goto yyerrlab;
1820 yyn = -yyn;
1821 goto yyreduce;
1822 }
1823
1824 /* Count tokens shifted since error; after three, turn off error
1825 status. */
1826 if (yyerrstatus)
1827 yyerrstatus--;
1828
1829 /* Shift the lookahead token. */
1830 YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
1831 yystate = yyn;
1833 *++yyvsp = yylval;
1835
1836 /* Discard the shifted token. */
1837 yychar = YYEMPTY;
1838 goto yynewstate;
1839
1840
1841/*-----------------------------------------------------------.
1842| yydefault -- do the default action for the current state. |
1843`-----------------------------------------------------------*/
1844yydefault:
1845 yyn = yydefact[yystate];
1846 if (yyn == 0)
1847 goto yyerrlab;
1848 goto yyreduce;
1849
1850
1851/*-----------------------------.
1852| yyreduce -- do a reduction. |
1853`-----------------------------*/
1854yyreduce:
1855 /* yyn is the number of a rule to reduce with. */
1856 yylen = yyr2[yyn];
1857
1858 /* If YYLEN is nonzero, implement the default value of the action:
1859 '$$ = $1'.
1860
1861 Otherwise, the following line sets YYVAL to garbage.
1862 This behavior is undocumented and Bison
1863 users should not rely upon it. Assigning to YYVAL
1864 unconditionally makes the parser a bit smaller, and it avoids a
1865 GCC warning that YYVAL may be used uninitialized. */
1866 yyval = yyvsp[1-yylen];
1867
1868
1869 YY_REDUCE_PRINT (yyn);
1870 switch (yyn)
1871 {
1872 case 2:
1873#line 410 "../../lib/common/htmlparse.y"
1874 { HTMLstate.lbl = mkLabel((yyvsp[-1].txt),HTML_TEXT); }
1875#line 1876 "htmlparse.c"
1876 break;
1877
1878 case 3:
1879#line 411 "../../lib/common/htmlparse.y"
1880 { HTMLstate.lbl = mkLabel((yyvsp[-1].tbl),HTML_TBL); }
1881#line 1882 "htmlparse.c"
1882 break;
1883
1884 case 4:
1885#line 412 "../../lib/common/htmlparse.y"
1886 { cleanup(); YYABORT; }
1887#line 1888 "htmlparse.c"
1888 break;
1889
1890 case 5:
1891#line 415 "../../lib/common/htmlparse.y"
1892 { (yyval.txt) = mkText(); }
1893#line 1894 "htmlparse.c"
1894 break;
1895
1896 case 8:
1897#line 422 "../../lib/common/htmlparse.y"
1898 { appendFItemList(HTMLstate.str);}
1899#line 1900 "htmlparse.c"
1900 break;
1901
1902 case 9:
1903#line 423 "../../lib/common/htmlparse.y"
1904 {appendFLineList((yyvsp[0].i));}
1905#line 1906 "htmlparse.c"
1906 break;
1907
1908 case 18:
1909#line 434 "../../lib/common/htmlparse.y"
1910 { pushFont ((yyvsp[0].font)); }
1911#line 1912 "htmlparse.c"
1912 break;
1913
1914 case 19:
1915#line 437 "../../lib/common/htmlparse.y"
1916 { popFont (); }
1917#line 1918 "htmlparse.c"
1918 break;
1919
1920 case 20:
1921#line 440 "../../lib/common/htmlparse.y"
1922 {pushFont((yyvsp[0].font));}
1923#line 1924 "htmlparse.c"
1924 break;
1925
1926 case 21:
1927#line 443 "../../lib/common/htmlparse.y"
1928 {popFont();}
1929#line 1930 "htmlparse.c"
1930 break;
1931
1932 case 22:
1933#line 446 "../../lib/common/htmlparse.y"
1934 {pushFont((yyvsp[0].font));}
1935#line 1936 "htmlparse.c"
1936 break;
1937
1938 case 23:
1939#line 449 "../../lib/common/htmlparse.y"
1940 {popFont();}
1941#line 1942 "htmlparse.c"
1942 break;
1943
1944 case 24:
1945#line 452 "../../lib/common/htmlparse.y"
1946 {pushFont((yyvsp[0].font));}
1947#line 1948 "htmlparse.c"
1948 break;
1949
1950 case 25:
1951#line 455 "../../lib/common/htmlparse.y"
1952 {popFont();}
1953#line 1954 "htmlparse.c"
1954 break;
1955
1956 case 26:
1957#line 458 "../../lib/common/htmlparse.y"
1958 {pushFont((yyvsp[0].font));}
1959#line 1960 "htmlparse.c"
1960 break;
1961
1962 case 27:
1963#line 461 "../../lib/common/htmlparse.y"
1964 {popFont();}
1965#line 1966 "htmlparse.c"
1966 break;
1967
1968 case 28:
1969#line 464 "../../lib/common/htmlparse.y"
1970 {pushFont((yyvsp[0].font));}
1971#line 1972 "htmlparse.c"
1972 break;
1973
1974 case 29:
1975#line 467 "../../lib/common/htmlparse.y"
1976 {popFont();}
1977#line 1978 "htmlparse.c"
1978 break;
1979
1980 case 30:
1981#line 470 "../../lib/common/htmlparse.y"
1982 {pushFont((yyvsp[0].font));}
1983#line 1984 "htmlparse.c"
1984 break;
1985
1986 case 31:
1987#line 473 "../../lib/common/htmlparse.y"
1988 {popFont();}
1989#line 1990 "htmlparse.c"
1990 break;
1991
1992 case 32:
1993#line 476 "../../lib/common/htmlparse.y"
1994 {pushFont((yyvsp[0].font));}
1995#line 1996 "htmlparse.c"
1996 break;
1997
1998 case 33:
1999#line 479 "../../lib/common/htmlparse.y"
2000 {popFont();}
2001#line 2002 "htmlparse.c"
2002 break;
2003
2004 case 34:
2005#line 482 "../../lib/common/htmlparse.y"
2006 { (yyval.i) = (yyvsp[-1].i); }
2007#line 2008 "htmlparse.c"
2008 break;
2009
2010 case 35:
2011#line 483 "../../lib/common/htmlparse.y"
2012 { (yyval.i) = (yyvsp[0].i); }
2013#line 2014 "htmlparse.c"
2014 break;
2015
2016 case 38:
2017#line 490 "../../lib/common/htmlparse.y"
2018 {
2019 if (nonSpace(agxbuse(HTMLstate.str))) {
2020 htmlerror ("Syntax error: non-space string used before <TABLE>");
2021 cleanup(); YYABORT;
2022 }
2023 (yyvsp[0].tbl)->u.p.prev = HTMLstate.tblstack;
2024 (yyvsp[0].tbl)->u.p.rows = dtopen(&rowDisc, Dtqueue);
2025 HTMLstate.tblstack = (yyvsp[0].tbl);
2026 (yyvsp[0].tbl)->font = HTMLstate.fontstack->cfont;
2027 (yyval.tbl) = (yyvsp[0].tbl);
2028 }
2029#line 2030 "htmlparse.c"
2030 break;
2031
2032 case 39:
2033#line 501 "../../lib/common/htmlparse.y"
2034 {
2035 if (nonSpace(agxbuse(HTMLstate.str))) {
2036 htmlerror ("Syntax error: non-space string used after </TABLE>");
2037 cleanup(); YYABORT;
2038 }
2039 (yyval.tbl) = HTMLstate.tblstack;
2040 HTMLstate.tblstack = HTMLstate.tblstack->u.p.prev;
2041 }
2042#line 2043 "htmlparse.c"
2043 break;
2044
2045 case 40:
2046#line 511 "../../lib/common/htmlparse.y"
2047 { (yyval.tbl) = (yyvsp[0].tbl); }
2048#line 2049 "htmlparse.c"
2049 break;
2050
2051 case 41:
2052#line 512 "../../lib/common/htmlparse.y"
2053 { (yyval.tbl)=(yyvsp[-1].tbl); }
2054#line 2055 "htmlparse.c"
2055 break;
2056
2057 case 42:
2058#line 513 "../../lib/common/htmlparse.y"
2059 { (yyval.tbl)=(yyvsp[-1].tbl); }
2060#line 2061 "htmlparse.c"
2061 break;
2062
2063 case 43:
2064#line 514 "../../lib/common/htmlparse.y"
2065 { (yyval.tbl)=(yyvsp[-1].tbl); }
2066#line 2067 "htmlparse.c"
2067 break;
2068
2069 case 44:
2070#line 515 "../../lib/common/htmlparse.y"
2071 { (yyval.tbl)=(yyvsp[-1].tbl); }
2072#line 2073 "htmlparse.c"
2073 break;
2074
2075 case 45:
2076#line 516 "../../lib/common/htmlparse.y"
2077 { (yyval.tbl)=(yyvsp[-1].tbl); }
2078#line 2079 "htmlparse.c"
2079 break;
2080
2081 case 48:
2082#line 523 "../../lib/common/htmlparse.y"
2083 { (yyval.p) = (yyvsp[0].p); }
2084#line 2085 "htmlparse.c"
2085 break;
2086
2087 case 49:
2088#line 524 "../../lib/common/htmlparse.y"
2089 { (yyval.p) = (yyvsp[0].p); }
2090#line 2091 "htmlparse.c"
2091 break;
2092
2093 case 50:
2094#line 525 "../../lib/common/htmlparse.y"
2095 { (yyvsp[-2].p)->ruled = 1; (yyval.p) = (yyvsp[0].p); }
2096#line 2097 "htmlparse.c"
2097 break;
2098
2099 case 51:
2100#line 528 "../../lib/common/htmlparse.y"
2101 { addRow (); }
2102#line 2103 "htmlparse.c"
2103 break;
2104
2105 case 52:
2106#line 528 "../../lib/common/htmlparse.y"
2107 { (yyval.p) = lastRow(); }
2108#line 2109 "htmlparse.c"
2109 break;
2110
2111 case 53:
2112#line 531 "../../lib/common/htmlparse.y"
2113 { (yyval.cell) = (yyvsp[0].cell); }
2114#line 2115 "htmlparse.c"
2115 break;
2116
2117 case 54:
2118#line 532 "../../lib/common/htmlparse.y"
2119 { (yyval.cell) = (yyvsp[0].cell); }
2120#line 2121 "htmlparse.c"
2121 break;
2122
2123 case 55:
2124#line 533 "../../lib/common/htmlparse.y"
2125 { (yyvsp[-2].cell)->ruled |= HTML_VRULE; (yyval.cell) = (yyvsp[0].cell); }
2126#line 2127 "htmlparse.c"
2127 break;
2128
2129 case 56:
2130#line 536 "../../lib/common/htmlparse.y"
2131 { setCell((yyvsp[-1].cell),(yyvsp[0].tbl),HTML_TBL); }
2132#line 2133 "htmlparse.c"
2133 break;
2134
2135 case 57:
2136#line 536 "../../lib/common/htmlparse.y"
2137 { (yyval.cell) = (yyvsp[-3].cell); }
2138#line 2139 "htmlparse.c"
2139 break;
2140
2141 case 58:
2142#line 537 "../../lib/common/htmlparse.y"
2143 { setCell((yyvsp[-1].cell),(yyvsp[0].txt),HTML_TEXT); }
2144#line 2145 "htmlparse.c"
2145 break;
2146
2147 case 59:
2148#line 537 "../../lib/common/htmlparse.y"
2149 { (yyval.cell) = (yyvsp[-3].cell); }
2150#line 2151 "htmlparse.c"
2151 break;
2152
2153 case 60:
2154#line 538 "../../lib/common/htmlparse.y"
2155 { setCell((yyvsp[-1].cell),(yyvsp[0].img),HTML_IMAGE); }
2156#line 2157 "htmlparse.c"
2157 break;
2158
2159 case 61:
2160#line 538 "../../lib/common/htmlparse.y"
2161 { (yyval.cell) = (yyvsp[-3].cell); }
2162#line 2163 "htmlparse.c"
2163 break;
2164
2165 case 62:
2166#line 539 "../../lib/common/htmlparse.y"
2167 { setCell((yyvsp[0].cell),mkText(),HTML_TEXT); }
2168#line 2169 "htmlparse.c"
2169 break;
2170
2171 case 63:
2172#line 539 "../../lib/common/htmlparse.y"
2173 { (yyval.cell) = (yyvsp[-2].cell); }
2174#line 2175 "htmlparse.c"
2175 break;
2176
2177 case 64:
2178#line 542 "../../lib/common/htmlparse.y"
2179 { (yyval.img) = (yyvsp[-1].img); }
2180#line 2181 "htmlparse.c"
2181 break;
2182
2183 case 65:
2184#line 543 "../../lib/common/htmlparse.y"
2185 { (yyval.img) = (yyvsp[0].img); }
2186#line 2187 "htmlparse.c"
2187 break;
2188
2189
2190#line 2191 "htmlparse.c"
2191
2192 default: break;
2193 }
2194 /* User semantic actions sometimes alter yychar, and that requires
2195 that yytoken be updated with the new translation. We take the
2196 approach of translating immediately before every use of yytoken.
2197 One alternative is translating here after every semantic action,
2198 but that translation would be missed if the semantic action invokes
2199 YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or
2200 if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an
2201 incorrect destructor might then be invoked immediately. In the
2202 case of YYERROR or YYBACKUP, subsequent parser actions might lead
2203 to an incorrect destructor call or verbose syntax error message
2204 before the lookahead is translated. */
2205 YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
2206
2207 YYPOPSTACK (yylen);
2208 yylen = 0;
2209 YY_STACK_PRINT (yyss, yyssp);
2210
2211 *++yyvsp = yyval;
2212
2213 /* Now 'shift' the result of the reduction. Determine what state
2214 that goes to, based on the state we popped back to and the rule
2215 number reduced by. */
2216 {
2217 const int yylhs = yyr1[yyn] - YYNTOKENS;
2218 const int yyi = yypgoto[yylhs] + *yyssp;
2219 yystate = (0 <= yyi && yyi <= YYLAST && yycheck[yyi] == *yyssp
2220 ? yytable[yyi]
2221 : yydefgoto[yylhs]);
2222 }
2223
2224 goto yynewstate;
2225
2226
2227/*--------------------------------------.
2228| yyerrlab -- here on detecting error. |
2229`--------------------------------------*/
2230yyerrlab:
2231 /* Make sure we have latest lookahead translation. See comments at
2232 user semantic actions for why this is necessary. */
2233 yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar);
2234
2235 /* If not already recovering from an error, report this error. */
2236 if (!yyerrstatus)
2237 {
2238 ++yynerrs;
2239#if ! YYERROR_VERBOSE
2240 yyerror (YY_("syntax error"));
2241#else
2242# define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \
2243 yyssp, yytoken)
2244 {
2245 char const *yymsgp = YY_("syntax error");
2246 int yysyntax_error_status;
2247 yysyntax_error_status = YYSYNTAX_ERROR;
2248 if (yysyntax_error_status == 0)
2249 yymsgp = yymsg;
2250 else if (yysyntax_error_status == 1)
2251 {
2252 if (yymsg != yymsgbuf)
2253 YYSTACK_FREE (yymsg);
2254 yymsg = YY_CAST (char *, YYSTACK_ALLOC (YY_CAST (YYSIZE_T, yymsg_alloc)));
2255 if (!yymsg)
2256 {
2257 yymsg = yymsgbuf;
2258 yymsg_alloc = sizeof yymsgbuf;
2259 yysyntax_error_status = 2;
2260 }
2261 else
2262 {
2263 yysyntax_error_status = YYSYNTAX_ERROR;
2264 yymsgp = yymsg;
2265 }
2266 }
2267 yyerror (yymsgp);
2268 if (yysyntax_error_status == 2)
2269 goto yyexhaustedlab;
2270 }
2271# undef YYSYNTAX_ERROR
2272#endif
2273 }
2274
2275
2276
2277 if (yyerrstatus == 3)
2278 {
2279 /* If just tried and failed to reuse lookahead token after an
2280 error, discard it. */
2281
2282 if (yychar <= YYEOF)
2283 {
2284 /* Return failure if at end of input. */
2285 if (yychar == YYEOF)
2286 YYABORT;
2287 }
2288 else
2289 {
2290 yydestruct ("Error: discarding",
2291 yytoken, &yylval);
2292 yychar = YYEMPTY;
2293 }
2294 }
2295
2296 /* Else will try to reuse lookahead token after shifting the error
2297 token. */
2298 goto yyerrlab1;
2299
2300
2301/*---------------------------------------------------.
2302| yyerrorlab -- error raised explicitly by YYERROR. |
2303`---------------------------------------------------*/
2304yyerrorlab:
2305 /* Pacify compilers when the user code never invokes YYERROR and the
2306 label yyerrorlab therefore never appears in user code. */
2307 if (0)
2308 YYERROR;
2309
2310 /* Do not reclaim the symbols of the rule whose action triggered
2311 this YYERROR. */
2312 YYPOPSTACK (yylen);
2313 yylen = 0;
2314 YY_STACK_PRINT (yyss, yyssp);
2315 yystate = *yyssp;
2316 goto yyerrlab1;
2317
2318
2319/*-------------------------------------------------------------.
2320| yyerrlab1 -- common code for both syntax error and YYERROR. |
2321`-------------------------------------------------------------*/
2322yyerrlab1:
2323 yyerrstatus = 3; /* Each real token shifted decrements this. */
2324
2325 for (;;)
2326 {
2327 yyn = yypact[yystate];
2328 if (!yypact_value_is_default (yyn))
2329 {
2330 yyn += YYTERROR;
2331 if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
2332 {
2333 yyn = yytable[yyn];
2334 if (0 < yyn)
2335 break;
2336 }
2337 }
2338
2339 /* Pop the current state because it cannot handle the error token. */
2340 if (yyssp == yyss)
2341 YYABORT;
2342
2343
2344 yydestruct ("Error: popping",
2345 yystos[yystate], yyvsp);
2346 YYPOPSTACK (1);
2347 yystate = *yyssp;
2348 YY_STACK_PRINT (yyss, yyssp);
2349 }
2350
2352 *++yyvsp = yylval;
2354
2355
2356 /* Shift the error token. */
2357 YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
2358
2359 yystate = yyn;
2360 goto yynewstate;
2361
2362
2363/*-------------------------------------.
2364| yyacceptlab -- YYACCEPT comes here. |
2365`-------------------------------------*/
2366yyacceptlab:
2367 yyresult = 0;
2368 goto yyreturn;
2369
2370
2371/*-----------------------------------.
2372| yyabortlab -- YYABORT comes here. |
2373`-----------------------------------*/
2374yyabortlab:
2375 yyresult = 1;
2376 goto yyreturn;
2377
2378
2379#if !defined yyoverflow || YYERROR_VERBOSE
2380/*-------------------------------------------------.
2381| yyexhaustedlab -- memory exhaustion comes here. |
2382`-------------------------------------------------*/
2383yyexhaustedlab:
2384 yyerror (YY_("memory exhausted"));
2385 yyresult = 2;
2386 /* Fall through. */
2387#endif
2388
2389
2390/*-----------------------------------------------------.
2391| yyreturn -- parsing is finished, return the result. |
2392`-----------------------------------------------------*/
2393yyreturn:
2394 if (yychar != YYEMPTY)
2395 {
2396 /* Make sure we have latest lookahead translation. See comments at
2397 user semantic actions for why this is necessary. */
2398 yytoken = YYTRANSLATE (yychar);
2399 yydestruct ("Cleanup: discarding lookahead",
2400 yytoken, &yylval);
2401 }
2402 /* Do not reclaim the symbols of the rule whose action triggered
2403 this YYABORT or YYACCEPT. */
2404 YYPOPSTACK (yylen);
2405 YY_STACK_PRINT (yyss, yyssp);
2406 while (yyssp != yyss)
2407 {
2408 yydestruct ("Cleanup: popping",
2409 yystos[+*yyssp], yyvsp);
2410 YYPOPSTACK (1);
2411 }
2412#ifndef yyoverflow
2413 if (yyss != yyssa)
2414 YYSTACK_FREE (yyss);
2415#endif
2416#if YYERROR_VERBOSE
2417 if (yymsg != yymsgbuf)
2418 YYSTACK_FREE (yymsg);
2419#endif
2420 return yyresult;
2421}
2422#line 555 "../../lib/common/htmlparse.y"
2423
2424
2425/* parseHTML:
2426 * Return parsed label or NULL if failure.
2427 * Set warn to 0 on success; 1 for warning message; 2 if no expat; 3 for error
2428 * message.
2429 */
2431parseHTML (char* txt, int* warn, htmlenv_t *env)
2432{
2433 agxbuf str = {0};
2434 htmllabel_t* l;
2435 sfont_t dfltf;
2436
2437 dfltf.cfont = NULL;
2438 dfltf.pfont = NULL;
2439 HTMLstate.fontstack = &dfltf;
2440 HTMLstate.tblstack = 0;
2441 HTMLstate.lbl = 0;
2442 HTMLstate.gvc = GD_gvc(env->g);
2443 HTMLstate.fitemList = dtopen(&fstrDisc, Dtqueue);
2444 HTMLstate.fspanList = dtopen(&fspanDisc, Dtqueue);
2445
2446 HTMLstate.str = &str;
2447
2448 if (initHTMLlexer (txt, &str, env)) {/* failed: no libexpat - give up */
2449 *warn = 2;
2450 l = NULL;
2451 }
2452 else {
2453 htmlparse();
2454 *warn = clearHTMLlexer ();
2455 l = HTMLstate.lbl;
2456 }
2457
2458 dtclose (HTMLstate.fitemList);
2459 dtclose (HTMLstate.fspanList);
2460
2461 HTMLstate.fitemList = NULL;
2462 HTMLstate.fspanList = NULL;
2463 HTMLstate.fontstack = NULL;
2464
2465 agxbfree (&str);
2466
2467 return l;
2468}
2469
static void agxbfree(agxbuf *xb)
free any malloced resources
Definition agxbuf.h:77
static char * agxbuse(agxbuf *xb)
Definition agxbuf.h:286
static char * agxbdisown(agxbuf *xb)
Definition agxbuf.h:299
Memory allocation wrappers that exit on failure.
static char * gv_strdup(const char *original)
Definition alloc.h:101
static void * gv_calloc(size_t nmemb, size_t size)
Definition alloc.h:26
static void * gv_alloc(size_t size)
Definition alloc.h:47
CDT_API Dtlink_t * dtflatten(Dt_t *)
Definition dtflatten.c:10
#define dtclear(d)
Definition cdt.h:196
CDT_API int dtsize(Dt_t *)
Definition dtsize.c:12
#define dtlink(d, e)
Definition cdt.h:183
#define dtinsert(d, o)
Definition cdt.h:193
CDT_API int dtclose(Dt_t *)
Definition dtclose.c:8
#define dtlast(d)
Definition cdt.h:189
CDT_API Dtmethod_t * Dtqueue
queue: insert at top, delete at tail
Definition dtlist.c:134
CDT_API Dt_t * dtopen(Dtdisc_t *, Dtmethod_t *)
Definition dtopen.c:9
#define dtnext(d, o)
Definition cdt.h:188
#define dtfirst(d)
Definition cdt.h:187
static const char *const yytname[]
Definition exparse.c:743
#define YYSTYPE
Definition gmlparse.c:66
short yytype_int16
Definition gmlparse.c:483
int yy_state_fast_t
Definition gmlparse.c:549
signed char yytype_int8
Definition gmlparse.c:475
yytype_int8 yy_state_t
Definition gmlparse.c:546
node NULL
Definition grammar.y:149
static int cnt(Dict_t *d, Dtlink_t **set)
Definition graph.c:199
#define GD_gvc(g)
Definition types.h:355
static Agdesc_t kind
Definition gvpack.cpp:88
void htmlerror(const char *msg)
Definition htmllex.c:78
int initHTMLlexer(char *src, agxbuf *xb, htmlenv_t *env)
Definition htmllex.c:764
int clearHTMLlexer(void)
Definition htmllex.c:794
#define T_n_sup
Definition htmlparse.c:546
#define T_end_row
Definition htmlparse.c:534
#define T_end_table
Definition htmlparse.c:537
Dt_t * fitemList
Definition htmlparse.c:95
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
Definition htmlparse.c:750
#define YYMAXDEPTH
Definition htmlparse.c:1361
#define YYSTACK_FREE
Definition htmlparse.c:812
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
Definition htmlparse.c:1342
#define T_br
Definition htmlparse.c:556
static const yytype_int8 yytranslate[]
Definition htmlparse.c:925
static struct @74 HTMLstate
static htmllabel_t * mkLabel(void *obj, char kind)
Definition htmlparse.c:322
#define YY_ASSERT(E)
Definition htmlparse.c:770
#define YY_(Msgid)
Definition htmlparse.c:711
#define T_vr
Definition htmlparse.c:553
#define T_error
Definition htmlparse.c:541
#define T_n_s
Definition htmlparse.c:548
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
Definition htmlparse.c:751
htmltokentype
Definition htmlparse.c:489
static const yytype_int8 yydefact[]
Definition htmlparse.c:1037
#define YYNSTATES
Definition htmlparse.c:912
#define YYSTYPE
Definition htmlparse.c:66
Dt_t * fspanList
Definition htmlparse.c:96
#define T_end_cell
Definition htmlparse.c:538
#define YY_IGNORE_USELESS_CAST_END
Definition htmlparse.c:766
static htmltxt_t * mkText(void)
Definition htmlparse.c:249
#define T_n_sub
Definition htmlparse.c:547
short yytype_int16
Definition htmlparse.c:635
static void appendFItemList(agxbuf *ag)
Definition htmlparse.c:202
#define YYUSE(E)
Definition htmlparse.c:733
#define yychar
Definition htmlparse.c:74
#define YYEOF
Definition htmlparse.c:1184
#define YYABORT
Definition htmlparse.c:1187
#define T_n_bold
Definition htmlparse.c:543
#define YYSTACK_BYTES(N)
Definition htmlparse.c:856
#define T_html
Definition htmlparse.c:535
static const yytype_int8 yycheck[]
Definition htmlparse.c:1106
static void cleanTbl(htmltbl_t *tp)
Definition htmlparse.c:116
#define T_BR
Definition htmlparse.c:555
htmllabel_t * parseHTML(char *txt, int *warn, htmlenv_t *env)
Definition htmlparse.c:2431
#define YY_REDUCE_PRINT(Rule)
Definition htmlparse.c:1344
#define YY_CAST(Type, Val)
Definition htmlparse.c:441
static const yytype_int16 yypact[]
Definition htmlparse.c:1018
#define T_underline
Definition htmlparse.c:564
#define yylex
Definition htmlparse.c:69
#define T_sup
Definition htmlparse.c:566
#define YY_NULLPTR
Definition htmlparse.c:453
static void cleanup(void)
Definition htmlparse.c:354
#define T_row
Definition htmlparse.c:533
static void appendFLineList(int v)
Definition htmlparse.c:214
#define YYFINAL
Definition htmlparse.c:901
GVC_t * gvc
Definition htmlparse.c:99
#define T_table
Definition htmlparse.c:559
#define T_end_vr
Definition htmlparse.c:554
#define T_end_html
Definition htmlparse.c:536
static void setCell(htmlcell_t *cp, void *obj, char kind)
Definition htmlparse.c:300
static const yytype_int16 yypgoto[]
Definition htmlparse.c:1054
static void yydestruct(const char *yymsg, int yytype, YYSTYPE *yyvaluep)
Definition htmlparse.c:1602
static pitem * addRow(void)
Definition htmlparse.c:285
#define yyparse
Definition htmlparse.c:1631
static void cleanCell(htmlcell_t *cp)
Definition htmlparse.c:127
#define yylval
Definition htmlparse.c:73
#define YYNTOKENS
Definition htmlparse.c:906
sfont_t * fontstack
Definition htmlparse.c:98
#define T_IMG
Definition htmlparse.c:557
static Dtdisc_t rowDisc
Definition htmlparse.c:144
unsigned char yytype_uint8
Definition htmlparse.c:644
#define YY_STACK_PRINT(Bottom, Top)
Definition htmlparse.c:1343
static Dtdisc_t cellDisc
Definition htmlparse.c:150
#define T_VR
Definition htmlparse.c:552
#define YYSIZE_T
Definition htmlparse.c:685
#define YYSTACK_ALLOC_MAXIMUM
Definition htmlparse.c:814
#define yydebug
Definition htmlparse.c:71
#define YY_IGNORE_USELESS_CAST_BEGIN
Definition htmlparse.c:765
static int nonSpace(char *s)
Definition htmlparse.c:385
static const yytype_int8 yyr2[]
Definition htmlparse.c:1169
static void free_citem(void *item)
Definition htmlparse.c:138
void * malloc(YYSIZE_T)
static const yytype_int8 yytable[]
Definition htmlparse.c:1074
static Dtdisc_t fspanDisc
Definition htmlparse.c:193
#define T_bold
Definition htmlparse.c:563
#define YYPTRDIFF_T
Definition htmlparse.c:671
static void popFont(void)
Definition htmlparse.c:424
#define yynerrs
Definition htmlparse.c:72
#define T_end_img
Definition htmlparse.c:532
#define T_sub
Definition htmlparse.c:567
HTMLSTYPE htmllval
#define YYACCEPT
Definition htmlparse.c:1186
#define yytable_value_is_error(Yyn)
Definition htmlparse.c:1013
agxbuf * str
Definition htmlparse.c:97
int htmlparse(void)
#define T_s
Definition htmlparse.c:568
#define YYTRANSLATE(YYX)
Definition htmlparse.c:920
static const yytype_int8 yystos[]
Definition htmlparse.c:1140
static Dtdisc_t fstrDisc
Definition htmlparse.c:188
static pitem * lastRow(void)
Definition htmlparse.c:275
static void free_ritem(void *item)
Definition htmlparse.c:106
#define T_n_italic
Definition htmlparse.c:542
static void freeFontstack(void)
Definition htmlparse.c:338
htmllabel_t * lbl
Definition htmlparse.c:93
static const yytype_int8 yyr1[]
Definition htmlparse.c:1157
#define T_end_font
Definition htmlparse.c:539
#define T_overline
Definition htmlparse.c:565
#define T_hr
Definition htmlparse.c:550
#define YYTERROR
Definition htmlparse.c:1211
#define YYPOPSTACK(N)
int yy_state_fast_t
Definition htmlparse.c:701
#define T_font
Definition htmlparse.c:561
#define T_italic
Definition htmlparse.c:562
unsigned short yytype_uint16
Definition htmlparse.c:655
static const yytype_int8 yydefgoto[]
Definition htmlparse.c:1063
htmltbl_t * tblstack
Definition htmlparse.c:94
static void free_fitem(void *item)
Definition htmlparse.c:167
#define T_end_br
Definition htmlparse.c:531
#define T_n_underline
Definition htmlparse.c:544
#define YYEMPTY
Definition htmlparse.c:1183
#define YYLAST
Definition htmlparse.c:903
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
Definition htmlparse.c:867
#define yypact_value_is_default(Yyn)
Definition htmlparse.c:1008
#define T_cell
Definition htmlparse.c:560
#define YYINITDEPTH
Definition htmlparse.c:1350
signed char yytype_int8
Definition htmlparse.c:627
void free(void *)
#define YYERROR
Definition htmlparse.c:1188
#define YYSIZEOF(X)
Definition htmlparse.c:695
static void free_fspan(void *span)
Definition htmlparse.c:173
#define YYSTACK_ALLOC
Definition htmlparse.c:811
#define T_end_hr
Definition htmlparse.c:551
yytype_int8 yy_state_t
Definition htmlparse.c:698
#define YYDPRINTF(Args)
Definition htmlparse.c:1341
#define T_string
Definition htmlparse.c:540
#define T_img
Definition htmlparse.c:558
#define T_HR
Definition htmlparse.c:549
#define yyerror
Definition htmlparse.c:70
#define T_n_overline
Definition htmlparse.c:545
static void pushFont(textfont_t *fp)
Definition htmlparse.c:399
$2 font
Definition htmlparse.y:498
rows row
Definition htmlparse.y:524
void free_html_text(htmltxt_t *t)
Definition htmltable.c:814
void free_html_label(htmllabel_t *lp, int root)
Definition htmltable.c:876
void free_html_data(htmldata_t *dp)
Definition htmltable.c:803
#define HTML_TEXT
Definition htmltable.h:102
#define HTML_VRULE
Definition htmltable.h:105
#define HTML_IMAGE
Definition htmltable.h:103
#define HTML_TBL
Definition htmltable.h:101
#define UNSET_ALIGN
Definition htmltable.h:43
#define __INT_LEAST8_TYPE__
#define __UINT_LEAST8_TYPE__
Definition moc_predefs.h:10
#define __UINT_LEAST16_TYPE__
#define __INT_LEAST16_TYPE__
Definition gvcint.h:80
Definition cdt.h:104
Dtfree_f freef
Definition cdt.h:93
int key
Definition cdt.h:89
int link
Definition cdt.h:91
result of partitioning available space, part of maze
Definition grid.h:33
textspan_t ti
Definition htmlparse.c:159
Dtlink_t link
Definition htmlparse.c:158
htextspan_t lp
Definition htmlparse.c:164
Dtlink_t link
Definition htmlparse.c:163
size_t nitems
Definition htmltable.h:53
textspan_t * items
Definition htmltable.h:52
htmllabel_t child
Definition htmltable.h:148
unsigned char ruled
Definition htmltable.h:150
htmldata_t data
Definition htmltable.h:143
graph_t * g
Definition htmltable.h:171
htmltxt_t * txt
Definition htmltable.h:136
union htmllabel_t::@78 u
htmltbl_t * tbl
Definition htmltable.h:135
htmlimg_t * img
Definition htmltable.h:137
bool vrule
vertical rule
Definition htmltable.h:130
union htmltbl_t::@75 u
bool hrule
horizontal rule
Definition htmltable.h:129
htmltbl_t * prev
Definition htmltable.h:119
struct htmltbl_t::@75::@77 p
htmldata_t data
Definition htmltable.h:112
Dt_t * rows
Definition htmltable.h:120
size_t nspans
Definition htmltable.h:61
htextspan_t * spans
Definition htmltable.h:60
Definition utils.c:748
unsigned char ruled
Definition htmltable.h:164
Dt_t * rp
Definition htmltable.h:161
union pitem::@79 u
htmlcell_t * cp
Definition htmltable.h:162
struct sfont_t * pfont
Definition htmlparse.c:89
textfont_t * cfont
Definition htmlparse.c:88
char * color
Definition textspan.h:55
char * name
Definition textspan.h:54
unsigned int flags
Definition textspan.h:58
double size
Definition textspan.h:57
char * str
Definition textspan.h:65
textfont_t * font
Definition textspan.h:66
htmltbl_t * tbl
Definition htmlparse.c:579
pitem * p
Definition htmlparse.c:582
htmlcell_t * cell
Definition htmlparse.c:578
htmltxt_t * txt
Definition htmlparse.c:577
textfont_t * font
Definition htmlparse.c:580
htmlimg_t * img
Definition htmlparse.c:581
Definition grammar.c:93