40#define GRAPH_EOF_TOKEN '@'
54#define isatty(x) gv_isatty_suppression
58#define YY_INPUT(buf,result,max_size) \
59 if ((result = Disc->io->afread(Ifile, buf, max_size)) < 0) \
60 YY_FATAL_ERROR( "input in flex scanner failed" )
67static void addstr(
char *src);
static double len(glCompPoint p)
replacements for ctype.h functions
static const char * InputFile
static void storeFileName(char *fname, size_t len)
static bool twoDots(void)
static void ppDirective(void)
static void endstr_html(void)
static void addstr(char *src)
int gv_isatty_suppression
static void beginstr(void)
101LETTER [A-Za-z_\200-\377]
103NAME {LETTER}({LETTER}|{DIGIT})*
104NUMBER [-]?(({DIGIT}+(\.{DIGIT}*)?)|(\.{DIGIT}+))(\.|{LETTER})?
110{GRAPH_EOF_TOKEN} return(EOF);
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
133<qstring>[\\]["] addstr (
"\"");
134<qstring>[\\][\\] addstr (
"\\\\");
137<qstring>([^"\\\n]*|[\\]) addstr(aagget_text());
142<hstring>([^><\n]*) addstr(aagget_text());
143. return aagget_text()[0];
154 if (*aagget_text()) {
155 agxbprint(&xb,
" near '%s'", aagget_text());
166 agxbprint(&xb,
" scanning a HTML string (missing '>'? bad nesting? longer than %d?)",
YY_BUF_SIZE);
188#ifndef YY_CALL_ONLY_ARG
189# define YY_CALL_ONLY_ARG void
211 "pending string data that was not consumed (missing "
212 "endstr()/endhtmlstr()?)");
247 char*
s = aagget_text() + 1;
250 r = sscanf(
s,
"%d %1[\"]%n", &
lineno, buf, &
cnt);
260 while (*e && *e !=
'"') e++;
261 if (e != p && *e ==
'"') {
274 const char *
dot = strchr(aagget_text(),
'.');
276 return dot !=
NULL &&
dot != &aagget_text()[aagget_leng() - 1];
285 char c = aagget_text()[aagget_leng() - 1];
294 agwarningf(
"syntax ambiguity - badly delimited number '%s' in line %d of "
295 "%s splits into two tokens\n", aagget_text(),
line_num,
fname);
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
static size_t agxblen(const agxbuf *xb)
return number of characters currently stored
static int agxbputc(agxbuf *xb, char c)
add character to buffer
static void * gv_realloc(void *ptr, size_t old_size, size_t new_size)
static int cnt(Dict_t *d, Dtlink_t **set)
void agwarningf(const char *fmt,...)
void agerrorf(const char *fmt,...)
void agsetfile(const char *f)
sets the current file name for subsequent error reporting
char * agstrdup_html(Agraph_t *, const char *)
static bool gv_isdigit(int c)
textitem scanner parser str
void aglexinit(Agdisc_t *disc, void *ifile)
int aagwrap(YY_CALL_ONLY_ARG)
void aagerror(const char *str)
static bool startswith(const char *s, const char *prefix)
does the string s begin with the string prefix?