Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 1 | /* |
| 2 | * The MIT License (MIT) |
| 3 | * |
| 4 | * Copyright (c) 2014 by Bart Kiers |
| 5 | * |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 6 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and |
| 7 | * associated documentation files (the "Software"), to deal in the Software without restriction, |
| 8 | * including without limitation the rights to use, copy, modify, merge, publish, distribute, |
| 9 | * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is |
| 10 | * furnished to do so, subject to the following conditions: |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 11 | * |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 12 | * The above copyright notice and this permission notice shall be included in all copies or |
| 13 | * substantial portions of the Software. |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 14 | * |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 15 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT |
| 16 | * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 17 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
| 18 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 20 | * |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 21 | * Project : sqlite-parser; an ANTLR4 grammar for SQLite https://github.com/bkiers/sqlite-parser |
| 22 | * Developed by: |
| 23 | * Bart Kiers, bart@big-o.nl |
| 24 | * Martin Mirchev, marti_2203@abv.bg |
| 25 | * Mike Lische, mike@lischke-online.de |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 26 | */ |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 27 | |
| 28 | // $antlr-format alignTrailingComments on, columnLimit 130, minEmptyLines 1, maxEmptyLinesToKeep 1, reflowComments off |
| 29 | // $antlr-format useTab off, allowShortRulesOnASingleLine off, allowShortBlocksOnASingleLine on, alignSemicolons ownLine |
| 30 | |
| 31 | parser grammar SQLiteParser; // For version 3.41.0 of SQLite |
| 32 | |
| 33 | options { |
| 34 | tokenVocab = SQLiteLexer; |
| 35 | } |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 36 | |
| 37 | parse |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 38 | : (sql_stmt_list)* EOF |
| 39 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 40 | |
| 41 | sql_stmt_list |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 42 | : SCOL* sql_stmt (SCOL+ sql_stmt)* SCOL* |
| 43 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 44 | |
| 45 | sql_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 46 | : (EXPLAIN_ (QUERY_ PLAN_)?)? ( |
| 47 | alter_table_stmt |
| 48 | | analyze_stmt |
| 49 | | attach_stmt |
| 50 | | begin_stmt |
| 51 | | commit_stmt |
| 52 | | create_index_stmt |
| 53 | | create_table_stmt |
| 54 | | create_trigger_stmt |
| 55 | | create_view_stmt |
| 56 | | create_virtual_table_stmt |
| 57 | | delete_stmt |
| 58 | | delete_stmt_limited |
| 59 | | detach_stmt |
| 60 | | drop_stmt |
| 61 | | insert_stmt |
| 62 | | pragma_stmt |
| 63 | | reindex_stmt |
| 64 | | release_stmt |
| 65 | | rollback_stmt |
| 66 | | savepoint_stmt |
| 67 | | select_stmt |
| 68 | | update_stmt |
| 69 | | update_stmt_limited |
| 70 | | vacuum_stmt |
| 71 | ) |
| 72 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 73 | |
| 74 | alter_table_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 75 | : ALTER_ TABLE_ (schema_name DOT)? table_name ( |
| 76 | RENAME_ ( |
| 77 | TO_ new_table_name = table_name |
| 78 | | COLUMN_? old_column_name = column_name TO_ new_column_name = column_name |
| 79 | ) |
| 80 | | ADD_ COLUMN_? column_def |
| 81 | | DROP_ COLUMN_? column_name |
| 82 | ) |
| 83 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 84 | |
| 85 | analyze_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 86 | : ANALYZE_ (schema_name | (schema_name DOT)? table_or_index_name)? |
| 87 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 88 | |
| 89 | attach_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 90 | : ATTACH_ DATABASE_? expr AS_ schema_name |
| 91 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 92 | |
| 93 | begin_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 94 | : BEGIN_ (DEFERRED_ | IMMEDIATE_ | EXCLUSIVE_)? (TRANSACTION_ transaction_name?)? |
| 95 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 96 | |
| 97 | commit_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 98 | : (COMMIT_ | END_) TRANSACTION_? |
| 99 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 100 | |
| 101 | rollback_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 102 | : ROLLBACK_ TRANSACTION_? (TO_ SAVEPOINT_? savepoint_name)? |
| 103 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 104 | |
| 105 | savepoint_stmt |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 106 | : SAVEPOINT_ savepoint_name |
| 107 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 108 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 109 | release_stmt |
| 110 | : RELEASE_ SAVEPOINT_? savepoint_name |
| 111 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 112 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 113 | create_index_stmt |
| 114 | : CREATE_ UNIQUE_? INDEX_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? index_name ON_ table_name OPEN_PAR indexed_column ( |
| 115 | COMMA indexed_column |
| 116 | )* CLOSE_PAR (WHERE_ expr)? |
| 117 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 118 | |
| 119 | indexed_column |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 120 | : (column_name | expr) (COLLATE_ collation_name)? asc_desc? |
| 121 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 122 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 123 | create_table_stmt |
| 124 | : CREATE_ (TEMP_ | TEMPORARY_)? TABLE_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? table_name ( |
| 125 | OPEN_PAR column_def (COMMA column_def)*? (COMMA table_constraint)* CLOSE_PAR ( |
| 126 | WITHOUT_ row_ROW_ID = IDENTIFIER |
| 127 | )? |
| 128 | | AS_ select_stmt |
| 129 | ) |
| 130 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 131 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 132 | column_def |
| 133 | : column_name type_name? column_constraint* |
| 134 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 135 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 136 | type_name |
| 137 | : name+? ( |
| 138 | OPEN_PAR signed_number CLOSE_PAR |
| 139 | | OPEN_PAR signed_number COMMA signed_number CLOSE_PAR |
| 140 | )? |
| 141 | ; |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 142 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 143 | column_constraint |
| 144 | : (CONSTRAINT_ name)? ( |
| 145 | (PRIMARY_ KEY_ asc_desc? conflict_clause? AUTOINCREMENT_?) |
| 146 | | (NOT_? NULL_ | UNIQUE_) conflict_clause? |
| 147 | | CHECK_ OPEN_PAR expr CLOSE_PAR |
| 148 | | DEFAULT_ (signed_number | literal_value | OPEN_PAR expr CLOSE_PAR) |
| 149 | | COLLATE_ collation_name |
| 150 | | foreign_key_clause |
| 151 | | (GENERATED_ ALWAYS_)? AS_ OPEN_PAR expr CLOSE_PAR (STORED_ | VIRTUAL_)? |
| 152 | ) |
| 153 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 154 | |
| 155 | signed_number |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 156 | : (PLUS | MINUS)? NUMERIC_LITERAL |
| 157 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 158 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 159 | table_constraint |
| 160 | : (CONSTRAINT_ name)? ( |
| 161 | (PRIMARY_ KEY_ | UNIQUE_) OPEN_PAR indexed_column (COMMA indexed_column)* CLOSE_PAR conflict_clause? |
| 162 | | CHECK_ OPEN_PAR expr CLOSE_PAR |
| 163 | | FOREIGN_ KEY_ OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR foreign_key_clause |
| 164 | ) |
| 165 | ; |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 166 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 167 | foreign_key_clause |
| 168 | : REFERENCES_ foreign_table (OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR)? ( |
| 169 | ON_ (DELETE_ | UPDATE_) ( |
| 170 | SET_ (NULL_ | DEFAULT_) |
| 171 | | CASCADE_ |
| 172 | | RESTRICT_ |
| 173 | | NO_ ACTION_ |
| 174 | ) |
| 175 | | MATCH_ name |
| 176 | )* (NOT_? DEFERRABLE_ (INITIALLY_ (DEFERRED_ | IMMEDIATE_))?)? |
| 177 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 178 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 179 | conflict_clause |
| 180 | : ON_ CONFLICT_ (ROLLBACK_ | ABORT_ | FAIL_ | IGNORE_ | REPLACE_) |
| 181 | ; |
| 182 | |
| 183 | create_trigger_stmt |
| 184 | : CREATE_ (TEMP_ | TEMPORARY_)? TRIGGER_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? trigger_name ( |
| 185 | BEFORE_ |
| 186 | | AFTER_ |
| 187 | | INSTEAD_ OF_ |
| 188 | )? (DELETE_ | INSERT_ | UPDATE_ (OF_ column_name ( COMMA column_name)*)?) ON_ table_name ( |
| 189 | FOR_ EACH_ ROW_ |
| 190 | )? (WHEN_ expr)? BEGIN_ ( |
| 191 | (update_stmt | insert_stmt | delete_stmt | select_stmt) SCOL |
| 192 | )+ END_ |
| 193 | ; |
| 194 | |
| 195 | create_view_stmt |
| 196 | : CREATE_ (TEMP_ | TEMPORARY_)? VIEW_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? view_name ( |
| 197 | OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR |
| 198 | )? AS_ select_stmt |
| 199 | ; |
| 200 | |
| 201 | create_virtual_table_stmt |
| 202 | : CREATE_ VIRTUAL_ TABLE_ (IF_ NOT_ EXISTS_)? (schema_name DOT)? table_name USING_ module_name ( |
| 203 | OPEN_PAR module_argument (COMMA module_argument)* CLOSE_PAR |
| 204 | )? |
| 205 | ; |
| 206 | |
| 207 | with_clause |
| 208 | : WITH_ RECURSIVE_? cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR ( |
| 209 | COMMA cte_table_name AS_ OPEN_PAR select_stmt CLOSE_PAR |
| 210 | )* |
| 211 | ; |
| 212 | |
| 213 | cte_table_name |
| 214 | : table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? |
| 215 | ; |
| 216 | |
| 217 | recursive_cte |
| 218 | : cte_table_name AS_ OPEN_PAR initial_select UNION_ ALL_? recursive_select CLOSE_PAR |
| 219 | ; |
| 220 | |
| 221 | common_table_expression |
| 222 | : table_name (OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR)? AS_ OPEN_PAR select_stmt CLOSE_PAR |
| 223 | ; |
| 224 | |
| 225 | delete_stmt |
| 226 | : with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? returning_clause? |
| 227 | ; |
| 228 | |
| 229 | delete_stmt_limited |
| 230 | : with_clause? DELETE_ FROM_ qualified_table_name (WHERE_ expr)? returning_clause? ( |
| 231 | order_by_stmt? limit_stmt |
| 232 | )? |
| 233 | ; |
| 234 | |
| 235 | detach_stmt |
| 236 | : DETACH_ DATABASE_? schema_name |
| 237 | ; |
| 238 | |
| 239 | drop_stmt |
| 240 | : DROP_ object = (INDEX_ | TABLE_ | TRIGGER_ | VIEW_) (IF_ EXISTS_)? ( |
| 241 | schema_name DOT |
| 242 | )? any_name |
| 243 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 244 | |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 245 | /* |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 246 | SQLite understands the following binary operators, in order from highest to lowest precedence: |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 247 | || |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 248 | * / % |
| 249 | + - |
| 250 | << >> & | |
| 251 | < <= > >= |
| 252 | = == != <> IS IS NOT IS DISTINCT FROM IS NOT DISTINCT FROM IN LIKE GLOB MATCH REGEXP |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 253 | AND |
| 254 | OR |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 255 | */ |
| 256 | expr |
| 257 | : literal_value |
| 258 | | BIND_PARAMETER |
| 259 | | ((schema_name DOT)? table_name DOT)? column_name |
| 260 | | unary_operator expr |
| 261 | | expr PIPE2 expr |
| 262 | | expr ( STAR | DIV | MOD) expr |
| 263 | | expr ( PLUS | MINUS) expr |
| 264 | | expr ( LT2 | GT2 | AMP | PIPE) expr |
| 265 | | expr ( LT | LT_EQ | GT | GT_EQ) expr |
| 266 | | expr ( |
| 267 | ASSIGN |
| 268 | | EQ |
| 269 | | NOT_EQ1 |
| 270 | | NOT_EQ2 |
| 271 | | IS_ |
| 272 | | IS_ NOT_ |
| 273 | | IS_ DISTINCT_ FROM_ |
| 274 | | IS_ NOT_ DISTINCT_ FROM_ |
| 275 | | IN_ |
| 276 | | LIKE_ |
| 277 | | GLOB_ |
| 278 | | MATCH_ |
| 279 | | REGEXP_ |
| 280 | ) expr |
| 281 | | expr AND_ expr |
| 282 | | expr OR_ expr |
| 283 | | function_name OPEN_PAR ((DISTINCT_? comma_separated_expr) | STAR)? CLOSE_PAR filter_clause? over_clause? |
| 284 | | OPEN_PAR comma_separated_expr CLOSE_PAR |
| 285 | | CAST_ OPEN_PAR expr AS_ type_name CLOSE_PAR |
| 286 | | expr COLLATE_ collation_name |
| 287 | | expr NOT_? (LIKE_ | GLOB_ | REGEXP_ | MATCH_) expr (ESCAPE_ expr)? |
| 288 | | expr ( ISNULL_ | NOTNULL_ | NOT_ NULL_) |
| 289 | | expr IS_ NOT_? expr |
| 290 | | expr NOT_? BETWEEN_ expr AND_ expr |
| 291 | | expr NOT_? IN_ ( |
| 292 | OPEN_PAR (select_stmt | comma_separated_expr)? CLOSE_PAR |
| 293 | | ( schema_name DOT)? table_name |
| 294 | | (schema_name DOT)? table_function_name OPEN_PAR (comma_separated_expr)? CLOSE_PAR |
| 295 | ) |
| 296 | | ((NOT_)? EXISTS_)? OPEN_PAR select_stmt CLOSE_PAR |
| 297 | | CASE_ expr? (WHEN_ expr THEN_ expr)+ (ELSE_ expr)? END_ |
| 298 | | raise_function |
| 299 | ; |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 300 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 301 | comma_separated_expr |
| 302 | : expr ( COMMA expr )* |
| 303 | ; |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 304 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 305 | raise_function |
| 306 | : RAISE_ OPEN_PAR (IGNORE_ | (ROLLBACK_ | ABORT_ | FAIL_) COMMA error_message) CLOSE_PAR |
| 307 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 308 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 309 | literal_value |
| 310 | : NUMERIC_LITERAL |
| 311 | | STRING_LITERAL |
| 312 | | BLOB_LITERAL |
| 313 | | NULL_ |
| 314 | | TRUE_ |
| 315 | | FALSE_ |
| 316 | | CURRENT_TIME_ |
| 317 | | CURRENT_DATE_ |
| 318 | | CURRENT_TIMESTAMP_ |
| 319 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 320 | |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 321 | value_row |
| 322 | : OPEN_PAR comma_separated_expr CLOSE_PAR |
| 323 | ; |
| 324 | |
| 325 | values_clause |
| 326 | : VALUES_ value_row (COMMA value_row)* |
| 327 | ; |
| 328 | |
| 329 | insert_stmt |
| 330 | : with_clause? ( |
| 331 | INSERT_ |
| 332 | | REPLACE_ |
| 333 | | INSERT_ OR_ ( REPLACE_ | ROLLBACK_ | ABORT_ | FAIL_ | IGNORE_) |
| 334 | ) INTO_ (schema_name DOT)? table_name (AS_ table_alias)? ( |
| 335 | OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR |
| 336 | )? (( ( values_clause | select_stmt) upsert_clause?) | DEFAULT_ VALUES_) returning_clause? |
| 337 | ; |
| 338 | |
| 339 | returning_clause |
| 340 | : RETURNING_ result_column (COMMA result_column)* |
| 341 | ; |
| 342 | |
| 343 | upsert_clause |
| 344 | : ON_ CONFLICT_ ( |
| 345 | OPEN_PAR indexed_column (COMMA indexed_column)* CLOSE_PAR (WHERE_ expr)? |
| 346 | )? DO_ ( |
| 347 | NOTHING_ |
| 348 | | UPDATE_ SET_ ( |
| 349 | (column_name | column_name_list) ASSIGN expr ( |
| 350 | COMMA (column_name | column_name_list) ASSIGN expr |
| 351 | )* (WHERE_ expr)? |
| 352 | ) |
| 353 | ) |
| 354 | ; |
| 355 | |
| 356 | pragma_stmt |
| 357 | : PRAGMA_ (schema_name DOT)? pragma_name ( |
| 358 | ASSIGN pragma_value |
| 359 | | OPEN_PAR pragma_value CLOSE_PAR |
| 360 | )? |
| 361 | ; |
| 362 | |
| 363 | pragma_value |
| 364 | : signed_number |
| 365 | | name |
| 366 | | STRING_LITERAL |
| 367 | ; |
| 368 | |
| 369 | reindex_stmt |
| 370 | : REINDEX_ (collation_name | (schema_name DOT)? (table_name | index_name))? |
| 371 | ; |
| 372 | |
| 373 | select_stmt |
| 374 | : common_table_stmt? select_core (compound_operator select_core)* order_by_stmt? limit_stmt? |
| 375 | ; |
| 376 | |
| 377 | join_clause |
| 378 | : table_or_subquery (join_operator table_or_subquery join_constraint?)* |
| 379 | ; |
| 380 | |
| 381 | select_core |
| 382 | : ( |
| 383 | SELECT_ (DISTINCT_ | ALL_)? result_column (COMMA result_column)* ( |
| 384 | FROM_ (table_or_subquery (COMMA table_or_subquery)* | join_clause) |
| 385 | )? (WHERE_ whereExpr = expr)? ( |
| 386 | GROUP_ BY_ groupByExpr += expr (COMMA groupByExpr += expr)* ( |
| 387 | HAVING_ havingExpr = expr |
| 388 | )? |
| 389 | )? (WINDOW_ window_name AS_ window_defn ( COMMA window_name AS_ window_defn)*)? |
| 390 | ) |
| 391 | | values_clause |
| 392 | ; |
| 393 | |
| 394 | factored_select_stmt |
| 395 | : select_stmt |
| 396 | ; |
| 397 | |
| 398 | simple_select_stmt |
| 399 | : common_table_stmt? select_core order_by_stmt? limit_stmt? |
| 400 | ; |
| 401 | |
| 402 | compound_select_stmt |
| 403 | : common_table_stmt? select_core ( |
| 404 | (UNION_ ALL_? | INTERSECT_ | EXCEPT_) select_core |
| 405 | )+ order_by_stmt? limit_stmt? |
| 406 | ; |
| 407 | |
| 408 | table_or_subquery |
| 409 | : ( |
| 410 | (schema_name DOT)? table_name (AS_? table_alias)? ( |
| 411 | INDEXED_ BY_ index_name |
| 412 | | NOT_ INDEXED_ |
| 413 | )? |
| 414 | ) |
| 415 | | (schema_name DOT)? table_function_name OPEN_PAR expr (COMMA expr)* CLOSE_PAR ( |
| 416 | AS_? table_alias |
| 417 | )? |
| 418 | | OPEN_PAR (table_or_subquery (COMMA table_or_subquery)* | join_clause) CLOSE_PAR |
| 419 | | OPEN_PAR select_stmt CLOSE_PAR (AS_? table_alias)? |
| 420 | ; |
| 421 | |
| 422 | result_column |
| 423 | : STAR |
| 424 | | table_name DOT STAR |
| 425 | | expr ( AS_? column_alias)? |
| 426 | ; |
| 427 | |
| 428 | join_operator |
| 429 | : COMMA |
| 430 | | NATURAL_? ((LEFT_ | RIGHT_ | FULL_) OUTER_? | INNER_ | CROSS_)? JOIN_ |
| 431 | ; |
| 432 | |
| 433 | join_constraint |
| 434 | : ON_ expr |
| 435 | | USING_ OPEN_PAR column_name ( COMMA column_name)* CLOSE_PAR |
| 436 | ; |
| 437 | |
| 438 | compound_operator |
| 439 | : UNION_ ALL_? |
| 440 | | INTERSECT_ |
| 441 | | EXCEPT_ |
| 442 | ; |
| 443 | |
| 444 | update_stmt |
| 445 | : with_clause? UPDATE_ (OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_))? qualified_table_name SET_ ( |
| 446 | column_name |
| 447 | | column_name_list |
| 448 | ) ASSIGN expr (COMMA (column_name | column_name_list) ASSIGN expr)* ( |
| 449 | FROM_ (table_or_subquery (COMMA table_or_subquery)* | join_clause) |
| 450 | )? (WHERE_ expr)? returning_clause? |
| 451 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 452 | |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 453 | column_name_list |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 454 | : OPEN_PAR column_name (COMMA column_name)* CLOSE_PAR |
| 455 | ; |
| 456 | |
| 457 | update_stmt_limited |
| 458 | : with_clause? UPDATE_ (OR_ (ROLLBACK_ | ABORT_ | REPLACE_ | FAIL_ | IGNORE_))? qualified_table_name SET_ ( |
| 459 | column_name |
| 460 | | column_name_list |
| 461 | ) ASSIGN expr (COMMA (column_name | column_name_list) ASSIGN expr)* (WHERE_ expr)? returning_clause? ( |
| 462 | order_by_stmt? limit_stmt |
| 463 | )? |
| 464 | ; |
| 465 | |
| 466 | qualified_table_name |
| 467 | : (schema_name DOT)? table_name (AS_ alias)? ( |
| 468 | INDEXED_ BY_ index_name |
| 469 | | NOT_ INDEXED_ |
| 470 | )? |
| 471 | ; |
| 472 | |
| 473 | vacuum_stmt |
| 474 | : VACUUM_ schema_name? (INTO_ filename)? |
| 475 | ; |
| 476 | |
| 477 | filter_clause |
| 478 | : FILTER_ OPEN_PAR WHERE_ expr CLOSE_PAR |
| 479 | ; |
| 480 | |
| 481 | window_defn |
| 482 | : OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( |
| 483 | ORDER_ BY_ ordering_term (COMMA ordering_term)* |
| 484 | ) frame_spec? CLOSE_PAR |
| 485 | ; |
| 486 | |
| 487 | over_clause |
| 488 | : OVER_ ( |
| 489 | window_name |
| 490 | | OPEN_PAR base_window_name? (PARTITION_ BY_ expr (COMMA expr)*)? ( |
| 491 | ORDER_ BY_ ordering_term (COMMA ordering_term)* |
| 492 | )? frame_spec? CLOSE_PAR |
| 493 | ) |
| 494 | ; |
| 495 | |
| 496 | frame_spec |
| 497 | : frame_clause (EXCLUDE_ ( NO_ OTHERS_ | CURRENT_ ROW_ | GROUP_ | TIES_))? |
| 498 | ; |
| 499 | |
| 500 | frame_clause |
| 501 | : (RANGE_ | ROWS_ | GROUPS_) ( |
| 502 | frame_single |
| 503 | | BETWEEN_ frame_left AND_ frame_right |
| 504 | ) |
| 505 | ; |
| 506 | |
| 507 | simple_function_invocation |
| 508 | : simple_func OPEN_PAR (expr (COMMA expr)* | STAR) CLOSE_PAR |
| 509 | ; |
| 510 | |
| 511 | aggregate_function_invocation |
| 512 | : aggregate_func OPEN_PAR (DISTINCT_? expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? |
| 513 | ; |
| 514 | |
| 515 | window_function_invocation |
| 516 | : window_function OPEN_PAR (expr (COMMA expr)* | STAR)? CLOSE_PAR filter_clause? OVER_ ( |
| 517 | window_defn |
| 518 | | window_name |
| 519 | ) |
| 520 | ; |
| 521 | |
| 522 | common_table_stmt |
| 523 | : //additional structures |
| 524 | WITH_ RECURSIVE_? common_table_expression (COMMA common_table_expression)* |
| 525 | ; |
| 526 | |
| 527 | order_by_stmt |
| 528 | : ORDER_ BY_ ordering_term (COMMA ordering_term)* |
| 529 | ; |
| 530 | |
| 531 | limit_stmt |
| 532 | : LIMIT_ expr ((OFFSET_ | COMMA) expr)? |
| 533 | ; |
| 534 | |
| 535 | ordering_term |
| 536 | : expr (COLLATE_ collation_name)? asc_desc? (NULLS_ (FIRST_ | LAST_))? |
| 537 | ; |
| 538 | |
| 539 | asc_desc |
| 540 | : ASC_ |
| 541 | | DESC_ |
| 542 | ; |
| 543 | |
| 544 | frame_left |
| 545 | : expr PRECEDING_ |
| 546 | | expr FOLLOWING_ |
| 547 | | CURRENT_ ROW_ |
| 548 | | UNBOUNDED_ PRECEDING_ |
| 549 | ; |
| 550 | |
| 551 | frame_right |
| 552 | : expr PRECEDING_ |
| 553 | | expr FOLLOWING_ |
| 554 | | CURRENT_ ROW_ |
| 555 | | UNBOUNDED_ FOLLOWING_ |
| 556 | ; |
| 557 | |
| 558 | frame_single |
| 559 | : expr PRECEDING_ |
| 560 | | UNBOUNDED_ PRECEDING_ |
| 561 | | CURRENT_ ROW_ |
| 562 | ; |
| 563 | |
| 564 | // unknown |
| 565 | |
| 566 | window_function |
| 567 | : (FIRST_VALUE_ | LAST_VALUE_) OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc frame_clause? |
| 568 | CLOSE_PAR |
| 569 | | (CUME_DIST_ | PERCENT_RANK_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr? CLOSE_PAR |
| 570 | | (DENSE_RANK_ | RANK_ | ROW_NUMBER_) OPEN_PAR CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR |
| 571 | | (LAG_ | LEAD_) OPEN_PAR expr offset? default_value? CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR |
| 572 | | NTH_VALUE_ OPEN_PAR expr COMMA signed_number CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc frame_clause? |
| 573 | CLOSE_PAR |
| 574 | | NTILE_ OPEN_PAR expr CLOSE_PAR OVER_ OPEN_PAR partition_by? order_by_expr_asc_desc CLOSE_PAR |
| 575 | ; |
| 576 | |
| 577 | offset |
| 578 | : COMMA signed_number |
| 579 | ; |
| 580 | |
| 581 | default_value |
| 582 | : COMMA signed_number |
| 583 | ; |
| 584 | |
| 585 | partition_by |
| 586 | : PARTITION_ BY_ expr+ |
| 587 | ; |
| 588 | |
| 589 | order_by_expr |
| 590 | : ORDER_ BY_ expr+ |
| 591 | ; |
| 592 | |
| 593 | order_by_expr_asc_desc |
| 594 | : ORDER_ BY_ expr_asc_desc |
| 595 | ; |
| 596 | |
| 597 | expr_asc_desc |
| 598 | : expr asc_desc? (COMMA expr asc_desc?)* |
| 599 | ; |
| 600 | |
| 601 | initial_select |
| 602 | : select_stmt |
| 603 | ; |
| 604 | |
| 605 | recursive_select |
| 606 | : select_stmt |
| 607 | ; |
| 608 | |
| 609 | unary_operator |
| 610 | : MINUS |
| 611 | | PLUS |
| 612 | | TILDE |
| 613 | | NOT_ |
| 614 | ; |
| 615 | |
| 616 | error_message |
| 617 | : STRING_LITERAL |
| 618 | ; |
| 619 | |
| 620 | module_argument |
| 621 | : |
| 622 | expr |
| 623 | | column_def |
| 624 | ; |
| 625 | |
| 626 | column_alias |
| 627 | : IDENTIFIER |
| 628 | | STRING_LITERAL |
| 629 | ; |
Daniel Santiago Rivera | c93f5cd | 2019-03-08 14:37:44 -0800 | [diff] [blame] | 630 | |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 631 | keyword |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 632 | : ABORT_ |
| 633 | | ACTION_ |
| 634 | | ADD_ |
| 635 | | AFTER_ |
| 636 | | ALL_ |
| 637 | | ALTER_ |
| 638 | | ANALYZE_ |
| 639 | | AND_ |
| 640 | | AS_ |
| 641 | | ASC_ |
| 642 | | ATTACH_ |
| 643 | | AUTOINCREMENT_ |
| 644 | | BEFORE_ |
| 645 | | BEGIN_ |
| 646 | | BETWEEN_ |
| 647 | | BY_ |
| 648 | | CASCADE_ |
| 649 | | CASE_ |
| 650 | | CAST_ |
| 651 | | CHECK_ |
| 652 | | COLLATE_ |
| 653 | | COLUMN_ |
| 654 | | COMMIT_ |
| 655 | | CONFLICT_ |
| 656 | | CONSTRAINT_ |
| 657 | | CREATE_ |
| 658 | | CROSS_ |
| 659 | | CURRENT_DATE_ |
| 660 | | CURRENT_TIME_ |
| 661 | | CURRENT_TIMESTAMP_ |
| 662 | | DATABASE_ |
| 663 | | DEFAULT_ |
| 664 | | DEFERRABLE_ |
| 665 | | DEFERRED_ |
| 666 | | DELETE_ |
| 667 | | DESC_ |
| 668 | | DETACH_ |
| 669 | | DISTINCT_ |
| 670 | | DROP_ |
| 671 | | EACH_ |
| 672 | | ELSE_ |
| 673 | | END_ |
| 674 | | ESCAPE_ |
| 675 | | EXCEPT_ |
| 676 | | EXCLUSIVE_ |
| 677 | | EXISTS_ |
| 678 | | EXPLAIN_ |
| 679 | | FAIL_ |
| 680 | | FOR_ |
| 681 | | FOREIGN_ |
| 682 | | FROM_ |
| 683 | | FULL_ |
| 684 | | GLOB_ |
| 685 | | GROUP_ |
| 686 | | HAVING_ |
| 687 | | IF_ |
| 688 | | IGNORE_ |
| 689 | | IMMEDIATE_ |
| 690 | | IN_ |
| 691 | | INDEX_ |
| 692 | | INDEXED_ |
| 693 | | INITIALLY_ |
| 694 | | INNER_ |
| 695 | | INSERT_ |
| 696 | | INSTEAD_ |
| 697 | | INTERSECT_ |
| 698 | | INTO_ |
| 699 | | IS_ |
| 700 | | ISNULL_ |
| 701 | | JOIN_ |
| 702 | | KEY_ |
| 703 | | LEFT_ |
| 704 | | LIKE_ |
| 705 | | LIMIT_ |
| 706 | | MATCH_ |
| 707 | | NATURAL_ |
| 708 | | NO_ |
| 709 | | NOT_ |
| 710 | | NOTNULL_ |
| 711 | | NULL_ |
| 712 | | OF_ |
| 713 | | OFFSET_ |
| 714 | | ON_ |
| 715 | | OR_ |
| 716 | | ORDER_ |
| 717 | | OUTER_ |
| 718 | | PLAN_ |
| 719 | | PRAGMA_ |
| 720 | | PRIMARY_ |
| 721 | | QUERY_ |
| 722 | | RAISE_ |
| 723 | | RECURSIVE_ |
| 724 | | REFERENCES_ |
| 725 | | REGEXP_ |
| 726 | | REINDEX_ |
| 727 | | RELEASE_ |
| 728 | | RENAME_ |
| 729 | | REPLACE_ |
| 730 | | RESTRICT_ |
| 731 | | RIGHT_ |
| 732 | | ROLLBACK_ |
| 733 | | ROW_ |
| 734 | | ROWS_ |
| 735 | | SAVEPOINT_ |
| 736 | | SELECT_ |
| 737 | | SET_ |
| 738 | | TABLE_ |
| 739 | | TEMP_ |
| 740 | | TEMPORARY_ |
| 741 | | THEN_ |
| 742 | | TO_ |
| 743 | | TRANSACTION_ |
| 744 | | TRIGGER_ |
| 745 | | UNION_ |
| 746 | | UNIQUE_ |
| 747 | | UPDATE_ |
| 748 | | USING_ |
| 749 | | VACUUM_ |
| 750 | | VALUES_ |
| 751 | | VIEW_ |
| 752 | | VIRTUAL_ |
| 753 | | WHEN_ |
| 754 | | WHERE_ |
| 755 | | WITH_ |
| 756 | | WITHOUT_ |
| 757 | | FIRST_VALUE_ |
| 758 | | OVER_ |
| 759 | | PARTITION_ |
| 760 | | RANGE_ |
| 761 | | PRECEDING_ |
| 762 | | UNBOUNDED_ |
| 763 | | CURRENT_ |
| 764 | | FOLLOWING_ |
| 765 | | CUME_DIST_ |
| 766 | | DENSE_RANK_ |
| 767 | | LAG_ |
| 768 | | LAST_VALUE_ |
| 769 | | LEAD_ |
| 770 | | NTH_VALUE_ |
| 771 | | NTILE_ |
| 772 | | PERCENT_RANK_ |
| 773 | | RANK_ |
| 774 | | ROW_NUMBER_ |
| 775 | | GENERATED_ |
| 776 | | ALWAYS_ |
| 777 | | STORED_ |
| 778 | | TRUE_ |
| 779 | | FALSE_ |
| 780 | | WINDOW_ |
| 781 | | NULLS_ |
| 782 | | FIRST_ |
| 783 | | LAST_ |
| 784 | | FILTER_ |
| 785 | | GROUPS_ |
| 786 | | EXCLUDE_ |
| 787 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 788 | |
| 789 | name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 790 | : any_name |
| 791 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 792 | |
| 793 | function_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 794 | : any_name |
| 795 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 796 | |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 797 | schema_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 798 | : any_name |
| 799 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 800 | |
| 801 | table_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 802 | : any_name |
| 803 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 804 | |
| 805 | table_or_index_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 806 | : any_name |
| 807 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 808 | |
| 809 | column_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 810 | : any_name |
| 811 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 812 | |
| 813 | collation_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 814 | : any_name |
| 815 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 816 | |
| 817 | foreign_table |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 818 | : any_name |
| 819 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 820 | |
| 821 | index_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 822 | : any_name |
| 823 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 824 | |
| 825 | trigger_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 826 | : any_name |
| 827 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 828 | |
| 829 | view_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 830 | : any_name |
| 831 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 832 | |
| 833 | module_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 834 | : any_name |
| 835 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 836 | |
| 837 | pragma_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 838 | : any_name |
| 839 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 840 | |
| 841 | savepoint_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 842 | : any_name |
| 843 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 844 | |
| 845 | table_alias |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 846 | : IDENTIFIER |
| 847 | | STRING_LITERAL |
| 848 | | OPEN_PAR table_alias CLOSE_PAR |
| 849 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 850 | |
| 851 | transaction_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 852 | : any_name |
| 853 | ; |
| 854 | |
| 855 | window_name |
| 856 | : any_name |
| 857 | ; |
| 858 | |
| 859 | alias |
| 860 | : any_name |
| 861 | ; |
| 862 | |
| 863 | filename |
| 864 | : any_name |
| 865 | ; |
| 866 | |
| 867 | base_window_name |
| 868 | : any_name |
| 869 | ; |
| 870 | |
| 871 | simple_func |
| 872 | : any_name |
| 873 | ; |
| 874 | |
| 875 | aggregate_func |
| 876 | : any_name |
| 877 | ; |
| 878 | |
| 879 | table_function_name |
| 880 | : any_name |
| 881 | ; |
Yigit Boyar | 19b4110 | 2016-11-20 10:46:32 -0800 | [diff] [blame] | 882 | |
| 883 | any_name |
Daniel Santiago Rivera | 27d86dd | 2024-04-17 15:09:01 -0400 | [diff] [blame] | 884 | : IDENTIFIER |
| 885 | | keyword |
| 886 | | STRING_LITERAL |
| 887 | | OPEN_PAR any_name CLOSE_PAR |
| 888 | ; |