]> mj.ucw.cz Git - umpf.git/blobdiff - lex.c
add arrow and .
[umpf.git] / lex.c
diff --git a/lex.c b/lex.c
index 35b5b00f67073f012ad45ad9f68e72fb75610a88..9b48b680868efbd977aaee773d7c5dd31ca6c816 100644 (file)
--- a/lex.c
+++ b/lex.c
@@ -5,7 +5,7 @@
 #include <stdarg.h>
 
 #include "cond.tab.h"
-
+#include "lex.h"
 #define BUFSIZE 4096
 #define KLEN 10 
 
@@ -14,9 +14,7 @@ struct keys {
        enum yytokentype keytoks;
 };
 
-static int line;
-
-static struct keys k[] = 
+static struct keys kwds[] = 
        {       {"copy", KW_COPY},
                {"else", KW_ELSE},
                {"if", KW_IF}, 
@@ -200,10 +198,10 @@ yylex(void)
                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);