/* Generated by re2c */
#line 1 "bug57.re"
// re2c $INPUT -o $OUTPUT 
#include <stdio.h>

int scan(const char *p)
{
#define YYCTYPE char
    const char *YYCURSOR = p;
    const char *YYMARKER;


#line 14 "bug57.c"
{
	YYCTYPE yych;
	unsigned int yyaccept = 0;
	yych = *YYCURSOR;
	switch (yych) {
		case '\n': goto yy1;
		case '<': goto yy4;
		case '\\': goto yy5;
		case 'a': goto yy6;
		default: goto yy2;
	}
yy1:
#line 16 "bug57.re"
	{ return YYCURSOR - p; }
#line 29 "bug57.c"
yy2:
	++YYCURSOR;
yy3:
#line 17 "bug57.re"
	{ return 0; }
#line 35 "bug57.c"
yy4:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case '>': goto yy7;
		case '\\': goto yy8;
		case 'x':
		case 'y': goto yy10;
		default: goto yy3;
	}
yy5:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'b': goto yy6;
		default: goto yy3;
	}
yy6:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
		case '\\': goto yy11;
		case 'a': goto yy6;
		default: goto yy1;
	}
yy7:
	++YYCURSOR;
#line 15 "bug57.re"
	{ return YYCURSOR - p; }
#line 64 "bug57.c"
yy8:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'b': goto yy10;
		default: goto yy9;
	}
yy9:
	YYCURSOR = YYMARKER;
	if (yyaccept == 0) goto yy3;
	else goto yy1;
yy10:
	yych = *++YYCURSOR;
	switch (yych) {
		case '>': goto yy7;
		case '\\': goto yy8;
		case 'x':
		case 'y': goto yy10;
		default: goto yy9;
	}
yy11:
	yych = *++YYCURSOR;
	switch (yych) {
		case 'b': goto yy6;
		default: goto yy9;
	}
}
#line 18 "bug57.re"

}

int main()
{
    const char *str = "aaa\\baaa";
    int res = scan(str);
    printf("%d: %s\n", res, str + res);
    return 0;
}

bug57.re:16:26: warning: rule matches empty string [-Wmatch-empty-string]
