summaryrefslogtreecommitdiffstats
path: root/src/lex.c
diff options
context:
space:
mode:
authormongo <mongo@iomega>2016-11-09 15:54:36 -0300
committermongo <mongo@iomega>2016-11-09 15:54:36 -0300
commit8f3aff4467a4890a45d14c7891d47ba123fc0d90 (patch)
treeb3b1c1ed8c9d38f4110d7cec53b4596871093838 /src/lex.c
parent79437fb1d68e1c464a8817cc8ad63b7eaceb6ce4 (diff)
Added set to gram.y
Diffstat (limited to 'src/lex.c')
-rw-r--r--src/lex.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lex.c b/src/lex.c
index 1cb5005..1220f4e 100644
--- a/src/lex.c
+++ b/src/lex.c
@@ -16,6 +16,7 @@
#include "lex.h"
#include "sc.h"
#include "conf.h"
+#include "utils/string.h"
typedef int bool;
enum { false, true };
@@ -154,16 +155,17 @@ int yylex() {
if (*ptr) *ptr = '\0';
ret = MAPWORD;
-
} else {
struct range * r;
- if (!find_range(tokenst, tokenl, (struct ent *)0, (struct ent *)0, &r)) {
+ if (! find_range(tokenst, tokenl, (struct ent *)0, (struct ent *)0, &r)) {
yylval.rval.left = r->r_left;
yylval.rval.right = r->r_right;
if (r->r_is_range)
ret = RANGE;
else
ret = VAR;
+ } else if ( str_in_str(line, ":") == -1) {
+ yylval.sval = tokenst;
} else {
linelim = p-line;
yyerror("Unintelligible word");
@@ -266,7 +268,7 @@ int yylex() {
if (*p)
p++;
ret = STRING;
-
+
} else if (*p=='[') {
while (*p && *p!=']')
p++;
@@ -331,7 +333,7 @@ int plugin_exists(char *name, int len, char *path) {
* length, convert column name ("A"-"Z" or "AA"-"ZZ") to a column number (0-N).
* Never mind if the column number is illegal (too high). The procedure's name
* and function are the inverse of coltoa().
- *
+ *
* Case-insensitivity is done crudely, by ignoring the 040 bit.
*/