mojoshader_lexer.c
author Ryan C. Gordon <icculus@icculus.org>
Fri, 13 Feb 2009 00:37:26 -0500
changeset 600 f42d58194dc1
parent 584 9aea8877564d
child 602 9c976d7465bf
permissions -rw-r--r--
Updated build of mojoshader_lexer.c ...

/* Generated by re2c 0.12.1 on Fri Feb 13 00:36:29 2009 */
/**
 * 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 RET(t) do { update_state(s, cursor, token); return t; } while (0)
#define YYCTYPE uchar
#define YYCURSOR cursor
#define YYLIMIT limit
#define YYMARKER s->lexer_marker
#define YYFILL(n) { if ((n) == 1) { RET(TOKEN_EOI); } }

static void update_state(IncludeState *s, const uchar *cur, const uchar *tok)
{
    s->bytes_left -= (unsigned int) (cur - ((const uchar *) s->source));
    s->source = (const char *) cur;
    s->token = (const char *) tok;
} // update_state

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

scanner_loop:
    token = cursor;

    if (YYLIMIT == YYCURSOR)
        RET(TOKEN_EOI);




{
	YYCTYPE yych;
	unsigned int yyaccept = 0;

	if((YYLIMIT - YYCURSOR) < 8) YYFILL(8);
	yych = *YYCURSOR;
	switch(yych) {
	case 0x09:
	case 0x0B:
	case 0x0C:
	case ' ':	goto yy62;
	case 0x0A:	goto yy64;
	case 0x0D:	goto yy66;
	case '!':	goto yy34;
	case '"':	goto yy13;
	case '#':	goto yy36;
	case '%':	goto yy24;
	case '&':	goto yy28;
	case '\'':	goto yy9;
	case '(':	goto yy38;
	case ')':	goto yy40;
	case '*':	goto yy22;
	case '+':	goto yy18;
	case ',':	goto yy46;
	case '-':	goto yy20;
	case '.':	goto yy11;
	case '/':	goto yy2;
	case '0':	goto yy6;
	case '1':
	case '2':
	case '3':
	case '4':
	case '5':
	case '6':
	case '7':
	case '8':
	case '9':	goto yy8;
	case ':':	goto yy50;
	case ';':	goto yy52;
	case '<':	goto yy16;
	case '=':	goto yy32;
	case '>':	goto yy14;
	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 yy4;
	case '[':	goto yy42;
	case '\\':	goto yy60;
	case ']':	goto yy44;
	case '^':	goto yy26;
	case '{':	goto yy54;
	case '|':	goto yy30;
	case '}':	goto yy56;
	case '~':	goto yy48;
	default:	goto yy67;
	}
yy2:
	++YYCURSOR;
	if((yych = *YYCURSOR) <= '.') {
		if(yych == '*') goto yy230;
	} else {
		if(yych <= '/') goto yy228;
		if(yych == '=') goto yy226;
	}
	{ RET('/'); }
yy4:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy225;
yy5:
	{ RET(TOKEN_IDENTIFIER); }
yy6:
	yyaccept = 0;
	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;
		}
	}
yy7:
	{ RET(TOKEN_INT_LITERAL); }
yy8:
	yyaccept = 0;
	yych = *(YYMARKER = ++YYCURSOR);
	goto yy198;
yy9:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	if(yych == 0x0A) goto yy10;
	if(yych != 0x0D) goto yy188;
yy10:
	{ goto bad_chars; }
yy11:
	++YYCURSOR;
	if((yych = *YYCURSOR) <= '/') goto yy12;
	if(yych <= '9') goto yy179;
yy12:
	{ RET('.'); }
yy13:
	yyaccept = 1;
	yych = *(YYMARKER = ++YYCURSOR);
	if(yych == 0x0A) goto yy10;
	if(yych == 0x0D) goto yy10;
	goto yy170;
yy14:
	++YYCURSOR;
	if((yych = *YYCURSOR) <= '<') goto yy15;
	if(yych <= '=') goto yy163;
	if(yych <= '>') goto yy165;
yy15:
	{ RET('>'); }
yy16:
	++YYCURSOR;
	if((yych = *YYCURSOR) <= ';') goto yy17;
	if(yych <= '<') goto yy159;
	if(yych <= '=') goto yy157;
yy17:
	{ RET('<'); }
yy18:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '+') goto yy153;
	if(yych == '=') goto yy155;
	{ RET('+'); }
yy20:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '-') goto yy149;
	if(yych == '=') goto yy151;
	{ RET('-'); }
yy22:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy147;
	{ RET('*'); }
yy24:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy145;
	{ RET('%'); }
yy26:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy143;
	{ RET('^'); }
yy28:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '&') goto yy139;
	if(yych == '=') goto yy141;
	{ RET('&'); }
yy30:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy137;
	if(yych == '|') goto yy135;
	{ RET('|'); }
yy32:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy133;
	{ RET('='); }
yy34:
	++YYCURSOR;
	if((yych = *YYCURSOR) == '=') goto yy131;
	{ RET('!'); }
yy36:
	yyaccept = 2;
	yych = *(YYMARKER = ++YYCURSOR);
	if(yych <= 'c') {
		if(yych <= 0x1F) {
			if(yych == 0x09) goto yy72;
		} else {
			if(yych <= ' ') goto yy72;
			if(yych == '#') goto yy79;
		}
	} else {
		if(yych <= 'k') {
			if(yych <= 'e') goto yy72;
			if(yych == 'i') goto yy72;
		} else {
			if(yych <= 'l') goto yy72;
			if(yych == 'u') goto yy72;
		}
	}
yy37:
	{ RET('#'); }
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;
	{ RET('\\'); }
yy62:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy70;
yy63:
	{ goto scanner_loop; }
yy64:
	++YYCURSOR;
yy65:
	{ s->line++; RET('\n'); }
yy66:
	yych = *++YYCURSOR;
	if(yych == 0x0A) goto yy68;
	goto yy65;
yy67:
	yych = *++YYCURSOR;
	goto yy10;
yy68:
	yych = *++YYCURSOR;
	goto yy65;
yy69:
	++YYCURSOR;
	if(YYLIMIT == YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy70:
	if(yych <= 0x0A) {
		if(yych == 0x09) goto yy69;
		goto yy63;
	} else {
		if(yych <= 0x0C) 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 == 0x09) 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 <= 2) {
		if(yyaccept <= 1) {
			if(yyaccept <= 0) {
				goto yy7;
			} else {
				goto yy10;
			}
		} else {
			goto yy37;
		}
	} else {
		if(yyaccept <= 3) {
			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 = 3;
	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 <= 0x0D) {
		if(yych == 0x0A) goto yy73;
		if(yych <= 0x0C) 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 <= 0x0A) {
			if(yych <= 0x09) goto yy169;
			goto yy73;
		} else {
			if(yych == 0x0D) 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 <= 0x0C) {
			if(yych == 0x0A) goto yy73;
			goto yy169;
		} else {
			if(yych <= 0x0D) 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 = 4;
	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 <= 0x0D) {
		if(yych == 0x0A) goto yy73;
		if(yych <= 0x0C) 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 yy7;
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 <= 0x0A) {
			if(yych <= 0x09) goto yy187;
			goto yy73;
		} else {
			if(yych == 0x0D) 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 <= 0x0C) {
			if(yych == 0x0A) goto yy73;
			goto yy187;
		} else {
			if(yych <= 0x0D) 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 = 4;
	yych = *(YYMARKER = ++YYCURSOR);
	if(yych == 'E') goto yy207;
	if(yych == 'e') goto yy207;
	goto yy206;
yy197:
	yyaccept = 0;
	YYMARKER = ++YYCURSOR;
	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
	yych = *YYCURSOR;
yy198:
	if(yych <= 'L') {
		if(yych <= '9') {
			if(yych == '.') goto yy196;
			if(yych <= '/') goto yy7;
			goto yy197;
		} else {
			if(yych == 'E') goto yy199;
			if(yych <= 'K') goto yy7;
			goto yy200;
		}
	} else {
		if(yych <= 'e') {
			if(yych == 'U') goto yy200;
			if(yych <= 'd') goto yy7;
		} else {
			if(yych <= 'l') {
				if(yych <= 'k') goto yy7;
				goto yy200;
			} else {
				if(yych == 'u') goto yy200;
				goto yy7;
			}
		}
	}
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 yy7;
		goto yy200;
	} else {
		if(yych <= 'l') {
			if(yych <= 'k') goto yy7;
			goto yy200;
		} else {
			if(yych == 'u') goto yy200;
			goto yy7;
		}
	}
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 = 4;
	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 = 0;
	YYMARKER = ++YYCURSOR;
	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
	yych = *YYCURSOR;
yy216:
	if(yych <= 'L') {
		if(yych <= '9') {
			if(yych == '.') goto yy196;
			if(yych <= '/') goto yy7;
			goto yy215;
		} else {
			if(yych == 'E') goto yy199;
			if(yych <= 'K') goto yy7;
			goto yy222;
		}
	} else {
		if(yych <= 'e') {
			if(yych == 'U') goto yy222;
			if(yych <= 'd') goto yy7;
			goto yy199;
		} else {
			if(yych <= 'l') {
				if(yych <= 'k') goto yy7;
				goto yy222;
			} else {
				if(yych == 'u') goto yy222;
				goto yy7;
			}
		}
	}
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 yy7;
			if(yych <= '9') goto yy218;
			goto yy7;
		} else {
			if(yych <= 'F') goto yy218;
			if(yych != 'L') goto yy7;
		}
	} else {
		if(yych <= 'k') {
			if(yych <= 'U') goto yy220;
			if(yych <= '`') goto yy7;
			if(yych <= 'f') goto yy218;
			goto yy7;
		} else {
			if(yych <= 'l') goto yy220;
			if(yych != 'u') goto yy7;
		}
	}
yy220:
	++YYCURSOR;
	if(YYLIMIT == YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if(yych <= 'U') {
		if(yych == 'L') goto yy220;
		if(yych <= 'T') goto yy7;
		goto yy220;
	} else {
		if(yych <= 'l') {
			if(yych <= 'k') goto yy7;
			goto yy220;
		} else {
			if(yych == 'u') goto yy220;
			goto yy7;
		}
	}
yy222:
	++YYCURSOR;
	if(YYLIMIT == YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if(yych <= 'U') {
		if(yych == 'L') goto yy222;
		if(yych <= 'T') goto yy7;
		goto yy222;
	} else {
		if(yych <= 'l') {
			if(yych <= 'k') goto yy7;
			goto yy222;
		} else {
			if(yych == 'u') goto yy222;
			goto yy7;
		}
	}
yy224:
	++YYCURSOR;
	if(YYLIMIT == YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
yy225:
	if(yych <= 'Z') {
		if(yych <= '/') goto yy5;
		if(yych <= '9') goto yy224;
		if(yych <= '@') goto yy5;
		goto yy224;
	} else {
		if(yych <= '_') {
			if(yych <= '^') goto yy5;
			goto yy224;
		} else {
			if(yych <= '`') goto yy5;
			if(yych <= 'z') goto yy224;
			goto yy5;
		}
	}
yy226:
	++YYCURSOR;
	{ RET(TOKEN_DIVASSIGN); }
yy228:
	++YYCURSOR;
	{ goto singlelinecomment; }
yy230:
	++YYCURSOR;
	{ goto multilinecomment; }
}


multilinecomment:
    if (YYLIMIT == YYCURSOR)
        RET(TOKEN_PP_INCOMPLETE_COMMENT);
    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 <= 0x0C) {
		if(yych == 0x0A) goto yy236;
		goto yy239;
	} else {
		if(yych <= 0x0D) goto yy238;
		if(yych != '*') goto yy239;
	}
	++YYCURSOR;
	if((yych = *YYCURSOR) == '/') goto yy241;
yy235:
	{ goto multilinecomment; }
yy236:
	++YYCURSOR;
yy237:
	{
                        s->line++;
                        token = matchptr;
                        saw_newline = 1;
                        goto multilinecomment;
                    }
yy238:
	yych = *++YYCURSOR;
	if(yych == 0x0A) goto yy240;
	goto yy237;
yy239:
	yych = *++YYCURSOR;
	goto yy235;
yy240:
	yych = *++YYCURSOR;
	goto yy237;
yy241:
	++YYCURSOR;
	{
                        if (saw_newline)
                            RET('\n');
                        goto scanner_loop;
                    }
}


singlelinecomment:
    if (YYLIMIT == YYCURSOR)
        RET(TOKEN_EOI);
    matchptr = cursor;

{
	YYCTYPE yych;
	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
	yych = *YYCURSOR;
	if(yych == 0x0A) goto yy245;
	if(yych == 0x0D) goto yy247;
	goto yy248;
yy245:
	++YYCURSOR;
yy246:
	{ s->line++; token = matchptr; RET('\n'); }
yy247:
	yych = *++YYCURSOR;
	if(yych == 0x0A) goto yy250;
	goto yy246;
yy248:
	++YYCURSOR;
	{ goto singlelinecomment; }
yy250:
	++YYCURSOR;
	yych = *YYCURSOR;
	goto yy246;
}


bad_chars:
    if (YYLIMIT == YYCURSOR)
        RET(TOKEN_PP_BAD_CHARS);


{
	YYCTYPE yych;
	if(YYLIMIT == YYCURSOR) YYFILL(1);
	yych = *YYCURSOR;
	if(yych <= '#') {
		if(yych <= 0x1F) {
			if(yych <= 0x08) goto yy255;
			if(yych >= 0x0E) goto yy255;
		} else {
			if(yych == '"') goto yy255;
		}
	} else {
		if(yych <= '@') {
			if(yych <= '$') goto yy255;
			if(yych >= '@') goto yy255;
		} else {
			if(yych == '`') goto yy255;
			if(yych >= 0x7F) goto yy255;
		}
	}
	++YYCURSOR;
	{ cursor--; RET(TOKEN_PP_BAD_CHARS); }
yy255:
	++YYCURSOR;
	{ goto bad_chars; }
}


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

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