/* Generated by re2c */
// re2c $INPUT -o $OUTPUT -ci
#include <stdio.h>

enum YYCONDTYPE {
	yycinit,
	yycC2
};


int test(const char* str)
{
    const unsigned char* YYCURSOR = (const unsigned char*)str;
    const unsigned char* YYMARKER;
    const unsigned char *YYCTXMARKER;
    int c = yycinit;

    
{
	unsigned char yych;
	switch (c) {
		case yycinit: goto yyc_init;
		case yycC2: goto yyc_C2;
	}
/* *********************************** */
yyc_init:
	yych = *YYCURSOR;
	switch (yych) {
		case 'A': goto yy2;
		default: goto yy1;
	}
yy1:
	++YYCURSOR;
	{ return 0; }
yy2:
	++YYCURSOR;
	c = yycC2;
	goto yyc_C2;
/* *********************************** */
yyc_C2:
	yych = *YYCURSOR;
	switch (yych) {
		case 'B': goto yy5;
		default: goto yy4;
	}
yy4:
	++YYCURSOR;
	{ return 0; }
yy5:
	++YYCURSOR;
	{ return 1; }
}

}

int main()
{
    printf("%d\n", test("AB"));
    return 0;
}
