Updated lexer for HLSL.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 12 Feb 2009 13:54:01 -0500
changeset 584 9aea8877564d
parent 583 9c966b751fd6
child 585 4713a5b31391
Updated lexer for HLSL. Added some operators, and I'm pretty sure TOKEN_ELLIPSIS isn't used in the D3D preprocessor or HLSL.
mojoshader_internal.h
mojoshader_lexer.c
mojoshader_lexer.re
--- a/mojoshader_internal.h	Thu Feb 12 02:55:45 2009 -0500
+++ b/mojoshader_internal.h	Thu Feb 12 13:54:01 2009 -0500
@@ -286,7 +286,18 @@
     TOKEN_INT_LITERAL,
     TOKEN_FLOAT_LITERAL,
     TOKEN_STRING_LITERAL,
-    TOKEN_ELLIPSIS,
+    TOKEN_RSHIFTASSIGN,
+    TOKEN_LSHIFTASSIGN,
+    TOKEN_ADDASSIGN,
+    TOKEN_SUBASSIGN,
+    TOKEN_MULTASSIGN,
+    TOKEN_DIVASSIGN,
+    TOKEN_MODASSIGN,
+    TOKEN_XORASSIGN,
+    TOKEN_ANDASSIGN,
+    TOKEN_ORASSIGN,
+    TOKEN_INCREMENT,
+    TOKEN_DECREMENT,
     TOKEN_RSHIFT,
     TOKEN_LSHIFT,
     TOKEN_ANDAND,
--- a/mojoshader_lexer.c	Thu Feb 12 02:55:45 2009 -0500
+++ b/mojoshader_lexer.c	Thu Feb 12 13:54:01 2009 -0500
@@ -1,4 +1,4 @@
-/* Generated by re2c 0.12.1 on Thu Feb 12 01:23:03 2009 */
+/* Generated by re2c 0.12.1 on Thu Feb 12 13:52:20 2009 */
 #line 1 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 /**
  * MojoShader; generate shader programs from bytecode of compiled
@@ -71,18 +71,18 @@
 	case ' ':	goto yy62;
 	case 0x0A:	goto yy64;
 	case 0x0D:	goto yy66;
-	case '!':	goto yy24;
+	case '!':	goto yy34;
 	case '"':	goto yy13;
-	case '#':	goto yy26;
-	case '%':	goto yy46;
-	case '&':	goto yy18;
+	case '#':	goto yy36;
+	case '%':	goto yy24;
+	case '&':	goto yy28;
 	case '\'':	goto yy9;
-	case '(':	goto yy28;
-	case ')':	goto yy30;
-	case '*':	goto yy44;
-	case '+':	goto yy42;
-	case ',':	goto yy36;
-	case '-':	goto yy40;
+	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;
@@ -98,7 +98,7 @@
 	case ':':	goto yy50;
 	case ';':	goto yy52;
 	case '<':	goto yy16;
-	case '=':	goto yy22;
+	case '=':	goto yy32;
 	case '>':	goto yy14;
 	case '?':	goto yy58;
 	case 'A':
@@ -154,128 +154,164 @@
 	case 'x':
 	case 'y':
 	case 'z':	goto yy4;
-	case '[':	goto yy32;
+	case '[':	goto yy42;
 	case '\\':	goto yy60;
-	case ']':	goto yy34;
-	case '^':	goto yy48;
+	case ']':	goto yy44;
+	case '^':	goto yy26;
 	case '{':	goto yy54;
-	case '|':	goto yy20;
+	case '|':	goto yy30;
 	case '}':	goto yy56;
-	case '~':	goto yy38;
+	case '~':	goto yy48;
 	default:	goto yy67;
 	}
 yy2:
 	++YYCURSOR;
-	if((yych = *YYCURSOR) == '*') goto yy209;
-	if(yych == '/') goto yy207;
-#line 107 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	if((yych = *YYCURSOR) <= '.') {
+		if(yych == '*') goto yy230;
+	} else {
+		if(yych <= '/') goto yy228;
+		if(yych == '=') goto yy226;
+	}
+#line 118 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('/'); }
-#line 174 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 178 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy4:
 	++YYCURSOR;
 	yych = *YYCURSOR;
-	goto yy206;
+	goto yy225;
 yy5:
 #line 73 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_IDENTIFIER); }
-#line 182 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 186 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy6:
 	yyaccept = 0;
 	yych = *(YYMARKER = ++YYCURSOR);
 	if(yych <= 'X') {
 		if(yych <= 'T') {
-			if(yych == 'L') goto yy181;
-			goto yy197;
+			if(yych == 'L') goto yy200;
+			goto yy216;
 		} else {
-			if(yych <= 'U') goto yy181;
-			if(yych <= 'W') goto yy197;
-			goto yy198;
+			if(yych <= 'U') goto yy200;
+			if(yych <= 'W') goto yy216;
+			goto yy217;
 		}
 	} else {
 		if(yych <= 't') {
-			if(yych == 'l') goto yy181;
-			goto yy197;
+			if(yych == 'l') goto yy200;
+			goto yy216;
 		} else {
-			if(yych <= 'u') goto yy181;
-			if(yych == 'x') goto yy198;
-			goto yy197;
+			if(yych <= 'u') goto yy200;
+			if(yych == 'x') goto yy217;
+			goto yy216;
 		}
 	}
 yy7:
 #line 77 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_INT_LITERAL); }
-#line 208 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 212 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy8:
 	yyaccept = 0;
 	yych = *(YYMARKER = ++YYCURSOR);
-	goto yy179;
+	goto yy198;
 yy9:
 	yyaccept = 1;
 	yych = *(YYMARKER = ++YYCURSOR);
-	if(yych != 0x0A) goto yy169;
+	if(yych != 0x0A) goto yy188;
 yy10:
-#line 136 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 147 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ printf("bad char\n"); goto scanner_loop; }
-#line 220 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 224 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy11:
-	yyaccept = 2;
-	yych = *(YYMARKER = ++YYCURSOR);
-	if(yych == '.') goto yy157;
-	if(yych <= '/') goto yy12;
-	if(yych <= '9') goto yy158;
+	++YYCURSOR;
+	if((yych = *YYCURSOR) <= '/') goto yy12;
+	if(yych <= '9') goto yy179;
 yy12:
-#line 99 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 110 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('.'); }
-#line 230 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 232 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy13:
 	yyaccept = 1;
 	yych = *(YYMARKER = ++YYCURSOR);
 	if(yych == 0x0A) goto yy10;
-	goto yy148;
+	goto yy170;
 yy14:
 	++YYCURSOR;
 	if((yych = *YYCURSOR) <= '<') goto yy15;
-	if(yych <= '=') goto yy143;
-	if(yych <= '>') goto yy145;
+	if(yych <= '=') goto yy163;
+	if(yych <= '>') goto yy165;
 yy15:
-#line 110 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 121 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('>'); }
-#line 244 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 246 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy16:
 	++YYCURSOR;
 	if((yych = *YYCURSOR) <= ';') goto yy17;
-	if(yych <= '<') goto yy141;
-	if(yych <= '=') goto yy139;
+	if(yych <= '<') goto yy159;
+	if(yych <= '=') goto yy157;
 yy17:
-#line 109 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 120 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('<'); }
-#line 253 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 255 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy18:
 	++YYCURSOR;
-	if((yych = *YYCURSOR) == '&') goto yy137;
-#line 101 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('&'); }
-#line 259 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+	if((yych = *YYCURSOR) == '+') goto yy153;
+	if(yych == '=') goto yy155;
+#line 116 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('+'); }
+#line 262 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy20:
 	++YYCURSOR;
-	if((yych = *YYCURSOR) == '|') goto yy135;
+	if((yych = *YYCURSOR) == '-') goto yy149;
+	if(yych == '=') goto yy151;
+#line 115 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('-'); }
+#line 269 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy22:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy147;
+#line 117 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('*'); }
+#line 275 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy24:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy145;
+#line 119 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('%'); }
+#line 281 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy26:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy143;
+#line 122 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('^'); }
+#line 287 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy28:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '&') goto yy139;
+	if(yych == '=') goto yy141;
 #line 112 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('&'); }
+#line 294 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy30:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy137;
+	if(yych == '|') goto yy135;
+#line 123 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('|'); }
-#line 265 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy22:
+#line 301 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy32:
 	++YYCURSOR;
 	if((yych = *YYCURSOR) == '=') goto yy133;
-#line 117 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 128 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('='); }
-#line 271 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy24:
+#line 307 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy34:
 	++YYCURSOR;
 	if((yych = *YYCURSOR) == '=') goto yy131;
-#line 102 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 113 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('!'); }
-#line 277 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy26:
-	yyaccept = 3;
+#line 313 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy36:
+	yyaccept = 2;
 	yych = *(YYMARKER = ++YYCURSOR);
 	if(yych <= 'c') {
 		if(yych <= 0x1F) {
@@ -293,109 +329,84 @@
 			if(yych == 'u') goto yy72;
 		}
 	}
-yy27:
-#line 120 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+yy37:
+#line 131 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('#'); }
-#line 300 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy28:
-	++YYCURSOR;
-#line 95 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('('); }
-#line 305 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy30:
-	++YYCURSOR;
-#line 96 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(')'); }
-#line 310 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy32:
-	++YYCURSOR;
-#line 97 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('['); }
-#line 315 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy34:
-	++YYCURSOR;
-#line 98 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(']'); }
-#line 320 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy36:
-	++YYCURSOR;
-#line 100 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(','); }
-#line 325 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 336 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy38:
 	++YYCURSOR;
-#line 103 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('~'); }
-#line 330 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 106 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('('); }
+#line 341 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy40:
 	++YYCURSOR;
-#line 104 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('-'); }
-#line 335 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 107 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(')'); }
+#line 346 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy42:
 	++YYCURSOR;
-#line 105 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('+'); }
-#line 340 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 108 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('['); }
+#line 351 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy44:
 	++YYCURSOR;
-#line 106 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('*'); }
-#line 345 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 109 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(']'); }
+#line 356 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy46:
 	++YYCURSOR;
-#line 108 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('%'); }
-#line 350 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 111 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(','); }
+#line 361 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy48:
 	++YYCURSOR;
-#line 111 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET('^'); }
-#line 355 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 114 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET('~'); }
+#line 366 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy50:
 	++YYCURSOR;
-#line 113 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 124 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(':'); }
-#line 360 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 371 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy52:
 	++YYCURSOR;
-#line 114 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 125 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(';'); }
-#line 365 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 376 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy54:
 	++YYCURSOR;
-#line 115 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 126 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('{'); }
-#line 370 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 381 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy56:
 	++YYCURSOR;
-#line 116 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 127 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('}'); }
-#line 375 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 386 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy58:
 	++YYCURSOR;
-#line 118 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 129 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('?'); }
-#line 380 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 391 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy60:
 	++YYCURSOR;
-#line 119 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 130 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET('\\'); }
-#line 385 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 396 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy62:
 	++YYCURSOR;
 	yych = *YYCURSOR;
 	goto yy70;
 yy63:
-#line 134 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 145 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto scanner_loop; }
-#line 393 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 404 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy64:
 	++YYCURSOR;
 yy65:
-#line 135 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 146 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ s->line++; RET('\n'); }
-#line 399 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 410 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy66:
 	yych = *++YYCURSOR;
 	if(yych == 0x0A) goto yy68;
@@ -451,17 +462,13 @@
 				goto yy10;
 			}
 		} else {
-			goto yy12;
+			goto yy37;
 		}
 	} else {
-		if(yyaccept <= 4) {
-			if(yyaccept <= 3) {
-				goto yy27;
-			} else {
-				goto yy98;
-			}
+		if(yyaccept <= 3) {
+			goto yy98;
 		} else {
-			goto yy160;
+			goto yy181;
 		}
 	}
 yy74:
@@ -493,18 +500,18 @@
 	goto yy73;
 yy79:
 	++YYCURSOR;
-#line 94 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 105 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_HASHHASH); }
-#line 499 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 506 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy81:
 	yych = *++YYCURSOR;
 	if(yych != 'n') goto yy73;
 	yych = *++YYCURSOR;
 	if(yych != 'e') goto yy73;
 	++YYCURSOR;
-#line 123 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 134 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_LINE); }
-#line 508 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 515 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy85:
 	yych = *++YYCURSOR;
 	if(yych != 'f') goto yy73;
@@ -515,9 +522,9 @@
 	yych = *++YYCURSOR;
 	if(yych != 'e') goto yy73;
 	++YYCURSOR;
-#line 124 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 135 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_DEFINE); }
-#line 521 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 528 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy91:
 	yych = *++YYCURSOR;
 	if(yych != 'd') goto yy73;
@@ -526,22 +533,22 @@
 	yych = *++YYCURSOR;
 	if(yych != 'f') goto yy73;
 	++YYCURSOR;
-#line 125 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 136 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_UNDEF); }
-#line 532 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 539 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy96:
 	yych = *++YYCURSOR;
 	if(yych == 'c') goto yy108;
 	goto yy73;
 yy97:
-	yyaccept = 4;
+	yyaccept = 3;
 	yych = *(YYMARKER = ++YYCURSOR);
 	if(yych == 'd') goto yy100;
 	if(yych == 'n') goto yy99;
 yy98:
-#line 126 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 137 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_IF); }
-#line 545 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 552 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy99:
 	yych = *++YYCURSOR;
 	if(yych == 'd') goto yy104;
@@ -552,18 +559,18 @@
 	yych = *++YYCURSOR;
 	if(yych != 'f') goto yy73;
 	++YYCURSOR;
-#line 127 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 138 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_IFDEF); }
-#line 558 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 565 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy104:
 	yych = *++YYCURSOR;
 	if(yych != 'e') goto yy73;
 	yych = *++YYCURSOR;
 	if(yych != 'f') goto yy73;
 	++YYCURSOR;
-#line 128 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 139 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_IFNDEF); }
-#line 567 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 574 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy108:
 	yych = *++YYCURSOR;
 	if(yych != 'l') goto yy73;
@@ -574,9 +581,9 @@
 	yych = *++YYCURSOR;
 	if(yych != 'e') goto yy73;
 	++YYCURSOR;
-#line 122 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 133 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_INCLUDE); }
-#line 580 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 587 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy114:
 	yych = *++YYCURSOR;
 	if(yych == 'i') goto yy125;
@@ -594,18 +601,18 @@
 	yych = *++YYCURSOR;
 	if(yych != 'r') goto yy73;
 	++YYCURSOR;
-#line 132 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 143 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_ERROR); }
-#line 600 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 607 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy121:
 	yych = *++YYCURSOR;
 	if(yych != 'i') goto yy73;
 	yych = *++YYCURSOR;
 	if(yych != 'f') goto yy73;
 	++YYCURSOR;
-#line 131 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 142 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_ENDIF); }
-#line 609 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 616 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy125:
 	yych = *++YYCURSOR;
 	if(yych == 'f') goto yy129;
@@ -614,683 +621,736 @@
 	yych = *++YYCURSOR;
 	if(yych != 'e') goto yy73;
 	++YYCURSOR;
-#line 129 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 140 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_ELSE); }
-#line 620 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 627 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy129:
 	++YYCURSOR;
-#line 130 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 141 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_PP_ELIF); }
-#line 625 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 632 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy131:
 	++YYCURSOR;
-#line 93 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 104 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_NEQ); }
-#line 630 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 637 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy133:
 	++YYCURSOR;
-#line 92 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 103 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_EQL); }
-#line 635 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 642 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy135:
 	++YYCURSOR;
-#line 89 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 100 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_OROR); }
-#line 640 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 647 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy137:
 	++YYCURSOR;
-#line 88 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(TOKEN_ANDAND); }
-#line 645 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 94 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_ORASSIGN); }
+#line 652 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy139:
 	++YYCURSOR;
-#line 90 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(TOKEN_LEQ); }
-#line 650 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 99 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_ANDAND); }
+#line 657 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 yy141:
 	++YYCURSOR;
+#line 93 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_ANDASSIGN); }
+#line 662 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy143:
+	++YYCURSOR;
+#line 92 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_XORASSIGN); }
+#line 667 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy145:
+	++YYCURSOR;
+#line 91 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_MODASSIGN); }
+#line 672 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy147:
+	++YYCURSOR;
+#line 89 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_MULTASSIGN); }
+#line 677 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy149:
+	++YYCURSOR;
+#line 96 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_DECREMENT); }
+#line 682 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy151:
+	++YYCURSOR;
+#line 88 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_SUBASSIGN); }
+#line 687 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy153:
+	++YYCURSOR;
+#line 95 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_INCREMENT); }
+#line 692 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy155:
+	++YYCURSOR;
 #line 87 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(TOKEN_LSHIFT); }
-#line 655 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy143:
+	{ RET(TOKEN_ADDASSIGN); }
+#line 697 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy157:
 	++YYCURSOR;
-#line 91 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(TOKEN_GEQ); }
-#line 660 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy145:
+#line 101 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_LEQ); }
+#line 702 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy159:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy161;
+#line 98 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_LSHIFT); }
+#line 708 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy161:
 	++YYCURSOR;
 #line 86 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_LSHIFTASSIGN); }
+#line 713 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy163:
+	++YYCURSOR;
+#line 102 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_GEQ); }
+#line 718 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy165:
+	++YYCURSOR;
+	if((yych = *YYCURSOR) == '=') goto yy167;
+#line 97 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_RSHIFT); }
-#line 665 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy147:
+#line 724 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy167:
+	++YYCURSOR;
+#line 85 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_RSHIFTASSIGN); }
+#line 729 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy169:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
-yy148:
+yy170:
 	if(yych <= '!') {
 		if(yych == 0x0A) goto yy73;
-		goto yy147;
+		goto yy169;
 	} else {
-		if(yych <= '"') goto yy150;
-		if(yych != '\\') goto yy147;
+		if(yych <= '"') goto yy172;
+		if(yych != '\\') goto yy169;
 	}
-yy149:
+yy171:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'b') {
 		if(yych <= '7') {
 			if(yych <= '&') {
-				if(yych == '"') goto yy147;
+				if(yych == '"') goto yy169;
 				goto yy73;
 			} else {
-				if(yych <= '\'') goto yy147;
+				if(yych <= '\'') goto yy169;
 				if(yych <= '/') goto yy73;
-				goto yy153;
+				goto yy175;
 			}
 		} else {
 			if(yych <= '[') {
-				if(yych == '?') goto yy147;
+				if(yych == '?') goto yy169;
 				goto yy73;
 			} else {
-				if(yych <= '\\') goto yy147;
+				if(yych <= '\\') goto yy169;
 				if(yych <= '`') goto yy73;
-				goto yy147;
+				goto yy169;
 			}
 		}
 	} else {
 		if(yych <= 'r') {
 			if(yych <= 'm') {
-				if(yych == 'f') goto yy147;
+				if(yych == 'f') goto yy169;
 				goto yy73;
 			} else {
-				if(yych <= 'n') goto yy147;
+				if(yych <= 'n') goto yy169;
 				if(yych <= 'q') goto yy73;
-				goto yy147;
+				goto yy169;
 			}
 		} else {
 			if(yych <= 'u') {
-				if(yych == 't') goto yy147;
+				if(yych == 't') goto yy169;
 				goto yy73;
 			} else {
-				if(yych <= 'v') goto yy147;
-				if(yych == 'x') goto yy152;
+				if(yych <= 'v') goto yy169;
+				if(yych == 'x') goto yy174;
 				goto yy73;
 			}
 		}
 	}
-yy150:
+yy172:
 	++YYCURSOR;
 #line 83 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_STRING_LITERAL); }
-#line 727 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy152:
+#line 791 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy174:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '@') {
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy155;
+		if(yych <= '9') goto yy177;
 		goto yy73;
 	} else {
-		if(yych <= 'F') goto yy155;
+		if(yych <= 'F') goto yy177;
 		if(yych <= '`') goto yy73;
-		if(yych <= 'f') goto yy155;
+		if(yych <= 'f') goto yy177;
 		goto yy73;
 	}
-yy153:
+yy175:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '"') {
 		if(yych == 0x0A) goto yy73;
-		if(yych <= '!') goto yy147;
-		goto yy150;
+		if(yych <= '!') goto yy169;
+		goto yy172;
 	} else {
 		if(yych <= '7') {
-			if(yych <= '/') goto yy147;
-			goto yy153;
+			if(yych <= '/') goto yy169;
+			goto yy175;
 		} else {
-			if(yych == '\\') goto yy149;
-			goto yy147;
+			if(yych == '\\') goto yy171;
+			goto yy169;
 		}
 	}
-yy155:
+yy177:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '9') {
 		if(yych <= '!') {
 			if(yych == 0x0A) goto yy73;
-			goto yy147;
+			goto yy169;
 		} else {
-			if(yych <= '"') goto yy150;
-			if(yych <= '/') goto yy147;
-			goto yy155;
+			if(yych <= '"') goto yy172;
+			if(yych <= '/') goto yy169;
+			goto yy177;
 		}
 	} else {
 		if(yych <= '[') {
-			if(yych <= '@') goto yy147;
-			if(yych <= 'F') goto yy155;
-			goto yy147;
+			if(yych <= '@') goto yy169;
+			if(yych <= 'F') goto yy177;
+			goto yy169;
 		} else {
-			if(yych <= '\\') goto yy149;
-			if(yych <= '`') goto yy147;
-			if(yych <= 'f') goto yy155;
-			goto yy147;
+			if(yych <= '\\') goto yy171;
+			if(yych <= '`') goto yy169;
+			if(yych <= 'f') goto yy177;
+			goto yy169;
 		}
 	}
-yy157:
-	yych = *++YYCURSOR;
-	if(yych == '.') goto yy166;
-	goto yy73;
-yy158:
-	yyaccept = 5;
+yy179:
+	yyaccept = 4;
 	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;
+			if(yych <= '/') goto yy181;
+			if(yych <= '9') goto yy179;
 		} else {
-			if(yych <= 'E') goto yy161;
-			if(yych <= 'F') goto yy162;
+			if(yych <= 'E') goto yy182;
+			if(yych <= 'F') goto yy183;
 		}
 	} else {
 		if(yych <= 'e') {
-			if(yych <= 'L') goto yy162;
-			if(yych >= 'e') goto yy161;
+			if(yych <= 'L') goto yy183;
+			if(yych >= 'e') goto yy182;
 		} else {
-			if(yych <= 'f') goto yy162;
-			if(yych == 'l') goto yy162;
+			if(yych <= 'f') goto yy183;
+			if(yych == 'l') goto yy183;
 		}
 	}
-yy160:
+yy181:
 #line 80 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ RET(TOKEN_FLOAT_LITERAL); }
-#line 813 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy161:
+#line 873 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy182:
 	yych = *++YYCURSOR;
 	if(yych <= ',') {
-		if(yych == '+') goto yy163;
+		if(yych == '+') goto yy184;
 		goto yy73;
 	} else {
-		if(yych <= '-') goto yy163;
+		if(yych <= '-') goto yy184;
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy164;
+		if(yych <= '9') goto yy185;
 		goto yy73;
 	}
-yy162:
+yy183:
 	yych = *++YYCURSOR;
-	goto yy160;
-yy163:
+	goto yy181;
+yy184:
 	yych = *++YYCURSOR;
 	if(yych <= '/') goto yy73;
 	if(yych >= ':') goto yy73;
-yy164:
+yy185:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'K') {
 		if(yych <= '9') {
-			if(yych <= '/') goto yy160;
-			goto yy164;
+			if(yych <= '/') goto yy181;
+			goto yy185;
 		} else {
-			if(yych == 'F') goto yy162;
-			goto yy160;
+			if(yych == 'F') goto yy183;
+			goto yy181;
 		}
 	} else {
 		if(yych <= 'f') {
-			if(yych <= 'L') goto yy162;
-			if(yych <= 'e') goto yy160;
-			goto yy162;
+			if(yych <= 'L') goto yy183;
+			if(yych <= 'e') goto yy181;
+			goto yy183;
 		} else {
-			if(yych == 'l') goto yy162;
-			goto yy160;
+			if(yych == 'l') goto yy183;
+			goto yy181;
 		}
 	}
-yy166:
-	++YYCURSOR;
-#line 85 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
-	{ RET(TOKEN_ELLIPSIS); }
-#line 858 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy168:
+yy187:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
-yy169:
+yy188:
 	if(yych <= '&') {
 		if(yych == 0x0A) goto yy73;
-		goto yy168;
+		goto yy187;
 	} else {
-		if(yych <= '\'') goto yy171;
-		if(yych != '\\') goto yy168;
+		if(yych <= '\'') goto yy190;
+		if(yych != '\\') goto yy187;
 	}
-yy170:
+yy189:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'b') {
 		if(yych <= '7') {
 			if(yych <= '&') {
-				if(yych == '"') goto yy168;
+				if(yych == '"') goto yy187;
 				goto yy73;
 			} else {
-				if(yych <= '\'') goto yy168;
+				if(yych <= '\'') goto yy187;
 				if(yych <= '/') goto yy73;
-				goto yy173;
+				goto yy192;
 			}
 		} else {
 			if(yych <= '[') {
-				if(yych == '?') goto yy168;
+				if(yych == '?') goto yy187;
 				goto yy73;
 			} else {
-				if(yych <= '\\') goto yy168;
+				if(yych <= '\\') goto yy187;
 				if(yych <= '`') goto yy73;
-				goto yy168;
+				goto yy187;
 			}
 		}
 	} else {
 		if(yych <= 'r') {
 			if(yych <= 'm') {
-				if(yych == 'f') goto yy168;
+				if(yych == 'f') goto yy187;
 				goto yy73;
 			} else {
-				if(yych <= 'n') goto yy168;
+				if(yych <= 'n') goto yy187;
 				if(yych <= 'q') goto yy73;
-				goto yy168;
+				goto yy187;
 			}
 		} else {
 			if(yych <= 'u') {
-				if(yych == 't') goto yy168;
+				if(yych == 't') goto yy187;
 				goto yy73;
 			} else {
-				if(yych <= 'v') goto yy168;
-				if(yych == 'x') goto yy172;
+				if(yych <= 'v') goto yy187;
+				if(yych == 'x') goto yy191;
 				goto yy73;
 			}
 		}
 	}
-yy171:
+yy190:
 	yych = *++YYCURSOR;
 	goto yy7;
-yy172:
+yy191:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '@') {
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy175;
+		if(yych <= '9') goto yy194;
 		goto yy73;
 	} else {
-		if(yych <= 'F') goto yy175;
+		if(yych <= 'F') goto yy194;
 		if(yych <= '`') goto yy73;
-		if(yych <= 'f') goto yy175;
+		if(yych <= 'f') goto yy194;
 		goto yy73;
 	}
-yy173:
+yy192:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '\'') {
 		if(yych == 0x0A) goto yy73;
-		if(yych <= '&') goto yy168;
-		goto yy171;
+		if(yych <= '&') goto yy187;
+		goto yy190;
 	} else {
 		if(yych <= '7') {
-			if(yych <= '/') goto yy168;
-			goto yy173;
+			if(yych <= '/') goto yy187;
+			goto yy192;
 		} else {
-			if(yych == '\\') goto yy170;
-			goto yy168;
+			if(yych == '\\') goto yy189;
+			goto yy187;
 		}
 	}
-yy175:
+yy194:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= '9') {
 		if(yych <= '&') {
 			if(yych == 0x0A) goto yy73;
-			goto yy168;
+			goto yy187;
 		} else {
-			if(yych <= '\'') goto yy171;
-			if(yych <= '/') goto yy168;
-			goto yy175;
+			if(yych <= '\'') goto yy190;
+			if(yych <= '/') goto yy187;
+			goto yy194;
 		}
 	} else {
 		if(yych <= '[') {
-			if(yych <= '@') goto yy168;
-			if(yych <= 'F') goto yy175;
-			goto yy168;
+			if(yych <= '@') goto yy187;
+			if(yych <= 'F') goto yy194;
+			goto yy187;
 		} else {
-			if(yych <= '\\') goto yy170;
-			if(yych <= '`') goto yy168;
-			if(yych <= 'f') goto yy175;
-			goto yy168;
+			if(yych <= '\\') goto yy189;
+			if(yych <= '`') goto yy187;
+			if(yych <= 'f') goto yy194;
+			goto yy187;
 		}
 	}
-yy177:
-	yyaccept = 5;
+yy196:
+	yyaccept = 4;
 	yych = *(YYMARKER = ++YYCURSOR);
-	if(yych == 'E') goto yy188;
-	if(yych == 'e') goto yy188;
-	goto yy187;
-yy178:
+	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;
-yy179:
+yy198:
 	if(yych <= 'L') {
 		if(yych <= '9') {
-			if(yych == '.') goto yy177;
+			if(yych == '.') goto yy196;
 			if(yych <= '/') goto yy7;
-			goto yy178;
+			goto yy197;
 		} else {
-			if(yych == 'E') goto yy180;
+			if(yych == 'E') goto yy199;
 			if(yych <= 'K') goto yy7;
-			goto yy181;
+			goto yy200;
 		}
 	} else {
 		if(yych <= 'e') {
-			if(yych == 'U') goto yy181;
+			if(yych == 'U') goto yy200;
 			if(yych <= 'd') goto yy7;
 		} else {
 			if(yych <= 'l') {
 				if(yych <= 'k') goto yy7;
-				goto yy181;
+				goto yy200;
 			} else {
-				if(yych == 'u') goto yy181;
+				if(yych == 'u') goto yy200;
 				goto yy7;
 			}
 		}
 	}
-yy180:
+yy199:
 	yych = *++YYCURSOR;
 	if(yych <= ',') {
-		if(yych == '+') goto yy183;
+		if(yych == '+') goto yy202;
 		goto yy73;
 	} else {
-		if(yych <= '-') goto yy183;
+		if(yych <= '-') goto yy202;
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy184;
+		if(yych <= '9') goto yy203;
 		goto yy73;
 	}
-yy181:
+yy200:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'U') {
-		if(yych == 'L') goto yy181;
+		if(yych == 'L') goto yy200;
 		if(yych <= 'T') goto yy7;
-		goto yy181;
+		goto yy200;
 	} else {
 		if(yych <= 'l') {
 			if(yych <= 'k') goto yy7;
-			goto yy181;
+			goto yy200;
 		} else {
-			if(yych == 'u') goto yy181;
+			if(yych == 'u') goto yy200;
 			goto yy7;
 		}
 	}
-yy183:
+yy202:
 	yych = *++YYCURSOR;
 	if(yych <= '/') goto yy73;
 	if(yych >= ':') goto yy73;
-yy184:
+yy203:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'K') {
 		if(yych <= '9') {
-			if(yych <= '/') goto yy160;
-			goto yy184;
+			if(yych <= '/') goto yy181;
+			goto yy203;
 		} else {
-			if(yych == 'F') goto yy162;
-			goto yy160;
+			if(yych == 'F') goto yy183;
+			goto yy181;
 		}
 	} else {
 		if(yych <= 'f') {
-			if(yych <= 'L') goto yy162;
-			if(yych <= 'e') goto yy160;
-			goto yy162;
+			if(yych <= 'L') goto yy183;
+			if(yych <= 'e') goto yy181;
+			goto yy183;
 		} else {
-			if(yych == 'l') goto yy162;
-			goto yy160;
+			if(yych == 'l') goto yy183;
+			goto yy181;
 		}
 	}
-yy186:
-	yyaccept = 5;
+yy205:
+	yyaccept = 4;
 	YYMARKER = ++YYCURSOR;
 	if((YYLIMIT - YYCURSOR) < 3) YYFILL(3);
 	yych = *YYCURSOR;
-yy187:
+yy206:
 	if(yych <= 'K') {
 		if(yych <= 'D') {
-			if(yych <= '/') goto yy160;
-			if(yych <= '9') goto yy186;
-			goto yy160;
+			if(yych <= '/') goto yy181;
+			if(yych <= '9') goto yy205;
+			goto yy181;
 		} else {
-			if(yych <= 'E') goto yy192;
-			if(yych <= 'F') goto yy162;
-			goto yy160;
+			if(yych <= 'E') goto yy211;
+			if(yych <= 'F') goto yy183;
+			goto yy181;
 		}
 	} else {
 		if(yych <= 'e') {
-			if(yych <= 'L') goto yy162;
-			if(yych <= 'd') goto yy160;
-			goto yy192;
+			if(yych <= 'L') goto yy183;
+			if(yych <= 'd') goto yy181;
+			goto yy211;
 		} else {
-			if(yych <= 'f') goto yy162;
-			if(yych == 'l') goto yy162;
-			goto yy160;
+			if(yych <= 'f') goto yy183;
+			if(yych == 'l') goto yy183;
+			goto yy181;
 		}
 	}
-yy188:
+yy207:
 	yych = *++YYCURSOR;
 	if(yych <= ',') {
 		if(yych != '+') goto yy73;
 	} else {
-		if(yych <= '-') goto yy189;
+		if(yych <= '-') goto yy208;
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy190;
+		if(yych <= '9') goto yy209;
 		goto yy73;
 	}
-yy189:
+yy208:
 	yych = *++YYCURSOR;
 	if(yych <= '/') goto yy73;
 	if(yych >= ':') goto yy73;
-yy190:
+yy209:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'K') {
 		if(yych <= '9') {
-			if(yych <= '/') goto yy160;
-			goto yy190;
+			if(yych <= '/') goto yy181;
+			goto yy209;
 		} else {
-			if(yych == 'F') goto yy162;
-			goto yy160;
+			if(yych == 'F') goto yy183;
+			goto yy181;
 		}
 	} else {
 		if(yych <= 'f') {
-			if(yych <= 'L') goto yy162;
-			if(yych <= 'e') goto yy160;
-			goto yy162;
+			if(yych <= 'L') goto yy183;
+			if(yych <= 'e') goto yy181;
+			goto yy183;
 		} else {
-			if(yych == 'l') goto yy162;
-			goto yy160;
+			if(yych == 'l') goto yy183;
+			goto yy181;
 		}
 	}
-yy192:
+yy211:
 	yych = *++YYCURSOR;
 	if(yych <= ',') {
 		if(yych != '+') goto yy73;
 	} else {
-		if(yych <= '-') goto yy193;
+		if(yych <= '-') goto yy212;
 		if(yych <= '/') goto yy73;
-		if(yych <= '9') goto yy194;
+		if(yych <= '9') goto yy213;
 		goto yy73;
 	}
-yy193:
+yy212:
 	yych = *++YYCURSOR;
 	if(yych <= '/') goto yy73;
 	if(yych >= ':') goto yy73;
-yy194:
+yy213:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'K') {
 		if(yych <= '9') {
-			if(yych <= '/') goto yy160;
-			goto yy194;
+			if(yych <= '/') goto yy181;
+			goto yy213;
 		} else {
-			if(yych == 'F') goto yy162;
-			goto yy160;
+			if(yych == 'F') goto yy183;
+			goto yy181;
 		}
 	} else {
 		if(yych <= 'f') {
-			if(yych <= 'L') goto yy162;
-			if(yych <= 'e') goto yy160;
-			goto yy162;
+			if(yych <= 'L') goto yy183;
+			if(yych <= 'e') goto yy181;
+			goto yy183;
 		} else {
-			if(yych == 'l') goto yy162;
-			goto yy160;
+			if(yych == 'l') goto yy183;
+			goto yy181;
 		}
 	}
-yy196:
+yy215:
 	yyaccept = 0;
 	YYMARKER = ++YYCURSOR;
 	if((YYLIMIT - YYCURSOR) < 4) YYFILL(4);
 	yych = *YYCURSOR;
-yy197:
+yy216:
 	if(yych <= 'L') {
 		if(yych <= '9') {
-			if(yych == '.') goto yy177;
+			if(yych == '.') goto yy196;
 			if(yych <= '/') goto yy7;
-			goto yy196;
+			goto yy215;
 		} else {
-			if(yych == 'E') goto yy180;
+			if(yych == 'E') goto yy199;
 			if(yych <= 'K') goto yy7;
-			goto yy203;
+			goto yy222;
 		}
 	} else {
 		if(yych <= 'e') {
-			if(yych == 'U') goto yy203;
+			if(yych == 'U') goto yy222;
 			if(yych <= 'd') goto yy7;
-			goto yy180;
+			goto yy199;
 		} else {
 			if(yych <= 'l') {
 				if(yych <= 'k') goto yy7;
-				goto yy203;
+				goto yy222;
 			} else {
-				if(yych == 'u') goto yy203;
+				if(yych == 'u') goto yy222;
 				goto yy7;
 			}
 		}
 	}
-yy198:
+yy217:
 	yych = *++YYCURSOR;
 	if(yych <= '@') {
 		if(yych <= '/') goto yy73;
 		if(yych >= ':') goto yy73;
 	} else {
-		if(yych <= 'F') goto yy199;
+		if(yych <= 'F') goto yy218;
 		if(yych <= '`') goto yy73;
 		if(yych >= 'g') goto yy73;
 	}
-yy199:
+yy218:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'T') {
 		if(yych <= '@') {
 			if(yych <= '/') goto yy7;
-			if(yych <= '9') goto yy199;
+			if(yych <= '9') goto yy218;
 			goto yy7;
 		} else {
-			if(yych <= 'F') goto yy199;
+			if(yych <= 'F') goto yy218;
 			if(yych != 'L') goto yy7;
 		}
 	} else {
 		if(yych <= 'k') {
-			if(yych <= 'U') goto yy201;
+			if(yych <= 'U') goto yy220;
 			if(yych <= '`') goto yy7;
-			if(yych <= 'f') goto yy199;
+			if(yych <= 'f') goto yy218;
 			goto yy7;
 		} else {
-			if(yych <= 'l') goto yy201;
+			if(yych <= 'l') goto yy220;
 			if(yych != 'u') goto yy7;
 		}
 	}
-yy201:
+yy220:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'U') {
-		if(yych == 'L') goto yy201;
+		if(yych == 'L') goto yy220;
 		if(yych <= 'T') goto yy7;
-		goto yy201;
+		goto yy220;
 	} else {
 		if(yych <= 'l') {
 			if(yych <= 'k') goto yy7;
-			goto yy201;
+			goto yy220;
 		} else {
-			if(yych == 'u') goto yy201;
+			if(yych == 'u') goto yy220;
 			goto yy7;
 		}
 	}
-yy203:
+yy222:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
 	if(yych <= 'U') {
-		if(yych == 'L') goto yy203;
+		if(yych == 'L') goto yy222;
 		if(yych <= 'T') goto yy7;
-		goto yy203;
+		goto yy222;
 	} else {
 		if(yych <= 'l') {
 			if(yych <= 'k') goto yy7;
-			goto yy203;
+			goto yy222;
 		} else {
-			if(yych == 'u') goto yy203;
+			if(yych == 'u') goto yy222;
 			goto yy7;
 		}
 	}
-yy205:
+yy224:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
-yy206:
+yy225:
 	if(yych <= 'Z') {
 		if(yych <= '/') goto yy5;
-		if(yych <= '9') goto yy205;
+		if(yych <= '9') goto yy224;
 		if(yych <= '@') goto yy5;
-		goto yy205;
+		goto yy224;
 	} else {
 		if(yych <= '_') {
 			if(yych <= '^') goto yy5;
-			goto yy205;
+			goto yy224;
 		} else {
 			if(yych <= '`') goto yy5;
-			if(yych <= 'z') goto yy205;
+			if(yych <= 'z') goto yy224;
 			goto yy5;
 		}
 	}
-yy207:
+yy226:
+	++YYCURSOR;
+#line 90 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	{ RET(TOKEN_DIVASSIGN); }
+#line 1342 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy228:
 	++YYCURSOR;
 #line 71 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto singlelinecomment; }
-#line 1287 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy209:
+#line 1347 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy230:
 	++YYCURSOR;
 #line 70 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto multilinecomment; }
-#line 1292 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 1352 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 }
-#line 137 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 148 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 
 
 multilinecomment:
@@ -1298,91 +1358,91 @@
         RET(TOKEN_PP_INCOMPLETE_COMMENT);
 // The "*\/" is just to avoid screwing up text editor syntax highlighting.
 
-#line 1302 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 1362 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 {
 	YYCTYPE yych;
 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
 	if(yych <= 0x0C) {
-		if(yych == 0x0A) goto yy215;
-		goto yy218;
+		if(yych == 0x0A) goto yy236;
+		goto yy239;
 	} else {
-		if(yych <= 0x0D) goto yy217;
-		if(yych != '*') goto yy218;
+		if(yych <= 0x0D) goto yy238;
+		if(yych != '*') goto yy239;
 	}
 	++YYCURSOR;
-	if((yych = *YYCURSOR) == '/') goto yy220;
-yy214:
-#line 155 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	if((yych = *YYCURSOR) == '/') goto yy241;
+yy235:
+#line 166 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto multilinecomment; }
-#line 1319 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy215:
+#line 1379 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy236:
 	++YYCURSOR;
-yy216:
-#line 149 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+yy237:
+#line 160 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{
                         s->line++;
                         token = cursor-1;
                         saw_newline = 1;
                         goto multilinecomment;
                     }
-#line 1330 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy217:
+#line 1390 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy238:
 	yych = *++YYCURSOR;
-	if(yych == 0x0A) goto yy219;
-	goto yy216;
-yy218:
+	if(yych == 0x0A) goto yy240;
+	goto yy237;
+yy239:
 	yych = *++YYCURSOR;
-	goto yy214;
-yy219:
+	goto yy235;
+yy240:
 	yych = *++YYCURSOR;
-	goto yy216;
-yy220:
+	goto yy237;
+yy241:
 	++YYCURSOR;
-#line 144 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 155 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{
                         if (saw_newline)
                             RET('\n');
                         goto scanner_loop;
                     }
-#line 1349 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 1409 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 }
-#line 156 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 167 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 
 
 singlelinecomment:
     if (YYLIMIT == YYCURSOR)
         RET(TOKEN_EOI);
 
-#line 1358 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 1418 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 {
 	YYCTYPE yych;
 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
-	if(yych == 0x0A) goto yy224;
-	if(yych == 0x0D) goto yy226;
-	goto yy227;
-yy224:
+	if(yych == 0x0A) goto yy245;
+	if(yych == 0x0D) goto yy247;
+	goto yy248;
+yy245:
 	++YYCURSOR;
-yy225:
-#line 162 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+yy246:
+#line 173 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ s->line++; token = cursor-1; RET('\n'); }
-#line 1371 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy226:
+#line 1431 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy247:
 	yych = *++YYCURSOR;
-	if(yych == 0x0A) goto yy229;
-	goto yy225;
-yy227:
+	if(yych == 0x0A) goto yy250;
+	goto yy246;
+yy248:
 	++YYCURSOR;
-#line 163 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 174 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto singlelinecomment; }
-#line 1380 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy229:
+#line 1440 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy250:
 	++YYCURSOR;
 	yych = *YYCURSOR;
-	goto yy225;
+	goto yy246;
 }
-#line 164 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 175 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 
 
 // !!! FIXME
@@ -1393,60 +1453,60 @@
 */
 
 
-#line 1397 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+#line 1457 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
 {
 	YYCTYPE yych;
 	if((YYLIMIT - YYCURSOR) < 2) YYFILL(2);
 	yych = *YYCURSOR;
 	if(yych <= 0x0C) {
-		if(yych <= 0x08) goto yy237;
-		if(yych != 0x0A) goto yy235;
+		if(yych <= 0x08) goto yy258;
+		if(yych != 0x0A) goto yy256;
 	} else {
-		if(yych <= 0x0D) goto yy234;
-		if(yych == ' ') goto yy235;
-		goto yy237;
+		if(yych <= 0x0D) goto yy255;
+		if(yych == ' ') goto yy256;
+		goto yy258;
 	}
 	++YYCURSOR;
-yy233:
-#line 174 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+yy254:
+#line 185 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ s->line++; goto scanner_loop; }
-#line 1414 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy234:
+#line 1474 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy255:
 	yych = *++YYCURSOR;
-	if(yych == 0x0A) goto yy241;
-	goto yy233;
-yy235:
+	if(yych == 0x0A) goto yy262;
+	goto yy254;
+yy256:
 	++YYCURSOR;
 	yych = *YYCURSOR;
-	goto yy240;
-yy236:
-#line 175 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+	goto yy261;
+yy257:
+#line 186 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto scanner_loop; }
-#line 1426 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy237:
+#line 1486 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy258:
 	++YYCURSOR;
-#line 176 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 187 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 	{ goto singlelinecomment; }
-#line 1431 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
-yy239:
+#line 1491 "/home/icculus/projects/mojoshader/mojoshader_lexer.c"
+yy260:
 	++YYCURSOR;
 	if(YYLIMIT == YYCURSOR) YYFILL(1);
 	yych = *YYCURSOR;
-yy240:
+yy261:
 	if(yych <= 0x0A) {
-		if(yych == 0x09) goto yy239;
-		goto yy236;
+		if(yych == 0x09) goto yy260;
+		goto yy257;
 	} else {
-		if(yych <= 0x0C) goto yy239;
-		if(yych == ' ') goto yy239;
-		goto yy236;
+		if(yych <= 0x0C) goto yy260;
+		if(yych == ' ') goto yy260;
+		goto yy257;
 	}
-yy241:
+yy262:
 	++YYCURSOR;
 	yych = *YYCURSOR;
-	goto yy233;
+	goto yy254;
 }
-#line 177 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
+#line 188 "/home/icculus/projects/mojoshader/mojoshader_lexer.re"
 
 
     assert(0 && "Shouldn't hit this code");
--- a/mojoshader_lexer.re	Thu Feb 12 02:55:45 2009 -0500
+++ b/mojoshader_lexer.re	Thu Feb 12 13:54:01 2009 -0500
@@ -82,7 +82,18 @@
     (["] (ESC|any\[\n\\"])* ["])
                     { RET(TOKEN_STRING_LITERAL); }
     
-    "..."           { RET(TOKEN_ELLIPSIS); }
+    ">>="           { RET(TOKEN_RSHIFTASSIGN); }
+    "<<="           { RET(TOKEN_LSHIFTASSIGN); }
+    "+="            { RET(TOKEN_ADDASSIGN); }
+    "-="            { RET(TOKEN_SUBASSIGN); }
+    "*="            { RET(TOKEN_MULTASSIGN); }
+    "/="            { RET(TOKEN_DIVASSIGN); }
+    "%="            { RET(TOKEN_MODASSIGN); }
+    "^="            { RET(TOKEN_XORASSIGN); }
+    "&="            { RET(TOKEN_ANDASSIGN); }
+    "|="            { RET(TOKEN_ORASSIGN); }
+    "++"            { RET(TOKEN_INCREMENT); }
+    "--"            { RET(TOKEN_DECREMENT); }
     ">>"            { RET(TOKEN_RSHIFT); }
     "<<"            { RET(TOKEN_LSHIFT); }
     "&&"            { RET(TOKEN_ANDAND); }