Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
htmllex.c File Reference
#include <assert.h>
#include <common/render.h>
#include <common/htmltable.h>
#include "htmlparse.h"
#include <common/htmllex.h>
#include <cdt/cdt.h>
#include <cgraph/tokenize.h>
#include <limits.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <util/alloc.h>
#include <util/gv_ctype.h>
#include <util/startswith.h>
#include <util/strcasecmp.h>
#include <util/strview.h>
#include <util/unused.h>
Include dependency graph for htmllex.c:

Go to the source code of this file.

Macros

#define XML_STATUS_ERROR   0
 

Functions

static unsigned long htmllineno_ctx (htmllexstate_t *ctx)
 
static void error_context (htmllexstate_t *ctx)
 
void htmlerror (htmlscan_t *scanner, const char *msg)
 
int initHTMLlexer (htmlscan_t *scanner, char *src, agxbuf *xb, htmlenv_t *env)
 
int clearHTMLlexer (htmlscan_t *scanner)
 
static UNUSED void agxbput_move (agxbuf *dst, const char *src)
 agxbput, but assume that source and destination may overlap
 
unsigned long htmllineno (htmlscan_t *scanner)
 
int htmllex (union HTMLSTYPE *htmllval, htmlscan_t *scanner)
 

Macro Definition Documentation

◆ XML_STATUS_ERROR

#define XML_STATUS_ERROR   0

Definition at line 41 of file htmllex.c.

Function Documentation

◆ agxbput_move()

static UNUSED void agxbput_move ( agxbuf dst,
const char *  src 
)
static

Definition at line 792 of file htmllex.c.

References agxbput(), free(), and gv_strdup().

Here is the call graph for this function:

◆ clearHTMLlexer()

int clearHTMLlexer ( htmlscan_t scanner)

Definition at line 778 of file htmllex.c.

References agxbfree(), htmllexstate_t::error, htmllexstate_t::lb, scanner, and htmllexstate_t::warn.

Referenced by parseHTML().

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

◆ error_context()

static void error_context ( htmllexstate_t ctx)
static

Definition at line 49 of file htmllex.c.

References agerr(), AGPREV, htmllexstate_t::currtok, strview_t::data, htmllexstate_t::prevtok, and strview_t::size.

Referenced by htmlerror(), and htmllex().

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

◆ htmlerror()

void htmlerror ( htmlscan_t scanner,
const char *  msg 
)

Definition at line 58 of file htmllex.c.

References agerrorf(), htmllexstate_t::error, error_context(), htmllineno(), and scanner.

Referenced by yyparse().

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

◆ htmllex()

int htmllex ( union HTMLSTYPE htmllval,
htmlscan_t scanner 
)

Definition at line 1052 of file htmllex.c.

References agerrorf(), agxblen(), agxbuse(), htmllexstate_t::currtok, strview_t::data, htmllexstate_t::error, error_context(), htmllineno(), htmllexstate_t::htmllval, htmllexstate_t::lb, len(), htmllexstate_t::mode, htmllexstate_t::prevtok, htmllexstate_t::ptr, scanner, T_error, htmllexstate_t::tok, and XML_STATUS_ERROR.

Here is the call graph for this function:

◆ htmllineno()

unsigned long htmllineno ( htmlscan_t scanner)

Definition at line 907 of file htmllex.c.

References htmllineno_ctx(), and scanner.

Referenced by htmlerror(), and htmllex().

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

◆ htmllineno_ctx()

static unsigned long htmllineno_ctx ( htmllexstate_t ctx)
static

Definition at line 911 of file htmllex.c.

Referenced by htmllineno().

Here is the caller graph for this function:

◆ initHTMLlexer()

int initHTMLlexer ( htmlscan_t scanner,
char *  src,
agxbuf xb,
htmlenv_t env 
)

Definition at line 745 of file htmllex.c.

References agwarningf(), charsetToStr(), htmllexstate_t::currtok, htmllexstate_t::error, htmlenv_t::g, GD_charset, GD_gvc, htmllexstate_t::gvc, htmllexstate_t::inCell, htmllexstate_t::lb, htmllexstate_t::mode, htmllexstate_t::prevtok, htmllexstate_t::ptr, scanner, htmllexstate_t::warn, and htmllexstate_t::xb.

Referenced by parseHTML().

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