Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-21043

Collect different bison %type declarations into a single chunk

    XMLWordPrintable

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.5.0
    • Parser
    • None

    Description

      Bison grammar files sql_yacc.yy and sql_yacc_ora.yy has a number of different %type declarations, which are distributed all around the file.
      In order to unify the two files easier, let's collect different declarations in a single chunk, like this:

      • in sql_yacc.cc:

        /* Start of sql_mode=DEFAULT specific declarations */
        %type <NONE> sp_tail
        %type <NONE> sp_unlabeled_block_not_atomic
        %type <NONE> sp_proc_stmt_in_returns_clause
        %type <lex_str> sp_label
        %type <spblock> sp_decl_handler
        %type <spblock> sp_decls
        %type <spblock> sp_decl
        %type <spblock> sp_decl_body
        %type <spblock> sp_decl_variable_list
        /* End of sql_mode=DEFAULT specific declarations */
        

      • in sql_yacc_ora.yy:

        /* Start of sql_mode=ORACLE specific declarations */
        %type <NONE> set_assign
        %type <NONE> sp_tail_standalone
        %type <NONE> sp_labelable_stmt
        %type <simple_string> remember_end_opt
        %type <lex_str> opt_package_routine_end_name
        %type <lex_str> label_declaration_oracle
        %type <lex_str> labels_declaration_oracle
        %type <kwd> keyword_directly_assignable
        %type <ident_sys> ident_directly_assignable
        %type <ident_cli> ident_cli_directly_assignable
        %type <spname> opt_sp_name
        %type <spblock> sp_decl_body_list
        %type <spblock> opt_sp_decl_body_list
        %type <spblock> sp_decl_vars
        %type <spblock> sp_decl_non_handler
        %type <spblock> sp_decl_non_handler_list
        %type <spblock> sp_decl_handler
        %type <spblock> sp_decl_handler_list
        %type <spblock> opt_sp_decl_handler_list
        %type <spblock> package_implementation_routine_definition
        %type <spblock> package_implementation_item_declaration
        %type <spblock> package_implementation_declare_section
        %type <spblock> package_implementation_declare_section_list1
        %type <spblock> package_implementation_declare_section_list2
        %type <spblock_handlers> sp_block_statements_and_exceptions
        %type <spblock_handlers> package_implementation_executable_section
        %type <sp_instr_addr> sp_instr_addr
        %type <num> opt_exception_clause exception_handlers
        %type <lex> remember_lex
        %type <lex> package_routine_lex
        %type <lex> package_specification_function
        %type <lex> package_specification_procedure
        /* End of sql_mode=ORACLE specific declarations */
        

      so that later we can cut the sql_mode=DEFAULT specific block and replace it to the sql_mode=ORACLE specific block.

      Attachments

        Issue Links

          Activity

            People

              bar Alexander Barkov
              bar Alexander Barkov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.