Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
scan.l File Reference
#include <assert.h>
#include <grammar.h>
#include <cgraph/cghdr.h>
#include <cgraph/agxbuf.h>
#include <cgraph/gv_ctype.h>
#include <cgraph/startswith.h>
#include <stdbool.h>
#include <stddef.h>
#include <string.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

void agreadline (int n)
 sets input line number for subsequent error reporting
 
void agsetfile (const char *f)
 sets the current file name for subsequent error reporting
 
void aglexinit (Agdisc_t *disc, void *ifile)
 
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)
 

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 67 of file scan.l.

◆ YY_CALL_ONLY_ARG

#define YY_CALL_ONLY_ARG   void

Definition at line 270 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 71 of file scan.l.

Function Documentation

◆ aagerror()

void aagerror ( const char *  str)

Definition at line 228 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 273 of file scan.l.

◆ addstr()

static void addstr ( char *  src)
static

Definition at line 86 of file scan.l.

References agxbput(), and Sbuf.

Here is the call graph for this function:

◆ aglexbad()

void aglexbad ( void  )

Definition at line 267 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 265 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 60 of file scan.l.

References 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 79 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 155 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 90 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 94 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 114 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 98 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 144 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 190 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 68 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(), agreadline(), agsetfile(), chkNum(), and ppDirective().

◆ Sbuf

agxbuf Sbuf
static

Definition at line 77 of file scan.l.

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