diff options
author | unknown <aivanov@mysql.com> | 2006-04-23 12:48:31 +0400 |
---|---|---|
committer | unknown <aivanov@mysql.com> | 2006-04-23 12:48:31 +0400 |
commit | ca9b46f71a55e53f85ae2f8e28f0d88126a44307 (patch) | |
tree | 7253b0be1e83a36e0f8c955b5373955f556d207a /storage/innobase/pars | |
parent | fa1dcde8eb6748440b5ac483d11332e0a6a01c12 (diff) | |
download | mariadb-git-ca9b46f71a55e53f85ae2f8e28f0d88126a44307.tar.gz |
Applied innodb-5.1-ss475 snapshot.
* Fix BUG#15650: "DELETE with LEFT JOIN crashes server with innodb_locks_unsafe_for binlog"
* Fix BUG#17134: "Partitions: uncommitted changes are visible"
* Fix BUG#17992: "Partitions: InnoDB, somehow rotten table after UPDATE"
row0ins.c: MySQL's partitioned table code does not set preduilt->sql_stat_start right
if it does an insert in the same statement after doing a search first in the same
partition table. We now write trx id always to the buffer, not just when flag
sql_stat_start is on. This will waste CPU time very sightly.
* Fix BUG#18077: "InnoDB uses full explicit table locks in stored FUNCTION"
* Fix BUG#18238: "When locks exhaust the buffer pool, InnoDB does not roll back the trx"
* Fix BUG#18252" "Disk space leak in updates of InnoDB BLOB rows in 5.0 and 5.1"
* Fix BUG#18283: "When InnoDB returns error 'lock table full', MySQL can write to binlog too much"
* Fix BUG#18350: "Use consistent read in CREATE ... SELECT ... if innodb_locks_unsafe_for_binlog"
* Fix BUG#18384: "InnoDB memory leak on duplicate key errors in 5.0 if row has many columns"
* Fix BUG#18934: "InnoDB crashes when table uses column names like DB_ROW_ID"
Refuse tables that use reserved column names.
* InnoDB's SQL parser:
- Add support for UNSIGNED types, EXIT keyword, quoted identifiers, user-function callbacks
for processing results of FETCH statements, bound literals, DATA_VARCHAR for bound literals.
- Allow bound literals of type non-INTEGER to be of length 0.
- Add make_flex.sh and update lexer/parser generation documentation.
- Add comment clarifying the difference between 'alias' and 'indirection' fields in sym_node_t.
- Remove never reached duplicate code in pars_set_dfield_type().
- Rewrite pars_info datatypes and APIs, add a few helper functions.
- Since the functions definitions in pars_info_t are accessed after pars_sql() returns
in the query graph execution stage, we can't free pars_info_t in pars_sql(). Instead,
make pars_sql() transfer ownership of pars_info_t to the created query graph, and
make que_graph_free() free it if needed.
- Allow access to system columns like DB_ROW_ID.
* Use bound literals in row_truncate_table_for_mysql, row_drop_table_for_mysql,
row_discard_tablespace_for_mysql, and row_rename_table_for_mysql.
* Setting an isolation level of the transaction to read committed weakens the locks for
this session similarly like the option innodb_locks_unsafe_for binlog. This patch removes
alnost all gap locking (used in next-key locking) and makes MySQL to release the row locks
on the rows which does not belong to result set. Additionally, nonlocking selects on
INSERT INTO SELECT, UPDATE ... (SELECT ...), and CREATE ... SELECT ... use a nonlocking
consistent read. If a binlog is used, then binlog format should be set to row based
binloging to make the execution of the complex SQL statements.
* Disable the statistic variables btr_search_n_hash_fail and n_hash_succ, n_hash_fail,
n_patt_succ, and n_searches of btr_search_t in builds without #ifdef UNIV_SEARCH_PERF_STAT.
* Make innodb.test faster. Group all consistent read test cases to a one test case and
wait their lock timeout after all have been send to the server. Decrease amount of rows
inserted in a certain test - this has no effect on the effectiveness of the test and
reduces the running time by ~10 sec. Remove temporary work-arounds from innodb.result
now that ALTER TABLE DROP FOREIGN KEY works once again.
* Make innodb_unsafe_binlog.test faster. Grout all consistent read test cases to a one
test case amd wait their lock timeout after all have been sent to the server. Remove
unnecessary option --loose_innodb_lock_wait_timeout.
* Print dictionary memory size in SHOW INNODB STATUS.
* Fix memory leaks in row_create_table_for_mysql() in rare corner cases.
* Remove code related to clustered tables. They were never implemented, and the
implementation would be challenging with ROW_FORMAT=COMPACT. Remove the table types
DICT_TABLE_CLUSTER_MEMBER and DICT_TABLE_CLUSTER and all related tests and functions.
dict_table_t: Remove mix_id, mix_len, mix_id_len, mix_id_buf, and cluster_name.
plan_t: Remove mixed_index.
dict_create_sys_tables_tuple(): Set MIX_ID=0, MIX_LEN=0, CLUSTER_NAME=NULL when
inserting into SYS_TABLES.
dict_tree_check_search_tuple(): Enclose in #ifdef UNIV_DEBUG.
* Move calling of thr_local_free() from trx_free_for_mysql() to
innobase_close_connection().
mysql-test/r/innodb.result:
Applied innodb-5.1-ss475 snapshot.
mysql-test/r/innodb_unsafe_binlog.result:
Applied innodb-5.1-ss475 snapshot.
mysql-test/t/innodb-master.opt:
Applied innodb-5.1-ss475 snapshot.
mysql-test/t/innodb.test:
Applied innodb-5.1-ss475 snapshot.
mysql-test/t/innodb_unsafe_binlog-master.opt:
Applied innodb-5.1-ss475 snapshot.
mysql-test/t/innodb_unsafe_binlog.test:
Applied innodb-5.1-ss475 snapshot.
sql/ha_innodb.cc:
Applied innodb-5.1-ss475 snapshot.
Do not use inlined functions in ha_innodb.cc.
Remove assertion ut_error which crashes the mysqld server
if it prints a warning about the adaptive latch.
storage/innobase/Makefile.am:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/btr/btr0btr.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/btr/btr0cur.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/btr/btr0pcur.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/btr/btr0sea.c:
Applied innodb-5.1-ss475 snapshot.
Fix compilation problem with non-C99 compilers.
storage/innobase/buf/buf0lru.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/cmakelists.txt:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/configure.in:
Applied innodb-5.1-ss475 snapshot.
Add disabled-by-default logic to switch GCC to a strict C89-mode.
Add -Werror-implicit-function_declaration to CFLAGS when using gcc.
storage/innobase/data/data0type.c:
Applied innodb-5.1-ss475 snapshot.
dtype_print(): Recognize DATA_FIXBINARY and DATA_BLOB types.
Print known flags from prtype. Use a switch statement instead
of else-if chain.
storage/innobase/dict/dict0crea.c:
Applied innodb-5.1-ss475 snapshot.
Use bound literals in all SQL statements instead of elaborately
constructing correctly allocated and quoted strings to pass the
data in ASCII form.
storage/innobase/dict/dict0dict.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/dict/dict0load.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/dict/dict0mem.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/eval/eval0proc.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/ibuf/ibuf0ibuf.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/btr0cur.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/btr0cur.ic:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/btr0sea.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/buf0lru.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/dict0dict.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/dict0dict.ic:
Applied innodb-5.1-ss475 snapshot.
Remove too strict assertions from some dict_table_t
accessor functions.
storage/innobase/include/dict0mem.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/eval0proc.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/hash0hash.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/lock0lock.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/mem0mem.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/page0page.ic:
Applied innodb-5.1-ss475 snapshot.
Remove UNIV_RELEASE_NOT_YET_STABLE and related checks.
storage/innobase/include/pars0grm.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/pars0pars.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/pars0sym.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/pars0types.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/que0que.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/row0mysql.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/row0sel.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/row0upd.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/trx0trx.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/univ.i:
Applied innodb-5.1-ss475 snapshot.
Remove UNIV_RELEASE_NOT_YET_STABLE and related checks.
When using GCC, use __inline__ instead of inline.
storage/innobase/include/ut0mem.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/lock/lock0lock.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/log/log0recv.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/mem/mem0dbg.c:
Applied innodb-5.1-ss475 snapshot.
Add (void*) cast when using the %p printf format specifier.
storage/innobase/mem/mem0mem.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/os/os0sync.c:
Applied innodb-5.1-ss475 snapshot.
Add (void*) cast when using the %p printf format specifier.
storage/innobase/pars/lexyy.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/make_bison.sh:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0grm.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0grm.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0grm.y:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0lex.l:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0opt.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0pars.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/pars0sym.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/que/que0que.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/row/row0ins.c:
Applied innodb-5.1-ss475 snapshot.
Remove a memory leak when trying to insert a duplicate record to a
clustered inedx comprising more than about 90 columns (Bug#18384).
row_ins_duplicate_error_in_clust(): Call mem_heap_free(heap) at
func_exit if needed.
storage/innobase/row/row0mysql.c:
Applied innodb-5.1-ss475 snapshot.
row_mysql_is_system_table(): Use strncmp, not memcmp, since we
don't know how long the input string is.
storage/innobase/row/row0sel.c:
Applied innodb-5.1-ss475 snapshot.
Remove UNIV_RELEASE_NOT_YET_STABLE and related checks.
row_sel_field_store_in_mysql_format(): Turn the assertions on
mbminlen, mbmaxlen, and templ->type into debug assertions.
fetch_step(): Print a more usefull error message when the cursor is closed.
storage/innobase/row/row0upd.c:
Applied innodb-5.1-ss475 snapshot.
row_upd_index_replace_new_col_vals_index_pos(): Add a parameter
order_only for limiting the replacement to the ordering fields
of the index.
storage/innobase/srv/srv0srv.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/sync/sync0arr.c:
Applied innodb-5.1-ss475 snapshot.
Add (void*) cast when using the %p printf format specifier.
storage/innobase/sync/sync0rw.c:
Applied innodb-5.1-ss475 snapshot.
Add (void*) cast when using the %p printf format specifier.
storage/innobase/sync/sync0sync.c:
Applied innodb-5.1-ss475 snapshot.
Add (void*) cast when using the %p printf format specifier.
storage/innobase/trx/trx0trx.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/ut/Makefile.am:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/ut/ut0mem.c:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/ut0vec.h:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/include/ut0vec.ic:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/pars/make_flex.sh:
Applied innodb-5.1-ss475 snapshot.
storage/innobase/ut/ut0vec.c:
Applied innodb-5.1-ss475 snapshot.
Diffstat (limited to 'storage/innobase/pars')
-rw-r--r-- | storage/innobase/pars/lexyy.c | 1083 | ||||
-rwxr-xr-x | storage/innobase/pars/make_bison.sh | 3 | ||||
-rwxr-xr-x | storage/innobase/pars/make_flex.sh | 20 | ||||
-rw-r--r-- | storage/innobase/pars/pars0grm.c | 1784 | ||||
-rw-r--r-- | storage/innobase/pars/pars0grm.h | 342 | ||||
-rw-r--r-- | storage/innobase/pars/pars0grm.y | 61 | ||||
-rw-r--r-- | storage/innobase/pars/pars0lex.l | 87 | ||||
-rw-r--r-- | storage/innobase/pars/pars0opt.c | 50 | ||||
-rw-r--r-- | storage/innobase/pars/pars0pars.c | 338 | ||||
-rw-r--r-- | storage/innobase/pars/pars0sym.c | 71 |
10 files changed, 2199 insertions, 1640 deletions
diff --git a/storage/innobase/pars/lexyy.c b/storage/innobase/pars/lexyy.c index d64ecbbfcbc..bbe78db1613 100644 --- a/storage/innobase/pars/lexyy.c +++ b/storage/innobase/pars/lexyy.c @@ -1,7 +1,7 @@ - -#line 3 "lex.yy.c" - #include "univ.i" +#line 2 "_flex_tmp.c" + +#line 4 "_flex_tmp.c" #define YY_INT_ALIGNED short int @@ -356,8 +356,8 @@ static void yy_fatal_error (yyconst char msg[] ); *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; -#define YY_NUM_RULES 109 -#define YY_END_OF_BUFFER 110 +#define YY_NUM_RULES 116 +#define YY_END_OF_BUFFER 117 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -365,48 +365,52 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static yyconst flex_int16_t yy_accept[370] = +static yyconst flex_int16_t yy_accept[394] = { 0, - 0, 0, 104, 104, 0, 0, 110, 108, 107, 107, - 99, 3, 88, 94, 97, 95, 92, 96, 108, 98, - 1, 108, 93, 91, 89, 90, 102, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 100, 101, 104, 105, 4, - 5, 107, 83, 103, 2, 1, 84, 85, 87, 86, - 82, 82, 82, 82, 82, 82, 40, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 23, 12, 20, 82, 82, 82, 82, 50, 57, - 82, 9, 82, 82, 82, 82, 82, 82, 82, 82, - - 82, 82, 82, 82, 82, 82, 82, 82, 82, 104, - 105, 105, 106, 4, 5, 2, 8, 41, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 22, 82, 82, 36, - 82, 82, 82, 16, 82, 82, 10, 82, 82, 82, - 13, 82, 82, 82, 82, 82, 76, 82, 82, 82, - 47, 7, 82, 31, 82, 82, 82, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 15, 19, 82, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 42, 82, 82, 25, 82, 82, 82, 34, 82, 82, - - 82, 82, 44, 82, 27, 82, 6, 60, 82, 82, - 82, 38, 82, 82, 82, 82, 82, 82, 82, 82, - 82, 24, 82, 82, 82, 82, 82, 82, 82, 82, - 81, 82, 21, 82, 62, 82, 82, 82, 82, 32, - 82, 82, 82, 82, 82, 82, 82, 26, 61, 18, - 53, 82, 71, 82, 82, 82, 39, 82, 82, 82, - 82, 82, 82, 82, 82, 82, 82, 52, 82, 82, - 82, 82, 82, 82, 35, 28, 75, 14, 82, 79, - 70, 82, 51, 82, 59, 82, 48, 82, 82, 43, - 82, 72, 82, 74, 82, 82, 29, 82, 82, 82, - - 30, 68, 82, 82, 82, 82, 54, 46, 45, 82, - 82, 82, 49, 58, 82, 82, 17, 82, 82, 69, - 77, 82, 82, 73, 82, 64, 82, 82, 82, 82, - 33, 82, 63, 82, 80, 82, 82, 82, 82, 55, - 82, 82, 11, 82, 66, 65, 82, 37, 82, 78, - 82, 82, 82, 82, 82, 82, 82, 82, 82, 82, - 67, 82, 82, 82, 82, 82, 82, 56, 0 + 0, 0, 111, 111, 0, 0, 0, 0, 117, 115, + 114, 114, 7, 106, 4, 95, 101, 104, 102, 99, + 103, 115, 105, 1, 115, 100, 98, 96, 97, 109, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 107, 108, + 111, 112, 5, 6, 8, 9, 114, 90, 110, 2, + 1, 3, 91, 92, 94, 93, 89, 89, 89, 89, + 89, 89, 44, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 27, + 16, 24, 89, 89, 89, 89, 54, 61, 89, 13, + + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 111, 112, 112, + 113, 5, 6, 8, 9, 2, 12, 45, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 26, 89, 89, 89, + 40, 89, 89, 89, 89, 20, 89, 89, 14, 89, + 89, 89, 17, 89, 89, 89, 89, 89, 80, 89, + 89, 89, 51, 11, 89, 35, 89, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 89, 89, 89, 89, + 19, 23, 89, 89, 89, 89, 89, 89, 89, 89, + + 89, 89, 89, 46, 89, 89, 29, 89, 87, 89, + 89, 38, 89, 89, 89, 89, 89, 48, 89, 31, + 89, 10, 64, 89, 89, 89, 42, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 28, 89, 89, 89, + 89, 89, 89, 89, 89, 89, 85, 89, 25, 89, + 66, 89, 89, 89, 89, 36, 89, 89, 89, 89, + 89, 89, 89, 30, 65, 22, 89, 57, 89, 75, + 89, 89, 89, 43, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 56, 89, 89, 89, 89, 89, + 89, 89, 39, 32, 79, 18, 89, 83, 74, 89, + + 55, 89, 63, 89, 52, 89, 89, 89, 47, 89, + 76, 89, 78, 89, 89, 33, 89, 89, 89, 34, + 72, 89, 89, 89, 89, 58, 89, 50, 49, 89, + 89, 89, 53, 62, 89, 89, 89, 21, 89, 89, + 73, 81, 89, 89, 77, 89, 68, 89, 89, 89, + 89, 89, 37, 89, 88, 67, 89, 84, 89, 89, + 89, 86, 89, 59, 89, 89, 15, 89, 70, 69, + 89, 41, 89, 82, 89, 89, 89, 89, 89, 89, + 89, 89, 89, 89, 71, 89, 89, 89, 89, 89, + 89, 60, 0 + } ; static yyconst flex_int32_t yy_ec[256] = @@ -414,17 +418,17 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 2, 1, 1, 1, 1, 4, 1, 5, 6, - 7, 8, 9, 10, 11, 12, 13, 14, 14, 14, - 14, 14, 14, 14, 14, 14, 14, 15, 16, 17, - 18, 19, 20, 1, 21, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - 37, 38, 39, 40, 41, 42, 43, 44, 45, 30, - 1, 1, 1, 1, 46, 1, 30, 30, 30, 30, - - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, - 30, 30, 47, 1, 48, 1, 1, 1, 1, 1, + 1, 2, 1, 4, 1, 1, 5, 1, 6, 7, + 8, 9, 10, 11, 12, 13, 14, 15, 15, 15, + 15, 15, 15, 15, 15, 15, 15, 16, 17, 18, + 19, 20, 21, 1, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, + 38, 39, 40, 41, 42, 43, 44, 45, 46, 31, + 1, 1, 1, 1, 47, 1, 31, 31, 31, 31, + + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, + 31, 31, 48, 1, 49, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, @@ -441,209 +445,229 @@ static yyconst flex_int32_t yy_ec[256] = 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[49] = +static yyconst flex_int32_t yy_meta[50] = { 0, - 1, 1, 1, 1, 2, 1, 1, 3, 1, 1, - 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, - 4, 4, 4, 4, 4, 4, 1, 1 + 1, 1, 1, 2, 1, 3, 1, 1, 4, 1, + 1, 1, 1, 1, 5, 1, 1, 1, 6, 1, + 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, + 5, 5, 5, 5, 5, 5, 5, 1, 1 } ; -static yyconst flex_int16_t yy_base[376] = +static yyconst flex_int16_t yy_base[403] = { 0, - 0, 0, 390, 389, 391, 390, 394, 399, 47, 49, - 399, 399, 399, 399, 399, 399, 399, 399, 381, 384, - 41, 373, 399, 38, 399, 372, 399, 20, 33, 32, - 46, 29, 44, 0, 46, 49, 42, 60, 351, 65, - 66, 67, 32, 367, 69, 399, 399, 0, 79, 0, - 382, 103, 399, 399, 372, 96, 399, 399, 399, 399, - 0, 361, 70, 357, 349, 347, 0, 360, 77, 80, - 355, 341, 92, 339, 352, 337, 351, 334, 338, 334, - 336, 0, 93, 0, 336, 334, 328, 335, 0, 0, - 341, 341, 324, 87, 98, 339, 93, 88, 330, 104, - - 322, 338, 334, 312, 328, 332, 323, 98, 316, 0, - 122, 131, 399, 0, 348, 338, 0, 0, 326, 321, - 328, 326, 309, 307, 306, 311, 106, 309, 321, 102, - 309, 315, 316, 298, 298, 117, 0, 313, 314, 0, - 301, 308, 118, 122, 305, 295, 304, 297, 294, 302, - 0, 292, 302, 300, 291, 281, 275, 288, 273, 293, - 0, 0, 278, 0, 292, 283, 280, 126, 276, 291, - 270, 272, 277, 277, 269, 272, 267, 0, 0, 279, - 263, 273, 280, 271, 259, 258, 272, 261, 274, 254, - 0, 264, 246, 0, 265, 262, 249, 0, 244, 249, - - 248, 258, 0, 244, 0, 248, 0, 0, 244, 241, - 255, 0, 240, 240, 238, 254, 239, 251, 233, 251, - 246, 0, 241, 241, 227, 226, 226, 240, 239, 238, - 0, 222, 0, 216, 0, 235, 219, 218, 218, 0, - 231, 221, 216, 215, 227, 217, 216, 0, 0, 0, - 0, 209, 0, 223, 219, 205, 0, 219, 220, 203, - 208, 201, 219, 201, 198, 199, 196, 0, 201, 213, - 200, 207, 206, 191, 0, 0, 0, 183, 190, 0, - 0, 187, 0, 186, 0, 200, 0, 201, 188, 0, - 184, 0, 187, 0, 179, 181, 0, 180, 194, 187, - - 0, 0, 190, 193, 175, 190, 0, 0, 0, 171, - 185, 184, 0, 0, 168, 167, 0, 182, 167, 0, - 0, 173, 169, 0, 164, 0, 176, 165, 175, 164, - 0, 151, 0, 171, 0, 155, 149, 155, 146, 0, - 151, 164, 0, 163, 0, 0, 154, 0, 158, 0, - 145, 145, 151, 137, 160, 152, 153, 137, 121, 110, - 0, 122, 129, 120, 117, 113, 105, 0, 399, 160, - 164, 85, 168, 172, 176 + 0, 0, 434, 433, 435, 434, 435, 434, 437, 444, + 48, 50, 444, 444, 444, 444, 444, 444, 444, 444, + 444, 423, 426, 41, 415, 444, 38, 444, 414, 444, + 20, 33, 32, 46, 40, 44, 0, 54, 52, 48, + 60, 393, 65, 66, 74, 27, 409, 69, 444, 444, + 0, 97, 0, 424, 0, 425, 111, 444, 444, 413, + 54, 408, 444, 444, 444, 444, 0, 401, 69, 397, + 389, 387, 0, 400, 79, 82, 395, 381, 94, 379, + 392, 377, 391, 385, 373, 377, 373, 375, 375, 0, + 82, 0, 374, 372, 366, 373, 0, 0, 379, 379, + + 362, 89, 98, 377, 93, 95, 368, 106, 360, 376, + 372, 350, 101, 371, 362, 112, 355, 0, 134, 135, + 444, 0, 387, 0, 388, 376, 0, 0, 364, 359, + 366, 364, 347, 345, 344, 349, 106, 347, 359, 93, + 347, 353, 354, 336, 336, 121, 0, 334, 350, 351, + 0, 338, 347, 344, 119, 126, 341, 331, 340, 333, + 330, 338, 0, 328, 338, 336, 327, 317, 311, 324, + 309, 329, 0, 0, 314, 0, 328, 319, 316, 130, + 312, 319, 326, 305, 307, 312, 312, 304, 307, 302, + 0, 0, 314, 298, 308, 315, 306, 294, 293, 307, + + 296, 309, 289, 0, 299, 281, 0, 300, 0, 297, + 284, 0, 283, 278, 283, 282, 292, 0, 278, 0, + 282, 0, 0, 278, 275, 289, 0, 274, 274, 272, + 288, 273, 285, 267, 285, 280, 0, 275, 275, 261, + 260, 273, 259, 273, 272, 271, 0, 255, 0, 249, + 0, 268, 252, 251, 251, 0, 264, 254, 249, 248, + 260, 250, 249, 0, 0, 0, 253, 0, 241, 0, + 255, 251, 237, 0, 251, 252, 235, 240, 233, 251, + 233, 230, 231, 228, 0, 233, 245, 232, 239, 229, + 237, 222, 0, 0, 0, 214, 221, 0, 0, 218, + + 0, 217, 0, 231, 0, 232, 219, 218, 0, 214, + 0, 217, 0, 209, 211, 0, 210, 224, 217, 0, + 0, 220, 223, 205, 220, 0, 216, 0, 0, 200, + 214, 213, 0, 0, 197, 196, 201, 0, 210, 195, + 0, 0, 201, 197, 0, 192, 0, 204, 204, 192, + 202, 191, 0, 178, 0, 0, 198, 0, 182, 176, + 182, 0, 173, 0, 178, 191, 0, 190, 0, 0, + 181, 0, 185, 0, 172, 172, 178, 164, 187, 175, + 174, 154, 125, 116, 0, 127, 133, 124, 121, 117, + 109, 0, 444, 165, 171, 177, 179, 145, 185, 191, + + 197, 203 } ; -static yyconst flex_int16_t yy_def[376] = +static yyconst flex_int16_t yy_def[403] = { 0, - 369, 1, 370, 370, 371, 371, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 369, 369, 373, 374, 375, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - - 372, 372, 372, 372, 372, 372, 372, 372, 372, 373, - 374, 374, 369, 375, 369, 369, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 372, 372, - 372, 372, 372, 372, 372, 372, 372, 372, 0, 369, - 369, 369, 369, 369, 369 + 393, 1, 394, 394, 395, 395, 396, 396, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 397, 393, 393, 393, 393, 393, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 393, 393, + 399, 400, 401, 393, 402, 393, 393, 393, 393, 393, + 393, 397, 393, 393, 393, 393, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 399, 400, 400, + 393, 401, 393, 402, 393, 393, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 398, 398, 398, 398, 398, 398, 398, 398, + 398, 398, 0, 393, 393, 393, 393, 393, 393, 393, + + 393, 393 } ; -static yyconst flex_int16_t yy_nxt[448] = +static yyconst flex_int16_t yy_nxt[494] = { 0, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 34, 35, 34, - 34, 36, 34, 37, 38, 39, 34, 40, 41, 42, - 43, 44, 45, 34, 34, 34, 46, 47, 52, 52, - 52, 52, 55, 62, 56, 58, 59, 64, 63, 68, - 76, 65, 77, 69, 66, 105, 70, 106, 78, 71, - 73, 82, 72, 85, 74, 79, 87, 67, 80, 83, - 75, 81, 88, 86, 84, 89, 112, 102, 61, 95, - 98, 113, 118, 90, 103, 91, 108, 92, 96, 97, - - 93, 104, 99, 109, 52, 52, 100, 55, 119, 56, - 101, 124, 126, 127, 131, 152, 142, 125, 154, 160, - 128, 153, 172, 132, 158, 163, 173, 161, 183, 369, - 133, 143, 144, 155, 369, 159, 164, 156, 112, 187, - 188, 194, 200, 113, 184, 195, 202, 223, 224, 368, - 367, 366, 365, 364, 363, 362, 203, 201, 361, 225, - 48, 48, 48, 48, 50, 50, 50, 50, 110, 110, - 360, 110, 111, 111, 111, 111, 114, 359, 114, 114, - 358, 357, 356, 355, 354, 353, 352, 351, 350, 349, - 348, 347, 346, 345, 344, 343, 342, 341, 340, 339, - - 338, 337, 336, 335, 334, 333, 332, 331, 330, 329, - 328, 327, 326, 325, 324, 323, 322, 321, 320, 319, - 318, 317, 316, 315, 314, 313, 312, 311, 310, 309, - 308, 307, 306, 305, 304, 303, 302, 301, 300, 299, - 298, 297, 296, 295, 294, 293, 292, 291, 290, 289, - 288, 287, 286, 285, 284, 283, 282, 281, 280, 279, - 278, 277, 276, 275, 274, 273, 272, 271, 270, 269, - 268, 267, 266, 265, 264, 263, 262, 261, 260, 259, - 258, 257, 256, 255, 254, 253, 252, 251, 250, 249, - 248, 247, 246, 245, 244, 243, 242, 241, 240, 239, - - 238, 237, 236, 235, 234, 233, 232, 231, 230, 229, - 228, 227, 226, 222, 221, 220, 219, 218, 217, 216, - 215, 214, 213, 212, 211, 210, 209, 208, 207, 206, - 205, 204, 199, 198, 197, 196, 193, 192, 191, 190, - 189, 186, 185, 182, 181, 180, 179, 178, 177, 176, - 175, 116, 115, 174, 171, 170, 169, 168, 167, 166, - 165, 162, 157, 151, 150, 149, 148, 147, 146, 145, - 141, 140, 139, 138, 137, 136, 135, 134, 130, 129, - 123, 122, 121, 120, 117, 116, 115, 107, 94, 60, - 57, 54, 53, 369, 51, 51, 49, 49, 7, 369, - - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369 + 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, + 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, + 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, + 37, 37, 39, 37, 40, 41, 42, 37, 43, 44, + 45, 46, 47, 48, 37, 37, 37, 49, 50, 57, + 57, 57, 57, 60, 68, 61, 64, 65, 70, 69, + 74, 113, 71, 114, 75, 72, 60, 76, 61, 85, + 77, 79, 82, 78, 83, 80, 86, 93, 73, 87, + 90, 81, 88, 95, 84, 89, 97, 94, 91, 96, + 103, 106, 128, 92, 98, 110, 99, 116, 100, 104, + + 105, 101, 111, 107, 117, 120, 154, 108, 129, 112, + 121, 109, 57, 57, 134, 136, 137, 141, 164, 166, + 135, 155, 156, 138, 165, 170, 142, 172, 175, 196, + 181, 200, 201, 143, 167, 173, 171, 185, 168, 176, + 182, 186, 393, 120, 215, 197, 207, 393, 121, 67, + 208, 217, 238, 239, 392, 391, 390, 389, 388, 216, + 387, 218, 386, 385, 240, 51, 51, 51, 51, 51, + 51, 53, 53, 53, 53, 53, 53, 55, 55, 55, + 55, 55, 55, 62, 62, 118, 118, 118, 384, 118, + 118, 119, 119, 119, 119, 119, 119, 122, 122, 383, + + 122, 122, 122, 124, 382, 124, 124, 124, 124, 381, + 380, 379, 378, 377, 376, 375, 374, 373, 372, 371, + 370, 369, 368, 367, 366, 365, 364, 363, 362, 361, + 360, 359, 358, 357, 356, 355, 354, 353, 352, 351, + 350, 349, 348, 347, 346, 345, 344, 343, 342, 341, + 340, 339, 338, 337, 336, 335, 334, 333, 332, 331, + 330, 329, 328, 327, 326, 325, 324, 323, 322, 321, + 320, 319, 318, 317, 316, 315, 314, 313, 312, 311, + 310, 309, 308, 307, 306, 305, 304, 303, 302, 301, + 300, 299, 298, 297, 296, 295, 294, 293, 292, 291, + + 290, 289, 288, 287, 286, 285, 284, 283, 282, 281, + 280, 279, 278, 277, 276, 275, 274, 273, 272, 271, + 270, 269, 268, 267, 266, 265, 264, 263, 262, 261, + 260, 259, 258, 257, 256, 255, 254, 253, 252, 251, + 250, 249, 248, 247, 246, 245, 244, 243, 242, 241, + 237, 236, 235, 234, 233, 232, 231, 230, 229, 228, + 227, 226, 225, 224, 223, 222, 221, 220, 219, 214, + 213, 212, 211, 210, 209, 206, 205, 204, 203, 202, + 199, 198, 195, 194, 193, 192, 191, 190, 189, 188, + 126, 125, 123, 187, 184, 183, 180, 179, 178, 177, + + 174, 169, 163, 162, 161, 160, 159, 158, 157, 153, + 152, 151, 150, 149, 148, 147, 146, 145, 144, 140, + 139, 133, 132, 131, 130, 127, 393, 126, 125, 123, + 115, 102, 66, 63, 59, 58, 393, 56, 56, 54, + 54, 52, 52, 9, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393 + } ; -static yyconst flex_int16_t yy_chk[448] = +static yyconst flex_int16_t yy_chk[494] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, - 10, 10, 21, 28, 21, 24, 24, 29, 28, 30, - 32, 29, 32, 30, 29, 43, 30, 43, 33, 30, - 31, 35, 30, 36, 31, 33, 37, 29, 33, 35, - 31, 33, 37, 36, 35, 38, 49, 42, 372, 40, - 41, 49, 63, 38, 42, 38, 45, 38, 40, 40, - - 38, 42, 41, 45, 52, 52, 41, 56, 63, 56, - 41, 69, 70, 70, 73, 94, 83, 69, 95, 98, - 70, 94, 108, 73, 97, 100, 108, 98, 127, 111, - 73, 83, 83, 95, 111, 97, 100, 95, 112, 130, - 130, 136, 143, 112, 127, 136, 144, 168, 168, 367, - 366, 365, 364, 363, 362, 360, 144, 143, 359, 168, - 370, 370, 370, 370, 371, 371, 371, 371, 373, 373, - 358, 373, 374, 374, 374, 374, 375, 357, 375, 375, - 356, 355, 354, 353, 352, 351, 349, 347, 344, 342, - 341, 339, 338, 337, 336, 334, 332, 330, 329, 328, - - 327, 325, 323, 322, 319, 318, 316, 315, 312, 311, - 310, 306, 305, 304, 303, 300, 299, 298, 296, 295, - 293, 291, 289, 288, 286, 284, 282, 279, 278, 274, - 273, 272, 271, 270, 269, 267, 266, 265, 264, 263, - 262, 261, 260, 259, 258, 256, 255, 254, 252, 247, - 246, 245, 244, 243, 242, 241, 239, 238, 237, 236, - 234, 232, 230, 229, 228, 227, 226, 225, 224, 223, - 221, 220, 219, 218, 217, 216, 215, 214, 213, 211, - 210, 209, 206, 204, 202, 201, 200, 199, 197, 196, - 195, 193, 192, 190, 189, 188, 187, 186, 185, 184, - - 183, 182, 181, 180, 177, 176, 175, 174, 173, 172, - 171, 170, 169, 167, 166, 165, 163, 160, 159, 158, - 157, 156, 155, 154, 153, 152, 150, 149, 148, 147, - 146, 145, 142, 141, 139, 138, 135, 134, 133, 132, - 131, 129, 128, 126, 125, 124, 123, 122, 121, 120, - 119, 116, 115, 109, 107, 106, 105, 104, 103, 102, - 101, 99, 96, 93, 92, 91, 88, 87, 86, 85, - 81, 80, 79, 78, 77, 76, 75, 74, 72, 71, - 68, 66, 65, 64, 62, 55, 51, 44, 39, 26, - 22, 20, 19, 7, 6, 5, 4, 3, 369, 369, - - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369, 369, 369, 369, - 369, 369, 369, 369, 369, 369, 369 + 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, + 11, 12, 12, 24, 31, 24, 27, 27, 32, 31, + 33, 46, 32, 46, 33, 32, 61, 33, 61, 36, + 33, 34, 35, 33, 35, 34, 36, 39, 32, 36, + 38, 34, 36, 40, 35, 36, 41, 39, 38, 40, + 43, 44, 69, 38, 41, 45, 41, 48, 41, 43, + + 43, 41, 45, 44, 48, 52, 91, 44, 69, 45, + 52, 44, 57, 57, 75, 76, 76, 79, 102, 103, + 75, 91, 91, 76, 102, 105, 79, 106, 108, 137, + 113, 140, 140, 79, 103, 106, 105, 116, 103, 108, + 113, 116, 119, 120, 155, 137, 146, 119, 120, 398, + 146, 156, 180, 180, 391, 390, 389, 388, 387, 155, + 386, 156, 384, 383, 180, 394, 394, 394, 394, 394, + 394, 395, 395, 395, 395, 395, 395, 396, 396, 396, + 396, 396, 396, 397, 397, 399, 399, 399, 382, 399, + 399, 400, 400, 400, 400, 400, 400, 401, 401, 381, + + 401, 401, 401, 402, 380, 402, 402, 402, 402, 379, + 378, 377, 376, 375, 373, 371, 368, 366, 365, 363, + 361, 360, 359, 357, 354, 352, 351, 350, 349, 348, + 346, 344, 343, 340, 339, 337, 336, 335, 332, 331, + 330, 327, 325, 324, 323, 322, 319, 318, 317, 315, + 314, 312, 310, 308, 307, 306, 304, 302, 300, 297, + 296, 292, 291, 290, 289, 288, 287, 286, 284, 283, + 282, 281, 280, 279, 278, 277, 276, 275, 273, 272, + 271, 269, 267, 263, 262, 261, 260, 259, 258, 257, + 255, 254, 253, 252, 250, 248, 246, 245, 244, 243, + + 242, 241, 240, 239, 238, 236, 235, 234, 233, 232, + 231, 230, 229, 228, 226, 225, 224, 221, 219, 217, + 216, 215, 214, 213, 211, 210, 208, 206, 205, 203, + 202, 201, 200, 199, 198, 197, 196, 195, 194, 193, + 190, 189, 188, 187, 186, 185, 184, 183, 182, 181, + 179, 178, 177, 175, 172, 171, 170, 169, 168, 167, + 166, 165, 164, 162, 161, 160, 159, 158, 157, 154, + 153, 152, 150, 149, 148, 145, 144, 143, 142, 141, + 139, 138, 136, 135, 134, 133, 132, 131, 130, 129, + 126, 125, 123, 117, 115, 114, 112, 111, 110, 109, + + 107, 104, 101, 100, 99, 96, 95, 94, 93, 89, + 88, 87, 86, 85, 84, 83, 82, 81, 80, 78, + 77, 74, 72, 71, 70, 68, 62, 60, 56, 54, + 47, 42, 29, 25, 23, 22, 9, 8, 7, 6, + 5, 4, 3, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393, 393, 393, 393, 393, 393, 393, 393, + 393, 393, 393 + } ; static yy_state_type yy_last_accepting_state; @@ -675,34 +699,16 @@ not automatically generate them from pars0grm.y and pars0lex.l. How to make the InnoDB parser and lexer C files: -1. First do - bison -d pars0grm.y - That generates pars0grm.tab.c and pars0grm.tab.h. - -2. Rename pars0grm.tab.c to pars0grm.c and pars0grm.tab.h to pars0grm.h. - -3. Copy pars0grm.h also to /innobase/include - -4. Do - flex pars0lex.l - That generates lex.yy.c. - -5. Rename lex.yy.c to lexyy.c. +1. Run ./make_flex.sh to generate lexer files. -6. Remove the #include of unistd.h from about line 2500 of lexyy.c +2. Run ./make_bison.sh to generate parser files. -7. Add '#include "univ.i"' before #include <stdio.h> in lexyy.c - (Needed for AIX) - -8. Add a type cast to int to the assignment below the comment - 'need more input.' (Removes a warning on Win64) - -These instructions seem to work at least with bison-1.28 and flex-2.5.4 on +These instructions seem to work at least with bison-1.875d and flex-2.5.31 on Linux. *******************************************************/ #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 -#line 56 "pars0lex.l" +#line 38 "pars0lex.l" #define YYSTYPE que_node_t* #include "univ.i" @@ -749,11 +755,13 @@ string_append( -#line 751 "lex.yy.c" + +#line 759 "_flex_tmp.c" #define INITIAL 0 #define comment 1 #define quoted 2 +#define id 3 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way @@ -900,10 +908,10 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 106 "pars0lex.l" +#line 91 "pars0lex.l" -#line 905 "lex.yy.c" +#line 914 "_flex_tmp.c" if ( (yy_init) ) { @@ -956,13 +964,13 @@ yy_match: while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 370 ) + if ( yy_current_state >= 394 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } - while ( yy_current_state != 369 ); + while ( yy_current_state != 393 ); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); @@ -984,7 +992,7 @@ do_action: /* This label is used only to access EOF actions. */ case 1: YY_RULE_SETUP -#line 108 "pars0lex.l" +#line 93 "pars0lex.l" { yylval = sym_tab_add_int_lit(pars_sym_tab_global, atoi(yytext)); @@ -993,7 +1001,7 @@ YY_RULE_SETUP YY_BREAK case 2: YY_RULE_SETUP -#line 114 "pars0lex.l" +#line 99 "pars0lex.l" { ut_error; /* not implemented */ @@ -1002,7 +1010,19 @@ YY_RULE_SETUP YY_BREAK case 3: YY_RULE_SETUP -#line 120 "pars0lex.l" +#line 105 "pars0lex.l" +{ + ulint type; + + yylval = sym_tab_add_bound_lit(pars_sym_tab_global, + yytext + 1, &type); + + return(type); +} + YY_BREAK +case 4: +YY_RULE_SETUP +#line 114 "pars0lex.l" { /* Quoted character string literals are handled in an explicit start state 'quoted'. This state is entered and the buffer for @@ -1013,19 +1033,19 @@ In the state 'quoted', only two actions are possible (defined below). */ stringbuf_len = 0; } YY_BREAK -case 4: -/* rule 4 can match eol */ +case 5: +/* rule 5 can match eol */ YY_RULE_SETUP -#line 129 "pars0lex.l" +#line 123 "pars0lex.l" { /* Got a sequence of characters other than "'": append to string buffer */ string_append(yytext, yyleng); } YY_BREAK -case 5: +case 6: YY_RULE_SETUP -#line 134 "pars0lex.l" +#line 128 "pars0lex.l" { /* Got a sequence of "'" characters: append half of them to string buffer, @@ -1050,18 +1070,69 @@ YY_RULE_SETUP } } YY_BREAK -case 6: +case 7: YY_RULE_SETUP -#line 158 "pars0lex.l" +#line 152 "pars0lex.l" +{ +/* Quoted identifiers are handled in an explicit start state 'id'. +This state is entered and the buffer for the scanned string is emptied +upon encountering a starting quote. + +In the state 'id', only two actions are possible (defined below). */ + BEGIN(id); + stringbuf_len = 0; +} + YY_BREAK +case 8: +/* rule 8 can match eol */ +YY_RULE_SETUP +#line 161 "pars0lex.l" +{ + /* Got a sequence of characters other than '"': + append to string buffer */ + string_append(yytext, yyleng); +} + YY_BREAK +case 9: +YY_RULE_SETUP +#line 166 "pars0lex.l" +{ + /* Got a sequence of '"' characters: + append half of them to string buffer, + as '""' represents a single '"'. + We apply truncating division, + so that '"""' will result in '"'. */ + + string_append(yytext, yyleng / 2); + + /* If we got an odd number of quotes, then the + last quote we got is the terminating quote. + At the end of the string, we return to the + initial start state and report the scanned + identifier. */ + + if (yyleng % 2) { + BEGIN(INITIAL); + yylval = sym_tab_add_id( + pars_sym_tab_global, + (byte*) stringbuf, stringbuf_len); + + return(PARS_ID_TOKEN); + } +} + YY_BREAK +case 10: +YY_RULE_SETUP +#line 191 "pars0lex.l" { yylval = sym_tab_add_null_lit(pars_sym_tab_global); return(PARS_NULL_LIT); } YY_BREAK -case 7: +case 11: YY_RULE_SETUP -#line 164 "pars0lex.l" +#line 197 "pars0lex.l" { /* Implicit cursor name */ yylval = sym_tab_add_str_lit(pars_sym_tab_global, @@ -1069,527 +1140,548 @@ YY_RULE_SETUP return(PARS_SQL_TOKEN); } YY_BREAK -case 8: +case 12: YY_RULE_SETUP -#line 171 "pars0lex.l" +#line 204 "pars0lex.l" { return(PARS_AND_TOKEN); } YY_BREAK -case 9: +case 13: YY_RULE_SETUP -#line 175 "pars0lex.l" +#line 208 "pars0lex.l" { return(PARS_OR_TOKEN); } YY_BREAK -case 10: +case 14: YY_RULE_SETUP -#line 179 "pars0lex.l" +#line 212 "pars0lex.l" { return(PARS_NOT_TOKEN); } YY_BREAK -case 11: +case 15: YY_RULE_SETUP -#line 183 "pars0lex.l" +#line 216 "pars0lex.l" { return(PARS_PROCEDURE_TOKEN); } YY_BREAK -case 12: +case 16: YY_RULE_SETUP -#line 187 "pars0lex.l" +#line 220 "pars0lex.l" { return(PARS_IN_TOKEN); } YY_BREAK -case 13: +case 17: YY_RULE_SETUP -#line 191 "pars0lex.l" +#line 224 "pars0lex.l" { return(PARS_OUT_TOKEN); } YY_BREAK -case 14: +case 18: YY_RULE_SETUP -#line 195 "pars0lex.l" +#line 228 "pars0lex.l" { return(PARS_BINARY_TOKEN); } YY_BREAK -case 15: +case 19: YY_RULE_SETUP -#line 199 "pars0lex.l" +#line 232 "pars0lex.l" { return(PARS_BLOB_TOKEN); } YY_BREAK -case 16: +case 20: YY_RULE_SETUP -#line 203 "pars0lex.l" +#line 236 "pars0lex.l" { return(PARS_INT_TOKEN); } YY_BREAK -case 17: +case 21: YY_RULE_SETUP -#line 207 "pars0lex.l" +#line 240 "pars0lex.l" { return(PARS_INT_TOKEN); } YY_BREAK -case 18: +case 22: YY_RULE_SETUP -#line 211 "pars0lex.l" +#line 244 "pars0lex.l" { return(PARS_FLOAT_TOKEN); } YY_BREAK -case 19: +case 23: YY_RULE_SETUP -#line 215 "pars0lex.l" +#line 248 "pars0lex.l" { return(PARS_CHAR_TOKEN); } YY_BREAK -case 20: +case 24: YY_RULE_SETUP -#line 219 "pars0lex.l" +#line 252 "pars0lex.l" { return(PARS_IS_TOKEN); } YY_BREAK -case 21: +case 25: YY_RULE_SETUP -#line 223 "pars0lex.l" +#line 256 "pars0lex.l" { return(PARS_BEGIN_TOKEN); } YY_BREAK -case 22: +case 26: YY_RULE_SETUP -#line 227 "pars0lex.l" +#line 260 "pars0lex.l" { return(PARS_END_TOKEN); } YY_BREAK -case 23: +case 27: YY_RULE_SETUP -#line 231 "pars0lex.l" +#line 264 "pars0lex.l" { return(PARS_IF_TOKEN); } YY_BREAK -case 24: +case 28: YY_RULE_SETUP -#line 235 "pars0lex.l" +#line 268 "pars0lex.l" { return(PARS_THEN_TOKEN); } YY_BREAK -case 25: +case 29: YY_RULE_SETUP -#line 239 "pars0lex.l" +#line 272 "pars0lex.l" { return(PARS_ELSE_TOKEN); } YY_BREAK -case 26: +case 30: YY_RULE_SETUP -#line 243 "pars0lex.l" +#line 276 "pars0lex.l" { return(PARS_ELSIF_TOKEN); } YY_BREAK -case 27: +case 31: YY_RULE_SETUP -#line 247 "pars0lex.l" +#line 280 "pars0lex.l" { return(PARS_LOOP_TOKEN); } YY_BREAK -case 28: +case 32: YY_RULE_SETUP -#line 251 "pars0lex.l" +#line 284 "pars0lex.l" { return(PARS_WHILE_TOKEN); } YY_BREAK -case 29: +case 33: YY_RULE_SETUP -#line 255 "pars0lex.l" +#line 288 "pars0lex.l" { return(PARS_RETURN_TOKEN); } YY_BREAK -case 30: +case 34: YY_RULE_SETUP -#line 259 "pars0lex.l" +#line 292 "pars0lex.l" { return(PARS_SELECT_TOKEN); } YY_BREAK -case 31: +case 35: YY_RULE_SETUP -#line 263 "pars0lex.l" +#line 296 "pars0lex.l" { return(PARS_SUM_TOKEN); } YY_BREAK -case 32: +case 36: YY_RULE_SETUP -#line 267 "pars0lex.l" +#line 300 "pars0lex.l" { return(PARS_COUNT_TOKEN); } YY_BREAK -case 33: +case 37: YY_RULE_SETUP -#line 271 "pars0lex.l" +#line 304 "pars0lex.l" { return(PARS_DISTINCT_TOKEN); } YY_BREAK -case 34: +case 38: YY_RULE_SETUP -#line 275 "pars0lex.l" +#line 308 "pars0lex.l" { return(PARS_FROM_TOKEN); } YY_BREAK -case 35: +case 39: YY_RULE_SETUP -#line 279 "pars0lex.l" +#line 312 "pars0lex.l" { return(PARS_WHERE_TOKEN); } YY_BREAK -case 36: +case 40: YY_RULE_SETUP -#line 283 "pars0lex.l" +#line 316 "pars0lex.l" { return(PARS_FOR_TOKEN); } YY_BREAK -case 37: +case 41: YY_RULE_SETUP -#line 287 "pars0lex.l" +#line 320 "pars0lex.l" { return(PARS_CONSISTENT_TOKEN); } YY_BREAK -case 38: +case 42: YY_RULE_SETUP -#line 291 "pars0lex.l" +#line 324 "pars0lex.l" { return(PARS_READ_TOKEN); } YY_BREAK -case 39: +case 43: YY_RULE_SETUP -#line 295 "pars0lex.l" +#line 328 "pars0lex.l" { return(PARS_ORDER_TOKEN); } YY_BREAK -case 40: +case 44: YY_RULE_SETUP -#line 299 "pars0lex.l" +#line 332 "pars0lex.l" { return(PARS_BY_TOKEN); } YY_BREAK -case 41: +case 45: YY_RULE_SETUP -#line 303 "pars0lex.l" +#line 336 "pars0lex.l" { return(PARS_ASC_TOKEN); } YY_BREAK -case 42: +case 46: YY_RULE_SETUP -#line 307 "pars0lex.l" +#line 340 "pars0lex.l" { return(PARS_DESC_TOKEN); } YY_BREAK -case 43: +case 47: YY_RULE_SETUP -#line 311 "pars0lex.l" +#line 344 "pars0lex.l" { return(PARS_INSERT_TOKEN); } YY_BREAK -case 44: +case 48: YY_RULE_SETUP -#line 315 "pars0lex.l" +#line 348 "pars0lex.l" { return(PARS_INTO_TOKEN); } YY_BREAK -case 45: +case 49: YY_RULE_SETUP -#line 319 "pars0lex.l" +#line 352 "pars0lex.l" { return(PARS_VALUES_TOKEN); } YY_BREAK -case 46: +case 50: YY_RULE_SETUP -#line 323 "pars0lex.l" +#line 356 "pars0lex.l" { return(PARS_UPDATE_TOKEN); } YY_BREAK -case 47: +case 51: YY_RULE_SETUP -#line 327 "pars0lex.l" +#line 360 "pars0lex.l" { return(PARS_SET_TOKEN); } YY_BREAK -case 48: +case 52: YY_RULE_SETUP -#line 331 "pars0lex.l" +#line 364 "pars0lex.l" { return(PARS_DELETE_TOKEN); } YY_BREAK -case 49: +case 53: YY_RULE_SETUP -#line 335 "pars0lex.l" +#line 368 "pars0lex.l" { return(PARS_CURRENT_TOKEN); } YY_BREAK -case 50: +case 54: YY_RULE_SETUP -#line 339 "pars0lex.l" +#line 372 "pars0lex.l" { return(PARS_OF_TOKEN); } YY_BREAK -case 51: +case 55: YY_RULE_SETUP -#line 343 "pars0lex.l" +#line 376 "pars0lex.l" { return(PARS_CREATE_TOKEN); } YY_BREAK -case 52: +case 56: YY_RULE_SETUP -#line 347 "pars0lex.l" +#line 380 "pars0lex.l" { return(PARS_TABLE_TOKEN); } YY_BREAK -case 53: +case 57: YY_RULE_SETUP -#line 351 "pars0lex.l" +#line 384 "pars0lex.l" { return(PARS_INDEX_TOKEN); } YY_BREAK -case 54: +case 58: YY_RULE_SETUP -#line 355 "pars0lex.l" +#line 388 "pars0lex.l" { return(PARS_UNIQUE_TOKEN); } YY_BREAK -case 55: +case 59: YY_RULE_SETUP -#line 359 "pars0lex.l" +#line 392 "pars0lex.l" { return(PARS_CLUSTERED_TOKEN); } YY_BREAK -case 56: +case 60: YY_RULE_SETUP -#line 363 "pars0lex.l" +#line 396 "pars0lex.l" { return(PARS_DOES_NOT_FIT_IN_MEM_TOKEN); } YY_BREAK -case 57: +case 61: YY_RULE_SETUP -#line 367 "pars0lex.l" +#line 400 "pars0lex.l" { return(PARS_ON_TOKEN); } YY_BREAK -case 58: +case 62: YY_RULE_SETUP -#line 371 "pars0lex.l" +#line 404 "pars0lex.l" { return(PARS_DECLARE_TOKEN); } YY_BREAK -case 59: +case 63: YY_RULE_SETUP -#line 375 "pars0lex.l" +#line 408 "pars0lex.l" { return(PARS_CURSOR_TOKEN); } YY_BREAK -case 60: +case 64: YY_RULE_SETUP -#line 379 "pars0lex.l" +#line 412 "pars0lex.l" { return(PARS_OPEN_TOKEN); } YY_BREAK -case 61: +case 65: YY_RULE_SETUP -#line 383 "pars0lex.l" +#line 416 "pars0lex.l" { return(PARS_FETCH_TOKEN); } YY_BREAK -case 62: +case 66: YY_RULE_SETUP -#line 387 "pars0lex.l" +#line 420 "pars0lex.l" { return(PARS_CLOSE_TOKEN); } YY_BREAK -case 63: +case 67: YY_RULE_SETUP -#line 391 "pars0lex.l" +#line 424 "pars0lex.l" { return(PARS_NOTFOUND_TOKEN); } YY_BREAK -case 64: +case 68: YY_RULE_SETUP -#line 395 "pars0lex.l" +#line 428 "pars0lex.l" { return(PARS_TO_CHAR_TOKEN); } YY_BREAK -case 65: +case 69: YY_RULE_SETUP -#line 399 "pars0lex.l" +#line 432 "pars0lex.l" { return(PARS_TO_NUMBER_TOKEN); } YY_BREAK -case 66: +case 70: YY_RULE_SETUP -#line 403 "pars0lex.l" +#line 436 "pars0lex.l" { return(PARS_TO_BINARY_TOKEN); } YY_BREAK -case 67: +case 71: YY_RULE_SETUP -#line 407 "pars0lex.l" +#line 440 "pars0lex.l" { return(PARS_BINARY_TO_NUMBER_TOKEN); } YY_BREAK -case 68: +case 72: YY_RULE_SETUP -#line 411 "pars0lex.l" +#line 444 "pars0lex.l" { return(PARS_SUBSTR_TOKEN); } YY_BREAK -case 69: +case 73: YY_RULE_SETUP -#line 415 "pars0lex.l" +#line 448 "pars0lex.l" { return(PARS_REPLSTR_TOKEN); } YY_BREAK -case 70: +case 74: YY_RULE_SETUP -#line 419 "pars0lex.l" +#line 452 "pars0lex.l" { return(PARS_CONCAT_TOKEN); } YY_BREAK -case 71: +case 75: YY_RULE_SETUP -#line 423 "pars0lex.l" +#line 456 "pars0lex.l" { return(PARS_INSTR_TOKEN); } YY_BREAK -case 72: +case 76: YY_RULE_SETUP -#line 427 "pars0lex.l" +#line 460 "pars0lex.l" { return(PARS_LENGTH_TOKEN); } YY_BREAK -case 73: +case 77: YY_RULE_SETUP -#line 431 "pars0lex.l" +#line 464 "pars0lex.l" { return(PARS_SYSDATE_TOKEN); } YY_BREAK -case 74: +case 78: YY_RULE_SETUP -#line 435 "pars0lex.l" +#line 468 "pars0lex.l" { return(PARS_PRINTF_TOKEN); } YY_BREAK -case 75: +case 79: YY_RULE_SETUP -#line 439 "pars0lex.l" +#line 472 "pars0lex.l" { return(PARS_ASSERT_TOKEN); } YY_BREAK -case 76: +case 80: YY_RULE_SETUP -#line 443 "pars0lex.l" +#line 476 "pars0lex.l" { return(PARS_RND_TOKEN); } YY_BREAK -case 77: +case 81: YY_RULE_SETUP -#line 447 "pars0lex.l" +#line 480 "pars0lex.l" { return(PARS_RND_STR_TOKEN); } YY_BREAK -case 78: +case 82: YY_RULE_SETUP -#line 451 "pars0lex.l" +#line 484 "pars0lex.l" { return(PARS_ROW_PRINTF_TOKEN); } YY_BREAK -case 79: +case 83: YY_RULE_SETUP -#line 455 "pars0lex.l" +#line 488 "pars0lex.l" { return(PARS_COMMIT_TOKEN); } YY_BREAK -case 80: +case 84: YY_RULE_SETUP -#line 459 "pars0lex.l" +#line 492 "pars0lex.l" { return(PARS_ROLLBACK_TOKEN); } YY_BREAK -case 81: +case 85: YY_RULE_SETUP -#line 463 "pars0lex.l" +#line 496 "pars0lex.l" { return(PARS_WORK_TOKEN); } YY_BREAK -case 82: +case 86: +YY_RULE_SETUP +#line 500 "pars0lex.l" +{ + return(PARS_UNSIGNED_TOKEN); +} + YY_BREAK +case 87: +YY_RULE_SETUP +#line 504 "pars0lex.l" +{ + return(PARS_EXIT_TOKEN); +} + YY_BREAK +case 88: +YY_RULE_SETUP +#line 508 "pars0lex.l" +{ + return(PARS_FUNCTION_TOKEN); +} + YY_BREAK +case 89: YY_RULE_SETUP -#line 467 "pars0lex.l" +#line 512 "pars0lex.l" { yylval = sym_tab_add_id(pars_sym_tab_global, (byte*)yytext, @@ -1597,192 +1689,192 @@ YY_RULE_SETUP return(PARS_ID_TOKEN); } YY_BREAK -case 83: +case 90: YY_RULE_SETUP -#line 474 "pars0lex.l" +#line 519 "pars0lex.l" { return(PARS_DDOT_TOKEN); } YY_BREAK -case 84: +case 91: YY_RULE_SETUP -#line 478 "pars0lex.l" +#line 523 "pars0lex.l" { return(PARS_ASSIGN_TOKEN); } YY_BREAK -case 85: +case 92: YY_RULE_SETUP -#line 482 "pars0lex.l" +#line 527 "pars0lex.l" { return(PARS_LE_TOKEN); } YY_BREAK -case 86: +case 93: YY_RULE_SETUP -#line 486 "pars0lex.l" +#line 531 "pars0lex.l" { return(PARS_GE_TOKEN); } YY_BREAK -case 87: +case 94: YY_RULE_SETUP -#line 490 "pars0lex.l" +#line 535 "pars0lex.l" { return(PARS_NE_TOKEN); } YY_BREAK -case 88: +case 95: YY_RULE_SETUP -#line 494 "pars0lex.l" +#line 539 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 89: +case 96: YY_RULE_SETUP -#line 499 "pars0lex.l" +#line 544 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 90: +case 97: YY_RULE_SETUP -#line 504 "pars0lex.l" +#line 549 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 91: +case 98: YY_RULE_SETUP -#line 509 "pars0lex.l" +#line 554 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 92: +case 99: YY_RULE_SETUP -#line 514 "pars0lex.l" +#line 559 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 93: +case 100: YY_RULE_SETUP -#line 519 "pars0lex.l" +#line 564 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 94: +case 101: YY_RULE_SETUP -#line 524 "pars0lex.l" +#line 569 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 95: +case 102: YY_RULE_SETUP -#line 529 "pars0lex.l" +#line 574 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 96: +case 103: YY_RULE_SETUP -#line 534 "pars0lex.l" +#line 579 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 97: +case 104: YY_RULE_SETUP -#line 539 "pars0lex.l" +#line 584 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 98: +case 105: YY_RULE_SETUP -#line 544 "pars0lex.l" +#line 589 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 99: +case 106: YY_RULE_SETUP -#line 549 "pars0lex.l" +#line 594 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 100: +case 107: YY_RULE_SETUP -#line 554 "pars0lex.l" +#line 599 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 101: +case 108: YY_RULE_SETUP -#line 559 "pars0lex.l" +#line 604 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 102: +case 109: YY_RULE_SETUP -#line 564 "pars0lex.l" +#line 609 "pars0lex.l" { return((int)(*yytext)); } YY_BREAK -case 103: +case 110: YY_RULE_SETUP -#line 569 "pars0lex.l" +#line 614 "pars0lex.l" BEGIN(comment); /* eat up comment */ YY_BREAK -case 104: -/* rule 104 can match eol */ +case 111: +/* rule 111 can match eol */ YY_RULE_SETUP -#line 571 "pars0lex.l" +#line 616 "pars0lex.l" YY_BREAK -case 105: -/* rule 105 can match eol */ +case 112: +/* rule 112 can match eol */ YY_RULE_SETUP -#line 572 "pars0lex.l" +#line 617 "pars0lex.l" YY_BREAK -case 106: +case 113: YY_RULE_SETUP -#line 573 "pars0lex.l" +#line 618 "pars0lex.l" BEGIN(INITIAL); YY_BREAK -case 107: -/* rule 107 can match eol */ +case 114: +/* rule 114 can match eol */ YY_RULE_SETUP -#line 575 "pars0lex.l" +#line 620 "pars0lex.l" /* eat up whitespace */ YY_BREAK -case 108: +case 115: YY_RULE_SETUP -#line 578 "pars0lex.l" +#line 623 "pars0lex.l" { fprintf(stderr,"Unrecognized character: %02x\n", *yytext); @@ -1792,15 +1884,16 @@ YY_RULE_SETUP return(0); } YY_BREAK -case 109: +case 116: YY_RULE_SETUP -#line 587 "pars0lex.l" +#line 632 "pars0lex.l" YY_FATAL_ERROR( "flex scanner jammed" ); YY_BREAK -#line 1799 "lex.yy.c" +#line 1892 "_flex_tmp.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(comment): case YY_STATE_EOF(quoted): +case YY_STATE_EOF(id): yyterminate(); case YY_END_OF_BUFFER: @@ -2084,7 +2177,7 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 370 ) + if ( yy_current_state >= 394 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; @@ -2112,11 +2205,11 @@ static int yy_get_next_buffer (void) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 370 ) + if ( yy_current_state >= 394 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; - yy_is_jam = (yy_current_state == 369); + yy_is_jam = (yy_current_state == 393); return yy_is_jam ? 0 : yy_current_state; } @@ -2145,7 +2238,7 @@ static int yy_get_next_buffer (void) else { /* need more input */ - int offset = (int)(yy_c_buf_p - yytext_ptr); + int offset = (int)((yy_c_buf_p) - (yytext_ptr)); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) @@ -2639,7 +2732,7 @@ void yyfree (void * ptr ) #undef YY_DECL_IS_OURS #undef YY_DECL #endif -#line 587 "pars0lex.l" +#line 632 "pars0lex.l" diff --git a/storage/innobase/pars/make_bison.sh b/storage/innobase/pars/make_bison.sh index 43b0322494c..c11456230c4 100755 --- a/storage/innobase/pars/make_bison.sh +++ b/storage/innobase/pars/make_bison.sh @@ -1,7 +1,6 @@ #!/bin/bash # -# regenerate parser from bison input files as documented at the top of -# pars0lex.l. +# generate parser files from bison input files. set -eu diff --git a/storage/innobase/pars/make_flex.sh b/storage/innobase/pars/make_flex.sh new file mode 100755 index 00000000000..c015327bf8c --- /dev/null +++ b/storage/innobase/pars/make_flex.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# +# generate lexer files from flex input files. + +set -eu + +TMPFILE=_flex_tmp.c +OUTFILE=lexyy.c + +flex -o $TMPFILE pars0lex.l + +# AIX needs its includes done in a certain order, so include "univ.i" first +# to be sure we get it right. +echo '#include "univ.i"' > $OUTFILE + +# flex assigns a pointer to an int in one place without a cast, resulting in +# a warning on Win64. this adds the cast. +sed -e 's/int offset = (yy_c_buf_p) - (yytext_ptr);/int offset = (int)((yy_c_buf_p) - (yytext_ptr));/;' < $TMPFILE >> $OUTFILE + +rm $TMPFILE diff --git a/storage/innobase/pars/pars0grm.c b/storage/innobase/pars/pars0grm.c index 3800cdda88e..2cce7cb1c8b 100644 --- a/storage/innobase/pars/pars0grm.c +++ b/storage/innobase/pars/pars0grm.c @@ -56,177 +56,187 @@ PARS_INT_LIT = 258, PARS_FLOAT_LIT = 259, PARS_STR_LIT = 260, - PARS_NULL_LIT = 261, - PARS_ID_TOKEN = 262, - PARS_AND_TOKEN = 263, - PARS_OR_TOKEN = 264, - PARS_NOT_TOKEN = 265, - PARS_GE_TOKEN = 266, - PARS_LE_TOKEN = 267, - PARS_NE_TOKEN = 268, - PARS_PROCEDURE_TOKEN = 269, - PARS_IN_TOKEN = 270, - PARS_OUT_TOKEN = 271, - PARS_BINARY_TOKEN = 272, - PARS_BLOB_TOKEN = 273, - PARS_INT_TOKEN = 274, - PARS_INTEGER_TOKEN = 275, - PARS_FLOAT_TOKEN = 276, - PARS_CHAR_TOKEN = 277, - PARS_IS_TOKEN = 278, - PARS_BEGIN_TOKEN = 279, - PARS_END_TOKEN = 280, - PARS_IF_TOKEN = 281, - PARS_THEN_TOKEN = 282, - PARS_ELSE_TOKEN = 283, - PARS_ELSIF_TOKEN = 284, - PARS_LOOP_TOKEN = 285, - PARS_WHILE_TOKEN = 286, - PARS_RETURN_TOKEN = 287, - PARS_SELECT_TOKEN = 288, - PARS_SUM_TOKEN = 289, - PARS_COUNT_TOKEN = 290, - PARS_DISTINCT_TOKEN = 291, - PARS_FROM_TOKEN = 292, - PARS_WHERE_TOKEN = 293, - PARS_FOR_TOKEN = 294, - PARS_DDOT_TOKEN = 295, - PARS_CONSISTENT_TOKEN = 296, - PARS_READ_TOKEN = 297, - PARS_ORDER_TOKEN = 298, - PARS_BY_TOKEN = 299, - PARS_ASC_TOKEN = 300, - PARS_DESC_TOKEN = 301, - PARS_INSERT_TOKEN = 302, - PARS_INTO_TOKEN = 303, - PARS_VALUES_TOKEN = 304, - PARS_UPDATE_TOKEN = 305, - PARS_SET_TOKEN = 306, - PARS_DELETE_TOKEN = 307, - PARS_CURRENT_TOKEN = 308, - PARS_OF_TOKEN = 309, - PARS_CREATE_TOKEN = 310, - PARS_TABLE_TOKEN = 311, - PARS_INDEX_TOKEN = 312, - PARS_UNIQUE_TOKEN = 313, - PARS_CLUSTERED_TOKEN = 314, - PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 315, - PARS_ON_TOKEN = 316, - PARS_ASSIGN_TOKEN = 317, - PARS_DECLARE_TOKEN = 318, - PARS_CURSOR_TOKEN = 319, - PARS_SQL_TOKEN = 320, - PARS_OPEN_TOKEN = 321, - PARS_FETCH_TOKEN = 322, - PARS_CLOSE_TOKEN = 323, - PARS_NOTFOUND_TOKEN = 324, - PARS_TO_CHAR_TOKEN = 325, - PARS_TO_NUMBER_TOKEN = 326, - PARS_TO_BINARY_TOKEN = 327, - PARS_BINARY_TO_NUMBER_TOKEN = 328, - PARS_SUBSTR_TOKEN = 329, - PARS_REPLSTR_TOKEN = 330, - PARS_CONCAT_TOKEN = 331, - PARS_INSTR_TOKEN = 332, - PARS_LENGTH_TOKEN = 333, - PARS_SYSDATE_TOKEN = 334, - PARS_PRINTF_TOKEN = 335, - PARS_ASSERT_TOKEN = 336, - PARS_RND_TOKEN = 337, - PARS_RND_STR_TOKEN = 338, - PARS_ROW_PRINTF_TOKEN = 339, - PARS_COMMIT_TOKEN = 340, - PARS_ROLLBACK_TOKEN = 341, - PARS_WORK_TOKEN = 342, - NEG = 343 + PARS_FIXBINARY_LIT = 261, + PARS_BLOB_LIT = 262, + PARS_NULL_LIT = 263, + PARS_ID_TOKEN = 264, + PARS_AND_TOKEN = 265, + PARS_OR_TOKEN = 266, + PARS_NOT_TOKEN = 267, + PARS_GE_TOKEN = 268, + PARS_LE_TOKEN = 269, + PARS_NE_TOKEN = 270, + PARS_PROCEDURE_TOKEN = 271, + PARS_IN_TOKEN = 272, + PARS_OUT_TOKEN = 273, + PARS_BINARY_TOKEN = 274, + PARS_BLOB_TOKEN = 275, + PARS_INT_TOKEN = 276, + PARS_INTEGER_TOKEN = 277, + PARS_FLOAT_TOKEN = 278, + PARS_CHAR_TOKEN = 279, + PARS_IS_TOKEN = 280, + PARS_BEGIN_TOKEN = 281, + PARS_END_TOKEN = 282, + PARS_IF_TOKEN = 283, + PARS_THEN_TOKEN = 284, + PARS_ELSE_TOKEN = 285, + PARS_ELSIF_TOKEN = 286, + PARS_LOOP_TOKEN = 287, + PARS_WHILE_TOKEN = 288, + PARS_RETURN_TOKEN = 289, + PARS_SELECT_TOKEN = 290, + PARS_SUM_TOKEN = 291, + PARS_COUNT_TOKEN = 292, + PARS_DISTINCT_TOKEN = 293, + PARS_FROM_TOKEN = 294, + PARS_WHERE_TOKEN = 295, + PARS_FOR_TOKEN = 296, + PARS_DDOT_TOKEN = 297, + PARS_CONSISTENT_TOKEN = 298, + PARS_READ_TOKEN = 299, + PARS_ORDER_TOKEN = 300, + PARS_BY_TOKEN = 301, + PARS_ASC_TOKEN = 302, + PARS_DESC_TOKEN = 303, + PARS_INSERT_TOKEN = 304, + PARS_INTO_TOKEN = 305, + PARS_VALUES_TOKEN = 306, + PARS_UPDATE_TOKEN = 307, + PARS_SET_TOKEN = 308, + PARS_DELETE_TOKEN = 309, + PARS_CURRENT_TOKEN = 310, + PARS_OF_TOKEN = 311, + PARS_CREATE_TOKEN = 312, + PARS_TABLE_TOKEN = 313, + PARS_INDEX_TOKEN = 314, + PARS_UNIQUE_TOKEN = 315, + PARS_CLUSTERED_TOKEN = 316, + PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 317, + PARS_ON_TOKEN = 318, + PARS_ASSIGN_TOKEN = 319, + PARS_DECLARE_TOKEN = 320, + PARS_CURSOR_TOKEN = 321, + PARS_SQL_TOKEN = 322, + PARS_OPEN_TOKEN = 323, + PARS_FETCH_TOKEN = 324, + PARS_CLOSE_TOKEN = 325, + PARS_NOTFOUND_TOKEN = 326, + PARS_TO_CHAR_TOKEN = 327, + PARS_TO_NUMBER_TOKEN = 328, + PARS_TO_BINARY_TOKEN = 329, + PARS_BINARY_TO_NUMBER_TOKEN = 330, + PARS_SUBSTR_TOKEN = 331, + PARS_REPLSTR_TOKEN = 332, + PARS_CONCAT_TOKEN = 333, + PARS_INSTR_TOKEN = 334, + PARS_LENGTH_TOKEN = 335, + PARS_SYSDATE_TOKEN = 336, + PARS_PRINTF_TOKEN = 337, + PARS_ASSERT_TOKEN = 338, + PARS_RND_TOKEN = 339, + PARS_RND_STR_TOKEN = 340, + PARS_ROW_PRINTF_TOKEN = 341, + PARS_COMMIT_TOKEN = 342, + PARS_ROLLBACK_TOKEN = 343, + PARS_WORK_TOKEN = 344, + PARS_UNSIGNED_TOKEN = 345, + PARS_EXIT_TOKEN = 346, + PARS_FUNCTION_TOKEN = 347, + NEG = 348 }; #endif #define PARS_INT_LIT 258 #define PARS_FLOAT_LIT 259 #define PARS_STR_LIT 260 -#define PARS_NULL_LIT 261 -#define PARS_ID_TOKEN 262 -#define PARS_AND_TOKEN 263 -#define PARS_OR_TOKEN 264 -#define PARS_NOT_TOKEN 265 -#define PARS_GE_TOKEN 266 -#define PARS_LE_TOKEN 267 -#define PARS_NE_TOKEN 268 -#define PARS_PROCEDURE_TOKEN 269 -#define PARS_IN_TOKEN 270 -#define PARS_OUT_TOKEN 271 -#define PARS_BINARY_TOKEN 272 -#define PARS_BLOB_TOKEN 273 -#define PARS_INT_TOKEN 274 -#define PARS_INTEGER_TOKEN 275 -#define PARS_FLOAT_TOKEN 276 -#define PARS_CHAR_TOKEN 277 -#define PARS_IS_TOKEN 278 -#define PARS_BEGIN_TOKEN 279 -#define PARS_END_TOKEN 280 -#define PARS_IF_TOKEN 281 -#define PARS_THEN_TOKEN 282 -#define PARS_ELSE_TOKEN 283 -#define PARS_ELSIF_TOKEN 284 -#define PARS_LOOP_TOKEN 285 -#define PARS_WHILE_TOKEN 286 -#define PARS_RETURN_TOKEN 287 -#define PARS_SELECT_TOKEN 288 -#define PARS_SUM_TOKEN 289 -#define PARS_COUNT_TOKEN 290 -#define PARS_DISTINCT_TOKEN 291 -#define PARS_FROM_TOKEN 292 -#define PARS_WHERE_TOKEN 293 -#define PARS_FOR_TOKEN 294 -#define PARS_DDOT_TOKEN 295 -#define PARS_CONSISTENT_TOKEN 296 -#define PARS_READ_TOKEN 297 -#define PARS_ORDER_TOKEN 298 -#define PARS_BY_TOKEN 299 -#define PARS_ASC_TOKEN 300 -#define PARS_DESC_TOKEN 301 -#define PARS_INSERT_TOKEN 302 -#define PARS_INTO_TOKEN 303 -#define PARS_VALUES_TOKEN 304 -#define PARS_UPDATE_TOKEN 305 -#define PARS_SET_TOKEN 306 -#define PARS_DELETE_TOKEN 307 -#define PARS_CURRENT_TOKEN 308 -#define PARS_OF_TOKEN 309 -#define PARS_CREATE_TOKEN 310 -#define PARS_TABLE_TOKEN 311 -#define PARS_INDEX_TOKEN 312 -#define PARS_UNIQUE_TOKEN 313 -#define PARS_CLUSTERED_TOKEN 314 -#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 315 -#define PARS_ON_TOKEN 316 -#define PARS_ASSIGN_TOKEN 317 -#define PARS_DECLARE_TOKEN 318 -#define PARS_CURSOR_TOKEN 319 -#define PARS_SQL_TOKEN 320 -#define PARS_OPEN_TOKEN 321 -#define PARS_FETCH_TOKEN 322 -#define PARS_CLOSE_TOKEN 323 -#define PARS_NOTFOUND_TOKEN 324 -#define PARS_TO_CHAR_TOKEN 325 -#define PARS_TO_NUMBER_TOKEN 326 -#define PARS_TO_BINARY_TOKEN 327 -#define PARS_BINARY_TO_NUMBER_TOKEN 328 -#define PARS_SUBSTR_TOKEN 329 -#define PARS_REPLSTR_TOKEN 330 -#define PARS_CONCAT_TOKEN 331 -#define PARS_INSTR_TOKEN 332 -#define PARS_LENGTH_TOKEN 333 -#define PARS_SYSDATE_TOKEN 334 -#define PARS_PRINTF_TOKEN 335 -#define PARS_ASSERT_TOKEN 336 -#define PARS_RND_TOKEN 337 -#define PARS_RND_STR_TOKEN 338 -#define PARS_ROW_PRINTF_TOKEN 339 -#define PARS_COMMIT_TOKEN 340 -#define PARS_ROLLBACK_TOKEN 341 -#define PARS_WORK_TOKEN 342 -#define NEG 343 +#define PARS_FIXBINARY_LIT 261 +#define PARS_BLOB_LIT 262 +#define PARS_NULL_LIT 263 +#define PARS_ID_TOKEN 264 +#define PARS_AND_TOKEN 265 +#define PARS_OR_TOKEN 266 +#define PARS_NOT_TOKEN 267 +#define PARS_GE_TOKEN 268 +#define PARS_LE_TOKEN 269 +#define PARS_NE_TOKEN 270 +#define PARS_PROCEDURE_TOKEN 271 +#define PARS_IN_TOKEN 272 +#define PARS_OUT_TOKEN 273 +#define PARS_BINARY_TOKEN 274 +#define PARS_BLOB_TOKEN 275 +#define PARS_INT_TOKEN 276 +#define PARS_INTEGER_TOKEN 277 +#define PARS_FLOAT_TOKEN 278 +#define PARS_CHAR_TOKEN 279 +#define PARS_IS_TOKEN 280 +#define PARS_BEGIN_TOKEN 281 +#define PARS_END_TOKEN 282 +#define PARS_IF_TOKEN 283 +#define PARS_THEN_TOKEN 284 +#define PARS_ELSE_TOKEN 285 +#define PARS_ELSIF_TOKEN 286 +#define PARS_LOOP_TOKEN 287 +#define PARS_WHILE_TOKEN 288 +#define PARS_RETURN_TOKEN 289 +#define PARS_SELECT_TOKEN 290 +#define PARS_SUM_TOKEN 291 +#define PARS_COUNT_TOKEN 292 +#define PARS_DISTINCT_TOKEN 293 +#define PARS_FROM_TOKEN 294 +#define PARS_WHERE_TOKEN 295 +#define PARS_FOR_TOKEN 296 +#define PARS_DDOT_TOKEN 297 +#define PARS_CONSISTENT_TOKEN 298 +#define PARS_READ_TOKEN 299 +#define PARS_ORDER_TOKEN 300 +#define PARS_BY_TOKEN 301 +#define PARS_ASC_TOKEN 302 +#define PARS_DESC_TOKEN 303 +#define PARS_INSERT_TOKEN 304 +#define PARS_INTO_TOKEN 305 +#define PARS_VALUES_TOKEN 306 +#define PARS_UPDATE_TOKEN 307 +#define PARS_SET_TOKEN 308 +#define PARS_DELETE_TOKEN 309 +#define PARS_CURRENT_TOKEN 310 +#define PARS_OF_TOKEN 311 +#define PARS_CREATE_TOKEN 312 +#define PARS_TABLE_TOKEN 313 +#define PARS_INDEX_TOKEN 314 +#define PARS_UNIQUE_TOKEN 315 +#define PARS_CLUSTERED_TOKEN 316 +#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 317 +#define PARS_ON_TOKEN 318 +#define PARS_ASSIGN_TOKEN 319 +#define PARS_DECLARE_TOKEN 320 +#define PARS_CURSOR_TOKEN 321 +#define PARS_SQL_TOKEN 322 +#define PARS_OPEN_TOKEN 323 +#define PARS_FETCH_TOKEN 324 +#define PARS_CLOSE_TOKEN 325 +#define PARS_NOTFOUND_TOKEN 326 +#define PARS_TO_CHAR_TOKEN 327 +#define PARS_TO_NUMBER_TOKEN 328 +#define PARS_TO_BINARY_TOKEN 329 +#define PARS_BINARY_TO_NUMBER_TOKEN 330 +#define PARS_SUBSTR_TOKEN 331 +#define PARS_REPLSTR_TOKEN 332 +#define PARS_CONCAT_TOKEN 333 +#define PARS_INSTR_TOKEN 334 +#define PARS_LENGTH_TOKEN 335 +#define PARS_SYSDATE_TOKEN 336 +#define PARS_PRINTF_TOKEN 337 +#define PARS_ASSERT_TOKEN 338 +#define PARS_RND_TOKEN 339 +#define PARS_RND_STR_TOKEN 340 +#define PARS_ROW_PRINTF_TOKEN 341 +#define PARS_COMMIT_TOKEN 342 +#define PARS_ROLLBACK_TOKEN 343 +#define PARS_WORK_TOKEN 344 +#define PARS_UNSIGNED_TOKEN 345 +#define PARS_EXIT_TOKEN 346 +#define PARS_FUNCTION_TOKEN 347 +#define NEG 348 @@ -279,7 +289,7 @@ typedef int YYSTYPE; /* Line 214 of yacc.c. */ -#line 283 "pars0grm.tab.c" +#line 293 "pars0grm.tab.c" #if ! defined (yyoverflow) || YYERROR_VERBOSE @@ -383,22 +393,22 @@ union yyalloc #endif /* YYFINAL -- State number of the termination state. */ -#define YYFINAL 95 +#define YYFINAL 99 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 734 +#define YYLAST 756 /* YYNTOKENS -- Number of terminals. */ -#define YYNTOKENS 104 +#define YYNTOKENS 109 /* YYNNTS -- Number of nonterminals. */ -#define YYNNTS 64 +#define YYNNTS 69 /* YYNRULES -- Number of rules. */ -#define YYNRULES 164 +#define YYNRULES 175 /* YYNRULES -- Number of states. */ -#define YYNSTATES 321 +#define YYNSTATES 337 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 -#define YYMAXUTOK 343 +#define YYMAXUTOK 348 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) @@ -409,16 +419,16 @@ static const unsigned char yytranslate[] = 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 96, 2, 2, - 98, 99, 93, 92, 101, 91, 2, 94, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 97, - 89, 88, 90, 100, 2, 2, 2, 2, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 101, 2, 2, + 103, 104, 98, 97, 106, 96, 2, 99, 2, 2, + 2, 2, 2, 2, 2, 2, 2, 2, 2, 102, + 94, 93, 95, 105, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 102, 2, 103, 2, 2, 2, 2, + 2, 2, 2, 107, 2, 108, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -440,7 +450,7 @@ static const unsigned char yytranslate[] = 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, - 85, 86, 87, 95 + 85, 86, 87, 88, 89, 90, 91, 92, 100 }; #if YYDEBUG @@ -450,100 +460,105 @@ static const unsigned short int yyprhs[] = { 0, 0, 3, 6, 8, 11, 14, 17, 20, 23, 26, 29, 32, 35, 38, 41, 44, 47, 50, 53, - 56, 59, 62, 65, 68, 70, 73, 75, 80, 82, - 84, 86, 88, 90, 94, 98, 102, 106, 109, 113, - 117, 121, 125, 129, 133, 137, 141, 145, 148, 152, - 156, 158, 160, 162, 164, 166, 168, 170, 172, 174, - 176, 178, 179, 181, 185, 192, 197, 199, 201, 203, - 205, 209, 210, 212, 216, 217, 219, 223, 225, 230, - 236, 241, 242, 244, 248, 250, 254, 256, 257, 260, - 261, 264, 265, 268, 269, 271, 273, 274, 279, 288, - 292, 298, 301, 305, 307, 311, 316, 321, 324, 327, - 331, 334, 337, 340, 344, 349, 351, 354, 355, 358, - 360, 368, 375, 386, 388, 391, 394, 399, 404, 406, - 410, 411, 415, 416, 419, 420, 422, 430, 432, 436, - 437, 439, 440, 442, 453, 456, 459, 461, 463, 465, - 467, 469, 473, 477, 478, 480, 484, 488, 489, 491, - 494, 501, 502, 504, 507 + 56, 59, 62, 65, 68, 71, 73, 76, 78, 83, + 85, 87, 89, 91, 93, 95, 97, 101, 105, 109, + 113, 116, 120, 124, 128, 132, 136, 140, 144, 148, + 152, 155, 159, 163, 165, 167, 169, 171, 173, 175, + 177, 179, 181, 183, 185, 186, 188, 192, 199, 204, + 206, 208, 210, 214, 216, 220, 221, 223, 227, 228, + 230, 234, 236, 241, 247, 252, 253, 255, 259, 261, + 265, 267, 268, 271, 272, 275, 276, 279, 280, 282, + 284, 285, 290, 299, 303, 309, 312, 316, 318, 322, + 327, 332, 335, 338, 342, 345, 348, 351, 355, 360, + 362, 365, 366, 369, 371, 379, 386, 397, 399, 401, + 404, 407, 412, 417, 423, 425, 429, 430, 434, 435, + 437, 438, 441, 442, 444, 452, 454, 458, 459, 461, + 462, 464, 475, 478, 481, 483, 485, 487, 489, 491, + 495, 499, 500, 502, 506, 510, 511, 513, 516, 523, + 528, 530, 532, 533, 535, 538 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const short int yyrhs[] = { - 105, 0, -1, 167, 97, -1, 110, -1, 111, 97, - -1, 142, 97, -1, 143, 97, -1, 141, 97, -1, - 144, 97, -1, 137, 97, -1, 124, 97, -1, 126, - 97, -1, 136, 97, -1, 134, 97, -1, 135, 97, - -1, 131, 97, -1, 132, 97, -1, 145, 97, -1, - 147, 97, -1, 146, 97, -1, 158, 97, -1, 159, - 97, -1, 153, 97, -1, 157, 97, -1, 105, -1, - 106, 105, -1, 7, -1, 108, 98, 115, 99, -1, - 3, -1, 4, -1, 5, -1, 6, -1, 65, -1, - 107, 92, 107, -1, 107, 91, 107, -1, 107, 93, - 107, -1, 107, 94, 107, -1, 91, 107, -1, 98, - 107, 99, -1, 107, 88, 107, -1, 107, 89, 107, - -1, 107, 90, 107, -1, 107, 11, 107, -1, 107, - 12, 107, -1, 107, 13, 107, -1, 107, 8, 107, - -1, 107, 9, 107, -1, 10, 107, -1, 7, 96, - 69, -1, 65, 96, 69, -1, 70, -1, 71, -1, - 72, -1, 73, -1, 74, -1, 76, -1, 77, -1, - 78, -1, 79, -1, 82, -1, 83, -1, -1, 100, - -1, 109, 101, 100, -1, 102, 7, 98, 109, 99, - 103, -1, 112, 98, 115, 99, -1, 75, -1, 80, - -1, 81, -1, 7, -1, 113, 101, 7, -1, -1, - 7, -1, 114, 101, 7, -1, -1, 107, -1, 115, - 101, 107, -1, 107, -1, 35, 98, 93, 99, -1, - 35, 98, 36, 7, 99, -1, 34, 98, 107, 99, - -1, -1, 116, -1, 117, 101, 116, -1, 93, -1, - 117, 48, 114, -1, 117, -1, -1, 38, 107, -1, - -1, 39, 50, -1, -1, 41, 42, -1, -1, 45, - -1, 46, -1, -1, 43, 44, 7, 122, -1, 33, - 118, 37, 113, 119, 120, 121, 123, -1, 47, 48, - 7, -1, 125, 49, 98, 115, 99, -1, 125, 124, - -1, 7, 88, 107, -1, 127, -1, 128, 101, 127, - -1, 38, 53, 54, 7, -1, 50, 7, 51, 128, - -1, 130, 119, -1, 130, 129, -1, 52, 37, 7, - -1, 133, 119, -1, 133, 129, -1, 84, 124, -1, - 7, 62, 107, -1, 29, 107, 27, 106, -1, 138, - -1, 139, 138, -1, -1, 28, 106, -1, 139, -1, - 26, 107, 27, 106, 140, 25, 26, -1, 31, 107, - 30, 106, 25, 30, -1, 39, 7, 15, 107, 40, - 107, 30, 106, 25, 30, -1, 32, -1, 66, 7, - -1, 68, 7, -1, 67, 7, 48, 114, -1, 7, - 160, 150, 151, -1, 148, -1, 149, 101, 148, -1, - -1, 98, 3, 99, -1, -1, 10, 6, -1, -1, - 60, -1, 55, 56, 7, 98, 149, 99, 152, -1, - 7, -1, 154, 101, 7, -1, -1, 58, -1, -1, - 59, -1, 55, 155, 156, 57, 7, 61, 7, 98, - 154, 99, -1, 85, 87, -1, 86, 87, -1, 19, - -1, 20, -1, 22, -1, 17, -1, 18, -1, 7, - 15, 160, -1, 7, 16, 160, -1, -1, 161, -1, - 162, 101, 161, -1, 7, 160, 97, -1, -1, 163, - -1, 164, 163, -1, 63, 64, 7, 23, 124, 97, - -1, -1, 165, -1, 166, 165, -1, 14, 7, 98, - 162, 99, 23, 164, 166, 24, 106, 25, -1 + 110, 0, -1, 177, 102, -1, 115, -1, 116, 102, + -1, 148, 102, -1, 149, 102, -1, 150, 102, -1, + 147, 102, -1, 151, 102, -1, 143, 102, -1, 130, + 102, -1, 132, 102, -1, 142, 102, -1, 140, 102, + -1, 141, 102, -1, 137, 102, -1, 138, 102, -1, + 152, 102, -1, 154, 102, -1, 153, 102, -1, 166, + 102, -1, 167, 102, -1, 161, 102, -1, 165, 102, + -1, 110, -1, 111, 110, -1, 9, -1, 113, 103, + 121, 104, -1, 3, -1, 4, -1, 5, -1, 6, + -1, 7, -1, 8, -1, 67, -1, 112, 97, 112, + -1, 112, 96, 112, -1, 112, 98, 112, -1, 112, + 99, 112, -1, 96, 112, -1, 103, 112, 104, -1, + 112, 93, 112, -1, 112, 94, 112, -1, 112, 95, + 112, -1, 112, 13, 112, -1, 112, 14, 112, -1, + 112, 15, 112, -1, 112, 10, 112, -1, 112, 11, + 112, -1, 12, 112, -1, 9, 101, 71, -1, 67, + 101, 71, -1, 72, -1, 73, -1, 74, -1, 75, + -1, 76, -1, 78, -1, 79, -1, 80, -1, 81, + -1, 84, -1, 85, -1, -1, 105, -1, 114, 106, + 105, -1, 107, 9, 103, 114, 104, 108, -1, 117, + 103, 121, 104, -1, 77, -1, 82, -1, 83, -1, + 9, 103, 104, -1, 9, -1, 119, 106, 9, -1, + -1, 9, -1, 120, 106, 9, -1, -1, 112, -1, + 121, 106, 112, -1, 112, -1, 37, 103, 98, 104, + -1, 37, 103, 38, 9, 104, -1, 36, 103, 112, + 104, -1, -1, 122, -1, 123, 106, 122, -1, 98, + -1, 123, 50, 120, -1, 123, -1, -1, 40, 112, + -1, -1, 41, 52, -1, -1, 43, 44, -1, -1, + 47, -1, 48, -1, -1, 45, 46, 9, 128, -1, + 35, 124, 39, 119, 125, 126, 127, 129, -1, 49, + 50, 9, -1, 131, 51, 103, 121, 104, -1, 131, + 130, -1, 9, 93, 112, -1, 133, -1, 134, 106, + 133, -1, 40, 55, 56, 9, -1, 52, 9, 53, + 134, -1, 136, 125, -1, 136, 135, -1, 54, 39, + 9, -1, 139, 125, -1, 139, 135, -1, 86, 130, + -1, 9, 64, 112, -1, 31, 112, 29, 111, -1, + 144, -1, 145, 144, -1, -1, 30, 111, -1, 145, + -1, 28, 112, 29, 111, 146, 27, 28, -1, 33, + 112, 32, 111, 27, 32, -1, 41, 9, 17, 112, + 42, 112, 32, 111, 27, 32, -1, 91, -1, 34, + -1, 68, 9, -1, 70, 9, -1, 69, 9, 50, + 120, -1, 69, 9, 50, 118, -1, 9, 168, 157, + 158, 159, -1, 155, -1, 156, 106, 155, -1, -1, + 103, 3, 104, -1, -1, 90, -1, -1, 12, 8, + -1, -1, 62, -1, 57, 58, 9, 103, 156, 104, + 160, -1, 9, -1, 162, 106, 9, -1, -1, 60, + -1, -1, 61, -1, 57, 163, 164, 59, 9, 63, + 9, 103, 162, 104, -1, 87, 89, -1, 88, 89, + -1, 21, -1, 22, -1, 24, -1, 19, -1, 20, + -1, 9, 17, 168, -1, 9, 18, 168, -1, -1, + 169, -1, 170, 106, 169, -1, 9, 168, 102, -1, + -1, 171, -1, 172, 171, -1, 65, 66, 9, 25, + 130, 102, -1, 65, 92, 9, 102, -1, 173, -1, + 174, -1, -1, 175, -1, 176, 175, -1, 16, 9, + 103, 170, 104, 25, 172, 176, 26, 111, 27, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const unsigned short int yyrline[] = { - 0, 131, 131, 132, 133, 134, 135, 136, 137, 138, - 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, - 149, 150, 151, 152, 156, 157, 162, 163, 165, 166, - 167, 168, 169, 170, 171, 172, 173, 174, 175, 176, - 177, 178, 179, 180, 181, 182, 183, 184, 185, 187, - 192, 193, 194, 195, 197, 198, 199, 200, 201, 202, - 203, 206, 208, 209, 213, 218, 223, 224, 225, 229, - 230, 235, 236, 237, 242, 243, 244, 248, 249, 254, - 260, 267, 268, 269, 274, 276, 278, 282, 283, 287, - 288, 293, 294, 299, 300, 301, 305, 306, 311, 321, - 326, 328, 333, 337, 338, 343, 349, 356, 361, 366, - 372, 377, 382, 387, 392, 398, 399, 404, 405, 407, - 411, 418, 424, 432, 436, 442, 448, 453, 458, 459, - 464, 465, 470, 471, 477, 478, 484, 490, 491, 496, - 497, 501, 502, 506, 514, 519, 524, 525, 526, 527, - 528, 532, 535, 541, 542, 543, 548, 552, 554, 555, - 559, 564, 566, 567, 571 + 0, 136, 136, 137, 138, 139, 140, 141, 142, 143, + 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, + 154, 155, 156, 157, 158, 162, 163, 168, 169, 171, + 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + 192, 193, 195, 200, 201, 202, 203, 205, 206, 207, + 208, 209, 210, 211, 214, 216, 217, 221, 226, 231, + 232, 233, 237, 241, 242, 247, 248, 249, 254, 255, + 256, 260, 261, 266, 272, 279, 280, 281, 286, 288, + 290, 294, 295, 299, 300, 305, 306, 311, 312, 313, + 317, 318, 323, 333, 338, 340, 345, 349, 350, 355, + 361, 368, 373, 378, 384, 389, 394, 399, 404, 410, + 411, 416, 417, 419, 423, 430, 436, 444, 448, 452, + 458, 464, 466, 471, 476, 477, 482, 483, 488, 489, + 495, 496, 502, 503, 509, 515, 516, 521, 522, 526, + 527, 531, 539, 544, 549, 550, 551, 552, 553, 557, + 560, 566, 567, 568, 573, 577, 579, 580, 584, 590, + 595, 596, 599, 601, 602, 606 }; #endif @@ -553,38 +568,40 @@ static const unsigned short int yyrline[] = static const char *const yytname[] = { "$end", "error", "$undefined", "PARS_INT_LIT", "PARS_FLOAT_LIT", - "PARS_STR_LIT", "PARS_NULL_LIT", "PARS_ID_TOKEN", "PARS_AND_TOKEN", - "PARS_OR_TOKEN", "PARS_NOT_TOKEN", "PARS_GE_TOKEN", "PARS_LE_TOKEN", - "PARS_NE_TOKEN", "PARS_PROCEDURE_TOKEN", "PARS_IN_TOKEN", - "PARS_OUT_TOKEN", "PARS_BINARY_TOKEN", "PARS_BLOB_TOKEN", - "PARS_INT_TOKEN", "PARS_INTEGER_TOKEN", "PARS_FLOAT_TOKEN", - "PARS_CHAR_TOKEN", "PARS_IS_TOKEN", "PARS_BEGIN_TOKEN", "PARS_END_TOKEN", - "PARS_IF_TOKEN", "PARS_THEN_TOKEN", "PARS_ELSE_TOKEN", - "PARS_ELSIF_TOKEN", "PARS_LOOP_TOKEN", "PARS_WHILE_TOKEN", - "PARS_RETURN_TOKEN", "PARS_SELECT_TOKEN", "PARS_SUM_TOKEN", - "PARS_COUNT_TOKEN", "PARS_DISTINCT_TOKEN", "PARS_FROM_TOKEN", - "PARS_WHERE_TOKEN", "PARS_FOR_TOKEN", "PARS_DDOT_TOKEN", - "PARS_CONSISTENT_TOKEN", "PARS_READ_TOKEN", "PARS_ORDER_TOKEN", - "PARS_BY_TOKEN", "PARS_ASC_TOKEN", "PARS_DESC_TOKEN", - "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", "PARS_VALUES_TOKEN", - "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", "PARS_DELETE_TOKEN", - "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", "PARS_CREATE_TOKEN", - "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", "PARS_UNIQUE_TOKEN", - "PARS_CLUSTERED_TOKEN", "PARS_DOES_NOT_FIT_IN_MEM_TOKEN", - "PARS_ON_TOKEN", "PARS_ASSIGN_TOKEN", "PARS_DECLARE_TOKEN", - "PARS_CURSOR_TOKEN", "PARS_SQL_TOKEN", "PARS_OPEN_TOKEN", - "PARS_FETCH_TOKEN", "PARS_CLOSE_TOKEN", "PARS_NOTFOUND_TOKEN", - "PARS_TO_CHAR_TOKEN", "PARS_TO_NUMBER_TOKEN", "PARS_TO_BINARY_TOKEN", - "PARS_BINARY_TO_NUMBER_TOKEN", "PARS_SUBSTR_TOKEN", "PARS_REPLSTR_TOKEN", - "PARS_CONCAT_TOKEN", "PARS_INSTR_TOKEN", "PARS_LENGTH_TOKEN", - "PARS_SYSDATE_TOKEN", "PARS_PRINTF_TOKEN", "PARS_ASSERT_TOKEN", - "PARS_RND_TOKEN", "PARS_RND_STR_TOKEN", "PARS_ROW_PRINTF_TOKEN", - "PARS_COMMIT_TOKEN", "PARS_ROLLBACK_TOKEN", "PARS_WORK_TOKEN", "'='", - "'<'", "'>'", "'-'", "'+'", "'*'", "'/'", "NEG", "'%'", "';'", "'('", - "')'", "'?'", "','", "'{'", "'}'", "$accept", "statement", - "statement_list", "exp", "function_name", "question_mark_list", - "stored_procedure_call", "predefined_procedure_call", - "predefined_procedure_name", "table_list", "variable_list", "exp_list", + "PARS_STR_LIT", "PARS_FIXBINARY_LIT", "PARS_BLOB_LIT", "PARS_NULL_LIT", + "PARS_ID_TOKEN", "PARS_AND_TOKEN", "PARS_OR_TOKEN", "PARS_NOT_TOKEN", + "PARS_GE_TOKEN", "PARS_LE_TOKEN", "PARS_NE_TOKEN", + "PARS_PROCEDURE_TOKEN", "PARS_IN_TOKEN", "PARS_OUT_TOKEN", + "PARS_BINARY_TOKEN", "PARS_BLOB_TOKEN", "PARS_INT_TOKEN", + "PARS_INTEGER_TOKEN", "PARS_FLOAT_TOKEN", "PARS_CHAR_TOKEN", + "PARS_IS_TOKEN", "PARS_BEGIN_TOKEN", "PARS_END_TOKEN", "PARS_IF_TOKEN", + "PARS_THEN_TOKEN", "PARS_ELSE_TOKEN", "PARS_ELSIF_TOKEN", + "PARS_LOOP_TOKEN", "PARS_WHILE_TOKEN", "PARS_RETURN_TOKEN", + "PARS_SELECT_TOKEN", "PARS_SUM_TOKEN", "PARS_COUNT_TOKEN", + "PARS_DISTINCT_TOKEN", "PARS_FROM_TOKEN", "PARS_WHERE_TOKEN", + "PARS_FOR_TOKEN", "PARS_DDOT_TOKEN", "PARS_CONSISTENT_TOKEN", + "PARS_READ_TOKEN", "PARS_ORDER_TOKEN", "PARS_BY_TOKEN", "PARS_ASC_TOKEN", + "PARS_DESC_TOKEN", "PARS_INSERT_TOKEN", "PARS_INTO_TOKEN", + "PARS_VALUES_TOKEN", "PARS_UPDATE_TOKEN", "PARS_SET_TOKEN", + "PARS_DELETE_TOKEN", "PARS_CURRENT_TOKEN", "PARS_OF_TOKEN", + "PARS_CREATE_TOKEN", "PARS_TABLE_TOKEN", "PARS_INDEX_TOKEN", + "PARS_UNIQUE_TOKEN", "PARS_CLUSTERED_TOKEN", + "PARS_DOES_NOT_FIT_IN_MEM_TOKEN", "PARS_ON_TOKEN", "PARS_ASSIGN_TOKEN", + "PARS_DECLARE_TOKEN", "PARS_CURSOR_TOKEN", "PARS_SQL_TOKEN", + "PARS_OPEN_TOKEN", "PARS_FETCH_TOKEN", "PARS_CLOSE_TOKEN", + "PARS_NOTFOUND_TOKEN", "PARS_TO_CHAR_TOKEN", "PARS_TO_NUMBER_TOKEN", + "PARS_TO_BINARY_TOKEN", "PARS_BINARY_TO_NUMBER_TOKEN", + "PARS_SUBSTR_TOKEN", "PARS_REPLSTR_TOKEN", "PARS_CONCAT_TOKEN", + "PARS_INSTR_TOKEN", "PARS_LENGTH_TOKEN", "PARS_SYSDATE_TOKEN", + "PARS_PRINTF_TOKEN", "PARS_ASSERT_TOKEN", "PARS_RND_TOKEN", + "PARS_RND_STR_TOKEN", "PARS_ROW_PRINTF_TOKEN", "PARS_COMMIT_TOKEN", + "PARS_ROLLBACK_TOKEN", "PARS_WORK_TOKEN", "PARS_UNSIGNED_TOKEN", + "PARS_EXIT_TOKEN", "PARS_FUNCTION_TOKEN", "'='", "'<'", "'>'", "'-'", + "'+'", "'*'", "'/'", "NEG", "'%'", "';'", "'('", "')'", "'?'", "','", + "'{'", "'}'", "$accept", "statement", "statement_list", "exp", + "function_name", "question_mark_list", "stored_procedure_call", + "predefined_procedure_call", "predefined_procedure_name", + "user_function_call", "table_list", "variable_list", "exp_list", "select_item", "select_item_list", "select_list", "search_condition", "for_update_clause", "consistent_read_clause", "order_direction", "order_by_clause", "select_statement", "insert_statement_start", @@ -594,15 +611,16 @@ static const char *const yytname[] = "delete_statement_start", "delete_statement_searched", "delete_statement_positioned", "row_printf_statement", "assignment_statement", "elsif_element", "elsif_list", "else_part", - "if_statement", "while_statement", "for_statement", "return_statement", - "open_cursor_statement", "close_cursor_statement", "fetch_statement", - "column_def", "column_def_list", "opt_column_len", "opt_not_null", - "not_fit_in_memory", "create_table", "column_list", "unique_def", - "clustered_def", "create_index", "commit_statement", - "rollback_statement", "type_name", "parameter_declaration", - "parameter_declaration_list", "variable_declaration", - "variable_declaration_list", "cursor_declaration", "declaration_list", - "procedure_definition", 0 + "if_statement", "while_statement", "for_statement", "exit_statement", + "return_statement", "open_cursor_statement", "close_cursor_statement", + "fetch_statement", "column_def", "column_def_list", "opt_column_len", + "opt_unsigned", "opt_not_null", "not_fit_in_memory", "create_table", + "column_list", "unique_def", "clustered_def", "create_index", + "commit_statement", "rollback_statement", "type_name", + "parameter_declaration", "parameter_declaration_list", + "variable_declaration", "variable_declaration_list", + "cursor_declaration", "function_declaration", "declaration", + "declaration_list", "procedure_definition", 0 }; #endif @@ -619,32 +637,33 @@ static const unsigned short int yytoknum[] = 305, 306, 307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, - 335, 336, 337, 338, 339, 340, 341, 342, 61, 60, - 62, 45, 43, 42, 47, 343, 37, 59, 40, 41, - 63, 44, 123, 125 + 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, + 345, 346, 347, 61, 60, 62, 45, 43, 42, 47, + 348, 37, 59, 40, 41, 63, 44, 123, 125 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const unsigned char yyr1[] = { - 0, 104, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 105, 105, 105, 105, 105, 105, - 105, 105, 105, 105, 106, 106, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 107, 107, 107, 107, 107, 107, 107, 107, 107, 107, - 108, 108, 108, 108, 108, 108, 108, 108, 108, 108, - 108, 109, 109, 109, 110, 111, 112, 112, 112, 113, - 113, 114, 114, 114, 115, 115, 115, 116, 116, 116, - 116, 117, 117, 117, 118, 118, 118, 119, 119, 120, - 120, 121, 121, 122, 122, 122, 123, 123, 124, 125, - 126, 126, 127, 128, 128, 129, 130, 131, 132, 133, - 134, 135, 136, 137, 138, 139, 139, 140, 140, 140, - 141, 142, 143, 144, 145, 146, 147, 148, 149, 149, - 150, 150, 151, 151, 152, 152, 153, 154, 154, 155, - 155, 156, 156, 157, 158, 159, 160, 160, 160, 160, - 160, 161, 161, 162, 162, 162, 163, 164, 164, 164, - 165, 166, 166, 166, 167 + 0, 109, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 110, 110, 110, 110, 110, + 110, 110, 110, 110, 110, 111, 111, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 112, 112, 112, 112, 112, 112, 112, + 112, 112, 112, 113, 113, 113, 113, 113, 113, 113, + 113, 113, 113, 113, 114, 114, 114, 115, 116, 117, + 117, 117, 118, 119, 119, 120, 120, 120, 121, 121, + 121, 122, 122, 122, 122, 123, 123, 123, 124, 124, + 124, 125, 125, 126, 126, 127, 127, 128, 128, 128, + 129, 129, 130, 131, 132, 132, 133, 134, 134, 135, + 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, + 145, 146, 146, 146, 147, 148, 149, 150, 151, 152, + 153, 154, 154, 155, 156, 156, 157, 157, 158, 158, + 159, 159, 160, 160, 161, 162, 162, 163, 163, 164, + 164, 165, 166, 167, 168, 168, 168, 168, 168, 169, + 169, 170, 170, 170, 171, 172, 172, 172, 173, 174, + 175, 175, 176, 176, 176, 177 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ @@ -652,21 +671,22 @@ static const unsigned char yyr2[] = { 0, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 1, 2, 1, 4, 1, 1, - 1, 1, 1, 3, 3, 3, 3, 2, 3, 3, - 3, 3, 3, 3, 3, 3, 3, 2, 3, 3, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 3, 6, 4, 1, 1, 1, 1, - 3, 0, 1, 3, 0, 1, 3, 1, 4, 5, - 4, 0, 1, 3, 1, 3, 1, 0, 2, 0, - 2, 0, 2, 0, 1, 1, 0, 4, 8, 3, - 5, 2, 3, 1, 3, 4, 4, 2, 2, 3, - 2, 2, 2, 3, 4, 1, 2, 0, 2, 1, - 7, 6, 10, 1, 2, 2, 4, 4, 1, 3, - 0, 3, 0, 2, 0, 1, 7, 1, 3, 0, - 1, 0, 1, 10, 2, 2, 1, 1, 1, 1, - 1, 3, 3, 0, 1, 3, 3, 0, 1, 2, - 6, 0, 1, 2, 11 + 2, 2, 2, 2, 2, 1, 2, 1, 4, 1, + 1, 1, 1, 1, 1, 1, 3, 3, 3, 3, + 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, + 2, 3, 3, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 0, 1, 3, 6, 4, 1, + 1, 1, 3, 1, 3, 0, 1, 3, 0, 1, + 3, 1, 4, 5, 4, 0, 1, 3, 1, 3, + 1, 0, 2, 0, 2, 0, 2, 0, 1, 1, + 0, 4, 8, 3, 5, 2, 3, 1, 3, 4, + 4, 2, 2, 3, 2, 2, 2, 3, 4, 1, + 2, 0, 2, 1, 7, 6, 10, 1, 1, 2, + 2, 4, 4, 5, 1, 3, 0, 3, 0, 1, + 0, 2, 0, 1, 7, 1, 3, 0, 1, 0, + 1, 10, 2, 2, 1, 1, 1, 1, 1, 3, + 3, 0, 1, 3, 3, 0, 1, 2, 6, 4, + 1, 1, 0, 1, 2, 11 }; /* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state @@ -674,103 +694,105 @@ static const unsigned char yyr2[] = means the default is an error. */ static const unsigned char yydefact[] = { - 0, 0, 0, 0, 0, 123, 81, 0, 0, 0, - 0, 139, 0, 0, 0, 66, 67, 68, 0, 0, - 0, 0, 0, 3, 0, 0, 0, 0, 0, 87, - 0, 0, 87, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 128, 85, 0, 0, 0, + 0, 147, 0, 0, 0, 69, 70, 71, 0, 0, + 0, 127, 0, 0, 3, 0, 0, 0, 0, 0, + 91, 0, 0, 91, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 28, 29, 30, 31, 26, 0, 32, 50, 51, - 52, 53, 54, 55, 56, 57, 58, 59, 60, 0, - 0, 0, 0, 0, 0, 0, 84, 77, 82, 86, - 0, 0, 0, 0, 0, 0, 140, 141, 124, 0, - 125, 112, 144, 145, 0, 1, 4, 74, 10, 0, - 101, 11, 0, 107, 108, 15, 16, 110, 111, 13, - 14, 12, 9, 7, 5, 6, 8, 17, 19, 18, - 22, 23, 20, 21, 2, 113, 153, 0, 47, 0, - 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 74, 0, 0, 0, 71, - 0, 0, 0, 99, 0, 109, 0, 142, 0, 71, - 61, 75, 0, 74, 0, 88, 0, 154, 0, 48, - 49, 38, 45, 46, 42, 43, 44, 24, 117, 39, - 40, 41, 34, 33, 35, 36, 0, 0, 0, 0, - 0, 72, 85, 83, 69, 87, 0, 0, 103, 106, - 0, 0, 126, 62, 0, 65, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 25, 115, 119, 0, 27, - 0, 80, 0, 78, 0, 0, 0, 89, 0, 0, - 0, 0, 128, 0, 0, 0, 0, 76, 100, 105, - 149, 150, 146, 147, 148, 151, 152, 157, 155, 118, - 0, 116, 0, 121, 79, 73, 70, 0, 91, 0, - 102, 104, 130, 134, 0, 0, 64, 63, 0, 158, - 161, 0, 120, 90, 0, 96, 0, 0, 132, 135, - 136, 129, 0, 0, 0, 159, 162, 0, 114, 92, - 0, 98, 0, 0, 0, 127, 0, 156, 0, 0, - 163, 0, 0, 131, 133, 137, 0, 0, 0, 93, - 122, 143, 0, 0, 164, 94, 95, 97, 138, 0, - 160 + 0, 0, 0, 29, 30, 31, 32, 33, 34, 27, + 0, 35, 53, 54, 55, 56, 57, 58, 59, 60, + 61, 62, 63, 0, 0, 0, 0, 0, 0, 0, + 88, 81, 86, 90, 0, 0, 0, 0, 0, 0, + 148, 149, 129, 0, 130, 116, 152, 153, 0, 1, + 4, 78, 11, 0, 105, 12, 0, 111, 112, 16, + 17, 114, 115, 14, 15, 13, 10, 8, 5, 6, + 7, 9, 18, 20, 19, 23, 24, 21, 22, 2, + 117, 161, 0, 50, 0, 40, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 78, 0, 0, 0, 75, 0, 0, 0, 103, 0, + 113, 0, 150, 0, 75, 64, 79, 0, 78, 0, + 92, 0, 162, 0, 51, 52, 41, 48, 49, 45, + 46, 47, 25, 121, 42, 43, 44, 37, 36, 38, + 39, 0, 0, 0, 0, 0, 76, 89, 87, 73, + 91, 0, 0, 107, 110, 0, 0, 76, 132, 131, + 65, 0, 68, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 26, 119, 123, 0, 28, 0, 84, 0, + 82, 0, 0, 0, 93, 0, 0, 0, 0, 134, + 0, 0, 0, 0, 0, 80, 104, 109, 157, 158, + 154, 155, 156, 159, 160, 165, 163, 122, 0, 120, + 0, 125, 83, 77, 74, 0, 95, 0, 106, 108, + 136, 142, 0, 0, 72, 67, 66, 0, 166, 172, + 0, 124, 94, 0, 100, 0, 0, 138, 143, 144, + 135, 0, 0, 0, 167, 170, 171, 173, 0, 118, + 96, 0, 102, 0, 0, 139, 140, 0, 164, 0, + 0, 0, 174, 0, 0, 137, 0, 133, 145, 0, + 0, 0, 0, 97, 126, 141, 151, 0, 0, 169, + 175, 98, 99, 101, 146, 0, 168 }; /* YYDEFGOTO[NTERM-NUM]. */ static const short int yydefgoto[] = { - -1, 177, 178, 161, 72, 204, 23, 24, 25, 195, - 192, 162, 78, 79, 80, 103, 258, 275, 317, 291, - 26, 27, 28, 198, 199, 104, 29, 30, 31, 32, - 33, 34, 35, 36, 216, 217, 218, 37, 38, 39, - 40, 41, 42, 43, 232, 233, 278, 295, 280, 44, - 306, 87, 158, 45, 46, 47, 245, 167, 168, 269, - 270, 286, 287, 48 + -1, 182, 183, 166, 76, 211, 24, 25, 26, 208, + 200, 197, 167, 82, 83, 84, 107, 266, 284, 333, + 302, 27, 28, 29, 203, 204, 108, 30, 31, 32, + 33, 34, 35, 36, 37, 223, 224, 225, 38, 39, + 40, 41, 42, 43, 44, 45, 239, 240, 287, 306, + 317, 289, 46, 319, 91, 163, 47, 48, 49, 253, + 172, 173, 278, 279, 295, 296, 297, 298, 50 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ -#define YYPACT_NINF -205 +#define YYPACT_NINF -209 static const short int yypact[] = { - 454, -48, 30, 521, 521, -205, 12, 42, -18, 46, - -4, -33, 67, 69, 71, -205, -205, -205, 47, -8, - -6, 85, 93, -205, 1, -2, 2, -20, 3, 59, - 5, 7, 59, 24, 27, 28, 31, 32, 33, 39, - 50, 51, 55, 56, 57, 58, 60, 62, 63, 521, - 22, -205, -205, -205, -205, 48, 521, 65, -205, -205, - -205, -205, -205, -205, -205, -205, -205, -205, -205, 521, - 521, 252, 64, 576, 66, 68, -205, 640, -205, -40, - 86, 111, 120, 105, 156, 161, -205, 110, -205, 122, - -205, -205, -205, -205, 73, -205, -205, 521, -205, 74, - -205, -205, 492, -205, -205, -205, -205, -205, -205, -205, - -205, -205, -205, -205, -205, -205, -205, -205, -205, -205, - -205, -205, -205, -205, -205, 640, 167, 106, 309, 107, - 168, 23, 521, 521, 521, 521, 521, 454, 521, 521, - 521, 521, 521, 521, 521, 521, 454, 521, -27, 178, - 204, 179, 521, -205, 181, -205, 91, -205, 134, 178, - 92, 640, -75, 521, 139, 640, 29, -205, -59, -205, - -205, -205, 309, 309, 15, 15, 640, -205, 151, 15, - 15, 15, 25, 25, 168, 168, -58, 284, 535, 187, - 96, -205, 95, -205, -205, -31, 568, 109, -205, 98, - 193, 195, 95, -205, -49, -205, 521, -45, 197, 40, - 40, 189, 167, 454, 521, -205, -205, 186, 191, -205, - 190, -205, 123, -205, 214, 521, 216, 194, 521, 521, - 181, 40, -205, -36, 164, 126, 130, 640, -205, -205, - -205, -205, -205, -205, -205, -205, -205, 227, -205, 454, - 605, -205, 215, -205, -205, -205, -205, 192, 199, 633, - 640, -205, 145, 184, 193, 238, -205, -205, 40, -205, - 4, 454, -205, -205, 205, 203, 454, 245, 240, -205, - -205, -205, 153, 155, 198, -205, -205, -12, 454, -205, - 210, -205, 341, 157, 249, -205, 250, -205, 251, 454, - -205, 259, 229, -205, -205, -205, -26, 244, 398, 26, - -205, -205, 261, 47, -205, -205, -205, -205, -205, 173, - -205 + 578, -30, 40, 256, 256, -209, 19, 44, 7, 55, + 26, -16, 62, 69, 73, -209, -209, -209, 48, -5, + -4, -209, 78, 75, -209, -13, -15, -6, -18, 4, + 67, 6, 12, 67, 17, 18, 21, 29, 30, 32, + 33, 39, 47, 50, 51, 64, 65, 70, 82, 83, + 84, 256, 13, -209, -209, -209, -209, -209, -209, 8, + 256, 20, -209, -209, -209, -209, -209, -209, -209, -209, + -209, -209, -209, 256, 256, 295, 15, 421, 77, 86, + -209, 657, -209, -44, 129, 152, 178, 137, 182, 189, + -209, 142, -209, 154, -209, -209, -209, -209, 104, -209, + -209, 256, -209, 105, -209, -209, 170, -209, -209, -209, + -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, + -209, -209, -209, -209, -209, -209, -209, -209, -209, -209, + 657, 200, 139, 582, 140, 198, 66, 256, 256, 256, + 256, 256, 578, 256, 256, 256, 256, 256, 256, 256, + 256, 578, 256, -31, 205, 121, 206, 256, -209, 207, + -209, 115, -209, 160, 212, 117, 657, -63, 256, 167, + 657, -2, -209, -59, -209, -209, -209, 582, 582, 14, + 14, 657, -209, 330, 14, 14, 14, 3, 3, 198, + 198, -58, 392, 279, 217, 123, -209, 122, -209, -209, + -32, 607, 136, -209, 124, 223, 224, 133, -209, 122, + -209, -52, -209, 256, -46, 229, 16, 16, 214, 200, + 578, 256, -209, -209, 209, 220, -209, 221, -209, 148, + -209, 232, 256, 247, 226, 256, 256, 207, 16, -209, + -43, 195, 165, 162, 166, 657, -209, -209, -209, -209, + -209, -209, -209, -209, -209, 263, -209, 578, 483, -209, + 246, -209, -209, -209, -209, 225, 233, 626, 657, -209, + 172, 216, 223, 270, -209, -209, -209, 16, -209, 1, + 578, -209, -209, 236, 237, 578, 278, 193, -209, -209, + -209, 181, 183, -53, -209, -209, -209, -209, -14, 578, + -209, 240, -209, 454, 184, -209, 275, 282, -209, 286, + 287, 578, -209, 288, 266, -209, 292, -209, -209, -36, + 276, 202, 516, -28, -209, -209, -209, 293, 48, -209, + -209, -209, -209, -209, -209, 210, -209 }; /* YYPGOTO[NTERM-NUM]. */ static const short int yypgoto[] = { - -205, 0, -126, -1, -205, -205, -205, -205, -205, -205, - 112, -124, 135, -205, -205, -28, -205, -205, -205, -205, - -17, -205, -205, 43, -205, 257, -205, -205, -205, -205, - -205, -205, -205, -205, 76, -205, -205, -205, -205, -205, - -205, -205, -205, -205, 8, -205, -205, -205, -205, -205, - -205, -205, -205, -205, -205, -205, -204, 72, -205, 20, - -205, 10, -205, -205 + -209, 0, -130, -1, -209, -209, -209, -209, -209, -209, + -209, 143, -136, 158, -209, -209, -29, -209, -209, -209, + -209, -17, -209, -209, 79, -209, 281, -209, -209, -209, + -209, -209, -209, -209, -209, 91, -209, -209, -209, -209, + -209, -209, -209, -209, -209, -209, 45, -209, -209, -209, + -209, -209, -209, -209, -209, -209, -209, -209, -209, -208, + 99, -209, 41, -209, -209, -209, 23, -209, -209 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If @@ -780,197 +802,202 @@ static const short int yypgoto[] = #define YYTABLE_NINF -1 static const unsigned short int yytable[] = { - 22, 91, 71, 73, 107, 77, 246, 225, 149, 189, - 100, 268, 299, 6, 49, 51, 52, 53, 54, 55, - 187, 186, 56, 85, 205, 86, 206, 262, 136, 99, - 82, 132, 133, 84, 134, 135, 136, 50, 136, 207, - 211, 219, 212, 206, 209, 210, 74, 75, 125, 81, - 235, 284, 236, 83, 238, 128, 206, 240, 241, 242, - 243, 150, 244, 263, 283, 264, 190, 284, 130, 131, - 226, 315, 316, 311, 88, 312, 89, 57, 90, 92, - 6, 93, 58, 59, 60, 61, 62, 249, 63, 64, - 65, 66, 94, 95, 67, 68, 97, 102, 96, 98, - 101, 165, 105, 69, 106, 76, 141, 142, 143, 144, - 70, 138, 139, 140, 141, 142, 143, 144, 143, 144, - 126, 109, 171, 151, 110, 111, 152, 153, 112, 113, - 114, 172, 173, 174, 175, 176, 115, 179, 180, 181, - 182, 183, 184, 185, 127, 288, 188, 116, 117, 77, - 292, 196, 118, 119, 120, 121, 154, 122, 1, 123, - 124, 129, 145, 155, 147, 2, 148, 227, 156, 157, - 159, 160, 163, 308, 166, 169, 170, 3, 215, 213, - 214, 136, 4, 5, 6, 191, 194, 215, 197, 200, - 7, 201, 203, 208, 222, 223, 224, 229, 8, 230, - 231, 9, 234, 10, 239, 237, 11, 51, 52, 53, - 54, 55, 247, 250, 56, 214, 252, 12, 13, 14, - 253, 255, 254, 256, 165, 265, 15, 259, 260, 266, - 267, 16, 17, 257, 268, 18, 19, 20, 74, 75, - 274, 272, 273, 277, 279, 282, 290, 289, 293, 215, - 294, 296, 297, 21, 301, 304, 303, 305, 307, 310, - 132, 133, 298, 134, 135, 136, 309, 313, 318, 57, - 320, 202, 281, 261, 58, 59, 60, 61, 62, 137, - 63, 64, 65, 66, 248, 193, 67, 68, 215, 108, - 285, 1, 215, 251, 0, 69, 319, 300, 2, 0, - 0, 0, 70, 0, 0, 0, 0, 0, 215, 220, - 3, 0, 0, 0, 0, 4, 5, 6, 0, 0, - 134, 135, 136, 7, 0, 0, 0, 0, 0, 0, + 23, 95, 75, 77, 111, 81, 154, 194, 232, 254, + 277, 104, 311, 309, 191, 216, 217, 6, 141, 331, + 332, 192, 53, 54, 55, 56, 57, 58, 59, 141, + 270, 60, 214, 103, 51, 248, 249, 250, 251, 310, + 252, 212, 89, 213, 90, 218, 226, 219, 213, 52, + 130, 293, 243, 85, 244, 78, 79, 86, 246, 133, + 213, 271, 155, 272, 87, 88, 293, 195, 326, 292, + 327, 92, 135, 136, 233, 99, 137, 138, 93, 139, + 140, 141, 94, 6, 96, 97, 61, 98, 101, 100, + 257, 62, 63, 64, 65, 66, 102, 67, 68, 69, + 70, 148, 149, 71, 72, 170, 105, 106, 109, 132, + 146, 147, 148, 149, 110, 73, 131, 80, 150, 113, + 114, 134, 74, 115, 53, 54, 55, 56, 57, 58, + 59, 116, 117, 60, 118, 119, 177, 178, 179, 180, + 181, 120, 184, 185, 186, 187, 188, 189, 190, 121, + 299, 193, 122, 123, 81, 303, 201, 78, 79, 143, + 144, 145, 146, 147, 148, 149, 124, 125, 156, 157, + 176, 234, 126, 53, 54, 55, 56, 57, 58, 59, + 152, 322, 60, 222, 127, 128, 129, 158, 61, 153, + 159, 160, 222, 62, 63, 64, 65, 66, 161, 67, + 68, 69, 70, 162, 164, 71, 72, 165, 168, 171, + 174, 175, 245, 141, 196, 199, 202, 73, 205, 206, + 258, 207, 210, 215, 74, 169, 229, 230, 231, 236, + 237, 170, 238, 241, 267, 268, 242, 61, 247, 255, + 221, 263, 62, 63, 64, 65, 66, 260, 67, 68, + 69, 70, 262, 261, 71, 72, 264, 222, 273, 53, + 54, 55, 56, 57, 58, 59, 73, 265, 60, 274, + 275, 276, 277, 74, 281, 286, 283, 282, 288, 291, + 300, 304, 301, 305, 307, 308, 313, 316, 315, 137, + 138, 318, 139, 140, 141, 320, 321, 323, 324, 222, + 325, 328, 334, 222, 329, 137, 138, 209, 139, 140, + 141, 335, 336, 198, 112, 259, 269, 290, 256, 0, + 294, 312, 222, 61, 142, 0, 0, 0, 62, 63, + 64, 65, 66, 0, 67, 68, 69, 70, 0, 1, + 71, 72, 0, 0, 0, 0, 2, 0, 0, 0, + 0, 0, 73, 0, 0, 0, 0, 0, 3, 74, + 220, 221, 0, 4, 5, 6, 0, 0, 0, 0, + 0, 7, 143, 144, 145, 146, 147, 148, 149, 8, + 0, 0, 9, 228, 10, 0, 0, 11, 143, 144, + 145, 146, 147, 148, 149, 0, 0, 0, 12, 13, + 14, 1, 0, 0, 0, 0, 0, 15, 2, 0, + 0, 0, 16, 17, 0, 0, 18, 19, 20, 227, + 3, 21, 0, 0, 0, 4, 5, 6, 0, 0, + 0, 137, 138, 7, 139, 140, 141, 22, 0, 0, 0, 8, 0, 0, 9, 0, 10, 0, 0, 11, - 138, 139, 140, 141, 142, 143, 144, 0, 1, 0, - 12, 13, 14, 0, 0, 2, 0, 0, 0, 15, - 0, 0, 0, 0, 16, 17, 302, 3, 18, 19, - 20, 0, 4, 5, 6, 0, 0, 0, 0, 0, - 7, 0, 0, 0, 0, 0, 21, 0, 8, 0, - 0, 9, 0, 10, 0, 0, 11, 138, 139, 140, - 141, 142, 143, 144, 0, 1, 0, 12, 13, 14, - 0, 0, 2, 0, 0, 0, 15, 0, 0, 0, - 0, 16, 17, 314, 3, 18, 19, 20, 0, 4, + 0, 0, 0, 151, 0, 0, 0, 0, 0, 0, + 12, 13, 14, 1, 0, 0, 0, 0, 0, 15, + 2, 0, 0, 0, 16, 17, 0, 0, 18, 19, + 20, 314, 3, 21, 0, 0, 0, 4, 5, 6, + 0, 0, 0, 137, 138, 7, 139, 140, 141, 22, + 0, 0, 0, 8, 0, 0, 9, 0, 10, 0, + 0, 11, 280, 0, 143, 144, 145, 146, 147, 148, + 149, 0, 12, 13, 14, 1, 0, 0, 0, 0, + 0, 15, 2, 0, 0, 0, 16, 17, 0, 0, + 18, 19, 20, 330, 3, 21, 0, 0, 0, 4, 5, 6, 0, 0, 0, 0, 0, 7, 0, 0, - 0, 0, 0, 21, 0, 8, 0, 0, 9, 0, - 10, 0, 0, 11, 0, 0, 0, 0, 0, 0, - 0, 1, 0, 0, 12, 13, 14, 0, 2, 0, - 0, 0, 0, 15, 0, 0, 0, 0, 16, 17, - 3, 0, 18, 19, 20, 4, 5, 6, 0, 0, - 0, 0, 0, 7, 0, 51, 52, 53, 54, 55, - 21, 8, 56, 0, 9, 0, 10, 0, 0, 11, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 12, 13, 14, 0, 51, 52, 53, 54, 55, 15, - 0, 56, 0, 0, 16, 17, 0, 0, 18, 19, - 20, 0, 0, 132, 133, 164, 134, 135, 136, 0, - 0, 0, 0, 0, 0, 0, 21, 57, 0, 0, - 0, 0, 58, 59, 60, 61, 62, 0, 63, 64, - 65, 66, 0, 0, 67, 68, 132, 133, 0, 134, - 135, 136, 0, 69, 132, 133, 57, 134, 135, 136, - 70, 58, 59, 60, 61, 62, 0, 63, 64, 65, - 66, 0, 0, 67, 68, 0, 146, 0, 228, 0, - 0, 0, 69, 132, 133, 0, 134, 135, 136, 70, - 0, 0, 0, 138, 139, 140, 141, 142, 143, 144, - 0, 0, 271, 0, 221, 0, 0, 0, 0, 0, - 0, 132, 133, 0, 134, 135, 136, 0, 132, 133, - 0, 134, 135, 136, 0, 0, 138, 139, 140, 141, - 142, 143, 144, 276, 138, 139, 140, 141, 142, 143, - 144, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 22, 0, 0, 0, 8, 0, 0, 9, 0, + 10, 0, 0, 11, 0, 0, 143, 144, 145, 146, + 147, 148, 149, 0, 12, 13, 14, 1, 0, 0, + 0, 0, 0, 15, 2, 139, 140, 141, 16, 17, + 0, 0, 18, 19, 20, 0, 3, 21, 0, 0, + 0, 4, 5, 6, 0, 0, 0, 137, 138, 7, + 139, 140, 141, 22, 0, 0, 0, 8, 0, 0, + 9, 0, 10, 0, 0, 11, 137, 138, 0, 139, + 140, 141, 0, 0, 0, 0, 12, 13, 14, 235, + 0, 0, 0, 0, 0, 15, 0, 0, 285, 0, + 16, 17, 0, 0, 18, 19, 20, 137, 138, 21, + 139, 140, 141, 0, 0, 143, 144, 145, 146, 147, + 148, 149, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 138, 139, 140, 141, 142, 143, 144, + 143, 144, 145, 146, 147, 148, 149, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 143, + 144, 145, 146, 147, 148, 149, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 138, 139, 140, 141, 142, 143, 144, 138, 139, - 140, 141, 142, 143, 144 + 143, 144, 145, 146, 147, 148, 149 }; static const short int yycheck[] = { - 0, 18, 3, 4, 32, 6, 210, 38, 48, 36, - 27, 7, 24, 33, 62, 3, 4, 5, 6, 7, - 146, 145, 10, 56, 99, 58, 101, 231, 13, 49, - 48, 8, 9, 37, 11, 12, 13, 7, 13, 163, - 99, 99, 101, 101, 15, 16, 34, 35, 49, 7, - 99, 63, 101, 7, 99, 56, 101, 17, 18, 19, - 20, 101, 22, 99, 268, 101, 93, 63, 69, 70, - 101, 45, 46, 99, 7, 101, 7, 65, 7, 87, - 33, 87, 70, 71, 72, 73, 74, 213, 76, 77, - 78, 79, 7, 0, 82, 83, 98, 38, 97, 97, - 97, 102, 97, 91, 97, 93, 91, 92, 93, 94, - 98, 88, 89, 90, 91, 92, 93, 94, 93, 94, - 98, 97, 99, 37, 97, 97, 15, 7, 97, 97, - 97, 132, 133, 134, 135, 136, 97, 138, 139, 140, - 141, 142, 143, 144, 96, 271, 147, 97, 97, 150, - 276, 152, 97, 97, 97, 97, 51, 97, 7, 97, - 97, 96, 98, 7, 98, 14, 98, 195, 7, 59, - 48, 98, 98, 299, 7, 69, 69, 26, 178, 28, - 29, 13, 31, 32, 33, 7, 7, 187, 7, 98, - 39, 57, 100, 54, 7, 99, 101, 88, 47, 101, - 7, 50, 7, 52, 7, 206, 55, 3, 4, 5, - 6, 7, 23, 214, 10, 29, 25, 66, 67, 68, - 30, 7, 99, 7, 225, 61, 75, 228, 229, 103, - 100, 80, 81, 39, 7, 84, 85, 86, 34, 35, - 41, 26, 50, 98, 60, 7, 43, 42, 3, 249, - 10, 98, 97, 102, 44, 6, 99, 7, 7, 30, - 8, 9, 64, 11, 12, 13, 7, 23, 7, 65, - 97, 159, 264, 230, 70, 71, 72, 73, 74, 27, - 76, 77, 78, 79, 212, 150, 82, 83, 288, 32, - 270, 7, 292, 217, -1, 91, 313, 287, 14, -1, - -1, -1, 98, -1, -1, -1, -1, -1, 308, 25, - 26, -1, -1, -1, -1, 31, 32, 33, -1, -1, - 11, 12, 13, 39, -1, -1, -1, -1, -1, -1, - -1, 47, -1, -1, 50, -1, 52, -1, -1, 55, - 88, 89, 90, 91, 92, 93, 94, -1, 7, -1, - 66, 67, 68, -1, -1, 14, -1, -1, -1, 75, - -1, -1, -1, -1, 80, 81, 25, 26, 84, 85, - 86, -1, 31, 32, 33, -1, -1, -1, -1, -1, - 39, -1, -1, -1, -1, -1, 102, -1, 47, -1, - -1, 50, -1, 52, -1, -1, 55, 88, 89, 90, - 91, 92, 93, 94, -1, 7, -1, 66, 67, 68, - -1, -1, 14, -1, -1, -1, 75, -1, -1, -1, - -1, 80, 81, 25, 26, 84, 85, 86, -1, 31, - 32, 33, -1, -1, -1, -1, -1, 39, -1, -1, - -1, -1, -1, 102, -1, 47, -1, -1, 50, -1, - 52, -1, -1, 55, -1, -1, -1, -1, -1, -1, - -1, 7, -1, -1, 66, 67, 68, -1, 14, -1, - -1, -1, -1, 75, -1, -1, -1, -1, 80, 81, - 26, -1, 84, 85, 86, 31, 32, 33, -1, -1, - -1, -1, -1, 39, -1, 3, 4, 5, 6, 7, - 102, 47, 10, -1, 50, -1, 52, -1, -1, 55, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 66, 67, 68, -1, 3, 4, 5, 6, 7, 75, - -1, 10, -1, -1, 80, 81, -1, -1, 84, 85, - 86, -1, -1, 8, 9, 53, 11, 12, 13, -1, - -1, -1, -1, -1, -1, -1, 102, 65, -1, -1, - -1, -1, 70, 71, 72, 73, 74, -1, 76, 77, - 78, 79, -1, -1, 82, 83, 8, 9, -1, 11, - 12, 13, -1, 91, 8, 9, 65, 11, 12, 13, - 98, 70, 71, 72, 73, 74, -1, 76, 77, 78, - 79, -1, -1, 82, 83, -1, 30, -1, 40, -1, - -1, -1, 91, 8, 9, -1, 11, 12, 13, 98, - -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, - -1, -1, 27, -1, 99, -1, -1, -1, -1, -1, - -1, 8, 9, -1, 11, 12, 13, -1, 8, 9, - -1, 11, 12, 13, -1, -1, 88, 89, 90, 91, - 92, 93, 94, 30, 88, 89, 90, 91, 92, 93, - 94, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 0, 18, 3, 4, 33, 6, 50, 38, 40, 217, + 9, 28, 26, 66, 150, 17, 18, 35, 15, 47, + 48, 151, 3, 4, 5, 6, 7, 8, 9, 15, + 238, 12, 168, 51, 64, 19, 20, 21, 22, 92, + 24, 104, 58, 106, 60, 104, 104, 106, 106, 9, + 51, 65, 104, 9, 106, 36, 37, 50, 104, 60, + 106, 104, 106, 106, 9, 39, 65, 98, 104, 277, + 106, 9, 73, 74, 106, 0, 10, 11, 9, 13, + 14, 15, 9, 35, 89, 89, 67, 9, 103, 102, + 220, 72, 73, 74, 75, 76, 102, 78, 79, 80, + 81, 98, 99, 84, 85, 106, 102, 40, 102, 101, + 96, 97, 98, 99, 102, 96, 103, 98, 103, 102, + 102, 101, 103, 102, 3, 4, 5, 6, 7, 8, + 9, 102, 102, 12, 102, 102, 137, 138, 139, 140, + 141, 102, 143, 144, 145, 146, 147, 148, 149, 102, + 280, 152, 102, 102, 155, 285, 157, 36, 37, 93, + 94, 95, 96, 97, 98, 99, 102, 102, 39, 17, + 104, 200, 102, 3, 4, 5, 6, 7, 8, 9, + 103, 311, 12, 183, 102, 102, 102, 9, 67, 103, + 53, 9, 192, 72, 73, 74, 75, 76, 9, 78, + 79, 80, 81, 61, 50, 84, 85, 103, 103, 9, + 71, 71, 213, 15, 9, 9, 9, 96, 103, 59, + 221, 9, 105, 56, 103, 55, 9, 104, 106, 93, + 106, 232, 9, 9, 235, 236, 103, 67, 9, 25, + 31, 9, 72, 73, 74, 75, 76, 27, 78, 79, + 80, 81, 104, 32, 84, 85, 9, 257, 63, 3, + 4, 5, 6, 7, 8, 9, 96, 41, 12, 104, + 108, 105, 9, 103, 28, 103, 43, 52, 62, 9, + 44, 3, 45, 90, 103, 102, 46, 12, 104, 10, + 11, 9, 13, 14, 15, 9, 9, 9, 32, 299, + 8, 25, 9, 303, 102, 10, 11, 164, 13, 14, + 15, 328, 102, 155, 33, 224, 237, 272, 219, -1, + 279, 298, 322, 67, 29, -1, -1, -1, 72, 73, + 74, 75, 76, -1, 78, 79, 80, 81, -1, 9, + 84, 85, -1, -1, -1, -1, 16, -1, -1, -1, + -1, -1, 96, -1, -1, -1, -1, -1, 28, 103, + 30, 31, -1, 33, 34, 35, -1, -1, -1, -1, + -1, 41, 93, 94, 95, 96, 97, 98, 99, 49, + -1, -1, 52, 104, 54, -1, -1, 57, 93, 94, + 95, 96, 97, 98, 99, -1, -1, -1, 68, 69, + 70, 9, -1, -1, -1, -1, -1, 77, 16, -1, + -1, -1, 82, 83, -1, -1, 86, 87, 88, 27, + 28, 91, -1, -1, -1, 33, 34, 35, -1, -1, + -1, 10, 11, 41, 13, 14, 15, 107, -1, -1, + -1, 49, -1, -1, 52, -1, 54, -1, -1, 57, + -1, -1, -1, 32, -1, -1, -1, -1, -1, -1, + 68, 69, 70, 9, -1, -1, -1, -1, -1, 77, + 16, -1, -1, -1, 82, 83, -1, -1, 86, 87, + 88, 27, 28, 91, -1, -1, -1, 33, 34, 35, + -1, -1, -1, 10, 11, 41, 13, 14, 15, 107, + -1, -1, -1, 49, -1, -1, 52, -1, 54, -1, + -1, 57, 29, -1, 93, 94, 95, 96, 97, 98, + 99, -1, 68, 69, 70, 9, -1, -1, -1, -1, + -1, 77, 16, -1, -1, -1, 82, 83, -1, -1, + 86, 87, 88, 27, 28, 91, -1, -1, -1, 33, + 34, 35, -1, -1, -1, -1, -1, 41, -1, -1, + -1, 107, -1, -1, -1, 49, -1, -1, 52, -1, + 54, -1, -1, 57, -1, -1, 93, 94, 95, 96, + 97, 98, 99, -1, 68, 69, 70, 9, -1, -1, + -1, -1, -1, 77, 16, 13, 14, 15, 82, 83, + -1, -1, 86, 87, 88, -1, 28, 91, -1, -1, + -1, 33, 34, 35, -1, -1, -1, 10, 11, 41, + 13, 14, 15, 107, -1, -1, -1, 49, -1, -1, + 52, -1, 54, -1, -1, 57, 10, 11, -1, 13, + 14, 15, -1, -1, -1, -1, 68, 69, 70, 42, + -1, -1, -1, -1, -1, 77, -1, -1, 32, -1, + 82, 83, -1, -1, 86, 87, 88, 10, 11, 91, + 13, 14, 15, -1, -1, 93, 94, 95, 96, 97, + 98, 99, -1, -1, -1, 107, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 88, 89, 90, 91, 92, 93, 94, + 93, 94, 95, 96, 97, 98, 99, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 93, + 94, 95, 96, 97, 98, 99, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 88, 89, 90, 91, 92, 93, 94, 88, 89, - 90, 91, 92, 93, 94 + 93, 94, 95, 96, 97, 98, 99 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const unsigned char yystos[] = { - 0, 7, 14, 26, 31, 32, 33, 39, 47, 50, - 52, 55, 66, 67, 68, 75, 80, 81, 84, 85, - 86, 102, 105, 110, 111, 112, 124, 125, 126, 130, - 131, 132, 133, 134, 135, 136, 137, 141, 142, 143, - 144, 145, 146, 147, 153, 157, 158, 159, 167, 62, - 7, 3, 4, 5, 6, 7, 10, 65, 70, 71, - 72, 73, 74, 76, 77, 78, 79, 82, 83, 91, - 98, 107, 108, 107, 34, 35, 93, 107, 116, 117, - 118, 7, 48, 7, 37, 56, 58, 155, 7, 7, - 7, 124, 87, 87, 7, 0, 97, 98, 97, 49, - 124, 97, 38, 119, 129, 97, 97, 119, 129, 97, - 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, - 97, 97, 97, 97, 97, 107, 98, 96, 107, 96, - 107, 107, 8, 9, 11, 12, 13, 27, 88, 89, - 90, 91, 92, 93, 94, 98, 30, 98, 98, 48, - 101, 37, 15, 7, 51, 7, 7, 59, 156, 48, - 98, 107, 115, 98, 53, 107, 7, 161, 162, 69, - 69, 99, 107, 107, 107, 107, 107, 105, 106, 107, - 107, 107, 107, 107, 107, 107, 115, 106, 107, 36, - 93, 7, 114, 116, 7, 113, 107, 7, 127, 128, - 98, 57, 114, 100, 109, 99, 101, 115, 54, 15, - 16, 99, 101, 28, 29, 105, 138, 139, 140, 99, - 25, 99, 7, 99, 101, 38, 101, 119, 40, 88, - 101, 7, 148, 149, 7, 99, 101, 107, 99, 7, - 17, 18, 19, 20, 22, 160, 160, 23, 161, 106, - 107, 138, 25, 30, 99, 7, 7, 39, 120, 107, - 107, 127, 160, 99, 101, 61, 103, 100, 7, 163, - 164, 27, 26, 50, 41, 121, 30, 98, 150, 60, - 152, 148, 7, 160, 63, 163, 165, 166, 106, 42, - 43, 123, 106, 3, 10, 151, 98, 97, 64, 24, - 165, 44, 25, 99, 6, 7, 154, 7, 106, 7, - 30, 99, 101, 23, 25, 45, 46, 122, 7, 124, - 97 + 0, 9, 16, 28, 33, 34, 35, 41, 49, 52, + 54, 57, 68, 69, 70, 77, 82, 83, 86, 87, + 88, 91, 107, 110, 115, 116, 117, 130, 131, 132, + 136, 137, 138, 139, 140, 141, 142, 143, 147, 148, + 149, 150, 151, 152, 153, 154, 161, 165, 166, 167, + 177, 64, 9, 3, 4, 5, 6, 7, 8, 9, + 12, 67, 72, 73, 74, 75, 76, 78, 79, 80, + 81, 84, 85, 96, 103, 112, 113, 112, 36, 37, + 98, 112, 122, 123, 124, 9, 50, 9, 39, 58, + 60, 163, 9, 9, 9, 130, 89, 89, 9, 0, + 102, 103, 102, 51, 130, 102, 40, 125, 135, 102, + 102, 125, 135, 102, 102, 102, 102, 102, 102, 102, + 102, 102, 102, 102, 102, 102, 102, 102, 102, 102, + 112, 103, 101, 112, 101, 112, 112, 10, 11, 13, + 14, 15, 29, 93, 94, 95, 96, 97, 98, 99, + 103, 32, 103, 103, 50, 106, 39, 17, 9, 53, + 9, 9, 61, 164, 50, 103, 112, 121, 103, 55, + 112, 9, 169, 170, 71, 71, 104, 112, 112, 112, + 112, 112, 110, 111, 112, 112, 112, 112, 112, 112, + 112, 121, 111, 112, 38, 98, 9, 120, 122, 9, + 119, 112, 9, 133, 134, 103, 59, 9, 118, 120, + 105, 114, 104, 106, 121, 56, 17, 18, 104, 106, + 30, 31, 110, 144, 145, 146, 104, 27, 104, 9, + 104, 106, 40, 106, 125, 42, 93, 106, 9, 155, + 156, 9, 103, 104, 106, 112, 104, 9, 19, 20, + 21, 22, 24, 168, 168, 25, 169, 111, 112, 144, + 27, 32, 104, 9, 9, 41, 126, 112, 112, 133, + 168, 104, 106, 63, 104, 108, 105, 9, 171, 172, + 29, 28, 52, 43, 127, 32, 103, 157, 62, 160, + 155, 9, 168, 65, 171, 173, 174, 175, 176, 111, + 44, 45, 129, 111, 3, 90, 158, 103, 102, 66, + 92, 26, 175, 46, 27, 104, 12, 159, 9, 162, + 9, 9, 111, 9, 32, 8, 104, 106, 25, 102, + 27, 47, 48, 128, 9, 130, 102 }; #if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) @@ -1581,271 +1608,286 @@ yyreduce: YY_REDUCE_PRINT (yyn); switch (yyn) { - case 24: -#line 156 "pars0grm.y" + case 25: +#line 162 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 25: -#line 158 "pars0grm.y" - { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;} - break; - case 26: -#line 162 "pars0grm.y" - { yyval = yyvsp[0];;} +#line 164 "pars0grm.y" + { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;} break; case 27: -#line 164 "pars0grm.y" - { yyval = pars_func(yyvsp[-3], yyvsp[-1]); ;} +#line 168 "pars0grm.y" + { yyval = yyvsp[0];;} break; case 28: -#line 165 "pars0grm.y" - { yyval = yyvsp[0];;} +#line 170 "pars0grm.y" + { yyval = pars_func(yyvsp[-3], yyvsp[-1]); ;} break; case 29: -#line 166 "pars0grm.y" +#line 171 "pars0grm.y" { yyval = yyvsp[0];;} break; case 30: -#line 167 "pars0grm.y" +#line 172 "pars0grm.y" { yyval = yyvsp[0];;} break; case 31: -#line 168 "pars0grm.y" +#line 173 "pars0grm.y" { yyval = yyvsp[0];;} break; case 32: -#line 169 "pars0grm.y" +#line 174 "pars0grm.y" { yyval = yyvsp[0];;} break; case 33: -#line 170 "pars0grm.y" - { yyval = pars_op('+', yyvsp[-2], yyvsp[0]); ;} +#line 175 "pars0grm.y" + { yyval = yyvsp[0];;} break; case 34: -#line 171 "pars0grm.y" - { yyval = pars_op('-', yyvsp[-2], yyvsp[0]); ;} +#line 176 "pars0grm.y" + { yyval = yyvsp[0];;} break; case 35: -#line 172 "pars0grm.y" - { yyval = pars_op('*', yyvsp[-2], yyvsp[0]); ;} +#line 177 "pars0grm.y" + { yyval = yyvsp[0];;} break; case 36: -#line 173 "pars0grm.y" - { yyval = pars_op('/', yyvsp[-2], yyvsp[0]); ;} +#line 178 "pars0grm.y" + { yyval = pars_op('+', yyvsp[-2], yyvsp[0]); ;} break; case 37: -#line 174 "pars0grm.y" - { yyval = pars_op('-', yyvsp[0], NULL); ;} +#line 179 "pars0grm.y" + { yyval = pars_op('-', yyvsp[-2], yyvsp[0]); ;} break; case 38: -#line 175 "pars0grm.y" - { yyval = yyvsp[-1]; ;} +#line 180 "pars0grm.y" + { yyval = pars_op('*', yyvsp[-2], yyvsp[0]); ;} break; case 39: -#line 176 "pars0grm.y" - { yyval = pars_op('=', yyvsp[-2], yyvsp[0]); ;} +#line 181 "pars0grm.y" + { yyval = pars_op('/', yyvsp[-2], yyvsp[0]); ;} break; case 40: -#line 177 "pars0grm.y" - { yyval = pars_op('<', yyvsp[-2], yyvsp[0]); ;} +#line 182 "pars0grm.y" + { yyval = pars_op('-', yyvsp[0], NULL); ;} break; case 41: -#line 178 "pars0grm.y" - { yyval = pars_op('>', yyvsp[-2], yyvsp[0]); ;} +#line 183 "pars0grm.y" + { yyval = yyvsp[-1]; ;} break; case 42: -#line 179 "pars0grm.y" - { yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); ;} +#line 184 "pars0grm.y" + { yyval = pars_op('=', yyvsp[-2], yyvsp[0]); ;} break; case 43: -#line 180 "pars0grm.y" - { yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); ;} +#line 185 "pars0grm.y" + { yyval = pars_op('<', yyvsp[-2], yyvsp[0]); ;} break; case 44: -#line 181 "pars0grm.y" - { yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); ;} +#line 186 "pars0grm.y" + { yyval = pars_op('>', yyvsp[-2], yyvsp[0]); ;} break; case 45: -#line 182 "pars0grm.y" - { yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); ;} +#line 187 "pars0grm.y" + { yyval = pars_op(PARS_GE_TOKEN, yyvsp[-2], yyvsp[0]); ;} break; case 46: -#line 183 "pars0grm.y" - { yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); ;} +#line 188 "pars0grm.y" + { yyval = pars_op(PARS_LE_TOKEN, yyvsp[-2], yyvsp[0]); ;} break; case 47: -#line 184 "pars0grm.y" - { yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); ;} +#line 189 "pars0grm.y" + { yyval = pars_op(PARS_NE_TOKEN, yyvsp[-2], yyvsp[0]); ;} break; case 48: -#line 186 "pars0grm.y" - { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} +#line 190 "pars0grm.y" + { yyval = pars_op(PARS_AND_TOKEN, yyvsp[-2], yyvsp[0]); ;} break; case 49: -#line 188 "pars0grm.y" - { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} +#line 191 "pars0grm.y" + { yyval = pars_op(PARS_OR_TOKEN, yyvsp[-2], yyvsp[0]); ;} break; case 50: #line 192 "pars0grm.y" - { yyval = &pars_to_char_token; ;} + { yyval = pars_op(PARS_NOT_TOKEN, yyvsp[0], NULL); ;} break; case 51: -#line 193 "pars0grm.y" - { yyval = &pars_to_number_token; ;} +#line 194 "pars0grm.y" + { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} break; case 52: -#line 194 "pars0grm.y" - { yyval = &pars_to_binary_token; ;} +#line 196 "pars0grm.y" + { yyval = pars_op(PARS_NOTFOUND_TOKEN, yyvsp[-2], NULL); ;} break; case 53: -#line 196 "pars0grm.y" - { yyval = &pars_binary_to_number_token; ;} +#line 200 "pars0grm.y" + { yyval = &pars_to_char_token; ;} break; case 54: -#line 197 "pars0grm.y" - { yyval = &pars_substr_token; ;} +#line 201 "pars0grm.y" + { yyval = &pars_to_number_token; ;} break; case 55: -#line 198 "pars0grm.y" - { yyval = &pars_concat_token; ;} +#line 202 "pars0grm.y" + { yyval = &pars_to_binary_token; ;} break; case 56: -#line 199 "pars0grm.y" - { yyval = &pars_instr_token; ;} +#line 204 "pars0grm.y" + { yyval = &pars_binary_to_number_token; ;} break; case 57: -#line 200 "pars0grm.y" - { yyval = &pars_length_token; ;} +#line 205 "pars0grm.y" + { yyval = &pars_substr_token; ;} break; case 58: -#line 201 "pars0grm.y" - { yyval = &pars_sysdate_token; ;} +#line 206 "pars0grm.y" + { yyval = &pars_concat_token; ;} break; case 59: -#line 202 "pars0grm.y" - { yyval = &pars_rnd_token; ;} +#line 207 "pars0grm.y" + { yyval = &pars_instr_token; ;} break; case 60: -#line 203 "pars0grm.y" +#line 208 "pars0grm.y" + { yyval = &pars_length_token; ;} + break; + + case 61: +#line 209 "pars0grm.y" + { yyval = &pars_sysdate_token; ;} + break; + + case 62: +#line 210 "pars0grm.y" + { yyval = &pars_rnd_token; ;} + break; + + case 63: +#line 211 "pars0grm.y" { yyval = &pars_rnd_str_token; ;} break; - case 64: -#line 214 "pars0grm.y" + case 67: +#line 222 "pars0grm.y" { yyval = pars_stored_procedure_call(yyvsp[-4]); ;} break; - case 65: -#line 219 "pars0grm.y" + case 68: +#line 227 "pars0grm.y" { yyval = pars_procedure_call(yyvsp[-3], yyvsp[-1]); ;} break; - case 66: -#line 223 "pars0grm.y" + case 69: +#line 231 "pars0grm.y" { yyval = &pars_replstr_token; ;} break; - case 67: -#line 224 "pars0grm.y" + case 70: +#line 232 "pars0grm.y" { yyval = &pars_printf_token; ;} break; - case 68: -#line 225 "pars0grm.y" + case 71: +#line 233 "pars0grm.y" { yyval = &pars_assert_token; ;} break; - case 69: -#line 229 "pars0grm.y" + case 72: +#line 237 "pars0grm.y" + { yyval = yyvsp[-2]; ;} + break; + + case 73: +#line 241 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 70: -#line 231 "pars0grm.y" + case 74: +#line 243 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 71: -#line 235 "pars0grm.y" + case 75: +#line 247 "pars0grm.y" { yyval = NULL; ;} break; - case 72: -#line 236 "pars0grm.y" + case 76: +#line 248 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 73: -#line 238 "pars0grm.y" + case 77: +#line 250 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 74: -#line 242 "pars0grm.y" + case 78: +#line 254 "pars0grm.y" { yyval = NULL; ;} break; - case 75: -#line 243 "pars0grm.y" + case 79: +#line 255 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]);;} break; - case 76: -#line 244 "pars0grm.y" + case 80: +#line 256 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 77: -#line 248 "pars0grm.y" + case 81: +#line 260 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 78: -#line 250 "pars0grm.y" + case 82: +#line 262 "pars0grm.y" { yyval = pars_func(&pars_count_token, que_node_list_add_last(NULL, sym_tab_add_int_lit( pars_sym_tab_global, 1))); ;} break; - case 79: -#line 255 "pars0grm.y" + case 83: +#line 267 "pars0grm.y" { yyval = pars_func(&pars_count_token, que_node_list_add_last(NULL, pars_func(&pars_distinct_token, @@ -1853,410 +1895,436 @@ yyreduce: NULL, yyvsp[-1])))); ;} break; - case 80: -#line 261 "pars0grm.y" + case 84: +#line 273 "pars0grm.y" { yyval = pars_func(&pars_sum_token, que_node_list_add_last(NULL, yyvsp[-1])); ;} break; - case 81: -#line 267 "pars0grm.y" + case 85: +#line 279 "pars0grm.y" { yyval = NULL; ;} break; - case 82: -#line 268 "pars0grm.y" + case 86: +#line 280 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 83: -#line 270 "pars0grm.y" + case 87: +#line 282 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 84: -#line 274 "pars0grm.y" + case 88: +#line 286 "pars0grm.y" { yyval = pars_select_list(&pars_star_denoter, NULL); ;} break; - case 85: -#line 277 "pars0grm.y" + case 89: +#line 289 "pars0grm.y" { yyval = pars_select_list(yyvsp[-2], yyvsp[0]); ;} break; - case 86: -#line 278 "pars0grm.y" + case 90: +#line 290 "pars0grm.y" { yyval = pars_select_list(yyvsp[0], NULL); ;} break; - case 87: -#line 282 "pars0grm.y" + case 91: +#line 294 "pars0grm.y" { yyval = NULL; ;} break; - case 88: -#line 283 "pars0grm.y" + case 92: +#line 295 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 89: -#line 287 "pars0grm.y" + case 93: +#line 299 "pars0grm.y" { yyval = NULL; ;} break; - case 90: -#line 289 "pars0grm.y" + case 94: +#line 301 "pars0grm.y" { yyval = &pars_update_token; ;} break; - case 91: -#line 293 "pars0grm.y" + case 95: +#line 305 "pars0grm.y" { yyval = NULL; ;} break; - case 92: -#line 295 "pars0grm.y" + case 96: +#line 307 "pars0grm.y" { yyval = &pars_consistent_token; ;} break; - case 93: -#line 299 "pars0grm.y" + case 97: +#line 311 "pars0grm.y" { yyval = &pars_asc_token; ;} break; - case 94: -#line 300 "pars0grm.y" + case 98: +#line 312 "pars0grm.y" { yyval = &pars_asc_token; ;} break; - case 95: -#line 301 "pars0grm.y" + case 99: +#line 313 "pars0grm.y" { yyval = &pars_desc_token; ;} break; - case 96: -#line 305 "pars0grm.y" + case 100: +#line 317 "pars0grm.y" { yyval = NULL; ;} break; - case 97: -#line 307 "pars0grm.y" + case 101: +#line 319 "pars0grm.y" { yyval = pars_order_by(yyvsp[-1], yyvsp[0]); ;} break; - case 98: -#line 316 "pars0grm.y" + case 102: +#line 328 "pars0grm.y" { yyval = pars_select_statement(yyvsp[-6], yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} break; - case 99: -#line 322 "pars0grm.y" + case 103: +#line 334 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 100: -#line 327 "pars0grm.y" + case 104: +#line 339 "pars0grm.y" { yyval = pars_insert_statement(yyvsp[-4], yyvsp[-1], NULL); ;} break; - case 101: -#line 329 "pars0grm.y" + case 105: +#line 341 "pars0grm.y" { yyval = pars_insert_statement(yyvsp[-1], NULL, yyvsp[0]); ;} break; - case 102: -#line 333 "pars0grm.y" + case 106: +#line 345 "pars0grm.y" { yyval = pars_column_assignment(yyvsp[-2], yyvsp[0]); ;} break; - case 103: -#line 337 "pars0grm.y" + case 107: +#line 349 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 104: -#line 339 "pars0grm.y" + case 108: +#line 351 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 105: -#line 345 "pars0grm.y" + case 109: +#line 357 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 106: -#line 351 "pars0grm.y" + case 110: +#line 363 "pars0grm.y" { yyval = pars_update_statement_start(FALSE, yyvsp[-2], yyvsp[0]); ;} break; - case 107: -#line 357 "pars0grm.y" + case 111: +#line 369 "pars0grm.y" { yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;} break; - case 108: -#line 362 "pars0grm.y" + case 112: +#line 374 "pars0grm.y" { yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;} break; - case 109: -#line 367 "pars0grm.y" + case 113: +#line 379 "pars0grm.y" { yyval = pars_update_statement_start(TRUE, yyvsp[0], NULL); ;} break; - case 110: -#line 373 "pars0grm.y" + case 114: +#line 385 "pars0grm.y" { yyval = pars_update_statement(yyvsp[-1], NULL, yyvsp[0]); ;} break; - case 111: -#line 378 "pars0grm.y" + case 115: +#line 390 "pars0grm.y" { yyval = pars_update_statement(yyvsp[-1], yyvsp[0], NULL); ;} break; - case 112: -#line 383 "pars0grm.y" + case 116: +#line 395 "pars0grm.y" { yyval = pars_row_printf_statement(yyvsp[0]); ;} break; - case 113: -#line 388 "pars0grm.y" + case 117: +#line 400 "pars0grm.y" { yyval = pars_assignment_statement(yyvsp[-2], yyvsp[0]); ;} break; - case 114: -#line 394 "pars0grm.y" + case 118: +#line 406 "pars0grm.y" { yyval = pars_elsif_element(yyvsp[-2], yyvsp[0]); ;} break; - case 115: -#line 398 "pars0grm.y" + case 119: +#line 410 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 116: -#line 400 "pars0grm.y" + case 120: +#line 412 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-1], yyvsp[0]); ;} break; - case 117: -#line 404 "pars0grm.y" + case 121: +#line 416 "pars0grm.y" { yyval = NULL; ;} break; - case 118: -#line 406 "pars0grm.y" + case 122: +#line 418 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 119: -#line 407 "pars0grm.y" + case 123: +#line 419 "pars0grm.y" { yyval = yyvsp[0]; ;} break; - case 120: -#line 414 "pars0grm.y" + case 124: +#line 426 "pars0grm.y" { yyval = pars_if_statement(yyvsp[-5], yyvsp[-3], yyvsp[-2]); ;} break; - case 121: -#line 420 "pars0grm.y" + case 125: +#line 432 "pars0grm.y" { yyval = pars_while_statement(yyvsp[-4], yyvsp[-2]); ;} break; - case 122: -#line 428 "pars0grm.y" + case 126: +#line 440 "pars0grm.y" { yyval = pars_for_statement(yyvsp[-8], yyvsp[-6], yyvsp[-4], yyvsp[-2]); ;} break; - case 123: -#line 432 "pars0grm.y" + case 127: +#line 444 "pars0grm.y" + { yyval = pars_exit_statement(); ;} + break; + + case 128: +#line 448 "pars0grm.y" { yyval = pars_return_statement(); ;} break; - case 124: -#line 437 "pars0grm.y" + case 129: +#line 453 "pars0grm.y" { yyval = pars_open_statement( ROW_SEL_OPEN_CURSOR, yyvsp[0]); ;} break; - case 125: -#line 443 "pars0grm.y" + case 130: +#line 459 "pars0grm.y" { yyval = pars_open_statement( ROW_SEL_CLOSE_CURSOR, yyvsp[0]); ;} break; - case 126: -#line 449 "pars0grm.y" - { yyval = pars_fetch_statement(yyvsp[-2], yyvsp[0]); ;} + case 131: +#line 465 "pars0grm.y" + { yyval = pars_fetch_statement(yyvsp[-2], yyvsp[0], NULL); ;} break; - case 127: -#line 454 "pars0grm.y" - { yyval = pars_column_def(yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} + case 132: +#line 467 "pars0grm.y" + { yyval = pars_fetch_statement(yyvsp[-2], NULL, yyvsp[0]); ;} break; - case 128: -#line 458 "pars0grm.y" + case 133: +#line 472 "pars0grm.y" + { yyval = pars_column_def(yyvsp[-4], yyvsp[-3], yyvsp[-2], yyvsp[-1], yyvsp[0]); ;} + break; + + case 134: +#line 476 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 129: -#line 460 "pars0grm.y" + case 135: +#line 478 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 130: -#line 464 "pars0grm.y" + case 136: +#line 482 "pars0grm.y" { yyval = NULL; ;} break; - case 131: -#line 466 "pars0grm.y" + case 137: +#line 484 "pars0grm.y" { yyval = yyvsp[-1]; ;} break; - case 132: -#line 470 "pars0grm.y" + case 138: +#line 488 "pars0grm.y" { yyval = NULL; ;} break; - case 133: -#line 472 "pars0grm.y" + case 139: +#line 490 "pars0grm.y" { yyval = &pars_int_token; /* pass any non-NULL pointer */ ;} break; - case 134: -#line 477 "pars0grm.y" + case 140: +#line 495 "pars0grm.y" { yyval = NULL; ;} break; - case 135: -#line 479 "pars0grm.y" + case 141: +#line 497 "pars0grm.y" { yyval = &pars_int_token; /* pass any non-NULL pointer */ ;} break; - case 136: -#line 486 "pars0grm.y" + case 142: +#line 502 "pars0grm.y" + { yyval = NULL; ;} + break; + + case 143: +#line 504 "pars0grm.y" + { yyval = &pars_int_token; + /* pass any non-NULL pointer */ ;} + break; + + case 144: +#line 511 "pars0grm.y" { yyval = pars_create_table(yyvsp[-4], yyvsp[-2], yyvsp[0]); ;} break; - case 137: -#line 490 "pars0grm.y" + case 145: +#line 515 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 138: -#line 492 "pars0grm.y" + case 146: +#line 517 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 139: -#line 496 "pars0grm.y" + case 147: +#line 521 "pars0grm.y" { yyval = NULL; ;} break; - case 140: -#line 497 "pars0grm.y" + case 148: +#line 522 "pars0grm.y" { yyval = &pars_unique_token; ;} break; - case 141: -#line 501 "pars0grm.y" + case 149: +#line 526 "pars0grm.y" { yyval = NULL; ;} break; - case 142: -#line 502 "pars0grm.y" + case 150: +#line 527 "pars0grm.y" { yyval = &pars_clustered_token; ;} break; - case 143: -#line 510 "pars0grm.y" + case 151: +#line 535 "pars0grm.y" { yyval = pars_create_index(yyvsp[-8], yyvsp[-7], yyvsp[-5], yyvsp[-3], yyvsp[-1]); ;} break; - case 144: -#line 515 "pars0grm.y" + case 152: +#line 540 "pars0grm.y" { yyval = pars_commit_statement(); ;} break; - case 145: -#line 520 "pars0grm.y" + case 153: +#line 545 "pars0grm.y" { yyval = pars_rollback_statement(); ;} break; - case 146: -#line 524 "pars0grm.y" + case 154: +#line 549 "pars0grm.y" { yyval = &pars_int_token; ;} break; - case 147: -#line 525 "pars0grm.y" + case 155: +#line 550 "pars0grm.y" { yyval = &pars_int_token; ;} break; - case 148: -#line 526 "pars0grm.y" + case 156: +#line 551 "pars0grm.y" { yyval = &pars_char_token; ;} break; - case 149: -#line 527 "pars0grm.y" + case 157: +#line 552 "pars0grm.y" { yyval = &pars_binary_token; ;} break; - case 150: -#line 528 "pars0grm.y" + case 158: +#line 553 "pars0grm.y" { yyval = &pars_blob_token; ;} break; - case 151: -#line 533 "pars0grm.y" + case 159: +#line 558 "pars0grm.y" { yyval = pars_parameter_declaration(yyvsp[-2], PARS_INPUT, yyvsp[0]); ;} break; - case 152: -#line 536 "pars0grm.y" + case 160: +#line 561 "pars0grm.y" { yyval = pars_parameter_declaration(yyvsp[-2], PARS_OUTPUT, yyvsp[0]); ;} break; - case 153: -#line 541 "pars0grm.y" + case 161: +#line 566 "pars0grm.y" { yyval = NULL; ;} break; - case 154: -#line 542 "pars0grm.y" + case 162: +#line 567 "pars0grm.y" { yyval = que_node_list_add_last(NULL, yyvsp[0]); ;} break; - case 155: -#line 544 "pars0grm.y" + case 163: +#line 569 "pars0grm.y" { yyval = que_node_list_add_last(yyvsp[-2], yyvsp[0]); ;} break; - case 156: -#line 549 "pars0grm.y" + case 164: +#line 574 "pars0grm.y" { yyval = pars_variable_declaration(yyvsp[-2], yyvsp[-1]); ;} break; - case 160: -#line 561 "pars0grm.y" + case 168: +#line 586 "pars0grm.y" { yyval = pars_cursor_declaration(yyvsp[-3], yyvsp[-1]); ;} break; - case 164: -#line 577 "pars0grm.y" + case 169: +#line 591 "pars0grm.y" + { yyval = pars_function_declaration(yyvsp[-1]); ;} + break; + + case 175: +#line 612 "pars0grm.y" { yyval = pars_procedure_definition(yyvsp[-9], yyvsp[-7], yyvsp[-1]); ;} break; @@ -2265,7 +2333,7 @@ yyreduce: } /* Line 1010 of yacc.c. */ -#line 2269 "pars0grm.tab.c" +#line 2337 "pars0grm.tab.c" yyvsp -= yylen; yyssp -= yylen; @@ -2490,6 +2558,6 @@ yyreturn: } -#line 581 "pars0grm.y" +#line 616 "pars0grm.y" diff --git a/storage/innobase/pars/pars0grm.h b/storage/innobase/pars/pars0grm.h index e35fcf47692..996fc37f13b 100644 --- a/storage/innobase/pars/pars0grm.h +++ b/storage/innobase/pars/pars0grm.h @@ -32,177 +32,187 @@ PARS_INT_LIT = 258, PARS_FLOAT_LIT = 259, PARS_STR_LIT = 260, - PARS_NULL_LIT = 261, - PARS_ID_TOKEN = 262, - PARS_AND_TOKEN = 263, - PARS_OR_TOKEN = 264, - PARS_NOT_TOKEN = 265, - PARS_GE_TOKEN = 266, - PARS_LE_TOKEN = 267, - PARS_NE_TOKEN = 268, - PARS_PROCEDURE_TOKEN = 269, - PARS_IN_TOKEN = 270, - PARS_OUT_TOKEN = 271, - PARS_BINARY_TOKEN = 272, - PARS_BLOB_TOKEN = 273, - PARS_INT_TOKEN = 274, - PARS_INTEGER_TOKEN = 275, - PARS_FLOAT_TOKEN = 276, - PARS_CHAR_TOKEN = 277, - PARS_IS_TOKEN = 278, - PARS_BEGIN_TOKEN = 279, - PARS_END_TOKEN = 280, - PARS_IF_TOKEN = 281, - PARS_THEN_TOKEN = 282, - PARS_ELSE_TOKEN = 283, - PARS_ELSIF_TOKEN = 284, - PARS_LOOP_TOKEN = 285, - PARS_WHILE_TOKEN = 286, - PARS_RETURN_TOKEN = 287, - PARS_SELECT_TOKEN = 288, - PARS_SUM_TOKEN = 289, - PARS_COUNT_TOKEN = 290, - PARS_DISTINCT_TOKEN = 291, - PARS_FROM_TOKEN = 292, - PARS_WHERE_TOKEN = 293, - PARS_FOR_TOKEN = 294, - PARS_DDOT_TOKEN = 295, - PARS_CONSISTENT_TOKEN = 296, - PARS_READ_TOKEN = 297, - PARS_ORDER_TOKEN = 298, - PARS_BY_TOKEN = 299, - PARS_ASC_TOKEN = 300, - PARS_DESC_TOKEN = 301, - PARS_INSERT_TOKEN = 302, - PARS_INTO_TOKEN = 303, - PARS_VALUES_TOKEN = 304, - PARS_UPDATE_TOKEN = 305, - PARS_SET_TOKEN = 306, - PARS_DELETE_TOKEN = 307, - PARS_CURRENT_TOKEN = 308, - PARS_OF_TOKEN = 309, - PARS_CREATE_TOKEN = 310, - PARS_TABLE_TOKEN = 311, - PARS_INDEX_TOKEN = 312, - PARS_UNIQUE_TOKEN = 313, - PARS_CLUSTERED_TOKEN = 314, - PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 315, - PARS_ON_TOKEN = 316, - PARS_ASSIGN_TOKEN = 317, - PARS_DECLARE_TOKEN = 318, - PARS_CURSOR_TOKEN = 319, - PARS_SQL_TOKEN = 320, - PARS_OPEN_TOKEN = 321, - PARS_FETCH_TOKEN = 322, - PARS_CLOSE_TOKEN = 323, - PARS_NOTFOUND_TOKEN = 324, - PARS_TO_CHAR_TOKEN = 325, - PARS_TO_NUMBER_TOKEN = 326, - PARS_TO_BINARY_TOKEN = 327, - PARS_BINARY_TO_NUMBER_TOKEN = 328, - PARS_SUBSTR_TOKEN = 329, - PARS_REPLSTR_TOKEN = 330, - PARS_CONCAT_TOKEN = 331, - PARS_INSTR_TOKEN = 332, - PARS_LENGTH_TOKEN = 333, - PARS_SYSDATE_TOKEN = 334, - PARS_PRINTF_TOKEN = 335, - PARS_ASSERT_TOKEN = 336, - PARS_RND_TOKEN = 337, - PARS_RND_STR_TOKEN = 338, - PARS_ROW_PRINTF_TOKEN = 339, - PARS_COMMIT_TOKEN = 340, - PARS_ROLLBACK_TOKEN = 341, - PARS_WORK_TOKEN = 342, - NEG = 343 + PARS_FIXBINARY_LIT = 261, + PARS_BLOB_LIT = 262, + PARS_NULL_LIT = 263, + PARS_ID_TOKEN = 264, + PARS_AND_TOKEN = 265, + PARS_OR_TOKEN = 266, + PARS_NOT_TOKEN = 267, + PARS_GE_TOKEN = 268, + PARS_LE_TOKEN = 269, + PARS_NE_TOKEN = 270, + PARS_PROCEDURE_TOKEN = 271, + PARS_IN_TOKEN = 272, + PARS_OUT_TOKEN = 273, + PARS_BINARY_TOKEN = 274, + PARS_BLOB_TOKEN = 275, + PARS_INT_TOKEN = 276, + PARS_INTEGER_TOKEN = 277, + PARS_FLOAT_TOKEN = 278, + PARS_CHAR_TOKEN = 279, + PARS_IS_TOKEN = 280, + PARS_BEGIN_TOKEN = 281, + PARS_END_TOKEN = 282, + PARS_IF_TOKEN = 283, + PARS_THEN_TOKEN = 284, + PARS_ELSE_TOKEN = 285, + PARS_ELSIF_TOKEN = 286, + PARS_LOOP_TOKEN = 287, + PARS_WHILE_TOKEN = 288, + PARS_RETURN_TOKEN = 289, + PARS_SELECT_TOKEN = 290, + PARS_SUM_TOKEN = 291, + PARS_COUNT_TOKEN = 292, + PARS_DISTINCT_TOKEN = 293, + PARS_FROM_TOKEN = 294, + PARS_WHERE_TOKEN = 295, + PARS_FOR_TOKEN = 296, + PARS_DDOT_TOKEN = 297, + PARS_CONSISTENT_TOKEN = 298, + PARS_READ_TOKEN = 299, + PARS_ORDER_TOKEN = 300, + PARS_BY_TOKEN = 301, + PARS_ASC_TOKEN = 302, + PARS_DESC_TOKEN = 303, + PARS_INSERT_TOKEN = 304, + PARS_INTO_TOKEN = 305, + PARS_VALUES_TOKEN = 306, + PARS_UPDATE_TOKEN = 307, + PARS_SET_TOKEN = 308, + PARS_DELETE_TOKEN = 309, + PARS_CURRENT_TOKEN = 310, + PARS_OF_TOKEN = 311, + PARS_CREATE_TOKEN = 312, + PARS_TABLE_TOKEN = 313, + PARS_INDEX_TOKEN = 314, + PARS_UNIQUE_TOKEN = 315, + PARS_CLUSTERED_TOKEN = 316, + PARS_DOES_NOT_FIT_IN_MEM_TOKEN = 317, + PARS_ON_TOKEN = 318, + PARS_ASSIGN_TOKEN = 319, + PARS_DECLARE_TOKEN = 320, + PARS_CURSOR_TOKEN = 321, + PARS_SQL_TOKEN = 322, + PARS_OPEN_TOKEN = 323, + PARS_FETCH_TOKEN = 324, + PARS_CLOSE_TOKEN = 325, + PARS_NOTFOUND_TOKEN = 326, + PARS_TO_CHAR_TOKEN = 327, + PARS_TO_NUMBER_TOKEN = 328, + PARS_TO_BINARY_TOKEN = 329, + PARS_BINARY_TO_NUMBER_TOKEN = 330, + PARS_SUBSTR_TOKEN = 331, + PARS_REPLSTR_TOKEN = 332, + PARS_CONCAT_TOKEN = 333, + PARS_INSTR_TOKEN = 334, + PARS_LENGTH_TOKEN = 335, + PARS_SYSDATE_TOKEN = 336, + PARS_PRINTF_TOKEN = 337, + PARS_ASSERT_TOKEN = 338, + PARS_RND_TOKEN = 339, + PARS_RND_STR_TOKEN = 340, + PARS_ROW_PRINTF_TOKEN = 341, + PARS_COMMIT_TOKEN = 342, + PARS_ROLLBACK_TOKEN = 343, + PARS_WORK_TOKEN = 344, + PARS_UNSIGNED_TOKEN = 345, + PARS_EXIT_TOKEN = 346, + PARS_FUNCTION_TOKEN = 347, + NEG = 348 }; #endif #define PARS_INT_LIT 258 #define PARS_FLOAT_LIT 259 #define PARS_STR_LIT 260 -#define PARS_NULL_LIT 261 -#define PARS_ID_TOKEN 262 -#define PARS_AND_TOKEN 263 -#define PARS_OR_TOKEN 264 -#define PARS_NOT_TOKEN 265 -#define PARS_GE_TOKEN 266 -#define PARS_LE_TOKEN 267 -#define PARS_NE_TOKEN 268 -#define PARS_PROCEDURE_TOKEN 269 -#define PARS_IN_TOKEN 270 -#define PARS_OUT_TOKEN 271 -#define PARS_BINARY_TOKEN 272 -#define PARS_BLOB_TOKEN 273 -#define PARS_INT_TOKEN 274 -#define PARS_INTEGER_TOKEN 275 -#define PARS_FLOAT_TOKEN 276 -#define PARS_CHAR_TOKEN 277 -#define PARS_IS_TOKEN 278 -#define PARS_BEGIN_TOKEN 279 -#define PARS_END_TOKEN 280 -#define PARS_IF_TOKEN 281 -#define PARS_THEN_TOKEN 282 -#define PARS_ELSE_TOKEN 283 -#define PARS_ELSIF_TOKEN 284 -#define PARS_LOOP_TOKEN 285 -#define PARS_WHILE_TOKEN 286 -#define PARS_RETURN_TOKEN 287 -#define PARS_SELECT_TOKEN 288 -#define PARS_SUM_TOKEN 289 -#define PARS_COUNT_TOKEN 290 -#define PARS_DISTINCT_TOKEN 291 -#define PARS_FROM_TOKEN 292 -#define PARS_WHERE_TOKEN 293 -#define PARS_FOR_TOKEN 294 -#define PARS_DDOT_TOKEN 295 -#define PARS_CONSISTENT_TOKEN 296 -#define PARS_READ_TOKEN 297 -#define PARS_ORDER_TOKEN 298 -#define PARS_BY_TOKEN 299 -#define PARS_ASC_TOKEN 300 -#define PARS_DESC_TOKEN 301 -#define PARS_INSERT_TOKEN 302 -#define PARS_INTO_TOKEN 303 -#define PARS_VALUES_TOKEN 304 -#define PARS_UPDATE_TOKEN 305 -#define PARS_SET_TOKEN 306 -#define PARS_DELETE_TOKEN 307 -#define PARS_CURRENT_TOKEN 308 -#define PARS_OF_TOKEN 309 -#define PARS_CREATE_TOKEN 310 -#define PARS_TABLE_TOKEN 311 -#define PARS_INDEX_TOKEN 312 -#define PARS_UNIQUE_TOKEN 313 -#define PARS_CLUSTERED_TOKEN 314 -#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 315 -#define PARS_ON_TOKEN 316 -#define PARS_ASSIGN_TOKEN 317 -#define PARS_DECLARE_TOKEN 318 -#define PARS_CURSOR_TOKEN 319 -#define PARS_SQL_TOKEN 320 -#define PARS_OPEN_TOKEN 321 -#define PARS_FETCH_TOKEN 322 -#define PARS_CLOSE_TOKEN 323 -#define PARS_NOTFOUND_TOKEN 324 -#define PARS_TO_CHAR_TOKEN 325 -#define PARS_TO_NUMBER_TOKEN 326 -#define PARS_TO_BINARY_TOKEN 327 -#define PARS_BINARY_TO_NUMBER_TOKEN 328 -#define PARS_SUBSTR_TOKEN 329 -#define PARS_REPLSTR_TOKEN 330 -#define PARS_CONCAT_TOKEN 331 -#define PARS_INSTR_TOKEN 332 -#define PARS_LENGTH_TOKEN 333 -#define PARS_SYSDATE_TOKEN 334 -#define PARS_PRINTF_TOKEN 335 -#define PARS_ASSERT_TOKEN 336 -#define PARS_RND_TOKEN 337 -#define PARS_RND_STR_TOKEN 338 -#define PARS_ROW_PRINTF_TOKEN 339 -#define PARS_COMMIT_TOKEN 340 -#define PARS_ROLLBACK_TOKEN 341 -#define PARS_WORK_TOKEN 342 -#define NEG 343 +#define PARS_FIXBINARY_LIT 261 +#define PARS_BLOB_LIT 262 +#define PARS_NULL_LIT 263 +#define PARS_ID_TOKEN 264 +#define PARS_AND_TOKEN 265 +#define PARS_OR_TOKEN 266 +#define PARS_NOT_TOKEN 267 +#define PARS_GE_TOKEN 268 +#define PARS_LE_TOKEN 269 +#define PARS_NE_TOKEN 270 +#define PARS_PROCEDURE_TOKEN 271 +#define PARS_IN_TOKEN 272 +#define PARS_OUT_TOKEN 273 +#define PARS_BINARY_TOKEN 274 +#define PARS_BLOB_TOKEN 275 +#define PARS_INT_TOKEN 276 +#define PARS_INTEGER_TOKEN 277 +#define PARS_FLOAT_TOKEN 278 +#define PARS_CHAR_TOKEN 279 +#define PARS_IS_TOKEN 280 +#define PARS_BEGIN_TOKEN 281 +#define PARS_END_TOKEN 282 +#define PARS_IF_TOKEN 283 +#define PARS_THEN_TOKEN 284 +#define PARS_ELSE_TOKEN 285 +#define PARS_ELSIF_TOKEN 286 +#define PARS_LOOP_TOKEN 287 +#define PARS_WHILE_TOKEN 288 +#define PARS_RETURN_TOKEN 289 +#define PARS_SELECT_TOKEN 290 +#define PARS_SUM_TOKEN 291 +#define PARS_COUNT_TOKEN 292 +#define PARS_DISTINCT_TOKEN 293 +#define PARS_FROM_TOKEN 294 +#define PARS_WHERE_TOKEN 295 +#define PARS_FOR_TOKEN 296 +#define PARS_DDOT_TOKEN 297 +#define PARS_CONSISTENT_TOKEN 298 +#define PARS_READ_TOKEN 299 +#define PARS_ORDER_TOKEN 300 +#define PARS_BY_TOKEN 301 +#define PARS_ASC_TOKEN 302 +#define PARS_DESC_TOKEN 303 +#define PARS_INSERT_TOKEN 304 +#define PARS_INTO_TOKEN 305 +#define PARS_VALUES_TOKEN 306 +#define PARS_UPDATE_TOKEN 307 +#define PARS_SET_TOKEN 308 +#define PARS_DELETE_TOKEN 309 +#define PARS_CURRENT_TOKEN 310 +#define PARS_OF_TOKEN 311 +#define PARS_CREATE_TOKEN 312 +#define PARS_TABLE_TOKEN 313 +#define PARS_INDEX_TOKEN 314 +#define PARS_UNIQUE_TOKEN 315 +#define PARS_CLUSTERED_TOKEN 316 +#define PARS_DOES_NOT_FIT_IN_MEM_TOKEN 317 +#define PARS_ON_TOKEN 318 +#define PARS_ASSIGN_TOKEN 319 +#define PARS_DECLARE_TOKEN 320 +#define PARS_CURSOR_TOKEN 321 +#define PARS_SQL_TOKEN 322 +#define PARS_OPEN_TOKEN 323 +#define PARS_FETCH_TOKEN 324 +#define PARS_CLOSE_TOKEN 325 +#define PARS_NOTFOUND_TOKEN 326 +#define PARS_TO_CHAR_TOKEN 327 +#define PARS_TO_NUMBER_TOKEN 328 +#define PARS_TO_BINARY_TOKEN 329 +#define PARS_BINARY_TO_NUMBER_TOKEN 330 +#define PARS_SUBSTR_TOKEN 331 +#define PARS_REPLSTR_TOKEN 332 +#define PARS_CONCAT_TOKEN 333 +#define PARS_INSTR_TOKEN 334 +#define PARS_LENGTH_TOKEN 335 +#define PARS_SYSDATE_TOKEN 336 +#define PARS_PRINTF_TOKEN 337 +#define PARS_ASSERT_TOKEN 338 +#define PARS_RND_TOKEN 339 +#define PARS_RND_STR_TOKEN 340 +#define PARS_ROW_PRINTF_TOKEN 341 +#define PARS_COMMIT_TOKEN 342 +#define PARS_ROLLBACK_TOKEN 343 +#define PARS_WORK_TOKEN 344 +#define PARS_UNSIGNED_TOKEN 345 +#define PARS_EXIT_TOKEN 346 +#define PARS_FUNCTION_TOKEN 347 +#define NEG 348 diff --git a/storage/innobase/pars/pars0grm.y b/storage/innobase/pars/pars0grm.y index 435025d7386..7f13312fc6e 100644 --- a/storage/innobase/pars/pars0grm.y +++ b/storage/innobase/pars/pars0grm.y @@ -29,10 +29,12 @@ que_node_t */ int yylex(void); %} - + %token PARS_INT_LIT %token PARS_FLOAT_LIT %token PARS_STR_LIT +%token PARS_FIXBINARY_LIT +%token PARS_BLOB_LIT %token PARS_NULL_LIT %token PARS_ID_TOKEN %token PARS_AND_TOKEN @@ -115,6 +117,9 @@ yylex(void); %token PARS_COMMIT_TOKEN %token PARS_ROLLBACK_TOKEN %token PARS_WORK_TOKEN +%token PARS_UNSIGNED_TOKEN +%token PARS_EXIT_TOKEN +%token PARS_FUNCTION_TOKEN %left PARS_AND_TOKEN PARS_OR_TOKEN %left PARS_NOT_TOKEN @@ -133,6 +138,7 @@ statement: | predefined_procedure_call ';' | while_statement ';' | for_statement ';' + | exit_statement ';' | if_statement ';' | return_statement ';' | assignment_statement ';' @@ -165,6 +171,8 @@ exp: | PARS_INT_LIT { $$ = $1;} | PARS_FLOAT_LIT { $$ = $1;} | PARS_STR_LIT { $$ = $1;} + | PARS_FIXBINARY_LIT { $$ = $1;} + | PARS_BLOB_LIT { $$ = $1;} | PARS_NULL_LIT { $$ = $1;} | PARS_SQL_TOKEN { $$ = $1;} | exp '+' exp { $$ = pars_op('+', $1, $3); } @@ -225,6 +233,10 @@ predefined_procedure_name: | PARS_ASSERT_TOKEN { $$ = &pars_assert_token; } ; +user_function_call: + PARS_ID_TOKEN '(' ')' { $$ = $1; } +; + table_list: PARS_ID_TOKEN { $$ = que_node_list_add_last(NULL, $1); } | table_list ',' PARS_ID_TOKEN @@ -262,14 +274,14 @@ select_item: que_node_list_add_last(NULL, $3)); } ; - + select_item_list: /* Nothing */ { $$ = NULL; } | select_item { $$ = que_node_list_add_last(NULL, $1); } | select_item_list ',' select_item { $$ = que_node_list_add_last($1, $3); } ; - + select_list: '*' { $$ = pars_select_list(&pars_star_denoter, NULL); } @@ -377,7 +389,7 @@ delete_statement_positioned: delete_statement_start cursor_positioned { $$ = pars_update_statement($1, $2, NULL); } ; - + row_printf_statement: PARS_ROW_PRINTF_TOKEN select_statement { $$ = pars_row_printf_statement($2); } @@ -428,6 +440,10 @@ for_statement: { $$ = pars_for_statement($2, $4, $6, $8); } ; +exit_statement: + PARS_EXIT_TOKEN { $$ = pars_exit_statement(); } +; + return_statement: PARS_RETURN_TOKEN { $$ = pars_return_statement(); } ; @@ -446,12 +462,14 @@ close_cursor_statement: fetch_statement: PARS_FETCH_TOKEN PARS_ID_TOKEN PARS_INTO_TOKEN variable_list - { $$ = pars_fetch_statement($2, $4); } + { $$ = pars_fetch_statement($2, $4, NULL); } + | PARS_FETCH_TOKEN PARS_ID_TOKEN PARS_INTO_TOKEN user_function_call + { $$ = pars_fetch_statement($2, NULL, $4); } ; column_def: - PARS_ID_TOKEN type_name opt_column_len opt_not_null - { $$ = pars_column_def($1, $2, $3, $4); } + PARS_ID_TOKEN type_name opt_column_len opt_unsigned opt_not_null + { $$ = pars_column_def($1, $2, $3, $4, $5); } ; column_def_list: @@ -466,6 +484,13 @@ opt_column_len: { $$ = $2; } ; +opt_unsigned: + /* Nothing */ { $$ = NULL; } + | PARS_UNSIGNED_TOKEN + { $$ = &pars_int_token; + /* pass any non-NULL pointer */ } +; + opt_not_null: /* Nothing */ { $$ = NULL; } | PARS_NOT_TOKEN PARS_NULL_LIT @@ -479,7 +504,7 @@ not_fit_in_memory: { $$ = &pars_int_token; /* pass any non-NULL pointer */ } ; - + create_table: PARS_CREATE_TOKEN PARS_TABLE_TOKEN PARS_ID_TOKEN '(' column_def_list ')' @@ -550,8 +575,8 @@ variable_declaration: ; variable_declaration_list: - /* Nothing */ - | variable_declaration + /* Nothing */ + | variable_declaration | variable_declaration_list variable_declaration ; @@ -561,10 +586,20 @@ cursor_declaration: { $$ = pars_cursor_declaration($3, $5); } ; +function_declaration: + PARS_DECLARE_TOKEN PARS_FUNCTION_TOKEN PARS_ID_TOKEN ';' + { $$ = pars_function_declaration($3); } +; + +declaration: + cursor_declaration + | function_declaration +; + declaration_list: /* Nothing */ - | cursor_declaration - | declaration_list cursor_declaration + | declaration + | declaration_list declaration ; procedure_definition: @@ -577,5 +612,5 @@ procedure_definition: PARS_END_TOKEN { $$ = pars_procedure_definition($2, $4, $10); } ; - + %% diff --git a/storage/innobase/pars/pars0lex.l b/storage/innobase/pars/pars0lex.l index 4224536d49e..ab1fe446924 100644 --- a/storage/innobase/pars/pars0lex.l +++ b/storage/innobase/pars/pars0lex.l @@ -12,27 +12,11 @@ not automatically generate them from pars0grm.y and pars0lex.l. How to make the InnoDB parser and lexer C files: -1. First do - bison -d pars0grm.y - That generates pars0grm.tab.c and pars0grm.tab.h. +1. Run ./make_flex.sh to generate lexer files. -2. Rename pars0grm.tab.c to pars0grm.c and pars0grm.tab.h to pars0grm.h. +2. Run ./make_bison.sh to generate parser files. -3. Copy pars0grm.h also to /innobase/include - -4. Do - flex pars0lex.l - That generates lex.yy.c. - -5. Rename lex.yy.c to lexyy.c. - -6. Add '#include "univ.i"' before #include <stdio.h> in lexyy.c - (Needed for AIX) - -7. Add a type cast to int to the assignment below the comment - 'need more input.' (Removes a warning on Win64) - -These instructions seem to work at least with bison-1.28 and flex-2.5.4 on +These instructions seem to work at least with bison-1.875d and flex-2.5.31 on Linux. *******************************************************/ @@ -96,11 +80,14 @@ string_append( } %} - + DIGIT [0-9] ID [a-z_A-Z][a-z_A-Z0-9]* +BOUND_LIT \:[a-z_A-Z0-9]+ + %x comment %x quoted +%x id %% {DIGIT}+ { @@ -115,6 +102,15 @@ ID [a-z_A-Z][a-z_A-Z0-9]* return(PARS_FLOAT_LIT); } +{BOUND_LIT} { + ulint type; + + yylval = sym_tab_add_bound_lit(pars_sym_tab_global, + yytext + 1, &type); + + return(type); +} + "'" { /* Quoted character string literals are handled in an explicit start state 'quoted'. This state is entered and the buffer for @@ -153,6 +149,45 @@ In the state 'quoted', only two actions are possible (defined below). */ } } +\" { +/* Quoted identifiers are handled in an explicit start state 'id'. +This state is entered and the buffer for the scanned string is emptied +upon encountering a starting quote. + +In the state 'id', only two actions are possible (defined below). */ + BEGIN(id); + stringbuf_len = 0; +} +<id>[^\"]+ { + /* Got a sequence of characters other than '"': + append to string buffer */ + string_append(yytext, yyleng); +} +<id>\"+ { + /* Got a sequence of '"' characters: + append half of them to string buffer, + as '""' represents a single '"'. + We apply truncating division, + so that '"""' will result in '"'. */ + + string_append(yytext, yyleng / 2); + + /* If we got an odd number of quotes, then the + last quote we got is the terminating quote. + At the end of the string, we return to the + initial start state and report the scanned + identifier. */ + + if (yyleng % 2) { + BEGIN(INITIAL); + yylval = sym_tab_add_id( + pars_sym_tab_global, + (byte*) stringbuf, stringbuf_len); + + return(PARS_ID_TOKEN); + } +} + "NULL" { yylval = sym_tab_add_null_lit(pars_sym_tab_global); @@ -462,6 +497,18 @@ In the state 'quoted', only two actions are possible (defined below). */ return(PARS_WORK_TOKEN); } +"UNSIGNED" { + return(PARS_UNSIGNED_TOKEN); +} + +"EXIT" { + return(PARS_EXIT_TOKEN); +} + +"FUNCTION" { + return(PARS_FUNCTION_TOKEN); +} + {ID} { yylval = sym_tab_add_id(pars_sym_tab_global, (byte*)yytext, diff --git a/storage/innobase/pars/pars0opt.c b/storage/innobase/pars/pars0opt.c index bb41b5da074..4037f50cb5c 100644 --- a/storage/innobase/pars/pars0opt.c +++ b/storage/innobase/pars/pars0opt.c @@ -313,7 +313,6 @@ opt_calc_index_goodness( ulint goodness; ulint n_fields; ulint col_no; - ulint mix_id_col_no; ulint op; ulint j; @@ -326,8 +325,6 @@ opt_calc_index_goodness( n_fields = dict_index_get_n_unique_in_tree(index); - mix_id_col_no = dict_table_get_sys_col_no(index->table, DATA_MIX_ID); - for (j = 0; j < n_fields; j++) { col_no = dict_index_get_nth_col_no(index, j); @@ -335,13 +332,7 @@ opt_calc_index_goodness( exp = opt_look_for_col_in_cond_before(OPT_EQUAL, col_no, sel_node->search_cond, sel_node, nth_table, &op); - if (col_no == mix_id_col_no) { - ut_ad(exp == NULL); - - index_plan[j] = NULL; - *last_op = '='; - goodness += 4; - } else if (exp) { + if (exp) { /* The value for this column is exactly known already at this stage of the join */ @@ -531,7 +522,6 @@ opt_search_plan_for_table( warning */ ulint best_goodness; ulint best_last_op = 0; /* remove warning */ - ulint mix_id_pos; que_node_t* index_plan[256]; que_node_t* best_index_plan[256]; @@ -601,26 +591,6 @@ opt_search_plan_for_table( plan->unique_search = FALSE; } - if ((table->type != DICT_TABLE_ORDINARY) - && (best_index->type & DICT_CLUSTERED)) { - - plan->mixed_index = TRUE; - - mix_id_pos = table->mix_len; - - if (mix_id_pos < n_fields) { - /* We have to add the mix id as a (string) literal - expression to the tuple_exps */ - - plan->tuple_exps[mix_id_pos] = - sym_tab_add_str_lit(pars_sym_tab_global, - table->mix_id_buf, - table->mix_id_len); - } - } else { - plan->mixed_index = FALSE; - } - plan->old_vers_heap = NULL; btr_pcur_init(&(plan->pcur)); @@ -1055,7 +1025,6 @@ opt_clust_access( dict_table_t* table; dict_index_t* clust_index; dict_index_t* index; - dfield_t* dfield; mem_heap_t* heap; ulint n_fields; ulint pos; @@ -1109,22 +1078,7 @@ opt_clust_access( *(plan->clust_map + i) = pos; - ut_ad((pos != ULINT_UNDEFINED) - || ((table->type == DICT_TABLE_CLUSTER_MEMBER) - && (i == table->mix_len))); - } - - if (table->type == DICT_TABLE_CLUSTER_MEMBER) { - - /* Preset the mix id field to the mix id constant */ - - dfield = dtuple_get_nth_field(plan->clust_ref, table->mix_len); - - dfield_set_data(dfield, mem_heap_alloc(heap, - table->mix_id_len), - table->mix_id_len); - ut_memcpy(dfield_get_data(dfield), table->mix_id_buf, - table->mix_id_len); + ut_ad(pos != ULINT_UNDEFINED); } } diff --git a/storage/innobase/pars/pars0pars.c b/storage/innobase/pars/pars0pars.c index 1b7a3a653a9..7ef2f65c724 100644 --- a/storage/innobase/pars/pars0pars.c +++ b/storage/innobase/pars/pars0pars.c @@ -373,14 +373,15 @@ pars_resolve_exp_variables_and_types( } /* Not resolved yet: look in the symbol table for a variable - or a cursor with the same name */ + or a cursor or a function with the same name */ node = UT_LIST_GET_FIRST(pars_sym_tab_global->sym_list); while (node) { if (node->resolved && ((node->token_type == SYM_VAR) - || (node->token_type == SYM_CURSOR)) + || (node->token_type == SYM_CURSOR) + || (node->token_type == SYM_FUNCTION)) && node->name && (sym_node->name_len == node->name_len) && (ut_memcmp(sym_node->name, node->name, @@ -486,7 +487,7 @@ pars_resolve_exp_columns( while (t_node) { table = t_node->table; - n_cols = dict_table_get_n_user_cols(table); + n_cols = dict_table_get_n_cols(table); for (i = 0; i < n_cols; i++) { col = dict_table_get_nth_col(table, i); @@ -787,6 +788,26 @@ pars_cursor_declaration( } /************************************************************************* +Parses a function declaration. */ + +que_node_t* +pars_function_declaration( +/*======================*/ + /* out: sym_node */ + sym_node_t* sym_node) /* in: function id node in the symbol + table */ +{ + sym_node->resolved = TRUE; + sym_node->token_type = SYM_FUNCTION; + + /* Check that the function exists. */ + ut_a(pars_info_get_user_func(pars_sym_tab_global->info, + sym_node->name)); + + return(sym_node); +} + +/************************************************************************* Parses a delete or update statement start. */ upd_node_t* @@ -1085,6 +1106,8 @@ pars_set_dfield_type( pars_res_word_t* type, /* in: pointer to a type token */ ulint len, /* in: length, or 0 */ + ibool is_unsigned, /* in: if TRUE, column is + UNSIGNED. */ ibool is_not_null) /* in: if TRUE, column is NOT NULL. */ { @@ -1094,48 +1117,30 @@ pars_set_dfield_type( flags |= DATA_NOT_NULL; } + if (is_unsigned) { + flags |= DATA_UNSIGNED; + } + if (type == &pars_int_token) { - if (len != 0) { - ut_error; - } + ut_a(len == 0); dtype_set(dfield_get_type(dfield), DATA_INT, flags, 4, 0); } else if (type == &pars_char_token) { - if (len != 0) { - ut_error; - } + ut_a(len == 0); dtype_set(dfield_get_type(dfield), DATA_VARCHAR, DATA_ENGLISH | flags, 0, 0); } else if (type == &pars_binary_token) { - if (len == 0) { - ut_error; - } + ut_a(len != 0); dtype_set(dfield_get_type(dfield), DATA_FIXBINARY, DATA_BINARY_TYPE | flags, len, 0); } else if (type == &pars_blob_token) { - if (len != 0) { - ut_error; - } + ut_a(len == 0); dtype_set(dfield_get_type(dfield), DATA_BLOB, DATA_BINARY_TYPE | flags, 0, 0); - } else if (type == &pars_binary_token) { - if (len == 0) { - ut_error; - } - - dtype_set(dfield_get_type(dfield), DATA_FIXBINARY, - DATA_BINARY_TYPE, len, 0); - } else if (type == &pars_blob_token) { - if (len != 0) { - ut_error; - } - - dtype_set(dfield_get_type(dfield), DATA_BLOB, - DATA_BINARY_TYPE, 0, 0); } else { ut_error; } @@ -1158,7 +1163,7 @@ pars_variable_declaration( node->param_type = PARS_NOT_PARAM; - pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE); + pars_set_dfield_type(que_node_get_val(node), type, 0, FALSE, FALSE); return(node); } @@ -1347,6 +1352,22 @@ pars_for_statement( } /************************************************************************* +Parses an exit statement. */ + +exit_node_t* +pars_exit_statement(void) +/*=====================*/ + /* out: exit statement node */ +{ + exit_node_t* node; + + node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(exit_node_t)); + node->common.type = QUE_NODE_EXIT; + + return(node); +} + +/************************************************************************* Parses a return-statement. */ return_node_t* @@ -1411,26 +1432,42 @@ pars_procedure_call( } /************************************************************************* -Parses a fetch statement. */ +Parses a fetch statement. into_list or user_func (but not both) must be +non-NULL. */ fetch_node_t* pars_fetch_statement( /*=================*/ /* out: fetch statement node */ sym_node_t* cursor, /* in: cursor node */ - sym_node_t* into_list) /* in: variables to set */ + sym_node_t* into_list, /* in: variables to set, or NULL */ + sym_node_t* user_func) /* in: user function name, or NULL */ { sym_node_t* cursor_decl; fetch_node_t* node; + /* Logical XOR. */ + ut_a(!into_list != !user_func); + node = mem_heap_alloc(pars_sym_tab_global->heap, sizeof(fetch_node_t)); node->common.type = QUE_NODE_FETCH; pars_resolve_exp_variables_and_types(NULL, cursor); - pars_resolve_exp_list_variables_and_types(NULL, into_list); - node->into_list = into_list; + if (into_list) { + pars_resolve_exp_list_variables_and_types(NULL, into_list); + node->into_list = into_list; + node->func = NULL; + } else { + pars_resolve_exp_variables_and_types(NULL, user_func); + + node->func = pars_info_get_user_func(pars_sym_tab_global->info, + user_func->name); + ut_a(node->func); + + node->into_list = NULL; + } cursor_decl = cursor->alias; @@ -1438,8 +1475,11 @@ pars_fetch_statement( node->cursor_def = cursor_decl->cursor_def; - ut_a(que_node_list_get_len(into_list) - == que_node_list_get_len(node->cursor_def->select_list)); + if (into_list) { + ut_a(que_node_list_get_len(into_list) + == que_node_list_get_len( + node->cursor_def->select_list)); + } return(node); } @@ -1529,6 +1569,8 @@ pars_column_def( pars_res_word_t* type, /* in: data type */ sym_node_t* len, /* in: length of column, or NULL */ + void* is_unsigned, /* in: if not NULL, column + is of type UNSIGNED. */ void* is_not_null) /* in: if not NULL, column is of type NOT NULL. */ { @@ -1541,7 +1583,7 @@ pars_column_def( } pars_set_dfield_type(que_node_get_val(sym_node), type, len2, - is_not_null != NULL); + is_unsigned != NULL, is_not_null != NULL); return(sym_node); } @@ -1798,6 +1840,7 @@ que_t* pars_sql( /*=====*/ /* out, own: the query graph */ + pars_info_t* info, /* in: extra information, or NULL */ const char* str) /* in: SQL string */ { sym_node_t* sym_node; @@ -1817,6 +1860,7 @@ pars_sql( pars_sym_tab_global->sql_string = mem_heap_strdup(heap, str); pars_sym_tab_global->string_len = strlen(str); pars_sym_tab_global->next_char_pos = 0; + pars_sym_tab_global->info = info; yyparse(); @@ -1831,6 +1875,7 @@ pars_sql( graph = pars_sym_tab_global->query_graph; graph->sym_tab = pars_sym_tab_global; + graph->info = info; /* fprintf(stderr, "SQL graph size %lu\n", mem_heap_get_size(heap)); */ @@ -1867,3 +1912,222 @@ pars_complete_graph_for_exec( return(thr); } + +/******************************************************************** +Create parser info struct.*/ + +pars_info_t* +pars_info_create(void) +/*==================*/ + /* out, own: info struct */ +{ + pars_info_t* info; + mem_heap_t* heap; + + heap = mem_heap_create(512); + + info = mem_heap_alloc(heap, sizeof(*info)); + + info->heap = heap; + info->funcs = NULL; + info->bound_lits = NULL; + info->graph_owns_us = TRUE; + + return(info); +} + +/******************************************************************** +Free info struct and everything it contains.*/ + +void +pars_info_free( +/*===========*/ + pars_info_t* info) /* in: info struct */ +{ + mem_heap_free(info->heap); +} + +/******************************************************************** +Add bound literal. */ + +void +pars_info_add_literal( +/*==================*/ + pars_info_t* info, /* in: info struct */ + const char* name, /* in: name */ + const void* address, /* in: address */ + ulint length, /* in: length of data */ + ulint type, /* in: type, e.g. DATA_FIXBINARY */ + ulint prtype) /* in: precise type, e.g. + DATA_UNSIGNED */ +{ + pars_bound_lit_t* pbl; + + ut_ad(!pars_info_get_bound_lit(info, name)); + + pbl = mem_heap_alloc(info->heap, sizeof(*pbl)); + + pbl->name = name; + pbl->address = address; + pbl->length = length; + pbl->type = type; + pbl->prtype = prtype; + + if (!info->bound_lits) { + info->bound_lits = ib_vector_create(info->heap, 8); + } + + ib_vector_push(info->bound_lits, pbl); +} + +/******************************************************************** +Equivalent to pars_info_add_literal(info, name, str, strlen(str), +DATA_VARCHAR, DATA_ENGLISH). */ + +void +pars_info_add_str_literal( +/*======================*/ + pars_info_t* info, /* in: info struct */ + const char* name, /* in: name */ + const char* str) /* in: string */ +{ + pars_info_add_literal(info, name, str, strlen(str), + DATA_VARCHAR, DATA_ENGLISH); +} + +/******************************************************************** +Equivalent to: + +char buf[4]; +mach_write_to_4(buf, val); +pars_info_add_literal(info, name, buf, 4, DATA_INT, 0); + +except that the buffer is dynamically allocated from the info struct's +heap. */ + +void +pars_info_add_int4_literal( +/*=======================*/ + pars_info_t* info, /* in: info struct */ + const char* name, /* in: name */ + lint val) /* in: value */ +{ + byte* buf = mem_heap_alloc(info->heap, 4); + + mach_write_to_4(buf, val); + pars_info_add_literal(info, name, buf, 4, DATA_INT, 0); +} + +/******************************************************************** +Equivalent to: + +char buf[8]; +mach_write_to_8(buf, val); +pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0); + +except that the buffer is dynamically allocated from the info struct's +heap. */ + +void +pars_info_add_dulint_literal( +/*=========================*/ + pars_info_t* info, /* in: info struct */ + const char* name, /* in: name */ + dulint val) /* in: value */ +{ + byte* buf = mem_heap_alloc(info->heap, 8); + + mach_write_to_8(buf, val); + + pars_info_add_literal(info, name, buf, 8, DATA_FIXBINARY, 0); +} + +/******************************************************************** +Add user function. */ + +void +pars_info_add_function( +/*===================*/ + pars_info_t* info, /* in: info struct */ + const char* name, /* in: function name */ + pars_user_func_cb_t func, /* in: function address */ + void* arg) /* in: user-supplied argument */ +{ + pars_user_func_t* puf; + + ut_ad(!pars_info_get_user_func(info, name)); + + puf = mem_heap_alloc(info->heap, sizeof(*puf)); + + puf->name = name; + puf->func = func; + puf->arg = arg; + + if (!info->funcs) { + info->funcs = ib_vector_create(info->heap, 8); + } + + ib_vector_push(info->funcs, puf); +} + +/******************************************************************** +Get user function with the given name.*/ + +pars_user_func_t* +pars_info_get_user_func( +/*====================*/ + /* out: user func, or NULL if not + found */ + pars_info_t* info, /* in: info struct */ + const char* name) /* in: function name to find*/ +{ + ulint i; + ib_vector_t* vec; + + if (!info || !info->funcs) { + return(NULL); + } + + vec = info->funcs; + + for (i = 0; i < ib_vector_size(vec); i++) { + pars_user_func_t* puf = ib_vector_get(vec, i); + + if (strcmp(puf->name, name) == 0) { + return(puf); + } + } + + return(NULL); +} + +/******************************************************************** +Get bound literal with the given name.*/ + +pars_bound_lit_t* +pars_info_get_bound_lit( +/*====================*/ + /* out: bound literal, or NULL if + not found */ + pars_info_t* info, /* in: info struct */ + const char* name) /* in: bound literal name to find */ +{ + ulint i; + ib_vector_t* vec; + + if (!info || !info->bound_lits) { + return(NULL); + } + + vec = info->bound_lits; + + for (i = 0; i < ib_vector_size(vec); i++) { + pars_bound_lit_t* pbl = ib_vector_get(vec, i); + + if (strcmp(pbl->name, name) == 0) { + return(pbl); + } + } + + return(NULL); +} diff --git a/storage/innobase/pars/pars0sym.c b/storage/innobase/pars/pars0sym.c index d8025998f9a..79a1e555b06 100644 --- a/storage/innobase/pars/pars0sym.c +++ b/storage/innobase/pars/pars0sym.c @@ -15,6 +15,7 @@ Created 12/15/1997 Heikki Tuuri #include "mem0mem.h" #include "data0type.h" #include "data0data.h" +#include "pars0grm.h" #include "pars0pars.h" #include "que0que.h" #include "eval0eval.h" @@ -166,6 +167,74 @@ sym_tab_add_str_lit( } /********************************************************************** +Add a bound literal to a symbol table. */ + +sym_node_t* +sym_tab_add_bound_lit( +/*==================*/ + /* out: symbol table node */ + sym_tab_t* sym_tab, /* in: symbol table */ + const char* name, /* in: name of bound literal */ + ulint* lit_type) /* out: type of literal (PARS_*_LIT) */ +{ + sym_node_t* node; + pars_bound_lit_t* blit; + ulint len = 0; + + blit = pars_info_get_bound_lit(sym_tab->info, name); + ut_a(blit); + + node = mem_heap_alloc(sym_tab->heap, sizeof(sym_node_t)); + + node->common.type = QUE_NODE_SYMBOL; + + node->resolved = TRUE; + node->token_type = SYM_LIT; + + node->indirection = NULL; + + switch (blit->type) { + case DATA_FIXBINARY: + len = blit->length; + *lit_type = PARS_FIXBINARY_LIT; + break; + + case DATA_BLOB: + *lit_type = PARS_BLOB_LIT; + break; + + case DATA_VARCHAR: + *lit_type = PARS_STR_LIT; + break; + + case DATA_INT: + ut_a(blit->length > 0); + ut_a(blit->length <= 8); + + len = blit->length; + *lit_type = PARS_INT_LIT; + break; + + default: + ut_error; + } + + dtype_set(&(node->common.val.type), blit->type, blit->prtype, len, 0); + + dfield_set_data(&(node->common.val), blit->address, blit->length); + + node->common.val_buf_size = 0; + node->prefetch_buf = NULL; + node->cursor_def = NULL; + + UT_LIST_ADD_LAST(sym_list, sym_tab->sym_list, node); + + node->sym_table = sym_tab; + + return(node); +} + +/********************************************************************** Adds an SQL null literal to a symbol table. */ sym_node_t* @@ -220,7 +289,7 @@ sym_tab_add_id( node->resolved = FALSE; node->indirection = NULL; - node->name = mem_heap_strdupl(sym_tab->heap, (char*) name, len + 1); + node->name = mem_heap_strdupl(sym_tab->heap, (char*) name, len); node->name_len = len; UT_LIST_ADD_LAST(sym_list, sym_tab->sym_list, node); |