elight.hsql-dialect.2.0.1.source-code.hsql_gen.bnf Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hsql-dialect Show documentation
Show all versions of hsql-dialect Show documentation
The HSQL Dialect for SQLDelight
{
parserUtilClass="app.cash.sqldelight.dialects.hsql.grammar.HsqlParserUtil"
parserClass="app.cash.sqldelight.dialects.hsql.grammar.HsqlParser"
elementTypeHolderClass="app.cash.sqldelight.dialects.hsql.grammar.psi.HsqlTypes"
psiPackage="app.cash.sqldelight.dialects.hsql.grammar.psi"
psiImplPackage="app.cash.sqldelight.dialects.hsql.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 = "Hsql"
parserImports = [
"static com.alecstrong.sql.psi.core.SqlParser.*"
"static com.alecstrong.sql.psi.core.SqlParserUtil.identifierExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.conflictClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.checkConstraintExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.defaultConstraintExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.collationNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.foreignKeyClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.withClauseExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.databaseNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.tableNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.tableAliasExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnNameExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.insertStmtValuesExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.columnAliasExt"
"static com.alecstrong.sql.psi.core.SqlParserUtil.orderingTermExt"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ALWAYS"
"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.ASC"
"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.COLLATE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.COMMA"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.CONSTRAINT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DEFAULT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DESC"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DIGIT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.DOT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.GENERATED"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.GROUP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.ID"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.INSERT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.INTO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.KEY"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.LP"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.MERGE"
"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.NOT"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.NULL"
"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.PRIMARY"
"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.TO"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.UNIQUE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WHERE"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WITH"
"static com.alecstrong.sql.psi.core.psi.SqlTypes.WITHOUT"
]
}
root ::= <>
fake overrides ::= type_name | column_constraint | bind_parameter | insert_stmt | result_column | generated_clause
overrides_real ::= <> | <> | <> | <> | <> | <> {
elementType = overrides
}
fake type_name ::= (
tiny_int_data_type |
small_int_data_type |
int_data_type |
big_int_data_type |
fixed_point_data_type |
approximate_numeric_data_type |
boolean_data_type |
date_data_type |
character_string_data_type |
binary_string_data_type |
bit_string_data_type |
interval_data_type
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlTypeNameImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlTypeName"
override = true
}
type_name_real ::= (
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<> |
<>
) {
elementType = type_name
}
fake column_constraint ::= [ CONSTRAINT <>>> ] (
'AUTO_INCREMENT' |
PRIMARY KEY [ ASC | DESC ] <>>> |
NOT NULL <>>> |
UNIQUE <>>> |
<>>> |
generated_clause |
<>>> |
COLLATE <>>> |
<>>>
) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlColumnConstraintImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlColumnConstraint"
override = true
}
column_constraint_real ::= [ CONSTRAINT <>>> ] (
'AUTO_INCREMENT' |
PRIMARY KEY [ ASC | DESC ] <>>> |
NOT NULL <>>> |
UNIQUE <>>> |
<>>> |
<> |
<>>> |
COLLATE <>>> |
<>>>
) {
elementType = column_constraint
}
fake bind_parameter ::= DEFAULT | ( '?' | ':' <>>> ) {
mixin = "app.cash.sqldelight.dialect.grammar.mixins.BindParameterMixin"
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlBindParameterImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlBindParameter"
override = true
}
bind_parameter_real ::= DEFAULT | ( '?' | ':' <>>> ) {
elementType = bind_parameter
}
fake tiny_int_data_type ::= 'TINYINT'
tiny_int_data_type_real ::= 'TINYINT' {
elementType = tiny_int_data_type
}
fake small_int_data_type ::= 'SMALLINT'
small_int_data_type_real ::= 'SMALLINT' {
elementType = small_int_data_type
}
fake int_data_type ::= 'INTEGER' | 'INT'
int_data_type_real ::= 'INTEGER' | 'INT' {
elementType = int_data_type
}
fake big_int_data_type ::= 'BIGINT'
big_int_data_type_real ::= 'BIGINT' {
elementType = big_int_data_type
}
fake fixed_point_data_type ::= { 'NUMERIC' | 'DECIMAL' | 'DEC' } [ LP precision [ COMMA scale ] RP ]
fixed_point_data_type_real ::= { 'NUMERIC' | 'DECIMAL' | 'DEC' } [ LP <> [ COMMA <> ] RP ] {
elementType = fixed_point_data_type
}
fake approximate_numeric_data_type ::= 'FLOAT' [ LP precision RP ] | 'REAL' | ( 'DOUBLE' 'PRECISION' ) | 'DOUBLE'
approximate_numeric_data_type_real ::= 'FLOAT' [ LP <> RP ] | 'REAL' | ( 'DOUBLE' 'PRECISION' ) | 'DOUBLE' {
elementType = approximate_numeric_data_type
}
fake precision ::= digit
precision_real ::= digit {
elementType = precision
}
fake scale ::= digit
scale_real ::= digit
{
elementType = scale
}
fake boolean_data_type ::= 'BOOLEAN'
boolean_data_type_real ::= 'BOOLEAN'
{
elementType = boolean_data_type
}
fake character_string_data_type ::= { ('CHARACTER' 'VARYING') | ('CHAR' 'VARYING') | 'VARCHAR' } LP digit RP | character_large_object_data_type | { 'CHARACTER' | 'CHAR' | 'LONGVARCHAR' } [ LP digit RP ]
character_string_data_type_real ::= { ('CHARACTER' 'VARYING') | ('CHAR' 'VARYING') | 'VARCHAR' } LP digit RP | <> | { 'CHARACTER' | 'CHAR' | 'LONGVARCHAR' } [ LP digit RP ] {
elementType = character_string_data_type
}
fake character_large_object_data_type ::= { ('CHARACTER' 'LARGE' 'OBJECT') | ('CHAR' 'LARGE' 'OBJECT') | 'CLOB' } [ LP character_large_object_length RP ]
character_large_object_data_type_real ::= { ('CHARACTER' 'LARGE' 'OBJECT') | ('CHAR' 'LARGE' 'OBJECT') | 'CLOB' } [ LP <> RP ] {
elementType = character_large_object_data_type
}
fake character_large_object_length ::= digit [ multiplier ] [ char_length_units ]
character_large_object_length_real ::= digit [ <> ] [ <> ] {
elementType = character_large_object_length
}
fake multiplier ::= 'K' | 'M' | 'G'
multiplier_real ::= 'K' | 'M' | 'G' {
elementType = multiplier
}
fake char_length_units ::= 'CHARACTERS' | 'OCTETS'
char_length_units_real ::= 'CHARACTERS' | 'OCTETS'
{
elementType = char_length_units
}
fake binary_string_data_type ::= { ('BINARY' 'VARYING') | 'VARBINARY' } LP digit RP | binary_large_object_string_data_type | { 'BINARY' | 'LONGVARBINARY' } [ LP digit RP ] | 'UUID'
binary_string_data_type_real ::= { ('BINARY' 'VARYING') | 'VARBINARY' } LP digit RP | <> | { 'BINARY' | 'LONGVARBINARY' } [ LP digit RP ] | 'UUID' {
elementType = binary_string_data_type
}
fake binary_large_object_string_data_type ::= { ('BINARY' 'LARGE' 'OBJECT') | 'BLOB' } [ LP digit RP ]
binary_large_object_string_data_type_real ::= { ('BINARY' 'LARGE' 'OBJECT') | 'BLOB' } [ LP digit RP ]
{
elementType = binary_large_object_string_data_type
}
fake bit_string_data_type ::= ('BIT' 'VARYING') LP digit RP | 'BIT' [ LP digit RP ]
bit_string_data_type_real ::= ('BIT' 'VARYING') LP digit RP | 'BIT' [ LP digit RP ]
{
elementType = bit_string_data_type
}
fake date_data_type ::= 'DATE' | ( 'TIME' | 'TIMESTAMP' ) [ LP digit RP ] [ ( WITH | WITHOUT ) 'TIME' 'ZONE' ]
date_data_type_real ::= 'DATE' | ( 'TIME' | 'TIMESTAMP' ) [ LP digit RP ] [ ( WITH | WITHOUT ) 'TIME' 'ZONE' ]
{
elementType = date_data_type
}
fake interval_data_type ::= 'INTERVAL' interval_qualifier
interval_data_type_real ::= 'INTERVAL' <> {
elementType = interval_data_type
}
fake interval_qualifier ::= start_field TO end_field | single_datetime_field
interval_qualifier_real ::= <> TO <> | <> {
elementType = interval_qualifier
}
fake start_field ::= non_second_primary_datetime_field [ LP digit RP ]
start_field_real ::= <> [ LP digit RP ] {
elementType = start_field
}
fake end_field ::= non_second_primary_datetime_field | 'SECOND' [ LP digit RP ]
end_field_real ::= <> | 'SECOND' [ LP digit RP ] {
elementType = end_field
}
fake single_datetime_field ::= non_second_primary_datetime_field [ LP digit RP ] | 'SECOND' [ LP digit [ COMMA digit ] RP ]
single_datetime_field_real ::= <> [ LP digit RP ] | 'SECOND' [ LP digit [ COMMA digit ] RP ] {
elementType = single_datetime_field
}
fake non_second_primary_datetime_field ::= 'YEAR' | 'MONTH' | 'DAY' | 'HOUR' | 'MINUTE'
non_second_primary_datetime_field_real ::= 'YEAR' | 'MONTH' | 'DAY' | 'HOUR' | 'MINUTE'
{
elementType = non_second_primary_datetime_field
}
fake generated_clause ::= GENERATED ( ( (ALWAYS | BY DEFAULT) AS 'IDENTITY' ) | (ALWAYS AS <>) ) {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlGeneratedClauseImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlGeneratedClause"
override = true
}
generated_clause_real ::= GENERATED ( ( (ALWAYS | BY DEFAULT) AS 'IDENTITY' ) | (ALWAYS AS <>) ) {
elementType = generated_clause
}
fake insert_stmt ::= [ <>>> ] ( INSERT | MERGE ) INTO [ <>>> DOT ] <>>> [ AS <>>> ] [ LP <>>> ( COMMA <>>> ) * RP ] [ merge_key_selector ] <>>> {
extends = "com.alecstrong.sql.psi.core.psi.impl.SqlInsertStmtImpl"
implements = "com.alecstrong.sql.psi.core.psi.SqlInsertStmt"
override = true
pin = 5
}
insert_stmt_real ::= [ <>>> ] ( INSERT | MERGE ) INTO [ <>>> DOT ] <>>> [ AS <>>> ] [ LP <>>> ( COMMA <>>> ) * RP ] [ <> ] <>>> {
elementType = insert_stmt
pin = 5
}
fake merge_key_selector ::= KEY LP <>>> RP
merge_key_selector_real ::= KEY LP <>>> RP
{
elementType = merge_key_selector
}
fake result_column ::= ( MULTIPLY
| <>>> DOT MULTIPLY
| (window_function_invocation | <>) [ [ AS ] <>>> ] ) {
mixin = "app.cash.sqldelight.dialects.hsql.grammar.mixins.ResultColumnMixin"
implements = "com.alecstrong.sql.psi.core.psi.SqlResultColumn"
override = true
}
result_column_real ::= ( MULTIPLY
| <>>> DOT MULTIPLY
| (<> | <>) [ [ AS ] <>>> ] ) {
elementType = result_column
}
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 {
pin = 1
mixin = "app.cash.sqldelight.dialects.hsql.grammar.mixins.WindowDefinitionMixin"
}
window_defn_real ::= LP [ <> ]
[ PARTITION BY <> ( COMMA <> ) * ]
[ ORDER BY <>>> ( COMMA <>>> ) * ]
[ <> ]
RP {
elementType = window_defn
pin = 1
mixin = "app.cash.sqldelight.dialects.hsql.grammar.mixins.WindowDefinitionMixin"
}
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
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy