The next little game in the series where I make a fancy rogue game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
roguish/scratchpad/testragel.rl

30 lines
421 B

#include <fmt/core.h>
using namespace fmt;
%%{
machine foo;
main :=
0x1B "["
[0-9]+ @{ println("NUM1"); }
";"
[0-9]+ @{ println("NUM2"); }
"m"
0 @{ res = 1; };
}%%
%% write data;
int main() {
int cs, res = 0;
char *test = "\x1B[36;46m";
char *p = test;
char *pe = p + strlen(p) + 1;
%% write init;
%% write exec;
fmt::println("result = {}", res);
return 0;
}