Allow to use multi-character tokens

master
Vitaliy Filippov 2013-04-20 14:06:54 +04:00
parent ddc9d8bf0a
commit 4d36b778a9
3 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@ action : $$ = new lime_action($1, NULL);
action lambda : $$ = new lime_action($1, $2);
sym : $$ = new lime_glyph($1, NULL);
sym lambda : $$ = new lime_glyph($1, $2);
lit : $$ = new lime_glyph($1, NULL);
str : $$ = new lime_glyph(substr($1, 1, -1), NULL);
to slot
: $$ = new lime_rhs();
rhs slot : $$->add($2);

Binary file not shown.

View File

@ -59,7 +59,8 @@ BLOCKCMT "/*"({CC}|{CX})*{CT}
{STOP} out("stop", ".");
{SYM} tok("sym");
{LIT} tok("lit");
\"{DCHAR}*\" tok("str");
'{SCHAR}*' tok("str");
{BLOCKCMT} {}
"/"{WORD}+ |
"/$" out("lambda", yytext+1);