Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
gmlscan.l File Reference
#include <assert.h>
#include <stdlib.h>
#include <string.h>
#include <gml2gv.h>
#include <gmlparse.h>
#include <util/alloc.h>
#include "config.h"

Go to the source code of this file.

Macros

#define GRAPH_EOF_TOKEN   '@' /* lex class must be defined below */
 
#define YY_INPUT(buf, result, max_size)
 

Functions

void initgmlscan (FILE *ifile)
 
static void beginstr (void)
 
static void addstr (const char *src)
 
static void endstr (void)
 
int yylex (void)
 
void gmlerror (const char *str)
 
int gmlerrors (void)
 
void gmllexeof (void)
 
int yywrap (YY_CALL_ONLY_ARG)
 

Variables

static int line_num = 1
 
static int errors
 
static FILE * Ifile
 
static char * Sbuf
 

Macro Definition Documentation

◆ GRAPH_EOF_TOKEN

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

Definition at line 21 of file gmlscan.l.

◆ YY_INPUT

#define YY_INPUT (   buf,
  result,
  max_size 
)
Value:
if ((result = fread(buf, 1, max_size, Ifile)) < 0) \
YY_FATAL_ERROR( "input in flex scanner failed" )
static FILE * Ifile
Definition gmlscan.l:25

Definition at line 37 of file gmlscan.l.

Function Documentation

◆ addstr()

static void addstr ( const char *  src)
static

Definition at line 50 of file gmlscan.l.

References gv_realloc(), NULL, and Sbuf.

Here is the call graph for this function:

◆ beginstr()

static void beginstr ( void  )
static

Definition at line 45 of file gmlscan.l.

References gv_strdup(), NULL, and Sbuf.

Here is the call graph for this function:

◆ endstr()

static void endstr ( void  )
static

Definition at line 63 of file gmlscan.l.

References gmllval, NULL, Sbuf, and GMLSTYPE::str.

◆ gmlerror()

void gmlerror ( const char *  str)

Definition at line 125 of file gmlscan.l.

References agwarningf(), errors, line_num, str, and yytext.

Here is the call graph for this function:

◆ gmlerrors()

int gmlerrors ( void  )

Definition at line 133 of file gmlscan.l.

References errors.

Referenced by gml_to_gv(), and gml_to_gv().

Here is the caller graph for this function:

◆ gmllexeof()

void gmllexeof ( void  )

Definition at line 138 of file gmlscan.l.

References GRAPH_EOF_TOKEN, and unput.

◆ initgmlscan()

void initgmlscan ( FILE *  ifile)

Definition at line 27 of file gmlscan.l.

References errors, errors, Ifile, Ifile, line_num, and line_num.

Referenced by gml_to_gv(), and gml_to_gv().

Here is the caller graph for this function:

◆ yylex()

int yylex ( void  )

Definition at line 80 of file gmlscan.l.

◆ yywrap()

int yywrap ( YY_CALL_ONLY_ARG  )

Definition at line 144 of file gmlscan.l.

Variable Documentation

◆ errors

int errors
static

Definition at line 24 of file gmlscan.l.

Referenced by gmlerror(), gmlerrors(), and initgmlscan().

◆ Ifile

FILE* Ifile
static

Definition at line 25 of file gmlscan.l.

Referenced by initgmlscan().

◆ line_num

int line_num = 1
static

Definition at line 23 of file gmlscan.l.

Referenced by gmlerror(), and initgmlscan().

◆ Sbuf

char* Sbuf
static

Definition at line 43 of file gmlscan.l.

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