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