Graphviz 13.0.0~dev.20241220.2304
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 isatty(x)   gv_isatty_suppression
 
#define YY_INPUT(buf, result, max_size)
 
#define YY_CALL_ONLY_ARG   void
 

Functions

static void beginstr (void)
 
static void addstr (char *src)
 
static void endstr (void)
 
static void endstr_html (void)
 
static void storeFileName (char *fname, size_t len)
 
static void ppDirective (void)
 
static bool twoDots (void)
 
static int chkNum (void)
 
int yylex (void)
 
void aagerror (const char *str)
 
void aglexeof (void)
 
void aglexbad (void)
 
int aagwrap (YY_CALL_ONLY_ARG)
 
void agsetfile (const char *f)
 sets the current file name for subsequent error reporting
 
void aglexinit (Agdisc_t *disc, void *ifile)
 

Variables

static int line_num = 1
 
static int html_nest = 0
 
static const char * InputFile
 
static Agdisc_tDisc
 
static void * Ifile
 
static int graphType
 
int gv_isatty_suppression
 
static agxbuf Sbuf
 

Macro Definition Documentation

◆ GRAPH_EOF_TOKEN

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

Definition at line 40 of file scan.l.

◆ isatty

#define isatty (   x)    gv_isatty_suppression

Definition at line 54 of file scan.l.

◆ YY_CALL_ONLY_ARG

#define YY_CALL_ONLY_ARG   void

Definition at line 189 of file scan.l.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ((result = Disc->io->afread(Ifile, buf, max_size)) < 0) \
YY_FATAL_ERROR( "input in flex scanner failed" )
static Agdisc_t * Disc
Definition scan.l:45
static void * Ifile
Definition scan.l:46
Agiodisc_t * io
Definition cgraph.h:339
int(* afread)(void *chan, char *buf, int bufsize)
Definition cgraph.h:328

Definition at line 58 of file scan.l.

Function Documentation

◆ aagerror()

void aagerror ( const char *  str)

Definition at line 147 of file scan.l.

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

Here is the call graph for this function:

◆ aagwrap()

int aagwrap ( YY_CALL_ONLY_ARG  )

Definition at line 192 of file scan.l.

◆ addstr()

static void addstr ( char *  src)
static

Definition at line 215 of file scan.l.

References agxbput(), and Sbuf.

Here is the call graph for this function:

◆ aglexbad()

void aglexbad ( void  )

Definition at line 186 of file scan.l.

References YY_FLUSH_BUFFER.

Referenced by agconcat().

Here is the caller graph for this function:

◆ aglexeof()

void aglexeof ( void  )

Definition at line 184 of file scan.l.

References GRAPH_EOF_TOKEN, and unput.

Referenced by endgraph(), and endgraph().

Here is the caller graph for this function:

◆ aglexinit()

void aglexinit ( Agdisc_t disc,
void *  ifile 
)

Definition at line 205 of file scan.l.

References Disc, Disc, disc, graphType, graphType, Ifile, and Ifile.

Referenced by agconcat().

Here is the caller graph for this function:

◆ beginstr()

static void beginstr ( void  )
static

Definition at line 208 of file scan.l.

References agxblen(), and Sbuf.

Here is the call graph for this function:

◆ chkNum()

static int chkNum ( void  )
static

Definition at line 284 of file scan.l.

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

Here is the call graph for this function:

◆ endstr()

static void endstr ( void  )
static

Definition at line 219 of file scan.l.

References aaglval, Ag_G_global, agstrdup(), agxbuse(), Sbuf, and AAGSTYPE::str.

Here is the call graph for this function:

◆ endstr_html()

static void endstr_html ( void  )
static

Definition at line 223 of file scan.l.

References aaglval, Ag_G_global, agstrdup_html(), agxbuse(), Sbuf, and AAGSTYPE::str.

Here is the call graph for this function:

◆ ppDirective()

static void ppDirective ( void  )
static

Definition at line 243 of file scan.l.

References cnt(), line_num, lineno, startswith(), and storeFileName().

Here is the call graph for this function:

◆ storeFileName()

static void storeFileName ( char *  fname,
size_t  len 
)
static

Definition at line 227 of file scan.l.

References cnt(), fname, gv_realloc(), InputFile, 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 ( void  )
static

Definition at line 273 of file scan.l.

References dot, and NULL.

Referenced by chkNum().

Here is the caller graph for this function:

◆ yylex()

int yylex ( void  )

Definition at line 109 of file scan.l.

Variable Documentation

◆ Disc

Agdisc_t* Disc
static

Definition at line 45 of file scan.l.

Referenced by aglexinit().

◆ graphType

int graphType
static

Definition at line 47 of file scan.l.

Referenced by aglexinit().

◆ gv_isatty_suppression

int gv_isatty_suppression

Definition at line 55 of file scan.l.

◆ html_nest

int html_nest = 0
static

Definition at line 43 of file scan.l.

◆ Ifile

void* Ifile
static

Definition at line 46 of file scan.l.

Referenced by aglexinit().

◆ InputFile

const char* InputFile
static

Definition at line 44 of file scan.l.

Referenced by aagerror(), agsetfile(), chkNum(), and storeFileName().

◆ line_num

int line_num = 1
static

Definition at line 42 of file scan.l.

Referenced by aagerror(), agsetfile(), chkNum(), and ppDirective().

◆ Sbuf

agxbuf Sbuf
static

Definition at line 64 of file scan.l.

Referenced by aagerror(), addstr(), beginstr(), endstr(), and endstr_html().