#include <stdarg.h>
#include "cond.tab.h"
-
+#include "lex.h"
#define BUFSIZE 4096
#define KLEN 10
enum yytokentype keytoks;
};
-static int line;
-
-static struct keys k[] =
+static struct keys kwds[] =
{ {"copy", KW_COPY},
{"else", KW_ELSE},
{"if", KW_IF},
buf[i] = 0;
ungetc(c,stdin);
- n = (sizeof(k)/sizeof(struct keys));
+ n = (sizeof(kwds)/sizeof(struct keys));
for (i = 0; i < n; i++){
- if (!strcmp(buf,k[i].keywords))
- return k[i].keytoks;
+ if (!strcmp(buf,kwds[i].keywords))
+ return kwds[i].keytoks;
}
parse_err("Unknown keyword %s", buf);