sql_lex.yy / sql_yacc_ora.yy refactoring for MDEV-10411.
1. Adding const qualifiers into a few method parameters. 2. Adding methods: - sp_label::block_label_declare() - LEX::sp_block_init() - LEX::sp_block_finalize() to share more code between the files sql_yacc.yy and sql_yacc_ora.yy, as well as between the rules sp_labeled_block, sp_unlabeled_block, sp_unlabeled_block_not_atomic. 3. sql_yacc.yy, sql_yacc_ora.yy changes: - Removing sp_block_content - Reorganizing the grammar so the rules sp_labeled_block, sp_unlabeled_block, sp_unlabeled_block_not_atomic now contain both BEGIN_SYM and END keywords. Previously, BEGIN_SYM and END resided in different rules. This change makes the grammar easier to read, as well as simplifies adding Oracle-style DECLARE section (coming soon): DECLARE .. BEGIN .. END; Good side effects: - SP block related grammar does not use Lex->name any more. - The "splabel" member was removed from %union
Showing
Please register or sign in to comment