#endif /* not __GNUC__ */
extern char *yytext;
-extern int yylineno;
+extern int ayylineno;
extern int yylex(void);
static int yyerror(const char *s);
#define PARSE_DEBUG 0
#if PARSE_DEBUG
-# define dprintf(f,s) fprintf(stderr, (f), yylineno, (s))
+# define dprintf(f,s) fprintf(stderr, (f), ayylineno, (s))
# define amu_return(v)
#else
# define dprintf(f,s)
yyerror(const char *s)
{
fprintf(stderr, "AMDCONF: %s on line %d (section %s)\n",
- s, yylineno,
+ s, ayylineno,
(header_section ? header_section : "null"));
exit(1);
return 1; /* to full compilers that insist on a return statement */
# ifndef ECHO
# define ECHO (void) fwrite( yytext, yyleng, 1, yyout )
# endif /* not ECHO */
-int yylineno = 0;
+int ayylineno = 0;
#endif /* FLEX_SCANNER */
int yylex(void);
#define TOK_DEBUG 0
#if TOK_DEBUG
-# define dprintf(f,s) fprintf(stderr, (f), yylineno, (s))
+# define dprintf(f,s) fprintf(stderr, (f), ayylineno, (s))
# define amu_return(v)
#else
# define dprintf(f,s)
%%
\n {
- yylineno++;
+ ayylineno++;
amu_return(NEWLINE);
}
}
"#"[^\n]*\n {
/* a comment line includes the terminating \n */
- yylineno++;
+ ayylineno++;
yytext[strlen((char *)yytext)-1] = '\0';
dprintf("%8d: Comment \"%s\"\n", yytext);
}
*/
#ifdef FLEX_SCANNER
-static int yylineno;
+static int ayylineno;
# define INIT_STATE { \
switch ((yy_start - 1) / 2) { \
case 0: \
<F>[^ \t\n"={}]+ { return find_resword(yytext); } /* dummy " */
<F>[ \t] ;
-<F>"\n" { yylineno++; }
+<F>"\n" { ayylineno++; }
<F>[={}] { return *yytext; }
<F>\" { BEGIN Q; optr = ostr; quoted = 1; }
-<Q>\n { yylineno++; yyerror("\" expected"); BEGIN F; }
+<Q>\n { ayylineno++; yyerror("\" expected"); BEGIN F; }
<Q>\\b { *optr++ = '\b'; /* escape */ }
<Q>\\t { *optr++ = '\t'; /* escape */ }
<Q>\\\" { *optr++ = '\"'; /* escape */ }
<Q>\\\\ { *optr++ = '\\'; /* escape */ }
-<Q>\\\n { yylineno++; /* continue */ }
+<Q>\\\n { ayylineno++; /* continue */ }
<Q>\\r { *optr++ = '\r'; /* escape */ }
<Q>\\n { *optr++ = '\n'; /* escape */ }
<Q>\\f { *optr++ = '\f'; /* escape */ }
<Q>"\\ " { *optr++ = ' '; /* force space */ }
<Q>\\. { yyerror("Unknown \\ sequence"); }
-<Q>([ \t]|"\\\n"){2,} { char *p = (char *) yytext-1; while ((p = strchr(p+1, '\n'))) yylineno++; }
+<Q>([ \t]|"\\\n"){2,} { char *p = (char *) yytext-1; while ((p = strchr(p+1, '\n'))) ayylineno++; }
<Q>\" { BEGIN F; quoted = 0;
*optr = '\0';
yylval.s = strdup(ostr);
va_start(ap, fmt);
col_cleanup(0);
- fprintf(stderr, "%s:%d: ", fsi_filename ? fsi_filename : "/dev/stdin", yylineno);
+ fprintf(stderr, "%s:%d: ", fsi_filename ? fsi_filename : "/dev/stdin", ayylineno);
fprintf(stderr, fmt, ap);
fputc('\n', stderr);
parse_errors++;
current_location(void)
{
ioloc *ip = CALLOC(struct ioloc);
- ip->i_line = yylineno;
+ ip->i_line = ayylineno;
ip->i_file = fsi_filename;
return ip;
}