unsigned /* flags */
);
-extern void yyerror(const char * /* s */
+extern void yyerror(const char * /* msg */
);
-extern int yylex(void);
-extern int yyparse(void);
-
extern void setScanState(const char * /* file */ ,
int /* line */
);
-extern FILE *yyin;
-extern const char *yystring;
-
#endif /* XKBPARSE_H */
#include "utils.h"
#include "parseutils.h"
-const char *yystring;
char *scanFile = NULL;
int lineNum = 0;
static char *s;
char scanBuf[1024];
-#define BUFSIZE 4096
+extern int yyparse(void);
%}
%option case-insensitive
%option yylineno
%option noyywrap
+%option never-interactive
+%option noinput
+%option nounput
%x S_STR S_KEY
%%
void
-yyerror(const char *s)
+yyerror(const char *msg)
{
if (warningLevel>0) {
- (void)fprintf(stderr,"%s: line %d of %s\n",s,yylineno,
- (scanFile?scanFile:"(unknown)"));
- if ((warningLevel>3))
- (void)fprintf(stderr,"last scanned symbol is: %s\n",scanBuf);
+ fprintf(stderr,"%s: line %d of %s\n",msg,yylineno,
+ (scanFile?scanFile:"(unknown)"));
+ if (warningLevel>3)
+ fprintf(stderr,"last scanned symbol is: %s\n",scanBuf);
}
return;
}
if (file)
{
yyin = file;
- yystring = NULL;
rtrnValue = NULL;
if (yyparse() == 0)
{