mojoshader_lexer.c
author Ryan C. Gordon <icculus@icculus.org>
Wed, 18 Feb 2009 14:43:11 -0500
changeset 653 c1eb8cca56f8
parent 649 527cfe6f2d45
child 680 b8db6bedc1bd
permissions -rw-r--r--
Updated re2c-generated code.

/* Generated by re2c 0.13.5 */
/**
 * MojoShader; generate shader programs from bytecode of compiled
 *  Direct3D shaders.
 *
 * Please see the file LICENSE.txt in the source's root directory.
 *
 *  This file written by Ryan C. Gordon.
 */

// This was originally based on examples/pp-c.re from re2c: http://re2c.org/
//   re2c is public domain code.
//
// You build mojoshader_lexer_preprocessor.c from the .re file with re2c...
// re2c -is -o mojoshader_lexer_preprocessor.c mojoshader_lexer_preprocessor.re
//
// Changes to the lexer are done to the .re file, not the C code!
//
// Please note that this isn't a perfect C lexer, since it is used for both
//  HLSL and shader assembly language, and follows the quirks of Microsoft's
//  tools.

#define __MOJOSHADER_INTERNAL__ 1
#include "mojoshader_internal.h"

typedef unsigned char uchar;

#define YYMAXFILL 8
#define RET(t) do { return update_state(s, eoi, cursor, token, t); } while (0)
#define YYCTYPE uchar
#define YYCURSOR cursor
#define YYLIMIT limit
#define YYMARKER s->lexer_marker
#define YYFILL(n) { if ((n) == 1) { cursor = sentinel; limit = cursor + YYMAXFILL; eoi = 1; } }

static uchar sentinel[YYMAXFILL];

static Token update_state(IncludeState *s, int eoi, const uchar *cur,
                          const uchar *tok, const Token val)
{
    if (eoi)
    {
        s->bytes_left = 0;
        s->source = (const char *) s->source_base + s->orig_length;
        if ( (tok >= sentinel) && (tok < (sentinel+YYMAXFILL)) )
            s->token = s->source;
        else
            s->token = (const char *) tok;
    } // if
    else
    {
        s->bytes_left -= (unsigned int) (cur - ((const uchar *) s->source));
        s->source = (const char *) cur;
        s->token = (const char *) tok;
    } // else
    s->tokenlen = (unsigned int) (s->source - s->token);
    s->tokenval = val;
    return val;
} // update_state

Token preprocessor_lexer(IncludeState *s)
{
    const uchar *cursor = (const uchar *) s->source;
    const uchar *token;
    const uchar *matchptr;
    const uchar *limit = cursor + s->bytes_left;
    int eoi = 0;
    int saw_newline = 0;

scanner_loop:
    if (YYLIMIT == YYCURSOR) YYFILL(1);
    token = cursor;




{
	YYCTYPE yych;
	unsigned int yyaccept = 0;

	if ((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
	yych = *YYCURSOR;
	switch (yych) {
	case 0x00:	goto yy60;
	case '\t':
	case '\v':
	case '\f':
	case ' ':	goto yy62;
	case '\n':	goto yy64;
	case '\r':	goto yy66;
	case '!':	goto yy35;
	case '"':	goto yy14;
	case '#':	goto yy37;
	case '%':	goto yy25;
	case '&':	goto yy29;
	case '\'':	goto yy11;
	case '(':	goto yy38;
	case ')':	goto yy40;
	case '*':	goto yy23;
	case '+':	goto yy19;
	case ',':	goto yy46;
	case '-':	goto yy21;
	case '.':	goto yy12;
	case '/':	goto yy4;
	case '0':	goto yy8;
	case '1':
	case '2':
	case '3':
	case '4':
	case '5':
	case '6':
	case '7':
	case '8':
	case '9':	goto yy10;
	case ':':	goto yy50;
	case ';':	goto yy52;
	case '<':	goto yy17;
	case '=':	goto yy33;
	case '>':	goto yy15;
	case '?':	goto yy58;
	case 'A':
	case 'B':
	case 'C':
	case 'D':
	case 'E':
	case 'F':
	case 'G':
	case 'H':
	case 'I':
	case 'J':
	case 'K':
	case 'L':
	case 'M':
	case 'N':
	case 'O':
	case 'P':
	case 'Q':
	case 'R':
	case 'S':
	case 'T':
	case 'U':
	case 'V':
	case 'W':
	case 'X':
	case 'Y':
	case 'Z':
	case '_':
	case 'a':
	case 'b':
	case 'c':
	case 'd':
	case 'e':
	case 'f':
	case 'g':
	case 'h':
	case 'i':
	case 'j':
	case 'k':
	case 'l':
	case 'm':
	case 'n':
	case 'o':
	case 'p':
	case 'q':
	case 'r':
	case 's':
	case 't':
	case 'u':
	case 'v':
	case 'w':
	case 'x':
	case 'y':
	case 'z':	goto yy6;
	case '[':	goto yy42;
	case '\\':	goto yy2;
	case ']':	goto yy44;
	case '^':	goto yy27;
	case '{':	goto yy54;
	case '|':	goto yy31;
	case '}':	goto yy56;
	case '~':	goto yy48;
	default:	goto yy67;
	}
yy2:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych <= 0x08) goto yy3;
	if (yych <= '\r') goto yy233;
	if (yych == ' ') goto yy233;
yy3:
	{ goto bad_chars; }
yy4:
	++YYCURSOR;
	if ((yych = *YYCURSOR) <= '.') {
		if (yych == '*') goto yy230;
	} else {
		if (yych <= '/') goto yy228;
		if (yych == '=') goto yy226;
	}
	{ RET('/'); }
yy6:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy225;
yy7:
	{ RET(TOKEN_IDENTIFIER); }
yy8:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych <= 'X') {
		if (yych <= 'T') {
			if (yych == 'L') goto yy200;
			goto yy216;
		} else {
			if (yych <= 'U') goto yy200;
			if (yych <= 'W') goto yy216;
			goto yy217;
		}
	} else {
		if (yych <= 't') {
			if (yych == 'l') goto yy200;
			goto yy216;
		} else {
			if (yych <= 'u') goto yy200;
			if (yych == 'x') goto yy217;
			goto yy216;
		}
	}
yy9:
	{ RET(TOKEN_INT_LITERAL); }
yy10:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	goto yy198;
yy11:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych == '\n') goto yy3;
	if (yych == '\r') goto yy3;
	goto yy188;
yy12:
	++YYCURSOR;
	if ((yych = *YYCURSOR) <= '/') goto yy13;
	if (yych <= '9') goto yy179;
yy13:
	{ RET('.'); }
yy14:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych == '\n') goto yy3;
	if (yych == '\r') goto yy3;
	goto yy170;
yy15:
	++YYCURSOR;
	if ((yych = *YYCURSOR) <= '<') goto yy16;
	if (yych <= '=') goto yy163;
	if (yych <= '>') goto yy165;
yy16:
	{ RET('>'); }
yy17:
	++YYCURSOR;
	if ((yych = *YYCURSOR) <= ';') goto yy18;
	if (yych <= '<') goto yy159;
	if (yych <= '=') goto yy157;
yy18:
	{ RET('<'); }
yy19:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '+') goto yy153;
	if (yych == '=') goto yy155;
	{ RET('+'); }
yy21:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '-') goto yy149;
	if (yych == '=') goto yy151;
	{ RET('-'); }
yy23:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy147;
	{ RET('*'); }
yy25:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy145;
	{ RET('%'); }
yy27:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy143;
	{ RET('^'); }
yy29:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '&') goto yy139;
	if (yych == '=') goto yy141;
	{ RET('&'); }
yy31:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy137;
	if (yych == '|') goto yy135;
	{ RET('|'); }
yy33:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy133;
	{ RET('='); }
yy35:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy131;
	{ RET('!'); }
yy37:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych <= 'c') {
		if (yych <= 0x1F) {
			if (yych == '\t') goto yy72;
			goto yy3;
		} else {
			if (yych <= ' ') goto yy72;
			if (yych == '#') goto yy79;
			goto yy3;
		}
	} else {
		if (yych <= 'k') {
			if (yych <= 'e') goto yy72;
			if (yych == 'i') goto yy72;
			goto yy3;
		} else {
			if (yych <= 'l') goto yy72;
			if (yych == 'u') goto yy72;
			goto yy3;
		}
	}
yy38:
	++YYCURSOR;
	{ RET('('); }
yy40:
	++YYCURSOR;
	{ RET(')'); }
yy42:
	++YYCURSOR;
	{ RET('['); }
yy44:
	++YYCURSOR;
	{ RET(']'); }
yy46:
	++YYCURSOR;
	{ RET(','); }
yy48:
	++YYCURSOR;
	{ RET('~'); }
yy50:
	++YYCURSOR;
	{ RET(':'); }
yy52:
	++YYCURSOR;
	{ RET(';'); }
yy54:
	++YYCURSOR;
	{ RET('{'); }
yy56:
	++YYCURSOR;
	{ RET('}'); }
yy58:
	++YYCURSOR;
	{ RET('?'); }
yy60:
	++YYCURSOR;
	{ if (eoi) { RET(TOKEN_EOI); } goto bad_chars; }
yy62:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy70;
yy63:
	{ if (s->report_whitespace) RET(' '); goto scanner_loop; }
yy64:
	++YYCURSOR;
yy65:
	{ s->line++; RET('\n'); }
yy66:
	yych = *++YYCURSOR;
	if (yych == '\n') goto yy68;
	goto yy65;
yy67:
	yych = *++YYCURSOR;
	goto yy3;
yy68:
	yych = *++YYCURSOR;
	goto yy65;
yy69:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy70:
	if (yych <= '\n') {
		if (yych == '\t') goto yy69;
		goto yy63;
	} else {
		if (yych <= '\f') goto yy69;
		if (yych == ' ') goto yy69;
		goto yy63;
	}
yy71:
	++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 7) YYFILL(7);
	yych = *YYCURSOR;
yy72:
	if (yych <= 'e') {
		if (yych <= 0x1F) {
			if (yych == '\t') goto yy71;
		} else {
			if (yych <= ' ') goto yy71;
			if (yych <= 'c') goto yy73;
			if (yych <= 'd') goto yy77;
			goto yy74;
		}
	} else {
		if (yych <= 'k') {
			if (yych == 'i') goto yy75;
		} else {
			if (yych <= 'l') goto yy78;
			if (yych == 'u') goto yy76;
		}
	}
yy73:
	YYCURSOR = YYMARKER;
	if (yyaccept <= 1) {
		if (yyaccept <= 0) {
			goto yy3;
		} else {
			goto yy9;
		}
	} else {
		if (yyaccept <= 2) {
			goto yy98;
		} else {
			goto yy181;
		}
	}
yy74:
	yych = *++YYCURSOR;
	if (yych <= 'm') {
		if (yych == 'l') goto yy114;
		goto yy73;
	} else {
		if (yych <= 'n') goto yy115;
		if (yych == 'r') goto yy116;
		goto yy73;
	}
yy75:
	yych = *++YYCURSOR;
	if (yych == 'f') goto yy97;
	if (yych == 'n') goto yy96;
	goto yy73;
yy76:
	yych = *++YYCURSOR;
	if (yych == 'n') goto yy91;
	goto yy73;
yy77:
	yych = *++YYCURSOR;
	if (yych == 'e') goto yy85;
	goto yy73;
yy78:
	yych = *++YYCURSOR;
	if (yych == 'i') goto yy81;
	goto yy73;
yy79:
	++YYCURSOR;
	{ RET(TOKEN_HASHHASH); }
yy81:
	yych = *++YYCURSOR;
	if (yych != 'n') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_LINE); }
yy85:
	yych = *++YYCURSOR;
	if (yych != 'f') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'i') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'n') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_DEFINE); }
yy91:
	yych = *++YYCURSOR;
	if (yych != 'd') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'f') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_UNDEF); }
yy96:
	yych = *++YYCURSOR;
	if (yych == 'c') goto yy108;
	goto yy73;
yy97:
	yyaccept = 2;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych == 'd') goto yy100;
	if (yych == 'n') goto yy99;
yy98:
	{ RET(TOKEN_PP_IF); }
yy99:
	yych = *++YYCURSOR;
	if (yych == 'd') goto yy104;
	goto yy73;
yy100:
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'f') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_IFDEF); }
yy104:
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'f') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_IFNDEF); }
yy108:
	yych = *++YYCURSOR;
	if (yych != 'l') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'u') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'd') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_INCLUDE); }
yy114:
	yych = *++YYCURSOR;
	if (yych == 'i') goto yy125;
	if (yych == 's') goto yy126;
	goto yy73;
yy115:
	yych = *++YYCURSOR;
	if (yych == 'd') goto yy121;
	goto yy73;
yy116:
	yych = *++YYCURSOR;
	if (yych != 'r') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'o') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'r') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_ERROR); }
yy121:
	yych = *++YYCURSOR;
	if (yych != 'i') goto yy73;
	yych = *++YYCURSOR;
	if (yych != 'f') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_ENDIF); }
yy125:
	yych = *++YYCURSOR;
	if (yych == 'f') goto yy129;
	goto yy73;
yy126:
	yych = *++YYCURSOR;
	if (yych != 'e') goto yy73;
	++YYCURSOR;
	{ RET(TOKEN_PP_ELSE); }
yy129:
	++YYCURSOR;
	{ RET(TOKEN_PP_ELIF); }
yy131:
	++YYCURSOR;
	{ RET(TOKEN_NEQ); }
yy133:
	++YYCURSOR;
	{ RET(TOKEN_EQL); }
yy135:
	++YYCURSOR;
	{ RET(TOKEN_OROR); }
yy137:
	++YYCURSOR;
	{ RET(TOKEN_ORASSIGN); }
yy139:
	++YYCURSOR;
	{ RET(TOKEN_ANDAND); }
yy141:
	++YYCURSOR;
	{ RET(TOKEN_ANDASSIGN); }
yy143:
	++YYCURSOR;
	{ RET(TOKEN_XORASSIGN); }
yy145:
	++YYCURSOR;
	{ RET(TOKEN_MODASSIGN); }
yy147:
	++YYCURSOR;
	{ RET(TOKEN_MULTASSIGN); }
yy149:
	++YYCURSOR;
	{ RET(TOKEN_DECREMENT); }
yy151:
	++YYCURSOR;
	{ RET(TOKEN_SUBASSIGN); }
yy153:
	++YYCURSOR;
	{ RET(TOKEN_INCREMENT); }
yy155:
	++YYCURSOR;
	{ RET(TOKEN_ADDASSIGN); }
yy157:
	++YYCURSOR;
	{ RET(TOKEN_LEQ); }
yy159:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy161;
	{ RET(TOKEN_LSHIFT); }
yy161:
	++YYCURSOR;
	{ RET(TOKEN_LSHIFTASSIGN); }
yy163:
	++YYCURSOR;
	{ RET(TOKEN_GEQ); }
yy165:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '=') goto yy167;
	{ RET(TOKEN_RSHIFT); }
yy167:
	++YYCURSOR;
	{ RET(TOKEN_RSHIFTASSIGN); }
yy169:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy170:
	if (yych <= '\r') {
		if (yych == '\n') goto yy73;
		if (yych <= '\f') goto yy169;
		goto yy73;
	} else {
		if (yych <= '"') {
			if (yych <= '!') goto yy169;
			goto yy172;
		} else {
			if (yych != '\\') goto yy169;
		}
	}
yy171:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'b') {
		if (yych <= '7') {
			if (yych <= '&') {
				if (yych == '"') goto yy169;
				goto yy73;
			} else {
				if (yych <= '\'') goto yy169;
				if (yych <= '/') goto yy73;
				goto yy175;
			}
		} else {
			if (yych <= '[') {
				if (yych == '?') goto yy169;
				goto yy73;
			} else {
				if (yych <= '\\') goto yy169;
				if (yych <= '`') goto yy73;
				goto yy169;
			}
		}
	} else {
		if (yych <= 'r') {
			if (yych <= 'm') {
				if (yych == 'f') goto yy169;
				goto yy73;
			} else {
				if (yych <= 'n') goto yy169;
				if (yych <= 'q') goto yy73;
				goto yy169;
			}
		} else {
			if (yych <= 'u') {
				if (yych == 't') goto yy169;
				goto yy73;
			} else {
				if (yych <= 'v') goto yy169;
				if (yych == 'x') goto yy174;
				goto yy73;
			}
		}
	}
yy172:
	++YYCURSOR;
	{ RET(TOKEN_STRING_LITERAL); }
yy174:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '@') {
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy177;
		goto yy73;
	} else {
		if (yych <= 'F') goto yy177;
		if (yych <= '`') goto yy73;
		if (yych <= 'f') goto yy177;
		goto yy73;
	}
yy175:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '!') {
		if (yych <= '\n') {
			if (yych <= '\t') goto yy169;
			goto yy73;
		} else {
			if (yych == '\r') goto yy73;
			goto yy169;
		}
	} else {
		if (yych <= '7') {
			if (yych <= '"') goto yy172;
			if (yych <= '/') goto yy169;
			goto yy175;
		} else {
			if (yych == '\\') goto yy171;
			goto yy169;
		}
	}
yy177:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '/') {
		if (yych <= '\f') {
			if (yych == '\n') goto yy73;
			goto yy169;
		} else {
			if (yych <= '\r') goto yy73;
			if (yych == '"') goto yy172;
			goto yy169;
		}
	} else {
		if (yych <= '[') {
			if (yych <= '9') goto yy177;
			if (yych <= '@') goto yy169;
			if (yych <= 'F') goto yy177;
			goto yy169;
		} else {
			if (yych <= '\\') goto yy171;
			if (yych <= '`') goto yy169;
			if (yych <= 'f') goto yy177;
			goto yy169;
		}
	}
yy179:
	yyaccept = 3;
	YYMARKER = ++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
	yych = *YYCURSOR;
	if (yych <= 'K') {
		if (yych <= 'D') {
			if (yych <= '/') goto yy181;
			if (yych <= '9') goto yy179;
		} else {
			if (yych <= 'E') goto yy182;
			if (yych <= 'F') goto yy183;
		}
	} else {
		if (yych <= 'e') {
			if (yych <= 'L') goto yy183;
			if (yych >= 'e') goto yy182;
		} else {
			if (yych <= 'f') goto yy183;
			if (yych == 'l') goto yy183;
		}
	}
yy181:
	{ RET(TOKEN_FLOAT_LITERAL); }
yy182:
	yych = *++YYCURSOR;
	if (yych <= ',') {
		if (yych == '+') goto yy184;
		goto yy73;
	} else {
		if (yych <= '-') goto yy184;
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy185;
		goto yy73;
	}
yy183:
	yych = *++YYCURSOR;
	goto yy181;
yy184:
	yych = *++YYCURSOR;
	if (yych <= '/') goto yy73;
	if (yych >= ':') goto yy73;
yy185:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'K') {
		if (yych <= '9') {
			if (yych <= '/') goto yy181;
			goto yy185;
		} else {
			if (yych == 'F') goto yy183;
			goto yy181;
		}
	} else {
		if (yych <= 'f') {
			if (yych <= 'L') goto yy183;
			if (yych <= 'e') goto yy181;
			goto yy183;
		} else {
			if (yych == 'l') goto yy183;
			goto yy181;
		}
	}
yy187:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy188:
	if (yych <= '\r') {
		if (yych == '\n') goto yy73;
		if (yych <= '\f') goto yy187;
		goto yy73;
	} else {
		if (yych <= '\'') {
			if (yych <= '&') goto yy187;
			goto yy190;
		} else {
			if (yych != '\\') goto yy187;
		}
	}
yy189:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'b') {
		if (yych <= '7') {
			if (yych <= '&') {
				if (yych == '"') goto yy187;
				goto yy73;
			} else {
				if (yych <= '\'') goto yy187;
				if (yych <= '/') goto yy73;
				goto yy192;
			}
		} else {
			if (yych <= '[') {
				if (yych == '?') goto yy187;
				goto yy73;
			} else {
				if (yych <= '\\') goto yy187;
				if (yych <= '`') goto yy73;
				goto yy187;
			}
		}
	} else {
		if (yych <= 'r') {
			if (yych <= 'm') {
				if (yych == 'f') goto yy187;
				goto yy73;
			} else {
				if (yych <= 'n') goto yy187;
				if (yych <= 'q') goto yy73;
				goto yy187;
			}
		} else {
			if (yych <= 'u') {
				if (yych == 't') goto yy187;
				goto yy73;
			} else {
				if (yych <= 'v') goto yy187;
				if (yych == 'x') goto yy191;
				goto yy73;
			}
		}
	}
yy190:
	yych = *++YYCURSOR;
	goto yy9;
yy191:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '@') {
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy194;
		goto yy73;
	} else {
		if (yych <= 'F') goto yy194;
		if (yych <= '`') goto yy73;
		if (yych <= 'f') goto yy194;
		goto yy73;
	}
yy192:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '&') {
		if (yych <= '\n') {
			if (yych <= '\t') goto yy187;
			goto yy73;
		} else {
			if (yych == '\r') goto yy73;
			goto yy187;
		}
	} else {
		if (yych <= '7') {
			if (yych <= '\'') goto yy190;
			if (yych <= '/') goto yy187;
			goto yy192;
		} else {
			if (yych == '\\') goto yy189;
			goto yy187;
		}
	}
yy194:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '/') {
		if (yych <= '\f') {
			if (yych == '\n') goto yy73;
			goto yy187;
		} else {
			if (yych <= '\r') goto yy73;
			if (yych == '\'') goto yy190;
			goto yy187;
		}
	} else {
		if (yych <= '[') {
			if (yych <= '9') goto yy194;
			if (yych <= '@') goto yy187;
			if (yych <= 'F') goto yy194;
			goto yy187;
		} else {
			if (yych <= '\\') goto yy189;
			if (yych <= '`') goto yy187;
			if (yych <= 'f') goto yy194;
			goto yy187;
		}
	}
yy196:
	yyaccept = 3;
	yych = *(YYMARKER = ++YYCURSOR);
	if (yych == 'E') goto yy207;
	if (yych == 'e') goto yy207;
	goto yy206;
yy197:
	yyaccept = 1;
	YYMARKER = ++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
	yych = *YYCURSOR;
yy198:
	if (yych <= 'L') {
		if (yych <= '9') {
			if (yych == '.') goto yy196;
			if (yych <= '/') goto yy9;
			goto yy197;
		} else {
			if (yych == 'E') goto yy199;
			if (yych <= 'K') goto yy9;
			goto yy200;
		}
	} else {
		if (yych <= 'e') {
			if (yych == 'U') goto yy200;
			if (yych <= 'd') goto yy9;
		} else {
			if (yych <= 'l') {
				if (yych <= 'k') goto yy9;
				goto yy200;
			} else {
				if (yych == 'u') goto yy200;
				goto yy9;
			}
		}
	}
yy199:
	yych = *++YYCURSOR;
	if (yych <= ',') {
		if (yych == '+') goto yy202;
		goto yy73;
	} else {
		if (yych <= '-') goto yy202;
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy203;
		goto yy73;
	}
yy200:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'U') {
		if (yych == 'L') goto yy200;
		if (yych <= 'T') goto yy9;
		goto yy200;
	} else {
		if (yych <= 'l') {
			if (yych <= 'k') goto yy9;
			goto yy200;
		} else {
			if (yych == 'u') goto yy200;
			goto yy9;
		}
	}
yy202:
	yych = *++YYCURSOR;
	if (yych <= '/') goto yy73;
	if (yych >= ':') goto yy73;
yy203:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'K') {
		if (yych <= '9') {
			if (yych <= '/') goto yy181;
			goto yy203;
		} else {
			if (yych == 'F') goto yy183;
			goto yy181;
		}
	} else {
		if (yych <= 'f') {
			if (yych <= 'L') goto yy183;
			if (yych <= 'e') goto yy181;
			goto yy183;
		} else {
			if (yych == 'l') goto yy183;
			goto yy181;
		}
	}
yy205:
	yyaccept = 3;
	YYMARKER = ++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
	yych = *YYCURSOR;
yy206:
	if (yych <= 'K') {
		if (yych <= 'D') {
			if (yych <= '/') goto yy181;
			if (yych <= '9') goto yy205;
			goto yy181;
		} else {
			if (yych <= 'E') goto yy211;
			if (yych <= 'F') goto yy183;
			goto yy181;
		}
	} else {
		if (yych <= 'e') {
			if (yych <= 'L') goto yy183;
			if (yych <= 'd') goto yy181;
			goto yy211;
		} else {
			if (yych <= 'f') goto yy183;
			if (yych == 'l') goto yy183;
			goto yy181;
		}
	}
yy207:
	yych = *++YYCURSOR;
	if (yych <= ',') {
		if (yych != '+') goto yy73;
	} else {
		if (yych <= '-') goto yy208;
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy209;
		goto yy73;
	}
yy208:
	yych = *++YYCURSOR;
	if (yych <= '/') goto yy73;
	if (yych >= ':') goto yy73;
yy209:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'K') {
		if (yych <= '9') {
			if (yych <= '/') goto yy181;
			goto yy209;
		} else {
			if (yych == 'F') goto yy183;
			goto yy181;
		}
	} else {
		if (yych <= 'f') {
			if (yych <= 'L') goto yy183;
			if (yych <= 'e') goto yy181;
			goto yy183;
		} else {
			if (yych == 'l') goto yy183;
			goto yy181;
		}
	}
yy211:
	yych = *++YYCURSOR;
	if (yych <= ',') {
		if (yych != '+') goto yy73;
	} else {
		if (yych <= '-') goto yy212;
		if (yych <= '/') goto yy73;
		if (yych <= '9') goto yy213;
		goto yy73;
	}
yy212:
	yych = *++YYCURSOR;
	if (yych <= '/') goto yy73;
	if (yych >= ':') goto yy73;
yy213:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'K') {
		if (yych <= '9') {
			if (yych <= '/') goto yy181;
			goto yy213;
		} else {
			if (yych == 'F') goto yy183;
			goto yy181;
		}
	} else {
		if (yych <= 'f') {
			if (yych <= 'L') goto yy183;
			if (yych <= 'e') goto yy181;
			goto yy183;
		} else {
			if (yych == 'l') goto yy183;
			goto yy181;
		}
	}
yy215:
	yyaccept = 1;
	YYMARKER = ++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
	yych = *YYCURSOR;
yy216:
	if (yych <= 'L') {
		if (yych <= '9') {
			if (yych == '.') goto yy196;
			if (yych <= '/') goto yy9;
			goto yy215;
		} else {
			if (yych == 'E') goto yy199;
			if (yych <= 'K') goto yy9;
			goto yy222;
		}
	} else {
		if (yych <= 'e') {
			if (yych == 'U') goto yy222;
			if (yych <= 'd') goto yy9;
			goto yy199;
		} else {
			if (yych <= 'l') {
				if (yych <= 'k') goto yy9;
				goto yy222;
			} else {
				if (yych == 'u') goto yy222;
				goto yy9;
			}
		}
	}
yy217:
	yych = *++YYCURSOR;
	if (yych <= '@') {
		if (yych <= '/') goto yy73;
		if (yych >= ':') goto yy73;
	} else {
		if (yych <= 'F') goto yy218;
		if (yych <= '`') goto yy73;
		if (yych >= 'g') goto yy73;
	}
yy218:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'T') {
		if (yych <= '@') {
			if (yych <= '/') goto yy9;
			if (yych <= '9') goto yy218;
			goto yy9;
		} else {
			if (yych <= 'F') goto yy218;
			if (yych != 'L') goto yy9;
		}
	} else {
		if (yych <= 'k') {
			if (yych <= 'U') goto yy220;
			if (yych <= '`') goto yy9;
			if (yych <= 'f') goto yy218;
			goto yy9;
		} else {
			if (yych <= 'l') goto yy220;
			if (yych != 'u') goto yy9;
		}
	}
yy220:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'U') {
		if (yych == 'L') goto yy220;
		if (yych <= 'T') goto yy9;
		goto yy220;
	} else {
		if (yych <= 'l') {
			if (yych <= 'k') goto yy9;
			goto yy220;
		} else {
			if (yych == 'u') goto yy220;
			goto yy9;
		}
	}
yy222:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= 'U') {
		if (yych == 'L') goto yy222;
		if (yych <= 'T') goto yy9;
		goto yy222;
	} else {
		if (yych <= 'l') {
			if (yych <= 'k') goto yy9;
			goto yy222;
		} else {
			if (yych == 'u') goto yy222;
			goto yy9;
		}
	}
yy224:
	++YYCURSOR;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy225:
	if (yych <= 'Z') {
		if (yych <= '/') goto yy7;
		if (yych <= '9') goto yy224;
		if (yych <= '@') goto yy7;
		goto yy224;
	} else {
		if (yych <= '_') {
			if (yych <= '^') goto yy7;
			goto yy224;
		} else {
			if (yych <= '`') goto yy7;
			if (yych <= 'z') goto yy224;
			goto yy7;
		}
	}
yy226:
	++YYCURSOR;
	{ RET(TOKEN_DIVASSIGN); }
yy228:
	++YYCURSOR;
	{ goto singlelinecomment; }
yy230:
	++YYCURSOR;
	{ goto multilinecomment; }
yy232:
	++YYCURSOR;
	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
	yych = *YYCURSOR;
yy233:
	if (yych <= '\f') {
		if (yych <= 0x08) goto yy73;
		if (yych != '\n') goto yy232;
	} else {
		if (yych <= '\r') goto yy236;
		if (yych == ' ') goto yy232;
		goto yy73;
	}
yy234:
	++YYCURSOR;
yy235:
	{ s->line++; goto scanner_loop; }
yy236:
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '\n') goto yy234;
	goto yy235;
}


multilinecomment:
    if (YYLIMIT == YYCURSOR) YYFILL(1);
    matchptr = cursor;
// The "*\/" is just to avoid screwing up text editor syntax highlighting.

{
	YYCTYPE yych;
	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
	yych = *YYCURSOR;
	if (yych <= '\f') {
		if (yych <= 0x00) goto yy244;
		if (yych == '\n') goto yy241;
		goto yy246;
	} else {
		if (yych <= '\r') goto yy243;
		if (yych != '*') goto yy246;
	}
	++YYCURSOR;
	if ((yych = *YYCURSOR) == '/') goto yy248;
yy240:
	{ goto multilinecomment; }
yy241:
	++YYCURSOR;
yy242:
	{
                        s->line++;
                        token = matchptr;
                        saw_newline = 1;
                        goto multilinecomment;
                    }
yy243:
	yych = *++YYCURSOR;
	if (yych == '\n') goto yy247;
	goto yy242;
yy244:
	++YYCURSOR;
	{
                        if (eoi)
                            RET(TOKEN_INCOMPLETE_COMMENT);
                        goto multilinecomment;
                    }
yy246:
	yych = *++YYCURSOR;
	goto yy240;
yy247:
	yych = *++YYCURSOR;
	goto yy242;
yy248:
	++YYCURSOR;
	{
                        if (saw_newline)
                            RET('\n');
                        else if (s->report_whitespace)
                            RET(' ');
                        goto scanner_loop;
                    }
}


singlelinecomment:
    if (YYLIMIT == YYCURSOR) YYFILL(1);
    matchptr = cursor;

{
	YYCTYPE yych;
	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
	yych = *YYCURSOR;
	if (yych <= '\n') {
		if (yych <= 0x00) goto yy255;
		if (yych <= '\t') goto yy257;
	} else {
		if (yych == '\r') goto yy254;
		goto yy257;
	}
	++YYCURSOR;
yy253:
	{ s->line++; token = matchptr; RET('\n'); }
yy254:
	yych = *++YYCURSOR;
	if (yych == '\n') goto yy259;
	goto yy253;
yy255:
	++YYCURSOR;
	{ if (eoi) { RET(TOKEN_EOI); } goto singlelinecomment; }
yy257:
	++YYCURSOR;
	{ goto singlelinecomment; }
yy259:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy253;
}


bad_chars:
    if (YYLIMIT == YYCURSOR) YYFILL(1);

{
	YYCTYPE yych;
	if (YYLIMIT <= YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if (yych <= '#') {
		if (yych <= '\r') {
			if (yych <= 0x00) goto yy264;
			if (yych <= 0x08) goto yy266;
		} else {
			if (yych <= 0x1F) goto yy266;
			if (yych == '"') goto yy266;
		}
	} else {
		if (yych <= '@') {
			if (yych <= '$') goto yy266;
			if (yych >= '@') goto yy266;
		} else {
			if (yych == '`') goto yy266;
			if (yych >= 0x7F) goto yy266;
		}
	}
	++YYCURSOR;
	{ cursor--; RET(TOKEN_BAD_CHARS); }
yy264:
	++YYCURSOR;
	{
                        if (eoi)
                        {
                            assert( !((token >= sentinel) &&
                                     (token < sentinel+YYMAXFILL)) );
                            eoi = 0;
                            cursor = (uchar *) s->source_base + s->orig_length;
                            RET(TOKEN_BAD_CHARS);  // next call will be EOI.
                        }
                        goto bad_chars;
                    }
yy266:
	++YYCURSOR;
	{ goto bad_chars; }
}


    assert(0 && "Shouldn't hit this code");
    RET(TOKEN_UNKNOWN);
} // preprocessor_lexer

// end of mojoshader_lexer_preprocessor.re (or .c) ...