1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
%%{ machine css_parser; alphtype unsigned char; include css_syntax "css_syntax.rl"; main := declaration; }%% %% write data; #include <cstddef> namespace rspamd::css { int foo (const unsigned char *data, std::size_t len) { const unsigned char *p = data, *pe = data + len, *eof; int cs; %% write init; %% write exec; return cs; } }