elight.sqlite-3-25-dialect.2.0.2.source-code.sqlite_gen.bnf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sqlite-3-25-dialect Show documentation
Show all versions of sqlite-3-25-dialect Show documentation
The SQLite v3.25 Dialect for SQLDelight
The newest version!
{
parserUtilClass="app.cash.sqldelight.dialects.sqlite_3_25.grammar.SqliteParserUtil"
parserClass="app.cash.sqldelight.dialects.sqlite_3_25.grammar.SqliteParser"
elementTypeHolderClass="app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi.SqliteTypes"
psiPackage="app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi"
psiImplPackage="app.cash.sqldelight.dialects.sqlite_3_25.grammar.psi.impl"
// Specify the parent parser.
overrides="com.alecstrong.sql.psi.core.SqlParser"
elementTypeClass = "com.alecstrong.sql.psi.core.SqlElementType"
implements="com.alecstrong.sql.psi.core.psi.SqlCompositeElement"
extends="com.alecstrong.sql.psi.core.psi.SqlCompositeElementImpl"
psiClassPrefix = "Sqlite"
parserImports = [
"static com.alecstrong.sql.psi.core.SqlParser.*"
"static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableAddColumnExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.alterTableRenameTableExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.tableNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnAliasExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.resultColumnExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.joinClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.groupByExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.valuesExpressionExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.orderingTermExt"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ALL"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.AND"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.AS"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.BETWEEN"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.BY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COLUMN"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COMMA"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DISTINCT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DOT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.FROM"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.GROUP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.HAVING"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ID"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.LP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.MULTIPLY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ORDER"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.PARTITION"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.RENAME"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ROW"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.RP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.SELECT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.TO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.VALUES"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WINDOW"
]
}
root ::= <>
fake overrides ::= alter_table_rules | result_column | select_stmt
overrides_real ::= <> | <> | <>
{
elementType = overrides
}
fake alter_table_rules ::= (
<>>>
| <>>>
| alter_table_rename_column
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlAlterTableRulesImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlAlterTableRules"
override = true
}
alter_table_rules_real ::= (
<>>>
| <>>>
| <>
) {
elementType = alter_table_rules
}
fake result_column ::= ( MULTIPLY
| <>>> DOT MULTIPLY
| (window_function_invocation | <>) [ [ AS ] <>>> ] ) {
mixin = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.mixins.ResultColumnMixin"
implements = "com.alecstrong.sql.psi.core.psi.SqlResultColumn"
override = true
}
result_column_real ::= ( MULTIPLY
| <>>> DOT MULTIPLY
| (<> | <>) [ [ AS ] <>>> ] ) {
elementType = result_column
}
fake select_stmt ::= SELECT [ DISTINCT | ALL ] <>>> ( COMMA <>>> ) * [ FROM <>>> ] [ WHERE <> ] [<>>>] [ HAVING <> ] [ WINDOW window_name AS window_defn ( COMMA window_name AS window_defn ) * ] | VALUES <>>> ( COMMA <>>> ) * {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlSelectStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlSelectStmt"
override = true
pin = 1
}
select_stmt_real ::= SELECT [ DISTINCT | ALL ] <>>> ( COMMA <>>> ) * [ FROM <>>> ] [ WHERE <> ] [<>>>] [ HAVING <> ] [ WINDOW <> AS <> ( COMMA <> AS <> ) * ] | VALUES <>>> ( COMMA <>>> ) * {
elementType = select_stmt
pin = 1
}
fake alter_table_rename_column ::= RENAME [ COLUMN ] <>>> TO alter_table_column_alias {
mixin = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.mixins.AlterTableRenameColumnMixin"
pin = 1
}
alter_table_rename_column_real ::= RENAME [ COLUMN ] <>>> TO <> {
elementType = alter_table_rename_column
pin = 1
}
fake alter_table_column_alias ::= id | string {
mixin = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.mixins.AlterTableColumnAliasMixin"
implements = [
"com.alecstrong.sql.psi.core.psi.AliasElement";
"com.alecstrong.sql.psi.core.psi.NamedElement";
"com.alecstrong.sql.psi.core.psi.SqlCompositeElement"
"com.alecstrong.sql.psi.core.psi.SqlColumnName"
]
}
alter_table_column_alias_real ::= id | string {
elementType = alter_table_column_alias
}
fake window_function_invocation ::=
window_func LP [ MULTIPLY | ( <> ( COMMA <> ) * ) ] RP [ 'FILTER' LP WHERE <> RP] 'OVER' ( window_defn | window_name ) {
pin = 6
}
window_function_invocation_real ::=
<> LP [ MULTIPLY | ( <> ( COMMA <> ) * ) ] RP [ 'FILTER' LP WHERE <> RP] 'OVER' ( <> | <> ) {
elementType = window_function_invocation
pin = 6
}
fake window_defn ::= LP [ base_window_name ]
[ PARTITION BY <> ( COMMA <> ) * ]
[ ORDER BY <>>> ( COMMA <>>> ) * ]
[ frame_spec ]
RP {
mixin = "app.cash.sqldelight.dialects.sqlite_3_25.grammar.mixins.SqliteWindowDefinitionMixin"
}
window_defn_real ::= LP [ <> ]
[ PARTITION BY <> ( COMMA <> ) * ]
[ ORDER BY <>>> ( COMMA <>>> ) * ]
[ <> ]
RP {
elementType = window_defn
}
fake frame_spec ::= ( 'RANGE' | 'ROWS' | 'GROUPS' )
(
BETWEEN (
'UNBOUNDED' 'PRECEDING' |
'CURRENT' ROW |
<> 'PRECEDING' |
<> 'FOLLOWING'
) AND (
'UNBOUNDED' 'FOLLOWING' |
'CURRENT' ROW |
<> 'PRECEDING' |
<> 'FOLLOWING'
) |
'UNBOUNDED' 'PRECEDING' |
'CURRENT' ROW |
<> 'PRECEDING'
) [ 'EXCLUDE' NO 'OTHERS' | 'EXCLUDE' 'CURRENT' ROW | 'EXCLUDE' GROUP | 'EXCLUDE' 'TIES' ] {
pin = 1
}
frame_spec_real ::= ( 'RANGE' | 'ROWS' | 'GROUPS' )
(
BETWEEN (
'UNBOUNDED' 'PRECEDING' |
'CURRENT' ROW |
<> 'PRECEDING' |
<> 'FOLLOWING'
) AND (
'UNBOUNDED' 'FOLLOWING' |
'CURRENT' ROW |
<> 'PRECEDING' |
<> 'FOLLOWING'
) |
'UNBOUNDED' 'PRECEDING' |
'CURRENT' ROW |
<> 'PRECEDING'
) [ 'EXCLUDE' NO 'OTHERS' | 'EXCLUDE' 'CURRENT' ROW | 'EXCLUDE' GROUP | 'EXCLUDE' 'TIES' ] {
elementType = frame_spec
pin = 1
}
fake window_func ::= id
window_func_real ::= id {
elementType = window_func
}
fake window_name ::= id
window_name_real ::= id {
elementType = window_name
}
fake base_window_name ::= id
base_window_name_real ::= id {
elementType = base_window_name
}