Skip to content

Commit 51e7f67

Browse files
committed
refactor: remove unused rules
1 parent 3b439c1 commit 51e7f67

1 file changed

Lines changed: 1 addition & 121 deletions

File tree

plsql/PlSqlParser.g4

Lines changed: 1 addition & 121 deletions
Original file line numberDiff line numberDiff line change
@@ -338,14 +338,6 @@ diskgroup_attributes
338338
: SET ATTRIBUTE CHAR_STRING EQUALS_OP CHAR_STRING
339339
;
340340

341-
modify_diskgroup_file
342-
: MODIFY FILE CHAR_STRING ATTRIBUTE LEFT_PAREN disk_region_clause RIGHT_PAREN (COMMA CHAR_STRING ATTRIBUTE LEFT_PAREN disk_region_clause RIGHT_PAREN)*
343-
;
344-
345-
disk_region_clause
346-
:
347-
;
348-
349341
drop_diskgroup_file_clause
350342
: DROP FILE filename (COMMA filename)*
351343
;
@@ -786,21 +778,6 @@ trigger_body
786778
| trigger_block
787779
;
788780

789-
routine_clause
790-
: routine_name function_argument?
791-
;
792-
793-
compound_trigger_block
794-
: COMPOUND TRIGGER seq_of_declare_specs? timing_point_section+ END trigger_name
795-
;
796-
797-
timing_point_section
798-
: bk=BEFORE STATEMENT IS trigger_block BEFORE STATEMENT SEMICOLON
799-
| bk=BEFORE EACH ROW IS trigger_block BEFORE EACH ROW SEMICOLON
800-
| ak=AFTER STATEMENT IS trigger_block AFTER STATEMENT SEMICOLON
801-
| ak=AFTER EACH ROW IS trigger_block AFTER EACH ROW SEMICOLON
802-
;
803-
804781
non_dml_event
805782
: ALTER
806783
| ANALYZE
@@ -884,14 +861,6 @@ alter_method_element
884861
: (ADD | DROP) (map_order_function_spec | subprogram_spec)
885862
;
886863

887-
alter_attribute_definition
888-
: (ADD | MODIFY | DROP) ATTRIBUTE (attribute_definition | LEFT_PAREN attribute_definition (COMMA attribute_definition)* RIGHT_PAREN)
889-
;
890-
891-
attribute_definition
892-
: attribute_name type_spec?
893-
;
894-
895864
alter_collection_clauses
896865
: MODIFY (LIMIT expression | ELEMENT TYPE type_spec)
897866
;
@@ -3041,22 +3010,6 @@ datetime_expr
30413010
: expression
30423011
;
30433012

3044-
// Should bound this to just interval expr
3045-
interval_expr
3046-
: expression
3047-
;
3048-
3049-
synchronous_or_asynchronous
3050-
: SYNCHRONOUS
3051-
| ASYNCHRONOUS
3052-
;
3053-
3054-
including_or_excluding
3055-
: INCLUDING
3056-
| EXCLUDING
3057-
;
3058-
3059-
30603013
create_materialized_view_log
30613014
: CREATE MATERIALIZED VIEW LOG ON tableview_name
30623015
( ( physical_attributes_clause
@@ -3719,12 +3672,6 @@ lob_partitioning_storage
37193672
)
37203673
;
37213674

3722-
datatype_null_enable
3723-
: column_name datatype
3724-
SORT? (DEFAULT expression)? (ENCRYPT ( USING CHAR_STRING )? (IDENTIFIED BY REGULAR_ID)? CHAR_STRING? ( NO? SALT )? )?
3725-
(NOT NULL_)? (ENABLE | DISABLE)?
3726-
;
3727-
37283675
// https://docs.oracle.com/en/database/oracle/oracle-database/21/sqlrf/size_clause.html
37293676
// Technically, this should only allow 'K' | 'M' | 'G' | 'T' | 'P' | 'E'
37303677
// but having issues with examples/numbers01.sql line 11 "sysdate -1m"
@@ -5163,10 +5110,6 @@ add_column_clause
51635110
//TODO (COMMA? out_of_line_part_storage )
51645111
;
51655112

5166-
alter_varray_col_properties
5167-
: MODIFY VARRAY varray_item LEFT_PAREN modify_lob_parameters RIGHT_PAREN
5168-
;
5169-
51705113
varray_col_properties
51715114
: VARRAY varray_item ( substitutable_column_clause? varray_storage_clause
51725115
| substitutable_column_clause
@@ -5349,10 +5292,6 @@ evaluation_edition_clause
53495292
: EVALUATE USING ((CURRENT | NULL_) EDITION | EDITION edition_name)
53505293
;
53515294

5352-
out_of_line_part_storage
5353-
: PARTITION partition_name
5354-
;
5355-
53565295
nested_table_col_properties
53575296
: NESTED TABLE (nested_item | COLUMN_VALUE) substitutable_column_clause? (LOCAL | GLOBAL)?
53585297
STORE AS tableview_name ( LEFT_PAREN ( LEFT_PAREN object_properties RIGHT_PAREN
@@ -5382,10 +5321,6 @@ supplemental_logging_props
53825321
: SUPPLEMENTAL LOG (supplemental_log_grp_clause | supplemental_id_key_clause)
53835322
;
53845323

5385-
column_or_attribute
5386-
: regular_id
5387-
;
5388-
53895324
object_type_col_properties
53905325
: COLUMN column=regular_id substitutable_column_clause
53915326
;
@@ -5415,33 +5350,10 @@ drop_primary_key_or_unique_or_generic_clause
54155350
| CONSTRAINT constraint_name CASCADE?
54165351
;
54175352

5418-
add_constraint
5419-
: ADD (CONSTRAINT constraint_name)? add_constraint_clause (COMMA (CONSTRAINT constraint_name)? add_constraint_clause)+
5420-
;
5421-
5422-
add_constraint_clause
5423-
: primary_key_clause
5424-
| foreign_key_clause
5425-
| unique_key_clause
5426-
| check_constraint
5427-
;
5428-
54295353
check_constraint
54305354
: CHECK LEFT_PAREN condition RIGHT_PAREN DISABLE?
54315355
;
54325356

5433-
drop_constraint
5434-
: DROP CONSTRAINT constraint_name
5435-
;
5436-
5437-
enable_constraint
5438-
: ENABLE CONSTRAINT constraint_name
5439-
;
5440-
5441-
disable_constraint
5442-
: DISABLE CONSTRAINT constraint_name
5443-
;
5444-
54455357
foreign_key_clause
54465358
: FOREIGN KEY paren_column_list references_clause on_delete_clause?
54475359
;
@@ -5454,14 +5366,6 @@ on_delete_clause
54545366
: ON DELETE (CASCADE | SET NULL_)
54555367
;
54565368

5457-
unique_key_clause
5458-
: UNIQUE paren_column_list using_index_clause?
5459-
;
5460-
5461-
primary_key_clause
5462-
: PRIMARY KEY paren_column_list using_index_clause?
5463-
;
5464-
54655369
// Anonymous PL/SQL code block
54665370

54675371
anonymous_block
@@ -5615,10 +5519,6 @@ statement
56155519
| plsql_call_statement // put call statement after others. BYT-8268: PL/SQL level allows optional CALL
56165520
;
56175521

5618-
swallow_to_semi
5619-
: ~SEMICOLON+
5620-
;
5621-
56225522
assignment_statement
56235523
: (general_element | bind_variable) ASSIGN_OP expression
56245524
;
@@ -6857,10 +6757,6 @@ rollback_segment_name
68576757
: identifier
68586758
;
68596759

6860-
table_var_name
6861-
: identifier
6862-
;
6863-
68646760
schema_name
68656761
: identifier
68666762
;
@@ -9641,20 +9537,4 @@ non_reserved_keywords_pre12c
96419537
| YEAR
96429538
| YES
96439539
| ZONE
9644-
;
9645-
9646-
string_function_name
9647-
: CHR
9648-
| DECODE
9649-
| SUBSTR
9650-
| TO_CHAR
9651-
| TRIM
9652-
;
9653-
9654-
numeric_function_name
9655-
: AVG
9656-
| COUNT
9657-
| NVL
9658-
| ROUND
9659-
| SUM
9660-
;
9540+
;

0 commit comments

Comments
 (0)