Graphviz 13.0.0~dev.20250607.1528
Loading...
Searching...
No Matches
scan.l File Reference
#include <assert.h>
#include <grammar.h>
#include <cgraph/cghdr.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.h>
#include <util/agxbuf.h>
#include <util/gv_ctype.h>
#include <util/startswith.h>
Include dependency graph for scan.l:

Go to the source code of this file.

Macros

#define GRAPH_EOF_TOKEN   '@' /* lex class must be defined below */
 
#define YYSTYPE   AAGSTYPE
 
#define isatty(x)   gv_isatty_suppression
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_CALL_ONLY_ARG   aagscan_t yyscanner
 

Functions

static int read_input (aagscan_t yyscanner, char *buf, int max_size)
 
static void beginstr (aagscan_t yyscanner)
 
static void addstr (aagscan_t yyscanner, char *src)
 
static void endstr (aagscan_t yyscanner)
 
static void endstr_html (aagscan_t yyscanner)
 
static void storeFileName (aagscan_t yyscanner, const char *fname, size_t len)
 
static void ppDirective (aagscan_t yyscanner)
 
static bool twoDots (aagscan_t yyscanner)
 
static int chkNum (aagscan_t yyscanner)
 
int yylex (YYSTYPE *yylval_param, yyscan_t yyscanner)
 
void aagerror (aagscan_t yyscanner, const char *str)
 
void aglexeof (aagscan_t yyscanner)
 
void aglexbad (aagscan_t yyscanner)
 
int aagwrap (YY_CALL_ONLY_ARG)
 

Variables

int gv_isatty_suppression
 

Macro Definition Documentation

◆ GRAPH_EOF_TOKEN

#define GRAPH_EOF_TOKEN   '@' /* lex class must be defined below */

Definition at line 49 of file scan.l.

◆ isatty

#define isatty (   x)    gv_isatty_suppression

Definition at line 59 of file scan.l.

◆ YY_CALL_ONLY_ARG

#define YY_CALL_ONLY_ARG   aagscan_t yyscanner

Definition at line 202 of file scan.l.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ((result = read_input(yyscanner, buf, max_size)) < 0) \
YY_FATAL_ERROR( "input in flex scanner failed" )
static int read_input(aagscan_t yyscanner, char *buf, int max_size)
Definition scan.l:308

Definition at line 65 of file scan.l.

◆ YYSTYPE

#define YYSTYPE   AAGSTYPE

Definition at line 52 of file scan.l.

Function Documentation

◆ aagerror()

void aagerror ( aagscan_t  yyscanner,
const char *  str 
)

Definition at line 151 of file scan.l.

References agerrorf(), agxbfree(), agxblen(), agxbprint(), agxbputc(), agxbuse(), BEGIN, comment, hstring, INITIAL, qstring, str, YY_BUF_SIZE, yyextra, yyg, and YYSTATE.

Here is the call graph for this function:

◆ aagwrap()

int aagwrap ( YY_CALL_ONLY_ARG  )

Definition at line 205 of file scan.l.

◆ addstr()

static void addstr ( aagscan_t  yyscanner,
char *  src 
)
static

Definition at line 221 of file scan.l.

References aagget_extra(), agxbput(), and aagextra_s::Sbuf.

Here is the call graph for this function:

◆ aglexbad()

void aglexbad ( aagscan_t  yyscanner)

Definition at line 196 of file scan.l.

References YY_FLUSH_BUFFER, and yyg.

Referenced by agconcat().

Here is the caller graph for this function:

◆ aglexeof()

void aglexeof ( aagscan_t  yyscanner)

Definition at line 191 of file scan.l.

References GRAPH_EOF_TOKEN, unput, and yyg.

Referenced by endgraph(), and endgraph().

Here is the caller graph for this function:

◆ beginstr()

static void beginstr ( aagscan_t  yyscanner)
static

Definition at line 211 of file scan.l.

References aagget_extra(), agxblen(), and aagextra_s::Sbuf.

Here is the call graph for this function:

◆ chkNum()

static int chkNum ( aagscan_t  yyscanner)
static

Definition at line 288 of file scan.l.

References aagget_extra(), agwarningf(), fname, gv_isdigit(), aagextra_s::InputFile, aagextra_s::line_num, and twoDots().

Here is the call graph for this function:

◆ endstr()

static void endstr ( aagscan_t  yyscanner)
static

Definition at line 226 of file scan.l.

References aagget_extra(), agstrdup(), agxbuse(), aagextra_s::G, and aagextra_s::Sbuf.

Here is the call graph for this function:

◆ endstr_html()

static void endstr_html ( aagscan_t  yyscanner)
static

Definition at line 231 of file scan.l.

References aagget_extra(), agstrdup_html(), agxbuse(), aagextra_s::G, and aagextra_s::Sbuf.

Here is the call graph for this function:

◆ ppDirective()

static void ppDirective ( aagscan_t  yyscanner)
static

Definition at line 247 of file scan.l.

References aagget_extra(), cnt(), aagextra_s::line_num, lineno, startswith(), and storeFileName().

Here is the call graph for this function:

◆ read_input()

static int read_input ( aagscan_t  yyscanner,
char *  buf,
int  max_size 
)
static

Definition at line 308 of file scan.l.

References aagget_extra(), Agiodisc_s::afread, aagextra_s::Disc, aagextra_s::Ifile, Agdisc_s::io, and scanner.

Here is the call graph for this function:

◆ storeFileName()

static void storeFileName ( aagscan_t  yyscanner,
const char *  fname,
size_t  len 
)
static

Definition at line 236 of file scan.l.

References aagget_extra(), agxbput_n(), agxbuse(), fname, aagextra_s::InputFile, aagextra_s::InputFileBuffer, and len().

Referenced by ppDirective().

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

◆ twoDots()

static bool twoDots ( aagscan_t  yyscanner)
static

Definition at line 277 of file scan.l.

References dot, and NULL.

Referenced by chkNum().

Here is the caller graph for this function:

◆ yylex()

int yylex ( YYSTYPE yylval_param,
yyscan_t  yyscanner 
)

Definition at line 114 of file scan.l.

Variable Documentation

◆ gv_isatty_suppression

int gv_isatty_suppression

Definition at line 60 of file scan.l.