Graphviz 13.0.0~dev.20250607.1528
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 "htmlparse.h"
#include <limits.h>
Include dependency graph for htmlparse.c:

Go to the source code of this file.

Data Structures

union  yyalloc
 

Macros

#define YYBISON   30802
 
#define YYBISON_VERSION   "3.8.2"
 
#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 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 YY_USE(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 YYMAXUTOK   295
 
#define YYTRANSLATE(YYX)
 
#define YY_ACCESSING_SYMBOL(State)   YY_CAST (yysymbol_kind_t, yystos[State])
 
#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 = HTMLEMPTY)
 
#define YYACCEPT   goto yyacceptlab
 
#define YYABORT   goto yyabortlab
 
#define YYERROR   goto yyerrorlab
 
#define YYNOMEM   goto yyexhaustedlab
 
#define YYRECOVERING()   (!!yyerrstatus)
 
#define YYBACKUP(Token, Value)
 
#define YYERRCODE   HTMLUNDEF
 
#define YYDPRINTF(Args)   ((void) 0)
 
#define YY_SYMBOL_PRINT(Title, Kind, 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 enum yysymbol_kind_t yysymbol_kind_t
 
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  yysymbol_kind_t {
  YYSYMBOL_YYEMPTY = -2 , YYSYMBOL_YYEOF = 0 , YYSYMBOL_YYerror = 1 , YYSYMBOL_YYUNDEF = 2 ,
  YYSYMBOL_T_end_br = 3 , YYSYMBOL_T_end_img = 4 , YYSYMBOL_T_row = 5 , YYSYMBOL_T_end_row = 6 ,
  YYSYMBOL_T_html = 7 , YYSYMBOL_T_end_html = 8 , YYSYMBOL_T_end_table = 9 , YYSYMBOL_T_end_cell = 10 ,
  YYSYMBOL_T_end_font = 11 , YYSYMBOL_T_string = 12 , YYSYMBOL_T_error = 13 , YYSYMBOL_T_n_italic = 14 ,
  YYSYMBOL_T_n_bold = 15 , YYSYMBOL_T_n_underline = 16 , YYSYMBOL_T_n_overline = 17 , YYSYMBOL_T_n_sup = 18 ,
  YYSYMBOL_T_n_sub = 19 , YYSYMBOL_T_n_s = 20 , YYSYMBOL_T_HR = 21 , YYSYMBOL_T_hr = 22 ,
  YYSYMBOL_T_end_hr = 23 , YYSYMBOL_T_VR = 24 , YYSYMBOL_T_vr = 25 , YYSYMBOL_T_end_vr = 26 ,
  YYSYMBOL_T_BR = 27 , YYSYMBOL_T_br = 28 , YYSYMBOL_T_IMG = 29 , YYSYMBOL_T_img = 30 ,
  YYSYMBOL_T_table = 31 , YYSYMBOL_T_cell = 32 , YYSYMBOL_T_font = 33 , YYSYMBOL_T_italic = 34 ,
  YYSYMBOL_T_bold = 35 , YYSYMBOL_T_underline = 36 , YYSYMBOL_T_overline = 37 , YYSYMBOL_T_sup = 38 ,
  YYSYMBOL_T_sub = 39 , YYSYMBOL_T_s = 40 , YYSYMBOL_YYACCEPT = 41 , YYSYMBOL_html = 42 ,
  YYSYMBOL_fonttext = 43 , YYSYMBOL_text = 44 , YYSYMBOL_textitem = 45 , YYSYMBOL_font = 46 ,
  YYSYMBOL_n_font = 47 , YYSYMBOL_italic = 48 , YYSYMBOL_n_italic = 49 , YYSYMBOL_bold = 50 ,
  YYSYMBOL_n_bold = 51 , YYSYMBOL_strike = 52 , YYSYMBOL_n_strike = 53 , YYSYMBOL_underline = 54 ,
  YYSYMBOL_n_underline = 55 , YYSYMBOL_overline = 56 , YYSYMBOL_n_overline = 57 , YYSYMBOL_sup = 58 ,
  YYSYMBOL_n_sup = 59 , YYSYMBOL_sub = 60 , YYSYMBOL_n_sub = 61 , YYSYMBOL_br = 62 ,
  YYSYMBOL_string = 63 , YYSYMBOL_table = 64 , YYSYMBOL_65_1 = 65 , YYSYMBOL_fonttable = 66 ,
  YYSYMBOL_opt_space = 67 , YYSYMBOL_rows = 68 , YYSYMBOL_row = 69 , YYSYMBOL_70_2 = 70 ,
  YYSYMBOL_cells = 71 , YYSYMBOL_cell = 72 , YYSYMBOL_73_3 = 73 , YYSYMBOL_74_4 = 74 ,
  YYSYMBOL_75_5 = 75 , YYSYMBOL_76_6 = 76 , YYSYMBOL_image = 77 , YYSYMBOL_HR = 78 ,
  YYSYMBOL_VR = 79
}
 
enum  { YYENOMEM = -2 }
 

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)
 
void * malloc (YYSIZE_T)
 
void free (void *)
 
static void yydestruct (const char *yymsg, yysymbol_kind_t yykind, 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

◆ YY_

#define YY_ (   Msgid)    Msgid

Definition at line 403 of file htmlparse.c.

◆ YY_ACCESSING_SYMBOL

#define YY_ACCESSING_SYMBOL (   State)    YY_CAST (yysymbol_kind_t, yystos[State])

Accessing symbol of state STATE.

Definition at line 674 of file htmlparse.c.

◆ YY_ASSERT

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

Definition at line 469 of file htmlparse.c.

◆ YY_ATTRIBUTE_PURE

#define YY_ATTRIBUTE_PURE

Definition at line 412 of file htmlparse.c.

◆ YY_ATTRIBUTE_UNUSED

#define YY_ATTRIBUTE_UNUSED

Definition at line 420 of file htmlparse.c.

◆ YY_CAST

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

Definition at line 173 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

#define YY_IGNORE_MAYBE_UNINITIALIZED_BEGIN

Definition at line 449 of file htmlparse.c.

◆ YY_IGNORE_MAYBE_UNINITIALIZED_END

#define YY_IGNORE_MAYBE_UNINITIALIZED_END

Definition at line 450 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_BEGIN

#define YY_IGNORE_USELESS_CAST_BEGIN

Definition at line 464 of file htmlparse.c.

◆ YY_IGNORE_USELESS_CAST_END

#define YY_IGNORE_USELESS_CAST_END

Definition at line 465 of file htmlparse.c.

◆ YY_INITIAL_VALUE

#define YY_INITIAL_VALUE (   Value)    Value

Definition at line 446 of file htmlparse.c.

◆ YY_NULLPTR

#define YY_NULLPTR   ((void*)0)

Definition at line 185 of file htmlparse.c.

◆ YY_REDUCE_PRINT

#define YY_REDUCE_PRINT (   Rule)

Definition at line 1041 of file htmlparse.c.

◆ YY_REINTERPRET_CAST

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

Definition at line 174 of file htmlparse.c.

◆ YY_STACK_PRINT

#define YY_STACK_PRINT (   Bottom,
  Top 
)

Definition at line 1040 of file htmlparse.c.

◆ YY_SYMBOL_PRINT

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

Definition at line 1039 of file htmlparse.c.

◆ YY_USE

#define YY_USE (   E)    ((void) (E))

Definition at line 426 of file htmlparse.c.

◆ YYABORT

#define YYABORT   goto yyabortlab

Definition at line 888 of file htmlparse.c.

◆ YYACCEPT

#define YYACCEPT   goto yyacceptlab

Definition at line 887 of file htmlparse.c.

◆ YYBACKUP

#define YYBACKUP (   Token,
  Value 
)
Value:
do \
if (yychar == HTMLEMPTY) \
{ \
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:75
#define yylval
Definition gmlparse.c:74
#define YY_(Msgid)
Definition htmlparse.c:403
#define YYERROR
Definition htmlparse.c:889
#define HTMLEMPTY
Definition htmlparse.h:119
cleanup & scanner
Definition htmlparse.y:295

Definition at line 895 of file htmlparse.c.

◆ YYBISON

#define YYBISON   30802

Definition at line 49 of file htmlparse.c.

◆ YYBISON_VERSION

#define YYBISON_VERSION   "3.8.2"

Definition at line 52 of file htmlparse.c.

◆ yyclearin

#define yyclearin   (yychar = HTMLEMPTY)

Definition at line 885 of file htmlparse.c.

◆ YYCOPY_NEEDED

#define YYCOPY_NEEDED   1

Definition at line 558 of file htmlparse.c.

◆ yydebug

#define yydebug   htmldebug

Definition at line 72 of file htmlparse.c.

◆ YYDPRINTF

#define YYDPRINTF (   Args)    ((void) 0)

Definition at line 1038 of file htmlparse.c.

◆ YYERRCODE

#define YYERRCODE   HTMLUNDEF

Definition at line 914 of file htmlparse.c.

◆ yyerrok

#define yyerrok   (yyerrstatus = 0)

Definition at line 884 of file htmlparse.c.

◆ yyerror

#define yyerror   htmlerror

Definition at line 71 of file htmlparse.c.

◆ YYERROR

#define YYERROR   goto yyerrorlab

Definition at line 889 of file htmlparse.c.

◆ YYFINAL

#define YYFINAL   31

Definition at line 599 of file htmlparse.c.

◆ YYFREE

#define YYFREE   free

Definition at line 530 of file htmlparse.c.

◆ YYINITDEPTH

#define YYINITDEPTH   200

Definition at line 1047 of file htmlparse.c.

◆ YYLAST

#define YYLAST   271

Definition at line 601 of file htmlparse.c.

◆ yylex

#define yylex (   void)    htmllex

Definition at line 70 of file htmlparse.c.

◆ YYMALLOC

#define YYMALLOC   malloc

Definition at line 524 of file htmlparse.c.

◆ YYMAXDEPTH

#define YYMAXDEPTH   10000

Definition at line 1058 of file htmlparse.c.

◆ YYMAXUTOK

#define YYMAXUTOK   295

Definition at line 613 of file htmlparse.c.

◆ yynerrs

#define yynerrs   htmlnerrs

Definition at line 73 of file htmlparse.c.

◆ YYNNTS

#define YYNNTS   39

Definition at line 606 of file htmlparse.c.

◆ YYNOMEM

#define YYNOMEM   goto yyexhaustedlab

Definition at line 890 of file htmlparse.c.

◆ YYNRULES

#define YYNRULES   69

Definition at line 608 of file htmlparse.c.

◆ YYNSTATES

#define YYNSTATES   116

Definition at line 610 of file htmlparse.c.

◆ YYNTOKENS

#define YYNTOKENS   41

Definition at line 604 of file htmlparse.c.

◆ YYPACT_NINF

#define YYPACT_NINF   (-82)

Definition at line 707 of file htmlparse.c.

◆ yypact_value_is_default

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

Definition at line 709 of file htmlparse.c.

◆ yyparse

#define yyparse (   void)    htmlparse

Definition at line 69 of file htmlparse.c.

◆ YYPOPSTACK

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

◆ YYPTRDIFF_MAXIMUM

#define YYPTRDIFF_MAXIMUM   LONG_MAX

Definition at line 363 of file htmlparse.c.

◆ YYPTRDIFF_T

#define YYPTRDIFF_T   long

Definition at line 362 of file htmlparse.c.

◆ YYPULL

#define YYPULL   1

Definition at line 64 of file htmlparse.c.

◆ YYPURE

#define YYPURE   2

Definition at line 58 of file htmlparse.c.

◆ YYPUSH

#define YYPUSH   0

Definition at line 61 of file htmlparse.c.

◆ YYRECOVERING

#define YYRECOVERING ( )    (!!yyerrstatus)

Definition at line 893 of file htmlparse.c.

◆ YYSIZE_MAXIMUM

#define YYSIZE_MAXIMUM
Value:
: YY_CAST (YYSIZE_T, -1)))
#define YYPTRDIFF_MAXIMUM
Definition htmlparse.c:363
#define YY_CAST(Type, Val)
Definition htmlparse.c:173
#define YYSIZE_T
Definition htmlparse.c:376
#define YYPTRDIFF_T
Definition htmlparse.c:362

Definition at line 380 of file htmlparse.c.

◆ YYSIZE_T

#define YYSIZE_T   unsigned

Definition at line 376 of file htmlparse.c.

◆ YYSIZEOF

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

Definition at line 386 of file htmlparse.c.

◆ YYSKELETON_NAME

#define YYSKELETON_NAME   "yacc.c"

Definition at line 55 of file htmlparse.c.

◆ YYSTACK_ALLOC

#define YYSTACK_ALLOC   YYMALLOC

Definition at line 510 of file htmlparse.c.

◆ YYSTACK_ALLOC_MAXIMUM

#define YYSTACK_ALLOC_MAXIMUM   YYSIZE_MAXIMUM

Definition at line 513 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:457
#define YYSTYPE
Definition htmlparse.c:67
#define YYSIZEOF(X)
Definition htmlparse.c:386
#define YYSTACK_GAP_MAXIMUM
Definition htmlparse.c:550

Definition at line 554 of file htmlparse.c.

◆ YYSTACK_FREE

#define YYSTACK_FREE   YYFREE

Definition at line 511 of file htmlparse.c.

◆ YYSTACK_GAP_MAXIMUM

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

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

◆ YYSTYPE

#define YYSTYPE   HTMLSTYPE

Definition at line 67 of file htmlparse.c.

◆ YYTABLE_NINF

#define YYTABLE_NINF   (-63)

Definition at line 712 of file htmlparse.c.

◆ yytable_value_is_error

#define yytable_value_is_error (   Yyn)     0

Definition at line 714 of file htmlparse.c.

◆ YYTRANSLATE

#define YYTRANSLATE (   YYX)
Value:
(0 <= (YYX) && (YYX) <= YYMAXUTOK \
yysymbol_kind_t
Definition gmlparse.c:282
static const yytype_int8 yytranslate[]
Definition htmlparse.c:625
@ YYSYMBOL_YYUNDEF
Definition htmlparse.c:196
#define YYMAXUTOK
Definition htmlparse.c:613

Definition at line 618 of file htmlparse.c.

Typedef Documentation

◆ yy_state_fast_t

typedef int yy_state_fast_t

Definition at line 393 of file htmlparse.c.

◆ yy_state_t

Definition at line 390 of file htmlparse.c.

◆ yysymbol_kind_t

Definition at line 275 of file htmlparse.c.

◆ yytype_int16

typedef short yytype_int16

Definition at line 314 of file htmlparse.c.

◆ yytype_int8

typedef signed char yytype_int8

Definition at line 306 of file htmlparse.c.

◆ yytype_uint16

typedef unsigned short yytype_uint16

Definition at line 346 of file htmlparse.c.

◆ yytype_uint8

typedef unsigned char yytype_uint8

Definition at line 335 of file htmlparse.c.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
YYENOMEM 

Definition at line 882 of file htmlparse.c.

◆ yysymbol_kind_t

Enumerator
YYSYMBOL_YYEMPTY 
YYSYMBOL_YYEOF 
YYSYMBOL_YYerror 
YYSYMBOL_YYUNDEF 
YYSYMBOL_T_end_br 
YYSYMBOL_T_end_img 
YYSYMBOL_T_row 
YYSYMBOL_T_end_row 
YYSYMBOL_T_html 
YYSYMBOL_T_end_html 
YYSYMBOL_T_end_table 
YYSYMBOL_T_end_cell 
YYSYMBOL_T_end_font 
YYSYMBOL_T_string 
YYSYMBOL_T_error 
YYSYMBOL_T_n_italic 
YYSYMBOL_T_n_bold 
YYSYMBOL_T_n_underline 
YYSYMBOL_T_n_overline 
YYSYMBOL_T_n_sup 
YYSYMBOL_T_n_sub 
YYSYMBOL_T_n_s 
YYSYMBOL_T_HR 
YYSYMBOL_T_hr 
YYSYMBOL_T_end_hr 
YYSYMBOL_T_VR 
YYSYMBOL_T_vr 
YYSYMBOL_T_end_vr 
YYSYMBOL_T_BR 
YYSYMBOL_T_br 
YYSYMBOL_T_IMG 
YYSYMBOL_T_img 
YYSYMBOL_T_table 
YYSYMBOL_T_cell 
YYSYMBOL_T_font 
YYSYMBOL_T_italic 
YYSYMBOL_T_bold 
YYSYMBOL_T_underline 
YYSYMBOL_T_overline 
YYSYMBOL_T_sup 
YYSYMBOL_T_sub 
YYSYMBOL_T_s 
YYSYMBOL_YYACCEPT 
YYSYMBOL_html 
YYSYMBOL_fonttext 
YYSYMBOL_text 
YYSYMBOL_textitem 
YYSYMBOL_font 
YYSYMBOL_n_font 
YYSYMBOL_italic 
YYSYMBOL_n_italic 
YYSYMBOL_bold 
YYSYMBOL_n_bold 
YYSYMBOL_strike 
YYSYMBOL_n_strike 
YYSYMBOL_underline 
YYSYMBOL_n_underline 
YYSYMBOL_overline 
YYSYMBOL_n_overline 
YYSYMBOL_sup 
YYSYMBOL_n_sup 
YYSYMBOL_sub 
YYSYMBOL_n_sub 
YYSYMBOL_br 
YYSYMBOL_string 
YYSYMBOL_table 
YYSYMBOL_65_1 
YYSYMBOL_fonttable 
YYSYMBOL_opt_space 
YYSYMBOL_rows 
YYSYMBOL_row 
YYSYMBOL_70_2 
YYSYMBOL_cells 
YYSYMBOL_cell 
YYSYMBOL_73_3 
YYSYMBOL_74_4 
YYSYMBOL_75_5 
YYSYMBOL_76_6 
YYSYMBOL_image 
YYSYMBOL_HR 
YYSYMBOL_VR 

Definition at line 191 of file htmlparse.c.

Function Documentation

◆ addRow()

static void addRow ( htmlparserstate_t html_state)
static

Definition at line 1933 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 1864 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 1872 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 104 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 89 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 1960 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(), and cleanTbl().

Here is the caller graph for this function:

◆ lastRow()

static row_t * lastRow ( htmlparserstate_t html_state)
static

Definition at line 1927 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 131 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 1903 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 149 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 2013 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 2003 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 1982 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 1941 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,
yysymbol_kind_t  yykind,
YYSTYPE yyvaluep,
htmlscan_t scanner 
)
static

Definition at line 1071 of file htmlparse.c.

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

Referenced by yyparse().

Here is the caller graph for this function:

◆ yyparse()

Variable Documentation

◆ yycheck

const yytype_int8 yycheck[]
static

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

Referenced by yyparse().

◆ yydefgoto

const yytype_int8 yydefgoto[]
static
Initial value:
=
{
0, 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 764 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 719 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 755 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 858 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 870 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 841 of file htmlparse.c.

◆ yytable

const yytype_int8 yytable[]
static

Definition at line 775 of file htmlparse.c.

Referenced by yyparse().

◆ yytranslate

const yytype_int8 yytranslate[]
static

Definition at line 625 of file htmlparse.c.