summaryrefslogtreecommitdiffabout
path: root/lib/forlanlex.l
authorSergey Poznyakoff <gray@gnu.org.ua>2012-09-24 11:26:41 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2012-09-24 11:26:41 (GMT)
commit5424ff2a0969b31f84690cd19bea4e363d32e63a (patch) (side-by-side diff)
treec741147fb66b4e1acc6e0a2fb7c10cc1b76dead8 /lib/forlanlex.l
parent546c03672b5b8044dbca0814eac8cbdddb898183 (diff)
downloadeclat-5424ff2a0969b31f84690cd19bea4e363d32e63a.tar.gz
eclat-5424ff2a0969b31f84690cd19bea4e363d32e63a.tar.bz2
Implement loops and variables
* lib/forlan.c: Implement loops and variables. * lib/forlangrm.y: Likewise. * lib/forlanlex.l: Likewise. * lib/forlan.h (forlan_parse): Change return type. (forlan_type): New types. (forlan_dump_tree): Change signature. (forlan_value_type) <forlan_value_boolean>: New type. * tests/tforlan.c: Update.
Diffstat (limited to 'lib/forlanlex.l') (more/less context) (ignore whitespace changes)
-rw-r--r--lib/forlanlex.l7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/forlanlex.l b/lib/forlanlex.l
index 99966ed..e3f9f26 100644
--- a/lib/forlanlex.l
+++ b/lib/forlanlex.l
@@ -66,6 +66,11 @@ IDC [a-zA-Z_0-9-]
if return IF;
else return ELSE;
last return LAST;
+for return FOR;
+let return LET;
+in return IN;
+break return BREAK;
+continue return CONTINUE;
! return NOT;
"&&" return AND;
"||" return OR;
@@ -98,7 +103,7 @@ last return LAST;
/* Other tokens */
{WS} ;
\n { grecs_locus_point_advance_line(grecs_current_locus_point); }
-[.,;{}()\[\]] return yytext[0];
+[.,;{}()\[\]=\*%] return yytext[0];
. { if (isascii(yytext[0]) && isprint(yytext[0]))
grecs_error(&yylloc, 0,
_("stray character %c"), yytext[0]);

Return to:

Send suggestions and report system problems to the System administrator.