/* Generated by re2c 0.13.5 on Fri Jan 18 16:53:42 2013 */
// 1 "scanner.re"

/*
  +------------------------------------------------------------------------+
  | Phalcon Framework                                                      |
  +------------------------------------------------------------------------+
  | Copyright (c) 2011-2012 Phalcon Team (http://www.phalconphp.com)       |
  +------------------------------------------------------------------------+
  | This source file is subject to the New BSD License that is bundled     |
  | with this package in the file docs/LICENSE.txt.                        |
  |                                                                        |
  | If you did not receive a copy of the license and are unable to         |
  | obtain it through the world-wide-web, please send an email             |
  | to license@phalconphp.com so we can send you a copy immediately.       |
  +------------------------------------------------------------------------+
  | Authors: Andres Gutierrez <andres@phalconphp.com>                      |
  |          Eduar Carvajal <eduar@phalconphp.com>                         |
  +------------------------------------------------------------------------+
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "php.h"
#include "php_phalcon.h"

#include "scanner.h"

#define YYCTYPE unsigned char
#define YYCURSOR (s->start)
#define YYLIMIT (s->end)
#define YYMARKER q

int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) {

	char *q = YYCURSOR;
	int status = PHQL_SCANNER_RETCODE_IMPOSSIBLE;

	while (PHQL_SCANNER_RETCODE_IMPOSSIBLE == status) {

		
// 45 "scanner.c"
		{
			YYCTYPE yych;

			yych = *YYCURSOR;
			switch (yych) {
			case 0x00:	goto yy62;
			case '\t':
			case '\n':
			case '\r':
			case ' ':	goto yy60;
			case '!':	goto yy48;
			case '"':	goto yy27;
			case '%':	goto yy40;
			case '&':	goto yy56;
			case '\'':	goto yy28;
			case '(':	goto yy44;
			case ')':	goto yy46;
			case '*':	goto yy36;
			case '+':	goto yy32;
			case ',':	goto yy42;
			case '-':	goto yy34;
			case '.':	goto yy4;
			case '/':	goto yy38;
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy2;
			case ':':	goto yy8;
			case '<':	goto yy50;
			case '=':	goto yy54;
			case '>':	goto yy52;
			case '?':	goto yy6;
			case 'A':
			case 'a':	goto yy14;
			case 'B':
			case 'b':	goto yy19;
			case 'C':
			case 'c':	goto yy26;
			case 'D':
			case 'd':	goto yy12;
			case 'E':
			case 'K':
			case 'M':
			case 'P':
			case 'Q':
			case 'T':
			case 'X':
			case 'Y':
			case 'Z':
			case 'e':
			case 'k':
			case 'm':
			case 'p':
			case 'q':
			case 't':
			case 'x':
			case 'y':
			case 'z':	goto yy30;
			case 'F':
			case 'f':	goto yy13;
			case 'G':
			case 'g':	goto yy20;
			case 'H':
			case 'h':	goto yy21;
			case 'I':
			case 'i':	goto yy15;
			case 'J':
			case 'j':	goto yy24;
			case 'L':
			case 'l':	goto yy22;
			case 'N':
			case 'n':	goto yy23;
			case 'O':
			case 'o':	goto yy18;
			case 'R':
			case 'r':	goto yy25;
			case 'S':
			case 's':	goto yy11;
			case 'U':
			case 'u':	goto yy9;
			case 'V':
			case 'v':	goto yy16;
			case 'W':
			case 'w':	goto yy17;
			case '[':	goto yy31;
			case '\\':	goto yy29;
			case '|':	goto yy58;
			default:	goto yy64;
			}
yy2:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '.':	goto yy245;
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy247;
			default:	goto yy3;
			}
yy3:
// 46 "scanner.re"
			{
			token->opcode = PHQL_T_INTEGER;
			token->value = estrndup(q, YYCURSOR - q);
			token->len = YYCURSOR - q;
			q = YYCURSOR;
			return 0;
		}
// 166 "scanner.c"
yy4:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy242;
			default:	goto yy5;
			}
yy5:
// 308 "scanner.re"
			{
			token->opcode = PHQL_T_DOT;
			return 0;
		}
// 188 "scanner.c"
yy6:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy239;
			default:	goto yy7;
			}
yy7:
// 388 "scanner.re"
			{
			status = PHQL_SCANNER_RETCODE_ERR;
			break;
		}
// 210 "scanner.c"
yy8:
			yych = *(YYMARKER = ++YYCURSOR);
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 yy235;
			default:	goto yy7;
			}
yy9:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case 'P':
			case 'p':	goto yy229;
			default:	goto yy81;
			}
yy10:
// 266 "scanner.re"
			{
			token->opcode = PHQL_T_IDENTIFIER;
			token->value = estrndup(q, YYCURSOR - q);
			token->len = YYCURSOR - q;
			q = YYCURSOR;
			return 0;
		}
// 295 "scanner.c"
yy11:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy221;
			default:	goto yy81;
			}
yy12:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy204;
			case 'I':
			case 'i':	goto yy205;
			default:	goto yy81;
			}
yy13:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy196;
			case 'U':
			case 'u':	goto yy197;
			default:	goto yy81;
			}
yy14:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy189;
			case 'S':
			case 's':	goto yy190;
			default:	goto yy81;
			}
yy15:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy173;
			case 'S':
			case 's':	goto yy175;
			default:	goto yy81;
			}
yy16:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'A':
			case 'a':	goto yy167;
			default:	goto yy81;
			}
yy17:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'H':
			case 'h':	goto yy162;
			default:	goto yy81;
			}
yy18:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'F':
			case 'f':	goto yy143;
			case 'N':
			case 'n':	goto yy144;
			case 'R':
			case 'r':	goto yy146;
			case 'U':
			case 'u':	goto yy148;
			default:	goto yy81;
			}
yy19:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy134;
			case 'Y':
			case 'y':	goto yy135;
			default:	goto yy81;
			}
yy20:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy129;
			default:	goto yy81;
			}
yy21:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'A':
			case 'a':	goto yy123;
			default:	goto yy81;
			}
yy22:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy111;
			case 'I':
			case 'i':	goto yy112;
			default:	goto yy81;
			}
yy23:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy104;
			case 'U':
			case 'u':	goto yy105;
			default:	goto yy81;
			}
yy24:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy100;
			default:	goto yy81;
			}
yy25:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'I':
			case 'i':	goto yy95;
			default:	goto yy81;
			}
yy26:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy90;
			default:	goto yy81;
			}
yy27:
			yych = *(YYMARKER = ++YYCURSOR);
			if (yych <= 0x00) goto yy7;
			goto yy88;
yy28:
			yych = *(YYMARKER = ++YYCURSOR);
			if (yych <= 0x00) goto yy7;
			goto yy83;
yy29:
			yych = *++YYCURSOR;
			switch (yych) {
			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 '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 yy80;
			default:	goto yy7;
			}
yy30:
			yych = *++YYCURSOR;
			goto yy81;
yy31:
			yych = *(YYMARKER = ++YYCURSOR);
			switch (yych) {
			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 yy75;
			default:	goto yy7;
			}
yy32:
			++YYCURSOR;
// 283 "scanner.re"
			{
			token->opcode = PHQL_T_ADD;
			return 0;
		}
// 561 "scanner.c"
yy34:
			++YYCURSOR;
// 288 "scanner.re"
			{
			token->opcode = PHQL_T_SUB;
			return 0;
		}
// 569 "scanner.c"
yy36:
			++YYCURSOR;
// 293 "scanner.re"
			{
			token->opcode = PHQL_T_MUL;
			return 0;
		}
// 577 "scanner.c"
yy38:
			++YYCURSOR;
// 298 "scanner.re"
			{
			token->opcode = PHQL_T_DIV;
			return 0;
		}
// 585 "scanner.c"
yy40:
			++YYCURSOR;
// 303 "scanner.re"
			{
			token->opcode = PHQL_T_MOD;
			return 0;
		}
// 593 "scanner.c"
yy42:
			++YYCURSOR;
// 313 "scanner.re"
			{
			token->opcode = PHQL_T_COMMA;
			return 0;
		}
// 601 "scanner.c"
yy44:
			++YYCURSOR;
// 318 "scanner.re"
			{
			token->opcode = PHQL_T_BRACKET_OPEN;
			return 0;
		}
// 609 "scanner.c"
yy46:
			++YYCURSOR;
// 323 "scanner.re"
			{
			token->opcode = PHQL_T_BRACKET_CLOSE;
			return 0;
		}
// 617 "scanner.c"
yy48:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '=':	goto yy73;
			default:	goto yy49;
			}
yy49:
// 353 "scanner.re"
			{
			token->opcode = PHQL_T_NOT;
			return 0;
		}
// 630 "scanner.c"
yy50:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '=':	goto yy69;
			case '>':	goto yy71;
			default:	goto yy51;
			}
yy51:
// 358 "scanner.re"
			{
			token->opcode = PHQL_T_LESS;
			return 0;
		}
// 644 "scanner.c"
yy52:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '=':	goto yy67;
			default:	goto yy53;
			}
yy53:
// 363 "scanner.re"
			{
			token->opcode = PHQL_T_GREATER;
			return 0;
		}
// 657 "scanner.c"
yy54:
			++YYCURSOR;
// 348 "scanner.re"
			{
			token->opcode = PHQL_T_EQUALS;
			return 0;
		}
// 665 "scanner.c"
yy56:
			++YYCURSOR;
// 368 "scanner.re"
			{
			token->opcode = PHQL_T_BITWISE_AND;
			return 0;
		}
// 673 "scanner.c"
yy58:
			++YYCURSOR;
// 373 "scanner.re"
			{
			token->opcode = PHQL_T_BITWISE_OR;
			return 0;
		}
// 681 "scanner.c"
yy60:
			++YYCURSOR;
			yych = *YYCURSOR;
			goto yy66;
yy61:
// 378 "scanner.re"
			{
			token->opcode = PHQL_T_IGNORE;
			return 0;
		}
// 692 "scanner.c"
yy62:
			++YYCURSOR;
// 383 "scanner.re"
			{
			status = PHQL_SCANNER_RETCODE_EOF;
			break;
		}
// 700 "scanner.c"
yy64:
			yych = *++YYCURSOR;
			goto yy7;
yy65:
			++YYCURSOR;
			yych = *YYCURSOR;
yy66:
			switch (yych) {
			case '\t':
			case '\n':
			case '\r':
			case ' ':	goto yy65;
			default:	goto yy61;
			}
yy67:
			++YYCURSOR;
// 343 "scanner.re"
			{
			token->opcode = PHQL_T_GREATEREQUAL;
			return 0;
		}
// 722 "scanner.c"
yy69:
			++YYCURSOR;
// 338 "scanner.re"
			{
			token->opcode = PHQL_T_LESSEQUAL;
			return 0;
		}
// 730 "scanner.c"
yy71:
			++YYCURSOR;
// 333 "scanner.re"
			{
			token->opcode = PHQL_T_NOTEQUALS;
			return 0;
		}
// 738 "scanner.c"
yy73:
			++YYCURSOR;
// 328 "scanner.re"
			{
			token->opcode = PHQL_T_NOTEQUALS;
			return 0;
		}
// 746 "scanner.c"
yy75:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy75;
			case ']':	goto yy78;
			default:	goto yy77;
			}
yy77:
			YYCURSOR = YYMARKER;
			goto yy7;
yy78:
			++YYCURSOR;
// 275 "scanner.re"
			{
			token->opcode = PHQL_T_IDENTIFIER;
			token->value = estrndup(q, YYCURSOR - q - 1);
			token->len = YYCURSOR - q - 1;
			q = YYCURSOR;
			return 0;
		}
// 831 "scanner.c"
yy80:
			++YYCURSOR;
			yych = *YYCURSOR;
yy81:
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy10;
			}
yy82:
			++YYCURSOR;
			yych = *YYCURSOR;
yy83:
			switch (yych) {
			case 0x00:	goto yy77;
			case '\'':	goto yy85;
			case '\\':	goto yy84;
			default:	goto yy82;
			}
yy84:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '\n':	goto yy77;
			default:	goto yy82;
			}
yy85:
			++YYCURSOR;
// 257 "scanner.re"
			{
			token->opcode = PHQL_T_STRING;
			token->value = estrndup(q, YYCURSOR - q - 1);
			token->len = YYCURSOR - q - 1;
			q = YYCURSOR;
			return 0;
		}
// 930 "scanner.c"
yy87:
			++YYCURSOR;
			yych = *YYCURSOR;
yy88:
			switch (yych) {
			case 0x00:	goto yy77;
			case '"':	goto yy85;
			case '\\':	goto yy89;
			default:	goto yy87;
			}
yy89:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '\n':	goto yy77;
			default:	goto yy87;
			}
yy90:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy91;
			default:	goto yy81;
			}
yy91:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'S':
			case 's':	goto yy92;
			default:	goto yy81;
			}
yy92:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'S':
			case 's':	goto yy93;
			default:	goto yy81;
			}
yy93:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy94;
			}
yy94:
// 221 "scanner.re"
			{
			token->opcode = PHQL_T_CROSS;
			return 0;
		}
// 1044 "scanner.c"
yy95:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'G':
			case 'g':	goto yy96;
			default:	goto yy81;
			}
yy96:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'H':
			case 'h':	goto yy97;
			default:	goto yy81;
			}
yy97:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy98;
			default:	goto yy81;
			}
yy98:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy99;
			}
yy99:
// 216 "scanner.re"
			{
			token->opcode = PHQL_T_RIGHT;
			return 0;
		}
// 1141 "scanner.c"
yy100:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'I':
			case 'i':	goto yy101;
			default:	goto yy81;
			}
yy101:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy102;
			default:	goto yy81;
			}
yy102:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy103;
			}
yy103:
// 201 "scanner.re"
			{
			token->opcode = PHQL_T_JOIN;
			return 0;
		}
// 1231 "scanner.c"
yy104:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy109;
			default:	goto yy81;
			}
yy105:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy106;
			default:	goto yy81;
			}
yy106:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy107;
			default:	goto yy81;
			}
yy107:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy108;
			}
yy108:
// 241 "scanner.re"
			{
			token->opcode = PHQL_T_NULL;
			return 0;
		}
// 1328 "scanner.c"
yy109:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy110;
			}
yy110:
// 171 "scanner.re"
			{
			token->opcode = PHQL_T_NOT;
			return 0;
		}
// 1404 "scanner.c"
yy111:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'F':
			case 'f':	goto yy120;
			default:	goto yy81;
			}
yy112:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'K':
			case 'k':	goto yy114;
			case 'M':
			case 'm':	goto yy113;
			default:	goto yy81;
			}
yy113:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'I':
			case 'i':	goto yy117;
			default:	goto yy81;
			}
yy114:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy115;
			default:	goto yy81;
			}
yy115:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy116;
			}
yy116:
// 186 "scanner.re"
			{
			token->opcode = PHQL_T_LIKE;
			return 0;
		}
// 1510 "scanner.c"
yy117:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy118;
			default:	goto yy81;
			}
yy118:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy119;
			}
yy119:
// 161 "scanner.re"
			{
			token->opcode = PHQL_T_LIMIT;
			return 0;
		}
// 1593 "scanner.c"
yy120:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy121;
			default:	goto yy81;
			}
yy121:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy122;
			}
yy122:
// 211 "scanner.re"
			{
			token->opcode = PHQL_T_LEFT;
			return 0;
		}
// 1676 "scanner.c"
yy123:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'V':
			case 'v':	goto yy124;
			default:	goto yy81;
			}
yy124:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'I':
			case 'i':	goto yy125;
			default:	goto yy81;
			}
yy125:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy126;
			default:	goto yy81;
			}
yy126:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'G':
			case 'g':	goto yy127;
			default:	goto yy81;
			}
yy127:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy128;
			}
yy128:
// 156 "scanner.re"
			{
			token->opcode = PHQL_T_HAVING;
			return 0;
		}
// 1780 "scanner.c"
yy129:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy130;
			default:	goto yy81;
			}
yy130:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'U':
			case 'u':	goto yy131;
			default:	goto yy81;
			}
yy131:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'P':
			case 'p':	goto yy132;
			default:	goto yy81;
			}
yy132:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy133;
			}
yy133:
// 151 "scanner.re"
			{
			token->opcode = PHQL_T_GROUP;
			return 0;
		}
// 1877 "scanner.c"
yy134:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy137;
			default:	goto yy81;
			}
yy135:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy136;
			}
yy136:
// 136 "scanner.re"
			{
			token->opcode = PHQL_T_BY;
			return 0;
		}
// 1960 "scanner.c"
yy137:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'W':
			case 'w':	goto yy138;
			default:	goto yy81;
			}
yy138:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy139;
			default:	goto yy81;
			}
yy139:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy140;
			default:	goto yy81;
			}
yy140:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy141;
			default:	goto yy81;
			}
yy141:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy142;
			}
yy142:
// 251 "scanner.re"
			{
			token->opcode = PHQL_T_BETWEEN;
			return 0;
		}
// 2064 "scanner.c"
yy143:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'F':
			case 'f':	goto yy157;
			default:	goto yy81;
			}
yy144:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy145;
			}
yy145:
// 196 "scanner.re"
			{
			token->opcode = PHQL_T_ON;
			return 0;
		}
// 2147 "scanner.c"
yy146:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			case 'A':
			case 'B':
			case 'C':
			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 '_':
			case 'a':
			case 'b':
			case 'c':
			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 yy80;
			case 'D':
			case 'd':	goto yy153;
			default:	goto yy147;
			}
yy147:
// 181 "scanner.re"
			{
			token->opcode = PHQL_T_OR;
			return 0;
		}
// 2223 "scanner.c"
yy148:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy149;
			default:	goto yy81;
			}
yy149:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy150;
			default:	goto yy81;
			}
yy150:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy151;
			default:	goto yy81;
			}
yy151:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy152;
			}
yy152:
// 226 "scanner.re"
			{
			token->opcode = PHQL_T_OUTER;
			return 0;
		}
// 2320 "scanner.c"
yy153:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy154;
			default:	goto yy81;
			}
yy154:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy155;
			default:	goto yy81;
			}
yy155:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy156;
			}
yy156:
// 131 "scanner.re"
			{
			token->opcode = PHQL_T_ORDER;
			return 0;
		}
// 2410 "scanner.c"
yy157:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'S':
			case 's':	goto yy158;
			default:	goto yy81;
			}
yy158:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy159;
			default:	goto yy81;
			}
yy159:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy160;
			default:	goto yy81;
			}
yy160:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy161;
			}
yy161:
// 166 "scanner.re"
			{
			token->opcode = PHQL_T_OFFSET;
			return 0;
		}
// 2507 "scanner.c"
yy162:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy163;
			default:	goto yy81;
			}
yy163:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy164;
			default:	goto yy81;
			}
yy164:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy165;
			default:	goto yy81;
			}
yy165:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy166;
			}
yy166:
// 121 "scanner.re"
			{
			token->opcode = PHQL_T_WHERE;
			return 0;
		}
// 2604 "scanner.c"
yy167:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy168;
			default:	goto yy81;
			}
yy168:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'U':
			case 'u':	goto yy169;
			default:	goto yy81;
			}
yy169:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy170;
			default:	goto yy81;
			}
yy170:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'S':
			case 's':	goto yy171;
			default:	goto yy81;
			}
yy171:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy172;
			}
yy172:
// 116 "scanner.re"
			{
			token->opcode = PHQL_T_VALUES;
			return 0;
		}
// 2708 "scanner.c"
yy173:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 'O':
			case 'P':
			case 'Q':
			case 'R':
			case 'U':
			case 'V':
			case 'W':
			case 'X':
			case 'Y':
			case 'Z':
			case '\\':
			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 'o':
			case 'p':
			case 'q':
			case 'r':
			case 'u':
			case 'v':
			case 'w':
			case 'x':
			case 'y':
			case 'z':	goto yy80;
			case 'N':
			case 'n':	goto yy179;
			case 'S':
			case 's':	goto yy177;
			case 'T':
			case 't':	goto yy178;
			default:	goto yy174;
			}
yy174:
// 191 "scanner.re"
			{
			token->opcode = PHQL_T_IN;
			return 0;
		}
// 2784 "scanner.c"
yy175:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy176;
			}
yy176:
// 236 "scanner.re"
			{
			token->opcode = PHQL_T_IS;
			return 0;
		}
// 2860 "scanner.c"
yy177:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy185;
			default:	goto yy81;
			}
yy178:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy183;
			default:	goto yy81;
			}
yy179:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy180;
			default:	goto yy81;
			}
yy180:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy181;
			default:	goto yy81;
			}
yy181:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy182;
			}
yy182:
// 206 "scanner.re"
			{
			token->opcode = PHQL_T_INNER;
			return 0;
		}
// 2964 "scanner.c"
yy183:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy184;
			}
yy184:
// 111 "scanner.re"
			{
			token->opcode = PHQL_T_INTO;
			return 0;
		}
// 3040 "scanner.c"
yy185:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'R':
			case 'r':	goto yy186;
			default:	goto yy81;
			}
yy186:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy187;
			default:	goto yy81;
			}
yy187:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy188;
			}
yy188:
// 106 "scanner.re"
			{
			token->opcode = PHQL_T_INSERT;
			return 0;
		}
// 3130 "scanner.c"
yy189:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'D':
			case 'd':	goto yy194;
			default:	goto yy81;
			}
yy190:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			case 'A':
			case 'B':
			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 '_':
			case 'a':
			case 'b':
			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 yy80;
			case 'C':
			case 'c':	goto yy192;
			default:	goto yy191;
			}
yy191:
// 101 "scanner.re"
			{
			token->opcode = PHQL_T_AS;
			return 0;
		}
// 3213 "scanner.c"
yy192:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy193;
			}
yy193:
// 141 "scanner.re"
			{
			token->opcode = PHQL_T_ASC;
			return 0;
		}
// 3289 "scanner.c"
yy194:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy195;
			}
yy195:
// 176 "scanner.re"
			{
			token->opcode = PHQL_T_AND;
			return 0;
		}
// 3365 "scanner.c"
yy196:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'O':
			case 'o':	goto yy201;
			default:	goto yy81;
			}
yy197:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy198;
			default:	goto yy81;
			}
yy198:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy199;
			default:	goto yy81;
			}
yy199:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy200;
			}
yy200:
// 231 "scanner.re"
			{
			token->opcode = PHQL_T_FULL;
			return 0;
		}
// 3462 "scanner.c"
yy201:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'M':
			case 'm':	goto yy202;
			default:	goto yy81;
			}
yy202:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy203;
			}
yy203:
// 96 "scanner.re"
			{
			token->opcode = PHQL_T_FROM;
			return 0;
		}
// 3545 "scanner.c"
yy204:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy213;
			case 'S':
			case 's':	goto yy214;
			default:	goto yy81;
			}
yy205:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'S':
			case 's':	goto yy206;
			default:	goto yy81;
			}
yy206:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy207;
			default:	goto yy81;
			}
yy207:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'I':
			case 'i':	goto yy208;
			default:	goto yy81;
			}
yy208:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'N':
			case 'n':	goto yy209;
			default:	goto yy81;
			}
yy209:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'C':
			case 'c':	goto yy210;
			default:	goto yy81;
			}
yy210:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy211;
			default:	goto yy81;
			}
yy211:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy212;
			}
yy212:
// 246 "scanner.re"
			{
			token->opcode = PHQL_T_DISTINCT;
			return 0;
		}
// 3672 "scanner.c"
yy213:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy217;
			default:	goto yy81;
			}
yy214:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'C':
			case 'c':	goto yy215;
			default:	goto yy81;
			}
yy215:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy216;
			}
yy216:
// 146 "scanner.re"
			{
			token->opcode = PHQL_T_DESC;
			return 0;
		}
// 3762 "scanner.c"
yy217:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy218;
			default:	goto yy81;
			}
yy218:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy219;
			default:	goto yy81;
			}
yy219:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy220;
			}
yy220:
// 91 "scanner.re"
			{
			token->opcode = PHQL_T_DELETE;
			return 0;
		}
// 3852 "scanner.c"
yy221:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'L':
			case 'l':	goto yy224;
			case 'T':
			case 't':	goto yy222;
			default:	goto yy81;
			}
yy222:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy223;
			}
yy223:
// 86 "scanner.re"
			{
			token->opcode = PHQL_T_SET;
			return 0;
		}
// 3937 "scanner.c"
yy224:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy225;
			default:	goto yy81;
			}
yy225:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'C':
			case 'c':	goto yy226;
			default:	goto yy81;
			}
yy226:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy227;
			default:	goto yy81;
			}
yy227:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy228;
			}
yy228:
// 126 "scanner.re"
			{
			token->opcode = PHQL_T_SELECT;
			return 0;
		}
// 4034 "scanner.c"
yy229:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'D':
			case 'd':	goto yy230;
			default:	goto yy81;
			}
yy230:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'A':
			case 'a':	goto yy231;
			default:	goto yy81;
			}
yy231:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'T':
			case 't':	goto yy232;
			default:	goto yy81;
			}
yy232:
			yych = *++YYCURSOR;
			switch (yych) {
			case 'E':
			case 'e':	goto yy233;
			default:	goto yy81;
			}
yy233:
			++YYCURSOR;
			switch ((yych = *YYCURSOR)) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 '_':
			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 yy80;
			default:	goto yy234;
			}
yy234:
// 81 "scanner.re"
			{
			token->opcode = PHQL_T_UPDATE;
			return 0;
		}
// 4138 "scanner.c"
yy235:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':
			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 yy235;
			case ':':	goto yy237;
			default:	goto yy77;
			}
yy237:
			++YYCURSOR;
// 73 "scanner.re"
			{
			token->opcode = PHQL_T_SPLACEHOLDER;
			token->value = estrndup(q, YYCURSOR - q - 1);
			token->len = YYCURSOR - q - 1;
			q = YYCURSOR;
			return 0;
		}
// 4219 "scanner.c"
yy239:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy239;
			default:	goto yy241;
			}
yy241:
// 64 "scanner.re"
			{
			token->opcode = PHQL_T_NPLACEHOLDER;
			token->value = estrndup(q, YYCURSOR - q);
			token->len = YYCURSOR - q;
			q = YYCURSOR;
			return 0;
		}
// 4245 "scanner.c"
yy242:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy242;
			default:	goto yy244;
			}
yy244:
// 55 "scanner.re"
			{
			token->opcode = PHQL_T_DOUBLE;
			token->value = estrndup(q, YYCURSOR - q);
			token->len = YYCURSOR - q;
			q = YYCURSOR;
			return 0;
		}
// 4271 "scanner.c"
yy245:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy245;
			default:	goto yy244;
			}
yy247:
			++YYCURSOR;
			yych = *YYCURSOR;
			switch (yych) {
			case '.':	goto yy245;
			case '0':
			case '1':
			case '2':
			case '3':
			case '4':
			case '5':
			case '6':
			case '7':
			case '8':
			case '9':	goto yy247;
			default:	goto yy3;
			}
		}
// 393 "scanner.re"

	}

	return status;
}
