From 8aecfc06174007c4edd5e93bd67bff80703d3318 Mon Sep 17 00:00:00 2001 From: Jonathan Arnett Date: Mon, 13 Dec 2021 01:24:34 -0500 Subject: [PATCH] Rudimentary constant support --- corpus/constants.txt | 79 ++ grammar.js | 98 +- src/grammar.json | 608 ++++++++- src/node-types.json | 505 ++++++- src/parser.c | 2993 ++++++++++++++++++++++++++++++++++-------- 5 files changed, 3656 insertions(+), 627 deletions(-) create mode 100644 corpus/constants.txt diff --git a/corpus/constants.txt b/corpus/constants.txt new file mode 100644 index 000000000..b03cb8e47 --- /dev/null +++ b/corpus/constants.txt @@ -0,0 +1,79 @@ +========== +Constants +========== + +const a = "hello" +const a:Int = 1234 +const a:Float = -1_234.53__23 +const a:#(Int, String) = #(1, "Hello!") +const a:List(Int) = [1, 2] + +--- + +(source_file + (constant + name: (identifier) + value: (string)) + (constant + name: (identifier) + type: (type_constructor) + value: (integer)) + (constant + name: (identifier) + type: (type_constructor) + value: (float)) + (constant + name: (identifier) + type: (tuple_type + (type_constructor) + (type_constructor)) + value: (tuple + (integer) + (string))) + (constant + name: (identifier) + type: (type_constructor + (type_constructor)) + value: (list + (integer) + (integer)))) + +================= +Public constants +================= + +pub const a = "hello" +pub const a:Int = 1234 +pub const a:Float = -1_234.53__23 +pub const a:#(Int, String) = #(1, "Hello!") +pub const a:List(Int) = [1, 2] + +--- + +(source_file + (public_constant + name: (identifier) + value: (string)) + (public_constant + name: (identifier) + type: (type_constructor) + value: (integer)) + (public_constant + name: (identifier) + type: (type_constructor) + value: (float)) + (public_constant + name: (identifier) + type: (tuple_type + (type_constructor) + (type_constructor)) + value: (tuple + (integer) + (string))) + (public_constant + name: (identifier) + type: (type_constructor + (type_constructor)) + value: (list + (integer) + (integer)))) diff --git a/grammar.js b/grammar.js index c209e3c6c..b33a87d5b 100644 --- a/grammar.js +++ b/grammar.js @@ -2,26 +2,37 @@ const NEWLINE = /\r?\n/; module.exports = grammar({ name: "gleam", - extras: ($) => [";", "\n", "\r\n", /\s/], + extras: ($) => [";", NEWLINE, /\s/], rules: { + /* General rules */ source_file: ($) => - repeat(seq(choice($.target_group, $._statement), NEWLINE)), + optional( + seq( + series_of(choice($.target_group, $._statement), NEWLINE), + optional(NEWLINE) + ) + ), + _statement: ($) => + choice( + $.import, + $.public_constant, + $.constant + /* $.type, */ + /* $.function */ + ), + + /* Target groups */ target_group: ($) => seq( "if", field("target", $.target), "{", - field("body", repeat(seq($._statement, NEWLINE))), + optional(seq(series_of($._statement, NEWLINE), optional(NEWLINE))), "}" ), - _statement: ($) => - choice( - $.import - /* $.constant, */ - /* $.type, */ - /* $.function */ - ), target: ($) => choice("erlang", "javascript"), + + /* Import statements */ import: ($) => seq( "import", @@ -50,7 +61,74 @@ module.exports = grammar({ ) ), alias: ($) => $._name, + + /* Constant statements */ + public_constant: ($) => seq("pub", $._constant), + constant: ($) => $._constant, + _constant: ($) => + seq( + "const", + field("name", alias($._name, $.identifier)), + optional($._type_annotation), + "=", + field("value", $._literal) + ), + + /* Literals */ + _literal: ($) => + choice( + $.string, + $.float, + $.integer, + $.tuple, + $.list + // $.bitstring, + // $.record, + // $.remote_record + ), + string: ($) => /\"(?:\\[efnrt\"\\]|[^\"])*\"/, + float: ($) => /-?[0-9_]+\.[0-9_]+/, + integer: ($) => /-?[0-9_]+/, + tuple: ($) => seq("#", "(", series_of($._literal, ","), ")"), + list: ($) => seq("[", series_of($._literal, ","), "]"), + + /* Types */ + _type_annotation: ($) => seq(":", field("type", $._type)), + _type: ($) => + choice( + alias($._discard_name, $.type_hole), + $.tuple_type, + $.fn_type, + $.type_constructor, + $.remote_type_constructor, + $.type_var + ), + tuple_type: ($) => seq("#", "(", optional(series_of($._type, ",")), ")"), + fn_type: ($) => + seq( + "fn", + "(", + series_of(alias($._type, $.argument_type), ","), + ")", + "->", + alias($._type, $.return_type) + ), + type_constructor: ($) => $._type_constructor, + remote_type_constructor: ($) => seq($._name, ".", $._type_constructor), + _type_constructor: ($) => + seq($._upname, optional(seq("(", series_of($._type, ","), ")"))), + type_var: ($) => $._name, + + /* Reused types from the Gleam lexer */ + _discard_name: ($) => /_[_0-9a-z]*/, _name: ($) => /[_a-z][_0-9a-z]*/, _upname: ($) => /[A-Z][0-9a-zA-Z]*/, }, }); + +// Shamelessly stolen "sep1" from tree-sitter-elixir, renamed to match a similar +// function in the Gleam parser. +// https://github.com/elixir-lang/tree-sitter-elixir/blob/de3ec57591aebf451e710fc9c984cf601258baf5/grammar.js#L817-L819 +function series_of(rule, separator) { + return seq(rule, repeat(seq(separator, rule))); +} diff --git a/src/grammar.json b/src/grammar.json index 079fc711a..8ecfa16f9 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -2,29 +2,89 @@ "name": "gleam", "rules": { "source_file": { - "type": "REPEAT", - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "target_group" - }, - { - "type": "SYMBOL", - "name": "_statement" - } - ] - }, - { - "type": "PATTERN", - "value": "\\r?\\n" - } - ] - } + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "target_group" + }, + { + "type": "SYMBOL", + "name": "_statement" + } + ] + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "\\r?\\n" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "target_group" + }, + { + "type": "SYMBOL", + "name": "_statement" + } + ] + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\r?\\n" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" + } + ] + }, + "_statement": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "import" + }, + { + "type": "SYMBOL", + "name": "public_constant" + }, + { + "type": "SYMBOL", + "name": "constant" + } + ] }, "target_group": { "type": "SEQ", @@ -46,15 +106,54 @@ "value": "{" }, { - "type": "FIELD", - "name": "body", - "content": { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "_statement" + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_statement" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "\\r?\\n" + }, + { + "type": "SYMBOL", + "name": "_statement" + } + ] + } + } + ] + }, + { + "type": "CHOICE", + "members": [ + { + "type": "PATTERN", + "value": "\\r?\\n" + }, + { + "type": "BLANK" + } + ] + } + ] + }, + { + "type": "BLANK" } - } + ] }, { "type": "STRING", @@ -62,15 +161,6 @@ } ] }, - "_statement": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "import" - } - ] - }, "target": { "type": "CHOICE", "members": [ @@ -283,6 +373,436 @@ "type": "SYMBOL", "name": "_name" }, + "public_constant": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "pub" + }, + { + "type": "SYMBOL", + "name": "_constant" + } + ] + }, + "constant": { + "type": "SYMBOL", + "name": "_constant" + }, + "_constant": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "const" + }, + { + "type": "FIELD", + "name": "name", + "content": { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_name" + }, + "named": true, + "value": "identifier" + } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_type_annotation" + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": "=" + }, + { + "type": "FIELD", + "name": "value", + "content": { + "type": "SYMBOL", + "name": "_literal" + } + } + ] + }, + "_literal": { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "string" + }, + { + "type": "SYMBOL", + "name": "float" + }, + { + "type": "SYMBOL", + "name": "integer" + }, + { + "type": "SYMBOL", + "name": "tuple" + }, + { + "type": "SYMBOL", + "name": "list" + } + ] + }, + "string": { + "type": "PATTERN", + "value": "\\\"(?:\\\\[efnrt\\\"\\\\]|[^\\\"])*\\\"" + }, + "float": { + "type": "PATTERN", + "value": "-?[0-9_]+\\.[0-9_]+" + }, + "integer": { + "type": "PATTERN", + "value": "-?[0-9_]+" + }, + "tuple": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_literal" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "list": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "[" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_literal" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_literal" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": "]" + } + ] + }, + "_type_annotation": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": ":" + }, + { + "type": "FIELD", + "name": "type", + "content": { + "type": "SYMBOL", + "name": "_type" + } + } + ] + }, + "_type": { + "type": "CHOICE", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_discard_name" + }, + "named": true, + "value": "type_hole" + }, + { + "type": "SYMBOL", + "name": "tuple_type" + }, + { + "type": "SYMBOL", + "name": "fn_type" + }, + { + "type": "SYMBOL", + "name": "type_constructor" + }, + { + "type": "SYMBOL", + "name": "remote_type_constructor" + }, + { + "type": "SYMBOL", + "name": "type_var" + } + ] + }, + "tuple_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "#" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "BLANK" + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + "fn_type": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "fn" + }, + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_type" + }, + "named": true, + "value": "argument_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_type" + }, + "named": true, + "value": "argument_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + }, + { + "type": "STRING", + "value": "->" + }, + { + "type": "ALIAS", + "content": { + "type": "SYMBOL", + "name": "_type" + }, + "named": true, + "value": "return_type" + } + ] + }, + "type_constructor": { + "type": "SYMBOL", + "name": "_type_constructor" + }, + "remote_type_constructor": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_name" + }, + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "_type_constructor" + } + ] + }, + "_type_constructor": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_upname" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "(" + }, + { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_type" + }, + { + "type": "REPEAT", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "," + }, + { + "type": "SYMBOL", + "name": "_type" + } + ] + } + } + ] + }, + { + "type": "STRING", + "value": ")" + } + ] + }, + { + "type": "BLANK" + } + ] + } + ] + }, + "type_var": { + "type": "SYMBOL", + "name": "_name" + }, + "_discard_name": { + "type": "PATTERN", + "value": "_[_0-9a-z]*" + }, "_name": { "type": "PATTERN", "value": "[_a-z][_0-9a-z]*" @@ -298,12 +818,8 @@ "value": ";" }, { - "type": "STRING", - "value": "\n" - }, - { - "type": "STRING", - "value": "\r\n" + "type": "PATTERN", + "value": "\\r?\\n" }, { "type": "PATTERN", diff --git a/src/node-types.json b/src/node-types.json index 9ef6e2145..eaf540691 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -4,6 +4,132 @@ "named": true, "fields": {} }, + { + "type": "argument_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + } + }, + { + "type": "constant", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "tuple", + "named": true + } + ] + } + } + }, + { + "type": "fn_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "argument_type", + "named": true + }, + { + "type": "return_type", + "named": true + } + ] + } + }, { "type": "import", "named": true, @@ -40,11 +166,184 @@ ] } }, + { + "type": "list", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "tuple", + "named": true + } + ] + } + }, { "type": "module", "named": true, "fields": {} }, + { + "type": "public_constant", + "named": true, + "fields": { + "name": { + "multiple": false, + "required": true, + "types": [ + { + "type": "identifier", + "named": true + } + ] + }, + "type": { + "multiple": false, + "required": false, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + }, + "value": { + "multiple": false, + "required": true, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "tuple", + "named": true + } + ] + } + } + }, + { + "type": "remote_type_constructor", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + } + }, + { + "type": "return_type", + "named": true, + "fields": {}, + "children": { + "multiple": false, + "required": true, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + } + }, { "type": "source_file", "named": true, @@ -53,10 +352,18 @@ "multiple": true, "required": false, "types": [ + { + "type": "constant", + "named": true + }, { "type": "import", "named": true }, + { + "type": "public_constant", + "named": true + }, { "type": "target_group", "named": true @@ -73,16 +380,6 @@ "type": "target_group", "named": true, "fields": { - "body": { - "multiple": true, - "required": false, - "types": [ - { - "type": "import", - "named": true - } - ] - }, "target": { "multiple": false, "required": true, @@ -93,8 +390,132 @@ } ] } + }, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "constant", + "named": true + }, + { + "type": "import", + "named": true + }, + { + "type": "public_constant", + "named": true + } + ] + } + }, + { + "type": "tuple", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": true, + "types": [ + { + "type": "float", + "named": true + }, + { + "type": "integer", + "named": true + }, + { + "type": "list", + "named": true + }, + { + "type": "string", + "named": true + }, + { + "type": "tuple", + "named": true + } + ] + } + }, + { + "type": "tuple_type", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] + } + }, + { + "type": "type_constructor", + "named": true, + "fields": {}, + "children": { + "multiple": true, + "required": false, + "types": [ + { + "type": "fn_type", + "named": true + }, + { + "type": "remote_type_constructor", + "named": true + }, + { + "type": "tuple_type", + "named": true + }, + { + "type": "type_constructor", + "named": true + }, + { + "type": "type_hole", + "named": true + }, + { + "type": "type_var", + "named": true + } + ] } }, + { + "type": "type_var", + "named": true, + "fields": {} + }, { "type": "unqualified_import", "named": true, @@ -111,10 +532,26 @@ } } }, + { + "type": "#", + "named": false + }, + { + "type": "(", + "named": false + }, + { + "type": ")", + "named": false + }, { "type": ",", "named": false }, + { + "type": "->", + "named": false + }, { "type": ".", "named": false @@ -123,14 +560,46 @@ "type": "/", "named": false }, + { + "type": ":", + "named": false + }, + { + "type": "=", + "named": false + }, + { + "type": "[", + "named": false + }, + { + "type": "]", + "named": false + }, { "type": "as", "named": false }, + { + "type": "const", + "named": false + }, { "type": "erlang", "named": false }, + { + "type": "float", + "named": true + }, + { + "type": "fn", + "named": false + }, + { + "type": "identifier", + "named": true + }, { "type": "if", "named": false @@ -139,10 +608,26 @@ "type": "import", "named": false }, + { + "type": "integer", + "named": true + }, { "type": "javascript", "named": false }, + { + "type": "pub", + "named": false + }, + { + "type": "string", + "named": true + }, + { + "type": "type_hole", + "named": true + }, { "type": "{", "named": false diff --git a/src/parser.c b/src/parser.c index a0f166282..30a7748be 100644 --- a/src/parser.c +++ b/src/parser.c @@ -6,15 +6,15 @@ #endif #define LANGUAGE_VERSION 13 -#define STATE_COUNT 63 +#define STATE_COUNT 165 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 26 -#define ALIAS_COUNT 0 -#define TOKEN_COUNT 14 +#define SYMBOL_COUNT 58 +#define ALIAS_COUNT 3 +#define TOKEN_COUNT 29 #define EXTERNAL_TOKEN_COUNT 0 -#define FIELD_COUNT 4 +#define FIELD_COUNT 6 #define MAX_ALIAS_SEQUENCE_LENGTH 9 -#define PRODUCTION_ID_COUNT 8 +#define PRODUCTION_ID_COUNT 15 enum { aux_sym_source_file_token1 = 1, @@ -28,20 +28,55 @@ enum { anon_sym_COMMA = 9, anon_sym_as = 10, anon_sym_SLASH = 11, - sym__name = 12, - sym__upname = 13, - sym_source_file = 14, - sym_target_group = 15, - sym__statement = 16, - sym_target = 17, - sym_import = 18, - sym_module = 19, - sym_unqualified_import = 20, - sym_alias = 21, - aux_sym_source_file_repeat1 = 22, - aux_sym_target_group_repeat1 = 23, - aux_sym_import_repeat1 = 24, - aux_sym_module_repeat1 = 25, + anon_sym_pub = 12, + anon_sym_const = 13, + anon_sym_EQ = 14, + sym_string = 15, + sym_float = 16, + sym_integer = 17, + anon_sym_POUND = 18, + anon_sym_LPAREN = 19, + anon_sym_RPAREN = 20, + anon_sym_LBRACK = 21, + anon_sym_RBRACK = 22, + anon_sym_COLON = 23, + anon_sym_fn = 24, + anon_sym_DASH_GT = 25, + sym__discard_name = 26, + sym__name = 27, + sym__upname = 28, + sym_source_file = 29, + sym__statement = 30, + sym_target_group = 31, + sym_target = 32, + sym_import = 33, + sym_module = 34, + sym_unqualified_import = 35, + sym_alias = 36, + sym_public_constant = 37, + sym_constant = 38, + sym__constant = 39, + sym__literal = 40, + sym_tuple = 41, + sym_list = 42, + sym__type_annotation = 43, + sym__type = 44, + sym_tuple_type = 45, + sym_fn_type = 46, + sym_type_constructor = 47, + sym_remote_type_constructor = 48, + sym__type_constructor = 49, + sym_type_var = 50, + aux_sym_source_file_repeat1 = 51, + aux_sym_target_group_repeat1 = 52, + aux_sym_import_repeat1 = 53, + aux_sym_module_repeat1 = 54, + aux_sym_tuple_repeat1 = 55, + aux_sym_tuple_type_repeat1 = 56, + aux_sym_fn_type_repeat1 = 57, + alias_sym_argument_type = 58, + alias_sym_identifier = 59, + alias_sym_return_type = 60, }; static const char * const ts_symbol_names[] = { @@ -57,20 +92,55 @@ static const char * const ts_symbol_names[] = { [anon_sym_COMMA] = ",", [anon_sym_as] = "as", [anon_sym_SLASH] = "/", + [anon_sym_pub] = "pub", + [anon_sym_const] = "const", + [anon_sym_EQ] = "=", + [sym_string] = "string", + [sym_float] = "float", + [sym_integer] = "integer", + [anon_sym_POUND] = "#", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_COLON] = ":", + [anon_sym_fn] = "fn", + [anon_sym_DASH_GT] = "->", + [sym__discard_name] = "type_hole", [sym__name] = "_name", [sym__upname] = "_upname", [sym_source_file] = "source_file", - [sym_target_group] = "target_group", [sym__statement] = "_statement", + [sym_target_group] = "target_group", [sym_target] = "target", [sym_import] = "import", [sym_module] = "module", [sym_unqualified_import] = "unqualified_import", [sym_alias] = "alias", + [sym_public_constant] = "public_constant", + [sym_constant] = "constant", + [sym__constant] = "_constant", + [sym__literal] = "_literal", + [sym_tuple] = "tuple", + [sym_list] = "list", + [sym__type_annotation] = "_type_annotation", + [sym__type] = "_type", + [sym_tuple_type] = "tuple_type", + [sym_fn_type] = "fn_type", + [sym_type_constructor] = "type_constructor", + [sym_remote_type_constructor] = "remote_type_constructor", + [sym__type_constructor] = "_type_constructor", + [sym_type_var] = "type_var", [aux_sym_source_file_repeat1] = "source_file_repeat1", [aux_sym_target_group_repeat1] = "target_group_repeat1", [aux_sym_import_repeat1] = "import_repeat1", [aux_sym_module_repeat1] = "module_repeat1", + [aux_sym_tuple_repeat1] = "tuple_repeat1", + [aux_sym_tuple_type_repeat1] = "tuple_type_repeat1", + [aux_sym_fn_type_repeat1] = "fn_type_repeat1", + [alias_sym_argument_type] = "argument_type", + [alias_sym_identifier] = "identifier", + [alias_sym_return_type] = "return_type", }; static const TSSymbol ts_symbol_map[] = { @@ -86,20 +156,55 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_COMMA] = anon_sym_COMMA, [anon_sym_as] = anon_sym_as, [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_pub] = anon_sym_pub, + [anon_sym_const] = anon_sym_const, + [anon_sym_EQ] = anon_sym_EQ, + [sym_string] = sym_string, + [sym_float] = sym_float, + [sym_integer] = sym_integer, + [anon_sym_POUND] = anon_sym_POUND, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_fn] = anon_sym_fn, + [anon_sym_DASH_GT] = anon_sym_DASH_GT, + [sym__discard_name] = sym__discard_name, [sym__name] = sym__name, [sym__upname] = sym__upname, [sym_source_file] = sym_source_file, - [sym_target_group] = sym_target_group, [sym__statement] = sym__statement, + [sym_target_group] = sym_target_group, [sym_target] = sym_target, [sym_import] = sym_import, [sym_module] = sym_module, [sym_unqualified_import] = sym_unqualified_import, [sym_alias] = sym_alias, + [sym_public_constant] = sym_public_constant, + [sym_constant] = sym_constant, + [sym__constant] = sym__constant, + [sym__literal] = sym__literal, + [sym_tuple] = sym_tuple, + [sym_list] = sym_list, + [sym__type_annotation] = sym__type_annotation, + [sym__type] = sym__type, + [sym_tuple_type] = sym_tuple_type, + [sym_fn_type] = sym_fn_type, + [sym_type_constructor] = sym_type_constructor, + [sym_remote_type_constructor] = sym_remote_type_constructor, + [sym__type_constructor] = sym__type_constructor, + [sym_type_var] = sym_type_var, [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, [aux_sym_target_group_repeat1] = aux_sym_target_group_repeat1, [aux_sym_import_repeat1] = aux_sym_import_repeat1, [aux_sym_module_repeat1] = aux_sym_module_repeat1, + [aux_sym_tuple_repeat1] = aux_sym_tuple_repeat1, + [aux_sym_tuple_type_repeat1] = aux_sym_tuple_type_repeat1, + [aux_sym_fn_type_repeat1] = aux_sym_fn_type_repeat1, + [alias_sym_argument_type] = alias_sym_argument_type, + [alias_sym_identifier] = alias_sym_identifier, + [alias_sym_return_type] = alias_sym_return_type, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -151,6 +256,66 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, + [anon_sym_pub] = { + .visible = true, + .named = false, + }, + [anon_sym_const] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_float] = { + .visible = true, + .named = true, + }, + [sym_integer] = { + .visible = true, + .named = true, + }, + [anon_sym_POUND] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_fn] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH_GT] = { + .visible = true, + .named = false, + }, + [sym__discard_name] = { + .visible = true, + .named = true, + }, [sym__name] = { .visible = false, .named = true, @@ -163,14 +328,14 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_target_group] = { - .visible = true, - .named = true, - }, [sym__statement] = { .visible = false, .named = true, }, + [sym_target_group] = { + .visible = true, + .named = true, + }, [sym_target] = { .visible = true, .named = true, @@ -191,6 +356,62 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym_public_constant] = { + .visible = true, + .named = true, + }, + [sym_constant] = { + .visible = true, + .named = true, + }, + [sym__constant] = { + .visible = false, + .named = true, + }, + [sym__literal] = { + .visible = false, + .named = true, + }, + [sym_tuple] = { + .visible = true, + .named = true, + }, + [sym_list] = { + .visible = true, + .named = true, + }, + [sym__type_annotation] = { + .visible = false, + .named = true, + }, + [sym__type] = { + .visible = false, + .named = true, + }, + [sym_tuple_type] = { + .visible = true, + .named = true, + }, + [sym_fn_type] = { + .visible = true, + .named = true, + }, + [sym_type_constructor] = { + .visible = true, + .named = true, + }, + [sym_remote_type_constructor] = { + .visible = true, + .named = true, + }, + [sym__type_constructor] = { + .visible = false, + .named = true, + }, + [sym_type_var] = { + .visible = true, + .named = true, + }, [aux_sym_source_file_repeat1] = { .visible = false, .named = false, @@ -207,62 +428,129 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = false, }, + [aux_sym_tuple_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_tuple_type_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_fn_type_repeat1] = { + .visible = false, + .named = false, + }, + [alias_sym_argument_type] = { + .visible = true, + .named = true, + }, + [alias_sym_identifier] = { + .visible = true, + .named = true, + }, + [alias_sym_return_type] = { + .visible = true, + .named = true, + }, }; enum { field_alias = 1, - field_body = 2, - field_module = 3, + field_module = 2, + field_name = 3, field_target = 4, + field_type = 5, + field_value = 6, }; static const char * const ts_field_names[] = { [0] = NULL, [field_alias] = "alias", - [field_body] = "body", [field_module] = "module", + [field_name] = "name", [field_target] = "target", + [field_type] = "type", + [field_value] = "value", }; static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { - [1] = {.index = 0, .length = 1}, - [2] = {.index = 1, .length = 1}, - [3] = {.index = 2, .length = 2}, - [4] = {.index = 4, .length = 2}, - [5] = {.index = 6, .length = 1}, - [6] = {.index = 7, .length = 2}, - [7] = {.index = 9, .length = 2}, + [1] = {.index = 0, .length = 3}, + [2] = {.index = 3, .length = 1}, + [3] = {.index = 4, .length = 3}, + [4] = {.index = 7, .length = 1}, + [5] = {.index = 8, .length = 2}, + [6] = {.index = 10, .length = 2}, + [7] = {.index = 12, .length = 1}, + [8] = {.index = 13, .length = 3}, + [9] = {.index = 16, .length = 1}, + [10] = {.index = 17, .length = 2}, + [12] = {.index = 19, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { [0] = + {field_name, 0, .inherited = true}, + {field_type, 0, .inherited = true}, + {field_value, 0, .inherited = true}, + [3] = {field_module, 1}, - [1] = + [4] = + {field_name, 1, .inherited = true}, + {field_type, 1, .inherited = true}, + {field_value, 1, .inherited = true}, + [7] = {field_target, 1}, - [2] = + [8] = {field_alias, 3}, {field_module, 1}, - [4] = - {field_body, 3}, - {field_target, 1}, - [6] = + [10] = + {field_name, 1}, + {field_value, 3}, + [12] = + {field_type, 1}, + [13] = + {field_name, 1}, + {field_type, 2, .inherited = true}, + {field_value, 4}, + [16] = {field_alias, 2}, - [7] = + [17] = {field_alias, 7}, {field_module, 1}, - [9] = + [19] = {field_alias, 8}, {field_module, 1}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { [0] = {0}, - [5] = { + [6] = { + [1] = alias_sym_identifier, + }, + [8] = { + [1] = alias_sym_identifier, + }, + [9] = { [2] = sym_alias, }, + [11] = { + [1] = alias_sym_argument_type, + }, + [13] = { + [2] = alias_sym_argument_type, + [5] = alias_sym_return_type, + }, + [14] = { + [2] = alias_sym_argument_type, + [6] = alias_sym_return_type, + }, }; static const uint16_t ts_non_terminal_alias_map[] = { + sym__type, 3, + sym__type, + alias_sym_argument_type, + alias_sym_return_type, 0, }; @@ -271,171 +559,352 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(24); + if (eof) ADVANCE(37); + if (lookahead == '\n') ADVANCE(38); + if (lookahead == '\r') ADVANCE(1); + if (lookahead == '"') ADVANCE(5); + if (lookahead == '#') ADVANCE(60); + if (lookahead == '(') ADVANCE(61); + if (lookahead == ')') ADVANCE(62); + if (lookahead == ',') ADVANCE(49); + if (lookahead == '-') ADVANCE(7); + if (lookahead == '.') ADVANCE(48); + if (lookahead == '/') ADVANCE(51); + if (lookahead == ':') ADVANCE(65); if (lookahead == '\t' || - lookahead == '\n' || lookahead == ' ' || lookahead == ';') SKIP(0) - if (lookahead == '\r') SKIP(23) - if (lookahead == ',') ADVANCE(33); - if (lookahead == '.') ADVANCE(32); - if (lookahead == '/') ADVANCE(35); - if (lookahead == 'a') ADVANCE(17); - if (lookahead == 'e') ADVANCE(14); - if (lookahead == 'i') ADVANCE(6); - if (lookahead == 'j') ADVANCE(2); - if (lookahead == '{') ADVANCE(27); - if (lookahead == '}') ADVANCE(28); - if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(37); + if (lookahead == '=') ADVANCE(54); + if (lookahead == '[') ADVANCE(63); + if (lookahead == ']') ADVANCE(64); + if (lookahead == '_') ADVANCE(58); + if (lookahead == 'a') ADVANCE(27); + if (lookahead == 'c') ADVANCE(21); + if (lookahead == 'e') ADVANCE(24); + if (lookahead == 'f') ADVANCE(17); + if (lookahead == 'i') ADVANCE(13); + if (lookahead == 'j') ADVANCE(8); + if (lookahead == 'p') ADVANCE(33); + if (lookahead == '{') ADVANCE(43); + if (lookahead == '}') ADVANCE(44); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(59); + if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(25); + if (lookahead == '\n') ADVANCE(38); if (lookahead == '\r') ADVANCE(1); - if (lookahead == '.') ADVANCE(32); - if (lookahead == '/') ADVANCE(35); + if (lookahead == '"') ADVANCE(5); + if (lookahead == '#') ADVANCE(60); + if (lookahead == '(') ADVANCE(61); + if (lookahead == ')') ADVANCE(62); + if (lookahead == ',') ADVANCE(49); + if (lookahead == '-') ADVANCE(7); + if (lookahead == '.') ADVANCE(48); + if (lookahead == '/') ADVANCE(51); + if (lookahead == ':') ADVANCE(65); if (lookahead == '\t' || lookahead == ' ' || lookahead == ';') SKIP(1) - if (lookahead == 'a') ADVANCE(17); + if (lookahead == '=') ADVANCE(54); + if (lookahead == '[') ADVANCE(63); + if (lookahead == ']') ADVANCE(64); + if (lookahead == '_') ADVANCE(58); + if (lookahead == 'a') ADVANCE(27); + if (lookahead == 'c') ADVANCE(21); + if (lookahead == 'e') ADVANCE(24); + if (lookahead == 'f') ADVANCE(17); + if (lookahead == 'i') ADVANCE(13); + if (lookahead == 'j') ADVANCE(8); + if (lookahead == 'p') ADVANCE(33); + if (lookahead == '{') ADVANCE(43); + if (lookahead == '}') ADVANCE(44); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(59); + if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); END_STATE(); case 2: - if (lookahead == 'a') ADVANCE(21); + if (lookahead == '\n') ADVANCE(39); + if (lookahead == '\r') ADVANCE(2); + if (lookahead == '#') ADVANCE(60); + if (lookahead == ')') ADVANCE(62); + if (lookahead == '\t' || + lookahead == ' ' || + lookahead == ';') SKIP(2) + if (lookahead == '_') ADVANCE(69); + if (lookahead == 'f') ADVANCE(70); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); END_STATE(); case 3: - if (lookahead == 'a') ADVANCE(10); + if (lookahead == '\n') ADVANCE(40); + if (lookahead == '\r') ADVANCE(3); + if (lookahead == '"') ADVANCE(5); + if (lookahead == '#') ADVANCE(60); + if (lookahead == '-') ADVANCE(35); + if (lookahead == '\t' || + lookahead == ' ' || + lookahead == ';') SKIP(3) + if (lookahead == '[') ADVANCE(63); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(59); END_STATE(); case 4: - if (lookahead == 'a') ADVANCE(18); + if (lookahead == '\n') ADVANCE(41); + if (lookahead == '\r') ADVANCE(4); + if (lookahead == '\t' || + lookahead == ' ' || + lookahead == ';') SKIP(4) + if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(72); + if (lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); END_STATE(); case 5: - if (lookahead == 'c') ADVANCE(16); + if (lookahead == '"') ADVANCE(55); + if (lookahead == '\\') ADVANCE(6); + if (lookahead != 0) ADVANCE(5); END_STATE(); case 6: - if (lookahead == 'f') ADVANCE(26); - if (lookahead == 'm') ADVANCE(12); + if (lookahead == '"') ADVANCE(56); + if (lookahead == '\\') ADVANCE(6); + if (lookahead != 0) ADVANCE(5); END_STATE(); case 7: - if (lookahead == 'g') ADVANCE(29); + if (lookahead == '>') ADVANCE(68); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(59); END_STATE(); case 8: - if (lookahead == 'i') ADVANCE(13); + if (lookahead == 'a') ADVANCE(34); END_STATE(); case 9: - if (lookahead == 'l') ADVANCE(3); + if (lookahead == 'a') ADVANCE(29); END_STATE(); case 10: - if (lookahead == 'n') ADVANCE(7); + if (lookahead == 'a') ADVANCE(18); END_STATE(); case 11: - if (lookahead == 'o') ADVANCE(15); + if (lookahead == 'b') ADVANCE(52); END_STATE(); case 12: - if (lookahead == 'p') ADVANCE(11); + if (lookahead == 'c') ADVANCE(25); END_STATE(); case 13: - if (lookahead == 'p') ADVANCE(20); + if (lookahead == 'f') ADVANCE(42); + if (lookahead == 'm') ADVANCE(22); END_STATE(); case 14: - if (lookahead == 'r') ADVANCE(9); + if (lookahead == 'g') ADVANCE(45); END_STATE(); case 15: - if (lookahead == 'r') ADVANCE(19); + if (lookahead == 'i') ADVANCE(23); END_STATE(); case 16: - if (lookahead == 'r') ADVANCE(8); + if (lookahead == 'l') ADVANCE(10); END_STATE(); case 17: - if (lookahead == 's') ADVANCE(34); + if (lookahead == 'n') ADVANCE(66); END_STATE(); case 18: - if (lookahead == 's') ADVANCE(5); + if (lookahead == 'n') ADVANCE(14); END_STATE(); case 19: - if (lookahead == 't') ADVANCE(31); + if (lookahead == 'n') ADVANCE(28); END_STATE(); case 20: - if (lookahead == 't') ADVANCE(30); + if (lookahead == 'o') ADVANCE(26); END_STATE(); case 21: - if (lookahead == 'v') ADVANCE(4); + if (lookahead == 'o') ADVANCE(19); END_STATE(); case 22: - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == ' ' || - lookahead == ';') SKIP(22) - if (lookahead == '\r') SKIP(22) - if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(37); - if (lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + if (lookahead == 'p') ADVANCE(20); END_STATE(); case 23: - if (eof) ADVANCE(24); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == ' ' || - lookahead == ';') SKIP(0) - if (lookahead == '\r') SKIP(23) - if (lookahead == ',') ADVANCE(33); - if (lookahead == '.') ADVANCE(32); - if (lookahead == '/') ADVANCE(35); - if (lookahead == 'a') ADVANCE(17); - if (lookahead == 'e') ADVANCE(14); - if (lookahead == 'i') ADVANCE(6); - if (lookahead == 'j') ADVANCE(2); - if (lookahead == '{') ADVANCE(27); - if (lookahead == '}') ADVANCE(28); - if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(37); + if (lookahead == 'p') ADVANCE(32); END_STATE(); case 24: - ACCEPT_TOKEN(ts_builtin_sym_end); + if (lookahead == 'r') ADVANCE(16); END_STATE(); case 25: + if (lookahead == 'r') ADVANCE(15); + END_STATE(); + case 26: + if (lookahead == 'r') ADVANCE(31); + END_STATE(); + case 27: + if (lookahead == 's') ADVANCE(50); + END_STATE(); + case 28: + if (lookahead == 's') ADVANCE(30); + END_STATE(); + case 29: + if (lookahead == 's') ADVANCE(12); + END_STATE(); + case 30: + if (lookahead == 't') ADVANCE(53); + END_STATE(); + case 31: + if (lookahead == 't') ADVANCE(47); + END_STATE(); + case 32: + if (lookahead == 't') ADVANCE(46); + END_STATE(); + case 33: + if (lookahead == 'u') ADVANCE(11); + END_STATE(); + case 34: + if (lookahead == 'v') ADVANCE(9); + END_STATE(); + case 35: + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(59); + END_STATE(); + case 36: + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(57); + END_STATE(); + case 37: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 38: ACCEPT_TOKEN(aux_sym_source_file_token1); - if (lookahead == '\n') ADVANCE(25); + if (lookahead == '\n') ADVANCE(38); if (lookahead == '\r') ADVANCE(1); END_STATE(); - case 26: + case 39: + ACCEPT_TOKEN(aux_sym_source_file_token1); + if (lookahead == '\n') ADVANCE(39); + if (lookahead == '\r') ADVANCE(2); + END_STATE(); + case 40: + ACCEPT_TOKEN(aux_sym_source_file_token1); + if (lookahead == '\n') ADVANCE(40); + if (lookahead == '\r') ADVANCE(3); + END_STATE(); + case 41: + ACCEPT_TOKEN(aux_sym_source_file_token1); + if (lookahead == '\n') ADVANCE(41); + if (lookahead == '\r') ADVANCE(4); + END_STATE(); + case 42: ACCEPT_TOKEN(anon_sym_if); END_STATE(); - case 27: + case 43: ACCEPT_TOKEN(anon_sym_LBRACE); END_STATE(); - case 28: + case 44: ACCEPT_TOKEN(anon_sym_RBRACE); END_STATE(); - case 29: + case 45: ACCEPT_TOKEN(anon_sym_erlang); END_STATE(); - case 30: + case 46: ACCEPT_TOKEN(anon_sym_javascript); END_STATE(); - case 31: + case 47: ACCEPT_TOKEN(anon_sym_import); END_STATE(); - case 32: + case 48: ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); - case 33: + case 49: ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); - case 34: + case 50: ACCEPT_TOKEN(anon_sym_as); END_STATE(); - case 35: + case 51: ACCEPT_TOKEN(anon_sym_SLASH); END_STATE(); - case 36: + case 52: + ACCEPT_TOKEN(anon_sym_pub); + END_STATE(); + case 53: + ACCEPT_TOKEN(anon_sym_const); + END_STATE(); + case 54: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 55: + ACCEPT_TOKEN(sym_string); + END_STATE(); + case 56: + ACCEPT_TOKEN(sym_string); + if (lookahead == '"') ADVANCE(55); + if (lookahead == '\\') ADVANCE(6); + if (lookahead != 0) ADVANCE(5); + END_STATE(); + case 57: + ACCEPT_TOKEN(sym_float); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(57); + END_STATE(); + case 58: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(36); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(58); + if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(69); + END_STATE(); + case 59: + ACCEPT_TOKEN(sym_integer); + if (lookahead == '.') ADVANCE(36); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_') ADVANCE(59); + END_STATE(); + case 60: + ACCEPT_TOKEN(anon_sym_POUND); + END_STATE(); + case 61: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 62: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 63: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 64: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 65: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 66: + ACCEPT_TOKEN(anon_sym_fn); + END_STATE(); + case 67: + ACCEPT_TOKEN(anon_sym_fn); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + END_STATE(); + case 68: + ACCEPT_TOKEN(anon_sym_DASH_GT); + END_STATE(); + case 69: + ACCEPT_TOKEN(sym__discard_name); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(69); + END_STATE(); + case 70: ACCEPT_TOKEN(sym__name); + if (lookahead == 'n') ADVANCE(67); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(36); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); END_STATE(); - case 37: + case 71: + ACCEPT_TOKEN(sym__name); + if (('0' <= lookahead && lookahead <= '9') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(71); + END_STATE(); + case 72: ACCEPT_TOKEN(sym__upname); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(37); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(72); END_STATE(); default: return false; @@ -445,72 +914,175 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, [1] = {.lex_state = 0}, - [2] = {.lex_state = 0}, - [3] = {.lex_state = 0}, - [4] = {.lex_state = 0}, - [5] = {.lex_state = 0}, - [6] = {.lex_state = 0}, - [7] = {.lex_state = 0}, - [8] = {.lex_state = 0}, - [9] = {.lex_state = 0}, - [10] = {.lex_state = 1}, - [11] = {.lex_state = 1}, + [2] = {.lex_state = 2}, + [3] = {.lex_state = 2}, + [4] = {.lex_state = 2}, + [5] = {.lex_state = 2}, + [6] = {.lex_state = 2}, + [7] = {.lex_state = 2}, + [8] = {.lex_state = 2}, + [9] = {.lex_state = 2}, + [10] = {.lex_state = 0}, + [11] = {.lex_state = 0}, [12] = {.lex_state = 0}, - [13] = {.lex_state = 1}, + [13] = {.lex_state = 0}, [14] = {.lex_state = 0}, - [15] = {.lex_state = 1}, - [16] = {.lex_state = 22}, - [17] = {.lex_state = 0}, - [18] = {.lex_state = 0}, - [19] = {.lex_state = 22}, - [20] = {.lex_state = 0}, + [15] = {.lex_state = 0}, + [16] = {.lex_state = 3}, + [17] = {.lex_state = 3}, + [18] = {.lex_state = 3}, + [19] = {.lex_state = 3}, + [20] = {.lex_state = 3}, [21] = {.lex_state = 0}, - [22] = {.lex_state = 0}, - [23] = {.lex_state = 0}, - [24] = {.lex_state = 1}, - [25] = {.lex_state = 0}, - [26] = {.lex_state = 0}, - [27] = {.lex_state = 0}, + [22] = {.lex_state = 3}, + [23] = {.lex_state = 3}, + [24] = {.lex_state = 3}, + [25] = {.lex_state = 3}, + [26] = {.lex_state = 3}, + [27] = {.lex_state = 3}, [28] = {.lex_state = 0}, [29] = {.lex_state = 0}, - [30] = {.lex_state = 22}, + [30] = {.lex_state = 0}, [31] = {.lex_state = 0}, - [32] = {.lex_state = 1}, - [33] = {.lex_state = 22}, - [34] = {.lex_state = 22}, + [32] = {.lex_state = 0}, + [33] = {.lex_state = 0}, + [34] = {.lex_state = 0}, [35] = {.lex_state = 0}, - [36] = {.lex_state = 22}, + [36] = {.lex_state = 0}, [37] = {.lex_state = 0}, - [38] = {.lex_state = 1}, - [39] = {.lex_state = 22}, - [40] = {.lex_state = 22}, - [41] = {.lex_state = 22}, + [38] = {.lex_state = 0}, + [39] = {.lex_state = 0}, + [40] = {.lex_state = 0}, + [41] = {.lex_state = 0}, [42] = {.lex_state = 0}, [43] = {.lex_state = 0}, - [44] = {.lex_state = 22}, - [45] = {.lex_state = 22}, + [44] = {.lex_state = 0}, + [45] = {.lex_state = 0}, [46] = {.lex_state = 0}, - [47] = {.lex_state = 22}, - [48] = {.lex_state = 1}, - [49] = {.lex_state = 1}, + [47] = {.lex_state = 0}, + [48] = {.lex_state = 0}, + [49] = {.lex_state = 0}, [50] = {.lex_state = 0}, [51] = {.lex_state = 0}, - [52] = {.lex_state = 22}, - [53] = {.lex_state = 1}, - [54] = {.lex_state = 1}, - [55] = {.lex_state = 1}, - [56] = {.lex_state = 1}, - [57] = {.lex_state = 22}, + [52] = {.lex_state = 0}, + [53] = {.lex_state = 0}, + [54] = {.lex_state = 0}, + [55] = {.lex_state = 0}, + [56] = {.lex_state = 0}, + [57] = {.lex_state = 0}, [58] = {.lex_state = 0}, [59] = {.lex_state = 0}, [60] = {.lex_state = 0}, - [61] = {.lex_state = 1}, + [61] = {.lex_state = 0}, [62] = {.lex_state = 0}, + [63] = {.lex_state = 0}, + [64] = {.lex_state = 4}, + [65] = {.lex_state = 0}, + [66] = {.lex_state = 0}, + [67] = {.lex_state = 4}, + [68] = {.lex_state = 0}, + [69] = {.lex_state = 0}, + [70] = {.lex_state = 0}, + [71] = {.lex_state = 0}, + [72] = {.lex_state = 0}, + [73] = {.lex_state = 0}, + [74] = {.lex_state = 0}, + [75] = {.lex_state = 0}, + [76] = {.lex_state = 0}, + [77] = {.lex_state = 0}, + [78] = {.lex_state = 0}, + [79] = {.lex_state = 0}, + [80] = {.lex_state = 0}, + [81] = {.lex_state = 0}, + [82] = {.lex_state = 0}, + [83] = {.lex_state = 0}, + [84] = {.lex_state = 0}, + [85] = {.lex_state = 0}, + [86] = {.lex_state = 0}, + [87] = {.lex_state = 4}, + [88] = {.lex_state = 0}, + [89] = {.lex_state = 0}, + [90] = {.lex_state = 0}, + [91] = {.lex_state = 0}, + [92] = {.lex_state = 0}, + [93] = {.lex_state = 4}, + [94] = {.lex_state = 0}, + [95] = {.lex_state = 4}, + [96] = {.lex_state = 0}, + [97] = {.lex_state = 0}, + [98] = {.lex_state = 4}, + [99] = {.lex_state = 4}, + [100] = {.lex_state = 0}, + [101] = {.lex_state = 0}, + [102] = {.lex_state = 0}, + [103] = {.lex_state = 0}, + [104] = {.lex_state = 0}, + [105] = {.lex_state = 4}, + [106] = {.lex_state = 0}, + [107] = {.lex_state = 4}, + [108] = {.lex_state = 0}, + [109] = {.lex_state = 4}, + [110] = {.lex_state = 0}, + [111] = {.lex_state = 4}, + [112] = {.lex_state = 0}, + [113] = {.lex_state = 0}, + [114] = {.lex_state = 4}, + [115] = {.lex_state = 0}, + [116] = {.lex_state = 0}, + [117] = {.lex_state = 0}, + [118] = {.lex_state = 0}, + [119] = {.lex_state = 0}, + [120] = {.lex_state = 0}, + [121] = {.lex_state = 0}, + [122] = {.lex_state = 0}, + [123] = {.lex_state = 0}, + [124] = {.lex_state = 0}, + [125] = {.lex_state = 0}, + [126] = {.lex_state = 0}, + [127] = {.lex_state = 0}, + [128] = {.lex_state = 0}, + [129] = {.lex_state = 0}, + [130] = {.lex_state = 0}, + [131] = {.lex_state = 0}, + [132] = {.lex_state = 0}, + [133] = {.lex_state = 0}, + [134] = {.lex_state = 0}, + [135] = {.lex_state = 0}, + [136] = {.lex_state = 0}, + [137] = {.lex_state = 0}, + [138] = {.lex_state = 0}, + [139] = {.lex_state = 0}, + [140] = {.lex_state = 0}, + [141] = {.lex_state = 4}, + [142] = {.lex_state = 0}, + [143] = {.lex_state = 0}, + [144] = {.lex_state = 0}, + [145] = {.lex_state = 0}, + [146] = {.lex_state = 0}, + [147] = {.lex_state = 0}, + [148] = {.lex_state = 0}, + [149] = {.lex_state = 0}, + [150] = {.lex_state = 0}, + [151] = {.lex_state = 4}, + [152] = {.lex_state = 0}, + [153] = {.lex_state = 0}, + [154] = {.lex_state = 0}, + [155] = {.lex_state = 0}, + [156] = {.lex_state = 0}, + [157] = {.lex_state = 0}, + [158] = {.lex_state = 0}, + [159] = {.lex_state = 4}, + [160] = {.lex_state = 0}, + [161] = {.lex_state = 4}, + [162] = {.lex_state = 0}, + [163] = {.lex_state = 0}, + [164] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), + [aux_sym_source_file_token1] = ACTIONS(3), [anon_sym_if] = ACTIONS(1), [anon_sym_LBRACE] = ACTIONS(1), [anon_sym_RBRACE] = ACTIONS(1), @@ -521,511 +1093,1810 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_COMMA] = ACTIONS(1), [anon_sym_as] = ACTIONS(1), [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_pub] = ACTIONS(1), + [anon_sym_const] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [sym_string] = ACTIONS(1), + [sym_float] = ACTIONS(1), + [sym_integer] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_fn] = ACTIONS(1), + [anon_sym_DASH_GT] = ACTIONS(1), + [sym__discard_name] = ACTIONS(1), [sym__upname] = ACTIONS(1), }, [1] = { - [sym_source_file] = STATE(50), - [sym_target_group] = STATE(61), - [sym__statement] = STATE(61), - [sym_import] = STATE(61), - [aux_sym_source_file_repeat1] = STATE(2), - [ts_builtin_sym_end] = ACTIONS(3), - [anon_sym_if] = ACTIONS(5), - [anon_sym_import] = ACTIONS(7), + [sym_source_file] = STATE(158), + [sym__statement] = STATE(94), + [sym_target_group] = STATE(94), + [sym_import] = STATE(94), + [sym_public_constant] = STATE(94), + [sym_constant] = STATE(94), + [sym__constant] = STATE(156), + [ts_builtin_sym_end] = ACTIONS(5), + [aux_sym_source_file_token1] = ACTIONS(3), + [anon_sym_if] = ACTIONS(7), + [anon_sym_import] = ACTIONS(9), + [anon_sym_pub] = ACTIONS(11), + [anon_sym_const] = ACTIONS(13), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 5, - ACTIONS(5), 1, - anon_sym_if, - ACTIONS(7), 1, - anon_sym_import, - ACTIONS(9), 1, - ts_builtin_sym_end, - STATE(3), 1, - aux_sym_source_file_repeat1, - STATE(61), 3, - sym_target_group, - sym__statement, - sym_import, - [18] = 5, - ACTIONS(11), 1, - ts_builtin_sym_end, - ACTIONS(13), 1, - anon_sym_if, - ACTIONS(16), 1, - anon_sym_import, - STATE(3), 1, - aux_sym_source_file_repeat1, - STATE(61), 3, - sym_target_group, - sym__statement, - sym_import, - [36] = 3, + [0] = 10, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(17), 1, + anon_sym_RPAREN, + ACTIONS(19), 1, + anon_sym_fn, ACTIONS(21), 1, - anon_sym_SLASH, - STATE(4), 1, - aux_sym_module_repeat1, - ACTIONS(19), 4, - anon_sym_RBRACE, - anon_sym_import, - anon_sym_DOT, - anon_sym_as, - [49] = 3, - ACTIONS(26), 1, - anon_sym_SLASH, - STATE(4), 1, - aux_sym_module_repeat1, - ACTIONS(24), 4, - anon_sym_RBRACE, - anon_sym_import, - anon_sym_DOT, - anon_sym_as, - [62] = 3, - ACTIONS(26), 1, - anon_sym_SLASH, - STATE(5), 1, - aux_sym_module_repeat1, - ACTIONS(28), 4, - anon_sym_RBRACE, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(74), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [35] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(77), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [67] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(75), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [99] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(119), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [131] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(104), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [163] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(101), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [195] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(60), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [227] = 9, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(15), 1, + anon_sym_POUND, + ACTIONS(19), 1, + anon_sym_fn, + ACTIONS(21), 1, + sym__discard_name, + ACTIONS(23), 1, + sym__name, + ACTIONS(25), 1, + sym__upname, + STATE(46), 1, + sym__type_constructor, + STATE(57), 1, + sym__type, + STATE(44), 5, + sym_tuple_type, + sym_fn_type, + sym_type_constructor, + sym_remote_type_constructor, + sym_type_var, + [259] = 8, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(7), 1, + anon_sym_if, + ACTIONS(9), 1, anon_sym_import, - anon_sym_DOT, - anon_sym_as, - [75] = 3, - ACTIONS(30), 1, + ACTIONS(11), 1, + anon_sym_pub, + ACTIONS(13), 1, + anon_sym_const, + ACTIONS(27), 1, + ts_builtin_sym_end, + STATE(156), 1, + sym__constant, + STATE(147), 5, + sym__statement, + sym_target_group, + sym_import, + sym_public_constant, + sym_constant, + [288] = 8, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(7), 1, + anon_sym_if, + ACTIONS(9), 1, + anon_sym_import, + ACTIONS(11), 1, + anon_sym_pub, + ACTIONS(13), 1, + anon_sym_const, + ACTIONS(29), 1, + ts_builtin_sym_end, + STATE(156), 1, + sym__constant, + STATE(147), 5, + sym__statement, + sym_target_group, + sym_import, + sym_public_constant, + sym_constant, + [317] = 7, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(7), 1, + anon_sym_if, + ACTIONS(9), 1, + anon_sym_import, + ACTIONS(11), 1, + anon_sym_pub, + ACTIONS(13), 1, + anon_sym_const, + STATE(156), 1, + sym__constant, + STATE(147), 5, + sym__statement, + sym_target_group, + sym_import, + sym_public_constant, + sym_constant, + [343] = 7, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(31), 1, anon_sym_RBRACE, - ACTIONS(32), 1, + ACTIONS(33), 1, anon_sym_import, - STATE(9), 3, + ACTIONS(35), 1, + anon_sym_pub, + ACTIONS(37), 1, + anon_sym_const, + STATE(116), 1, + sym__constant, + STATE(132), 4, sym__statement, sym_import, - aux_sym_target_group_repeat1, - [87] = 1, - ACTIONS(19), 5, + sym_public_constant, + sym_constant, + [368] = 7, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(33), 1, + anon_sym_import, + ACTIONS(35), 1, + anon_sym_pub, + ACTIONS(37), 1, + anon_sym_const, + ACTIONS(39), 1, anon_sym_RBRACE, + STATE(116), 1, + sym__constant, + STATE(132), 4, + sym__statement, + sym_import, + sym_public_constant, + sym_constant, + [393] = 7, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(33), 1, anon_sym_import, - anon_sym_DOT, - anon_sym_as, - anon_sym_SLASH, - [95] = 3, - ACTIONS(34), 1, + ACTIONS(35), 1, + anon_sym_pub, + ACTIONS(37), 1, + anon_sym_const, + ACTIONS(41), 1, anon_sym_RBRACE, - ACTIONS(36), 1, + STATE(116), 1, + sym__constant, + STATE(102), 4, + sym__statement, + sym_import, + sym_public_constant, + sym_constant, + [418] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(43), 3, + sym_string, + sym_float, + sym_integer, + STATE(85), 3, + sym__literal, + sym_tuple, + sym_list, + [438] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(49), 3, + sym_string, + sym_float, + sym_integer, + STATE(58), 3, + sym__literal, + sym_tuple, + sym_list, + [458] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(53), 1, + anon_sym_POUND, + ACTIONS(55), 1, + anon_sym_LBRACK, + ACTIONS(51), 3, + sym_string, + sym_float, + sym_integer, + STATE(123), 3, + sym__literal, + sym_tuple, + sym_list, + [478] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(57), 3, + sym_string, + sym_float, + sym_integer, + STATE(69), 3, + sym__literal, + sym_tuple, + sym_list, + [498] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(59), 3, + sym_string, + sym_float, + sym_integer, + STATE(62), 3, + sym__literal, + sym_tuple, + sym_list, + [518] = 6, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(33), 1, anon_sym_import, - STATE(9), 3, + ACTIONS(35), 1, + anon_sym_pub, + ACTIONS(37), 1, + anon_sym_const, + STATE(116), 1, + sym__constant, + STATE(132), 4, sym__statement, sym_import, - aux_sym_target_group_repeat1, - [107] = 4, - ACTIONS(28), 1, + sym_public_constant, + sym_constant, + [540] = 5, + ACTIONS(3), 1, aux_sym_source_file_token1, - ACTIONS(41), 1, + ACTIONS(63), 1, + anon_sym_POUND, + ACTIONS(65), 1, + anon_sym_LBRACK, + ACTIONS(61), 3, + sym_string, + sym_float, + sym_integer, + STATE(126), 3, + sym__literal, + sym_tuple, + sym_list, + [560] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(67), 3, + sym_string, + sym_float, + sym_integer, + STATE(59), 3, + sym__literal, + sym_tuple, + sym_list, + [580] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(63), 1, + anon_sym_POUND, + ACTIONS(65), 1, + anon_sym_LBRACK, + ACTIONS(69), 3, + sym_string, + sym_float, + sym_integer, + STATE(139), 3, + sym__literal, + sym_tuple, + sym_list, + [600] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(53), 1, + anon_sym_POUND, + ACTIONS(55), 1, + anon_sym_LBRACK, + ACTIONS(71), 3, + sym_string, + sym_float, + sym_integer, + STATE(125), 3, + sym__literal, + sym_tuple, + sym_list, + [620] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(73), 3, + sym_string, + sym_float, + sym_integer, + STATE(49), 3, + sym__literal, + sym_tuple, + sym_list, + [640] = 5, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(45), 1, + anon_sym_POUND, + ACTIONS(47), 1, + anon_sym_LBRACK, + ACTIONS(75), 3, + sym_string, + sym_float, + sym_integer, + STATE(55), 3, + sym__literal, + sym_tuple, + sym_list, + [660] = 4, + ACTIONS(77), 1, + aux_sym_source_file_token1, + ACTIONS(81), 1, anon_sym_SLASH, - STATE(13), 1, + STATE(33), 1, aux_sym_module_repeat1, - ACTIONS(39), 2, + ACTIONS(79), 3, + anon_sym_RBRACE, anon_sym_DOT, anon_sym_as, - [121] = 4, - ACTIONS(19), 1, + [675] = 4, + ACTIONS(87), 1, + anon_sym_SLASH, + STATE(31), 1, + aux_sym_module_repeat1, + ACTIONS(83), 2, + ts_builtin_sym_end, aux_sym_source_file_token1, - ACTIONS(45), 1, + ACTIONS(85), 2, + anon_sym_DOT, + anon_sym_as, + [690] = 4, + ACTIONS(93), 1, anon_sym_SLASH, - STATE(11), 1, + STATE(30), 1, aux_sym_module_repeat1, - ACTIONS(43), 2, + ACTIONS(89), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + ACTIONS(91), 2, anon_sym_DOT, anon_sym_as, - [135] = 3, - ACTIONS(32), 1, - anon_sym_import, - ACTIONS(48), 1, - anon_sym_RBRACE, - STATE(7), 3, - sym__statement, - sym_import, - aux_sym_target_group_repeat1, - [147] = 4, - ACTIONS(24), 1, + [705] = 4, + ACTIONS(87), 1, + anon_sym_SLASH, + STATE(30), 1, + aux_sym_module_repeat1, + ACTIONS(77), 2, + ts_builtin_sym_end, aux_sym_source_file_token1, - ACTIONS(41), 1, + ACTIONS(79), 2, + anon_sym_DOT, + anon_sym_as, + [720] = 4, + ACTIONS(81), 1, anon_sym_SLASH, - STATE(11), 1, + ACTIONS(83), 1, + aux_sym_source_file_token1, + STATE(28), 1, aux_sym_module_repeat1, - ACTIONS(50), 2, + ACTIONS(85), 3, + anon_sym_RBRACE, anon_sym_DOT, anon_sym_as, - [161] = 3, - ACTIONS(54), 1, + [735] = 4, + ACTIONS(89), 1, + aux_sym_source_file_token1, + ACTIONS(96), 1, + anon_sym_SLASH, + STATE(33), 1, + aux_sym_module_repeat1, + ACTIONS(91), 3, + anon_sym_RBRACE, anon_sym_DOT, - ACTIONS(56), 1, anon_sym_as, - ACTIONS(52), 2, + [750] = 2, + ACTIONS(89), 1, + aux_sym_source_file_token1, + ACTIONS(91), 4, anon_sym_RBRACE, - anon_sym_import, - [172] = 2, - ACTIONS(19), 1, + anon_sym_DOT, + anon_sym_as, + anon_sym_SLASH, + [760] = 4, + ACTIONS(3), 1, aux_sym_source_file_token1, - ACTIONS(43), 3, + ACTIONS(99), 1, + anon_sym_COMMA, + STATE(35), 1, + aux_sym_tuple_repeat1, + ACTIONS(102), 2, + anon_sym_RPAREN, + anon_sym_RBRACK, + [774] = 2, + ACTIONS(89), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + ACTIONS(91), 3, anon_sym_DOT, anon_sym_as, anon_sym_SLASH, - [181] = 3, - ACTIONS(58), 1, - sym__name, - ACTIONS(60), 1, - sym__upname, - STATE(29), 1, - sym_unqualified_import, - [191] = 2, - ACTIONS(64), 1, + [784] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(104), 1, + anon_sym_DOT, + ACTIONS(106), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [796] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(110), 1, + anon_sym_LPAREN, + ACTIONS(108), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [808] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(112), 1, + anon_sym_EQ, + ACTIONS(114), 1, + anon_sym_COLON, + STATE(148), 1, + sym__type_annotation, + [821] = 3, + ACTIONS(118), 1, + anon_sym_DOT, + ACTIONS(120), 1, anon_sym_as, - ACTIONS(62), 2, - anon_sym_RBRACE, - anon_sym_import, - [199] = 1, - ACTIONS(11), 3, + ACTIONS(116), 2, ts_builtin_sym_end, - anon_sym_if, - anon_sym_import, - [205] = 3, - ACTIONS(58), 1, - sym__name, - ACTIONS(60), 1, - sym__upname, - STATE(21), 1, - sym_unqualified_import, - [215] = 3, - ACTIONS(66), 1, - anon_sym_RBRACE, - ACTIONS(68), 1, + aux_sym_source_file_token1, + [832] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(122), 3, anon_sym_COMMA, - STATE(22), 1, - aux_sym_import_repeat1, - [225] = 3, - ACTIONS(68), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [841] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(124), 3, anon_sym_COMMA, - ACTIONS(70), 1, - anon_sym_RBRACE, - STATE(20), 1, - aux_sym_import_repeat1, - [235] = 3, - ACTIONS(72), 1, - anon_sym_RBRACE, - ACTIONS(74), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [850] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(126), 3, anon_sym_COMMA, - STATE(22), 1, - aux_sym_import_repeat1, - [245] = 3, - ACTIONS(68), 1, + anon_sym_RPAREN, + anon_sym_RBRACK, + [859] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(128), 3, anon_sym_COMMA, - ACTIONS(77), 1, + anon_sym_EQ, + anon_sym_RPAREN, + [868] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(130), 1, + anon_sym_COMMA, + ACTIONS(132), 1, + anon_sym_RPAREN, + STATE(65), 1, + aux_sym_tuple_type_repeat1, + [881] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(134), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [890] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + STATE(154), 1, + sym_target, + ACTIONS(136), 2, + anon_sym_erlang, + anon_sym_javascript, + [901] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(138), 1, anon_sym_RBRACE, - STATE(22), 1, + ACTIONS(140), 1, + anon_sym_COMMA, + STATE(83), 1, aux_sym_import_repeat1, - [255] = 3, - ACTIONS(52), 1, + [914] = 4, + ACTIONS(3), 1, aux_sym_source_file_token1, - ACTIONS(79), 1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(144), 1, + anon_sym_RPAREN, + STATE(56), 1, + aux_sym_tuple_repeat1, + [927] = 4, + ACTIONS(116), 1, + aux_sym_source_file_token1, + ACTIONS(146), 1, + anon_sym_RBRACE, + ACTIONS(148), 1, anon_sym_DOT, - ACTIONS(81), 1, + ACTIONS(150), 1, anon_sym_as, - [265] = 2, - ACTIONS(85), 1, + [940] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(154), 1, anon_sym_as, - ACTIONS(83), 2, + ACTIONS(152), 2, anon_sym_RBRACE, - anon_sym_import, - [273] = 2, - STATE(59), 1, - sym_target, - ACTIONS(87), 2, - anon_sym_erlang, - anon_sym_javascript, - [281] = 2, - ACTIONS(91), 1, + anon_sym_COMMA, + [951] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(156), 1, anon_sym_as, - ACTIONS(89), 2, + ACTIONS(152), 2, anon_sym_RBRACE, anon_sym_COMMA, - [289] = 2, - ACTIONS(93), 1, - anon_sym_as, - ACTIONS(89), 2, + [962] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(140), 1, + anon_sym_COMMA, + ACTIONS(158), 1, anon_sym_RBRACE, + STATE(68), 1, + aux_sym_import_repeat1, + [975] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, anon_sym_COMMA, - [297] = 3, - ACTIONS(68), 1, + ACTIONS(160), 1, + anon_sym_RBRACK, + STATE(35), 1, + aux_sym_tuple_repeat1, + [988] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(162), 1, + anon_sym_RBRACK, + STATE(72), 1, + aux_sym_tuple_repeat1, + [1001] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(164), 1, + anon_sym_RPAREN, + STATE(35), 1, + aux_sym_tuple_repeat1, + [1014] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(166), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1023] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(168), 1, + anon_sym_RBRACK, + STATE(79), 1, + aux_sym_tuple_repeat1, + [1036] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(170), 1, + anon_sym_RBRACK, + STATE(54), 1, + aux_sym_tuple_repeat1, + [1049] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(172), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1058] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(174), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1067] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(176), 1, + anon_sym_RPAREN, + STATE(81), 1, + aux_sym_tuple_repeat1, + [1080] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(178), 1, + anon_sym_COMMA, + ACTIONS(181), 1, + anon_sym_RPAREN, + STATE(63), 1, + aux_sym_fn_type_repeat1, + [1093] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(183), 1, + sym__name, + ACTIONS(185), 1, + sym__upname, + STATE(53), 1, + sym_unqualified_import, + [1106] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(187), 1, + anon_sym_COMMA, + ACTIONS(190), 1, + anon_sym_RPAREN, + STATE(65), 1, + aux_sym_tuple_type_repeat1, + [1119] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(192), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1128] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(183), 1, + sym__name, + ACTIONS(185), 1, + sym__upname, + STATE(89), 1, + sym_unqualified_import, + [1141] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(140), 1, + anon_sym_COMMA, + ACTIONS(194), 1, + anon_sym_RBRACE, + STATE(83), 1, + aux_sym_import_repeat1, + [1154] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(196), 1, + anon_sym_RPAREN, + STATE(84), 1, + aux_sym_tuple_repeat1, + [1167] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(140), 1, + anon_sym_COMMA, + ACTIONS(198), 1, + anon_sym_RBRACE, + STATE(48), 1, + aux_sym_import_repeat1, + [1180] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(130), 1, + anon_sym_COMMA, + ACTIONS(200), 1, + anon_sym_RPAREN, + STATE(65), 1, + aux_sym_tuple_type_repeat1, + [1193] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(202), 1, + anon_sym_RBRACK, + STATE(35), 1, + aux_sym_tuple_repeat1, + [1206] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(204), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1215] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(130), 1, + anon_sym_COMMA, + ACTIONS(206), 1, + anon_sym_RPAREN, + STATE(45), 1, + aux_sym_tuple_type_repeat1, + [1228] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(208), 1, + anon_sym_COMMA, + ACTIONS(210), 1, + anon_sym_RPAREN, + STATE(80), 1, + aux_sym_fn_type_repeat1, + [1241] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(212), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1250] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(130), 1, + anon_sym_COMMA, + ACTIONS(214), 1, + anon_sym_RPAREN, + STATE(71), 1, + aux_sym_tuple_type_repeat1, + [1263] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(216), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1272] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(218), 1, + anon_sym_RBRACK, + STATE(35), 1, + aux_sym_tuple_repeat1, + [1285] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(208), 1, anon_sym_COMMA, - ACTIONS(95), 1, + ACTIONS(220), 1, + anon_sym_RPAREN, + STATE(63), 1, + aux_sym_fn_type_repeat1, + [1298] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(222), 1, + anon_sym_RPAREN, + STATE(35), 1, + aux_sym_tuple_repeat1, + [1311] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(114), 1, + anon_sym_COLON, + ACTIONS(224), 1, + anon_sym_EQ, + STATE(144), 1, + sym__type_annotation, + [1324] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(226), 1, anon_sym_RBRACE, - STATE(23), 1, + ACTIONS(228), 1, + anon_sym_COMMA, + STATE(83), 1, aux_sym_import_repeat1, - [307] = 3, - ACTIONS(58), 1, + [1337] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(142), 1, + anon_sym_COMMA, + ACTIONS(231), 1, + anon_sym_RPAREN, + STATE(35), 1, + aux_sym_tuple_repeat1, + [1350] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(102), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [1359] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(233), 3, + anon_sym_COMMA, + anon_sym_RPAREN, + anon_sym_RBRACK, + [1368] = 4, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(183), 1, sym__name, - ACTIONS(60), 1, + ACTIONS(185), 1, sym__upname, - STATE(37), 1, + STATE(70), 1, sym_unqualified_import, - [317] = 1, - ACTIONS(97), 2, + [1381] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(235), 3, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_RPAREN, + [1390] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(226), 2, anon_sym_RBRACE, - anon_sym_import, - [322] = 2, - ACTIONS(62), 1, + anon_sym_COMMA, + [1398] = 3, + ACTIONS(3), 1, aux_sym_source_file_token1, - ACTIONS(99), 1, + ACTIONS(25), 1, + sym__upname, + STATE(76), 1, + sym__type_constructor, + [1408] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(13), 1, + anon_sym_const, + STATE(153), 1, + sym__constant, + [1418] = 2, + ACTIONS(239), 1, anon_sym_as, - [329] = 2, - ACTIONS(101), 1, + ACTIONS(237), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1426] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(241), 1, sym__name, - STATE(14), 1, + STATE(40), 1, sym_module, - [336] = 2, - ACTIONS(103), 1, + [1436] = 3, + ACTIONS(243), 1, + ts_builtin_sym_end, + ACTIONS(245), 1, + aux_sym_source_file_token1, + STATE(97), 1, + aux_sym_source_file_repeat1, + [1446] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(247), 1, sym__name, - STATE(31), 1, + STATE(152), 1, sym_alias, - [343] = 1, - ACTIONS(105), 2, + [1456] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(249), 2, anon_sym_RBRACE, anon_sym_COMMA, - [348] = 2, - ACTIONS(107), 1, + [1464] = 3, + ACTIONS(29), 1, + ts_builtin_sym_end, + ACTIONS(251), 1, + aux_sym_source_file_token1, + STATE(100), 1, + aux_sym_source_file_repeat1, + [1474] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(247), 1, sym__name, - STATE(49), 1, + STATE(130), 1, sym_alias, - [355] = 1, - ACTIONS(72), 2, - anon_sym_RBRACE, + [1484] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(247), 1, + sym__name, + STATE(115), 1, + sym_alias, + [1494] = 3, + ACTIONS(253), 1, + ts_builtin_sym_end, + ACTIONS(255), 1, + aux_sym_source_file_token1, + STATE(100), 1, + aux_sym_source_file_repeat1, + [1504] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(190), 2, anon_sym_COMMA, - [360] = 2, - ACTIONS(83), 1, + anon_sym_RPAREN, + [1512] = 3, + ACTIONS(258), 1, aux_sym_source_file_token1, - ACTIONS(109), 1, + ACTIONS(260), 1, + anon_sym_RBRACE, + STATE(112), 1, + aux_sym_target_group_repeat1, + [1522] = 2, + ACTIONS(264), 1, anon_sym_as, - [367] = 2, - ACTIONS(103), 1, + ACTIONS(262), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1530] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(266), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [1538] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(268), 1, sym__name, - STATE(43), 1, + STATE(122), 1, sym_alias, - [374] = 2, - ACTIONS(107), 1, + [1548] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(37), 1, + anon_sym_const, + STATE(117), 1, + sym__constant, + [1558] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(270), 1, sym__name, - STATE(48), 1, - sym_alias, - [381] = 2, - ACTIONS(103), 1, + STATE(50), 1, + sym_module, + [1568] = 3, + ACTIONS(272), 1, + aux_sym_source_file_token1, + ACTIONS(275), 1, + anon_sym_RBRACE, + STATE(108), 1, + aux_sym_target_group_repeat1, + [1578] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(268), 1, sym__name, - STATE(42), 1, + STATE(134), 1, sym_alias, - [388] = 1, - ACTIONS(111), 2, - anon_sym_RBRACE, - anon_sym_import, - [393] = 1, - ACTIONS(113), 2, + [1588] = 3, + ACTIONS(237), 1, + aux_sym_source_file_token1, + ACTIONS(277), 1, anon_sym_RBRACE, - anon_sym_import, - [398] = 2, - ACTIONS(107), 1, + ACTIONS(279), 1, + anon_sym_as, + [1598] = 3, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(268), 1, sym__name, - STATE(54), 1, + STATE(131), 1, sym_alias, - [405] = 2, - ACTIONS(115), 1, - sym__name, - STATE(24), 1, - sym_module, - [412] = 1, - ACTIONS(117), 2, + [1608] = 3, + ACTIONS(31), 1, anon_sym_RBRACE, - anon_sym_import, - [417] = 1, - ACTIONS(119), 1, + ACTIONS(281), 1, + aux_sym_source_file_token1, + STATE(108), 1, + aux_sym_target_group_repeat1, + [1618] = 3, + ACTIONS(262), 1, + aux_sym_source_file_token1, + ACTIONS(283), 1, + anon_sym_RBRACE, + ACTIONS(285), 1, + anon_sym_as, + [1628] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(287), 1, sym__name, - [421] = 1, - ACTIONS(113), 1, + [1635] = 1, + ACTIONS(289), 2, + ts_builtin_sym_end, aux_sym_source_file_token1, - [425] = 1, - ACTIONS(97), 1, + [1640] = 2, + ACTIONS(291), 1, + aux_sym_source_file_token1, + ACTIONS(293), 1, + anon_sym_RBRACE, + [1647] = 2, + ACTIONS(295), 1, aux_sym_source_file_token1, - [429] = 1, - ACTIONS(121), 1, + ACTIONS(297), 1, + anon_sym_RBRACE, + [1654] = 1, + ACTIONS(299), 2, ts_builtin_sym_end, - [433] = 1, - ACTIONS(123), 1, - sym__upname, - [437] = 1, - ACTIONS(123), 1, - sym__name, - [441] = 1, - ACTIONS(125), 1, aux_sym_source_file_token1, - [445] = 1, - ACTIONS(111), 1, + [1659] = 2, + ACTIONS(3), 1, aux_sym_source_file_token1, - [449] = 1, - ACTIONS(117), 1, + ACTIONS(301), 1, + anon_sym_EQ, + [1666] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(303), 1, + anon_sym_LPAREN, + [1673] = 2, + ACTIONS(305), 1, + aux_sym_source_file_token1, + ACTIONS(307), 1, + anon_sym_RBRACE, + [1680] = 2, + ACTIONS(309), 1, + aux_sym_source_file_token1, + ACTIONS(311), 1, + anon_sym_RBRACE, + [1687] = 2, + ACTIONS(313), 1, + aux_sym_source_file_token1, + ACTIONS(315), 1, + anon_sym_RBRACE, + [1694] = 2, + ACTIONS(3), 1, aux_sym_source_file_token1, - [453] = 1, - ACTIONS(127), 1, + ACTIONS(317), 1, + anon_sym_LPAREN, + [1701] = 2, + ACTIONS(319), 1, aux_sym_source_file_token1, - [457] = 1, - ACTIONS(129), 1, + ACTIONS(321), 1, + anon_sym_RBRACE, + [1708] = 1, + ACTIONS(313), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1713] = 1, + ACTIONS(323), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1718] = 1, + ACTIONS(325), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1723] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(327), 1, + anon_sym_LPAREN, + [1730] = 1, + ACTIONS(309), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1735] = 2, + ACTIONS(329), 1, + aux_sym_source_file_token1, + ACTIONS(331), 1, + anon_sym_RBRACE, + [1742] = 2, + ACTIONS(275), 1, + anon_sym_RBRACE, + ACTIONS(333), 1, + aux_sym_source_file_token1, + [1749] = 1, + ACTIONS(305), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1754] = 2, + ACTIONS(289), 1, + aux_sym_source_file_token1, + ACTIONS(335), 1, + anon_sym_RBRACE, + [1761] = 2, + ACTIONS(126), 1, + anon_sym_RBRACE, + ACTIONS(337), 1, + aux_sym_source_file_token1, + [1768] = 2, + ACTIONS(124), 1, + anon_sym_RBRACE, + ACTIONS(339), 1, + aux_sym_source_file_token1, + [1775] = 2, + ACTIONS(122), 1, + anon_sym_RBRACE, + ACTIONS(323), 1, + aux_sym_source_file_token1, + [1782] = 2, + ACTIONS(233), 1, + anon_sym_RBRACE, + ACTIONS(341), 1, + aux_sym_source_file_token1, + [1789] = 1, + ACTIONS(319), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1794] = 1, + ACTIONS(339), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1799] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(343), 1, sym__name, - [461] = 1, - ACTIONS(131), 1, + [1806] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(345), 1, + anon_sym_DASH_GT, + [1813] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(287), 1, + sym__upname, + [1820] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(347), 1, + anon_sym_EQ, + [1827] = 1, + ACTIONS(349), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1832] = 1, + ACTIONS(337), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1837] = 1, + ACTIONS(253), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1842] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(351), 1, + anon_sym_EQ, + [1849] = 1, + ACTIONS(341), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1854] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(353), 1, anon_sym_LBRACE, - [465] = 1, - ACTIONS(133), 1, + [1861] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(355), 1, + sym__name, + [1868] = 1, + ACTIONS(329), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1873] = 1, + ACTIONS(295), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1878] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(357), 1, anon_sym_LBRACE, - [469] = 1, - ACTIONS(135), 1, + [1885] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(359), 1, anon_sym_LBRACE, - [473] = 1, - ACTIONS(137), 1, + [1892] = 1, + ACTIONS(291), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1897] = 1, + ACTIONS(361), 2, + ts_builtin_sym_end, + aux_sym_source_file_token1, + [1902] = 2, + ACTIONS(3), 1, aux_sym_source_file_token1, - [477] = 1, - ACTIONS(139), 1, + ACTIONS(363), 1, + ts_builtin_sym_end, + [1909] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(365), 1, + sym__name, + [1916] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(367), 1, + anon_sym_DASH_GT, + [1923] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(369), 1, + sym__name, + [1930] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(371), 1, anon_sym_LBRACE, + [1937] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(373), 1, + anon_sym_LPAREN, + [1944] = 2, + ACTIONS(3), 1, + aux_sym_source_file_token1, + ACTIONS(375), 1, + anon_sym_LPAREN, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 18, - [SMALL_STATE(4)] = 36, - [SMALL_STATE(5)] = 49, - [SMALL_STATE(6)] = 62, - [SMALL_STATE(7)] = 75, - [SMALL_STATE(8)] = 87, - [SMALL_STATE(9)] = 95, - [SMALL_STATE(10)] = 107, - [SMALL_STATE(11)] = 121, - [SMALL_STATE(12)] = 135, - [SMALL_STATE(13)] = 147, - [SMALL_STATE(14)] = 161, - [SMALL_STATE(15)] = 172, - [SMALL_STATE(16)] = 181, - [SMALL_STATE(17)] = 191, - [SMALL_STATE(18)] = 199, - [SMALL_STATE(19)] = 205, - [SMALL_STATE(20)] = 215, - [SMALL_STATE(21)] = 225, - [SMALL_STATE(22)] = 235, - [SMALL_STATE(23)] = 245, - [SMALL_STATE(24)] = 255, - [SMALL_STATE(25)] = 265, - [SMALL_STATE(26)] = 273, - [SMALL_STATE(27)] = 281, - [SMALL_STATE(28)] = 289, - [SMALL_STATE(29)] = 297, - [SMALL_STATE(30)] = 307, - [SMALL_STATE(31)] = 317, - [SMALL_STATE(32)] = 322, - [SMALL_STATE(33)] = 329, - [SMALL_STATE(34)] = 336, - [SMALL_STATE(35)] = 343, - [SMALL_STATE(36)] = 348, - [SMALL_STATE(37)] = 355, - [SMALL_STATE(38)] = 360, - [SMALL_STATE(39)] = 367, - [SMALL_STATE(40)] = 374, - [SMALL_STATE(41)] = 381, - [SMALL_STATE(42)] = 388, - [SMALL_STATE(43)] = 393, - [SMALL_STATE(44)] = 398, - [SMALL_STATE(45)] = 405, - [SMALL_STATE(46)] = 412, - [SMALL_STATE(47)] = 417, - [SMALL_STATE(48)] = 421, - [SMALL_STATE(49)] = 425, - [SMALL_STATE(50)] = 429, - [SMALL_STATE(51)] = 433, - [SMALL_STATE(52)] = 437, - [SMALL_STATE(53)] = 441, - [SMALL_STATE(54)] = 445, - [SMALL_STATE(55)] = 449, - [SMALL_STATE(56)] = 453, - [SMALL_STATE(57)] = 457, - [SMALL_STATE(58)] = 461, - [SMALL_STATE(59)] = 465, - [SMALL_STATE(60)] = 469, - [SMALL_STATE(61)] = 473, - [SMALL_STATE(62)] = 477, + [SMALL_STATE(3)] = 35, + [SMALL_STATE(4)] = 67, + [SMALL_STATE(5)] = 99, + [SMALL_STATE(6)] = 131, + [SMALL_STATE(7)] = 163, + [SMALL_STATE(8)] = 195, + [SMALL_STATE(9)] = 227, + [SMALL_STATE(10)] = 259, + [SMALL_STATE(11)] = 288, + [SMALL_STATE(12)] = 317, + [SMALL_STATE(13)] = 343, + [SMALL_STATE(14)] = 368, + [SMALL_STATE(15)] = 393, + [SMALL_STATE(16)] = 418, + [SMALL_STATE(17)] = 438, + [SMALL_STATE(18)] = 458, + [SMALL_STATE(19)] = 478, + [SMALL_STATE(20)] = 498, + [SMALL_STATE(21)] = 518, + [SMALL_STATE(22)] = 540, + [SMALL_STATE(23)] = 560, + [SMALL_STATE(24)] = 580, + [SMALL_STATE(25)] = 600, + [SMALL_STATE(26)] = 620, + [SMALL_STATE(27)] = 640, + [SMALL_STATE(28)] = 660, + [SMALL_STATE(29)] = 675, + [SMALL_STATE(30)] = 690, + [SMALL_STATE(31)] = 705, + [SMALL_STATE(32)] = 720, + [SMALL_STATE(33)] = 735, + [SMALL_STATE(34)] = 750, + [SMALL_STATE(35)] = 760, + [SMALL_STATE(36)] = 774, + [SMALL_STATE(37)] = 784, + [SMALL_STATE(38)] = 796, + [SMALL_STATE(39)] = 808, + [SMALL_STATE(40)] = 821, + [SMALL_STATE(41)] = 832, + [SMALL_STATE(42)] = 841, + [SMALL_STATE(43)] = 850, + [SMALL_STATE(44)] = 859, + [SMALL_STATE(45)] = 868, + [SMALL_STATE(46)] = 881, + [SMALL_STATE(47)] = 890, + [SMALL_STATE(48)] = 901, + [SMALL_STATE(49)] = 914, + [SMALL_STATE(50)] = 927, + [SMALL_STATE(51)] = 940, + [SMALL_STATE(52)] = 951, + [SMALL_STATE(53)] = 962, + [SMALL_STATE(54)] = 975, + [SMALL_STATE(55)] = 988, + [SMALL_STATE(56)] = 1001, + [SMALL_STATE(57)] = 1014, + [SMALL_STATE(58)] = 1023, + [SMALL_STATE(59)] = 1036, + [SMALL_STATE(60)] = 1049, + [SMALL_STATE(61)] = 1058, + [SMALL_STATE(62)] = 1067, + [SMALL_STATE(63)] = 1080, + [SMALL_STATE(64)] = 1093, + [SMALL_STATE(65)] = 1106, + [SMALL_STATE(66)] = 1119, + [SMALL_STATE(67)] = 1128, + [SMALL_STATE(68)] = 1141, + [SMALL_STATE(69)] = 1154, + [SMALL_STATE(70)] = 1167, + [SMALL_STATE(71)] = 1180, + [SMALL_STATE(72)] = 1193, + [SMALL_STATE(73)] = 1206, + [SMALL_STATE(74)] = 1215, + [SMALL_STATE(75)] = 1228, + [SMALL_STATE(76)] = 1241, + [SMALL_STATE(77)] = 1250, + [SMALL_STATE(78)] = 1263, + [SMALL_STATE(79)] = 1272, + [SMALL_STATE(80)] = 1285, + [SMALL_STATE(81)] = 1298, + [SMALL_STATE(82)] = 1311, + [SMALL_STATE(83)] = 1324, + [SMALL_STATE(84)] = 1337, + [SMALL_STATE(85)] = 1350, + [SMALL_STATE(86)] = 1359, + [SMALL_STATE(87)] = 1368, + [SMALL_STATE(88)] = 1381, + [SMALL_STATE(89)] = 1390, + [SMALL_STATE(90)] = 1398, + [SMALL_STATE(91)] = 1408, + [SMALL_STATE(92)] = 1418, + [SMALL_STATE(93)] = 1426, + [SMALL_STATE(94)] = 1436, + [SMALL_STATE(95)] = 1446, + [SMALL_STATE(96)] = 1456, + [SMALL_STATE(97)] = 1464, + [SMALL_STATE(98)] = 1474, + [SMALL_STATE(99)] = 1484, + [SMALL_STATE(100)] = 1494, + [SMALL_STATE(101)] = 1504, + [SMALL_STATE(102)] = 1512, + [SMALL_STATE(103)] = 1522, + [SMALL_STATE(104)] = 1530, + [SMALL_STATE(105)] = 1538, + [SMALL_STATE(106)] = 1548, + [SMALL_STATE(107)] = 1558, + [SMALL_STATE(108)] = 1568, + [SMALL_STATE(109)] = 1578, + [SMALL_STATE(110)] = 1588, + [SMALL_STATE(111)] = 1598, + [SMALL_STATE(112)] = 1608, + [SMALL_STATE(113)] = 1618, + [SMALL_STATE(114)] = 1628, + [SMALL_STATE(115)] = 1635, + [SMALL_STATE(116)] = 1640, + [SMALL_STATE(117)] = 1647, + [SMALL_STATE(118)] = 1654, + [SMALL_STATE(119)] = 1659, + [SMALL_STATE(120)] = 1666, + [SMALL_STATE(121)] = 1673, + [SMALL_STATE(122)] = 1680, + [SMALL_STATE(123)] = 1687, + [SMALL_STATE(124)] = 1694, + [SMALL_STATE(125)] = 1701, + [SMALL_STATE(126)] = 1708, + [SMALL_STATE(127)] = 1713, + [SMALL_STATE(128)] = 1718, + [SMALL_STATE(129)] = 1723, + [SMALL_STATE(130)] = 1730, + [SMALL_STATE(131)] = 1735, + [SMALL_STATE(132)] = 1742, + [SMALL_STATE(133)] = 1749, + [SMALL_STATE(134)] = 1754, + [SMALL_STATE(135)] = 1761, + [SMALL_STATE(136)] = 1768, + [SMALL_STATE(137)] = 1775, + [SMALL_STATE(138)] = 1782, + [SMALL_STATE(139)] = 1789, + [SMALL_STATE(140)] = 1794, + [SMALL_STATE(141)] = 1799, + [SMALL_STATE(142)] = 1806, + [SMALL_STATE(143)] = 1813, + [SMALL_STATE(144)] = 1820, + [SMALL_STATE(145)] = 1827, + [SMALL_STATE(146)] = 1832, + [SMALL_STATE(147)] = 1837, + [SMALL_STATE(148)] = 1842, + [SMALL_STATE(149)] = 1849, + [SMALL_STATE(150)] = 1854, + [SMALL_STATE(151)] = 1861, + [SMALL_STATE(152)] = 1868, + [SMALL_STATE(153)] = 1873, + [SMALL_STATE(154)] = 1878, + [SMALL_STATE(155)] = 1885, + [SMALL_STATE(156)] = 1892, + [SMALL_STATE(157)] = 1897, + [SMALL_STATE(158)] = 1902, + [SMALL_STATE(159)] = 1909, + [SMALL_STATE(160)] = 1916, + [SMALL_STATE(161)] = 1923, + [SMALL_STATE(162)] = 1930, + [SMALL_STATE(163)] = 1937, + [SMALL_STATE(164)] = 1944, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), - [3] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), - [9] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [11] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), - [13] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(26), - [16] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(45), - [19] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), - [21] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(57), - [24] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 2), - [26] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), - [28] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 1), - [30] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), - [32] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [34] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_target_group_repeat1, 2), - [36] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_target_group_repeat1, 2), SHIFT_REPEAT(33), - [39] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_module, 1), - [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), - [43] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), - [45] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(47), - [48] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), - [50] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_module, 2), - [52] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 2, .production_id = 1), - [54] = {.entry = {.count = 1, .reusable = true}}, SHIFT(62), - [56] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), - [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [60] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 6, .production_id = 1), - [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [66] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [68] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), - [70] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [72] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_import_repeat1, 2), - [74] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_import_repeat1, 2), SHIFT_REPEAT(30), - [77] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), - [79] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), - [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 7, .production_id = 1), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), - [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), - [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unqualified_import, 1), - [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), - [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [97] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 8, .production_id = 6), - [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), - [105] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unqualified_import, 3, .production_id = 5), - [107] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), - [109] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [111] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 4, .production_id = 3), - [113] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 9, .production_id = 7), - [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), - [117] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias, 1), - [119] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [121] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), - [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [125] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 5, .production_id = 4), - [127] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 4, .production_id = 2), - [129] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [133] = {.entry = {.count = 1, .reusable = true}}, SHIFT(12), - [135] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target, 1), - [137] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(159), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(124), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(120), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [25] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [27] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 3), + [29] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 2), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(128), + [33] = {.entry = {.count = 1, .reusable = false}}, SHIFT(107), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(106), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(161), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(157), + [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(145), + [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(163), + [47] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(123), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(164), + [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(126), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(129), + [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(139), + [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(125), + [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(55), + [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 2), + [79] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_module, 2), + [81] = {.entry = {.count = 1, .reusable = false}}, SHIFT(141), + [83] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_module, 1), + [85] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_module, 1), + [87] = {.entry = {.count = 1, .reusable = false}}, SHIFT(151), + [89] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_module_repeat1, 2), + [91] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), + [93] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(151), + [96] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_module_repeat1, 2), SHIFT_REPEAT(141), + [99] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_tuple_repeat1, 2), SHIFT_REPEAT(16), + [102] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_tuple_repeat1, 2), + [104] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), + [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_var, 1), + [108] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_constructor, 1), + [110] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), + [112] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), + [114] = {.entry = {.count = 1, .reusable = false}}, SHIFT(5), + [116] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 2, .production_id = 2), + [118] = {.entry = {.count = 1, .reusable = false}}, SHIFT(150), + [120] = {.entry = {.count = 1, .reusable = false}}, SHIFT(98), + [122] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 4), + [124] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple, 4), + [126] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_list, 3), + [128] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type, 1), + [130] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [132] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_type_constructor, 1), + [136] = {.entry = {.count = 1, .reusable = false}}, SHIFT(155), + [138] = {.entry = {.count = 1, .reusable = false}}, SHIFT(110), + [140] = {.entry = {.count = 1, .reusable = false}}, SHIFT(67), + [142] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), + [144] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [146] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 2, .production_id = 2), + [148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(162), + [150] = {.entry = {.count = 1, .reusable = false}}, SHIFT(105), + [152] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unqualified_import, 1), + [154] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [156] = {.entry = {.count = 1, .reusable = false}}, SHIFT(143), + [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(103), + [160] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(146), + [164] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), + [166] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_fn_type, 7, .production_id = 14), + [168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(135), + [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), + [172] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_fn_type, 6, .production_id = 13), + [174] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_constructor, 5), + [176] = {.entry = {.count = 1, .reusable = false}}, SHIFT(136), + [178] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_fn_type_repeat1, 2), SHIFT_REPEAT(6), + [181] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_fn_type_repeat1, 2), + [183] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), + [185] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), + [187] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_tuple_type_repeat1, 2), SHIFT_REPEAT(7), + [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_tuple_type_repeat1, 2), + [192] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 5), + [194] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), + [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(140), + [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(113), + [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [202] = {.entry = {.count = 1, .reusable = false}}, SHIFT(127), + [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 3), + [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), + [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), + [210] = {.entry = {.count = 1, .reusable = false}}, SHIFT(160), + [212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_remote_type_constructor, 3), + [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), + [216] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_constructor, 4), + [218] = {.entry = {.count = 1, .reusable = false}}, SHIFT(137), + [220] = {.entry = {.count = 1, .reusable = false}}, SHIFT(142), + [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(138), + [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [226] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_import_repeat1, 2), + [228] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_import_repeat1, 2), SHIFT_REPEAT(67), + [231] = {.entry = {.count = 1, .reusable = false}}, SHIFT(149), + [233] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple, 5), + [235] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tuple_type, 4), + [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 7, .production_id = 2), + [239] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), + [241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [243] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), + [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(133), + [249] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unqualified_import, 3, .production_id = 9), + [251] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), + [255] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(12), + [258] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [260] = {.entry = {.count = 1, .reusable = false}}, SHIFT(118), + [262] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 6, .production_id = 2), + [264] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), + [266] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_fn_type_repeat1, 2, .production_id = 11), + [268] = {.entry = {.count = 1, .reusable = false}}, SHIFT(121), + [270] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [272] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_target_group_repeat1, 2), SHIFT_REPEAT(21), + [275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_target_group_repeat1, 2), + [277] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 7, .production_id = 2), + [279] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), + [281] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), + [283] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 6, .production_id = 2), + [285] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), + [287] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96), + [289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 9, .production_id = 12), + [291] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_constant, 1, .production_id = 1), + [293] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_constant, 1, .production_id = 1), + [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_public_constant, 2, .production_id = 3), + [297] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_public_constant, 2, .production_id = 3), + [299] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 5, .production_id = 4), + [301] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__type_annotation, 2, .production_id = 7), + [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [305] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_alias, 1), + [307] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_alias, 1), + [309] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 4, .production_id = 5), + [311] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 4, .production_id = 5), + [313] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__constant, 4, .production_id = 6), + [315] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__constant, 4, .production_id = 6), + [317] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), + [319] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__constant, 5, .production_id = 8), + [321] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__constant, 5, .production_id = 8), + [323] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 4), + [325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 6, .production_id = 4), + [327] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [329] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_import, 8, .production_id = 10), + [331] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 8, .production_id = 10), + [333] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_target_group_repeat1, 2), + [335] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_import, 9, .production_id = 12), + [337] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_list, 3), + [339] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple, 4), + [341] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tuple, 5), + [343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [347] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [349] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 4, .production_id = 4), + [351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(64), + [355] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), + [357] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), + [359] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_target, 1), + [361] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_target_group, 7, .production_id = 4), + [363] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [365] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), + [367] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), + [369] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), + [371] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), + [373] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [375] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), }; #ifdef __cplusplus