diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-09-24 14:26:41 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2012-09-24 14:26:41 +0300 |
commit | 5424ff2a0969b31f84690cd19bea4e363d32e63a (patch) | |
tree | c741147fb66b4e1acc6e0a2fb7c10cc1b76dead8 /lib/forlanlex.l | |
parent | 546c03672b5b8044dbca0814eac8cbdddb898183 (diff) | |
download | eclat-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')
-rw-r--r-- | lib/forlanlex.l | 7 |
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]); |