antlr / grammars-v4

Grammars written for ANTLR v4; expectation that the grammars are free of actions.
MIT License
10.25k stars 3.72k forks source link

tsql: create_or_alter_ddl_trigger rule does not support UPDATE, DELETE, INSERT in FOR Statement #1109

Open garymazz opened 6 years ago

garymazz commented 6 years ago

Following SQL statement causes parser error when selectingcreate_or_alter_ddl_trigger rule :


CREATE TRIGGER TRIGGER1
ON T1
FOR UPDATE
AS .......

CREATE TRIGGER TRIGGER1
ON T1
FOR INSERT
AS .......

CREATE TRIGGER TRIGGER1
ON T1
FOR DELETE
AS .......
garymazz commented 6 years ago

A quick fix:

Add the following to rule simple_id in file TSqlParser.g4:


| DELETE
| INSERT
| UPDATE