diff --git a/.github/workflows/ci-tests-runner.yml b/.github/workflows/ci-tests-runner.yml index 64c4dd8..c3efa55 100644 --- a/.github/workflows/ci-tests-runner.yml +++ b/.github/workflows/ci-tests-runner.yml @@ -32,7 +32,7 @@ jobs: needs: [flake8_py3] strategy: matrix: - python: [3.7, 3.8, 3.9, '3.10', '3.11'] + python: [3.7, 3.8, 3.9, '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@v2 - name: Set up Python diff --git a/pyproject.toml b/pyproject.toml index e11bc01..e4b55a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,6 +15,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Software Development", "Topic :: Software Development :: Libraries", "Topic :: Utilities", diff --git a/simple_ddl_parser/parsetab.py b/simple_ddl_parser/parsetab.py index 8600ecd..7e26019 100644 --- a/simple_ddl_parser/parsetab.py +++ b/simple_ddl_parser/parsetab.py @@ -5,7 +5,7 @@ _lr_method = "LALR" -_lr_signature = "ADD ALTER ARRAY AS AUTOINCREMENT BY CACHE CHANGE_TRACKING CHECK CLONE CLUSTER CLUSTERED COLLATE COLLECTION COMMA COMMAT COMMENT CONSTRAINT CREATE DATABASE DATA_RETENTION_TIME_IN_DAYS DEFAULT DEFERRABLE DELETE DOMAIN DOT DQ_STRING DROP ENCODE ENCRYPT ENFORCED EXISTS FOR FOREIGN FORMAT GENERATED ID IF INCREMENT INDEX INHERITS INITIALLY INTO ITEMS KEY KEYS LIKE LOCATION LP LT MAP MASKED MASKING MAXVALUE MAX_DATA_EXTENSION_TIME_IN_DAYS MINVALUE NO NOT NULL ON OPTIONS OR PARTITION PARTITIONED POLICY PRIMARY REFERENCES REPLACE ROW RP RT SALT SCHEMA SEQUENCE SERDE SERDEPROPERTIES SKEWED START STORAGE STORED STRING_BASE TABLE TABLESPACE TAG TBLPROPERTIES TERMINATED TEXTIMAGE_ON TYPE UNIQUE UPDATE USING WITHexpr : expr multiple_optionsexpr : expr INDEX id idexpr : expr id LP id RPexpr : expr usingexpr : expr LOCATION STRING\n | expr LOCATION DQ_STRINGpkey_constraint : constraint pkey_statement id LP index_pid RP\n | constraint pkey_statement LP index_pid RP\n | pkey_constraint with\n | pkey_constraint with ON id\n on_update : ON UPDATE id\n | ON UPDATE STRING\n | ON UPDATE f_call\n encrypt : ENCRYPT\n | encrypt NO SALT\n | encrypt SALT\n | encrypt USING STRING\n | encrypt STRING\n expr : expr INHERITS LP t_name RPmultiple_options : options\n | multiple_options options\n clone : CLONE idusing : USING idencode : ENCODE idexpr : expr ID ON LP pid RP\n | expr ID by_smthgexpr : expr CLUSTER BY LP pid RP\n | expr CLUSTER BY pid\n expr : expr PARTITION BY LP pid RP\n | expr PARTITION BY id LP pid RP\n | expr PARTITION BY pid\n | expr PARTITION BY id pidexpr : expr id id\n | expr id KEY\n options : OPTIONS LP id_equals RPtable_property_equals : id id id_or_string\n | id id_or_string\n expr : expr INTO ID IDwith : WITH with_argsexpr : expr id id LP pid RPtable_property_equals_bool : id id id_or_string\n | id id_or_string\n row_format : ROW FORMAT SERDE\n | ROW FORMAT\n expr : expr database_baseequals : id id id\n | id id ON\n | id id id DOT id\n storage : STORAGE LP\n | storage id id\n | storage id id RP\n expr : expr row_format id\n | expr row_format STRING\n database_base : CREATE DATABASE id\n | CREATE ID DATABASE id\n | database_base clone\n expr : expr DATA_RETENTION_TIME_IN_DAYS table_property_equalswith_args : LP equals\n | with_args COMMA equals\n | with_args with_args\n | with_args RP\n expr : expr MAX_DATA_EXTENSION_TIME_IN_DAYS table_property_equalsexpr : expr storageexpr : expr WITH SERDEPROPERTIES multi_assignmentsexpr : expr CHANGE_TRACKING table_property_equals_boolexpr : expr ID INDEXexpr : expr option_commentexpr : expr TBLPROPERTIES multi_assignmentsperiod_for : id FOR id LP pid RPexpr : expr option_with_tagmulti_assignments : LP assignment\n | multi_assignments RP\n | multi_assignments COMMA assignmentexpr : expr ON idexpr : expr withoption_comment : ID STRING\n | ID DQ_STRING\n | COMMENT ID STRING\n | COMMENT ID DQ_STRING\n assignment : id id id\n | STRING id STRING\n | id id STRING\n | STRING id id\n | STRING idexpr : expr TEXTIMAGE_ON idtag_equals : id id id_or_string\n | id id_or_string\n | id DOT id id id_or_string\n | id DOT id id_or_string\n | id DOT id DOT id id id_or_string\n | id DOT id DOT id id_or_string\n expr : CREATE TABLESPACE id properties\n | CREATE id TABLESPACE id properties\n | CREATE id TABLESPACE id\n | CREATE TABLESPACE id\n | CREATE id id TABLESPACE id\n | CREATE id id TABLESPACE id properties\n expr : expr COMMENT STRINGmultiple_tag_equals : tag_equals\n | multiple_tag_equals COMMA tag_equals\n expr : expr id TERMINATED BY id\n | expr id TERMINATED BY STRING\n properties : property\n | properties propertyexpr : expr MAP KEYS TERMINATED BY id\n | expr MAP KEYS TERMINATED BY STRING\n option_with_tag : TAG LP id RP\n | TAG LP id DOT id DOT id RP\n | TAG LP multiple_tag_equals RP\n | WITH TAG LP id RP\n | WITH TAG LP multiple_tag_equals RP\n property : id id\n | id STRING\n | id ON\n | id STORAGE\n | id ROW\n expr : expr SKEWED BY LP id RP ON LP pid RPoption_with_masking_policy : MASKING POLICY id DOT id DOT id\n | WITH MASKING POLICY id DOT id DOT id\n expr : expr COLLECTION ITEMS TERMINATED BY id\n | expr COLLECTION ITEMS TERMINATED BY STRING\n expr : expr STORED AS id\n | expr STORED AS id STRING\n | expr STORED AS id STRING id STRING\n create_table : CREATE TABLE IF NOT EXISTS\n | CREATE TABLE\n | CREATE OR REPLACE TABLE IF NOT EXISTS\n | CREATE OR REPLACE TABLE\n | CREATE id TABLE IF NOT EXISTS\n | CREATE id TABLE\n | CREATE OR REPLACE id TABLE IF NOT EXISTS\n | CREATE OR REPLACE id TABLE\n\n expr : expr PARTITIONED BY pid_with_type\n | expr PARTITIONED BY LP pid RP\n | expr PARTITIONED BY LP multiple_funct RP\n pid_with_type : LP column\n | pid_with_type COMMA column\n | pid_with_type RP\n c_property : id idc_type : id\n | id id\n | id id id id\n | id id id\n | c_type pid\n | id DOT id\n | tid\n | ARRAY\n | c_type ARRAY\n | c_type tid\n id : ID\n | DQ_STRINGid_or_string : id\n | STRINGSTRING : STRING_BASE\n | STRING STRING_BASE\n column : id c_type\n | column comment\n | column LP id RP\n | column LP id id RP\n | column LP id RP c_type\n | column LP id COMMA id RP\n | column LP id COMMA id RP c_type\n autoincrement : AUTOINCREMENTdefcolumn : column\n | defcolumn comment\n | defcolumn null\n | defcolumn encode\n | defcolumn PRIMARY KEY\n | defcolumn UNIQUE KEY\n | defcolumn UNIQUE\n | defcolumn check_ex\n | defcolumn default\n | defcolumn collate\n | defcolumn enforced\n | defcolumn ref\n | defcolumn foreign ref\n | defcolumn encrypt\n | defcolumn generated\n | defcolumn c_property\n | defcolumn on_update\n | defcolumn options\n | defcolumn autoincrement\n | defcolumn option_with_tag\n | defcolumn option_with_masking_policy\n check_ex : check_st\n | constraint check_st\n expr : create_schema\n | create_database\n | expr id\n | expr clone\n c_schema : CREATE SCHEMA\n | CREATE ID SCHEMAcreate_schema : c_schema id id\n | c_schema id id id\n | c_schema id\n | c_schema id DOT id\n | c_schema id option_comment\n | c_schema id DOT id option_comment\n | c_schema IF NOT EXISTS id\n | c_schema IF NOT EXISTS id DOT id\n | create_schema id id id\n | create_schema id id STRING\n | create_schema options\n create_database : database_base\n | create_database id id id\n | create_database id id STRING\n | create_database options\n expr : DROP TABLE id\n | DROP TABLE id DOT id\n multiple_column_names : column\n | multiple_column_names COMMA\n | multiple_column_names column\n type_definition : type_name id LP pid RP\n | type_name id LP multiple_column_names RP\n | type_name LP id_equals RP\n | type_name TABLE LP defcolumn\n | type_definition COMMA defcolumn\n | type_definition RP\n expr : type_definitiontype_name : type_create id AS\n | type_create id DOT id AS\n | type_create id DOT id\n | type_create id\n type_create : CREATE TYPE\n | CREATE OR REPLACE TYPE\n expr : domain_name id LP pid RPdomain_name : CREATE DOMAIN id AS\n | CREATE DOMAIN id DOT id AS\n | CREATE DOMAIN id DOT id\n | CREATE DOMAIN id\n id_equals : id id id_or_string\n | id id_or_string\n | id_equals COMMA\n | id_equals COMMA id id id_or_string\n | id\n | id_equals LP pid RP\n | id_equals LP pid RP id\n | id_equals COMMA id id\n | id_equals COMMA id\n expr : index_table_name LP index_pid RPindex_table_name : create_index ON id\n | create_index ON id DOT id\n create_index : CREATE INDEX id\n | CREATE UNIQUE INDEX id\n | create_index ON id\n | CREATE CLUSTERED INDEX id\n expr : table_name defcolumn\n | table_name LP defcolumn\n | table_name\n | expr COMMA defcolumn\n | expr COMMA\n | expr COMMA constraint\n | expr COMMA check_ex\n | expr COMMA foreign\n | expr COMMA pkey\n | expr COMMA uniq\n | expr COMMA statem_by_id\n | expr COMMA constraint uniq\n | expr COMMA period_for\n | expr COMMA pkey_constraint\n | expr COMMA constraint pkey\n | expr COMMA constraint pkey enforced\n | expr COMMA constraint foreign ref\n | expr COMMA foreign ref\n | expr encode\n | expr DEFAULT id id id\n | expr RP\n likke : LIKE\n | CLONE\n expr : table_name likke id\n | table_name likke id DOT id\n | table_name LP likke id DOT id RP\n | table_name LP likke id RP\n t_name : id DOT id\n | id\n | id DOT id DOT id\n table_name : create_table t_name\n | table_name likke id\n expr : seq_name\n | expr INCREMENT id\n | expr INCREMENT id id\n | expr START id\n | expr START id id\n | expr MINVALUE id\n | expr NO MINVALUE\n | expr NO MAXVALUE\n | expr MAXVALUE id\n | expr CACHE id\n | expr CACHE\n seq_name : create_seq id DOT id\n | create_seq id\n create_seq : CREATE SEQUENCE IF NOT EXISTS\n | CREATE SEQUENCE\n\n tid : LT id\n | LT\n | tid LT\n | tid id\n | tid COMMAT\n | tid RT\n null : NULL\n | NOT NULL\n f_call : id LP RP\n | id LP f_call RP\n | id LP multi_id RP\n | id LP pid RP\n multi_id : id\n | multi_id id\n | f_call\n | multi_id f_call\n funct_args : LP multi_id RPfunct : id LP multi_id RPmultiple_funct : funct\n | multiple_funct COMMA funct\n | multiple_funct COMMA\n funct_expr : LP multi_id RP\n | multi_id\n dot_id : id DOT iddefault : DEFAULT id\n | DEFAULT STRING\n | DEFAULT NULL\n | default FOR dot_id\n | DEFAULT funct_expr\n | DEFAULT LP pid RP\n | DEFAULT LP funct_expr pid RP\n | default id\n | default LP RP\n enforced : ENFORCED\n | NOT ENFORCED\n collate : COLLATE id\n | COLLATE STRING\n \n constraint : CONSTRAINT id\n \n generated : gen_always funct_expr\n | gen_always funct_expr id\n | gen_always LP multi_id RP\n | gen_always f_call\n \n gen_always : GENERATED id AS\n check_st : CHECK LP id\n | check_st id\n | check_st STRING\n | check_st id STRING\n | check_st id RP\n | check_st STRING RP\n | check_st funct_args\n | check_st LP pid RP\n using_tablespace : USING INDEX tablespaceexpr : alter_foreign ref\n | alter_check\n | alter_unique\n | alter_default\n | alter_primary_key\n | alter_primary_key using_tablespace\n alter_primary_key : alt_table PRIMARY KEY LP pid RP\n | alt_table constraint PRIMARY KEY LP pid RP\n alter_unique : alt_table UNIQUE LP pid RP\n | alt_table constraint UNIQUE LP pid RP\n alter_default : alt_table id id\n | alt_table constraint id id\n | alt_table id STRING\n | alt_table constraint id STRING\n | alter_default id\n | alter_default FOR pid\n pid : id\n | STRING\n | pid id\n | pid STRING\n | STRING LP RP\n | id LP RP\n | pid COMMA id\n | pid COMMA STRING\n alter_check : alt_table check_st\n | alt_table constraint check_st\n index_pid : id\n | index_pid id\n | index_pid COMMA index_pid\n alter_foreign : alt_table foreign\n | alt_table constraint foreign\n alt_table : ALTER TABLE t_name ADD\n | ALTER TABLE IF EXISTS t_name ADD\n | ALTER TABLE ID t_name ADDforeign : FOREIGN KEY LP pid RP\n | FOREIGN KEYref : REFERENCES t_name\n | ref LP pid RP\n | ref ON DELETE id\n | ref ON UPDATE id\n | ref DEFERRABLE INITIALLY id\n | ref NOT DEFERRABLE\n expr : pkeyuniq : UNIQUE LP pid RPstatem_by_id : id LP pid RP\n | id KEY LP pid RP\n pkey : pkey_statement LP pid RP\n | pkey_statement ID LP pid RP\n pkey_statement : PRIMARY KEYcomment : COMMENT STRINGtablespace : TABLESPACE id\n | TABLESPACE id properties\n expr : expr tablespaceby_smthg : BY id\n | BY ROW\n | BY LP pid RP\n " +_lr_signature = "ADD ALTER ARRAY AS AUTOINCREMENT BY CACHE CHANGE_TRACKING CHECK CLONE CLUSTER CLUSTERED COLLATE COLLECTION COMMA COMMAT COMMENT CONSTRAINT CREATE DATABASE DATA_RETENTION_TIME_IN_DAYS DEFAULT DEFERRABLE DELETE DOMAIN DOT DQ_STRING DROP ENCODE ENCRYPT ENFORCED EXISTS FOR FOREIGN FORMAT GENERATED ID IF INCREMENT INDEX INHERITS INITIALLY INTO ITEMS KEY KEYS LIKE LOCATION LP LT MAP MASKED MASKING MAXVALUE MAX_DATA_EXTENSION_TIME_IN_DAYS MINVALUE NO NOT NULL ON OPTIONS OR PARTITION PARTITIONED POLICY PRIMARY REFERENCES REPLACE ROW RP RT SALT SCHEMA SEQUENCE SERDE SERDEPROPERTIES SKEWED START STORAGE STORED STRING_BASE TABLE TABLESPACE TAG TBLPROPERTIES TERMINATED TEXTIMAGE_ON TYPE UNIQUE UPDATE USING WITHexpr : expr multiple_optionsexpr : expr INDEX id idexpr : expr id LP id RPexpr : expr usingexpr : expr LOCATION STRING\n | expr LOCATION DQ_STRINGpkey_constraint : constraint pkey_statement id LP index_pid RP\n | constraint pkey_statement LP index_pid RP\n | pkey_constraint with\n | pkey_constraint with ON id\n on_update : ON UPDATE id\n | ON UPDATE STRING\n | ON UPDATE f_call\n encrypt : ENCRYPT\n | encrypt NO SALT\n | encrypt SALT\n | encrypt USING STRING\n | encrypt STRING\n expr : expr INHERITS LP t_name RPmultiple_options : options\n | multiple_options options\n clone : CLONE idusing : USING idencode : ENCODE idexpr : expr ID ON LP pid RP\n | expr ID by_smthgexpr : expr CLUSTER BY LP pid RP\n | expr CLUSTER BY pid\n expr : expr PARTITION BY LP pid RP\n | expr PARTITION BY id LP pid RP\n | expr PARTITION BY pid\n | expr PARTITION BY id pidexpr : expr id id\n | expr id KEY\n options : OPTIONS LP id_equals RPtable_property_equals : id id id_or_string\n | id id_or_string\n expr : expr INTO ID IDwith : WITH with_argsexpr : expr id id LP pid RPtable_property_equals_bool : id id id_or_string\n | id id_or_string\n row_format : ROW FORMAT SERDE\n | ROW FORMAT\n expr : expr database_baseequals : id id id\n | id id ON\n | id id id DOT id\n storage : STORAGE LP\n | storage id id\n | storage id id RP\n expr : expr row_format id\n | expr row_format STRING\n database_base : CREATE DATABASE id\n | CREATE ID DATABASE id\n | database_base clone\n expr : expr DATA_RETENTION_TIME_IN_DAYS table_property_equalswith_args : LP equals\n | with_args COMMA equals\n | with_args with_args\n | with_args RP\n expr : expr MAX_DATA_EXTENSION_TIME_IN_DAYS table_property_equalsexpr : expr storageexpr : expr WITH SERDEPROPERTIES multi_assignmentsexpr : expr CHANGE_TRACKING table_property_equals_boolexpr : expr ID INDEXexpr : expr option_commentexpr : expr TBLPROPERTIES multi_assignmentsperiod_for : id FOR id LP pid RPexpr : expr option_with_tagmulti_assignments : LP assignment\n | multi_assignments RP\n | multi_assignments COMMA assignmentexpr : expr ON idexpr : expr withoption_comment : ID STRING\n | ID DQ_STRING\n | COMMENT ID STRING\n | COMMENT ID DQ_STRING\n assignment : id id id\n | STRING id STRING\n | id id STRING\n | STRING id id\n | STRING idexpr : expr TEXTIMAGE_ON idtag_equals : id id id_or_string\n | id id_or_string\n | id DOT id id id_or_string\n | id DOT id id_or_string\n | id DOT id DOT id id id_or_string\n | id DOT id DOT id id_or_string\n expr : CREATE TABLESPACE id properties\n | CREATE id TABLESPACE id properties\n | CREATE id TABLESPACE id\n | CREATE TABLESPACE id\n | CREATE id id TABLESPACE id\n | CREATE id id TABLESPACE id properties\n expr : expr COMMENT STRINGmultiple_tag_equals : tag_equals\n | multiple_tag_equals COMMA tag_equals\n expr : expr id TERMINATED BY id\n | expr id TERMINATED BY STRING\n properties : property\n | properties propertyexpr : expr MAP KEYS TERMINATED BY id\n | expr MAP KEYS TERMINATED BY STRING\n option_with_tag : TAG LP id RP\n | TAG LP id DOT id DOT id RP\n | TAG LP multiple_tag_equals RP\n | WITH TAG LP id RP\n | WITH TAG LP multiple_tag_equals RP\n property : id id\n | id STRING\n | id ON\n | id STORAGE\n | id ROW\n expr : expr SKEWED BY LP id RP ON LP pid RPoption_with_masking_policy : MASKING POLICY id DOT id DOT id\n | WITH MASKING POLICY id DOT id DOT id\n expr : expr COLLECTION ITEMS TERMINATED BY id\n | expr COLLECTION ITEMS TERMINATED BY STRING\n expr : expr STORED AS id\n | expr STORED AS id STRING\n | expr STORED AS id STRING id STRING\n create_table : CREATE TABLE IF NOT EXISTS\n | CREATE TABLE\n | CREATE OR REPLACE TABLE IF NOT EXISTS\n | CREATE OR REPLACE TABLE\n | CREATE id TABLE IF NOT EXISTS\n | CREATE id TABLE\n | CREATE OR REPLACE id TABLE IF NOT EXISTS\n | CREATE OR REPLACE id TABLE\n\n expr : expr PARTITIONED BY pid_with_type\n | expr PARTITIONED BY LP pid RP\n | expr PARTITIONED BY LP multiple_funct RP\n pid_with_type : LP column\n | pid_with_type COMMA column\n | pid_with_type RP\n c_property : id idc_type : id\n | id id\n | id id id id\n | id id id\n | c_type pid\n | id DOT id\n | tid\n | ARRAY\n | c_type ARRAY\n | c_type tid\n id : ID\n | DQ_STRINGid_or_string : id\n | STRINGSTRING : STRING_BASE\n | STRING STRING_BASE\n column : id c_type\n | column comment\n | column LP id RP\n | column LP id id RP\n | column LP id RP c_type\n | column LP id COMMA id RP\n | column LP id COMMA id RP c_type\n autoincrement : AUTOINCREMENTdefcolumn : column\n | defcolumn comment\n | defcolumn null\n | defcolumn encode\n | defcolumn PRIMARY KEY\n | defcolumn UNIQUE KEY\n | defcolumn UNIQUE\n | defcolumn check_ex\n | defcolumn default\n | defcolumn collate\n | defcolumn enforced\n | defcolumn ref\n | defcolumn foreign ref\n | defcolumn encrypt\n | defcolumn generated\n | defcolumn c_property\n | defcolumn on_update\n | defcolumn options\n | defcolumn autoincrement\n | defcolumn option_with_tag\n | defcolumn option_with_masking_policy\n check_ex : check_st\n | constraint check_st\n expr : create_schema\n | create_database\n | expr id\n | expr clone\n c_schema : CREATE SCHEMA\n | CREATE ID SCHEMAcreate_schema : c_schema id id\n | c_schema id id id\n | c_schema id\n | c_schema id DOT id\n | c_schema id option_comment\n | c_schema id DOT id option_comment\n | c_schema IF NOT EXISTS id\n | c_schema IF NOT EXISTS id DOT id\n | create_schema id id id\n | create_schema id id STRING\n | create_schema options\n create_database : database_base\n | create_database id id id\n | create_database id id STRING\n | create_database options\n expr : DROP TABLE id\n | DROP TABLE id DOT id\n multiple_column_names : column\n | multiple_column_names COMMA\n | multiple_column_names column\n type_definition : type_name id LP pid RP\n | type_name id LP multiple_column_names RP\n | type_name LP id_equals RP\n | type_name TABLE LP defcolumn\n | type_definition COMMA defcolumn\n | type_definition RP\n expr : type_definitiontype_name : type_create id AS\n | type_create id DOT id AS\n | type_create id DOT id\n | type_create id\n type_create : CREATE TYPE\n | CREATE OR REPLACE TYPE\n expr : domain_name id LP pid RPdomain_name : CREATE DOMAIN id AS\n | CREATE DOMAIN id DOT id AS\n | CREATE DOMAIN id DOT id\n | CREATE DOMAIN id\n id_equals : id id id_or_string\n | id id_or_string\n | id_equals COMMA\n | id_equals COMMA id id id_or_string\n | id\n | id_equals LP pid RP\n | id_equals LP pid RP id\n | id_equals COMMA id id\n | id_equals COMMA id\n expr : index_table_name LP index_pid RPindex_table_name : create_index ON id\n | create_index ON id DOT id\n create_index : CREATE INDEX id\n | CREATE UNIQUE INDEX id\n | create_index ON id\n | CREATE CLUSTERED INDEX id\n expr : table_name defcolumn\n | table_name LP defcolumn\n | table_name\n | expr COMMA defcolumn\n | expr COMMA\n | expr COMMA constraint\n | expr COMMA check_ex\n | expr COMMA foreign\n | expr COMMA pkey\n | expr COMMA uniq\n | expr COMMA statem_by_id\n | expr COMMA constraint uniq\n | expr COMMA period_for\n | expr COMMA pkey_constraint\n | expr COMMA constraint pkey\n | expr COMMA constraint pkey enforced\n | expr COMMA constraint foreign ref\n | expr COMMA foreign ref\n | expr encode\n | expr DEFAULT id id id\n | expr RP\n likke : LIKE\n | CLONE\n expr : table_name likke id\n | table_name likke id DOT id\n | table_name LP likke id DOT id RP\n | table_name LP likke id RP\n t_name : id DOT id\n | id\n | id DOT id DOT id\n table_name : create_table t_name\n | table_name likke id\n expr : seq_name\n | expr INCREMENT id\n | expr INCREMENT id id\n | expr START id\n | expr START id id\n | expr MINVALUE id\n | expr NO MINVALUE\n | expr NO MAXVALUE\n | expr MAXVALUE id\n | expr CACHE id\n | expr CACHE\n seq_name : create_seq id DOT id\n | create_seq id\n create_seq : CREATE SEQUENCE IF NOT EXISTS\n | CREATE SEQUENCE\n\n tid : LT id\n | LT\n | tid LT\n | tid id\n | tid COMMAT\n | tid RT\n null : NULL\n | NOT NULL\n f_call : id LP RP\n | id LP f_call RP\n | id LP multi_id RP\n | id LP pid RP\n multi_id : id\n | multi_id id\n | f_call\n | multi_id f_call\n funct_args : LP multi_id RPfunct : id LP multi_id RPmultiple_funct : funct\n | multiple_funct COMMA funct\n | multiple_funct COMMA\n funct_expr : LP multi_id RP\n | multi_id\n dot_id : id DOT iddefault : DEFAULT id\n | DEFAULT STRING\n | DEFAULT NULL\n | default FOR dot_id\n | DEFAULT funct_expr\n | DEFAULT LP pid RP\n | DEFAULT LP funct_expr pid RP\n | default id\n | default LP RP\n enforced : ENFORCED\n | NOT ENFORCED\n collate : COLLATE id\n | COLLATE STRING\n \n constraint : CONSTRAINT id\n \n generated : gen_always funct_expr\n | gen_always funct_expr id\n | gen_always LP multi_id RP\n | gen_always f_call\n \n gen_always : GENERATED id AS\n check_st : CHECK LP id\n | check_st id\n | check_st STRING\n | check_st id STRING\n | check_st id RP\n | check_st STRING RP\n | check_st funct_args\n | check_st LP pid RP\n using_tablespace : USING INDEX tablespaceexpr : alter_foreign ref\n | alter_check\n | alter_unique\n | alter_default\n | alter_primary_key\n | alter_primary_key using_tablespace\n alter_primary_key : alt_table PRIMARY KEY LP pid RP\n | alt_table constraint PRIMARY KEY LP pid RP\n alter_unique : alt_table UNIQUE LP pid RP\n | alt_table constraint UNIQUE LP pid RP\n alter_default : alt_table id id\n | alt_table constraint id id\n | alt_table id STRING\n | alt_table constraint id STRING\n | alter_default id\n | alter_default FOR pid\n pid : id\n | STRING\n | pid id\n | pid STRING\n | STRING LP RP\n | id LP RP\n | pid COMMA id\n | pid COMMA STRING\n alter_check : alt_table check_st\n | alt_table constraint check_st\n index_pid : id\n | index_pid id\n | index_pid COMMA index_pid\n alter_foreign : alt_table foreign\n | alt_table constraint foreign\n alt_table : ALTER TABLE t_name ADD\n | ALTER TABLE IF EXISTS t_name ADD\n | ALTER TABLE ID t_name ADDforeign : FOREIGN KEY LP pid RP\n | FOREIGN KEYref : REFERENCES t_name\n | ref LP pid RP\n | ref ON DELETE id\n | ref ON UPDATE id\n | ref DEFERRABLE INITIALLY id\n | ref NOT DEFERRABLE\n expr : pkeyuniq : UNIQUE LP pid RPstatem_by_id : id LP pid RP\n | id KEY LP pid RP\n pkey : pkey_statement LP pid RP\n | pkey_statement ID LP pid RP\n pkey_statement : PRIMARY KEYcomment : COMMENT STRINGtablespace : TABLESPACE id\n | TABLESPACE id properties\n expr : expr tablespaceby_smthg : BY id\n | BY ROW\n | BY LP pid RP\n " _lr_action_items = { "CREATE": ( @@ -37186,19 +37186,19 @@ ("c_type -> ARRAY", "c_type", 1, "p_c_type", "sql.py", 198), ("c_type -> c_type ARRAY", "c_type", 2, "p_c_type", "sql.py", 199), ("c_type -> c_type tid", "c_type", 2, "p_c_type", "sql.py", 200), - ("id -> ID", "id", 1, "p_id", "ddl_parser.py", 231), - ("id -> DQ_STRING", "id", 1, "p_id", "ddl_parser.py", 232), - ("id_or_string -> id", "id_or_string", 1, "p_id_or_string", "ddl_parser.py", 244), + ("id -> ID", "id", 1, "p_id", "ddl_parser.py", 230), + ("id -> DQ_STRING", "id", 1, "p_id", "ddl_parser.py", 231), + ("id_or_string -> id", "id_or_string", 1, "p_id_or_string", "ddl_parser.py", 242), ( "id_or_string -> STRING", "id_or_string", 1, "p_id_or_string", "ddl_parser.py", - 245, + 243, ), - ("STRING -> STRING_BASE", "STRING", 1, "p_string", "ddl_parser.py", 249), - ("STRING -> STRING STRING_BASE", "STRING", 2, "p_string", "ddl_parser.py", 250), + ("STRING -> STRING_BASE", "STRING", 1, "p_string", "ddl_parser.py", 247), + ("STRING -> STRING STRING_BASE", "STRING", 2, "p_string", "ddl_parser.py", 248), ("column -> id c_type", "column", 2, "p_column", "sql.py", 310), ("column -> column comment", "column", 2, "p_column", "sql.py", 311), ("column -> column LP id RP", "column", 4, "p_column", "sql.py", 312),