more noise

This commit is contained in:
Christian De la Hoz 2021-08-31 20:33:46 +02:00
parent f13c6b4712
commit 3d27025598
5 changed files with 54400 additions and 41327 deletions

View file

@ -1,13 +1,12 @@
.DEFAULT_GOAL := build
.PHONY: build test bless
.DEFAULT_GOAL := g
.PHONY: g t b
build:
g:
tree-sitter generate
test:
@$(MAKE) --no-print-directory build
t:
# @$(MAKE) --no-print-directory build
tree-sitter test
bless:
@$(MAKE) --no-print-directory build
b:
tree-sitter test --update

View file

@ -1,13 +1,10 @@
let
pkgs = import <nixpkgs> { };
# openssl = pkgs.openssl.override { static = true; };
in pkgs.mkShell {
buildInputs = with pkgs; [
git
nodejs
gcc
tree-sitter
];
# buildInputs = with pkgs; [ openssl pkg-config lld ];
# LD_LIBRARY_PATH="${pkgs.openssl.out}/lib";
# LD_LIBRARY_PATH = "${openssl}/lib";
}

View file

@ -37,6 +37,10 @@
"type": "SYMBOL",
"name": "create_function_statement"
},
{
"type": "SYMBOL",
"name": "drop_function_statement"
},
{
"type": "SYMBOL",
"name": "create_table_statement"
@ -87,6 +91,178 @@
}
]
},
"drop_function_statement": {
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[dD][rR][oO][pP]"
},
"named": false,
"value": "drop"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[fF][uU][nN][cC][tT][iI][oO][nN]"
},
"named": false,
"value": "function"
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "drop_function_item"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "drop_function_item"
}
]
}
}
]
},
{
"type": "CHOICE",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[cC][aA][sS][cC][aA][dD][eE]"
},
"named": false,
"value": "cascade"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[rR][eE][sS][tT][rR][iI][cC][tT]"
},
"named": false,
"value": "restrict"
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"drop_function_item": {
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "if_exists"
},
{
"type": "BLANK"
}
]
},
{
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "var_declaration"
},
{
"type": "SYMBOL",
"name": "_type"
}
]
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "var_declaration"
},
{
"type": "SYMBOL",
"name": "_type"
}
]
}
]
}
}
]
},
{
"type": "BLANK"
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "BLANK"
}
]
}
]
},
"create_type_statement": {
"type": "SEQ",
"members": [
@ -4740,10 +4916,19 @@
"type": "SYMBOL",
"name": "identifier"
},
{
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "="
},
{
"type": "STRING",
"value": ":="
}
]
},
{
"type": "SYMBOL",
"name": "_value_expression"
@ -5350,6 +5535,9 @@
]
},
"select_group_by": {
"type": "PREC",
"value": 1,
"content": {
"type": "SEQ",
"members": [
{
@ -5370,6 +5558,47 @@
"named": false,
"value": "by"
},
{
"type": "CHOICE",
"members": [
{
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": "("
},
{
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_value_expression"
},
{
"type": "REPEAT",
"content": {
"type": "SEQ",
"members": [
{
"type": "STRING",
"value": ","
},
{
"type": "SYMBOL",
"name": "_value_expression"
}
]
}
}
]
},
{
"type": "STRING",
"value": ")"
}
]
},
{
"type": "SEQ",
"members": [
@ -5396,6 +5625,9 @@
]
}
]
}
]
}
},
"select_order_by": {
"type": "SEQ",
@ -7019,6 +7251,319 @@
"name": "_value_expression"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][nN][tT][eE][rR][vV][aA][lL]"
},
"named": false,
"value": "interval"
},
{
"type": "SYMBOL",
"name": "string"
},
{
"type": "CHOICE",
"members": [
{
"type": "SYMBOL",
"name": "_interval_fields"
},
{
"type": "BLANK"
}
]
}
]
}
]
},
"_interval_fields": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[yY][eE][aA][rR]"
},
"named": false,
"value": "year"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][oO][nN][tT][hH]"
},
"named": false,
"value": "month"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[dD][aA][yY]"
},
"named": false,
"value": "day"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[hH][oO][uU][rR]"
},
"named": false,
"value": "hour"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][iI][nN][uU][tT][eE]"
},
"named": false,
"value": "minute"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[sS][eE][cC][oO][nN][dD]"
},
"named": false,
"value": "second"
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[yY][eE][aA][rR]"
},
"named": false,
"value": "year"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][oO][nN][tT][hH]"
},
"named": false,
"value": "month"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[dD][aA][yY]"
},
"named": false,
"value": "day"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[hH][oO][uU][rR]"
},
"named": false,
"value": "hour"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[dD][aA][yY]"
},
"named": false,
"value": "day"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][iI][nN][uU][tT][eE]"
},
"named": false,
"value": "minute"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[dD][aA][yY]"
},
"named": false,
"value": "day"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[sS][eE][cC][oO][nN][dD]"
},
"named": false,
"value": "second"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[hH][oO][uU][rR]"
},
"named": false,
"value": "hour"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][iI][nN][uU][tT][eE]"
},
"named": false,
"value": "minute"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[hH][oO][uU][rR]"
},
"named": false,
"value": "hour"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[sS][eE][cC][oO][nN][dD]"
},
"named": false,
"value": "second"
}
]
},
{
"type": "SEQ",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[mM][iI][nN][uU][tT][eE]"
},
"named": false,
"value": "minute"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[tT][oO]"
},
"named": false,
"value": "to"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[sS][eE][cC][oO][nN][dD]"
},
"named": false,
"value": "second"
}
]
}
]
},
@ -7100,7 +7645,7 @@
},
{
"type": "SYMBOL",
"name": "_value_expression"
"name": "identifier"
}
]
}
@ -7237,6 +7782,44 @@
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_value_expression"
},
{
"type": "SYMBOL",
"name": "comparison_kw"
},
{
"type": "SYMBOL",
"name": "_value_expression"
}
]
}
},
{
"type": "PREC_LEFT",
"value": 3,
"content": {
"type": "SEQ",
"members": [
{
"type": "SYMBOL",
"name": "_value_expression"
},
{
"type": "SYMBOL",
"name": "comparison_null"
}
]
}
},
{
"type": "PREC_RIGHT",
"value": 2,
@ -7365,12 +7948,117 @@
}
]
},
"comparison_null": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS][ ][nN][uU][lL][lL]"
},
"named": false,
"value": "is null"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS][nN][uU][lL][lL]"
},
"named": false,
"value": "isnull"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS][ ][nN][oO][tT][ ][nN][uU][lL][lL]"
},
"named": false,
"value": "is not null"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[nN][oO][tT][nN][uU][lL][lL]"
},
"named": false,
"value": "notnull"
}
]
},
"comparison_kw": {
"type": "CHOICE",
"members": [
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS]"
},
"named": false,
"value": "is"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS][ ][dD][iI][sS][tT][iI][nN][cC][tT][ ][fF][rR][oO][mM]"
},
"named": false,
"value": "is distinct from"
},
{
"type": "ALIAS",
"content": {
"type": "PATTERN",
"value": "[iI][sS][ ][nN][oO][tT][ ][dD][iI][sS][tT][iI][nN][cC][tT][ ][fF][rR][oO][mM]"
},
"named": false,
"value": "is not distinct from"
}
]
},
"other_op": {
"type": "CHOICE",
"members": [
{
"type": "STRING",
"value": "||"
},
{
"type": "STRING",
"value": "<@"
},
{
"type": "STRING",
"value": "@>"
},
{
"type": "STRING",
"value": "<<"
},
{
"type": "STRING",
"value": ">>"
},
{
"type": "STRING",
"value": "&&"
},
{
"type": "STRING",
"value": "&<"
},
{
"type": "STRING",
"value": "&>"
},
{
"type": "STRING",
"value": "-|-"
}
]
},

View file

@ -437,6 +437,10 @@
"type": "do_block",
"named": true
},
{
"type": "drop_function_statement",
"named": true
},
{
"type": "execute_statement",
"named": true
@ -566,6 +570,16 @@
]
}
},
{
"type": "comparison_kw",
"named": true,
"fields": {}
},
{
"type": "comparison_null",
"named": true,
"fields": {}
},
{
"type": "comparison_op",
"named": true,
@ -1010,6 +1024,48 @@
"named": true,
"fields": {}
},
{
"type": "drop_function_item",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": true,
"types": [
{
"type": "identifier",
"named": true
},
{
"type": "if_exists",
"named": true
},
{
"type": "predefined_types",
"named": true
},
{
"type": "var_declaration",
"named": true
}
]
}
},
{
"type": "drop_function_statement",
"named": true,
"fields": {},
"children": {
"multiple": true,
"required": true,
"types": [
{
"type": "drop_function_item",
"named": true
}
]
}
},
{
"type": "execute_statement",
"named": true,
@ -1217,6 +1273,10 @@
"type": "dollar_quote_string",
"named": true
},
{
"type": "drop_function_statement",
"named": true
},
{
"type": "execute_statement",
"named": true
@ -1730,6 +1790,10 @@
"type": "dollar_quote_string",
"named": true
},
{
"type": "drop_function_statement",
"named": true
},
{
"type": "execute_statement",
"named": true
@ -2208,6 +2272,14 @@
"type": "cast",
"named": true
},
{
"type": "comparison_kw",
"named": true
},
{
"type": "comparison_null",
"named": true
},
{
"type": "comparison_op",
"named": true
@ -3132,6 +3204,10 @@
"type": "do_block",
"named": true
},
{
"type": "drop_function_statement",
"named": true
},
{
"type": "grant_statement",
"named": true
@ -3736,6 +3812,18 @@
"type": "%type",
"named": false
},
{
"type": "&&",
"named": false
},
{
"type": "&<",
"named": false
},
{
"type": "&>",
"named": false
},
{
"type": "'",
"named": false
@ -3764,6 +3852,10 @@
"type": "-",
"named": false
},
{
"type": "-|-",
"named": false
},
{
"type": ".",
"named": false
@ -3788,6 +3880,10 @@
"type": "<",
"named": false
},
{
"type": "<<",
"named": false
},
{
"type": "<=",
"named": false
@ -3796,6 +3892,10 @@
"type": "<>",
"named": false
},
{
"type": "<@",
"named": false
},
{
"type": "=",
"named": false
@ -3808,6 +3908,14 @@
"type": ">=",
"named": false
},
{
"type": ">>",
"named": false
},
{
"type": "@>",
"named": false
},
{
"type": "[",
"named": false
@ -3928,6 +4036,10 @@
"type": "data",
"named": false
},
{
"type": "day",
"named": false
},
{
"type": "declare",
"named": false
@ -4036,6 +4148,10 @@
"type": "having",
"named": false
},
{
"type": "hour",
"named": false
},
{
"type": "if",
"named": false
@ -4080,10 +4196,38 @@
"type": "instead of",
"named": false
},
{
"type": "interval",
"named": false
},
{
"type": "into",
"named": false
},
{
"type": "is",
"named": false
},
{
"type": "is distinct from",
"named": false
},
{
"type": "is not distinct from",
"named": false
},
{
"type": "is not null",
"named": false
},
{
"type": "is null",
"named": false
},
{
"type": "isnull",
"named": false
},
{
"type": "join",
"named": false
@ -4120,10 +4264,18 @@
"type": "maxvalue",
"named": false
},
{
"type": "minute",
"named": false
},
{
"type": "minvalue",
"named": false
},
{
"type": "month",
"named": false
},
{
"type": "natural",
"named": false
@ -4144,6 +4296,10 @@
"type": "nothing",
"named": false
},
{
"type": "notnull",
"named": false
},
{
"type": "null",
"named": false
@ -4264,6 +4420,10 @@
"type": "schema",
"named": false
},
{
"type": "second",
"named": false
},
{
"type": "select",
"named": false
@ -4384,6 +4544,10 @@
"type": "with",
"named": false
},
{
"type": "year",
"named": false
},
{
"type": "zone",
"named": false

94783
src/parser.c

File diff suppressed because it is too large Load diff