Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
htmlparse.c File Reference
#include <common/render.h>
#include <common/htmltable.h>
#include <common/htmllex.h>
#include <stdbool.h>
#include <util/alloc.h>
#include <cgraph/list.h>
#include <common/textspan.h>
#include <gvc/gvcext.h>
#include <util/agxbuf.h>
#include <util/strview.h>
#include <limits.h>
Include dependency graph for htmlparse.c:

Go to the source code of this file.

Data Structures

union  HTMLSTYPE
 
struct  htmlparserstate_s
 
struct  htmllexstate_t
 
struct  htmlscan_s
 
union  yyalloc
 

Macros

#define YYBISON   1
 
#define YYBISON_VERSION   "3.5.1"
 
#define YYSKELETON_NAME   "yacc.c"
 
#define YYPURE   2
 
#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 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 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

static void cleanCell (htmlcell_t *cp)
 Clean up cell if error in parsing.
 
static void cleanTbl (htmltbl_t *tp)
 Clean up table if error in parsing.
 
static void appendFItemList (htmlparserstate_t *html_state, agxbuf *ag)
 Append a new text span to the list.
 
static void appendFLineList (htmlparserstate_t *html_state, int v)
 
static htmltxt_tmkText (htmlparserstate_t *html_state)
 
static row_tlastRow (htmlparserstate_t *html_state)
 
static void addRow (htmlparserstate_t *html_state)
 Add new cell row to current table.
 
static void setCell (htmlparserstate_t *html_state, htmlcell_t *cp, void *obj, label_type_t kind)
 Set cell body and type and attach to row.
 
static htmllabel_tmkLabel (void *obj, label_type_t kind)
 Create label, given body and type.
 
static void cleanup (htmlparserstate_t *html_state)
 
static bool nonSpace (const char *s)
 Return 1 if s contains a non-space character.
 
static void pushFont (htmlparserstate_t *html_state, textfont_t *fp)
 Fonts are allocated in the lexer.
 
static void popFont (htmlparserstate_t *html_state)
 
int htmlparse (htmlscan_t *scanner)
 
static void free_ti (textspan_t item)
 
static void free_hi (htextspan_t item)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, htmlscan_t *scanner)
 
int yyparse (htmlscan_t *scanner)
 
htmllabel_tparseHTML (char *txt, int *warn, htmlenv_t *env)
 

Variables

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 []
 

Macro Definition Documentation

◆ HTMLDEBUG

#define HTMLDEBUG   0

Definition at line 209 of file htmlparse.c.

◆ HTMLSTYPE_IS_DECLARED

#define HTMLSTYPE_IS_DECLARED   1

Definition at line 332 of file htmlparse.c.

◆ HTMLSTYPE_IS_TRIVIAL

#define HTMLSTYPE_IS_TRIVIAL   1

Definition at line 331 of file htmlparse.c.

◆ HTMLTOKENTYPE

#define HTMLTOKENTYPE

Definition at line 230 of file htmlparse.c.

◆ T_bold

#define T_bold   290

Definition at line 306 of file htmlparse.c.

◆ T_BR

#define T_BR   282

Definition at line 298 of file htmlparse.c.

◆ T_br

#define T_br   283

Definition at line 299 of file htmlparse.c.

◆ T_cell

#define T_cell   287

Definition at line 303 of file htmlparse.c.

◆ T_end_br

#define T_end_br   258

Definition at line 274 of file htmlparse.c.

◆ T_end_cell

#define T_end_cell   265

Definition at line 281 of file htmlparse.c.

◆ T_end_font

#define T_end_font   266

Definition at line 282 of file htmlparse.c.

◆ T_end_hr

#define T_end_hr   278

Definition at line 294 of file htmlparse.c.

◆ T_end_html

#define T_end_html   263

Definition at line 279 of file htmlparse.c.

◆ T_end_img

#define T_end_img   259

Definition at line 275 of file htmlparse.c.

◆ T_end_row

#define T_end_row   261

Definition at line 277 of file htmlparse.c.

◆ T_end_table

#define T_end_table   264

Definition at line 280 of file htmlparse.c.

◆ T_end_vr

#define T_end_vr   281

Definition at line 297 of file htmlparse.c.

◆ T_error

#define T_error   268

Definition at line 284 of file htmlparse.c.

◆ T_font

#define T_font   288

Definition at line 304 of file htmlparse.c.

◆ T_HR

#define T_HR   276

Definition at line 292 of file htmlparse.c.

◆ T_hr

#define T_hr   277

Definition at line 293 of file htmlparse.c.

◆ T_html

#define T_html   262

Definition at line 278 of file htmlparse.c.

◆ T_IMG

#define T_IMG   284

Definition at line 300 of file htmlparse.c.

◆ T_img

#define T_img   285

Definition at line 301 of file htmlparse.c.

◆ T_italic

#define T_italic   289

Definition at line 305 of file htmlparse.c.

◆ T_n_bold

#define T_n_bold   270

Definition at line 286 of file htmlparse.c.

◆ T_n_italic

#define T_n_italic   269

Definition at line 285 of file htmlparse.c.

◆ T_n_overline

#define T_n_overline   272

Definition at line 288 of file htmlparse.c.

◆ T_n_s

#define T_n_s   275

Definition at line 291 of file htmlparse.c.

◆ T_n_sub

#define T_n_sub   274

Definition at line 290 of file htmlparse.c.

◆ T_n_sup

#define T_n_sup   273

Definition at line 289 of file htmlparse.c.

◆ T_n_underline

#define T_n_underline   271

Definition at line 287 of file htmlparse.c.

◆ T_overline

#define T_overline   292

Definition at line 308 of file htmlparse.c.

◆ T_row

#define T_row   260

Definition at line 276 of file htmlparse.c.

◆ T_s

#define T_s   295

Definition at line 311 of file htmlparse.c.

◆ T_string

#define T_string   267

Definition at line 283 of file htmlparse.c.

◆ T_sub

#define T_sub   294

Definition at line 310 of file htmlparse.c.

◆ T_sup

#define T_sup   293

Definition at line 309 of file htmlparse.c.

◆ T_table

#define T_table   286

Definition at line 302 of file htmlparse.c.

◆ T_underline

#define T_underline   291

Definition at line 307 of file htmlparse.c.

◆ T_VR

#define T_VR   279

Definition at line 295 of file htmlparse.c.

◆ T_vr

#define T_vr   280

Definition at line 296 of file htmlparse.c.

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 509 of file htmlparse.c.

◆ YY_ASSERT

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

Definition at line 568 of file htmlparse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 517 of file htmlparse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 525 of file htmlparse.c.

◆ YY_CAST

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

Definition at line 172 of file htmlparse.c.

◆ YY_HTML_HTMLPARSE_H_INCLUDED

#define YY_HTML_HTMLPARSE_H_INCLUDED

Definition at line 199 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 548 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 549 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 563 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 564 of file htmlparse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 545 of file htmlparse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 184 of file htmlparse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1143 of file htmlparse.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 173 of file htmlparse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1142 of file htmlparse.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 1141 of file htmlparse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 985 of file htmlparse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 984 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 (scanner, YY_("syntax error: cannot back up")); \
} \
while (0)
#define yychar
Definition gmlparse.c:74
#define yylval
Definition gmlparse.c:73
#define YY_(Msgid)
Definition htmlparse.c:509
#define YYEMPTY
Definition htmlparse.c:981
#define YYERROR
Definition htmlparse.c:986
cleanup & scanner
Definition htmlparse.y:295

Definition at line 991 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.

◆ yyclearin

#define yyclearin   (yychar = YYEMPTY)

Definition at line 980 of file htmlparse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 658 of file htmlparse.c.

◆ yydebug

#define yydebug   htmldebug

Definition at line 71 of file htmlparse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)

Definition at line 1140 of file htmlparse.c.

◆ YYEMPTY

#define YYEMPTY   (-2)

Definition at line 981 of file htmlparse.c.

◆ YYEOF

#define YYEOF   0

Definition at line 982 of file htmlparse.c.

◆ YYERRCODE

#define YYERRCODE   256

Definition at line 1010 of file htmlparse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 979 of file htmlparse.c.

◆ yyerror

#define yyerror   htmlerror

Definition at line 70 of file htmlparse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 986 of file htmlparse.c.

◆ YYERROR_VERBOSE

#define YYERROR_VERBOSE   0

Definition at line 193 of file htmlparse.c.

◆ YYFINAL

#define YYFINAL   31

Definition at line 699 of file htmlparse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 629 of file htmlparse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1149 of file htmlparse.c.

◆ YYLAST

#define YYLAST   271

Definition at line 701 of file htmlparse.c.

◆ yylex

#define yylex (   void)    htmllex

Definition at line 69 of file htmlparse.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 623 of file htmlparse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1160 of file htmlparse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   295

Definition at line 713 of file htmlparse.c.

◆ yynerrs

#define yynerrs   htmlnerrs

Definition at line 72 of file htmlparse.c.

◆ YYNNTS

#define YYNNTS   39

Definition at line 706 of file htmlparse.c.

◆ YYNRULES

#define YYNRULES   69

Definition at line 708 of file htmlparse.c.

◆ YYNSTATES

#define YYNSTATES   116

Definition at line 710 of file htmlparse.c.

◆ YYNTOKENS

#define YYNTOKENS   41

Definition at line 704 of file htmlparse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-82)

Definition at line 804 of file htmlparse.c.

◆ yypact_value_is_default

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

Definition at line 806 of file htmlparse.c.

◆ yyparse

#define yyparse (   void)    htmlparse

Definition at line 68 of file htmlparse.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 470 of file htmlparse.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 469 of file htmlparse.c.

◆ YYPULL

#define YYPULL   1

Definition at line 63 of file htmlparse.c.

◆ YYPURE

#define YYPURE   2

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 989 of file htmlparse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition htmlparse.c:470
#define YY_CAST(Type, Val)
Definition htmlparse.c:172
#define YYSIZE_T
Definition htmlparse.c:483
#define YYPTRDIFF_T
Definition htmlparse.c:469

Definition at line 487 of file htmlparse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 483 of file htmlparse.c.

◆ YYSIZEOF

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

Definition at line 493 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 609 of file htmlparse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 612 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:507
#define YYSTYPE
Definition htmlparse.c:66
#define YYSIZEOF(X)
Definition htmlparse.c:493
#define YYSTACK_GAP_MAXIMUM
Definition htmlparse.c:650

Definition at line 654 of file htmlparse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 610 of file htmlparse.c.

◆ YYSTACK_GAP_MAXIMUM

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

Definition at line 650 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 665 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 809 of file htmlparse.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 811 of file htmlparse.c.

◆ YYTERROR

#define YYTERROR   1

Definition at line 1009 of file htmlparse.c.

◆ YYTRANSLATE

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

Definition at line 718 of file htmlparse.c.

◆ YYUNDEFTOK

#define YYUNDEFTOK   2

Definition at line 712 of file htmlparse.c.

◆ YYUSE

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

Definition at line 531 of file htmlparse.c.

Typedef Documentation

◆ HTMLSTYPE

typedef union HTMLSTYPE HTMLSTYPE

Definition at line 330 of file htmlparse.c.

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 499 of file htmlparse.c.

◆ yy_state_t

Definition at line 496 of file htmlparse.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 433 of file htmlparse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 425 of file htmlparse.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 453 of file htmlparse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 442 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 231 of file htmlparse.c.

Function Documentation

◆ addRow()

static void addRow ( htmlparserstate_t html_state)
static

Definition at line 2299 of file htmlparse.c.

References gv_alloc(), htmltbl_t::hrule, htmltbl_t::p, htmltbl_t::rows, row_t::ruled, htmlparserstate_s::tblstack, and htmltbl_t::u.

Referenced by yyparse().

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

◆ appendFItemList()

static void appendFItemList ( htmlparserstate_t html_state,
agxbuf ag 
)
static

Definition at line 2230 of file htmlparse.c.

References agxbdisown(), htmlparserstate_s::fitemList, htmlparserstate_s::fontstack, and textspan_t::str.

Referenced by yyparse().

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

◆ appendFLineList()

static void appendFLineList ( htmlparserstate_t html_state,
int  v 
)
static

Definition at line 2238 of file htmlparse.c.

References cnt(), htmlparserstate_s::fitemList, textspan_t::font, htmlparserstate_s::fontstack, htmlparserstate_s::fspanList, gv_alloc(), gv_calloc(), gv_strdup(), htextspan_t::items, htextspan_t::just, htextspan_t::nitems, and textspan_t::str.

Referenced by mkText(), and yyparse().

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 103 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 cleanTbl().

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 88 of file htmlparse.c.

References cleanCell(), htmltbl_t::data, free(), free_html_data(), htmltbl_t::p, rows, htmltbl_t::rows, row_t::rp, and htmltbl_t::u.

Referenced by cleanCell(), cleanup(), and cleanup().

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

◆ cleanup()

static void cleanup ( htmlparserstate_t html_state)
static

Definition at line 2326 of file htmlparse.c.

References cleanTbl(), htmlparserstate_s::fitemList, htmlparserstate_s::fontstack, free_html_label(), htmlparserstate_s::fspanList, htmlparserstate_s::lbl, NULL, htmltbl_t::p, htmltbl_t::prev, htmlparserstate_s::tblstack, and htmltbl_t::u.

Here is the call graph for this function:

◆ free()

void free ( void *  )

Referenced by cleanCell(), cleanTbl(), free_hi(), and free_ti().

Here is the caller graph for this function:

◆ free_hi()

static void free_hi ( htextspan_t  item)
inlinestatic

Definition at line 350 of file htmlparse.c.

References free(), and HTMLSTYPE::i.

Here is the call graph for this function:

◆ free_ti()

static void free_ti ( textspan_t  item)
inlinestatic

Definition at line 344 of file htmlparse.c.

References free().

Here is the call graph for this function:

◆ htmlparse()

int htmlparse ( htmlscan_t scanner)

Referenced by parseHTML().

Here is the caller graph for this function:

◆ lastRow()

static row_t * lastRow ( htmlparserstate_t html_state)
static

Definition at line 2293 of file htmlparse.c.

References htmltbl_t::p, htmltbl_t::rows, htmlparserstate_s::tblstack, and htmltbl_t::u.

Referenced by yyparse().

Here is the caller graph for this function:

◆ malloc()

void * malloc ( YYSIZE_T  )

◆ mkLabel()

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

Definition at line 130 of file htmlparse.c.

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

Referenced by yyparse().

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

◆ mkText()

static htmltxt_t * mkText ( htmlparserstate_t html_state)
static

Definition at line 2269 of file htmlparse.c.

References appendFLineList(), cnt(), htmlparserstate_s::fitemList, htmlparserstate_s::fspanList, gv_alloc(), gv_calloc(), htmltxt_t::nspans, htmltxt_t::spans, and UNSET_ALIGN.

Referenced by yyparse().

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

◆ nonSpace()

static bool nonSpace ( const char *  s)
static

Definition at line 148 of file htmlparse.c.

Referenced by yyparse().

Here is the caller graph for this function:

◆ parseHTML()

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

Definition at line 2379 of file htmlparse.c.

References agxbfree(), clearHTMLlexer(), htmlenv_t::g, GD_gvc, htmlparse(), initHTMLlexer(), NULL, scanner, 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 ( htmlparserstate_t html_state)
static

Definition at line 2369 of file htmlparse.c.

References htmlparserstate_s::fontstack.

Referenced by yyparse().

Here is the caller graph for this function:

◆ pushFont()

static void pushFont ( htmlparserstate_t html_state,
textfont_t fp 
)
static

Definition at line 2348 of file htmlparse.c.

References textfont_t::color, dtinsert, textfont_t::flags, htmlparserstate_s::fontstack, htmlparserstate_s::gvc, textfont_t::name, textfont_t::size, and GVC_s::textfont_dt.

Referenced by yyparse().

Here is the caller graph for this function:

◆ setCell()

static void setCell ( htmlparserstate_t html_state,
htmlcell_t cp,
void *  obj,
label_type_t  kind 
)
static

Definition at line 2307 of file htmlparse.c.

References htmlcell_t::child, htmlcell_t::hruled, HTML_IMAGE, HTML_TEXT, htmllabel_t::img, htmllabel_t::kind, htmltbl_t::p, row, htmltbl_t::rows, row_t::rp, htmllabel_t::tbl, htmlparserstate_s::tblstack, htmllabel_t::txt, htmltbl_t::u, htmllabel_t::u, htmltbl_t::vrule, and htmlcell_t::vruled.

Referenced by yyparse().

Here is the caller graph for this function:

◆ yydestruct()

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

Definition at line 1401 of file htmlparse.c.

References scanner, YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN, YY_IGNORE_MAYBE_UNINITIALIZED_END, YY_SYMBOL_PRINT, and YYUSE.

Referenced by yyparse().

Here is the caller graph for this function:

◆ yyparse()

Variable Documentation

◆ yycheck

const yytype_int8 yycheck[]
static

Definition at line 904 of file htmlparse.c.

Referenced by yyparse().

◆ 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 835 of file htmlparse.c.

Referenced by yyparse().

◆ 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 861 of file htmlparse.c.

Referenced by yyparse().

◆ 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 816 of file htmlparse.c.

Referenced by yyparse().

◆ 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 852 of file htmlparse.c.

Referenced by yyparse().

◆ 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 955 of file htmlparse.c.

Referenced by yyparse().

◆ 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 967 of file htmlparse.c.

Referenced by yyparse().

◆ 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 938 of file htmlparse.c.

Referenced by yyparse().

◆ yytable

const yytype_int8 yytable[]
static

Definition at line 872 of file htmlparse.c.

Referenced by yyparse().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 723 of file htmlparse.c.