mirror of https://github.com/vitalif/lime
Allow to use multi-character tokens
parent
ddc9d8bf0a
commit
4d36b778a9
|
@ -21,7 +21,7 @@ action : $$ = new lime_action($1, NULL);
|
||||||
action lambda : $$ = new lime_action($1, $2);
|
action lambda : $$ = new lime_action($1, $2);
|
||||||
sym : $$ = new lime_glyph($1, NULL);
|
sym : $$ = new lime_glyph($1, NULL);
|
||||||
sym lambda : $$ = new lime_glyph($1, $2);
|
sym lambda : $$ = new lime_glyph($1, $2);
|
||||||
lit : $$ = new lime_glyph($1, NULL);
|
str : $$ = new lime_glyph(substr($1, 1, -1), NULL);
|
||||||
to slot
|
to slot
|
||||||
: $$ = new lime_rhs();
|
: $$ = new lime_rhs();
|
||||||
rhs slot : $$->add($2);
|
rhs slot : $$->add($2);
|
||||||
|
|
BIN
lime_scan_tokens
BIN
lime_scan_tokens
Binary file not shown.
|
@ -59,7 +59,8 @@ BLOCKCMT "/*"({CC}|{CX})*{CT}
|
||||||
|
|
||||||
{STOP} out("stop", ".");
|
{STOP} out("stop", ".");
|
||||||
{SYM} tok("sym");
|
{SYM} tok("sym");
|
||||||
{LIT} tok("lit");
|
\"{DCHAR}*\" tok("str");
|
||||||
|
'{SCHAR}*' tok("str");
|
||||||
{BLOCKCMT} {}
|
{BLOCKCMT} {}
|
||||||
"/"{WORD}+ |
|
"/"{WORD}+ |
|
||||||
"/$" out("lambda", yytext+1);
|
"/$" out("lambda", yytext+1);
|
||||||
|
|
Loading…
Reference in New Issue