2021-08-21 20:15:42 +03:00
|
|
|
{
|
|
|
|
"name": "plpgsql",
|
2023-01-06 23:52:08 +03:00
|
|
|
"word": "_identifier",
|
2021-08-21 20:15:42 +03:00
|
|
|
"rules": {
|
|
|
|
"source_file": {
|
|
|
|
"type": "REPEAT",
|
|
|
|
"content": {
|
2021-08-28 13:46:32 +03:00
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
2023-01-06 23:52:08 +03:00
|
|
|
"name": "statement"
|
2021-08-28 13:46:32 +03:00
|
|
|
}
|
|
|
|
]
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"statement": {
|
2021-09-02 21:45:29 +03:00
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
2023-01-06 23:52:08 +03:00
|
|
|
"name": "_ddl_statement"
|
2021-09-02 21:45:29 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "BLANK"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "STRING",
|
|
|
|
"value": ";"
|
2021-09-02 21:45:29 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"_ddl_statement": {
|
|
|
|
"type": "CHOICE",
|
2021-09-01 18:48:58 +03:00
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
2023-01-06 23:52:08 +03:00
|
|
|
"name": "_create_statement"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"_create_statement": {
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
2021-09-01 18:48:58 +03:00
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "create_table"
|
2021-09-01 18:48:58 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"create_table": {
|
2021-08-31 21:33:46 +03:00
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_create"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_temporary"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_unlogged"
|
2021-08-31 21:33:46 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "BLANK"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_table"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
2021-08-31 21:33:46 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "_if_not_exists"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "BLANK"
|
2021-08-31 21:33:46 +03:00
|
|
|
}
|
|
|
|
]
|
2023-01-06 23:52:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "table_reference"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "column_definitions"
|
2021-08-31 21:33:46 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"table_reference": {
|
2021-08-31 21:33:46 +03:00
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
2021-08-21 20:15:42 +03:00
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SEQ",
|
2021-08-28 13:46:32 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "FIELD",
|
|
|
|
"name": "schema",
|
|
|
|
"content": {
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "identifier"
|
|
|
|
}
|
2021-08-28 13:46:32 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "STRING",
|
|
|
|
"value": "."
|
2021-08-28 13:46:32 +03:00
|
|
|
}
|
|
|
|
]
|
2023-01-06 23:52:08 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "BLANK"
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "FIELD",
|
|
|
|
"name": "name",
|
2021-08-28 13:46:32 +03:00
|
|
|
"content": {
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "identifier"
|
2021-08-28 13:46:32 +03:00
|
|
|
}
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"column_definitions": {
|
2021-08-21 20:15:42 +03:00
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
|
|
|
"value": "("
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "column_definition"
|
|
|
|
}
|
|
|
|
]
|
2021-08-21 20:15:42 +03:00
|
|
|
},
|
|
|
|
{
|
2021-08-28 13:46:32 +03:00
|
|
|
"type": "REPEAT",
|
2021-08-21 20:15:42 +03:00
|
|
|
"content": {
|
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
|
|
|
"value": ","
|
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "column_definition"
|
|
|
|
}
|
|
|
|
]
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
2021-08-28 13:46:32 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "BLANK"
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
|
|
|
"value": ")"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"column_definition": {
|
|
|
|
"type": "SEQ",
|
2021-08-21 20:15:42 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "FIELD",
|
|
|
|
"name": "name",
|
|
|
|
"content": {
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "identifier"
|
|
|
|
}
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"keyword_create": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "create|CREATE"
|
|
|
|
},
|
|
|
|
"keyword_table": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "table|TABLE"
|
|
|
|
},
|
|
|
|
"keyword_temporary": {
|
2021-09-01 18:48:58 +03:00
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 00:29:36 +03:00
|
|
|
"type": "PATTERN",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": "temporary|TEMPORARY"
|
2021-09-01 18:48:58 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 00:29:36 +03:00
|
|
|
"type": "PATTERN",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": "temp|TEMP"
|
2021-09-01 18:48:58 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"keyword_unlogged": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "unlogged|UNLOGGED"
|
|
|
|
},
|
|
|
|
"keyword_if": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "if|IF"
|
|
|
|
},
|
|
|
|
"keyword_not": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "not|NOT"
|
|
|
|
},
|
|
|
|
"keyword_exists": {
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "exists|EXISTS"
|
|
|
|
},
|
|
|
|
"_if_not_exists": {
|
|
|
|
"type": "SEQ",
|
2021-08-31 21:33:46 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_if"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_not"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "keyword_exists"
|
2021-08-31 21:33:46 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"comment": {
|
|
|
|
"type": "SEQ",
|
2021-08-31 21:33:46 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "STRING",
|
|
|
|
"value": "--"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 00:29:36 +03:00
|
|
|
"type": "PATTERN",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": ".*\\n"
|
2021-08-31 21:33:46 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2023-01-06 23:52:08 +03:00
|
|
|
"marginalia": {
|
|
|
|
"type": "SEQ",
|
2021-08-21 20:15:42 +03:00
|
|
|
"members": [
|
|
|
|
{
|
2021-08-28 13:46:32 +03:00
|
|
|
"type": "STRING",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": "/*"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "[^*]*\\*+(?:[^/*][^*]*\\*+)*"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": "/"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
|
|
|
"identifier": {
|
|
|
|
"type": "CHOICE",
|
|
|
|
"members": [
|
2021-08-31 21:33:46 +03:00
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "_identifier"
|
2021-08-31 21:33:46 +03:00
|
|
|
},
|
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SEQ",
|
|
|
|
"members": [
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
|
|
|
"value": "\""
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "_identifier"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "STRING",
|
|
|
|
"value": "\""
|
|
|
|
}
|
|
|
|
]
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
]
|
|
|
|
},
|
2021-08-30 21:31:09 +03:00
|
|
|
"_identifier": {
|
2021-08-21 20:15:42 +03:00
|
|
|
"type": "PATTERN",
|
2023-01-06 23:52:08 +03:00
|
|
|
"value": "([a-zA-Z_][0-9a-zA-Z_]*)"
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
},
|
|
|
|
"extras": [
|
2023-01-06 23:52:08 +03:00
|
|
|
{
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "\\s\\n"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"type": "PATTERN",
|
|
|
|
"value": "\\s"
|
|
|
|
},
|
2021-08-28 13:46:32 +03:00
|
|
|
{
|
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "comment"
|
|
|
|
},
|
2021-08-21 20:15:42 +03:00
|
|
|
{
|
2023-01-06 23:52:08 +03:00
|
|
|
"type": "SYMBOL",
|
|
|
|
"name": "marginalia"
|
2021-08-21 20:15:42 +03:00
|
|
|
}
|
|
|
|
],
|
|
|
|
"conflicts": [],
|
|
|
|
"precedences": [],
|
|
|
|
"externals": [],
|
|
|
|
"inline": [],
|
|
|
|
"supertypes": []
|
|
|
|
}
|
|
|
|
|