diff options
Diffstat (limited to 'src/lex.c')
-rw-r--r-- | src/lex.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -157,23 +157,23 @@ int yylex() { ret = WORD; if (!linelim || isfunc) { if (isfunc) isfunc--; - for (tblp = linelim ? experres : statres; tblp->key; tblp++) - if (((tblp->key[0]^tokenst[0])&0137)==0 - && tblp->key[tokenl]==0) { - int i = 1; - while (i<tokenl && ((tokenst[i]^tblp->key[i])&0137)==0) - i++; - if (i >= tokenl) { - ret = tblp->val; - colstate = (ret <= S_FORMAT); - if (isgoto) { - isfunc = isgoto = 0; - if (ret != K_ERROR && ret != K_INVALID) - ret = WORD; + for (tblp = linelim ? experres : statres; tblp->key; tblp++) { + if (((tblp->key[0]^tokenst[0])&0137)==0) { + int i = 1; + while (tblp->key[i] && i<tokenl && ((tokenst[i]^tblp->key[i])&0137)==0) + i++; + if (i >= tokenl && tblp->key[i] == '\0') { + ret = tblp->val; + colstate = (ret <= S_FORMAT); + if (isgoto) { + isfunc = isgoto = 0; + if (ret != K_ERROR && ret != K_INVALID) + ret = WORD; } break; } } + } } if (ret == WORD) { |