Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
htmlparse.c File Reference
#include <cgraph/alloc.h>
#include <common/render.h>
#include <common/htmltable.h>
#include <common/htmllex.h>
#include <limits.h>
Include dependency graph for htmlparse.c:

Go to the source code of this file.

Data Structures

struct  sfont_t
 
struct  fitem
 
struct  fspan
 
union  HTMLSTYPE
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.5.1"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   0
 
#define YYPUSH   0
 
#define YYPULL   1
 
#define YYSTYPE   HTMLSTYPE
 
#define yyparse   htmlparse
 
#define yylex   htmllex
 
#define yyerror   htmlerror
 
#define yydebug   htmldebug
 
#define yynerrs   htmlnerrs
 
#define yylval   htmllval
 
#define yychar   htmlchar
 
#define YY_CAST(Type, Val)   ((Type) (Val))
 
#define YY_REINTERPRET_CAST(Type, Val)   ((Type) (Val))
 
#define YY_NULLPTR   ((void*)0)
 
#define YYERROR_VERBOSE   0
 
#define YY_HTML_HTMLPARSE_H_INCLUDED
 
#define HTMLDEBUG   0
 
#define HTMLTOKENTYPE
 
#define T_end_br   258
 
#define T_end_img   259
 
#define T_row   260
 
#define T_end_row   261
 
#define T_html   262
 
#define T_end_html   263
 
#define T_end_table   264
 
#define T_end_cell   265
 
#define T_end_font   266
 
#define T_string   267
 
#define T_error   268
 
#define T_n_italic   269
 
#define T_n_bold   270
 
#define T_n_underline   271
 
#define T_n_overline   272
 
#define T_n_sup   273
 
#define T_n_sub   274
 
#define T_n_s   275
 
#define T_HR   276
 
#define T_hr   277
 
#define T_end_hr   278
 
#define T_VR   279
 
#define T_vr   280
 
#define T_end_vr   281
 
#define T_BR   282
 
#define T_br   283
 
#define T_IMG   284
 
#define T_img   285
 
#define T_table   286
 
#define T_cell   287
 
#define T_font   288
 
#define T_italic   289
 
#define T_bold   290
 
#define T_underline   291
 
#define T_overline   292
 
#define T_sup   293
 
#define T_sub   294
 
#define T_s   295
 
#define HTMLSTYPE_IS_TRIVIAL   1
 
#define HTMLSTYPE_IS_DECLARED   1
 
#define YYPTRDIFF_T   long
 
#define YYPTRDIFF_MAXIMUM   LONG_MAX
 
#define YYSIZE_T   unsigned
 
#define YYSIZE_MAXIMUM
 
#define YYSIZEOF(X)   YY_CAST (YYPTRDIFF_T, sizeof (X))
 
#define YY_(Msgid)   Msgid
 
#define YY_ATTRIBUTE_PURE
 
#define YY_ATTRIBUTE_UNUSED
 
#define YYUSE(E)   ((void) (E))
 
#define YY_INITIAL_VALUE(Value)   Value
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN
 
#define YY_IGNORE_MAYBE_UNINITIALIZED_END
 
#define YY_IGNORE_USELESS_CAST_BEGIN
 
#define YY_IGNORE_USELESS_CAST_END
 
#define YY_ASSERT(E)   ((void) (0 && (E)))
 
#define YYSTACK_ALLOC   YYMALLOC
 
#define YYSTACK_FREE   YYFREE
 
#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM
 
#define YYMALLOC   malloc
 
#define YYFREE   free
 
#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)
 
#define YYSTACK_BYTES(N)
 
#define YYCOPY_NEEDED   1
 
#define YYSTACK_RELOCATE(Stack_alloc, Stack)
 
#define YYFINAL   31
 
#define YYLAST   271
 
#define YYNTOKENS   41
 
#define YYNNTS   39
 
#define YYNRULES   69
 
#define YYNSTATES   116
 
#define YYUNDEFTOK   2
 
#define YYMAXUTOK   295
 
#define YYTRANSLATE(YYX)    (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
 
#define YYPACT_NINF   (-82)
 
#define yypact_value_is_default(Yyn)    ((Yyn) == YYPACT_NINF)
 
#define YYTABLE_NINF   (-63)
 
#define yytable_value_is_error(Yyn)    0
 
#define yyerrok   (yyerrstatus = 0)
 
#define yyclearin   (yychar = YYEMPTY)
 
#define YYEMPTY   (-2)
 
#define YYEOF   0
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYTERROR   1
 
#define YYERRCODE   256
 
#define YYDPRINTF(Args)
 
#define YY_SYMBOL_PRINT(Title, Type, Value, Location)
 
#define YY_STACK_PRINT(Bottom, Top)
 
#define YY_REDUCE_PRINT(Rule)
 
#define YYINITDEPTH   200
 
#define YYMAXDEPTH   10000
 
#define YYPOPSTACK(N)   (yyvsp -= (N), yyssp -= (N))
 

Typedefs

typedef struct sfont_t sfont_t
 
typedef union HTMLSTYPE HTMLSTYPE
 
typedef signed char yytype_int8
 
typedef short yytype_int16
 
typedef unsigned char yytype_uint8
 
typedef unsigned short yytype_uint16
 
typedef yytype_int8 yy_state_t
 
typedef int yy_state_fast_t
 

Enumerations

enum  htmltokentype {
  T_end_br = 258 , T_end_img = 259 , T_row = 260 , T_end_row = 261 ,
  T_html = 262 , T_end_html = 263 , T_end_table = 264 , T_end_cell = 265 ,
  T_end_font = 266 , T_string = 267 , T_error = 268 , T_n_italic = 269 ,
  T_n_bold = 270 , T_n_underline = 271 , T_n_overline = 272 , T_n_sup = 273 ,
  T_n_sub = 274 , T_n_s = 275 , T_HR = 276 , T_hr = 277 ,
  T_end_hr = 278 , T_VR = 279 , T_vr = 280 , T_end_vr = 281 ,
  T_BR = 282 , T_br = 283 , T_IMG = 284 , T_img = 285 ,
  T_table = 286 , T_cell = 287 , T_font = 288 , T_italic = 289 ,
  T_bold = 290 , T_underline = 291 , T_overline = 292 , T_sup = 293 ,
  T_sub = 294 , T_s = 295
}
 

Functions

int htmlparse (void)
 
static void free_ritem (void *item)
 
static void cleanTbl (htmltbl_t *tp)
 
static void cleanCell (htmlcell_t *cp)
 
static void free_citem (void *item)
 
static void free_fitem (void *item)
 
static void free_fspan (void *span)
 
static void appendFItemList (agxbuf *ag)
 
static void appendFLineList (int v)
 
static htmltxt_tmkText (void)
 
static pitemlastRow (void)
 
static pitemaddRow (void)
 
static void setCell (htmlcell_t *cp, void *obj, char kind)
 
static htmllabel_tmkLabel (void *obj, char kind)
 
static void freeFontstack (void)
 
static void cleanup (void)
 
static int nonSpace (char *s)
 
static void pushFont (textfont_t *fp)
 
static void popFont (void)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
 
htmllabel_tparseHTML (char *txt, int *warn, htmlenv_t *env)
 

Variables

struct { 
 
   htmllabel_t *   lbl 
 
   htmltbl_t *   tblstack 
 
   Dt_t *   fitemList 
 
   Dt_t *   fspanList 
 
   agxbuf *   str 
 
   sfont_t *   fontstack 
 
   GVC_t *   gvc 
 
HTMLstate 
 
static Dtdisc_t rowDisc
 
static Dtdisc_t cellDisc
 
static Dtdisc_t fstrDisc
 
static Dtdisc_t fspanDisc
 
HTMLSTYPE htmllval
 
static const yytype_int8 yytranslate []
 
static const yytype_int16 yypact []
 
static const yytype_int8 yydefact []
 
static const yytype_int16 yypgoto []
 
static const yytype_int8 yydefgoto []
 
static const yytype_int8 yytable []
 
static const yytype_int8 yycheck []
 
static const yytype_int8 yystos []
 
static const yytype_int8 yyr1 []
 
static const yytype_int8 yyr2 []
 
int yychar
 
YYSTYPE yylval
 
int yynerrs
 

Macro Definition Documentation

◆ HTMLDEBUG

#define HTMLDEBUG   0

Definition at line 478 of file htmlparse.c.

◆ HTMLSTYPE_IS_DECLARED

#define HTMLSTYPE_IS_DECLARED   1

Definition at line 589 of file htmlparse.c.

◆ HTMLSTYPE_IS_TRIVIAL

#define HTMLSTYPE_IS_TRIVIAL   1

Definition at line 588 of file htmlparse.c.

◆ HTMLTOKENTYPE

#define HTMLTOKENTYPE

Definition at line 487 of file htmlparse.c.

◆ T_bold

#define T_bold   290

Definition at line 563 of file htmlparse.c.

◆ T_BR

#define T_BR   282

Definition at line 555 of file htmlparse.c.

◆ T_br

#define T_br   283

Definition at line 556 of file htmlparse.c.

◆ T_cell

#define T_cell   287

Definition at line 560 of file htmlparse.c.

◆ T_end_br

#define T_end_br   258

Definition at line 531 of file htmlparse.c.

◆ T_end_cell

#define T_end_cell   265

Definition at line 538 of file htmlparse.c.

◆ T_end_font

#define T_end_font   266

Definition at line 539 of file htmlparse.c.

◆ T_end_hr

#define T_end_hr   278

Definition at line 551 of file htmlparse.c.

◆ T_end_html

#define T_end_html   263

Definition at line 536 of file htmlparse.c.

◆ T_end_img

#define T_end_img   259

Definition at line 532 of file htmlparse.c.

◆ T_end_row

#define T_end_row   261

Definition at line 534 of file htmlparse.c.

◆ T_end_table

#define T_end_table   264

Definition at line 537 of file htmlparse.c.

◆ T_end_vr

#define T_end_vr   281

Definition at line 554 of file htmlparse.c.

◆ T_error

#define T_error   268

Definition at line 541 of file htmlparse.c.

◆ T_font

#define T_font   288

Definition at line 561 of file htmlparse.c.

◆ T_HR

#define T_HR   276

Definition at line 549 of file htmlparse.c.

◆ T_hr

#define T_hr   277

Definition at line 550 of file htmlparse.c.

◆ T_html

#define T_html   262

Definition at line 535 of file htmlparse.c.

◆ T_IMG

#define T_IMG   284

Definition at line 557 of file htmlparse.c.

◆ T_img

#define T_img   285

Definition at line 558 of file htmlparse.c.

◆ T_italic

#define T_italic   289

Definition at line 562 of file htmlparse.c.

◆ T_n_bold

#define T_n_bold   270

Definition at line 543 of file htmlparse.c.

◆ T_n_italic

#define T_n_italic   269

Definition at line 542 of file htmlparse.c.

◆ T_n_overline

#define T_n_overline   272

Definition at line 545 of file htmlparse.c.

◆ T_n_s

#define T_n_s   275

Definition at line 548 of file htmlparse.c.

◆ T_n_sub

#define T_n_sub   274

Definition at line 547 of file htmlparse.c.

◆ T_n_sup

#define T_n_sup   273

Definition at line 546 of file htmlparse.c.

◆ T_n_underline

#define T_n_underline   271

Definition at line 544 of file htmlparse.c.

◆ T_overline

#define T_overline   292

Definition at line 565 of file htmlparse.c.

◆ T_row

#define T_row   260

Definition at line 533 of file htmlparse.c.

◆ T_s

#define T_s   295

Definition at line 568 of file htmlparse.c.

◆ T_string

#define T_string   267

Definition at line 540 of file htmlparse.c.

◆ T_sub

#define T_sub   294

Definition at line 567 of file htmlparse.c.

◆ T_sup

#define T_sup   293

Definition at line 566 of file htmlparse.c.

◆ T_table

#define T_table   286

Definition at line 559 of file htmlparse.c.

◆ T_underline

#define T_underline   291

Definition at line 564 of file htmlparse.c.

◆ T_VR

#define T_VR   279

Definition at line 552 of file htmlparse.c.

◆ T_vr

#define T_vr   280

Definition at line 553 of file htmlparse.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 711 of file htmlparse.c.

◆ YY_ASSERT

#define YY_ASSERT (   E)    ((void) (0 && (E)))

Definition at line 770 of file htmlparse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 719 of file htmlparse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 727 of file htmlparse.c.

◆ YY_CAST

#define YY_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 441 of file htmlparse.c.

◆ YY_HTML_HTMLPARSE_H_INCLUDED

#define YY_HTML_HTMLPARSE_H_INCLUDED

Definition at line 468 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 750 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 751 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 765 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 766 of file htmlparse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 747 of file htmlparse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 453 of file htmlparse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1344 of file htmlparse.c.

◆ YY_REINTERPRET_CAST

#define YY_REINTERPRET_CAST (   Type,
  Val 
)    ((Type) (Val))

Definition at line 442 of file htmlparse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1343 of file htmlparse.c.

◆ YY_SYMBOL_PRINT

#define YY_SYMBOL_PRINT (   Title,
  Type,
  Value,
  Location 
)

Definition at line 1342 of file htmlparse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 1187 of file htmlparse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 1186 of file htmlparse.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == YYEMPTY) \
{ \
yychar = (Token); \
yylval = (Value); \
YYPOPSTACK (yylen); \
yystate = *yyssp; \
goto yybackup; \
} \
else \
{ \
yyerror (YY_("syntax error: cannot back up")); \
} \
while (0)
#define YY_(Msgid)
Definition htmlparse.c:711
#define yychar
Definition htmlparse.c:74
#define yylval
Definition htmlparse.c:73
#define YYEMPTY
Definition htmlparse.c:1183
#define YYERROR
Definition htmlparse.c:1188

Definition at line 1193 of file htmlparse.c.

◆ YYBISON

#define YYBISON   1

Definition at line 48 of file htmlparse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.5.1"

Definition at line 51 of file htmlparse.c.

◆ yychar

#define yychar   htmlchar

Definition at line 74 of file htmlparse.c.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 1182 of file htmlparse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 860 of file htmlparse.c.

◆ yydebug

#define yydebug   htmldebug

Definition at line 71 of file htmlparse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1341 of file htmlparse.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 1183 of file htmlparse.c.

◆ YYEOF

#define YYEOF   0

Definition at line 1184 of file htmlparse.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1212 of file htmlparse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 1181 of file htmlparse.c.

◆ yyerror

#define yyerror   htmlerror

Definition at line 70 of file htmlparse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 1188 of file htmlparse.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 462 of file htmlparse.c.

◆ YYFINAL

#define YYFINAL   31

Definition at line 901 of file htmlparse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 831 of file htmlparse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1350 of file htmlparse.c.

◆ YYLAST

#define YYLAST   271

Definition at line 903 of file htmlparse.c.

◆ yylex

#define yylex (   void)    htmllex

Definition at line 69 of file htmlparse.c.

◆ yylval

#define yylval   htmllval

Definition at line 73 of file htmlparse.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 825 of file htmlparse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1361 of file htmlparse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   295

Definition at line 915 of file htmlparse.c.

◆ yynerrs

#define yynerrs   htmlnerrs

Definition at line 72 of file htmlparse.c.

◆ YYNNTS

#define YYNNTS   39

Definition at line 908 of file htmlparse.c.

◆ YYNRULES

#define YYNRULES   69

Definition at line 910 of file htmlparse.c.

◆ YYNSTATES

#define YYNSTATES   116

Definition at line 912 of file htmlparse.c.

◆ YYNTOKENS

#define YYNTOKENS   41

Definition at line 906 of file htmlparse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-82)

Definition at line 1006 of file htmlparse.c.

◆ yypact_value_is_default

#define yypact_value_is_default (   Yyn)     ((Yyn) == YYPACT_NINF)

Definition at line 1008 of file htmlparse.c.

◆ yyparse

#define yyparse (   void)    htmlparse

Definition at line 1631 of file htmlparse.c.

◆ YYPOPSTACK

#define YYPOPSTACK (   N)    (yyvsp -= (N), yyssp -= (N))

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 672 of file htmlparse.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 671 of file htmlparse.c.

◆ YYPULL

#define YYPULL   1

Definition at line 63 of file htmlparse.c.

◆ YYPURE

#define YYPURE   0

Definition at line 57 of file htmlparse.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 60 of file htmlparse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 1191 of file htmlparse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition htmlparse.c:672
#define YY_CAST(Type, Val)
Definition htmlparse.c:441
#define YYSIZE_T
Definition htmlparse.c:685
#define YYPTRDIFF_T
Definition htmlparse.c:671

Definition at line 689 of file htmlparse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 685 of file htmlparse.c.

◆ YYSIZEOF

#define YYSIZEOF (   X)    YY_CAST (YYPTRDIFF_T, sizeof (X))

Definition at line 695 of file htmlparse.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 54 of file htmlparse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 811 of file htmlparse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 814 of file htmlparse.c.

◆ YYSTACK_BYTES

#define YYSTACK_BYTES (   N)
Value:
#define N(n)
Definition bcomps.c:58
yytype_int8 yy_state_t
Definition gmlparse.c:546
#define YYSTYPE
Definition htmlparse.c:66
#define YYSIZEOF(X)
Definition htmlparse.c:695
#define YYSTACK_GAP_MAXIMUM
Definition htmlparse.c:852

Definition at line 856 of file htmlparse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 812 of file htmlparse.c.

◆ YYSTACK_GAP_MAXIMUM

#define YYSTACK_GAP_MAXIMUM   (YYSIZEOF (union yyalloc) - 1)

Definition at line 852 of file htmlparse.c.

◆ YYSTACK_RELOCATE

#define YYSTACK_RELOCATE (   Stack_alloc,
  Stack 
)
Value:
do \
{ \
YYPTRDIFF_T yynewbytes; \
YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \
Stack = &yyptr->Stack_alloc; \
yynewbytes = yystacksize * YYSIZEOF (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / YYSIZEOF (*yyptr); \
} \
while (0)

Definition at line 867 of file htmlparse.c.

◆ YYSTYPE

#define YYSTYPE   HTMLSTYPE

Definition at line 66 of file htmlparse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-63)

Definition at line 1011 of file htmlparse.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 1013 of file htmlparse.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1211 of file htmlparse.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)     (0 <= (YYX) && (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)

Definition at line 920 of file htmlparse.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 914 of file htmlparse.c.

◆ YYUSE

#define YYUSE (   E)    ((void) (E))

Definition at line 733 of file htmlparse.c.

Typedef Documentation

◆ HTMLSTYPE

typedef union HTMLSTYPE HTMLSTYPE

Definition at line 587 of file htmlparse.c.

◆ sfont_t

typedef struct sfont_t sfont_t

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 701 of file htmlparse.c.

◆ yy_state_t

Definition at line 698 of file htmlparse.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 635 of file htmlparse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 627 of file htmlparse.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 655 of file htmlparse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 644 of file htmlparse.c.

Enumeration Type Documentation

◆ htmltokentype

Enumerator
T_end_br 
T_end_img 
T_row 
T_end_row 
T_html 
T_end_html 
T_end_table 
T_end_cell 
T_end_font 
T_string 
T_error 
T_n_italic 
T_n_bold 
T_n_underline 
T_n_overline 
T_n_sup 
T_n_sub 
T_n_s 
T_HR 
T_hr 
T_end_hr 
T_VR 
T_vr 
T_end_vr 
T_BR 
T_br 
T_IMG 
T_img 
T_table 
T_cell 
T_font 
T_italic 
T_bold 
T_underline 
T_overline 
T_sup 
T_sub 
T_s 

Definition at line 488 of file htmlparse.c.

Function Documentation

◆ addRow()

static pitem * addRow ( void  )
static

Definition at line 285 of file htmlparse.c.

References cellDisc, dtinsert, dtopen(), Dtqueue, gv_alloc(), htmltbl_t::hrule, HTMLstate, htmltbl_t::p, htmltbl_t::rows, pitem::rp, pitem::ruled, htmltbl_t::u, and pitem::u.

Here is the call graph for this function:

◆ appendFItemList()

static void appendFItemList ( agxbuf ag)
static

Definition at line 202 of file htmlparse.c.

References agxbdisown(), dtinsert, textspan_t::font, gv_alloc(), HTMLstate, textspan_t::str, and fitem::ti.

Here is the call graph for this function:

◆ appendFLineList()

static void appendFLineList ( int  v)
static

Definition at line 214 of file htmlparse.c.

References cnt(), dtclear, dtflatten(), dtinsert, dtlink, dtsize(), fitemList, textspan_t::font, gv_alloc(), gv_calloc(), gv_strdup(), HTMLstate, htextspan_t::items, htextspan_t::just, fspan::lp, htextspan_t::nitems, textspan_t::str, and fitem::ti.

Referenced by mkText().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanCell()

static void cleanCell ( htmlcell_t cp)
static

Definition at line 127 of file htmlparse.c.

References htmlcell_t::child, cleanTbl(), htmlcell_t::data, free(), free_html_data(), free_html_text(), HTML_TBL, HTML_TEXT, htmllabel_t::kind, htmllabel_t::tbl, htmllabel_t::txt, and htmllabel_t::u.

Referenced by free_citem().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanTbl()

static void cleanTbl ( htmltbl_t tp)
static

Definition at line 116 of file htmlparse.c.

References htmltbl_t::data, dtclose(), free(), free_html_data(), htmltbl_t::p, htmltbl_t::rows, and htmltbl_t::u.

Referenced by cleanCell(), and cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanup()

static void cleanup ( void  )
static

Definition at line 354 of file htmlparse.c.

References cellDisc, cleanTbl(), dtclear, free(), free_citem(), free_fitem(), free_fspan(), free_html_label(), _dtdisc_s::freef, freeFontstack(), fspanDisc, fstrDisc, HTMLstate, NULL, htmltbl_t::p, htmltbl_t::prev, and htmltbl_t::u.

Here is the call graph for this function:

◆ free()

void free ( void *  )

Referenced by cleanCell(), cleanTbl(), cleanup(), free_citem(), free_fitem(), free_fspan(), free_ritem(), freeFontstack(), and popFont().

Here is the caller graph for this function:

◆ free_citem()

static void free_citem ( void *  item)
static

Definition at line 138 of file htmlparse.c.

References cleanCell(), pitem::cp, free(), and pitem::u.

Referenced by cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_fitem()

static void free_fitem ( void *  item)
static

Definition at line 167 of file htmlparse.c.

References free(), textspan_t::str, and fitem::ti.

Referenced by cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_fspan()

static void free_fspan ( void *  span)
static

Definition at line 173 of file htmlparse.c.

References free(), htextspan_t::items, fspan::lp, htextspan_t::nitems, and textspan_t::str.

Referenced by cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_ritem()

static void free_ritem ( void *  item)
static

Definition at line 106 of file htmlparse.c.

References dtclose(), free(), pitem::rp, and pitem::u.

Here is the call graph for this function:

◆ freeFontstack()

static void freeFontstack ( void  )
static

Definition at line 338 of file htmlparse.c.

References free(), and HTMLstate.

Referenced by cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ htmlparse()

int htmlparse ( void  )
extern

Referenced by parseHTML().

Here is the caller graph for this function:

◆ lastRow()

static pitem * lastRow ( void  )
static

Definition at line 275 of file htmlparse.c.

References dtlast, HTMLstate, htmltbl_t::p, htmltbl_t::rows, and htmltbl_t::u.

◆ malloc()

void * malloc ( YYSIZE_T  )

◆ mkLabel()

static htmllabel_t * mkLabel ( void *  obj,
char  kind 
)
static

Definition at line 322 of file htmlparse.c.

References gv_alloc(), HTML_TEXT, kind, htmllabel_t::kind, htmllabel_t::tbl, htmllabel_t::txt, and htmllabel_t::u.

Here is the call graph for this function:

◆ mkText()

static htmltxt_t * mkText ( void  )
static

Definition at line 249 of file htmlparse.c.

References appendFLineList(), cnt(), dtclear, dtfirst, dtnext, dtsize(), gv_alloc(), gv_calloc(), HTMLstate, fspan::lp, htmltxt_t::nspans, htmltxt_t::spans, and UNSET_ALIGN.

Here is the call graph for this function:

◆ nonSpace()

static int nonSpace ( char *  s)
static

Definition at line 385 of file htmlparse.c.

◆ parseHTML()

htmllabel_t * parseHTML ( char *  txt,
int *  warn,
htmlenv_t env 
)

Definition at line 2431 of file htmlparse.c.

References agxbfree(), sfont_t::cfont, clearHTMLlexer(), dtclose(), dtopen(), Dtqueue, fspanDisc, fstrDisc, htmlenv_t::g, GD_gvc, htmlparse(), HTMLstate, initHTMLlexer(), NULL, sfont_t::pfont, and str.

Referenced by make_html_label().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ popFont()

static void popFont ( void  )
static

Definition at line 424 of file htmlparse.c.

References free(), HTMLstate, and sfont_t::pfont.

Here is the call graph for this function:

◆ pushFont()

static void pushFont ( textfont_t fp)
static

Definition at line 399 of file htmlparse.c.

References sfont_t::cfont, textfont_t::color, dtinsert, textfont_t::flags, gv_alloc(), HTMLstate, textfont_t::name, sfont_t::pfont, and textfont_t::size.

Here is the call graph for this function:

◆ setCell()

static void setCell ( htmlcell_t cp,
void *  obj,
char  kind 
)
static

Definition at line 300 of file htmlparse.c.

References htmlcell_t::child, pitem::cp, dtinsert, dtlast, gv_alloc(), HTML_IMAGE, HTML_TEXT, HTML_VRULE, HTMLstate, htmllabel_t::img, kind, htmllabel_t::kind, htmltbl_t::p, row, htmltbl_t::rows, pitem::rp, htmlcell_t::ruled, htmllabel_t::tbl, htmllabel_t::txt, htmltbl_t::u, htmllabel_t::u, pitem::u, and htmltbl_t::vrule.

Here is the call graph for this function:

◆ yydestruct()

static void yydestruct ( const char *  yymsg,
int  yytype,
YYSTYPE yyvaluep 
)
static

Variable Documentation

◆ cellDisc

Dtdisc_t cellDisc
static
Initial value:
= {
.key = offsetof(pitem, u),
.size = sizeof(void *),
.link = offsetof(pitem, link),
.freef = free,
}
void free(void *)

Definition at line 150 of file htmlparse.c.

Referenced by addRow(), and cleanup().

◆ fitemList

Dt_t* fitemList

Definition at line 95 of file htmlparse.c.

Referenced by appendFLineList().

◆ fontstack

sfont_t* fontstack

Definition at line 98 of file htmlparse.c.

◆ fspanDisc

Dtdisc_t fspanDisc
static
Initial value:
= {
.link = offsetof(fspan, link),
.freef = free,
}

Definition at line 193 of file htmlparse.c.

Referenced by cleanup(), and parseHTML().

◆ fspanList

Dt_t* fspanList

Definition at line 96 of file htmlparse.c.

◆ fstrDisc

Dtdisc_t fstrDisc
static
Initial value:
= {
.link = offsetof(fitem, link),
.freef = free,
}

Definition at line 188 of file htmlparse.c.

Referenced by cleanup(), and parseHTML().

◆ gvc

GVC_t* gvc

Definition at line 99 of file htmlparse.c.

Referenced by cloneGraph(), config_extra_args(), core_loadimage_null(), dotneato_args_initialize(), emit_node(), emit_view(), graphcmd(), gv_channel_writer_init(), gv_string_writer_init(), gv_writer_reset(), gvAddLibrary(), gvcBuildDate(), gvcInfo(), gvCloneGVC(), gvconfig(), gvconfig_plugin_install_builtins(), gvconfig_plugin_install_from_library(), gvContext(), gvContextPlugins(), gvcVersion(), gvdevice_initialize(), gvevent_read(), gvFinalize(), gvFreeCloneGVC(), gvFreeContext(), gvFreeLayout(), gvg_init(), gvjobs_delete(), gvjobs_first(), gvjobs_next(), gvjobs_output_filename(), gvjobs_output_langname(), gvLayout(), gvlayout_select(), gvLayoutJobs(), gvNEWcontext(), gvNextInputGraph(), gvParseArgs(), gvplugin_activate(), gvplugin_graph(), gvplugin_install(), gvplugin_library_load(), gvplugin_list(), gvplugin_load(), gvplugin_package_record(), gvplugin_write_status(), gvPluginList(), gvPluginsGraph(), gvRender(), gvrender_select(), gvRenderContext(), gvRenderData(), gvRenderFilename(), gvRenderJobs(), gvtextlayout(), gvtextlayout_select(), init_graph(), init_gvc(), init_job_margin(), init_job_pad(), init_job_pagination(), init_job_viewport(), init_layering(), json_begin_graph(), layer_index(), LoadPlugins(), main(), main(), main(), make_simple_label(), parse_layers(), parse_layerselect(), readGraphs(), selectedLayer(), size_html_txt(), storeline(), tcldot_layout(), textfont_dict_close(), textfont_dict_open(), textspan_size(), use_library(), and xdotBB().

◆ htmllval

HTMLSTYPE htmllval
extern

◆ [struct]

◆ lbl

◆ rowDisc

Dtdisc_t rowDisc
static
Initial value:
= {
.key = offsetof(pitem, u),
.size = sizeof(void *),
.link = offsetof(pitem, link),
.freef = free_ritem,
}
static void free_ritem(void *item)
Definition htmlparse.c:106

Definition at line 144 of file htmlparse.c.

◆ str

agxbuf* str

Definition at line 97 of file htmlparse.c.

Referenced by _write_canonstr(), aagerror(), aagerror(), agcanon(), agcanonStr(), aginternalmapinsert(), aginternalmaplookup(), agmapnametoid(), bboxPDF(), bind_shape(), bindedgeattr(), boxof(), canontoken(), colorxlate(), colorxlate(), common_init_edge(), common_init_node(), do_graph_label(), emit_background(), emit_cluster_colors(), emit_colors(), emit_once(), eol(), epsf_init(), eval(), exsplit(), exsub(), extokens(), fig_comment(), findPath(), finishNode(), fullColor(), gdgen_text(), getNum(), getoutputbuffer(), getPenColor(), getPointFromStr(), glCompColorxlate(), gmlerror(), graphviz_unflatten(), gvloadimage_select(), gvplugin_api(), gvplugin_list(), gvplugin_load(), gvrender_comment(), gvrender_select(), htmlEntity(), idmap(), init_job_viewport(), init_layering(), ioput(), ioputstr(), ioputstr(), ioputstr(), is_a_strong_cluster(), is_escape(), is_natural_number(), lasi_comment(), layer_index(), majorization(), make_label(), map_rec_port(), match(), memrchr(), mkAttr(), myiddisc_map(), neatoLayout(), neatoMode(), noClip(), nxtc(), on_gvprbuttonload_clicked(), parseAction(), parseBracket(), parseCase(), parseGuard(), parseHTML(), parseID(), parseKind(), parseProg(), pic_comment(), pov_comment(), psgen_comment(), psgen_textspan(), rankset_kind(), readc(), resolveColor(), Ruby_Format_TypeError(), safefile(), scan_graph_mode(), set_attr_object_type(), sffmtint(), show_gui_warning(), skipWS(), skipWS(), strcasestr(), strdup_and_subst_obj(), strdup_and_subst_obj0(), svg_comment(), svg_print_id_class(), SWIG_Guile_scm2newstr(), SWIG_Lua_dostring(), SWIG_Lua_pusherrstring(), SWIG_Python_TypeError(), SWIG_PyUnicode_AsUTF8AndSize(), swig_varlink_str(), tclGdTextCmd(), tkgen_comment(), unknown(), unknown(), unreadc(), update_columns(), user_init(), versionStr2Version(), write_canonstr(), and write_plain().

◆ tblstack

HTMLstate tblstack = HTMLstate.tblstack->u.p.prev

Definition at line 94 of file htmlparse.c.

◆ yychar

int yychar

Definition at line 1618 of file htmlparse.c.

◆ yycheck

const yytype_int8 yycheck[]
static

Definition at line 1106 of file htmlparse.c.

◆ yydefact

const yytype_int8 yydefact[]
static
Initial value:
=
{
0, 4, 47, 0, 36, 35, 0, 18, 20, 22,
26, 28, 30, 32, 24, 0, 5, 7, 47, 47,
47, 0, 47, 47, 0, 0, 9, 8, 40, 0,
0, 1, 34, 2, 6, 0, 0, 0, 0, 0,
8, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 37, 3, 38, 19, 10, 41,
21, 11, 42, 23, 14, 45, 25, 17, 27, 12,
43, 29, 13, 44, 31, 15, 33, 16, 0, 51,
0, 48, 0, 47, 67, 0, 49, 0, 47, 0,
53, 46, 39, 66, 50, 65, 0, 58, 56, 0,
60, 52, 69, 0, 54, 0, 64, 0, 0, 63,
0, 68, 55, 59, 57, 61
}

Definition at line 1037 of file htmlparse.c.

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
-1, 3, 15, 16, 17, 35, 58, 36, 61, 37,
64, 21, 67, 38, 69, 39, 72, 24, 75, 25,
77, 26, 40, 28, 78, 29, 30, 80, 81, 82,
89, 90, 108, 107, 110, 99, 100, 87, 105
}

Definition at line 1063 of file htmlparse.c.

◆ yylval

YYSTYPE yylval

Definition at line 1621 of file htmlparse.c.

◆ yynerrs

int yynerrs

Definition at line 1623 of file htmlparse.c.

◆ yypact

const yytype_int16 yypact[]
static
Initial value:
=
{
8, -82, 209, 10, -82, -82, 11, -82, -82, -82,
-82, -82, -82, -82, -82, 5, 209, -82, 209, 209,
209, 209, 209, 209, 209, 209, -82, -5, -82, 14,
-20, -82, -82, -82, -82, 209, 209, 209, 209, 209,
13, 37, 12, 66, 16, 80, 19, 109, 123, 20,
152, 15, 166, 195, -82, -82, -82, -82, -82, -82,
-82, -82, -82, -82, -82, -82, -82, -82, -82, -82,
-82, -82, -82, -82, -82, -82, -82, -82, 23, -82,
119, -82, 7, 46, -82, 38, -82, 23, 17, 35,
-82, 13, -82, -82, -82, -82, 58, -82, -82, 53,
-82, -82, -82, 40, -82, 7, -82, 59, 69, -82,
72, -82, -82, -82, -82, -82
}

Definition at line 1018 of file htmlparse.c.

◆ yypgoto

const yytype_int16 yypgoto[]
static
Initial value:
=
{
-82, -82, -4, 232, -10, -1, 26, 0, 39, 1,
50, -82, -82, 2, 36, 3, 47, -82, -82, -82,
-82, -82, -2, 148, -82, 9, 27, -82, -68, -82,
-82, -81, -82, -82, -82, -82, -82, -82, -82
}

Definition at line 1054 of file htmlparse.c.

◆ yyr1

const yytype_int8 yyr1[]
static
Initial value:
=
{
0, 41, 42, 42, 42, 43, 44, 44, 45, 45,
45, 45, 45, 45, 45, 45, 45, 45, 46, 47,
48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
58, 59, 60, 61, 62, 62, 63, 63, 65, 64,
66, 66, 66, 66, 66, 66, 67, 67, 68, 68,
68, 70, 69, 71, 71, 71, 73, 72, 74, 72,
75, 72, 76, 72, 77, 77, 78, 78, 79, 79
}

Definition at line 1157 of file htmlparse.c.

◆ yyr2

const yytype_int8 yyr2[]
static
Initial value:
=
{
0, 2, 3, 3, 1, 1, 2, 1, 1, 1,
3, 3, 3, 3, 3, 3, 3, 3, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
1, 1, 1, 1, 2, 1, 1, 2, 0, 6,
1, 3, 3, 3, 3, 3, 1, 0, 1, 2,
3, 0, 4, 1, 2, 3, 0, 4, 0, 4,
0, 4, 0, 3, 2, 1, 2, 1, 2, 1
}

Definition at line 1169 of file htmlparse.c.

◆ yystos

const yytype_int8 yystos[]
static
Initial value:
=
{
0, 1, 7, 42, 12, 27, 28, 33, 34, 35,
36, 37, 38, 39, 40, 43, 44, 45, 46, 48,
50, 52, 54, 56, 58, 60, 62, 63, 64, 66,
67, 0, 3, 8, 45, 46, 48, 50, 54, 56,
63, 44, 64, 44, 64, 44, 64, 44, 44, 64,
44, 64, 44, 44, 12, 8, 31, 11, 47, 47,
14, 49, 49, 15, 51, 51, 20, 53, 16, 55,
55, 17, 57, 57, 18, 59, 19, 61, 65, 5,
68, 69, 70, 9, 21, 22, 69, 78, 32, 71,
72, 63, 67, 23, 69, 29, 30, 43, 66, 76,
77, 6, 24, 25, 72, 79, 4, 74, 73, 10,
75, 26, 72, 10, 10, 10
}

Definition at line 1140 of file htmlparse.c.

◆ yytable

const yytype_int8 yytable[]
static

Definition at line 1074 of file htmlparse.c.

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 925 of file htmlparse.c.