diff --git a/ext/db/adapter/pdo.c b/ext/db/adapter/pdo.c index ed7653ff95d..985fce41257 100644 --- a/ext/db/adapter/pdo.c +++ b/ext/db/adapter/pdo.c @@ -351,8 +351,15 @@ PHP_METHOD(Phalcon_Db_Adapter_Pdo, executePrepared){ Z_UNSET_ISREF_P(cast_value); } else { + PHALCON_INIT_NVAR(type); + ZVAL_LONG(type, 2 /* BIND_PARAM_STR */); + Z_SET_ISREF_P(value); + phalcon_call_method_p3_noret(statement, "bindparam", parameter, value, type); + Z_UNSET_ISREF_P(value); +/* PHALCON_THROW_EXCEPTION_STR(phalcon_db_exception_ce, "Invalid bind type parameter"); return; +*/ } } else { Z_SET_ISREF_P(value); diff --git a/ext/db/dialect.c b/ext/db/dialect.c index 5911b88fbe5..3454b4a1914 100644 --- a/ext/db/dialect.c +++ b/ext/db/dialect.c @@ -584,8 +584,9 @@ PHP_METHOD(Phalcon_Db_Dialect, select){ zval *group_clause, *having_conditions, *having_expression; zval *order_fields, *order_items, *order_item = NULL; zval *order_expression = NULL, *order_sql_item = NULL, *sql_order_type = NULL; - zval *order_sql_item_type = NULL, *order_sql, *limit_value; - zval *number, *offset; + zval *order_sql_item_type = NULL, *order_sql, *tmp1 = NULL, *tmp2 = NULL; + zval **limit_value; + zval **number, **offset; HashTable *ah0, *ah1, *ah2, *ah3, *ah4, *ah5; HashPosition hp0, hp1, hp2, hp3, hp4, hp5; zval **hd; @@ -910,27 +911,25 @@ PHP_METHOD(Phalcon_Db_Dialect, select){ /** * Check for a LIMIT condition */ - if (phalcon_array_isset_string(definition, SS("limit"))) { - - PHALCON_OBS_VAR(limit_value); - phalcon_array_fetch_string(&limit_value, definition, SL("limit"), PH_NOISY); - if (Z_TYPE_P(limit_value) == IS_ARRAY) { - - PHALCON_OBS_VAR(number); - phalcon_array_fetch_string(&number, limit_value, SL("number"), PH_NOISY); - - /** - * Check for a OFFSET condition - */ - if (phalcon_array_isset_string(limit_value, SS("offset"))) { - PHALCON_OBS_VAR(offset); - phalcon_array_fetch_string(&offset, limit_value, SL("offset"), PH_NOISY); - PHALCON_SCONCAT_SVSV(sql, " LIMIT ", number, " OFFSET ", offset); - } else { - PHALCON_SCONCAT_SV(sql, " LIMIT ", number); + if (phalcon_array_isset_string_fetch(&limit_value, definition, SS("limit"))) { + if (likely(Z_TYPE_PP(limit_value) == IS_ARRAY)) { + if (likely(phalcon_array_isset_string_fetch(&number, *limit_value, SS("number")))) { + PHALCON_OBS_NVAR(tmp1); + phalcon_array_fetch_string(&tmp1, *number, SL("value"), PH_NOISY); + + /** + * Check for a OFFSET condition + */ + if (phalcon_array_isset_string_fetch(&offset, *limit_value, SS("offset"))) { + PHALCON_OBS_NVAR(tmp2); + phalcon_array_fetch_string(&tmp2, *offset, SL("value"), PH_NOISY); + PHALCON_SCONCAT_SVSV(sql, " LIMIT ", tmp1, " OFFSET ", tmp2); + } else { + PHALCON_SCONCAT_SV(sql, " LIMIT ", tmp1); + } } } else { - PHALCON_SCONCAT_SV(sql, " LIMIT ", limit_value); + PHALCON_SCONCAT_SV(sql, " LIMIT ", *limit_value); } } diff --git a/ext/db/dialect/oracle.c b/ext/db/dialect/oracle.c index d40c0031d63..1c08a742d00 100644 --- a/ext/db/dialect/oracle.c +++ b/ext/db/dialect/oracle.c @@ -851,8 +851,8 @@ PHP_METHOD(Phalcon_Db_Dialect_Oracle, select){ zval *group_clause, *having_conditions, *having_expression; zval *order_fields, *order_items, *order_item = NULL; zval *order_expression = NULL, *order_sql_item = NULL, *sql_order_type = NULL; - zval *order_sql_item_type = NULL, *order_sql, *limit_value; - zval *number, *offset; + zval *order_sql_item_type = NULL, *order_sql, **limit_value; + zval **number, **offset, *tmp1 = NULL, *tmp2 = NULL; zval *one, *ini_range, *end_range, *sql_limit; HashTable *ah0, *ah1, *ah2, *ah3, *ah4, *ah5; HashPosition hp0, hp1, hp2, hp3, hp4, hp5; @@ -1183,50 +1183,39 @@ PHP_METHOD(Phalcon_Db_Dialect_Oracle, select){ * Unfortunately because we use the column wildcard "*", * this puts an extra column into the query result set. */ - if (phalcon_array_isset_string(definition, SS("limit"))) { + if (phalcon_array_isset_string_fetch(&limit_value, definition, SS("limit"))) { + if (likely(Z_TYPE_PP(limit_value) == IS_ARRAY)) { + if (likely(phalcon_array_isset_string_fetch(&number, *limit_value, SS("number")))) { + PHALCON_OBS_NVAR(tmp1); + phalcon_array_fetch_string(&tmp1, *number, SL("value"), PH_NOISY); + + if (phalcon_array_isset_string_fetch(&offset, *limit_value, SS("offset"))) { + PHALCON_OBS_NVAR(tmp2); + phalcon_array_fetch_string(&tmp2, *offset, SL("value"), PH_NOISY); + } else { + PHALCON_INIT_NVAR(tmp2); + ZVAL_LONG(tmp2, 0); + } - PHALCON_OBS_VAR(limit_value); - phalcon_array_fetch_string(&limit_value, definition, SL("limit"), PH_NOISY); + PHALCON_INIT_VAR(one); + ZVAL_LONG(one, 1); - if (Z_TYPE_P(limit_value) == IS_ARRAY) { + PHALCON_INIT_VAR(ini_range); + phalcon_add_function(ini_range, tmp2, one TSRMLS_CC); - PHALCON_OBS_VAR(number); - phalcon_array_fetch_string(&number, limit_value, SL("number"), PH_NOISY); + PHALCON_INIT_VAR(end_range); + phalcon_add_function(end_range, tmp2, tmp1 TSRMLS_CC); - if (phalcon_array_isset_string(limit_value, SS("offset"))) { - PHALCON_OBS_VAR(offset); - phalcon_array_fetch_string(&offset, limit_value, SL("offset"), PH_NOISY); - } else { - PHALCON_INIT_VAR(offset); - ZVAL_LONG(offset, 0); + PHALCON_INIT_VAR(sql_limit); + PHALCON_SCONCAT_SVSVSV(sql_limit,"SELECT Z2.* FROM (SELECT Z1.*, ROWNUM DB_ROWNUM FROM ( ", sql, " ) Z1 ) Z2 WHERE Z2.DB_ROWNUM BETWEEN ", ini_range , " AND ", end_range ); + PHALCON_CPY_WRT(sql, sql_limit); } - - PHALCON_INIT_VAR(one); - ZVAL_LONG(one, 1); - - PHALCON_INIT_VAR(ini_range); - phalcon_add_function(ini_range, offset, one TSRMLS_CC); - - PHALCON_INIT_VAR(end_range); - phalcon_add_function(end_range, offset, number TSRMLS_CC); - - PHALCON_INIT_VAR(sql_limit); - PHALCON_SCONCAT_SVSVSV(sql_limit,"SELECT Z2.* FROM (SELECT Z1.*, ROWNUM DB_ROWNUM FROM ( ", sql, " ) Z1 ) Z2 WHERE Z2.DB_ROWNUM BETWEEN ", ini_range , " AND ", end_range ); - PHALCON_CPY_WRT(sql, sql_limit); - } else { - PHALCON_INIT_VAR(offset); - ZVAL_LONG(offset, 0); - - PHALCON_INIT_VAR(one); - ZVAL_LONG(one, 1); - PHALCON_INIT_VAR(ini_range); - phalcon_add_function(ini_range, offset, one TSRMLS_CC); + ZVAL_LONG(ini_range, 1); - PHALCON_INIT_VAR(end_range); - phalcon_add_function(end_range, offset, limit_value TSRMLS_CC); + PHALCON_CPY_WRT_CTOR(end_range, *limit_value); PHALCON_INIT_VAR(sql_limit); PHALCON_SCONCAT_SVSVSV(sql_limit,"SELECT Z2.* FROM (SELECT Z1.*, ROWNUM DB_ROWNUM FROM ( ", sql, " ) Z1 ) Z2 WHERE Z2.DB_ROWNUM BETWEEN ", ini_range , " AND ", end_range ); diff --git a/ext/mvc/model/manager.c b/ext/mvc/model/manager.c index 6cf4b645321..8c0c12534cc 100644 --- a/ext/mvc/model/manager.c +++ b/ext/mvc/model/manager.c @@ -2828,17 +2828,21 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, createQuery){ */ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery){ - zval *phql, *placeholders = NULL, *dependency_injector; + zval *phql, *placeholders = NULL, *types = NULL, *dependency_injector; zval *query; PHALCON_MM_GROW(); - phalcon_fetch_params(1, 1, 1, &phql, &placeholders); + phalcon_fetch_params(1, 1, 2, &phql, &placeholders, &types); if (!placeholders) { PHALCON_INIT_VAR(placeholders); } + if (!types) { + PHALCON_INIT_VAR(types); + } + PHALCON_OBS_VAR(dependency_injector); phalcon_read_property_this(&dependency_injector, this_ptr, SL("_dependencyInjector"), PH_NOISY_CC); if (Z_TYPE_P(dependency_injector) != IS_OBJECT) { @@ -2859,7 +2863,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Manager, executeQuery){ /** * Execute the query */ - phalcon_call_method_p1(return_value, query, "execute", placeholders); + phalcon_call_method_p2(return_value, query, "execute", placeholders, types); RETURN_MM(); } diff --git a/ext/mvc/model/manager.h b/ext/mvc/model/manager.h index 6cc0c1dc0b7..3277981642f 100644 --- a/ext/mvc/model/manager.h +++ b/ext/mvc/model/manager.h @@ -332,6 +332,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_manager_executequery, 0, 0, 1) ZEND_ARG_INFO(0, phql) ZEND_ARG_INFO(0, placeholders) + ZEND_ARG_INFO(0, types) ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_INFO_EX(arginfo_phalcon_mvc_model_manager_createbuilder, 0, 0, 0) diff --git a/ext/mvc/model/query.c b/ext/mvc/model/query.c index fd169b4d43b..b6500dbf7f4 100644 --- a/ext/mvc/model/query.c +++ b/ext/mvc/model/query.c @@ -2418,6 +2418,32 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getGroupClause){ RETURN_CTOR(group_parts); } +PHP_METHOD(Phalcon_Mvc_Model_Query, _getLimitClause) { + zval *limit_clause, *tmp = NULL; + zval **limit, **offset; + + phalcon_fetch_params(0, 1, 0, &limit_clause); + assert(Z_TYPE_P(limit_clause) == IS_ARRAY); + + array_init_size(return_value, zend_hash_num_elements(Z_ARRVAL_P(limit_clause))); + + PHALCON_MM_GROW(); + + if (likely(phalcon_array_isset_string_fetch(&limit, limit_clause, SS("number")))) { + PHALCON_INIT_NVAR(tmp); + phalcon_call_method_p1(tmp, getThis(), "_getexpression", *limit); + phalcon_array_update_string(&return_value, SL("number"), &tmp, PH_COPY); + } + + if (phalcon_array_isset_string_fetch(&offset, limit_clause, SS("offset"))) { + PHALCON_INIT_NVAR(tmp); + phalcon_call_method_p1(tmp, getThis(), "_getexpression", *offset); + phalcon_array_update_string(&return_value, SL("offset"), &tmp, PH_COPY); + } + + PHALCON_MM_RESTORE(); +} + /** * Analyzes a SELECT intermediate code and produces an array to be executed later * @@ -2438,7 +2464,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect){ zval *sql_column_group = NULL, *sql_column = NULL, *type = NULL, *sql_select; zval *where, *where_expr, *group_by, *sql_group; zval *having, *having_expr, *order, *sql_order; - zval *limit; + zval **limit, *sql_limit; HashTable *ah0, *ah1, *ah2; HashPosition hp0, hp1, hp2; zval **hd; @@ -2824,10 +2850,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect){ /** * Process LIMIT clause if any */ - if (phalcon_array_isset_string(ast, SS("limit"))) { - PHALCON_OBS_VAR(limit); - phalcon_array_fetch_string(&limit, ast, SL("limit"), PH_NOISY); - phalcon_array_update_string(&sql_select, SL("limit"), &limit, PH_COPY | PH_SEPARATE); + if (phalcon_array_isset_string_fetch(&limit, ast, SS("limit"))) { + PHALCON_INIT_VAR(sql_limit); + phalcon_call_method_p1(sql_limit, this_ptr, "_getlimitclause", *limit); + phalcon_array_update_string(&sql_select, SL("limit"), &sql_limit, PH_COPY); } RETURN_CTOR(sql_select); @@ -3005,7 +3031,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate){ zval *values, *update_values = NULL, *not_quoting = NULL, *update_value = NULL; zval *column = NULL, *sql_column = NULL, *expr_column = NULL, *expr_value = NULL; zval *type = NULL, *value = NULL, *sql_update, *where, *where_expr; - zval *limit; + zval **limit, *sql_limit; HashTable *ah0, *ah1; HashPosition hp0, hp1; zval **hd; @@ -3226,10 +3252,10 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate){ phalcon_array_update_string(&sql_update, SL("where"), &where_expr, PH_COPY | PH_SEPARATE); } - if (phalcon_array_isset_string(ast, SS("limit"))) { - PHALCON_OBS_VAR(limit); - phalcon_array_fetch_string(&limit, ast, SL("limit"), PH_NOISY); - phalcon_array_update_string(&sql_update, SL("limit"), &limit, PH_COPY | PH_SEPARATE); + if (phalcon_array_isset_string_fetch(&limit, ast, SS("limit"))) { + PHALCON_INIT_VAR(sql_limit); + phalcon_call_method_p1(sql_limit, this_ptr, "_getlimitclause", *limit); + phalcon_array_update_string(&sql_update, SL("limit"), &sql_limit, PH_COPY); } RETURN_CTOR(sql_update); @@ -3249,7 +3275,8 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete){ zval *model_name = NULL, *ns_alias = NULL, *real_namespace = NULL; zval *real_model_name = NULL, *model = NULL, *source = NULL, *schema = NULL; zval *complete_source = NULL, *alias = NULL, *sql_delete, *not_quoting; - zval *where, *where_expr, *limit; + zval *where, *where_expr; + zval **limit, *sql_limit; HashTable *ah0; HashPosition hp0; zval **hd; @@ -3407,12 +3434,12 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareDelete){ phalcon_array_update_string(&sql_delete, SL("where"), &where_expr, PH_COPY | PH_SEPARATE); } - if (phalcon_array_isset_string(ast, SS("limit"))) { - PHALCON_OBS_VAR(limit); - phalcon_array_fetch_string(&limit, ast, SL("limit"), PH_NOISY); - phalcon_array_update_string(&sql_delete, SL("limit"), &limit, PH_COPY | PH_SEPARATE); + if (phalcon_array_isset_string_fetch(&limit, ast, SS("limit"))) { + PHALCON_INIT_VAR(sql_limit); + phalcon_call_method_p1(sql_limit, this_ptr, "_getlimitclause", *limit); + phalcon_array_update_string(&sql_delete, SL("limit"), &sql_limit, PH_COPY); } - + RETURN_CTOR(sql_delete); } @@ -3443,7 +3470,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, parse){ */ PHALCON_INIT_VAR(ast); if (phql_parse_phql(ast, phql TSRMLS_CC) == FAILURE) { - return; + RETURN_MM(); } PHALCON_INIT_VAR(ir_phql); diff --git a/ext/mvc/model/query.h b/ext/mvc/model/query.h index a3e948fb473..ee3fae4e7cc 100644 --- a/ext/mvc/model/query.h +++ b/ext/mvc/model/query.h @@ -40,6 +40,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query, _getMultiJoin); PHP_METHOD(Phalcon_Mvc_Model_Query, _getJoins); PHP_METHOD(Phalcon_Mvc_Model_Query, _getOrderClause); PHP_METHOD(Phalcon_Mvc_Model_Query, _getGroupClause); +PHP_METHOD(Phalcon_Mvc_Model_Query, _getLimitClause); PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareSelect); PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareInsert); PHP_METHOD(Phalcon_Mvc_Model_Query, _prepareUpdate); @@ -126,6 +127,7 @@ PHALCON_INIT_FUNCS(phalcon_mvc_model_query_method_entry){ PHP_ME(Phalcon_Mvc_Model_Query, _getJoins, NULL, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model_Query, _getOrderClause, NULL, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model_Query, _getGroupClause, NULL, ZEND_ACC_PROTECTED) + PHP_ME(Phalcon_Mvc_Model_Query, _getLimitClause, NULL, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model_Query, _prepareSelect, NULL, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model_Query, _prepareInsert, NULL, ZEND_ACC_PROTECTED) PHP_ME(Phalcon_Mvc_Model_Query, _prepareUpdate, NULL, ZEND_ACC_PROTECTED) diff --git a/ext/mvc/model/query/base.c b/ext/mvc/model/query/base.c index 62beaa7f60c..295e6dfd75b 100644 --- a/ext/mvc/model/query/base.c +++ b/ext/mvc/model/query/base.c @@ -152,7 +152,7 @@ int phql_parse_phql(zval *result, zval *phql TSRMLS_DC) { ZVAL_NULL(result); if (phql_internal_parse_phql(&result, Z_STRVAL_P(phql), Z_STRLEN_P(phql), &error_msg TSRMLS_CC) == FAILURE) { - PHALCON_THROW_EXCEPTION_STR(phalcon_mvc_model_exception_ce, Z_STRVAL_P(error_msg)); + PHALCON_THROW_EXCEPTION_STRW(phalcon_mvc_model_exception_ce, Z_STRVAL_P(error_msg)); return FAILURE; } diff --git a/ext/mvc/model/query/lang.c b/ext/mvc/model/query/lang.c index 1b6c2eefdc1..26cb564661f 100644 --- a/ext/mvc/model/query/lang.c +++ b/ext/mvc/model/query/lang.c @@ -85,7 +85,7 @@ PHP_METHOD(Phalcon_Mvc_Model_Query_Lang, parsePHQL){ return; } if (phql_parse_phql(return_value, phql TSRMLS_CC) == FAILURE) { - return; + RETURN_MM(); } RETURN_MM(); } diff --git a/ext/mvc/model/query/parser.c b/ext/mvc/model/query/parser.c index 188604ca769..c5e35a5f7a0 100644 --- a/ext/mvc/model/query/parser.c +++ b/ext/mvc/model/query/parser.c @@ -4,7 +4,7 @@ /* First off, code is include which follows the "include" declaration ** in the input file. */ #include -// 38 "parser.lemon" +/* #line 38 "parser.lemon" */ #ifdef HAVE_CONFIG_H @@ -155,19 +155,17 @@ static zval *phql_ret_order_item(zval *column, int sort){ return ret; } -static zval *phql_ret_limit_clause(phql_parser_token *L, phql_parser_token *O) +static zval *phql_ret_limit_clause(zval *L, zval *O) { - zval *ret; + zval *ret, **type, **value; MAKE_STD_ZVAL(ret); - array_init(ret); + array_init_size(ret, 2); - add_assoc_stringl(ret, "number", L->token, L->token_len, 0); - efree(L); + add_assoc_zval(ret, "number", L); if (O != NULL) { - add_assoc_stringl(ret, "offset", O->token, O->token_len, 0); - efree(O); + add_assoc_zval(ret, "offset", O); } return ret; @@ -412,7 +410,7 @@ static zval *phql_ret_func_call(phql_parser_token *name, zval *arguments) } -// 416 "parser.c" +/* #line 414 "parser.c" */ /* Next is all token values, in a form suitable for use by makeheaders. ** This section will be null unless lemon is run with the -m switch. */ @@ -462,23 +460,23 @@ static zval *phql_ret_func_call(phql_parser_token *name, zval *arguments) ** defined, then do no error processing. */ #define YYCODETYPE unsigned char -#define YYNOCODE 114 +#define YYNOCODE 115 #define YYACTIONTYPE unsigned short int #define phql_TOKENTYPE phql_parser_token* typedef union { phql_TOKENTYPE yy0; - zval* yy132; - int yy227; + zval* yy48; + int yy229; } YYMINORTYPE; #define YYSTACKDEPTH 100 #define phql_ARG_SDECL phql_parser_status *status; #define phql_ARG_PDECL ,phql_parser_status *status #define phql_ARG_FETCH phql_parser_status *status = yypParser->status #define phql_ARG_STORE yypParser->status = status -#define YYNSTATE 263 -#define YYNRULE 154 +#define YYNSTATE 266 +#define YYNRULE 157 #define YYERRORSYMBOL 69 -#define YYERRSYMDT yy227 +#define YYERRSYMDT yy229 #define YY_NO_ACTION (YYNSTATE+YYNRULE+2) #define YY_ACCEPT_ACTION (YYNSTATE+YYNRULE+1) #define YY_ERROR_ACTION (YYNSTATE+YYNRULE) @@ -531,79 +529,78 @@ typedef union { ** yy_default[] Default action for each state. */ static YYACTIONTYPE yy_action[] = { - /* 0 */ 72, 78, 50, 52, 54, 56, 58, 60, 40, 42, - /* 10 */ 62, 67, 44, 46, 48, 36, 34, 38, 32, 29, - /* 20 */ 74, 69, 69, 64, 64, 72, 78, 50, 52, 54, - /* 30 */ 56, 58, 60, 40, 42, 62, 67, 44, 46, 48, - /* 40 */ 36, 34, 38, 32, 29, 74, 69, 263, 64, 18, - /* 50 */ 27, 28, 20, 215, 203, 213, 201, 72, 78, 50, - /* 60 */ 52, 54, 56, 58, 60, 40, 42, 62, 67, 44, - /* 70 */ 46, 48, 36, 34, 38, 32, 29, 74, 69, 264, - /* 80 */ 64, 32, 29, 74, 69, 155, 64, 83, 157, 72, - /* 90 */ 78, 50, 52, 54, 56, 58, 60, 40, 42, 62, - /* 100 */ 67, 44, 46, 48, 36, 34, 38, 32, 29, 74, - /* 110 */ 69, 265, 64, 240, 72, 78, 50, 52, 54, 56, - /* 120 */ 58, 60, 40, 42, 62, 67, 44, 46, 48, 36, - /* 130 */ 34, 38, 32, 29, 74, 69, 244, 64, 44, 46, - /* 140 */ 48, 36, 34, 38, 32, 29, 74, 69, 89, 64, - /* 150 */ 36, 34, 38, 32, 29, 74, 69, 108, 64, 72, - /* 160 */ 78, 50, 52, 54, 56, 58, 60, 40, 42, 62, - /* 170 */ 67, 44, 46, 48, 36, 34, 38, 32, 29, 74, - /* 180 */ 69, 266, 64, 50, 52, 54, 56, 58, 60, 40, - /* 190 */ 42, 62, 67, 44, 46, 48, 36, 34, 38, 32, - /* 200 */ 29, 74, 69, 99, 64, 136, 30, 17, 138, 100, - /* 210 */ 102, 104, 198, 65, 128, 93, 181, 182, 184, 186, - /* 220 */ 99, 190, 194, 30, 130, 267, 100, 102, 104, 106, - /* 230 */ 118, 257, 93, 181, 182, 184, 186, 9, 190, 194, - /* 240 */ 8, 16, 110, 141, 80, 86, 106, 113, 111, 112, - /* 250 */ 114, 115, 116, 117, 259, 26, 7, 149, 151, 110, - /* 260 */ 159, 80, 86, 277, 113, 111, 112, 114, 115, 116, - /* 270 */ 117, 208, 109, 162, 30, 23, 135, 100, 102, 104, - /* 280 */ 92, 71, 152, 209, 154, 158, 30, 217, 97, 100, - /* 290 */ 102, 104, 245, 270, 260, 93, 166, 106, 109, 170, - /* 300 */ 204, 168, 169, 361, 96, 126, 92, 119, 11, 106, - /* 310 */ 110, 179, 80, 86, 13, 113, 111, 112, 114, 115, - /* 320 */ 116, 117, 110, 15, 80, 86, 268, 113, 111, 112, - /* 330 */ 114, 115, 116, 117, 40, 42, 62, 67, 44, 46, - /* 340 */ 48, 36, 34, 38, 32, 29, 74, 69, 10, 64, - /* 350 */ 62, 67, 44, 46, 48, 36, 34, 38, 32, 29, - /* 360 */ 74, 69, 76, 64, 362, 71, 418, 1, 2, 3, - /* 370 */ 4, 5, 6, 19, 160, 21, 167, 168, 169, 142, - /* 380 */ 269, 10, 109, 285, 199, 71, 207, 212, 200, 95, - /* 390 */ 92, 119, 271, 164, 206, 239, 147, 226, 22, 75, - /* 400 */ 179, 256, 109, 163, 109, 222, 216, 212, 227, 132, - /* 410 */ 92, 119, 92, 109, 109, 286, 272, 226, 144, 148, - /* 420 */ 226, 92, 92, 26, 109, 233, 71, 229, 227, 21, - /* 430 */ 238, 225, 92, 142, 109, 10, 147, 109, 254, 360, - /* 440 */ 109, 21, 92, 109, 25, 92, 139, 10, 92, 124, - /* 450 */ 97, 92, 98, 109, 165, 109, 253, 279, 205, 146, - /* 460 */ 24, 92, 200, 92, 21, 21, 127, 12, 134, 139, - /* 470 */ 10, 10, 31, 33, 179, 74, 69, 35, 64, 124, - /* 480 */ 171, 175, 37, 39, 41, 109, 70, 120, 43, 109, - /* 490 */ 109, 275, 94, 92, 109, 45, 14, 92, 92, 109, - /* 500 */ 109, 109, 92, 64, 47, 109, 49, 92, 92, 92, - /* 510 */ 51, 53, 109, 92, 246, 55, 57, 120, 200, 77, - /* 520 */ 92, 109, 59, 109, 81, 211, 61, 109, 109, 92, - /* 530 */ 179, 92, 109, 109, 84, 92, 92, 125, 63, 109, - /* 540 */ 92, 92, 66, 109, 97, 68, 10, 92, 73, 79, - /* 550 */ 87, 92, 82, 288, 88, 109, 220, 228, 101, 109, - /* 560 */ 133, 103, 109, 92, 105, 109, 109, 92, 330, 109, - /* 570 */ 92, 109, 210, 92, 92, 109, 107, 92, 109, 92, - /* 580 */ 129, 109, 140, 92, 339, 94, 92, 161, 178, 92, - /* 590 */ 176, 273, 174, 109, 248, 255, 251, 109, 173, 109, - /* 600 */ 280, 92, 21, 281, 109, 92, 282, 92, 10, 109, - /* 610 */ 120, 262, 92, 224, 187, 200, 160, 92, 188, 219, - /* 620 */ 191, 195, 235, 242, 192, 196, 224, 179, 331, 223, - /* 630 */ 340, 179, 160, 250, 251, 122, 85, 90, 230, 242, - /* 640 */ 91, 121, 234, 123, 125, 131, 10, 137, 274, 278, - /* 650 */ 276, 143, 145, 150, 283, 10, 153, 284, 10, 156, - /* 660 */ 290, 10, 289, 287, 291, 180, 173, 172, 177, 312, - /* 670 */ 183, 313, 314, 185, 315, 316, 189, 221, 218, 193, - /* 680 */ 317, 318, 319, 242, 322, 242, 323, 197, 320, 333, - /* 690 */ 202, 236, 363, 332, 214, 237, 342, 241, 231, 249, - /* 700 */ 341, 232, 252, 261, 258, 269, 269, 269, 269, 269, - /* 710 */ 269, 269, 269, 269, 247, 269, 269, 269, 269, 269, - /* 720 */ 269, 269, 269, 243, + /* 0 */ 75, 81, 53, 55, 57, 59, 61, 63, 43, 45, + /* 10 */ 65, 70, 47, 49, 51, 39, 37, 41, 35, 32, + /* 20 */ 77, 72, 72, 67, 67, 75, 81, 53, 55, 57, + /* 30 */ 59, 61, 63, 43, 45, 65, 70, 47, 49, 51, + /* 40 */ 39, 37, 41, 35, 32, 77, 72, 266, 67, 21, + /* 50 */ 30, 31, 23, 218, 206, 216, 204, 75, 81, 53, + /* 60 */ 55, 57, 59, 61, 63, 43, 45, 65, 70, 47, + /* 70 */ 49, 51, 39, 37, 41, 35, 32, 77, 72, 267, + /* 80 */ 67, 35, 32, 77, 72, 158, 67, 86, 160, 75, + /* 90 */ 81, 53, 55, 57, 59, 61, 63, 43, 45, 65, + /* 100 */ 70, 47, 49, 51, 39, 37, 41, 35, 32, 77, + /* 110 */ 72, 268, 67, 243, 75, 81, 53, 55, 57, 59, + /* 120 */ 61, 63, 43, 45, 65, 70, 47, 49, 51, 39, + /* 130 */ 37, 41, 35, 32, 77, 72, 247, 67, 65, 70, + /* 140 */ 47, 49, 51, 39, 37, 41, 35, 32, 77, 72, + /* 150 */ 92, 67, 7, 152, 154, 232, 162, 111, 241, 75, + /* 160 */ 81, 53, 55, 57, 59, 61, 63, 43, 45, 65, + /* 170 */ 70, 47, 49, 51, 39, 37, 41, 35, 32, 77, + /* 180 */ 72, 269, 67, 53, 55, 57, 59, 61, 63, 43, + /* 190 */ 45, 65, 70, 47, 49, 51, 39, 37, 41, 35, + /* 200 */ 32, 77, 72, 102, 67, 270, 33, 9, 168, 103, + /* 210 */ 105, 107, 208, 363, 102, 96, 203, 33, 280, 169, + /* 220 */ 103, 105, 107, 207, 171, 172, 96, 11, 182, 109, + /* 230 */ 121, 39, 37, 41, 35, 32, 77, 72, 13, 67, + /* 240 */ 109, 12, 364, 113, 119, 120, 83, 89, 18, 116, + /* 250 */ 114, 115, 117, 118, 113, 119, 120, 83, 89, 229, + /* 260 */ 116, 114, 115, 117, 118, 211, 273, 225, 33, 17, + /* 270 */ 230, 103, 105, 107, 210, 215, 112, 212, 139, 33, + /* 280 */ 20, 141, 103, 105, 107, 95, 68, 131, 96, 201, + /* 290 */ 365, 109, 112, 184, 185, 187, 189, 133, 193, 197, + /* 300 */ 22, 95, 109, 167, 209, 113, 119, 120, 83, 89, + /* 310 */ 288, 116, 114, 115, 117, 118, 113, 119, 120, 83, + /* 320 */ 89, 10, 116, 114, 115, 117, 118, 43, 45, 65, + /* 330 */ 70, 47, 49, 51, 39, 37, 41, 35, 32, 77, + /* 340 */ 72, 25, 67, 47, 49, 51, 39, 37, 41, 35, + /* 350 */ 32, 77, 72, 271, 67, 424, 1, 2, 3, 4, + /* 360 */ 5, 6, 165, 184, 185, 187, 189, 282, 193, 197, + /* 370 */ 29, 8, 19, 100, 144, 181, 220, 179, 29, 274, + /* 380 */ 275, 248, 73, 263, 242, 176, 74, 112, 27, 99, + /* 390 */ 259, 28, 74, 190, 100, 112, 95, 191, 26, 138, + /* 400 */ 79, 163, 24, 112, 95, 74, 145, 272, 10, 112, + /* 410 */ 130, 129, 95, 122, 289, 174, 178, 98, 95, 122, + /* 420 */ 150, 84, 112, 166, 150, 67, 219, 215, 24, 24, + /* 430 */ 135, 95, 122, 142, 10, 10, 88, 112, 74, 78, + /* 440 */ 229, 112, 147, 151, 112, 202, 95, 149, 236, 203, + /* 450 */ 95, 230, 80, 95, 87, 112, 24, 112, 137, 34, + /* 460 */ 145, 182, 10, 24, 95, 101, 95, 93, 142, 10, + /* 470 */ 229, 257, 14, 15, 16, 112, 112, 77, 72, 100, + /* 480 */ 67, 228, 36, 38, 95, 95, 40, 112, 112, 256, + /* 490 */ 42, 170, 171, 172, 44, 136, 95, 95, 46, 112, + /* 500 */ 112, 127, 90, 112, 48, 50, 52, 112, 95, 95, + /* 510 */ 54, 112, 95, 94, 97, 112, 95, 56, 58, 125, + /* 520 */ 95, 112, 112, 112, 95, 60, 173, 112, 62, 64, + /* 530 */ 95, 95, 95, 66, 112, 112, 95, 124, 182, 123, + /* 540 */ 69, 291, 112, 95, 95, 112, 112, 71, 134, 213, + /* 550 */ 112, 95, 76, 82, 95, 95, 278, 112, 85, 95, + /* 560 */ 91, 276, 97, 104, 112, 106, 95, 333, 108, 112, + /* 570 */ 112, 110, 127, 95, 126, 112, 132, 112, 95, 95, + /* 580 */ 112, 143, 112, 164, 95, 112, 95, 123, 112, 95, + /* 590 */ 24, 95, 342, 112, 95, 177, 10, 95, 112, 283, + /* 600 */ 112, 155, 95, 157, 161, 284, 285, 95, 334, 95, + /* 610 */ 123, 10, 112, 249, 128, 163, 10, 203, 251, 258, + /* 620 */ 254, 95, 245, 265, 214, 222, 194, 203, 198, 182, + /* 630 */ 195, 343, 199, 223, 231, 140, 128, 182, 277, 182, + /* 640 */ 163, 227, 238, 260, 281, 279, 227, 245, 253, 254, + /* 650 */ 146, 148, 153, 286, 10, 156, 287, 226, 233, 159, + /* 660 */ 10, 10, 237, 245, 293, 292, 262, 290, 294, 183, + /* 670 */ 175, 176, 180, 186, 188, 315, 316, 317, 318, 224, + /* 680 */ 319, 320, 192, 321, 325, 326, 245, 196, 322, 200, + /* 690 */ 323, 205, 217, 239, 336, 240, 246, 244, 366, 221, + /* 700 */ 335, 252, 234, 261, 255, 345, 344, 264, 273, 273, + /* 710 */ 273, 273, 235, 273, 273, 273, 250, }; static YYCODETYPE yy_lookahead[] = { /* 0 */ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, @@ -619,155 +616,154 @@ static YYCODETYPE yy_lookahead[] = { /* 100 */ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, /* 110 */ 22, 0, 24, 77, 1, 2, 3, 4, 5, 6, /* 120 */ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, - /* 130 */ 17, 18, 19, 20, 21, 22, 100, 24, 13, 14, - /* 140 */ 15, 16, 17, 18, 19, 20, 21, 22, 60, 24, - /* 150 */ 16, 17, 18, 19, 20, 21, 22, 44, 24, 1, + /* 130 */ 17, 18, 19, 20, 21, 22, 100, 24, 11, 12, + /* 140 */ 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, + /* 150 */ 62, 24, 77, 78, 79, 95, 81, 44, 98, 1, /* 160 */ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, /* 170 */ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, /* 180 */ 22, 0, 24, 3, 4, 5, 6, 7, 8, 9, /* 190 */ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, - /* 200 */ 20, 21, 22, 17, 24, 78, 20, 80, 81, 23, - /* 210 */ 24, 25, 28, 11, 12, 29, 32, 33, 34, 35, - /* 220 */ 17, 37, 38, 20, 22, 0, 23, 24, 25, 43, - /* 230 */ 44, 77, 29, 32, 33, 34, 35, 81, 37, 38, - /* 240 */ 78, 79, 56, 81, 58, 59, 43, 61, 62, 63, - /* 250 */ 64, 65, 66, 67, 100, 86, 77, 78, 79, 56, - /* 260 */ 81, 58, 59, 0, 61, 62, 63, 64, 65, 66, - /* 270 */ 67, 17, 103, 26, 20, 106, 107, 23, 24, 25, - /* 280 */ 111, 86, 78, 29, 80, 81, 20, 40, 28, 23, - /* 290 */ 24, 25, 45, 0, 47, 29, 84, 43, 103, 91, - /* 300 */ 88, 89, 90, 0, 44, 110, 111, 112, 56, 43, - /* 310 */ 56, 103, 58, 59, 56, 61, 62, 63, 64, 65, - /* 320 */ 66, 67, 56, 56, 58, 59, 0, 61, 62, 63, - /* 330 */ 64, 65, 66, 67, 9, 10, 11, 12, 13, 14, - /* 340 */ 15, 16, 17, 18, 19, 20, 21, 22, 55, 24, - /* 350 */ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - /* 360 */ 21, 22, 24, 24, 0, 86, 70, 71, 72, 73, - /* 370 */ 74, 75, 76, 81, 48, 49, 88, 89, 90, 53, - /* 380 */ 0, 55, 103, 0, 87, 86, 85, 86, 91, 110, - /* 390 */ 111, 112, 0, 27, 28, 99, 86, 86, 50, 61, - /* 400 */ 103, 105, 103, 82, 103, 94, 85, 86, 97, 110, - /* 410 */ 111, 112, 111, 103, 103, 0, 0, 86, 108, 109, - /* 420 */ 86, 111, 111, 86, 103, 94, 86, 95, 97, 49, - /* 430 */ 98, 97, 111, 53, 103, 55, 86, 103, 86, 0, - /* 440 */ 103, 49, 111, 103, 107, 111, 54, 55, 111, 30, - /* 450 */ 28, 111, 112, 103, 83, 103, 104, 0, 87, 109, - /* 460 */ 28, 111, 91, 111, 49, 49, 44, 28, 86, 54, - /* 470 */ 55, 55, 86, 86, 103, 21, 22, 86, 24, 30, - /* 480 */ 92, 93, 86, 86, 86, 103, 43, 68, 86, 103, - /* 490 */ 103, 0, 43, 111, 103, 86, 57, 111, 111, 103, - /* 500 */ 103, 103, 111, 24, 86, 103, 86, 111, 111, 111, - /* 510 */ 86, 86, 103, 111, 87, 86, 86, 68, 91, 61, - /* 520 */ 111, 103, 86, 103, 43, 17, 86, 103, 103, 111, - /* 530 */ 103, 111, 103, 103, 29, 111, 111, 29, 86, 103, - /* 540 */ 111, 111, 86, 103, 28, 86, 55, 111, 86, 86, - /* 550 */ 43, 111, 86, 0, 86, 103, 42, 43, 86, 103, - /* 560 */ 44, 86, 103, 111, 86, 103, 103, 111, 0, 103, - /* 570 */ 111, 103, 30, 111, 111, 103, 86, 111, 103, 111, - /* 580 */ 86, 103, 86, 111, 0, 43, 111, 86, 29, 111, - /* 590 */ 31, 0, 86, 103, 101, 102, 103, 103, 39, 103, - /* 600 */ 0, 111, 49, 0, 103, 111, 0, 111, 55, 103, - /* 610 */ 68, 87, 111, 28, 32, 91, 48, 111, 36, 91, - /* 620 */ 32, 32, 28, 55, 36, 36, 28, 103, 0, 44, - /* 630 */ 0, 103, 48, 102, 103, 30, 44, 29, 44, 55, - /* 640 */ 44, 29, 44, 29, 29, 43, 55, 81, 0, 0, - /* 650 */ 0, 50, 28, 81, 0, 55, 81, 0, 55, 81, - /* 660 */ 0, 55, 0, 0, 0, 29, 39, 93, 29, 29, - /* 670 */ 32, 29, 29, 32, 29, 29, 32, 43, 41, 32, - /* 680 */ 29, 29, 29, 55, 0, 55, 0, 32, 29, 0, - /* 690 */ 29, 98, 0, 0, 29, 29, 0, 100, 42, 28, - /* 700 */ 0, 43, 3, 27, 100, 113, 113, 113, 113, 113, - /* 710 */ 113, 113, 113, 113, 46, 113, 113, 113, 113, 113, - /* 720 */ 113, 113, 113, 56, + /* 200 */ 20, 21, 22, 17, 24, 0, 20, 81, 83, 23, + /* 210 */ 24, 25, 87, 0, 17, 29, 91, 20, 0, 84, + /* 220 */ 23, 24, 25, 88, 89, 90, 29, 110, 103, 43, + /* 230 */ 44, 16, 17, 18, 19, 20, 21, 22, 110, 24, + /* 240 */ 43, 28, 0, 57, 58, 59, 60, 61, 110, 63, + /* 250 */ 64, 65, 66, 67, 57, 58, 59, 60, 61, 86, + /* 260 */ 63, 64, 65, 66, 67, 17, 0, 94, 20, 56, + /* 270 */ 97, 23, 24, 25, 85, 86, 103, 29, 78, 20, + /* 280 */ 80, 81, 23, 24, 25, 112, 11, 12, 29, 28, + /* 290 */ 0, 43, 103, 32, 33, 34, 35, 22, 37, 38, + /* 300 */ 81, 112, 43, 27, 28, 57, 58, 59, 60, 61, + /* 310 */ 0, 63, 64, 65, 66, 67, 57, 58, 59, 60, + /* 320 */ 61, 55, 63, 64, 65, 66, 67, 9, 10, 11, + /* 330 */ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, + /* 340 */ 22, 50, 24, 13, 14, 15, 16, 17, 18, 19, + /* 350 */ 20, 21, 22, 0, 24, 70, 71, 72, 73, 74, + /* 360 */ 75, 76, 26, 32, 33, 34, 35, 0, 37, 38, + /* 370 */ 86, 78, 79, 28, 81, 29, 40, 31, 86, 0, + /* 380 */ 0, 45, 43, 47, 99, 39, 86, 103, 28, 44, + /* 390 */ 105, 107, 86, 32, 28, 103, 112, 36, 106, 107, + /* 400 */ 24, 48, 49, 103, 112, 86, 53, 0, 55, 103, + /* 410 */ 44, 111, 112, 113, 0, 92, 93, 111, 112, 113, + /* 420 */ 86, 43, 103, 82, 86, 24, 85, 86, 49, 49, + /* 430 */ 111, 112, 113, 54, 55, 55, 44, 103, 86, 63, + /* 440 */ 86, 103, 108, 109, 103, 87, 112, 109, 94, 91, + /* 450 */ 112, 97, 63, 112, 29, 103, 49, 103, 86, 86, + /* 460 */ 53, 103, 55, 49, 112, 113, 112, 29, 54, 55, + /* 470 */ 86, 86, 57, 58, 59, 103, 103, 21, 22, 28, + /* 480 */ 24, 97, 86, 86, 112, 112, 86, 103, 103, 104, + /* 490 */ 86, 88, 89, 90, 86, 44, 112, 112, 86, 103, + /* 500 */ 103, 30, 43, 103, 86, 86, 86, 103, 112, 112, + /* 510 */ 86, 103, 112, 44, 43, 103, 112, 86, 86, 30, + /* 520 */ 112, 103, 103, 103, 112, 86, 91, 103, 86, 86, + /* 530 */ 112, 112, 112, 86, 103, 103, 112, 29, 103, 68, + /* 540 */ 86, 0, 103, 112, 112, 103, 103, 86, 43, 30, + /* 550 */ 103, 112, 86, 86, 112, 112, 0, 103, 86, 112, + /* 560 */ 86, 0, 43, 86, 103, 86, 112, 0, 86, 103, + /* 570 */ 103, 86, 30, 112, 29, 103, 86, 103, 112, 112, + /* 580 */ 103, 86, 103, 86, 112, 103, 112, 68, 103, 112, + /* 590 */ 49, 112, 0, 103, 112, 86, 55, 112, 103, 0, + /* 600 */ 103, 78, 112, 80, 81, 0, 0, 112, 0, 112, + /* 610 */ 68, 55, 103, 87, 29, 48, 55, 91, 101, 102, + /* 620 */ 103, 112, 55, 87, 17, 91, 32, 91, 32, 103, + /* 630 */ 36, 0, 36, 42, 43, 81, 29, 103, 0, 103, + /* 640 */ 48, 28, 28, 77, 0, 0, 28, 55, 102, 103, + /* 650 */ 50, 28, 81, 0, 55, 81, 0, 44, 44, 81, + /* 660 */ 55, 55, 44, 55, 0, 0, 100, 0, 0, 29, + /* 670 */ 93, 39, 29, 32, 32, 29, 29, 29, 29, 43, + /* 680 */ 29, 29, 32, 29, 0, 0, 55, 32, 29, 32, + /* 690 */ 29, 29, 29, 98, 0, 29, 110, 100, 0, 41, + /* 700 */ 0, 28, 42, 100, 3, 0, 0, 27, 114, 114, + /* 710 */ 114, 114, 43, 114, 114, 114, 46, }; #define YY_SHIFT_USE_DFLT (-2) static short yy_shift_ofst[] = { - /* 0 */ 247, 47, 79, 111, 181, 225, 326, 380, 293, 263, - /* 10 */ 252, 439, 258, 303, 267, 364, 392, 416, 491, 383, - /* 20 */ 457, 348, 266, 432, 266, -2, -1, -2, -2, 266, - /* 30 */ 266, 454, 266, 454, 266, 62, 266, 62, 266, 62, - /* 40 */ 266, 339, 266, 339, 266, 134, 266, 134, 266, 134, - /* 50 */ 266, 325, 266, 325, 266, 325, 266, 325, 266, 325, - /* 60 */ 266, 325, 266, 125, 202, 266, 479, 266, 125, 443, - /* 70 */ 203, 158, 266, 158, 338, -2, 458, -2, 266, 180, - /* 80 */ 481, 266, 56, 505, 592, -2, 507, 266, 88, 608, - /* 90 */ 596, -2, -2, 449, 186, 260, -2, 203, -2, -2, - /* 100 */ 266, 0, 266, 479, 266, 479, 266, 113, -2, -2, - /* 110 */ -2, -2, -2, -2, -2, -2, -2, -2, -2, -2, - /* 120 */ 612, 605, 614, -2, 615, -2, 422, -2, 266, 479, - /* 130 */ 602, 203, 516, -2, 454, -2, 591, 648, 649, 266, - /* 140 */ 158, 650, 601, 266, 624, 266, -2, 158, -2, 600, - /* 150 */ 654, 415, 603, 657, 553, 606, 660, 662, 663, 664, - /* 160 */ 266, 158, 254, 366, 636, 184, 201, -2, -2, 636, - /* 170 */ 559, 627, -2, 266, 158, -2, 639, -2, -2, -2, - /* 180 */ 419, 640, 638, 642, 641, 643, 582, 645, 644, 646, - /* 190 */ 588, 651, 647, 652, 589, 653, 655, 659, 636, -2, - /* 200 */ 25, 661, -2, -2, -2, -2, 254, -2, -2, 542, - /* 210 */ 508, -2, 24, 665, -2, -2, -2, 637, 636, 514, - /* 220 */ 634, 266, 585, 684, 266, -2, 158, -2, 666, 594, - /* 230 */ 656, 658, 266, 598, 686, 666, -2, -2, -2, 568, - /* 240 */ 628, 689, 667, 692, 693, 636, 668, 636, 671, 636, - /* 250 */ -2, 699, 266, -2, 158, -2, 584, 630, 696, 700, - /* 260 */ 676, 636, -2, + /* 0 */ 336, 47, 79, 111, 181, 205, 353, 407, 266, 218, + /* 10 */ 415, 213, 415, 242, -2, -2, -2, 415, 290, 379, + /* 20 */ 380, 556, 310, 367, 291, 259, 360, 259, -2, -1, + /* 30 */ -2, -2, 259, 259, 456, 259, 456, 259, 62, 259, + /* 40 */ 62, 259, 62, 259, 127, 259, 127, 259, 215, 259, + /* 50 */ 215, 259, 215, 259, 318, 259, 318, 259, 318, 259, + /* 60 */ 318, 259, 318, 259, 318, 259, 330, 275, 259, 401, + /* 70 */ 259, 330, 339, 197, 158, 259, 158, 376, -2, 389, + /* 80 */ -2, 259, 180, 378, 259, 56, 425, 392, -2, 459, + /* 90 */ 259, 88, 438, 469, -2, -2, 471, 186, 345, -2, + /* 100 */ 197, -2, -2, 259, 0, 259, 401, 259, 401, 259, + /* 110 */ 113, -2, -2, -2, -2, -2, -2, -2, -2, -2, + /* 120 */ -2, -2, -2, 508, 489, 545, -2, 585, -2, 366, + /* 130 */ -2, 259, 401, 505, 197, 451, -2, 456, -2, 561, + /* 140 */ 638, 644, 259, 158, 645, 600, 259, 623, 259, -2, + /* 150 */ 158, -2, 599, 653, 414, 605, 656, 541, 606, 664, + /* 160 */ 665, 667, 668, 259, 158, 248, 276, 640, 261, 331, + /* 170 */ -2, -2, 640, 346, 632, -2, 259, 158, -2, 643, + /* 180 */ -2, -2, -2, 542, 646, 641, 647, 642, 648, 361, + /* 190 */ 649, 650, 651, 594, 652, 655, 654, 596, 659, 657, + /* 200 */ 661, 640, -2, 25, 662, -2, -2, -2, -2, 248, + /* 210 */ -2, -2, 519, 607, -2, 24, 663, -2, -2, -2, + /* 220 */ 658, 640, 591, 636, 259, 613, 684, 259, -2, 158, + /* 230 */ -2, 666, 614, 660, 669, 259, 618, 685, 666, -2, + /* 240 */ -2, -2, 567, 608, 694, 415, 698, 700, 640, 670, + /* 250 */ 640, 673, 640, -2, 701, 259, -2, 158, -2, 592, + /* 260 */ 631, 705, 706, 680, 640, -2, }; #define YY_REDUCE_USE_DFLT (-30) static short yy_reduce_ofst[] = { - /* 0 */ 296, -30, -30, -30, -30, -30, 179, 162, 156, -30, - /* 10 */ -30, -30, -30, -30, -30, -30, 127, -29, 292, -30, - /* 20 */ -30, -30, 169, -30, 337, -30, -30, -30, -30, 382, - /* 30 */ 386, -30, 387, -30, 391, -30, 396, -30, 397, -30, - /* 40 */ 398, -30, 402, -30, 409, -30, 418, -30, 420, -30, - /* 50 */ 424, -30, 425, -30, 429, -30, 430, -30, 436, -30, - /* 60 */ 440, -30, 452, -30, -30, 456, -30, 459, -30, -30, - /* 70 */ 195, -30, 462, -30, -30, -30, -30, -30, 463, -30, - /* 80 */ -30, 466, -30, -30, -30, -30, -30, 468, -30, -30, - /* 90 */ -30, -30, -30, -30, 279, -30, -30, 340, -30, -30, - /* 100 */ 472, -30, 475, -30, 478, -30, 490, -30, -30, -30, + /* 0 */ 285, -30, -30, -30, -30, -30, 75, 293, 126, -30, + /* 10 */ 117, -30, 128, -30, -30, -30, -30, 138, -30, 200, + /* 20 */ -29, 219, -30, -30, -30, 292, -30, 284, -30, -30, + /* 30 */ -30, -30, 372, 373, -30, 396, -30, 397, -30, 400, + /* 40 */ -30, 404, -30, 408, -30, 412, -30, 418, -30, 419, + /* 50 */ -30, 420, -30, 424, -30, 431, -30, 432, -30, 439, + /* 60 */ -30, 442, -30, 443, -30, 447, -30, -30, 454, -30, + /* 70 */ 461, -30, -30, 300, -30, 466, -30, -30, -30, -30, + /* 80 */ -30, 467, -30, -30, 472, -30, -30, -30, -30, -30, + /* 90 */ 474, -30, -30, -30, -30, -30, -30, 306, -30, -30, + /* 100 */ 352, -30, -30, 477, -30, 479, -30, 482, -30, 485, /* 110 */ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - /* 120 */ -30, -30, -30, -30, -30, -30, -30, -30, 494, -30, - /* 130 */ -30, 299, -30, -30, -30, -30, 566, -30, -30, 496, - /* 140 */ -30, -30, -30, 310, -30, 350, -30, -30, -30, 572, - /* 150 */ -30, 204, 575, -30, 7, 578, -30, -30, -30, -30, - /* 160 */ 501, -30, 321, -30, 371, 212, 288, -30, -30, 208, - /* 170 */ 388, 574, -30, 506, -30, -30, -30, -30, -30, -30, + /* 120 */ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, + /* 130 */ -30, 490, -30, -30, 319, -30, -30, -30, -30, 554, + /* 140 */ -30, -30, 495, -30, -30, -30, 334, -30, 338, -30, + /* 150 */ -30, -30, 571, -30, 523, 574, -30, 7, 578, -30, + /* 160 */ -30, -30, -30, 497, -30, 341, -30, 125, 135, 403, + /* 170 */ -30, -30, 435, 323, 577, -30, 509, -30, -30, -30, /* 180 */ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, - /* 190 */ -30, -30, -30, -30, -30, -30, -30, -30, 297, -30, - /* 200 */ -30, -30, -30, -30, -30, -30, 301, -30, -30, -30, - /* 210 */ -30, -30, -30, -30, -30, -30, -30, -30, 528, -30, - /* 220 */ -30, 311, -30, -30, 334, -30, -30, -30, 332, -30, - /* 230 */ -30, -30, 331, -30, -30, 593, -30, -30, -30, 36, - /* 240 */ 597, -30, -30, -30, -30, 427, -30, 493, -30, 531, - /* 250 */ -30, -30, 352, -30, -30, -30, 154, 604, -30, -30, - /* 260 */ -30, 524, -30, + /* 190 */ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, + /* 200 */ -30, 358, -30, -30, -30, -30, -30, -30, -30, 189, + /* 210 */ -30, -30, -30, -30, -30, -30, -30, -30, -30, -30, + /* 220 */ -30, 534, -30, -30, 173, -30, -30, 384, -30, -30, + /* 230 */ -30, 60, -30, -30, -30, 354, -30, -30, 595, -30, + /* 240 */ -30, -30, 36, 597, -30, 586, -30, -30, 526, -30, + /* 250 */ 517, -30, 546, -30, -30, 385, -30, -30, -30, 566, + /* 260 */ 603, -30, -30, -30, 536, -30, }; static YYACTIONTYPE yy_default[] = { - /* 0 */ 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, - /* 10 */ 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, - /* 20 */ 417, 417, 417, 349, 417, 350, 352, 353, 354, 417, - /* 30 */ 417, 364, 417, 366, 417, 367, 417, 368, 417, 369, - /* 40 */ 417, 370, 417, 371, 417, 372, 417, 373, 417, 374, - /* 50 */ 417, 375, 417, 376, 417, 377, 417, 378, 417, 379, - /* 60 */ 417, 380, 417, 381, 417, 417, 382, 417, 383, 417, - /* 70 */ 417, 396, 417, 387, 417, 397, 417, 398, 417, 400, - /* 80 */ 417, 417, 417, 417, 417, 388, 417, 417, 417, 417, - /* 90 */ 417, 389, 390, 416, 417, 417, 391, 417, 393, 395, - /* 100 */ 417, 399, 417, 401, 417, 402, 417, 417, 403, 404, - /* 110 */ 405, 406, 407, 408, 409, 410, 411, 412, 392, 394, - /* 120 */ 417, 414, 417, 413, 417, 415, 417, 385, 417, 384, - /* 130 */ 417, 417, 417, 386, 365, 351, 417, 417, 417, 417, - /* 140 */ 359, 417, 417, 417, 355, 417, 356, 358, 357, 417, - /* 150 */ 417, 417, 417, 417, 417, 417, 417, 417, 417, 417, - /* 160 */ 417, 348, 417, 417, 417, 292, 293, 303, 305, 417, - /* 170 */ 306, 307, 309, 417, 321, 308, 417, 310, 311, 347, - /* 180 */ 416, 417, 417, 417, 417, 417, 417, 417, 417, 417, - /* 190 */ 417, 417, 417, 417, 417, 417, 417, 417, 417, 301, - /* 200 */ 346, 417, 344, 345, 304, 302, 417, 294, 296, 416, - /* 210 */ 417, 297, 300, 417, 298, 299, 295, 417, 417, 417, - /* 220 */ 417, 417, 417, 417, 417, 324, 326, 325, 417, 417, - /* 230 */ 417, 417, 417, 417, 417, 417, 327, 329, 328, 417, - /* 240 */ 417, 417, 417, 417, 417, 417, 417, 417, 334, 417, - /* 250 */ 335, 417, 417, 337, 338, 336, 417, 417, 417, 417, - /* 260 */ 417, 417, 343, + /* 0 */ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, + /* 10 */ 423, 423, 423, 423, 367, 368, 369, 423, 423, 423, + /* 20 */ 423, 423, 423, 423, 423, 423, 352, 423, 353, 355, + /* 30 */ 356, 357, 423, 423, 370, 423, 372, 423, 373, 423, + /* 40 */ 374, 423, 375, 423, 376, 423, 377, 423, 378, 423, + /* 50 */ 379, 423, 380, 423, 381, 423, 382, 423, 383, 423, + /* 60 */ 384, 423, 385, 423, 386, 423, 387, 423, 423, 388, + /* 70 */ 423, 389, 423, 423, 402, 423, 393, 423, 403, 423, + /* 80 */ 404, 423, 406, 423, 423, 423, 423, 423, 394, 423, + /* 90 */ 423, 423, 423, 423, 395, 396, 422, 423, 423, 397, + /* 100 */ 423, 399, 401, 423, 405, 423, 407, 423, 408, 423, + /* 110 */ 423, 409, 410, 411, 412, 413, 414, 415, 416, 417, + /* 120 */ 418, 398, 400, 423, 420, 423, 419, 423, 421, 423, + /* 130 */ 391, 423, 390, 423, 423, 423, 392, 371, 354, 423, + /* 140 */ 423, 423, 423, 362, 423, 423, 423, 358, 423, 359, + /* 150 */ 361, 360, 423, 423, 423, 423, 423, 423, 423, 423, + /* 160 */ 423, 423, 423, 423, 351, 423, 423, 423, 295, 296, + /* 170 */ 306, 308, 423, 309, 310, 312, 423, 324, 311, 423, + /* 180 */ 313, 314, 350, 422, 423, 423, 423, 423, 423, 423, + /* 190 */ 423, 423, 423, 423, 423, 423, 423, 423, 423, 423, + /* 200 */ 423, 423, 304, 349, 423, 347, 348, 307, 305, 423, + /* 210 */ 297, 299, 422, 423, 300, 303, 423, 301, 302, 298, + /* 220 */ 423, 423, 423, 423, 423, 423, 423, 423, 327, 329, + /* 230 */ 328, 423, 423, 423, 423, 423, 423, 423, 423, 330, + /* 240 */ 332, 331, 423, 423, 423, 423, 423, 423, 423, 423, + /* 250 */ 423, 337, 423, 338, 423, 423, 340, 341, 339, 423, + /* 260 */ 423, 423, 423, 423, 423, 346, }; #define YY_SZ_ACTTAB (sizeof(yy_action)/sizeof(yy_action[0])) @@ -867,9 +863,9 @@ static const char *yyTokenName[] = { "PARENTHESES_CLOSE", "UPDATE", "SET", "DELETE", "WHERE", "ORDER", "BY", "ASC", "DESC", "GROUP", "HAVING", "LIMIT", - "INTEGER", "OFFSET", "CAST", "CONVERT", - "USING", "NULL", "STRING", "DOUBLE", - "TRUE", "FALSE", "NPLACEHOLDER", "SPLACEHOLDER", + "OFFSET", "INTEGER", "NPLACEHOLDER", "SPLACEHOLDER", + "CAST", "CONVERT", "USING", "NULL", + "STRING", "DOUBLE", "TRUE", "FALSE", "COLON", "error", "program", "query_language", "select_statement", "insert_statement", "update_statement", "delete_statement", "select_clause", "where_clause", "order_clause", "group_clause", @@ -880,8 +876,8 @@ static const char *yyTokenName[] = { "value_list", "value_item", "field_item", "update_clause", "limit_clause", "update_item_list", "update_item", "qualified_name", "new_value", "delete_clause", "order_list", "order_item", - "group_list", "group_item", "argument_list", "function_call", - "argument_item", + "group_list", "group_item", "integer_or_placeholder", "argument_list", + "function_call", "argument_item", }; #endif /* NDEBUG */ @@ -986,63 +982,66 @@ static const char *yyRuleName[] = { /* 94 */ "group_list ::= group_item", /* 95 */ "group_item ::= expr", /* 96 */ "having_clause ::= HAVING expr", - /* 97 */ "select_limit_clause ::= LIMIT INTEGER", - /* 98 */ "select_limit_clause ::= LIMIT INTEGER COMMA INTEGER", - /* 99 */ "select_limit_clause ::= LIMIT INTEGER OFFSET INTEGER", - /* 100 */ "limit_clause ::= LIMIT INTEGER", - /* 101 */ "expr ::= MINUS expr", - /* 102 */ "expr ::= expr MINUS expr", - /* 103 */ "expr ::= expr PLUS expr", - /* 104 */ "expr ::= expr TIMES expr", - /* 105 */ "expr ::= expr DIVIDE expr", - /* 106 */ "expr ::= expr MOD expr", - /* 107 */ "expr ::= expr AND expr", - /* 108 */ "expr ::= expr OR expr", - /* 109 */ "expr ::= expr BITWISE_AND expr", - /* 110 */ "expr ::= expr BITWISE_OR expr", - /* 111 */ "expr ::= expr BITWISE_XOR expr", - /* 112 */ "expr ::= expr EQUALS expr", - /* 113 */ "expr ::= expr NOTEQUALS expr", - /* 114 */ "expr ::= expr LESS expr", - /* 115 */ "expr ::= expr GREATER expr", - /* 116 */ "expr ::= expr GREATEREQUAL expr", - /* 117 */ "expr ::= expr LESSEQUAL expr", - /* 118 */ "expr ::= expr LIKE expr", - /* 119 */ "expr ::= expr NOT LIKE expr", - /* 120 */ "expr ::= expr ILIKE expr", - /* 121 */ "expr ::= expr NOT ILIKE expr", - /* 122 */ "expr ::= expr IN PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", - /* 123 */ "expr ::= expr NOT IN PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", - /* 124 */ "expr ::= expr AGAINST expr", - /* 125 */ "expr ::= CAST PARENTHESES_OPEN expr AS IDENTIFIER PARENTHESES_CLOSE", - /* 126 */ "expr ::= CONVERT PARENTHESES_OPEN expr USING IDENTIFIER PARENTHESES_CLOSE", - /* 127 */ "expr ::= function_call", - /* 128 */ "function_call ::= IDENTIFIER PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", - /* 129 */ "function_call ::= IDENTIFIER PARENTHESES_OPEN PARENTHESES_CLOSE", - /* 130 */ "argument_list ::= argument_list COMMA argument_item", - /* 131 */ "argument_list ::= argument_item", - /* 132 */ "argument_item ::= TIMES", - /* 133 */ "argument_item ::= expr", - /* 134 */ "expr ::= expr IS NULL", - /* 135 */ "expr ::= expr IS NOT NULL", - /* 136 */ "expr ::= DISTINCT expr", - /* 137 */ "expr ::= expr BETWEEN expr", - /* 138 */ "expr ::= NOT expr", - /* 139 */ "expr ::= BITWISE_NOT expr", - /* 140 */ "expr ::= PARENTHESES_OPEN expr PARENTHESES_CLOSE", - /* 141 */ "expr ::= qualified_name", - /* 142 */ "expr ::= INTEGER", - /* 143 */ "expr ::= STRING", - /* 144 */ "expr ::= DOUBLE", - /* 145 */ "expr ::= NULL", - /* 146 */ "expr ::= TRUE", - /* 147 */ "expr ::= FALSE", - /* 148 */ "expr ::= NPLACEHOLDER", - /* 149 */ "expr ::= SPLACEHOLDER", - /* 150 */ "qualified_name ::= IDENTIFIER COLON IDENTIFIER DOT IDENTIFIER", - /* 151 */ "qualified_name ::= IDENTIFIER COLON IDENTIFIER", - /* 152 */ "qualified_name ::= IDENTIFIER DOT IDENTIFIER", - /* 153 */ "qualified_name ::= IDENTIFIER", + /* 97 */ "select_limit_clause ::= LIMIT integer_or_placeholder", + /* 98 */ "select_limit_clause ::= LIMIT integer_or_placeholder COMMA integer_or_placeholder", + /* 99 */ "select_limit_clause ::= LIMIT integer_or_placeholder OFFSET integer_or_placeholder", + /* 100 */ "limit_clause ::= LIMIT integer_or_placeholder", + /* 101 */ "integer_or_placeholder ::= INTEGER", + /* 102 */ "integer_or_placeholder ::= NPLACEHOLDER", + /* 103 */ "integer_or_placeholder ::= SPLACEHOLDER", + /* 104 */ "expr ::= MINUS expr", + /* 105 */ "expr ::= expr MINUS expr", + /* 106 */ "expr ::= expr PLUS expr", + /* 107 */ "expr ::= expr TIMES expr", + /* 108 */ "expr ::= expr DIVIDE expr", + /* 109 */ "expr ::= expr MOD expr", + /* 110 */ "expr ::= expr AND expr", + /* 111 */ "expr ::= expr OR expr", + /* 112 */ "expr ::= expr BITWISE_AND expr", + /* 113 */ "expr ::= expr BITWISE_OR expr", + /* 114 */ "expr ::= expr BITWISE_XOR expr", + /* 115 */ "expr ::= expr EQUALS expr", + /* 116 */ "expr ::= expr NOTEQUALS expr", + /* 117 */ "expr ::= expr LESS expr", + /* 118 */ "expr ::= expr GREATER expr", + /* 119 */ "expr ::= expr GREATEREQUAL expr", + /* 120 */ "expr ::= expr LESSEQUAL expr", + /* 121 */ "expr ::= expr LIKE expr", + /* 122 */ "expr ::= expr NOT LIKE expr", + /* 123 */ "expr ::= expr ILIKE expr", + /* 124 */ "expr ::= expr NOT ILIKE expr", + /* 125 */ "expr ::= expr IN PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", + /* 126 */ "expr ::= expr NOT IN PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", + /* 127 */ "expr ::= expr AGAINST expr", + /* 128 */ "expr ::= CAST PARENTHESES_OPEN expr AS IDENTIFIER PARENTHESES_CLOSE", + /* 129 */ "expr ::= CONVERT PARENTHESES_OPEN expr USING IDENTIFIER PARENTHESES_CLOSE", + /* 130 */ "expr ::= function_call", + /* 131 */ "function_call ::= IDENTIFIER PARENTHESES_OPEN argument_list PARENTHESES_CLOSE", + /* 132 */ "function_call ::= IDENTIFIER PARENTHESES_OPEN PARENTHESES_CLOSE", + /* 133 */ "argument_list ::= argument_list COMMA argument_item", + /* 134 */ "argument_list ::= argument_item", + /* 135 */ "argument_item ::= TIMES", + /* 136 */ "argument_item ::= expr", + /* 137 */ "expr ::= expr IS NULL", + /* 138 */ "expr ::= expr IS NOT NULL", + /* 139 */ "expr ::= DISTINCT expr", + /* 140 */ "expr ::= expr BETWEEN expr", + /* 141 */ "expr ::= NOT expr", + /* 142 */ "expr ::= BITWISE_NOT expr", + /* 143 */ "expr ::= PARENTHESES_OPEN expr PARENTHESES_CLOSE", + /* 144 */ "expr ::= qualified_name", + /* 145 */ "expr ::= INTEGER", + /* 146 */ "expr ::= STRING", + /* 147 */ "expr ::= DOUBLE", + /* 148 */ "expr ::= NULL", + /* 149 */ "expr ::= TRUE", + /* 150 */ "expr ::= FALSE", + /* 151 */ "expr ::= NPLACEHOLDER", + /* 152 */ "expr ::= SPLACEHOLDER", + /* 153 */ "qualified_name ::= IDENTIFIER COLON IDENTIFIER DOT IDENTIFIER", + /* 154 */ "qualified_name ::= IDENTIFIER COLON IDENTIFIER", + /* 155 */ "qualified_name ::= IDENTIFIER DOT IDENTIFIER", + /* 156 */ "qualified_name ::= IDENTIFIER", }; #endif /* NDEBUG */ @@ -1168,7 +1167,7 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 66: case 67: case 68: -// 513 "parser.lemon" +/* #line 511 "parser.lemon" */ { if ((yypminor->yy0)) { if ((yypminor->yy0)->free_flag) { @@ -1177,7 +1176,7 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ efree((yypminor->yy0)); } } -// 1181 "parser.c" +/* #line 1180 "parser.c" */ break; case 71: case 72: @@ -1215,12 +1214,12 @@ static void yy_destructor(YYCODETYPE yymajor, YYMINORTYPE *yypminor){ case 107: case 108: case 109: - case 110: case 111: case 112: -// 526 "parser.lemon" -{ zval_ptr_dtor(&(yypminor->yy132)); } -// 1224 "parser.c" + case 113: +/* #line 524 "parser.lemon" */ +{ zval_ptr_dtor(&(yypminor->yy48)); } +/* #line 1223 "parser.c" */ break; default: break; /* If no destructor action specified: do nothing */ } @@ -1497,6 +1496,9 @@ static struct { { 81, 4 }, { 81, 4 }, { 100, 2 }, + { 110, 1 }, + { 110, 1 }, + { 110, 1 }, { 86, 2 }, { 86, 3 }, { 86, 3 }, @@ -1524,12 +1526,12 @@ static struct { { 86, 6 }, { 86, 6 }, { 86, 1 }, - { 111, 4 }, + { 112, 4 }, + { 112, 3 }, { 111, 3 }, - { 110, 3 }, - { 110, 1 }, - { 112, 1 }, - { 112, 1 }, + { 111, 1 }, + { 113, 1 }, + { 113, 1 }, { 86, 3 }, { 86, 4 }, { 86, 2 }, @@ -1581,17 +1583,17 @@ static void yy_reduce( /* Beginning here are the reduction cases. A typical example ** follows: ** case 0: - ** // + ** #line ** { ... } // User supplied code - ** // + ** #line ** break; */ case 0: -// 522 "parser.lemon" +/* #line 520 "parser.lemon" */ { - status->ret = yymsp[0].minor.yy132; + status->ret = yymsp[0].minor.yy48; } -// 1595 "parser.c" +/* #line 1597 "parser.c" */ break; case 1: case 2: @@ -1610,200 +1612,200 @@ static void yy_reduce( case 88: case 94: case 95: - case 127: - case 133: - case 141: -// 528 "parser.lemon" + case 130: + case 136: + case 144: +/* #line 526 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; } -// 1621 "parser.c" +/* #line 1623 "parser.c" */ break; case 5: -// 546 "parser.lemon" +/* #line 544 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[0].minor.yy132, NULL, NULL, NULL, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[0].minor.yy48, NULL, NULL, NULL, NULL, NULL); } -// 1628 "parser.c" +/* #line 1630 "parser.c" */ break; case 6: -// 550 "parser.lemon" +/* #line 548 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL, NULL, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL, NULL, NULL, NULL); } -// 1635 "parser.c" +/* #line 1637 "parser.c" */ break; case 7: -// 554 "parser.lemon" +/* #line 552 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL, NULL, NULL); } -// 1642 "parser.c" +/* #line 1644 "parser.c" */ break; case 8: -// 558 "parser.lemon" +/* #line 556 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48, NULL, NULL); } -// 1649 "parser.c" +/* #line 1651 "parser.c" */ break; case 9: -// 562 "parser.lemon" +/* #line 560 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, NULL, yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, NULL, yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL); } -// 1656 "parser.c" +/* #line 1658 "parser.c" */ break; case 10: -// 566 "parser.lemon" +/* #line 564 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, yymsp[0].minor.yy132, yymsp[-1].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, yymsp[0].minor.yy48, yymsp[-1].minor.yy48, NULL, NULL); } -// 1663 "parser.c" +/* #line 1665 "parser.c" */ break; case 11: -// 570 "parser.lemon" +/* #line 568 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-4].minor.yy132, yymsp[-3].minor.yy132, yymsp[-1].minor.yy132, yymsp[-2].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-4].minor.yy48, yymsp[-3].minor.yy48, yymsp[-1].minor.yy48, yymsp[-2].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 1670 "parser.c" +/* #line 1672 "parser.c" */ break; case 12: -// 574 "parser.lemon" +/* #line 572 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-4].minor.yy132, yymsp[-3].minor.yy132, yymsp[0].minor.yy132, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-4].minor.yy48, yymsp[-3].minor.yy48, yymsp[0].minor.yy48, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL); } -// 1677 "parser.c" +/* #line 1679 "parser.c" */ break; case 13: -// 578 "parser.lemon" +/* #line 576 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL, NULL, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL, NULL, NULL, yymsp[0].minor.yy48); } -// 1684 "parser.c" +/* #line 1686 "parser.c" */ break; case 14: -// 582 "parser.lemon" +/* #line 580 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL, NULL, yymsp[0].minor.yy48); } -// 1691 "parser.c" +/* #line 1693 "parser.c" */ break; case 15: -// 586 "parser.lemon" +/* #line 584 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, NULL, yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, NULL, yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 1698 "parser.c" +/* #line 1700 "parser.c" */ break; case 16: -// 590 "parser.lemon" +/* #line 588 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-4].minor.yy132, yymsp[-3].minor.yy132, NULL, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-4].minor.yy48, yymsp[-3].minor.yy48, NULL, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 1705 "parser.c" +/* #line 1707 "parser.c" */ break; case 17: -// 594 "parser.lemon" +/* #line 592 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132, NULL, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48, NULL, NULL, NULL); } -// 1712 "parser.c" +/* #line 1714 "parser.c" */ break; case 18: -// 598 "parser.lemon" +/* #line 596 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, NULL, yymsp[0].minor.yy132, yymsp[-1].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, NULL, yymsp[0].minor.yy48, yymsp[-1].minor.yy48, NULL, NULL); } -// 1719 "parser.c" +/* #line 1721 "parser.c" */ break; case 19: -// 602 "parser.lemon" +/* #line 600 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, NULL, yymsp[0].minor.yy132, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, NULL, yymsp[0].minor.yy48, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL); } -// 1726 "parser.c" +/* #line 1728 "parser.c" */ break; case 20: -// 606 "parser.lemon" +/* #line 604 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, NULL, yymsp[-1].minor.yy132, NULL, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, NULL, yymsp[-1].minor.yy48, NULL, NULL, yymsp[0].minor.yy48); } -// 1733 "parser.c" +/* #line 1735 "parser.c" */ break; case 21: -// 610 "parser.lemon" +/* #line 608 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, NULL, yymsp[-1].minor.yy132, yymsp[-2].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, NULL, yymsp[-1].minor.yy48, yymsp[-2].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 1740 "parser.c" +/* #line 1742 "parser.c" */ break; case 22: -// 614 "parser.lemon" +/* #line 612 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-5].minor.yy132, yymsp[-4].minor.yy132, yymsp[-1].minor.yy132, yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-5].minor.yy48, yymsp[-4].minor.yy48, yymsp[-1].minor.yy48, yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); } -// 1747 "parser.c" +/* #line 1749 "parser.c" */ break; case 23: -// 618 "parser.lemon" +/* #line 616 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-1].minor.yy132, NULL, NULL, yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-1].minor.yy48, NULL, NULL, yymsp[0].minor.yy48, NULL, NULL); } -// 1754 "parser.c" +/* #line 1756 "parser.c" */ break; case 24: -// 622 "parser.lemon" +/* #line 620 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, NULL, NULL, yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, NULL, NULL, yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 1761 "parser.c" +/* #line 1763 "parser.c" */ break; case 25: -// 626 "parser.lemon" +/* #line 624 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-2].minor.yy132, NULL, NULL, yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-2].minor.yy48, NULL, NULL, yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL); } -// 1768 "parser.c" +/* #line 1770 "parser.c" */ break; case 26: -// 630 "parser.lemon" +/* #line 628 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-3].minor.yy132, NULL, NULL, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-3].minor.yy48, NULL, NULL, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 1775 "parser.c" +/* #line 1777 "parser.c" */ break; case 27: -// 634 "parser.lemon" +/* #line 632 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-4].minor.yy132, NULL, yymsp[-1].minor.yy132, yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-4].minor.yy48, NULL, yymsp[-1].minor.yy48, yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); } -// 1782 "parser.c" +/* #line 1784 "parser.c" */ break; case 28: -// 638 "parser.lemon" +/* #line 636 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_statement(yymsp[-1].minor.yy132, NULL, NULL, NULL, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_statement(yymsp[-1].minor.yy48, NULL, NULL, NULL, NULL, yymsp[0].minor.yy48); } -// 1789 "parser.c" +/* #line 1791 "parser.c" */ break; case 29: -// 644 "parser.lemon" +/* #line 642 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_clause(yymsp[-2].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_select_clause(yymsp[-2].minor.yy48, yymsp[0].minor.yy48, NULL); yy_destructor(26,&yymsp[-3].minor); yy_destructor(27,&yymsp[-1].minor); } -// 1798 "parser.c" +/* #line 1800 "parser.c" */ break; case 30: -// 648 "parser.lemon" +/* #line 646 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_select_clause(yymsp[-3].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_select_clause(yymsp[-3].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); yy_destructor(26,&yymsp[-4].minor); yy_destructor(27,&yymsp[-2].minor); } -// 1807 "parser.c" +/* #line 1809 "parser.c" */ break; case 31: case 38: @@ -1812,213 +1814,213 @@ static void yy_reduce( case 72: case 87: case 93: - case 130: -// 654 "parser.lemon" + case 133: +/* #line 652 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_zval_list(yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_zval_list(yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(28,&yymsp[-1].minor); } -// 1822 "parser.c" +/* #line 1824 "parser.c" */ break; case 33: - case 132: -// 664 "parser.lemon" + case 135: +/* #line 662 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_column_item(PHQL_T_ALL, NULL, NULL, NULL); + yygotominor.yy48 = phql_ret_column_item(PHQL_T_ALL, NULL, NULL, NULL); yy_destructor(17,&yymsp[0].minor); } -// 1831 "parser.c" +/* #line 1833 "parser.c" */ break; case 34: -// 668 "parser.lemon" +/* #line 666 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_column_item(PHQL_T_DOMAINALL, NULL, yymsp[-2].minor.yy0, NULL); + yygotominor.yy48 = phql_ret_column_item(PHQL_T_DOMAINALL, NULL, yymsp[-2].minor.yy0, NULL); yy_destructor(30,&yymsp[-1].minor); yy_destructor(17,&yymsp[0].minor); } -// 1840 "parser.c" +/* #line 1842 "parser.c" */ break; case 35: -// 672 "parser.lemon" +/* #line 670 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_column_item(PHQL_T_EXPR, yymsp[-2].minor.yy132, NULL, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_column_item(PHQL_T_EXPR, yymsp[-2].minor.yy48, NULL, yymsp[0].minor.yy0); yy_destructor(31,&yymsp[-1].minor); } -// 1848 "parser.c" +/* #line 1850 "parser.c" */ break; case 36: -// 676 "parser.lemon" +/* #line 674 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_column_item(PHQL_T_EXPR, yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_column_item(PHQL_T_EXPR, yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy0); } -// 1855 "parser.c" +/* #line 1857 "parser.c" */ break; case 37: -// 680 "parser.lemon" +/* #line 678 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_column_item(PHQL_T_EXPR, yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_column_item(PHQL_T_EXPR, yymsp[0].minor.yy48, NULL, NULL); } -// 1862 "parser.c" +/* #line 1864 "parser.c" */ break; case 40: -// 696 "parser.lemon" +/* #line 694 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_zval_list(yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_zval_list(yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 1869 "parser.c" +/* #line 1871 "parser.c" */ break; case 43: -// 713 "parser.lemon" +/* #line 711 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_item(yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_join_item(yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL, NULL); } -// 1876 "parser.c" +/* #line 1878 "parser.c" */ break; case 44: -// 718 "parser.lemon" +/* #line 716 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_item(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_join_item(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL); } -// 1883 "parser.c" +/* #line 1885 "parser.c" */ break; case 45: -// 723 "parser.lemon" +/* #line 721 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_item(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_join_item(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 1890 "parser.c" +/* #line 1892 "parser.c" */ break; case 46: -// 728 "parser.lemon" +/* #line 726 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_item(yymsp[-3].minor.yy132, yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_join_item(yymsp[-3].minor.yy48, yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 1897 "parser.c" +/* #line 1899 "parser.c" */ break; case 47: -// 734 "parser.lemon" +/* #line 732 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_qualified_name(NULL, NULL, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_qualified_name(NULL, NULL, yymsp[0].minor.yy0); yy_destructor(31,&yymsp[-1].minor); } -// 1905 "parser.c" +/* #line 1907 "parser.c" */ break; case 48: case 66: - case 153: -// 738 "parser.lemon" + case 156: +/* #line 736 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_qualified_name(NULL, NULL, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_qualified_name(NULL, NULL, yymsp[0].minor.yy0); } -// 1914 "parser.c" +/* #line 1916 "parser.c" */ break; case 49: -// 744 "parser.lemon" +/* #line 742 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_INNERJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_INNERJOIN); yy_destructor(32,&yymsp[0].minor); } -// 1922 "parser.c" +/* #line 1924 "parser.c" */ break; case 50: -// 748 "parser.lemon" +/* #line 746 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_INNERJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_INNERJOIN); yy_destructor(33,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1931 "parser.c" +/* #line 1933 "parser.c" */ break; case 51: -// 752 "parser.lemon" +/* #line 750 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_CROSSJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_CROSSJOIN); yy_destructor(34,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1940 "parser.c" +/* #line 1942 "parser.c" */ break; case 52: -// 756 "parser.lemon" +/* #line 754 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_LEFTJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_LEFTJOIN); yy_destructor(35,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1949 "parser.c" +/* #line 1951 "parser.c" */ break; case 53: -// 760 "parser.lemon" +/* #line 758 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_LEFTJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_LEFTJOIN); yy_destructor(35,&yymsp[-2].minor); yy_destructor(36,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1959 "parser.c" +/* #line 1961 "parser.c" */ break; case 54: -// 764 "parser.lemon" +/* #line 762 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_RIGHTJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_RIGHTJOIN); yy_destructor(37,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1968 "parser.c" +/* #line 1970 "parser.c" */ break; case 55: -// 768 "parser.lemon" +/* #line 766 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_RIGHTJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_RIGHTJOIN); yy_destructor(37,&yymsp[-2].minor); yy_destructor(36,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1978 "parser.c" +/* #line 1980 "parser.c" */ break; case 56: -// 772 "parser.lemon" +/* #line 770 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_FULLJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_FULLJOIN); yy_destructor(38,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1987 "parser.c" +/* #line 1989 "parser.c" */ break; case 57: -// 776 "parser.lemon" +/* #line 774 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_join_type(PHQL_T_FULLJOIN); + yygotominor.yy48 = phql_ret_join_type(PHQL_T_FULLJOIN); yy_destructor(38,&yymsp[-2].minor); yy_destructor(36,&yymsp[-1].minor); yy_destructor(32,&yymsp[0].minor); } -// 1997 "parser.c" +/* #line 1999 "parser.c" */ break; case 58: -// 782 "parser.lemon" +/* #line 780 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; yy_destructor(39,&yymsp[-1].minor); } -// 2005 "parser.c" +/* #line 2007 "parser.c" */ break; case 59: -// 789 "parser.lemon" +/* #line 787 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_insert_statement(yymsp[-4].minor.yy132, NULL, yymsp[-1].minor.yy132); + yygotominor.yy48 = phql_ret_insert_statement(yymsp[-4].minor.yy48, NULL, yymsp[-1].minor.yy48); yy_destructor(40,&yymsp[-6].minor); yy_destructor(41,&yymsp[-5].minor); yy_destructor(42,&yymsp[-3].minor); yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2017 "parser.c" +/* #line 2019 "parser.c" */ break; case 60: -// 793 "parser.lemon" +/* #line 791 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_insert_statement(yymsp[-7].minor.yy132, yymsp[-5].minor.yy132, yymsp[-1].minor.yy132); + yygotominor.yy48 = phql_ret_insert_statement(yymsp[-7].minor.yy48, yymsp[-5].minor.yy48, yymsp[-1].minor.yy48); yy_destructor(40,&yymsp[-9].minor); yy_destructor(41,&yymsp[-8].minor); yy_destructor(43,&yymsp[-6].minor); @@ -2027,585 +2029,588 @@ static void yy_reduce( yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2031 "parser.c" +/* #line 2033 "parser.c" */ break; case 67: -// 831 "parser.lemon" +/* #line 829 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_statement(yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_update_statement(yymsp[0].minor.yy48, NULL, NULL); } -// 2038 "parser.c" +/* #line 2040 "parser.c" */ break; case 68: -// 835 "parser.lemon" +/* #line 833 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_statement(yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_update_statement(yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL); } -// 2045 "parser.c" +/* #line 2047 "parser.c" */ break; case 69: -// 839 "parser.lemon" +/* #line 837 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_statement(yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_update_statement(yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 2052 "parser.c" +/* #line 2054 "parser.c" */ break; case 70: -// 843 "parser.lemon" +/* #line 841 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_statement(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_update_statement(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 2059 "parser.c" +/* #line 2061 "parser.c" */ break; case 71: -// 849 "parser.lemon" +/* #line 847 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_clause(yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_update_clause(yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(45,&yymsp[-3].minor); yy_destructor(46,&yymsp[-1].minor); } -// 2068 "parser.c" +/* #line 2070 "parser.c" */ break; case 74: -// 865 "parser.lemon" +/* #line 863 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_update_item(yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_update_item(yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(3,&yymsp[-1].minor); } -// 2076 "parser.c" +/* #line 2078 "parser.c" */ break; case 76: -// 877 "parser.lemon" +/* #line 875 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_delete_statement(yymsp[0].minor.yy132, NULL, NULL); + yygotominor.yy48 = phql_ret_delete_statement(yymsp[0].minor.yy48, NULL, NULL); } -// 2083 "parser.c" +/* #line 2085 "parser.c" */ break; case 77: -// 881 "parser.lemon" +/* #line 879 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_delete_statement(yymsp[-1].minor.yy132, yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_delete_statement(yymsp[-1].minor.yy48, yymsp[0].minor.yy48, NULL); } -// 2090 "parser.c" +/* #line 2092 "parser.c" */ break; case 78: -// 885 "parser.lemon" +/* #line 883 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_delete_statement(yymsp[-1].minor.yy132, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_delete_statement(yymsp[-1].minor.yy48, NULL, yymsp[0].minor.yy48); } -// 2097 "parser.c" +/* #line 2099 "parser.c" */ break; case 79: -// 889 "parser.lemon" +/* #line 887 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_delete_statement(yymsp[-2].minor.yy132, yymsp[-1].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_delete_statement(yymsp[-2].minor.yy48, yymsp[-1].minor.yy48, yymsp[0].minor.yy48); } -// 2104 "parser.c" +/* #line 2106 "parser.c" */ break; case 80: -// 895 "parser.lemon" +/* #line 893 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_delete_clause(yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_delete_clause(yymsp[0].minor.yy48); yy_destructor(47,&yymsp[-2].minor); yy_destructor(27,&yymsp[-1].minor); } -// 2113 "parser.c" +/* #line 2115 "parser.c" */ break; case 81: -// 901 "parser.lemon" +/* #line 899 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_assoc_name(yymsp[-2].minor.yy132, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_assoc_name(yymsp[-2].minor.yy48, yymsp[0].minor.yy0); yy_destructor(31,&yymsp[-1].minor); } -// 2121 "parser.c" +/* #line 2123 "parser.c" */ break; case 82: -// 905 "parser.lemon" +/* #line 903 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_assoc_name(yymsp[-1].minor.yy132, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_assoc_name(yymsp[-1].minor.yy48, yymsp[0].minor.yy0); } -// 2128 "parser.c" +/* #line 2130 "parser.c" */ break; case 83: -// 909 "parser.lemon" +/* #line 907 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_assoc_name(yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_assoc_name(yymsp[0].minor.yy48, NULL); } -// 2135 "parser.c" +/* #line 2137 "parser.c" */ break; case 85: -// 921 "parser.lemon" +/* #line 919 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; yy_destructor(48,&yymsp[-1].minor); } -// 2143 "parser.c" +/* #line 2145 "parser.c" */ break; case 86: -// 927 "parser.lemon" +/* #line 925 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; yy_destructor(49,&yymsp[-2].minor); yy_destructor(50,&yymsp[-1].minor); } -// 2152 "parser.c" +/* #line 2154 "parser.c" */ break; case 89: -// 943 "parser.lemon" +/* #line 941 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_order_item(yymsp[0].minor.yy132, 0); + yygotominor.yy48 = phql_ret_order_item(yymsp[0].minor.yy48, 0); } -// 2159 "parser.c" +/* #line 2161 "parser.c" */ break; case 90: -// 947 "parser.lemon" +/* #line 945 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_order_item(yymsp[-1].minor.yy132, PHQL_T_ASC); + yygotominor.yy48 = phql_ret_order_item(yymsp[-1].minor.yy48, PHQL_T_ASC); yy_destructor(51,&yymsp[0].minor); } -// 2167 "parser.c" +/* #line 2169 "parser.c" */ break; case 91: -// 951 "parser.lemon" +/* #line 949 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_order_item(yymsp[-1].minor.yy132, PHQL_T_DESC); + yygotominor.yy48 = phql_ret_order_item(yymsp[-1].minor.yy48, PHQL_T_DESC); yy_destructor(52,&yymsp[0].minor); } -// 2175 "parser.c" +/* #line 2177 "parser.c" */ break; case 92: -// 957 "parser.lemon" +/* #line 955 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; yy_destructor(53,&yymsp[-2].minor); yy_destructor(50,&yymsp[-1].minor); } -// 2184 "parser.c" +/* #line 2186 "parser.c" */ break; case 96: -// 979 "parser.lemon" +/* #line 977 "parser.lemon" */ { - yygotominor.yy132 = yymsp[0].minor.yy132; + yygotominor.yy48 = yymsp[0].minor.yy48; yy_destructor(54,&yymsp[-1].minor); } -// 2192 "parser.c" +/* #line 2194 "parser.c" */ break; case 97: case 100: -// 985 "parser.lemon" +/* #line 983 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_limit_clause(yymsp[0].minor.yy0, NULL); + yygotominor.yy48 = phql_ret_limit_clause(yymsp[0].minor.yy48, NULL); yy_destructor(55,&yymsp[-1].minor); } -// 2201 "parser.c" +/* #line 2203 "parser.c" */ break; case 98: -// 989 "parser.lemon" +/* #line 987 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_limit_clause(yymsp[0].minor.yy0, yymsp[-2].minor.yy0); + yygotominor.yy48 = phql_ret_limit_clause(yymsp[0].minor.yy48, yymsp[-2].minor.yy48); yy_destructor(55,&yymsp[-3].minor); yy_destructor(28,&yymsp[-1].minor); } -// 2210 "parser.c" +/* #line 2212 "parser.c" */ break; case 99: -// 993 "parser.lemon" +/* #line 991 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_limit_clause(yymsp[-2].minor.yy0, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_limit_clause(yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(55,&yymsp[-3].minor); - yy_destructor(57,&yymsp[-1].minor); + yy_destructor(56,&yymsp[-1].minor); } -// 2219 "parser.c" +/* #line 2221 "parser.c" */ break; case 101: -// 1005 "parser.lemon" + case 145: +/* #line 1001 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_MINUS, NULL, yymsp[0].minor.yy132); - yy_destructor(20,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_INTEGER, yymsp[0].minor.yy0); } -// 2227 "parser.c" +/* #line 2229 "parser.c" */ break; case 102: -// 1009 "parser.lemon" + case 151: +/* #line 1005 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_SUB, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(20,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_placeholder_zval(PHQL_T_NPLACEHOLDER, yymsp[0].minor.yy0); } -// 2235 "parser.c" +/* #line 2237 "parser.c" */ break; case 103: -// 1013 "parser.lemon" + case 152: +/* #line 1009 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_ADD, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(19,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_placeholder_zval(PHQL_T_SPLACEHOLDER, yymsp[0].minor.yy0); } -// 2243 "parser.c" +/* #line 2245 "parser.c" */ break; case 104: -// 1017 "parser.lemon" +/* #line 1015 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_MUL, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(17,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_MINUS, NULL, yymsp[0].minor.yy48); + yy_destructor(20,&yymsp[-1].minor); } -// 2251 "parser.c" +/* #line 2253 "parser.c" */ break; case 105: -// 1021 "parser.lemon" +/* #line 1019 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_DIV, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(16,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_SUB, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(20,&yymsp[-1].minor); } -// 2259 "parser.c" +/* #line 2261 "parser.c" */ break; case 106: -// 1025 "parser.lemon" +/* #line 1023 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_MOD, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(18,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_ADD, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(19,&yymsp[-1].minor); } -// 2267 "parser.c" +/* #line 2269 "parser.c" */ break; case 107: -// 1029 "parser.lemon" +/* #line 1027 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_AND, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(9,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_MUL, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(17,&yymsp[-1].minor); } -// 2275 "parser.c" +/* #line 2277 "parser.c" */ break; case 108: -// 1033 "parser.lemon" +/* #line 1031 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_OR, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(10,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_DIV, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(16,&yymsp[-1].minor); } -// 2283 "parser.c" +/* #line 2285 "parser.c" */ break; case 109: -// 1037 "parser.lemon" +/* #line 1035 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_BITWISE_AND, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(13,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_MOD, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(18,&yymsp[-1].minor); } -// 2291 "parser.c" +/* #line 2293 "parser.c" */ break; case 110: -// 1041 "parser.lemon" +/* #line 1039 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_BITWISE_OR, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(14,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_AND, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(9,&yymsp[-1].minor); } -// 2299 "parser.c" +/* #line 2301 "parser.c" */ break; case 111: -// 1045 "parser.lemon" +/* #line 1043 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_BITWISE_XOR, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(15,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_OR, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(10,&yymsp[-1].minor); } -// 2307 "parser.c" +/* #line 2309 "parser.c" */ break; case 112: -// 1049 "parser.lemon" +/* #line 1047 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_EQUALS, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(3,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_BITWISE_AND, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(13,&yymsp[-1].minor); } -// 2315 "parser.c" +/* #line 2317 "parser.c" */ break; case 113: -// 1053 "parser.lemon" +/* #line 1051 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_NOTEQUALS, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(4,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_BITWISE_OR, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(14,&yymsp[-1].minor); } -// 2323 "parser.c" +/* #line 2325 "parser.c" */ break; case 114: -// 1057 "parser.lemon" +/* #line 1055 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_LESS, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(5,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_BITWISE_XOR, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(15,&yymsp[-1].minor); } -// 2331 "parser.c" +/* #line 2333 "parser.c" */ break; case 115: -// 1061 "parser.lemon" +/* #line 1059 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_GREATER, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(6,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_EQUALS, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(3,&yymsp[-1].minor); } -// 2339 "parser.c" +/* #line 2341 "parser.c" */ break; case 116: -// 1065 "parser.lemon" +/* #line 1063 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_GREATEREQUAL, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(7,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_NOTEQUALS, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(4,&yymsp[-1].minor); } -// 2347 "parser.c" +/* #line 2349 "parser.c" */ break; case 117: -// 1069 "parser.lemon" +/* #line 1067 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_LESSEQUAL, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(8,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_LESS, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(5,&yymsp[-1].minor); } -// 2355 "parser.c" +/* #line 2357 "parser.c" */ break; case 118: -// 1073 "parser.lemon" +/* #line 1071 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_LIKE, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); - yy_destructor(11,&yymsp[-1].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_GREATER, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(6,&yymsp[-1].minor); } -// 2363 "parser.c" +/* #line 2365 "parser.c" */ break; case 119: -// 1077 "parser.lemon" +/* #line 1075 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_NLIKE, yymsp[-3].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_GREATEREQUAL, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(7,&yymsp[-1].minor); +} +/* #line 2373 "parser.c" */ + break; + case 120: +/* #line 1079 "parser.lemon" */ +{ + yygotominor.yy48 = phql_ret_expr(PHQL_T_LESSEQUAL, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(8,&yymsp[-1].minor); +} +/* #line 2381 "parser.c" */ + break; + case 121: +/* #line 1083 "parser.lemon" */ +{ + yygotominor.yy48 = phql_ret_expr(PHQL_T_LIKE, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); + yy_destructor(11,&yymsp[-1].minor); +} +/* #line 2389 "parser.c" */ + break; + case 122: +/* #line 1087 "parser.lemon" */ +{ + yygotominor.yy48 = phql_ret_expr(PHQL_T_NLIKE, yymsp[-3].minor.yy48, yymsp[0].minor.yy48); yy_destructor(24,&yymsp[-2].minor); yy_destructor(11,&yymsp[-1].minor); } -// 2372 "parser.c" +/* #line 2398 "parser.c" */ break; - case 120: -// 1081 "parser.lemon" + case 123: +/* #line 1091 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_ILIKE, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_ILIKE, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(12,&yymsp[-1].minor); } -// 2380 "parser.c" +/* #line 2406 "parser.c" */ break; - case 121: -// 1085 "parser.lemon" + case 124: +/* #line 1095 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_NILIKE, yymsp[-3].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_NILIKE, yymsp[-3].minor.yy48, yymsp[0].minor.yy48); yy_destructor(24,&yymsp[-2].minor); yy_destructor(12,&yymsp[-1].minor); } -// 2389 "parser.c" +/* #line 2415 "parser.c" */ break; - case 122: -// 1089 "parser.lemon" + case 125: +/* #line 1099 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_IN, yymsp[-4].minor.yy132, yymsp[-1].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_IN, yymsp[-4].minor.yy48, yymsp[-1].minor.yy48); yy_destructor(22,&yymsp[-3].minor); yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2399 "parser.c" +/* #line 2425 "parser.c" */ break; - case 123: -// 1093 "parser.lemon" + case 126: +/* #line 1103 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_NOTIN, yymsp[-5].minor.yy132, yymsp[-1].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_NOTIN, yymsp[-5].minor.yy48, yymsp[-1].minor.yy48); yy_destructor(24,&yymsp[-4].minor); yy_destructor(22,&yymsp[-3].minor); yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2410 "parser.c" +/* #line 2436 "parser.c" */ break; - case 124: -// 1097 "parser.lemon" + case 127: +/* #line 1107 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_AGAINST, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_AGAINST, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(1,&yymsp[-1].minor); } -// 2418 "parser.c" +/* #line 2444 "parser.c" */ break; - case 125: -// 1101 "parser.lemon" + case 128: +/* #line 1111 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_CAST, yymsp[-3].minor.yy132, phql_ret_raw_qualified_name(yymsp[-1].minor.yy0, NULL)); - yy_destructor(58,&yymsp[-5].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_CAST, yymsp[-3].minor.yy48, phql_ret_raw_qualified_name(yymsp[-1].minor.yy0, NULL)); + yy_destructor(60,&yymsp[-5].minor); yy_destructor(43,&yymsp[-4].minor); yy_destructor(31,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2429 "parser.c" +/* #line 2455 "parser.c" */ break; - case 126: -// 1105 "parser.lemon" + case 129: +/* #line 1115 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_CONVERT, yymsp[-3].minor.yy132, phql_ret_raw_qualified_name(yymsp[-1].minor.yy0, NULL)); - yy_destructor(59,&yymsp[-5].minor); + yygotominor.yy48 = phql_ret_expr(PHQL_T_CONVERT, yymsp[-3].minor.yy48, phql_ret_raw_qualified_name(yymsp[-1].minor.yy0, NULL)); + yy_destructor(61,&yymsp[-5].minor); yy_destructor(43,&yymsp[-4].minor); - yy_destructor(60,&yymsp[-2].minor); + yy_destructor(62,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2440 "parser.c" +/* #line 2466 "parser.c" */ break; - case 128: -// 1115 "parser.lemon" + case 131: +/* #line 1125 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_func_call(yymsp[-3].minor.yy0, yymsp[-1].minor.yy132); + yygotominor.yy48 = phql_ret_func_call(yymsp[-3].minor.yy0, yymsp[-1].minor.yy48); yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2449 "parser.c" +/* #line 2475 "parser.c" */ break; - case 129: -// 1119 "parser.lemon" + case 132: +/* #line 1129 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_func_call(yymsp[-2].minor.yy0, NULL); + yygotominor.yy48 = phql_ret_func_call(yymsp[-2].minor.yy0, NULL); yy_destructor(43,&yymsp[-1].minor); yy_destructor(44,&yymsp[0].minor); } -// 2458 "parser.c" +/* #line 2484 "parser.c" */ break; - case 131: -// 1129 "parser.lemon" + case 134: +/* #line 1139 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_zval_list(yymsp[0].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_zval_list(yymsp[0].minor.yy48, NULL); } -// 2465 "parser.c" +/* #line 2491 "parser.c" */ break; - case 134: -// 1143 "parser.lemon" + case 137: +/* #line 1153 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_ISNULL, yymsp[-2].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_expr(PHQL_T_ISNULL, yymsp[-2].minor.yy48, NULL); yy_destructor(21,&yymsp[-1].minor); - yy_destructor(61,&yymsp[0].minor); + yy_destructor(63,&yymsp[0].minor); } -// 2474 "parser.c" +/* #line 2500 "parser.c" */ break; - case 135: -// 1147 "parser.lemon" + case 138: +/* #line 1157 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_ISNOTNULL, yymsp[-3].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_expr(PHQL_T_ISNOTNULL, yymsp[-3].minor.yy48, NULL); yy_destructor(21,&yymsp[-2].minor); yy_destructor(24,&yymsp[-1].minor); - yy_destructor(61,&yymsp[0].minor); + yy_destructor(63,&yymsp[0].minor); } -// 2484 "parser.c" +/* #line 2510 "parser.c" */ break; - case 136: -// 1151 "parser.lemon" + case 139: +/* #line 1161 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_DISTINCT, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_DISTINCT, NULL, yymsp[0].minor.yy48); yy_destructor(23,&yymsp[-1].minor); } -// 2492 "parser.c" +/* #line 2518 "parser.c" */ break; - case 137: -// 1155 "parser.lemon" + case 140: +/* #line 1165 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_BETWEEN, yymsp[-2].minor.yy132, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_BETWEEN, yymsp[-2].minor.yy48, yymsp[0].minor.yy48); yy_destructor(2,&yymsp[-1].minor); } -// 2500 "parser.c" +/* #line 2526 "parser.c" */ break; - case 138: -// 1159 "parser.lemon" + case 141: +/* #line 1169 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_NOT, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_NOT, NULL, yymsp[0].minor.yy48); yy_destructor(24,&yymsp[-1].minor); } -// 2508 "parser.c" +/* #line 2534 "parser.c" */ break; - case 139: -// 1163 "parser.lemon" + case 142: +/* #line 1173 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_BITWISE_NOT, NULL, yymsp[0].minor.yy132); + yygotominor.yy48 = phql_ret_expr(PHQL_T_BITWISE_NOT, NULL, yymsp[0].minor.yy48); yy_destructor(25,&yymsp[-1].minor); } -// 2516 "parser.c" +/* #line 2542 "parser.c" */ break; - case 140: -// 1167 "parser.lemon" + case 143: +/* #line 1177 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_expr(PHQL_T_ENCLOSED, yymsp[-1].minor.yy132, NULL); + yygotominor.yy48 = phql_ret_expr(PHQL_T_ENCLOSED, yymsp[-1].minor.yy48, NULL); yy_destructor(43,&yymsp[-2].minor); yy_destructor(44,&yymsp[0].minor); } -// 2525 "parser.c" - break; - case 142: -// 1175 "parser.lemon" -{ - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_INTEGER, yymsp[0].minor.yy0); -} -// 2532 "parser.c" - break; - case 143: -// 1179 "parser.lemon" -{ - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_STRING, yymsp[0].minor.yy0); -} -// 2539 "parser.c" - break; - case 144: -// 1183 "parser.lemon" -{ - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_DOUBLE, yymsp[0].minor.yy0); -} -// 2546 "parser.c" - break; - case 145: -// 1187 "parser.lemon" -{ - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_NULL, NULL); - yy_destructor(61,&yymsp[0].minor); -} -// 2554 "parser.c" +/* #line 2551 "parser.c" */ break; case 146: -// 1191 "parser.lemon" +/* #line 1189 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_TRUE, NULL); - yy_destructor(64,&yymsp[0].minor); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_STRING, yymsp[0].minor.yy0); } -// 2562 "parser.c" +/* #line 2558 "parser.c" */ break; case 147: -// 1195 "parser.lemon" +/* #line 1193 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_literal_zval(PHQL_T_FALSE, NULL); - yy_destructor(65,&yymsp[0].minor); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_DOUBLE, yymsp[0].minor.yy0); } -// 2570 "parser.c" +/* #line 2565 "parser.c" */ break; case 148: -// 1199 "parser.lemon" +/* #line 1197 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_placeholder_zval(PHQL_T_NPLACEHOLDER, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_NULL, NULL); + yy_destructor(63,&yymsp[0].minor); } -// 2577 "parser.c" +/* #line 2573 "parser.c" */ break; case 149: -// 1203 "parser.lemon" +/* #line 1201 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_placeholder_zval(PHQL_T_SPLACEHOLDER, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_TRUE, NULL); + yy_destructor(66,&yymsp[0].minor); } -// 2584 "parser.c" +/* #line 2581 "parser.c" */ break; case 150: -// 1209 "parser.lemon" +/* #line 1205 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_qualified_name(yymsp[-4].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_literal_zval(PHQL_T_FALSE, NULL); + yy_destructor(67,&yymsp[0].minor); +} +/* #line 2589 "parser.c" */ + break; + case 153: +/* #line 1219 "parser.lemon" */ +{ + yygotominor.yy48 = phql_ret_qualified_name(yymsp[-4].minor.yy0, yymsp[-2].minor.yy0, yymsp[0].minor.yy0); yy_destructor(68,&yymsp[-3].minor); yy_destructor(30,&yymsp[-1].minor); } -// 2593 "parser.c" +/* #line 2598 "parser.c" */ break; - case 151: -// 1213 "parser.lemon" + case 154: +/* #line 1223 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_qualified_name(yymsp[-2].minor.yy0, NULL, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_qualified_name(yymsp[-2].minor.yy0, NULL, yymsp[0].minor.yy0); yy_destructor(68,&yymsp[-1].minor); } -// 2601 "parser.c" +/* #line 2606 "parser.c" */ break; - case 152: -// 1217 "parser.lemon" + case 155: +/* #line 1227 "parser.lemon" */ { - yygotominor.yy132 = phql_ret_qualified_name(NULL, yymsp[-2].minor.yy0, yymsp[0].minor.yy0); + yygotominor.yy48 = phql_ret_qualified_name(NULL, yymsp[-2].minor.yy0, yymsp[0].minor.yy0); yy_destructor(30,&yymsp[-1].minor); } -// 2609 "parser.c" +/* #line 2614 "parser.c" */ break; }; yygoto = yyRuleInfo[yyruleno].lhs; @@ -2647,7 +2652,7 @@ static void yy_syntax_error( ){ phql_ARG_FETCH; #define TOKEN (yyminor.yy0) -// 446 "parser.lemon" +/* #line 444 "parser.lemon" */ if (status->scanner_state->start_length) { { @@ -2714,7 +2719,7 @@ static void yy_syntax_error( status->status = PHQL_PARSING_FAILED; -// 2718 "parser.c" +/* #line 2723 "parser.c" */ phql_ARG_STORE; /* Suppress warning about unused %extra_argument variable */ } @@ -3039,7 +3044,7 @@ int phql_parse_phql(zval *result, zval *phql TSRMLS_DC) { ZVAL_NULL(result); if (phql_internal_parse_phql(&result, Z_STRVAL_P(phql), Z_STRLEN_P(phql), &error_msg TSRMLS_CC) == FAILURE) { - PHALCON_THROW_EXCEPTION_STR(phalcon_mvc_model_exception_ce, Z_STRVAL_P(error_msg)); + PHALCON_THROW_EXCEPTION_STRW(phalcon_mvc_model_exception_ce, Z_STRVAL_P(error_msg)); return FAILURE; } diff --git a/ext/mvc/model/query/parser.h b/ext/mvc/model/query/parser.h index 7f71a667cf6..c6c4fcad48a 100644 --- a/ext/mvc/model/query/parser.h +++ b/ext/mvc/model/query/parser.h @@ -53,16 +53,16 @@ #define PHQL_GROUP 53 #define PHQL_HAVING 54 #define PHQL_LIMIT 55 -#define PHQL_INTEGER 56 -#define PHQL_OFFSET 57 -#define PHQL_CAST 58 -#define PHQL_CONVERT 59 -#define PHQL_USING 60 -#define PHQL_NULL 61 -#define PHQL_STRING 62 -#define PHQL_DOUBLE 63 -#define PHQL_TRUE 64 -#define PHQL_FALSE 65 -#define PHQL_NPLACEHOLDER 66 -#define PHQL_SPLACEHOLDER 67 +#define PHQL_OFFSET 56 +#define PHQL_INTEGER 57 +#define PHQL_NPLACEHOLDER 58 +#define PHQL_SPLACEHOLDER 59 +#define PHQL_CAST 60 +#define PHQL_CONVERT 61 +#define PHQL_USING 62 +#define PHQL_NULL 63 +#define PHQL_STRING 64 +#define PHQL_DOUBLE 65 +#define PHQL_TRUE 66 +#define PHQL_FALSE 67 #define PHQL_COLON 68 diff --git a/ext/mvc/model/query/parser.lemon b/ext/mvc/model/query/parser.lemon index f950cd77f5f..c8c3f9921b9 100644 --- a/ext/mvc/model/query/parser.lemon +++ b/ext/mvc/model/query/parser.lemon @@ -185,19 +185,17 @@ static zval *phql_ret_order_item(zval *column, int sort){ return ret; } -static zval *phql_ret_limit_clause(phql_parser_token *L, phql_parser_token *O) +static zval *phql_ret_limit_clause(zval *L, zval *O) { - zval *ret; + zval *ret, **type, **value; MAKE_STD_ZVAL(ret); - array_init(ret); + array_init_size(ret, 2); - add_assoc_stringl(ret, "number", L->token, L->token_len, 0); - efree(L); + add_assoc_zval(ret, "number", L); if (O != NULL) { - add_assoc_stringl(ret, "offset", O->token, O->token_len, 0); - efree(O); + add_assoc_zval(ret, "offset", O); } return ret; @@ -982,24 +980,36 @@ having_clause(R) ::= HAVING expr(E) . { %destructor select_limit_clause { zval_ptr_dtor(&$$); } -select_limit_clause(R) ::= LIMIT INTEGER(I) . { +select_limit_clause(R) ::= LIMIT integer_or_placeholder(I) . { R = phql_ret_limit_clause(I, NULL); } -select_limit_clause(R) ::= LIMIT INTEGER(O) COMMA INTEGER(I). { +select_limit_clause(R) ::= LIMIT integer_or_placeholder(O) COMMA integer_or_placeholder(I). { R = phql_ret_limit_clause(I, O); } -select_limit_clause(R) ::= LIMIT INTEGER(I) OFFSET INTEGER(O). { +select_limit_clause(R) ::= LIMIT integer_or_placeholder(I) OFFSET integer_or_placeholder(O). { R = phql_ret_limit_clause(I, O); } %destructor limit_clause { zval_ptr_dtor(&$$); } -limit_clause(R) ::= LIMIT INTEGER(I) . { +limit_clause(R) ::= LIMIT integer_or_placeholder(I) . { R = phql_ret_limit_clause(I, NULL); } +integer_or_placeholder(R) ::= INTEGER(I) . { + R = phql_ret_literal_zval(PHQL_T_INTEGER, I); +} + +integer_or_placeholder(R) ::= NPLACEHOLDER(P) . { + R = phql_ret_placeholder_zval(PHQL_T_NPLACEHOLDER, P); +} + +integer_or_placeholder(R) ::= SPLACEHOLDER(P) . { + R = phql_ret_placeholder_zval(PHQL_T_SPLACEHOLDER, P); +} + %destructor expr { zval_ptr_dtor(&$$); } expr(R) ::= MINUS expr(E) . { diff --git a/ext/mvc/model/query/scanner.c b/ext/mvc/model/query/scanner.c index 6dc0a4da659..a1f761cbc41 100644 --- a/ext/mvc/model/query/scanner.c +++ b/ext/mvc/model/query/scanner.c @@ -1,5 +1,5 @@ -/* Generated by re2c 0.13.5 on Sun Jun 23 22:30:45 2013 */ -// 1 "scanner.re" +/* Generated by re2c 0.13.5 on Tue Aug 6 23:39:15 2013 */ +/* #line 1 "scanner.re" */ /* +------------------------------------------------------------------------+ @@ -41,10 +41,44 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { while (PHQL_SCANNER_RETCODE_IMPOSSIBLE == status) { -// 45 "scanner.c" +/* #line 45 "scanner.c" */ { YYCTYPE yych; unsigned int yyaccept = 0; + static const unsigned char yybm[] = { + 0, 48, 48, 48, 48, 48, 48, 48, + 48, 52, 52, 48, 48, 52, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 52, 48, 16, 48, 48, 48, 48, 32, + 48, 48, 48, 48, 48, 112, 48, 48, + 248, 248, 248, 248, 248, 248, 248, 248, + 248, 248, 48, 48, 48, 48, 48, 48, + 48, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 48, 8, 48, 48, 120, + 48, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 120, 120, 120, 120, 120, + 120, 120, 120, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, + }; yych = *YYCURSOR; switch (yych) { @@ -143,22 +177,11 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { } yy2: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '.': goto yy288; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy290; - default: goto yy3; - } + if ((yych = *YYCURSOR) == '.') goto yy288; + if (yych <= '/') goto yy3; + if (yych <= '9') goto yy290; yy3: -// 46 "scanner.re" +/* #line 46 "scanner.re" */ { token->opcode = PHQL_T_INTEGER; token->value = estrndup(q, YYCURSOR - q); @@ -166,139 +189,60 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 170 "scanner.c" +/* #line 193 "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 yy285; - default: goto yy5; - } + if ((yych = *YYCURSOR) <= '/') goto yy5; + if (yych <= '9') goto yy285; yy5: -// 353 "scanner.re" +/* #line 353 "scanner.re" */ { token->opcode = PHQL_T_DOT; return 0; } -// 192 "scanner.c" +/* #line 204 "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 yy282; - default: goto yy7; + if (yybm[0+(yych = *YYCURSOR)] & 128) { + goto yy282; } yy7: -// 448 "scanner.re" +/* #line 448 "scanner.re" */ { status = PHQL_SCANNER_RETCODE_ERR; break; } -// 214 "scanner.c" +/* #line 216 "scanner.c" */ yy8: yyaccept = 0; yych = *(YYMARKER = ++YYCURSOR); - switch (yych) { - case '-': - 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 yy278; - default: goto yy9; + if (yybm[0+yych] & 64) { + goto yy278; } yy9: -// 358 "scanner.re" +/* #line 358 "scanner.re" */ { token->opcode = PHQL_T_COLON; return 0; } -// 291 "scanner.c" +/* #line 229 "scanner.c" */ yy10: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case 'P': - case 'p': goto yy267; - case 'S': - case 's': goto yy268; - default: goto yy87; + if ((yych = *YYCURSOR) <= 'S') { + if (yych == 'P') goto yy267; + if (yych <= 'R') goto yy87; + goto yy268; + } else { + if (yych <= 'p') { + if (yych <= 'o') goto yy87; + goto yy267; + } else { + if (yych == 's') goto yy268; + goto yy87; + } } yy11: -// 301 "scanner.re" +/* #line 301 "scanner.re" */ { token->opcode = PHQL_T_IDENTIFIER; if ((YYCURSOR - q) > 1) { @@ -316,156 +260,218 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 320 "scanner.c" +/* #line 264 "scanner.c" */ yy12: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy259; - default: goto yy87; - } + if (yych == 'E') goto yy259; + if (yych == 'e') goto yy259; + goto yy87; yy13: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy242; - case 'I': - case 'i': goto yy243; - default: goto yy87; + if (yych <= 'I') { + if (yych == 'E') goto yy242; + if (yych <= 'H') goto yy87; + goto yy243; + } else { + if (yych <= 'e') { + if (yych <= 'd') goto yy87; + goto yy242; + } else { + if (yych == 'i') goto yy243; + goto yy87; + } } yy14: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy229; - case 'R': - case 'r': goto yy230; - case 'U': - case 'u': goto yy231; - default: goto yy87; + if (yych <= 'U') { + if (yych <= 'Q') { + if (yych == 'A') goto yy229; + goto yy87; + } else { + if (yych <= 'R') goto yy230; + if (yych <= 'T') goto yy87; + goto yy231; + } + } else { + if (yych <= 'q') { + if (yych == 'a') goto yy229; + goto yy87; + } else { + if (yych <= 'r') goto yy230; + if (yych == 'u') goto yy231; + goto yy87; + } } yy15: yych = *++YYCURSOR; - switch (yych) { - case 'G': - case 'g': goto yy215; - case 'N': - case 'n': goto yy216; - case 'S': - case 's': goto yy217; - default: goto yy87; + if (yych <= 'S') { + if (yych <= 'M') { + if (yych == 'G') goto yy215; + goto yy87; + } else { + if (yych <= 'N') goto yy216; + if (yych <= 'R') goto yy87; + goto yy217; + } + } else { + if (yych <= 'm') { + if (yych == 'g') goto yy215; + goto yy87; + } else { + if (yych <= 'n') goto yy216; + if (yych == 's') goto yy217; + goto yy87; + } } yy16: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy194; - case 'N': - case 'n': goto yy195; - case 'S': - case 's': goto yy197; - default: goto yy87; + if (yych <= 'S') { + if (yych <= 'M') { + if (yych == 'L') goto yy194; + goto yy87; + } else { + if (yych <= 'N') goto yy195; + if (yych <= 'R') goto yy87; + goto yy197; + } + } else { + if (yych <= 'm') { + if (yych == 'l') goto yy194; + goto yy87; + } else { + if (yych <= 'n') goto yy195; + if (yych == 's') goto yy197; + goto yy87; + } } yy17: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy188; - default: goto yy87; - } + if (yych == 'A') goto yy188; + if (yych == 'a') goto yy188; + goto yy87; yy18: yych = *++YYCURSOR; - switch (yych) { - case 'H': - case 'h': goto yy183; - default: goto yy87; - } + if (yych == 'H') goto yy183; + if (yych == 'h') goto yy183; + goto yy87; yy19: yych = *++YYCURSOR; - switch (yych) { - case 'F': - case 'f': goto yy164; - case 'N': - case 'n': goto yy165; - case 'R': - case 'r': goto yy167; - case 'U': - case 'u': goto yy169; - default: goto yy87; + if (yych <= 'U') { + if (yych <= 'N') { + if (yych == 'F') goto yy164; + if (yych <= 'M') goto yy87; + goto yy165; + } else { + if (yych == 'R') goto yy167; + if (yych <= 'T') goto yy87; + goto yy169; + } + } else { + if (yych <= 'n') { + if (yych == 'f') goto yy164; + if (yych <= 'm') goto yy87; + goto yy165; + } else { + if (yych <= 'r') { + if (yych <= 'q') goto yy87; + goto yy167; + } else { + if (yych == 'u') goto yy169; + goto yy87; + } + } } yy20: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy155; - case 'Y': - case 'y': goto yy156; - default: goto yy87; + if (yych <= 'Y') { + if (yych == 'E') goto yy155; + if (yych <= 'X') goto yy87; + goto yy156; + } else { + if (yych <= 'e') { + if (yych <= 'd') goto yy87; + goto yy155; + } else { + if (yych == 'y') goto yy156; + goto yy87; + } } yy21: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy150; - default: goto yy87; - } + if (yych == 'R') goto yy150; + if (yych == 'r') goto yy150; + goto yy87; yy22: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy144; - default: goto yy87; - } + if (yych == 'A') goto yy144; + if (yych == 'a') goto yy144; + goto yy87; yy23: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy132; - case 'I': - case 'i': goto yy133; - default: goto yy87; + if (yych <= 'I') { + if (yych == 'E') goto yy132; + if (yych <= 'H') goto yy87; + goto yy133; + } else { + if (yych <= 'e') { + if (yych <= 'd') goto yy87; + goto yy132; + } else { + if (yych == 'i') goto yy133; + goto yy87; + } } yy24: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy125; - case 'U': - case 'u': goto yy126; - default: goto yy87; + if (yych <= 'U') { + if (yych == 'O') goto yy125; + if (yych <= 'T') goto yy87; + goto yy126; + } else { + if (yych <= 'o') { + if (yych <= 'n') goto yy87; + goto yy125; + } else { + if (yych == 'u') goto yy126; + goto yy87; + } } yy25: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy121; - default: goto yy87; - } + if (yych == 'O') goto yy121; + if (yych == 'o') goto yy121; + goto yy87; yy26: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy116; - default: goto yy87; - } + if (yych == 'I') goto yy116; + if (yych == 'i') goto yy116; + goto yy87; yy27: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy100; - case 'O': - case 'o': goto yy101; - case 'R': - case 'r': goto yy102; - default: goto yy87; + if (yych <= 'R') { + if (yych <= 'N') { + if (yych == 'A') goto yy100; + goto yy87; + } else { + if (yych <= 'O') goto yy101; + if (yych <= 'Q') goto yy87; + goto yy102; + } + } else { + if (yych <= 'n') { + if (yych == 'a') goto yy100; + goto yy87; + } else { + if (yych <= 'o') goto yy101; + if (yych == 'r') goto yy102; + goto yy87; + } } yy28: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy96; - default: goto yy87; - } + if (yych == 'R') goto yy96; + if (yych == 'r') goto yy96; + goto yy87; yy29: yyaccept = 1; yych = *(YYMARKER = ++YYCURSOR); @@ -478,61 +484,14 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { goto yy89; yy31: 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 '_': - 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 yy86; - default: goto yy7; + if (yych <= '^') { + if (yych <= '@') goto yy7; + if (yych <= 'Z') goto yy86; + goto yy7; + } else { + if (yych == '`') goto yy7; + if (yych <= 'z') goto yy86; + goto yy7; } yy32: yych = *++YYCURSOR; @@ -540,226 +499,173 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { yy33: yyaccept = 1; 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 '_': - 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 yy81; - default: goto yy7; + if (yych <= '\\') { + if (yych <= '@') goto yy7; + if (yych == '[') goto yy7; + goto yy81; + } else { + if (yych <= '_') { + if (yych <= '^') goto yy7; + goto yy81; + } else { + if (yych <= '`') goto yy7; + if (yych <= 'z') goto yy81; + goto yy7; + } } yy34: ++YYCURSOR; -// 328 "scanner.re" +/* #line 328 "scanner.re" */ { token->opcode = PHQL_T_ADD; return 0; } -// 608 "scanner.c" +/* #line 524 "scanner.c" */ yy36: ++YYCURSOR; -// 333 "scanner.re" +/* #line 333 "scanner.re" */ { token->opcode = PHQL_T_SUB; return 0; } -// 616 "scanner.c" +/* #line 532 "scanner.c" */ yy38: ++YYCURSOR; -// 338 "scanner.re" +/* #line 338 "scanner.re" */ { token->opcode = PHQL_T_MUL; return 0; } -// 624 "scanner.c" +/* #line 540 "scanner.c" */ yy40: ++YYCURSOR; -// 343 "scanner.re" +/* #line 343 "scanner.re" */ { token->opcode = PHQL_T_DIV; return 0; } -// 632 "scanner.c" +/* #line 548 "scanner.c" */ yy42: ++YYCURSOR; -// 348 "scanner.re" +/* #line 348 "scanner.re" */ { token->opcode = PHQL_T_MOD; return 0; } -// 640 "scanner.c" +/* #line 556 "scanner.c" */ yy44: ++YYCURSOR; -// 363 "scanner.re" +/* #line 363 "scanner.re" */ { token->opcode = PHQL_T_COMMA; return 0; } -// 648 "scanner.c" +/* #line 564 "scanner.c" */ yy46: ++YYCURSOR; -// 368 "scanner.re" +/* #line 368 "scanner.re" */ { token->opcode = PHQL_T_PARENTHESES_OPEN; return 0; } -// 656 "scanner.c" +/* #line 572 "scanner.c" */ yy48: ++YYCURSOR; -// 373 "scanner.re" +/* #line 373 "scanner.re" */ { token->opcode = PHQL_T_PARENTHESES_CLOSE; return 0; } -// 664 "scanner.c" +/* #line 580 "scanner.c" */ yy50: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '=': goto yy79; - default: goto yy51; - } -yy51: -// 413 "scanner.re" + if ((yych = *YYCURSOR) == '=') goto yy79; +/* #line 413 "scanner.re" */ { token->opcode = PHQL_T_NOT; return 0; } -// 677 "scanner.c" +/* #line 589 "scanner.c" */ yy52: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '=': goto yy75; - case '>': goto yy77; - default: goto yy53; - } + if ((yych = *YYCURSOR) <= '<') goto yy53; + if (yych <= '=') goto yy75; + if (yych <= '>') goto yy77; yy53: -// 398 "scanner.re" +/* #line 398 "scanner.re" */ { token->opcode = PHQL_T_LESS; return 0; } -// 691 "scanner.c" +/* #line 601 "scanner.c" */ yy54: ++YYCURSOR; - switch ((yych = *YYCURSOR)) { - case '=': goto yy73; - default: goto yy55; - } -yy55: -// 403 "scanner.re" + if ((yych = *YYCURSOR) == '=') goto yy73; +/* #line 403 "scanner.re" */ { token->opcode = PHQL_T_GREATER; return 0; } -// 704 "scanner.c" +/* #line 610 "scanner.c" */ yy56: ++YYCURSOR; -// 408 "scanner.re" +/* #line 408 "scanner.re" */ { token->opcode = PHQL_T_EQUALS; return 0; } -// 712 "scanner.c" +/* #line 618 "scanner.c" */ yy58: ++YYCURSOR; -// 418 "scanner.re" +/* #line 418 "scanner.re" */ { token->opcode = PHQL_T_BITWISE_NOT; return 0; } -// 720 "scanner.c" +/* #line 626 "scanner.c" */ yy60: ++YYCURSOR; -// 423 "scanner.re" +/* #line 423 "scanner.re" */ { token->opcode = PHQL_T_BITWISE_XOR; return 0; } -// 728 "scanner.c" +/* #line 634 "scanner.c" */ yy62: ++YYCURSOR; -// 428 "scanner.re" +/* #line 428 "scanner.re" */ { token->opcode = PHQL_T_BITWISE_AND; return 0; } -// 736 "scanner.c" +/* #line 642 "scanner.c" */ yy64: ++YYCURSOR; -// 433 "scanner.re" +/* #line 433 "scanner.re" */ { token->opcode = PHQL_T_BITWISE_OR; return 0; } -// 744 "scanner.c" +/* #line 650 "scanner.c" */ yy66: ++YYCURSOR; yych = *YYCURSOR; goto yy72; yy67: -// 438 "scanner.re" +/* #line 438 "scanner.re" */ { token->opcode = PHQL_T_IGNORE; return 0; } -// 755 "scanner.c" +/* #line 661 "scanner.c" */ yy68: ++YYCURSOR; -// 443 "scanner.re" +/* #line 443 "scanner.re" */ { status = PHQL_SCANNER_RETCODE_EOF; break; } -// 763 "scanner.c" +/* #line 669 "scanner.c" */ yy70: yych = *++YYCURSOR; goto yy7; @@ -767,125 +673,59 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { ++YYCURSOR; yych = *YYCURSOR; yy72: - switch (yych) { - case '\t': - case '\n': - case '\r': - case ' ': goto yy71; - default: goto yy67; + if (yybm[0+yych] & 4) { + goto yy71; } + goto yy67; yy73: ++YYCURSOR; -// 393 "scanner.re" +/* #line 393 "scanner.re" */ { token->opcode = PHQL_T_GREATEREQUAL; return 0; } -// 785 "scanner.c" +/* #line 688 "scanner.c" */ yy75: ++YYCURSOR; -// 388 "scanner.re" +/* #line 388 "scanner.re" */ { token->opcode = PHQL_T_LESSEQUAL; return 0; } -// 793 "scanner.c" +/* #line 696 "scanner.c" */ yy77: ++YYCURSOR; -// 383 "scanner.re" +/* #line 383 "scanner.re" */ { token->opcode = PHQL_T_NOTEQUALS; return 0; } -// 801 "scanner.c" +/* #line 704 "scanner.c" */ yy79: ++YYCURSOR; -// 378 "scanner.re" +/* #line 378 "scanner.re" */ { token->opcode = PHQL_T_NOTEQUALS; return 0; } -// 809 "scanner.c" +/* #line 712 "scanner.c" */ yy81: ++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 yy81; - case ']': goto yy84; - default: goto yy83; + if (yybm[0+yych] & 8) { + goto yy81; } + if (yych == ']') goto yy84; yy83: YYCURSOR = YYMARKER; - switch (yyaccept) { - case 0: goto yy9; - case 1: goto yy7; + if (yyaccept <= 0) { + goto yy9; + } else { + goto yy7; } yy84: ++YYCURSOR; -// 320 "scanner.re" +/* #line 320 "scanner.re" */ { token->opcode = PHQL_T_IDENTIFIER; token->value = estrndup(q, YYCURSOR - q - 1); @@ -893,98 +733,47 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 897 "scanner.c" +/* #line 737 "scanner.c" */ yy86: ++YYCURSOR; yych = *YYCURSOR; yy87: - 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 yy86; - default: goto yy11; + if (yych <= '[') { + if (yych <= '9') { + if (yych <= '/') goto yy11; + goto yy86; + } else { + if (yych <= '@') goto yy11; + if (yych <= 'Z') goto yy86; + goto yy11; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych <= '^') goto yy11; + goto yy86; + } else { + if (yych <= '`') goto yy11; + if (yych <= 'z') goto yy86; + goto yy11; + } } yy88: ++YYCURSOR; yych = *YYCURSOR; yy89: - switch (yych) { - case 0x00: goto yy83; - case '\'': goto yy91; - case '\\': goto yy90; - default: goto yy88; + if (yybm[0+yych] & 16) { + goto yy88; } -yy90: + if (yych <= 0x00) goto yy83; + if (yych <= '[') goto yy91; ++YYCURSOR; yych = *YYCURSOR; - switch (yych) { - case '\n': goto yy83; - default: goto yy88; - } + if (yych == '\n') goto yy83; + goto yy88; yy91: ++YYCURSOR; -// 292 "scanner.re" +/* #line 292 "scanner.re" */ { token->opcode = PHQL_T_STRING; token->value = estrndup(q, YYCURSOR - q - 1); @@ -992,3982 +781,1536 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 996 "scanner.c" +/* #line 785 "scanner.c" */ yy93: ++YYCURSOR; yych = *YYCURSOR; yy94: - switch (yych) { - case 0x00: goto yy83; - case '"': goto yy91; - case '\\': goto yy95; - default: goto yy93; + if (yybm[0+yych] & 32) { + goto yy93; } -yy95: + if (yych <= 0x00) goto yy83; + if (yych <= '[') goto yy91; ++YYCURSOR; yych = *YYCURSOR; - switch (yych) { - case '\n': goto yy83; - default: goto yy93; - } + if (yych == '\n') goto yy83; + goto yy93; yy96: yych = *++YYCURSOR; - switch (yych) { - case 'U': - case 'u': goto yy97; - default: goto yy87; - } + if (yych == 'U') goto yy97; + if (yych != 'u') goto yy87; yy97: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy98; - default: goto yy87; - } + if (yych == 'E') goto yy98; + if (yych != 'e') goto yy87; 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 yy86; - default: goto yy99; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy99; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy99; + if (yych <= 'z') goto yy86; + } } yy99: -// 281 "scanner.re" +/* #line 281 "scanner.re" */ { token->opcode = PHQL_T_TRUE; return 0; } -// 1103 "scanner.c" +/* #line 831 "scanner.c" */ yy100: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy113; - default: goto yy87; - } + if (yych == 'S') goto yy113; + if (yych == 's') goto yy113; + goto yy87; yy101: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy107; - default: goto yy87; - } + if (yych == 'N') goto yy107; + if (yych == 'n') goto yy107; + goto yy87; yy102: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy103; - default: goto yy87; - } + if (yych == 'O') goto yy103; + if (yych != 'o') goto yy87; yy103: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy104; - default: goto yy87; - } + if (yych == 'S') goto yy104; + if (yych != 's') goto yy87; yy104: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy105; - default: goto yy87; - } + if (yych == 'S') goto yy105; + if (yych != 's') goto yy87; yy105: ++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 yy86; - default: goto yy106; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy106; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy106; + if (yych <= 'z') goto yy86; + } } yy106: -// 231 "scanner.re" +/* #line 231 "scanner.re" */ { token->opcode = PHQL_T_CROSS; return 0; } -// 1214 "scanner.c" +/* #line 878 "scanner.c" */ yy107: yych = *++YYCURSOR; - switch (yych) { - case 'V': - case 'v': goto yy108; - default: goto yy87; - } + if (yych == 'V') goto yy108; + if (yych != 'v') goto yy87; yy108: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy109; - default: goto yy87; - } + if (yych == 'E') goto yy109; + if (yych != 'e') goto yy87; yy109: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy110; - default: goto yy87; - } + if (yych == 'R') goto yy110; + if (yych != 'r') goto yy87; yy110: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy111; - default: goto yy87; - } + if (yych == 'T') goto yy111; + if (yych != 't') goto yy87; yy111: ++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 yy86; - default: goto yy112; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy112; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy112; + if (yych <= 'z') goto yy86; + } } yy112: -// 271 "scanner.re" +/* #line 271 "scanner.re" */ { token->opcode = PHQL_T_CONVERT; return 0; } -// 1318 "scanner.c" +/* #line 919 "scanner.c" */ yy113: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy114; - default: goto yy87; - } + if (yych == 'T') goto yy114; + if (yych != 't') goto yy87; yy114: ++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 yy86; - default: goto yy115; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy115; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy115; + if (yych <= 'z') goto yy86; + } } yy115: -// 266 "scanner.re" +/* #line 266 "scanner.re" */ { token->opcode = PHQL_T_CAST; return 0; } -// 1401 "scanner.c" +/* #line 948 "scanner.c" */ yy116: yych = *++YYCURSOR; - switch (yych) { - case 'G': - case 'g': goto yy117; - default: goto yy87; - } + if (yych == 'G') goto yy117; + if (yych != 'g') goto yy87; yy117: yych = *++YYCURSOR; - switch (yych) { - case 'H': - case 'h': goto yy118; - default: goto yy87; - } + if (yych == 'H') goto yy118; + if (yych != 'h') goto yy87; yy118: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy119; - default: goto yy87; - } + if (yych == 'T') goto yy119; + if (yych != 't') goto yy87; yy119: ++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 yy86; - default: goto yy120; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy120; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy120; + if (yych <= 'z') goto yy86; + } } yy120: -// 226 "scanner.re" +/* #line 226 "scanner.re" */ { token->opcode = PHQL_T_RIGHT; return 0; } -// 1498 "scanner.c" +/* #line 985 "scanner.c" */ yy121: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy122; - default: goto yy87; - } + if (yych == 'I') goto yy122; + if (yych != 'i') goto yy87; yy122: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy123; - default: goto yy87; - } + if (yych == 'N') goto yy123; + if (yych != 'n') goto yy87; yy123: ++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 yy86; - default: goto yy124; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy124; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy124; + if (yych <= 'z') goto yy86; + } } yy124: -// 211 "scanner.re" +/* #line 211 "scanner.re" */ { token->opcode = PHQL_T_JOIN; return 0; } -// 1588 "scanner.c" +/* #line 1018 "scanner.c" */ yy125: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy130; - default: goto yy87; - } + if (yych == 'T') goto yy130; + if (yych == 't') goto yy130; + goto yy87; yy126: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy127; - default: goto yy87; - } + if (yych == 'L') goto yy127; + if (yych != 'l') goto yy87; yy127: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy128; - default: goto yy87; - } + if (yych == 'L') goto yy128; + if (yych != 'l') goto yy87; yy128: ++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 yy86; - default: goto yy129; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy129; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy129; + if (yych <= 'z') goto yy86; + } } yy129: -// 251 "scanner.re" +/* #line 251 "scanner.re" */ { token->opcode = PHQL_T_NULL; return 0; } -// 1685 "scanner.c" +/* #line 1056 "scanner.c" */ yy130: ++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 yy86; - default: goto yy131; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy131; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy131; + if (yych <= 'z') goto yy86; + } } yy131: -// 171 "scanner.re" +/* #line 171 "scanner.re" */ { token->opcode = PHQL_T_NOT; return 0; } -// 1761 "scanner.c" +/* #line 1081 "scanner.c" */ yy132: yych = *++YYCURSOR; - switch (yych) { - case 'F': - case 'f': goto yy141; - default: goto yy87; - } + if (yych == 'F') goto yy141; + if (yych == 'f') goto yy141; + goto yy87; yy133: yych = *++YYCURSOR; - switch (yych) { - case 'K': - case 'k': goto yy135; - case 'M': - case 'm': goto yy134; - default: goto yy87; + if (yych <= 'M') { + if (yych == 'K') goto yy135; + if (yych <= 'L') goto yy87; + } else { + if (yych <= 'k') { + if (yych <= 'j') goto yy87; + goto yy135; + } else { + if (yych != 'm') goto yy87; + } } -yy134: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy138; - default: goto yy87; - } + if (yych == 'I') goto yy138; + if (yych == 'i') goto yy138; + goto yy87; yy135: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy136; - default: goto yy87; - } + if (yych == 'E') goto yy136; + if (yych != 'e') goto yy87; yy136: ++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 yy86; - default: goto yy137; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy137; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy137; + if (yych <= 'z') goto yy86; + } } yy137: -// 186 "scanner.re" +/* #line 186 "scanner.re" */ { token->opcode = PHQL_T_LIKE; return 0; } -// 1867 "scanner.c" +/* #line 1132 "scanner.c" */ yy138: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy139; - default: goto yy87; - } + if (yych == 'T') goto yy139; + if (yych != 't') goto yy87; yy139: ++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 yy86; - default: goto yy140; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy140; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy140; + if (yych <= 'z') goto yy86; + } } yy140: -// 161 "scanner.re" +/* #line 161 "scanner.re" */ { token->opcode = PHQL_T_LIMIT; return 0; } -// 1950 "scanner.c" +/* #line 1161 "scanner.c" */ yy141: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy142; - default: goto yy87; - } + if (yych == 'T') goto yy142; + if (yych != 't') goto yy87; yy142: ++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 yy86; - default: goto yy143; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy143; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy143; + if (yych <= 'z') goto yy86; + } } yy143: -// 221 "scanner.re" +/* #line 221 "scanner.re" */ { token->opcode = PHQL_T_LEFT; return 0; } -// 2033 "scanner.c" +/* #line 1190 "scanner.c" */ yy144: yych = *++YYCURSOR; - switch (yych) { - case 'V': - case 'v': goto yy145; - default: goto yy87; - } + if (yych == 'V') goto yy145; + if (yych != 'v') goto yy87; yy145: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy146; - default: goto yy87; - } + if (yych == 'I') goto yy146; + if (yych != 'i') goto yy87; yy146: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy147; - default: goto yy87; - } + if (yych == 'N') goto yy147; + if (yych != 'n') goto yy87; yy147: yych = *++YYCURSOR; - switch (yych) { - case 'G': - case 'g': goto yy148; - default: goto yy87; - } + if (yych == 'G') goto yy148; + if (yych != 'g') goto yy87; yy148: ++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 yy86; - default: goto yy149; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy149; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy149; + if (yych <= 'z') goto yy86; + } } yy149: -// 156 "scanner.re" +/* #line 156 "scanner.re" */ { token->opcode = PHQL_T_HAVING; return 0; } -// 2137 "scanner.c" +/* #line 1231 "scanner.c" */ yy150: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy151; - default: goto yy87; - } + if (yych == 'O') goto yy151; + if (yych != 'o') goto yy87; yy151: yych = *++YYCURSOR; - switch (yych) { - case 'U': - case 'u': goto yy152; - default: goto yy87; - } + if (yych == 'U') goto yy152; + if (yych != 'u') goto yy87; yy152: yych = *++YYCURSOR; - switch (yych) { - case 'P': - case 'p': goto yy153; - default: goto yy87; - } + if (yych == 'P') goto yy153; + if (yych != 'p') goto yy87; yy153: ++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 yy86; - default: goto yy154; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy154; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy154; + if (yych <= 'z') goto yy86; + } } yy154: -// 151 "scanner.re" +/* #line 151 "scanner.re" */ { token->opcode = PHQL_T_GROUP; return 0; } -// 2234 "scanner.c" +/* #line 1268 "scanner.c" */ yy155: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy158; - default: goto yy87; - } + if (yych == 'T') goto yy158; + if (yych == 't') goto yy158; + goto yy87; yy156: ++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 yy86; - default: goto yy157; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy157; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy157; + if (yych <= 'z') goto yy86; + } } yy157: -// 136 "scanner.re" +/* #line 136 "scanner.re" */ { token->opcode = PHQL_T_BY; return 0; } -// 2317 "scanner.c" +/* #line 1298 "scanner.c" */ yy158: yych = *++YYCURSOR; - switch (yych) { - case 'W': - case 'w': goto yy159; - default: goto yy87; - } + if (yych == 'W') goto yy159; + if (yych != 'w') goto yy87; yy159: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy160; - default: goto yy87; - } + if (yych == 'E') goto yy160; + if (yych != 'e') goto yy87; yy160: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy161; - default: goto yy87; - } + if (yych == 'E') goto yy161; + if (yych != 'e') goto yy87; yy161: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy162; - default: goto yy87; - } + if (yych == 'N') goto yy162; + if (yych != 'n') goto yy87; yy162: ++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 yy86; - default: goto yy163; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy163; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy163; + if (yych <= 'z') goto yy86; + } } yy163: -// 261 "scanner.re" +/* #line 261 "scanner.re" */ { token->opcode = PHQL_T_BETWEEN; return 0; } -// 2421 "scanner.c" +/* #line 1339 "scanner.c" */ yy164: yych = *++YYCURSOR; - switch (yych) { - case 'F': - case 'f': goto yy178; - default: goto yy87; - } + if (yych == 'F') goto yy178; + if (yych == 'f') goto yy178; + goto yy87; 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 yy86; - default: goto yy166; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy166; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy166; + if (yych <= 'z') goto yy86; + } } yy166: -// 206 "scanner.re" +/* #line 206 "scanner.re" */ { token->opcode = PHQL_T_ON; return 0; } -// 2504 "scanner.c" +/* #line 1369 "scanner.c" */ yy167: ++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 yy86; - case 'D': - case 'd': goto yy174; - default: goto yy168; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '@') { + if (yych <= '/') goto yy168; + if (yych <= '9') goto yy86; + } else { + if (yych == 'D') goto yy174; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '`') { + if (yych <= '\\') goto yy86; + if (yych == '_') goto yy86; + } else { + if (yych == 'd') goto yy174; + if (yych <= 'z') goto yy86; + } } yy168: -// 181 "scanner.re" +/* #line 181 "scanner.re" */ { token->opcode = PHQL_T_OR; return 0; } -// 2580 "scanner.c" +/* #line 1395 "scanner.c" */ yy169: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy170; - default: goto yy87; - } + if (yych == 'T') goto yy170; + if (yych != 't') goto yy87; yy170: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy171; - default: goto yy87; - } + if (yych == 'E') goto yy171; + if (yych != 'e') goto yy87; yy171: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy172; - default: goto yy87; - } + if (yych == 'R') goto yy172; + if (yych != 'r') goto yy87; yy172: ++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 yy86; - default: goto yy173; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy173; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy173; + if (yych <= 'z') goto yy86; + } } yy173: -// 236 "scanner.re" +/* #line 236 "scanner.re" */ { token->opcode = PHQL_T_OUTER; return 0; } -// 2677 "scanner.c" +/* #line 1432 "scanner.c" */ yy174: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy175; - default: goto yy87; - } + if (yych == 'E') goto yy175; + if (yych != 'e') goto yy87; yy175: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy176; - default: goto yy87; - } + if (yych == 'R') goto yy176; + if (yych != 'r') goto yy87; yy176: ++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 yy86; - default: goto yy177; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy177; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy177; + if (yych <= 'z') goto yy86; + } } yy177: -// 131 "scanner.re" +/* #line 131 "scanner.re" */ { token->opcode = PHQL_T_ORDER; return 0; } -// 2767 "scanner.c" +/* #line 1465 "scanner.c" */ yy178: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy179; - default: goto yy87; - } + if (yych == 'S') goto yy179; + if (yych != 's') goto yy87; yy179: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy180; - default: goto yy87; - } + if (yych == 'E') goto yy180; + if (yych != 'e') goto yy87; yy180: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy181; - default: goto yy87; - } + if (yych == 'T') goto yy181; + if (yych != 't') goto yy87; 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 yy86; - default: goto yy182; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy182; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy182; + if (yych <= 'z') goto yy86; + } } yy182: -// 166 "scanner.re" +/* #line 166 "scanner.re" */ { token->opcode = PHQL_T_OFFSET; return 0; } -// 2864 "scanner.c" +/* #line 1502 "scanner.c" */ yy183: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy184; - default: goto yy87; - } + if (yych == 'E') goto yy184; + if (yych != 'e') goto yy87; yy184: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy185; - default: goto yy87; - } + if (yych == 'R') goto yy185; + if (yych != 'r') goto yy87; yy185: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy186; - default: goto yy87; - } + if (yych == 'E') goto yy186; + if (yych != 'e') goto yy87; yy186: ++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 yy86; - default: goto yy187; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy187; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy187; + if (yych <= 'z') goto yy86; + } } yy187: -// 121 "scanner.re" +/* #line 121 "scanner.re" */ { token->opcode = PHQL_T_WHERE; return 0; } -// 2961 "scanner.c" +/* #line 1539 "scanner.c" */ yy188: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy189; - default: goto yy87; - } + if (yych == 'L') goto yy189; + if (yych != 'l') goto yy87; yy189: yych = *++YYCURSOR; - switch (yych) { - case 'U': - case 'u': goto yy190; - default: goto yy87; - } + if (yych == 'U') goto yy190; + if (yych != 'u') goto yy87; yy190: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy191; - default: goto yy87; - } + if (yych == 'E') goto yy191; + if (yych != 'e') goto yy87; yy191: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy192; - default: goto yy87; - } + if (yych == 'S') goto yy192; + if (yych != 's') goto yy87; 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 yy86; - default: goto yy193; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy193; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy193; + if (yych <= 'z') goto yy86; + } } yy193: -// 116 "scanner.re" +/* #line 116 "scanner.re" */ { token->opcode = PHQL_T_VALUES; return 0; } -// 3065 "scanner.c" +/* #line 1580 "scanner.c" */ yy194: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy211; - default: goto yy87; - } + if (yych == 'I') goto yy211; + if (yych == 'i') goto yy211; + goto yy87; yy195: ++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 yy86; - case 'N': - case 'n': goto yy201; - case 'S': - case 's': goto yy199; - case 'T': - case 't': goto yy200; - default: goto yy196; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= 'N') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy196; + if (yych <= 'M') goto yy86; + goto yy201; + } + } else { + if (yych <= 'S') { + if (yych <= 'R') goto yy86; + goto yy199; + } else { + if (yych <= 'T') goto yy200; + if (yych <= 'Z') goto yy86; + } + } + } else { + if (yych <= 'm') { + if (yych <= '^') { + if (yych <= '\\') goto yy86; + } else { + if (yych != '`') goto yy86; + } + } else { + if (yych <= 's') { + if (yych <= 'n') goto yy201; + if (yych <= 'r') goto yy86; + goto yy199; + } else { + if (yych <= 't') goto yy200; + if (yych <= 'z') goto yy86; + } + } } yy196: -// 201 "scanner.re" +/* #line 201 "scanner.re" */ { token->opcode = PHQL_T_IN; return 0; } -// 3148 "scanner.c" +/* #line 1630 "scanner.c" */ yy197: ++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 yy86; - default: goto yy198; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy198; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy198; + if (yych <= 'z') goto yy86; + } } yy198: -// 246 "scanner.re" +/* #line 246 "scanner.re" */ { token->opcode = PHQL_T_IS; return 0; } -// 3224 "scanner.c" +/* #line 1655 "scanner.c" */ yy199: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy207; - default: goto yy87; - } + if (yych == 'E') goto yy207; + if (yych == 'e') goto yy207; + goto yy87; yy200: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy205; - default: goto yy87; - } + if (yych == 'O') goto yy205; + if (yych == 'o') goto yy205; + goto yy87; yy201: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy202; - default: goto yy87; - } + if (yych == 'E') goto yy202; + if (yych != 'e') goto yy87; yy202: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy203; - default: goto yy87; - } + if (yych == 'R') goto yy203; + if (yych != 'r') goto yy87; yy203: ++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 yy86; - default: goto yy204; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy204; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy204; + if (yych <= 'z') goto yy86; + } } yy204: -// 216 "scanner.re" +/* #line 216 "scanner.re" */ { token->opcode = PHQL_T_INNER; return 0; } -// 3328 "scanner.c" +/* #line 1698 "scanner.c" */ yy205: ++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 yy86; - default: goto yy206; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy206; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy206; + if (yych <= 'z') goto yy86; + } } yy206: -// 111 "scanner.re" +/* #line 111 "scanner.re" */ { token->opcode = PHQL_T_INTO; return 0; } -// 3404 "scanner.c" +/* #line 1723 "scanner.c" */ yy207: yych = *++YYCURSOR; - switch (yych) { - case 'R': - case 'r': goto yy208; - default: goto yy87; - } + if (yych == 'R') goto yy208; + if (yych != 'r') goto yy87; yy208: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy209; - default: goto yy87; - } + if (yych == 'T') goto yy209; + if (yych != 't') goto yy87; yy209: ++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 yy86; - default: goto yy210; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy210; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy210; + if (yych <= 'z') goto yy86; + } } yy210: -// 106 "scanner.re" +/* #line 106 "scanner.re" */ { token->opcode = PHQL_T_INSERT; return 0; } -// 3494 "scanner.c" +/* #line 1756 "scanner.c" */ yy211: yych = *++YYCURSOR; - switch (yych) { - case 'K': - case 'k': goto yy212; - default: goto yy87; - } + if (yych == 'K') goto yy212; + if (yych != 'k') goto yy87; yy212: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy213; - default: goto yy87; - } + if (yych == 'E') goto yy213; + if (yych != 'e') goto yy87; yy213: ++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 yy86; - default: goto yy214; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy214; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy214; + if (yych <= 'z') goto yy86; + } } yy214: -// 191 "scanner.re" +/* #line 191 "scanner.re" */ { token->opcode = PHQL_T_ILIKE; return 0; } -// 3584 "scanner.c" +/* #line 1789 "scanner.c" */ yy215: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy223; - default: goto yy87; - } + if (yych == 'A') goto yy223; + if (yych == 'a') goto yy223; + goto yy87; yy216: yych = *++YYCURSOR; - switch (yych) { - case 'D': - case 'd': goto yy221; - default: goto yy87; - } + if (yych == 'D') goto yy221; + if (yych == 'd') goto yy221; + goto yy87; yy217: ++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 yy86; - case 'C': - case 'c': goto yy219; - default: goto yy218; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '@') { + if (yych <= '/') goto yy218; + if (yych <= '9') goto yy86; + } else { + if (yych == 'C') goto yy219; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '`') { + if (yych <= '\\') goto yy86; + if (yych == '_') goto yy86; + } else { + if (yych == 'c') goto yy219; + if (yych <= 'z') goto yy86; + } } yy218: -// 101 "scanner.re" +/* #line 101 "scanner.re" */ { token->opcode = PHQL_T_AS; return 0; } -// 3674 "scanner.c" +/* #line 1825 "scanner.c" */ 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 yy86; - default: goto yy220; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy220; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy220; + if (yych <= 'z') goto yy86; + } } yy220: -// 141 "scanner.re" +/* #line 141 "scanner.re" */ { token->opcode = PHQL_T_ASC; return 0; } -// 3750 "scanner.c" +/* #line 1850 "scanner.c" */ yy221: ++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 yy86; - default: goto yy222; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy222; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy222; + if (yych <= 'z') goto yy86; + } } yy222: -// 176 "scanner.re" +/* #line 176 "scanner.re" */ { token->opcode = PHQL_T_AND; return 0; } -// 3826 "scanner.c" +/* #line 1875 "scanner.c" */ yy223: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy224; - default: goto yy87; - } + if (yych == 'I') goto yy224; + if (yych != 'i') goto yy87; yy224: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy225; - default: goto yy87; - } + if (yych == 'N') goto yy225; + if (yych != 'n') goto yy87; yy225: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy226; - default: goto yy87; - } + if (yych == 'S') goto yy226; + if (yych != 's') goto yy87; yy226: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy227; - default: goto yy87; - } + if (yych == 'T') goto yy227; + if (yych != 't') goto yy87; 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 yy86; - default: goto yy228; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy228; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy228; + if (yych <= 'z') goto yy86; + } } yy228: -// 196 "scanner.re" +/* #line 196 "scanner.re" */ { token->opcode = PHQL_T_AGAINST; return 0; } -// 3930 "scanner.c" +/* #line 1916 "scanner.c" */ yy229: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy238; - default: goto yy87; - } + if (yych == 'L') goto yy238; + if (yych == 'l') goto yy238; + goto yy87; yy230: yych = *++YYCURSOR; - switch (yych) { - case 'O': - case 'o': goto yy235; - default: goto yy87; - } + if (yych == 'O') goto yy235; + if (yych == 'o') goto yy235; + goto yy87; yy231: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy232; - default: goto yy87; - } + if (yych == 'L') goto yy232; + if (yych != 'l') goto yy87; yy232: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy233; - default: goto yy87; - } + if (yych == 'L') goto yy233; + if (yych != 'l') goto yy87; 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 yy86; - default: goto yy234; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy234; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy234; + if (yych <= 'z') goto yy86; + } } yy234: -// 241 "scanner.re" +/* #line 241 "scanner.re" */ { token->opcode = PHQL_T_FULL; return 0; } -// 4034 "scanner.c" +/* #line 1959 "scanner.c" */ yy235: yych = *++YYCURSOR; - switch (yych) { - case 'M': - case 'm': goto yy236; - default: goto yy87; - } + if (yych == 'M') goto yy236; + if (yych != 'm') goto yy87; yy236: ++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 yy86; - default: goto yy237; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy237; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy237; + if (yych <= 'z') goto yy86; + } } yy237: -// 96 "scanner.re" - { - token->opcode = PHQL_T_FROM; - return 0; - } -// 4117 "scanner.c" -yy238: - yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy239; - default: goto yy87; - } -yy239: - yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy240; - default: goto yy87; - } -yy240: - ++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 yy86; - default: goto yy241; +/* #line 96 "scanner.re" */ + { + token->opcode = PHQL_T_FROM; + return 0; + } +/* #line 1988 "scanner.c" */ +yy238: + yych = *++YYCURSOR; + if (yych == 'S') goto yy239; + if (yych != 's') goto yy87; +yy239: + yych = *++YYCURSOR; + if (yych == 'E') goto yy240; + if (yych != 'e') goto yy87; +yy240: + ++YYCURSOR; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy241; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy241; + if (yych <= 'z') goto yy86; + } } yy241: -// 286 "scanner.re" +/* #line 286 "scanner.re" */ { token->opcode = PHQL_T_FALSE; return 0; } -// 4207 "scanner.c" +/* #line 2021 "scanner.c" */ yy242: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy251; - case 'S': - case 's': goto yy252; - default: goto yy87; + if (yych <= 'S') { + if (yych == 'L') goto yy251; + if (yych <= 'R') goto yy87; + goto yy252; + } else { + if (yych <= 'l') { + if (yych <= 'k') goto yy87; + goto yy251; + } else { + if (yych == 's') goto yy252; + goto yy87; + } } yy243: yych = *++YYCURSOR; - switch (yych) { - case 'S': - case 's': goto yy244; - default: goto yy87; - } + if (yych == 'S') goto yy244; + if (yych != 's') goto yy87; yy244: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy245; - default: goto yy87; - } + if (yych == 'T') goto yy245; + if (yych != 't') goto yy87; yy245: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy246; - default: goto yy87; - } + if (yych == 'I') goto yy246; + if (yych != 'i') goto yy87; yy246: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy247; - default: goto yy87; - } + if (yych == 'N') goto yy247; + if (yych != 'n') goto yy87; yy247: yych = *++YYCURSOR; - switch (yych) { - case 'C': - case 'c': goto yy248; - default: goto yy87; - } + if (yych == 'C') goto yy248; + if (yych != 'c') goto yy87; yy248: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy249; - default: goto yy87; - } + if (yych == 'T') goto yy249; + if (yych != 't') goto yy87; yy249: ++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 yy86; - default: goto yy250; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy250; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy250; + if (yych <= 'z') goto yy86; + } } yy250: -// 256 "scanner.re" +/* #line 256 "scanner.re" */ { token->opcode = PHQL_T_DISTINCT; return 0; } -// 4334 "scanner.c" +/* #line 2085 "scanner.c" */ yy251: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy255; - default: goto yy87; - } + if (yych == 'E') goto yy255; + if (yych == 'e') goto yy255; + goto yy87; yy252: yych = *++YYCURSOR; - switch (yych) { - case 'C': - case 'c': goto yy253; - default: goto yy87; - } + if (yych == 'C') goto yy253; + if (yych != 'c') goto yy87; yy253: ++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 yy86; - default: goto yy254; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy254; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy254; + if (yych <= 'z') goto yy86; + } } yy254: -// 146 "scanner.re" +/* #line 146 "scanner.re" */ { token->opcode = PHQL_T_DESC; return 0; } -// 4424 "scanner.c" +/* #line 2119 "scanner.c" */ yy255: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy256; - default: goto yy87; - } + if (yych == 'T') goto yy256; + if (yych != 't') goto yy87; yy256: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy257; - default: goto yy87; - } + if (yych == 'E') goto yy257; + if (yych != 'e') goto yy87; yy257: ++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 yy86; - default: goto yy258; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy258; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy258; + if (yych <= 'z') goto yy86; + } } yy258: -// 91 "scanner.re" +/* #line 91 "scanner.re" */ { token->opcode = PHQL_T_DELETE; return 0; } -// 4514 "scanner.c" +/* #line 2152 "scanner.c" */ yy259: yych = *++YYCURSOR; - switch (yych) { - case 'L': - case 'l': goto yy262; - case 'T': - case 't': goto yy260; - default: goto yy87; + if (yych <= 'T') { + if (yych == 'L') goto yy262; + if (yych <= 'S') goto yy87; + } else { + if (yych <= 'l') { + if (yych <= 'k') goto yy87; + goto yy262; + } else { + if (yych != 't') goto yy87; + } } -yy260: ++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 yy86; - default: goto yy261; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy261; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy261; + if (yych <= 'z') goto yy86; + } } yy261: -// 86 "scanner.re" +/* #line 86 "scanner.re" */ { token->opcode = PHQL_T_SET; return 0; } -// 4599 "scanner.c" +/* #line 2189 "scanner.c" */ yy262: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy263; - default: goto yy87; - } + if (yych == 'E') goto yy263; + if (yych != 'e') goto yy87; yy263: yych = *++YYCURSOR; - switch (yych) { - case 'C': - case 'c': goto yy264; - default: goto yy87; - } + if (yych == 'C') goto yy264; + if (yych != 'c') goto yy87; yy264: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy265; - default: goto yy87; - } + if (yych == 'T') goto yy265; + if (yych != 't') goto yy87; yy265: ++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 yy86; - default: goto yy266; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy266; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy266; + if (yych <= 'z') goto yy86; + } } yy266: -// 126 "scanner.re" +/* #line 126 "scanner.re" */ { token->opcode = PHQL_T_SELECT; return 0; } -// 4696 "scanner.c" +/* #line 2226 "scanner.c" */ yy267: yych = *++YYCURSOR; - switch (yych) { - case 'D': - case 'd': goto yy273; - default: goto yy87; - } + if (yych == 'D') goto yy273; + if (yych == 'd') goto yy273; + goto yy87; yy268: yych = *++YYCURSOR; - switch (yych) { - case 'I': - case 'i': goto yy269; - default: goto yy87; - } + if (yych == 'I') goto yy269; + if (yych != 'i') goto yy87; yy269: yych = *++YYCURSOR; - switch (yych) { - case 'N': - case 'n': goto yy270; - default: goto yy87; - } + if (yych == 'N') goto yy270; + if (yych != 'n') goto yy87; yy270: yych = *++YYCURSOR; - switch (yych) { - case 'G': - case 'g': goto yy271; - default: goto yy87; - } + if (yych == 'G') goto yy271; + if (yych != 'g') goto yy87; yy271: ++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 yy86; - default: goto yy272; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy272; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy272; + if (yych <= 'z') goto yy86; + } } yy272: -// 276 "scanner.re" +/* #line 276 "scanner.re" */ { token->opcode = PHQL_T_USING; return 0; } -// 4800 "scanner.c" +/* #line 2268 "scanner.c" */ yy273: yych = *++YYCURSOR; - switch (yych) { - case 'A': - case 'a': goto yy274; - default: goto yy87; - } + if (yych == 'A') goto yy274; + if (yych != 'a') goto yy87; yy274: yych = *++YYCURSOR; - switch (yych) { - case 'T': - case 't': goto yy275; - default: goto yy87; - } + if (yych == 'T') goto yy275; + if (yych != 't') goto yy87; yy275: yych = *++YYCURSOR; - switch (yych) { - case 'E': - case 'e': goto yy276; - default: goto yy87; - } + if (yych == 'E') goto yy276; + if (yych != 'e') goto yy87; yy276: ++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 yy86; - default: goto yy277; + if ((yych = *YYCURSOR) <= '[') { + if (yych <= '9') { + if (yych >= '0') goto yy86; + } else { + if (yych <= '@') goto yy277; + if (yych <= 'Z') goto yy86; + } + } else { + if (yych <= '_') { + if (yych <= '\\') goto yy86; + if (yych >= '_') goto yy86; + } else { + if (yych <= '`') goto yy277; + if (yych <= 'z') goto yy86; + } } yy277: -// 81 "scanner.re" +/* #line 81 "scanner.re" */ { token->opcode = PHQL_T_UPDATE; return 0; } -// 4897 "scanner.c" +/* #line 2305 "scanner.c" */ yy278: ++YYCURSOR; yych = *YYCURSOR; - switch (yych) { - case '-': - 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 yy278; - case ':': goto yy280; - default: goto yy83; + if (yybm[0+yych] & 64) { + goto yy278; } -yy280: + if (yych != ':') goto yy83; ++YYCURSOR; -// 73 "scanner.re" +/* #line 73 "scanner.re" */ { token->opcode = PHQL_T_SPLACEHOLDER; token->value = estrndup(q, YYCURSOR - q - 1); @@ -4975,25 +2318,14 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 4979 "scanner.c" +/* #line 2322 "scanner.c" */ yy282: ++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 yy282; - default: goto yy284; + if (yybm[0+yych] & 128) { + goto yy282; } -yy284: -// 64 "scanner.re" +/* #line 64 "scanner.re" */ { token->opcode = PHQL_T_NPLACEHOLDER; token->value = estrndup(q, YYCURSOR - q); @@ -5001,25 +2333,14 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 5005 "scanner.c" +/* #line 2337 "scanner.c" */ yy285: ++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 yy285; - default: goto yy287; - } + if (yych <= '/') goto yy287; + if (yych <= '9') goto yy285; yy287: -// 55 "scanner.re" +/* #line 55 "scanner.re" */ { token->opcode = PHQL_T_DOUBLE; token->value = estrndup(q, YYCURSOR - q); @@ -5027,42 +2348,22 @@ int phql_get_token(phql_scanner_state *s, phql_scanner_token *token) { q = YYCURSOR; return 0; } -// 5031 "scanner.c" +/* #line 2352 "scanner.c" */ yy288: ++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 yy288; - default: goto yy287; - } + if (yych <= '/') goto yy287; + if (yych <= '9') goto yy288; + goto yy287; yy290: ++YYCURSOR; yych = *YYCURSOR; - switch (yych) { - case '.': goto yy288; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': goto yy290; - default: goto yy3; - } + if (yych == '.') goto yy288; + if (yych <= '/') goto yy3; + if (yych <= '9') goto yy290; + goto yy3; } -// 453 "scanner.re" +/* #line 453 "scanner.re" */ } diff --git a/unit-tests/ModelsQueryExecuteTest.php b/unit-tests/ModelsQueryExecuteTest.php index 4a9323ea41c..2becd29a1fa 100644 --- a/unit-tests/ModelsQueryExecuteTest.php +++ b/unit-tests/ModelsQueryExecuteTest.php @@ -407,6 +407,13 @@ public function _testSelectExecute($di) $this->assertEquals(count($result), 2); $this->assertInstanceOf('Phalcon\Mvc\Model\Row', $result[0]); + // Issue 1011 + $result = $manager->executeQuery('SELECT r.name le_name FROM Robots r ORDER BY r.name ASC LIMIT ?1,?2', array(1 => 1, 2 => 2), array(1 => \Phalcon\Db\Column::BIND_PARAM_INT, 2 => \Phalcon\Db\Column::BIND_PARAM_INT)); + $this->assertInstanceOf('Phalcon\Mvc\Model\Resultset\Simple', $result); + $this->assertEquals(count($result), 2); + $this->assertInstanceOf('Phalcon\Mvc\Model\Row', $result[0]); + $this->assertTrue(isset($result[0]->le_name)); + $this->assertEquals($result[0]->le_name, 'Robotina'); } public function _testSelectRenamedExecute($di) @@ -755,6 +762,17 @@ public function _testUpdateExecute($di) )); $this->assertTrue($status->success()); + // Issue 1011 + $status = $manager->executeQuery( + 'UPDATE Subscriptores SET status = :status: WHERE email = :email: LIMIT :limit:', + array( + "status" => "I", + "email" => "le-marina@hotmail.com", + "limit" => 1, + ), + array('email' => \Phalcon\Db\Column::BIND_PARAM_STR, 'limit' => \Phalcon\Db\Column::BIND_PARAM_INT) + ); + $this->assertTrue($status->success()); } public function _testUpdateRenamedExecute($di) @@ -794,6 +812,17 @@ public function _testDeleteExecute($di) )); $this->assertTrue($status->success()); + // Issue 1011 + $status = $manager->executeQuery( + 'DELETE FROM Subscriptores WHERE status = :status: AND email <> :email: LIMIT :limit:', + array( + "status" => "P", + "email" => "fuego@hotmail.com", + "limit" => 1, + ), + array('email' => \Phalcon\Db\Column::BIND_PARAM_STR, 'limit' => \Phalcon\Db\Column::BIND_PARAM_INT) + ); + $this->assertTrue($status->success()); } public function _testDeleteRenamedExecute($di) diff --git a/unit-tests/ModelsQueryParsingTest.php b/unit-tests/ModelsQueryParsingTest.php index b5e1c5ed2e3..2c63ec47d28 100644 --- a/unit-tests/ModelsQueryParsingTest.php +++ b/unit-tests/ModelsQueryParsingTest.php @@ -2815,7 +2815,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '100', + 'number' => array( + 'type' => 'literal', + 'value' => '100', + ), ), ); $query = new Query('SELECT * FROM Robots r LIMIT 100'); @@ -2841,8 +2844,14 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '100', - 'offset' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '100', + ), + 'offset' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('SELECT * FROM Robots r LIMIT 10,100'); @@ -2868,8 +2877,14 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '100', - 'offset' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '100', + ), + 'offset' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('SELECT * FROM Robots r LIMIT 100 OFFSET 10'); @@ -2909,7 +2924,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '100', + 'number' => array( + 'type' => 'literal', + 'value' => '100', + ), ), ); $query = new Query('SELECT * FROM Some\Products p WHERE p.name = "Artichoke" LIMIT 100'); @@ -3249,7 +3267,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '5', + 'number' => array( + 'type' => 'literal', + 'value' => '5', + ), ), ); $query = new Query('SELECT * FROM Robots r WHERE r.name <> "shaggy" ORDER BY 1, 2 LIMIT 5'); @@ -3305,7 +3326,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '5', + 'number' => array( + 'type' => 'literal', + 'value' => '5', + ), ), ); $query = new Query('SELECT * FROM Robots r WHERE r.name <> "shaggy" ORDER BY 1 ASC, 2 DESC LIMIT 5'); @@ -3586,7 +3610,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('SELECT * FROM Robots WHERE Robots.id > 5 GROUP BY Robots.name LIMIT 10'); @@ -3640,7 +3667,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('SELECT * FROM Robots WHERE Robots.id > 5 GROUP BY Robots.name ORDER BY Robots.id LIMIT 10'); @@ -4241,7 +4271,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '15', + 'number' => array( + 'type' => 'literal', + 'value' => '15', + ), ), ); $query = new Query('SELECT Robots.name, COUNT(*) FROM Robots WHERE Robots.type = "virtual" GROUP BY Robots.name HAVING COUNT(*)>100 ORDER BY 2 LIMIT 15'); @@ -4314,7 +4347,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '15', + 'number' => array( + 'type' => 'literal', + 'value' => '15', + ), ), ); $query = new Query('SELECT Robots.name, COUNT(*) FROM Robots GROUP BY Robots.name HAVING COUNT(*)>100 ORDER BY 2 LIMIT 15'); @@ -4393,7 +4429,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '15', + 'number' => array( + 'type' => 'literal', + 'value' => '15', + ), ), ); $query = new Query('SELECT name, COUNT(*) FROM Robots WHERE type = "virtual" GROUP BY name HAVING COUNT(*)>100 LIMIT 15'); @@ -4472,7 +4511,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '15', + 'number' => array( + 'type' => 'literal', + 'value' => '15', + ), ), ); $query = new Query('SELECT Robots.name, COUNT(*) FROM Robots WHERE Robots.type = "virtual" GROUP BY Robots.name HAVING COUNT(*)>100 LIMIT 15'); @@ -4537,7 +4579,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '15', + 'number' => array( + 'type' => 'literal', + 'value' => '15', + ), ), ); $query = new Query('SELECT Robots.name, COUNT(*) FROM Robots GROUP BY Robots.name HAVING COUNT(*)>100 LIMIT 15'); @@ -6618,7 +6663,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '5', + 'number' => array( + 'type' => 'literal', + 'value' => '5', + ), ), ); $query = new Query('SELECT * FROM Robotters r WHERE r.theName <> "shaggy" ORDER BY 1, 2 LIMIT 5'); @@ -6674,7 +6722,10 @@ public function testSelectParsing() ), ), 'limit' => array( - 'number' => '5', + 'number' => array( + 'type' => 'literal', + 'value' => '5', + ), ), ); $query = new Query('SELECT * FROM Robotters r WHERE r.theName <> "shaggy" ORDER BY 1 ASC, 2 DESC LIMIT 5'); @@ -6741,6 +6792,39 @@ public function testSelectParsing() $query->setDI($di); $this->assertEquals($query->parse(), $expected); + // Issue 1011 + $expected = array( + 'models' => array( + 'Robots', + ), + 'tables' => array( + array( + 'robots', + NULL, + 'r', + ), + ), + 'columns' => array( + array( + 'type' => 'object', + 'model' => 'Robots', + 'column' => 'r', + ), + ), + 'limit' => array( + 'number' => array( + 'type' => 'placeholder', + 'value' => ':limit', + ), + 'offset' => array( + 'type' => 'placeholder', + 'value' => ':1', + ), + ), + ); + $query = new Query('SELECT * FROM Robots r LIMIT ?1,:limit:'); + $query->setDI($di); + $this->assertEquals($query->parse(), $expected); } public function testInsertParsing() @@ -7610,7 +7694,10 @@ public function testUpdateParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('UPDATE Robots AS r SET r.name = \'some name\' LIMIT 10'); @@ -7646,7 +7733,10 @@ public function testUpdateParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('UPDATE Robots r SET r.name = \'some name\' LIMIT 10'); @@ -7696,13 +7786,55 @@ public function testUpdateParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('UPDATE Robots AS r SET r.name = \'some name\' WHERE r.id > 100 LIMIT 10'); $query->setDI($di); $this->assertEquals($query->parse(), $expected); + // Issue 1011 + $expected = array( + 'tables' => array( + array( + 'robots', + NULL, + 'r', + ), + ), + 'models' => array( + 'Robots', + ), + 'fields' => array( + array( + 'type' => 'qualified', + 'domain' => 'r', + 'name' => 'name', + 'balias' => 'name', + ), + ), + 'values' => array( + array( + 'type' => 260, + 'value' => array( + 'type' => 'literal', + 'value' => 'some name', + ), + ), + ), + 'limit' => array( + 'number' => array( + 'type' => 'placeholder', + 'value' => ':1', + ), + ), + ); + $query = new Query('UPDATE Robots r SET r.name = \'some name\' LIMIT ?1'); + $query->setDI($di); + $this->assertEquals($query->parse(), $expected); } public function testDeleteParsing() @@ -7829,7 +7961,10 @@ public function testDeleteParsing() 'Robots', ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('DELETE FROM Robots r LIMIT 10'); @@ -7862,12 +7997,52 @@ public function testDeleteParsing() ), ), 'limit' => array( - 'number' => '10', + 'number' => array( + 'type' => 'literal', + 'value' => '10', + ), ), ); $query = new Query('DELETE FROM Robots r WHERE r.id > 100 LIMIT 10'); $query->setDI($di); $this->assertEquals($query->parse(), $expected); + + // Issue 1011 + $expected = array( + 'tables' => array( + array( + 'robots', + NULL, + 'r', + ), + ), + 'models' => array( + 'Robots', + ), + 'where' => array( + 'type' => 'binary-op', + 'op' => '>', + 'left' => array( + 'type' => 'qualified', + 'domain' => 'r', + 'name' => 'id', + 'balias' => 'id', + ), + 'right' => array( + 'type' => 'literal', + 'value' => '100', + ), + ), + 'limit' => array( + 'number' => array( + 'type' => 'placeholder', + 'value' => ':limit', + ), + ), + ); + $query = new Query('DELETE FROM Robots r WHERE r.id > 100 LIMIT :limit:'); + $query->setDI($di); + $this->assertEquals($query->parse(), $expected); } }