#include 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; }