/* Generated by re2c */
#line 1 "c/reuse/usedir.re"
// re2c $INPUT -o $OUTPUT

// This example shows how to combine reusable re2c blocks: two blocks
// ('colors' and 'fish') are merged into one. The 'salmon' rule occurs
// in both blocks; the 'fish' block takes priority because it is used
// earlier. Default rule * occurs in all three blocks; the local (not
// inherited) definition takes priority.

#include <assert.h>

enum What { COLOR, FISH, DUNNO };

#line 16 "c/reuse/usedir.re"


#line 21 "c/reuse/usedir.re"


static What lex(const char *YYCURSOR)
{
    const char *YYMARKER;
    
#line 26 "c/reuse/usedir.c"
{
	char yych;
	yych = *YYCURSOR;
	switch (yych) {
	case 'e':	goto yy4;
	case 'h':	goto yy5;
	case 'm':	goto yy6;
	case 'r':	goto yy7;
	case 's':	goto yy8;
	default:	goto yy2;
	}
yy2:
	++YYCURSOR;
yy3:
#line 32 "c/reuse/usedir.re"
	{ return DUNNO; }
#line 43 "c/reuse/usedir.c"
yy4:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
	case 'e':	goto yy9;
	default:	goto yy3;
	}
yy5:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
	case 'a':	goto yy11;
	default:	goto yy3;
	}
yy6:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
	case 'a':	goto yy12;
	default:	goto yy3;
	}
yy7:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
	case 'e':	goto yy13;
	default:	goto yy3;
	}
yy8:
	yych = *(YYMARKER = ++YYCURSOR);
	switch (yych) {
	case 'a':	goto yy14;
	default:	goto yy3;
	}
yy9:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'l':	goto yy15;
	default:	goto yy10;
	}
yy10:
	YYCURSOR = YYMARKER;
	goto yy3;
yy11:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'd':	goto yy17;
	default:	goto yy10;
	}
yy12:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'g':	goto yy18;
	default:	goto yy10;
	}
yy13:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'd':	goto yy19;
	default:	goto yy10;
	}
yy14:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'l':	goto yy21;
	default:	goto yy10;
	}
yy15:
	++YYCURSOR;
#line 20 "c/reuse/usedir.re"
	{ return FISH; }
#line 111 "c/reuse/usedir.c"
yy17:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'd':	goto yy22;
	default:	goto yy10;
	}
yy18:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'e':	goto yy23;
	default:	goto yy10;
	}
yy19:
	++YYCURSOR;
#line 15 "c/reuse/usedir.re"
	{ return COLOR; }
#line 128 "c/reuse/usedir.c"
yy21:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'm':	goto yy24;
	default:	goto yy10;
	}
yy22:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'o':	goto yy25;
	default:	goto yy10;
	}
yy23:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'n':	goto yy26;
	default:	goto yy10;
	}
yy24:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'o':	goto yy27;
	default:	goto yy10;
	}
yy25:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'c':	goto yy28;
	default:	goto yy10;
	}
yy26:
	yych = *++YYCURSOR;
	switch (yych) {
	case 't':	goto yy29;
	default:	goto yy10;
	}
yy27:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'n':	goto yy15;
	default:	goto yy10;
	}
yy28:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'k':	goto yy15;
	default:	goto yy10;
	}
yy29:
	yych = *++YYCURSOR;
	switch (yych) {
	case 'a':	goto yy19;
	default:	goto yy10;
	}
}
#line 33 "c/reuse/usedir.re"

}

int main()
{
    assert(lex("salmon") == FISH);
    assert(lex("what?") == DUNNO);
    return 0;
}
