mojoshader_lexer.c
changeset 555 940821555fda
child 580 a7b038eb688c
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mojoshader_lexer.c	Mon Feb 09 17:53:54 2009 -0500
@@ -0,0 +1,1309 @@
+/* Generated by re2c 0.13.5 on Mon Feb  9 17:52:01 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) { update_state(s, cursor, token); return t; }
+#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 *limit = cursor + s->bytes_left;
+
+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 '\t':
+	case '\v':
+	case '\f':
+	case ' ':	goto yy62;
+	case '\n':	goto yy64;
+	case '\r':	goto yy66;
+	case '!':	goto yy24;
+	case '"':	goto yy13;
+	case '#':	goto yy26;
+	case '%':	goto yy46;
+	case '&':	goto yy18;
+	case '\'':	goto yy9;
+	case '(':	goto yy28;
+	case ')':	goto yy30;
+	case '*':	goto yy44;
+	case '+':	goto yy42;
+	case ',':	goto yy36;
+	case '-':	goto yy40;
+	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 yy22;
+	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 yy32;
+	case '\\':	goto yy60;
+	case ']':	goto yy34;
+	case '^':	goto yy48;
+	case '{':	goto yy54;
+	case '|':	goto yy20;
+	case '}':	goto yy56;
+	case '~':	goto yy38;
+	default:	goto yy67;
+	}
+yy2:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '*') goto yy209;
+	if (yych == '/') goto yy207;
+	{ RET('/'); }
+yy4:
+	++YYCURSOR;
+	yych = *YYCURSOR;
+	goto yy206;
+yy5:
+	{ RET(TOKEN_IDENTIFIER); }
+yy6:
+	yyaccept = 0;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych <= 'X') {
+		if (yych <= 'T') {
+			if (yych == 'L') goto yy181;
+			goto yy197;
+		} else {
+			if (yych <= 'U') goto yy181;
+			if (yych <= 'W') goto yy197;
+			goto yy198;
+		}
+	} else {
+		if (yych <= 't') {
+			if (yych == 'l') goto yy181;
+			goto yy197;
+		} else {
+			if (yych <= 'u') goto yy181;
+			if (yych == 'x') goto yy198;
+			goto yy197;
+		}
+	}
+yy7:
+	{ RET(TOKEN_INT_LITERAL); }
+yy8:
+	yyaccept = 0;
+	yych = *(YYMARKER = ++YYCURSOR);
+	goto yy179;
+yy9:
+	yyaccept = 1;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych != '\n') goto yy169;
+yy10:
+	{ printf("bad char\n"); goto scanner_loop; }
+yy11:
+	yyaccept = 2;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych == '.') goto yy157;
+	if (yych <= '/') goto yy12;
+	if (yych <= '9') goto yy158;
+yy12:
+	{ RET('.'); }
+yy13:
+	yyaccept = 1;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych == '\n') goto yy10;
+	goto yy148;
+yy14:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) <= '<') goto yy15;
+	if (yych <= '=') goto yy143;
+	if (yych <= '>') goto yy145;
+yy15:
+	{ RET('>'); }
+yy16:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) <= ';') goto yy17;
+	if (yych <= '<') goto yy141;
+	if (yych <= '=') goto yy139;
+yy17:
+	{ RET('<'); }
+yy18:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '&') goto yy137;
+	{ RET('&'); }
+yy20:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '|') goto yy135;
+	{ RET('|'); }
+yy22:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '=') goto yy133;
+	{ RET('='); }
+yy24:
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '=') goto yy131;
+	{ RET('!'); }
+yy26:
+	yyaccept = 3;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych <= 'c') {
+		if (yych <= 0x1F) {
+			if (yych == '\t') 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;
+		}
+	}
+yy27:
+	{ RET('#'); }
+yy28:
+	++YYCURSOR;
+	{ RET('('); }
+yy30:
+	++YYCURSOR;
+	{ RET(')'); }
+yy32:
+	++YYCURSOR;
+	{ RET('['); }
+yy34:
+	++YYCURSOR;
+	{ RET(']'); }
+yy36:
+	++YYCURSOR;
+	{ 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++; goto scanner_loop; }
+yy66:
+	yych = *++YYCURSOR;
+	if (yych == '\n') 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 <= '\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 <= 2) {
+		if (yyaccept <= 1) {
+			if (yyaccept <= 0) {
+				goto yy7;
+			} else {
+				goto yy10;
+			}
+		} else {
+			goto yy12;
+		}
+	} else {
+		if (yyaccept <= 4) {
+			if (yyaccept <= 3) {
+				goto yy27;
+			} else {
+				goto yy98;
+			}
+		} else {
+			goto yy160;
+		}
+	}
+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 = 4;
+	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_ANDAND); }
+yy139:
+	++YYCURSOR;
+	{ RET(TOKEN_LEQ); }
+yy141:
+	++YYCURSOR;
+	{ RET(TOKEN_LSHIFT); }
+yy143:
+	++YYCURSOR;
+	{ RET(TOKEN_GEQ); }
+yy145:
+	++YYCURSOR;
+	{ RET(TOKEN_RSHIFT); }
+yy147:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+yy148:
+	if (yych <= '!') {
+		if (yych == '\n') goto yy73;
+		goto yy147;
+	} else {
+		if (yych <= '"') goto yy150;
+		if (yych != '\\') goto yy147;
+	}
+yy149:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'b') {
+		if (yych <= '7') {
+			if (yych <= '&') {
+				if (yych == '"') goto yy147;
+				goto yy73;
+			} else {
+				if (yych <= '\'') goto yy147;
+				if (yych <= '/') goto yy73;
+				goto yy153;
+			}
+		} else {
+			if (yych <= '[') {
+				if (yych == '?') goto yy147;
+				goto yy73;
+			} else {
+				if (yych <= '\\') goto yy147;
+				if (yych <= '`') goto yy73;
+				goto yy147;
+			}
+		}
+	} else {
+		if (yych <= 'r') {
+			if (yych <= 'm') {
+				if (yych == 'f') goto yy147;
+				goto yy73;
+			} else {
+				if (yych <= 'n') goto yy147;
+				if (yych <= 'q') goto yy73;
+				goto yy147;
+			}
+		} else {
+			if (yych <= 'u') {
+				if (yych == 't') goto yy147;
+				goto yy73;
+			} else {
+				if (yych <= 'v') goto yy147;
+				if (yych == 'x') goto yy152;
+				goto yy73;
+			}
+		}
+	}
+yy150:
+	++YYCURSOR;
+	{ RET(TOKEN_STRING_LITERAL); }
+yy152:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy155;
+		goto yy73;
+	} else {
+		if (yych <= 'F') goto yy155;
+		if (yych <= '`') goto yy73;
+		if (yych <= 'f') goto yy155;
+		goto yy73;
+	}
+yy153:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '"') {
+		if (yych == '\n') goto yy73;
+		if (yych <= '!') goto yy147;
+		goto yy150;
+	} else {
+		if (yych <= '7') {
+			if (yych <= '/') goto yy147;
+			goto yy153;
+		} else {
+			if (yych == '\\') goto yy149;
+			goto yy147;
+		}
+	}
+yy155:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '9') {
+		if (yych <= '!') {
+			if (yych == '\n') goto yy73;
+			goto yy147;
+		} else {
+			if (yych <= '"') goto yy150;
+			if (yych <= '/') goto yy147;
+			goto yy155;
+		}
+	} else {
+		if (yych <= '[') {
+			if (yych <= '@') goto yy147;
+			if (yych <= 'F') goto yy155;
+			goto yy147;
+		} else {
+			if (yych <= '\\') goto yy149;
+			if (yych <= '`') goto yy147;
+			if (yych <= 'f') goto yy155;
+			goto yy147;
+		}
+	}
+yy157:
+	yych = *++YYCURSOR;
+	if (yych == '.') goto yy166;
+	goto yy73;
+yy158:
+	yyaccept = 5;
+	YYMARKER = ++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+	yych = *YYCURSOR;
+	if (yych <= 'K') {
+		if (yych <= 'D') {
+			if (yych <= '/') goto yy160;
+			if (yych <= '9') goto yy158;
+		} else {
+			if (yych <= 'E') goto yy161;
+			if (yych <= 'F') goto yy162;
+		}
+	} else {
+		if (yych <= 'e') {
+			if (yych <= 'L') goto yy162;
+			if (yych >= 'e') goto yy161;
+		} else {
+			if (yych <= 'f') goto yy162;
+			if (yych == 'l') goto yy162;
+		}
+	}
+yy160:
+	{ RET(TOKEN_FLOAT_LITERAL); }
+yy161:
+	yych = *++YYCURSOR;
+	if (yych <= ',') {
+		if (yych == '+') goto yy163;
+		goto yy73;
+	} else {
+		if (yych <= '-') goto yy163;
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy164;
+		goto yy73;
+	}
+yy162:
+	yych = *++YYCURSOR;
+	goto yy160;
+yy163:
+	yych = *++YYCURSOR;
+	if (yych <= '/') goto yy73;
+	if (yych >= ':') goto yy73;
+yy164:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'K') {
+		if (yych <= '9') {
+			if (yych <= '/') goto yy160;
+			goto yy164;
+		} else {
+			if (yych == 'F') goto yy162;
+			goto yy160;
+		}
+	} else {
+		if (yych <= 'f') {
+			if (yych <= 'L') goto yy162;
+			if (yych <= 'e') goto yy160;
+			goto yy162;
+		} else {
+			if (yych == 'l') goto yy162;
+			goto yy160;
+		}
+	}
+yy166:
+	++YYCURSOR;
+	{ RET(TOKEN_ELLIPSIS); }
+yy168:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+yy169:
+	if (yych <= '&') {
+		if (yych == '\n') goto yy73;
+		goto yy168;
+	} else {
+		if (yych <= '\'') goto yy171;
+		if (yych != '\\') goto yy168;
+	}
+yy170:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'b') {
+		if (yych <= '7') {
+			if (yych <= '&') {
+				if (yych == '"') goto yy168;
+				goto yy73;
+			} else {
+				if (yych <= '\'') goto yy168;
+				if (yych <= '/') goto yy73;
+				goto yy173;
+			}
+		} else {
+			if (yych <= '[') {
+				if (yych == '?') goto yy168;
+				goto yy73;
+			} else {
+				if (yych <= '\\') goto yy168;
+				if (yych <= '`') goto yy73;
+				goto yy168;
+			}
+		}
+	} else {
+		if (yych <= 'r') {
+			if (yych <= 'm') {
+				if (yych == 'f') goto yy168;
+				goto yy73;
+			} else {
+				if (yych <= 'n') goto yy168;
+				if (yych <= 'q') goto yy73;
+				goto yy168;
+			}
+		} else {
+			if (yych <= 'u') {
+				if (yych == 't') goto yy168;
+				goto yy73;
+			} else {
+				if (yych <= 'v') goto yy168;
+				if (yych == 'x') goto yy172;
+				goto yy73;
+			}
+		}
+	}
+yy171:
+	yych = *++YYCURSOR;
+	goto yy7;
+yy172:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy175;
+		goto yy73;
+	} else {
+		if (yych <= 'F') goto yy175;
+		if (yych <= '`') goto yy73;
+		if (yych <= 'f') goto yy175;
+		goto yy73;
+	}
+yy173:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '\'') {
+		if (yych == '\n') goto yy73;
+		if (yych <= '&') goto yy168;
+		goto yy171;
+	} else {
+		if (yych <= '7') {
+			if (yych <= '/') goto yy168;
+			goto yy173;
+		} else {
+			if (yych == '\\') goto yy170;
+			goto yy168;
+		}
+	}
+yy175:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= '9') {
+		if (yych <= '&') {
+			if (yych == '\n') goto yy73;
+			goto yy168;
+		} else {
+			if (yych <= '\'') goto yy171;
+			if (yych <= '/') goto yy168;
+			goto yy175;
+		}
+	} else {
+		if (yych <= '[') {
+			if (yych <= '@') goto yy168;
+			if (yych <= 'F') goto yy175;
+			goto yy168;
+		} else {
+			if (yych <= '\\') goto yy170;
+			if (yych <= '`') goto yy168;
+			if (yych <= 'f') goto yy175;
+			goto yy168;
+		}
+	}
+yy177:
+	yyaccept = 5;
+	yych = *(YYMARKER = ++YYCURSOR);
+	if (yych == 'E') goto yy188;
+	if (yych == 'e') goto yy188;
+	goto yy187;
+yy178:
+	yyaccept = 0;
+	YYMARKER = ++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+	yych = *YYCURSOR;
+yy179:
+	if (yych <= 'L') {
+		if (yych <= '9') {
+			if (yych == '.') goto yy177;
+			if (yych <= '/') goto yy7;
+			goto yy178;
+		} else {
+			if (yych == 'E') goto yy180;
+			if (yych <= 'K') goto yy7;
+			goto yy181;
+		}
+	} else {
+		if (yych <= 'e') {
+			if (yych == 'U') goto yy181;
+			if (yych <= 'd') goto yy7;
+		} else {
+			if (yych <= 'l') {
+				if (yych <= 'k') goto yy7;
+				goto yy181;
+			} else {
+				if (yych == 'u') goto yy181;
+				goto yy7;
+			}
+		}
+	}
+yy180:
+	yych = *++YYCURSOR;
+	if (yych <= ',') {
+		if (yych == '+') goto yy183;
+		goto yy73;
+	} else {
+		if (yych <= '-') goto yy183;
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy184;
+		goto yy73;
+	}
+yy181:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'U') {
+		if (yych == 'L') goto yy181;
+		if (yych <= 'T') goto yy7;
+		goto yy181;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy7;
+			goto yy181;
+		} else {
+			if (yych == 'u') goto yy181;
+			goto yy7;
+		}
+	}
+yy183:
+	yych = *++YYCURSOR;
+	if (yych <= '/') goto yy73;
+	if (yych >= ':') goto yy73;
+yy184:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'K') {
+		if (yych <= '9') {
+			if (yych <= '/') goto yy160;
+			goto yy184;
+		} else {
+			if (yych == 'F') goto yy162;
+			goto yy160;
+		}
+	} else {
+		if (yych <= 'f') {
+			if (yych <= 'L') goto yy162;
+			if (yych <= 'e') goto yy160;
+			goto yy162;
+		} else {
+			if (yych == 'l') goto yy162;
+			goto yy160;
+		}
+	}
+yy186:
+	yyaccept = 5;
+	YYMARKER = ++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
+	yych = *YYCURSOR;
+yy187:
+	if (yych <= 'K') {
+		if (yych <= 'D') {
+			if (yych <= '/') goto yy160;
+			if (yych <= '9') goto yy186;
+			goto yy160;
+		} else {
+			if (yych <= 'E') goto yy192;
+			if (yych <= 'F') goto yy162;
+			goto yy160;
+		}
+	} else {
+		if (yych <= 'e') {
+			if (yych <= 'L') goto yy162;
+			if (yych <= 'd') goto yy160;
+			goto yy192;
+		} else {
+			if (yych <= 'f') goto yy162;
+			if (yych == 'l') goto yy162;
+			goto yy160;
+		}
+	}
+yy188:
+	yych = *++YYCURSOR;
+	if (yych <= ',') {
+		if (yych != '+') goto yy73;
+	} else {
+		if (yych <= '-') goto yy189;
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy190;
+		goto yy73;
+	}
+yy189:
+	yych = *++YYCURSOR;
+	if (yych <= '/') goto yy73;
+	if (yych >= ':') goto yy73;
+yy190:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'K') {
+		if (yych <= '9') {
+			if (yych <= '/') goto yy160;
+			goto yy190;
+		} else {
+			if (yych == 'F') goto yy162;
+			goto yy160;
+		}
+	} else {
+		if (yych <= 'f') {
+			if (yych <= 'L') goto yy162;
+			if (yych <= 'e') goto yy160;
+			goto yy162;
+		} else {
+			if (yych == 'l') goto yy162;
+			goto yy160;
+		}
+	}
+yy192:
+	yych = *++YYCURSOR;
+	if (yych <= ',') {
+		if (yych != '+') goto yy73;
+	} else {
+		if (yych <= '-') goto yy193;
+		if (yych <= '/') goto yy73;
+		if (yych <= '9') goto yy194;
+		goto yy73;
+	}
+yy193:
+	yych = *++YYCURSOR;
+	if (yych <= '/') goto yy73;
+	if (yych >= ':') goto yy73;
+yy194:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'K') {
+		if (yych <= '9') {
+			if (yych <= '/') goto yy160;
+			goto yy194;
+		} else {
+			if (yych == 'F') goto yy162;
+			goto yy160;
+		}
+	} else {
+		if (yych <= 'f') {
+			if (yych <= 'L') goto yy162;
+			if (yych <= 'e') goto yy160;
+			goto yy162;
+		} else {
+			if (yych == 'l') goto yy162;
+			goto yy160;
+		}
+	}
+yy196:
+	yyaccept = 0;
+	YYMARKER = ++YYCURSOR;
+	if ((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
+	yych = *YYCURSOR;
+yy197:
+	if (yych <= 'L') {
+		if (yych <= '9') {
+			if (yych == '.') goto yy177;
+			if (yych <= '/') goto yy7;
+			goto yy196;
+		} else {
+			if (yych == 'E') goto yy180;
+			if (yych <= 'K') goto yy7;
+			goto yy203;
+		}
+	} else {
+		if (yych <= 'e') {
+			if (yych == 'U') goto yy203;
+			if (yych <= 'd') goto yy7;
+			goto yy180;
+		} else {
+			if (yych <= 'l') {
+				if (yych <= 'k') goto yy7;
+				goto yy203;
+			} else {
+				if (yych == 'u') goto yy203;
+				goto yy7;
+			}
+		}
+	}
+yy198:
+	yych = *++YYCURSOR;
+	if (yych <= '@') {
+		if (yych <= '/') goto yy73;
+		if (yych >= ':') goto yy73;
+	} else {
+		if (yych <= 'F') goto yy199;
+		if (yych <= '`') goto yy73;
+		if (yych >= 'g') goto yy73;
+	}
+yy199:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'T') {
+		if (yych <= '@') {
+			if (yych <= '/') goto yy7;
+			if (yych <= '9') goto yy199;
+			goto yy7;
+		} else {
+			if (yych <= 'F') goto yy199;
+			if (yych != 'L') goto yy7;
+		}
+	} else {
+		if (yych <= 'k') {
+			if (yych <= 'U') goto yy201;
+			if (yych <= '`') goto yy7;
+			if (yych <= 'f') goto yy199;
+			goto yy7;
+		} else {
+			if (yych <= 'l') goto yy201;
+			if (yych != 'u') goto yy7;
+		}
+	}
+yy201:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'U') {
+		if (yych == 'L') goto yy201;
+		if (yych <= 'T') goto yy7;
+		goto yy201;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy7;
+			goto yy201;
+		} else {
+			if (yych == 'u') goto yy201;
+			goto yy7;
+		}
+	}
+yy203:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+	if (yych <= 'U') {
+		if (yych == 'L') goto yy203;
+		if (yych <= 'T') goto yy7;
+		goto yy203;
+	} else {
+		if (yych <= 'l') {
+			if (yych <= 'k') goto yy7;
+			goto yy203;
+		} else {
+			if (yych == 'u') goto yy203;
+			goto yy7;
+		}
+	}
+yy205:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+yy206:
+	if (yych <= 'Z') {
+		if (yych <= '/') goto yy5;
+		if (yych <= '9') goto yy205;
+		if (yych <= '@') goto yy5;
+		goto yy205;
+	} else {
+		if (yych <= '_') {
+			if (yych <= '^') goto yy5;
+			goto yy205;
+		} else {
+			if (yych <= '`') goto yy5;
+			if (yych <= 'z') goto yy205;
+			goto yy5;
+		}
+	}
+yy207:
+	++YYCURSOR;
+	{ goto singlelinecomment; }
+yy209:
+	++YYCURSOR;
+	{ goto multilinecomment; }
+}
+
+
+multilinecomment:
+    if (YYLIMIT == YYCURSOR)
+        RET(TOKEN_PP_INCOMPLETE_COMMENT);
+// 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 == '\n') goto yy215;
+		goto yy218;
+	} else {
+		if (yych <= '\r') goto yy217;
+		if (yych != '*') goto yy218;
+	}
+	++YYCURSOR;
+	if ((yych = *YYCURSOR) == '/') goto yy220;
+yy214:
+	{ goto multilinecomment; }
+yy215:
+	++YYCURSOR;
+yy216:
+	{ s->line++; goto multilinecomment; }
+yy217:
+	yych = *++YYCURSOR;
+	if (yych == '\n') goto yy219;
+	goto yy216;
+yy218:
+	yych = *++YYCURSOR;
+	goto yy214;
+yy219:
+	yych = *++YYCURSOR;
+	goto yy216;
+yy220:
+	++YYCURSOR;
+	{ goto scanner_loop; }
+}
+
+
+singlelinecomment:
+    if (YYLIMIT == YYCURSOR)
+        RET(TOKEN_EOI);
+
+{
+	YYCTYPE yych;
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+	yych = *YYCURSOR;
+	if (yych == '\n') goto yy224;
+	if (yych == '\r') goto yy226;
+	goto yy227;
+yy224:
+	++YYCURSOR;
+yy225:
+	{ s->line++; goto scanner_loop; }
+yy226:
+	yych = *++YYCURSOR;
+	if (yych == '\n') goto yy229;
+	goto yy225;
+yy227:
+	++YYCURSOR;
+	{ goto singlelinecomment; }
+yy229:
+	++YYCURSOR;
+	yych = *YYCURSOR;
+	goto yy225;
+}
+
+
+// !!! FIXME
+/*
+bad_chars:
+    if (YYLIMIT == YYCURSOR)
+        RET(TOKEN_BAD_TOKEN);
+*/
+
+
+{
+	YYCTYPE yych;
+	if ((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
+	yych = *YYCURSOR;
+	if (yych <= '\f') {
+		if (yych <= 0x08) goto yy237;
+		if (yych != '\n') goto yy235;
+	} else {
+		if (yych <= '\r') goto yy234;
+		if (yych == ' ') goto yy235;
+		goto yy237;
+	}
+	++YYCURSOR;
+yy233:
+	{ s->line++; goto scanner_loop; }
+yy234:
+	yych = *++YYCURSOR;
+	if (yych == '\n') goto yy241;
+	goto yy233;
+yy235:
+	++YYCURSOR;
+	yych = *YYCURSOR;
+	goto yy240;
+yy236:
+	{ goto scanner_loop; }
+yy237:
+	++YYCURSOR;
+	{ goto singlelinecomment; }
+yy239:
+	++YYCURSOR;
+	if (YYLIMIT <= YYCURSOR) YYFILL(1);
+	yych = *YYCURSOR;
+yy240:
+	if (yych <= '\n') {
+		if (yych == '\t') goto yy239;
+		goto yy236;
+	} else {
+		if (yych <= '\f') goto yy239;
+		if (yych == ' ') goto yy239;
+		goto yy236;
+	}
+yy241:
+	++YYCURSOR;
+	yych = *YYCURSOR;
+	goto yy233;
+}
+
+
+    assert(0 && "Shouldn't hit this code");
+    RET(TOKEN_UNKNOWN);
+} // preprocessor_internal_lexer
+
+// end of mojoshader_lexer_preprocessor.re (or .c) ...
+