diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0482d3f..43d156c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,3 +40,13 @@ jobs: uses: tree-sitter/parser-test-action@v1.2 with: test-library: ${{runner.os == 'Linux'}} + corpus-files: examples/* + invalid-files: examples/invalid.tst + - name: Check for scanner changes + uses: tj-actions/changed-files@v42 + id: scanner-check + with: + files: src/scanner.c + - name: Fuzz scanner + uses: tree-sitter/fuzz-action@v4 + if: steps.scanner-check.outputs.any_changed == 'true' diff --git a/Package.swift b/Package.swift index e59b1eb..5e38ed3 100644 --- a/Package.swift +++ b/Package.swift @@ -36,6 +36,7 @@ let package = Package( ], sources: [ "src/parser.c", + "src/scanner.c" ], resources: [ .copy("queries") diff --git a/binding.gyp b/binding.gyp index b5ea5c6..a7d3bb9 100644 --- a/binding.gyp +++ b/binding.gyp @@ -11,6 +11,7 @@ "sources": [ "bindings/node/binding.cc", "src/parser.c", + "src/scanner.c", ], "cflags_c": [ "-std=c11", diff --git a/bindings/go/binding.go b/bindings/go/binding.go index a37103d..441c2ec 100644 --- a/bindings/go/binding.go +++ b/bindings/go/binding.go @@ -2,6 +2,7 @@ package tree_sitter_test // #cgo CFLAGS: -std=c11 -fPIC // #include "../../src/parser.c" +// #include "../../src/scanner.c" import "C" import "unsafe" diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index 07504bf..da068d1 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -8,5 +8,9 @@ fn main() { c_config.file(&parser_path); println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); + let scanner_path = src_dir.join("scanner.c"); + c_config.file(&scanner_path); + println!("cargo:rerun-if-changed={}", scanner_path.to_str().unwrap()); + c_config.compile("tree-sitter-test"); } diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index 9badd8c..c8617c7 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -5,6 +5,23 @@ //! //! ``` //! let code = r#" +//! ================== +//! Return statements +//! ================== +//! +//! func x() int { +//! return 1; +//! } +//! +//! --- +//! +//! (source_file +//! (function_definition +//! (identifier) +//! (parameter_list) +//! (primitive_type) +//! (block +//! (return_statement (number))))) //! "#; //! let mut parser = tree_sitter::Parser::new(); //! parser.set_language(&tree_sitter_test::language()).expect("Error loading Test grammar"); diff --git a/examples/attributes.tst b/examples/attributes.tst new file mode 100644 index 0000000..f7ca9e0 --- /dev/null +++ b/examples/attributes.tst @@ -0,0 +1,39 @@ +========================= +Test that will be skipped +:skip +========================= + +int main() {} + +------------------------- + +==================================== +Test that will run on Linux or macOS + +:platform(linux) +:platform(macos) +==================================== + +int main() {} + +------------------------------------ + +======================================================================== +Test that expects an error, and will fail fast if there's no parse error +:fail-fast +:error +======================================================================== + +int main ( {} + +------------------------------------------------------------------------ + +================================================= +Test that will parse with both Typescript and TSX +:language(typescript) +:language(tsx) +================================================= + +console.log('Hello, world!'); + +------------------------------------------------- diff --git a/examples/invalid.tst b/examples/invalid.tst new file mode 100644 index 0000000..a789334 --- /dev/null +++ b/examples/invalid.tst @@ -0,0 +1,9 @@ +==================||| +Invalid suffix +==================||| + +foo + +---|| + +(foo) diff --git a/examples/simple.tst b/examples/simple.tst new file mode 100644 index 0000000..ea10233 --- /dev/null +++ b/examples/simple.tst @@ -0,0 +1,17 @@ +================== +Return statements +================== + +func x() int { + return 1; +} + +--- + +(source_file + (function_definition + (identifier) + (parameter_list) + (primitive_type) + (block + (return_statement (number))))) diff --git a/examples/suffix.tst b/examples/suffix.tst new file mode 100644 index 0000000..fef0a2e --- /dev/null +++ b/examples/suffix.tst @@ -0,0 +1,15 @@ +==================||| +Basic module +==================||| + +---- MODULE Test ---- +increment(n) == n + 1 +==== + +---||| + +(source_file + (module (identifier) + (operator (identifier) + (parameter_list (identifier)) + (plus (identifier_ref) (number))))) diff --git a/grammar.js b/grammar.js index 3435cb0..e6ba4f3 100644 --- a/grammar.js +++ b/grammar.js @@ -1,17 +1,15 @@ /// // @ts-check -const I = token.immediate; - module.exports = grammar({ name: "test", externals: $ => [ - $._equals_begin, - $._equals_end, - $._extra_delimiter_equals_begin, - $._extra_delimiter_equals_end, - $._extra_delimiter_dashes, + $._equals_begin_ext, + $._equals_end_ext, + $._suffix_equals_begin, + $._suffix_equals_end, + $._suffix_dashes, $.__error_recovery, ], @@ -22,19 +20,16 @@ module.exports = grammar({ test: $ => seq( $.header, - optional(alias(/.+/, $.input)), + alias(repeat1(/./), $.input), alias($._dashes, $.separator), - optional(alias($._extra_delimiter_dashes, $.extra_delimiter)), - optional(alias(/.+/, $.output)), + alias(repeat(/./), $.output), ), header: $ => seq( alias($._equals_begin, $.separator), - optional(alias($._extra_delimiter_equals_begin, $.extra_delimiter)), - alias(/[^\r\n]+/, $.name), + alias(repeat1(/[^\r\n]/), $.name), optional($.attributes), alias($._equals_end, $.separator), - optional(alias($._extra_delimiter_equals_end, $.extra_delimiter)), ), attributes: $ => repeat1( @@ -55,21 +50,21 @@ module.exports = grammar({ language: $ => seq( ":language", - I("("), + token.immediate("("), alias($._lang, $.parameter), - I(")") + token.immediate(")") ), platform: $ => seq( ":platform", - I("("), + token.immediate("("), alias($._os, $.parameter), - I(")") + token.immediate(")") ), - _lang: _ => I(repeat1(/[\w.-]/)), + _lang: _ => token.immediate(repeat1(/[\w.-]/)), - _os: _ => I(choice( + _os: _ => token.immediate(choice( "linux", "macos", "ios", @@ -82,6 +77,19 @@ module.exports = grammar({ "windows", )), - _dashes: _ => token(prec(1, seq("---", repeat("-")))) + _equals_begin: $ => prec(1, seq( + $._equals_begin_ext, + optional($._suffix_equals_begin) + )), + + _equals_end: $ => prec(1, seq( + $._equals_end_ext, + optional($._suffix_equals_end) + )), + + _dashes: $ => prec(1, seq( + token(seq("---", repeat("-"))), + optional($._suffix_dashes) + )), } }); diff --git a/package.json b/package.json index 8bead94..208728d 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,8 @@ { "scope": "text.test", "highlights": "queries/highlights.scm", - "injections": "queries/injections.scm" + "injections": "queries/injections.scm", + "file-types": ["tst"] } ] } diff --git a/setup.py b/setup.py index 7d72391..bd95a9b 100644 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ def get_tag(self): sources=[ "bindings/python/tree_sitter_test/binding.c", "src/parser.c", + "src/scanner.c", ], extra_compile_args=( ["-std=c11"] if system() != 'Windows' else [] diff --git a/src/grammar.json b/src/grammar.json index 35599f5..c68a36a 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -16,21 +16,16 @@ "name": "header" }, { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": ".+" - }, - "named": true, - "value": "input" - }, - { - "type": "BLANK" + "type": "ALIAS", + "content": { + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "." } - ] + }, + "named": true, + "value": "input" }, { "type": "ALIAS", @@ -42,38 +37,16 @@ "value": "separator" }, { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_extra_delimiter_dashes" - }, - "named": true, - "value": "extra_delimiter" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "PATTERN", - "value": ".+" - }, - "named": true, - "value": "output" - }, - { - "type": "BLANK" + "type": "ALIAS", + "content": { + "type": "REPEAT", + "content": { + "type": "PATTERN", + "value": "." } - ] + }, + "named": true, + "value": "output" } ] }, @@ -89,28 +62,14 @@ "named": true, "value": "separator" }, - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_extra_delimiter_equals_begin" - }, - "named": true, - "value": "extra_delimiter" - }, - { - "type": "BLANK" - } - ] - }, { "type": "ALIAS", "content": { - "type": "PATTERN", - "value": "[^\\r\\n]+" + "type": "REPEAT1", + "content": { + "type": "PATTERN", + "value": "[^\\r\\n]" + } }, "named": true, "value": "name" @@ -135,23 +94,6 @@ }, "named": true, "value": "separator" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "ALIAS", - "content": { - "type": "SYMBOL", - "name": "_extra_delimiter_equals_end" - }, - "named": true, - "value": "extra_delimiter" - }, - { - "type": "BLANK" - } - ] } ] }, @@ -321,27 +263,94 @@ ] } }, - "_dashes": { - "type": "TOKEN", + "_equals_begin": { + "type": "PREC", + "value": 1, "content": { - "type": "PREC", - "value": 1, - "content": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "---" - }, - { - "type": "REPEAT", - "content": { - "type": "STRING", - "value": "-" + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_equals_begin_ext" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_suffix_equals_begin" + }, + { + "type": "BLANK" + } + ] + } + ] + } + }, + "_equals_end": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "SYMBOL", + "name": "_equals_end_ext" + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_suffix_equals_end" + }, + { + "type": "BLANK" } + ] + } + ] + } + }, + "_dashes": { + "type": "PREC", + "value": 1, + "content": { + "type": "SEQ", + "members": [ + { + "type": "TOKEN", + "content": { + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "---" + }, + { + "type": "REPEAT", + "content": { + "type": "STRING", + "value": "-" + } + } + ] } - ] - } + }, + { + "type": "CHOICE", + "members": [ + { + "type": "SYMBOL", + "name": "_suffix_dashes" + }, + { + "type": "BLANK" + } + ] + } + ] } } }, @@ -356,23 +365,23 @@ "externals": [ { "type": "SYMBOL", - "name": "_equals_begin" + "name": "_equals_begin_ext" }, { "type": "SYMBOL", - "name": "_equals_end" + "name": "_equals_end_ext" }, { "type": "SYMBOL", - "name": "_extra_delimiter_equals_begin" + "name": "_suffix_equals_begin" }, { "type": "SYMBOL", - "name": "_extra_delimiter_equals_end" + "name": "_suffix_equals_end" }, { "type": "SYMBOL", - "name": "_extra_delimiter_dashes" + "name": "_suffix_dashes" }, { "type": "SYMBOL", diff --git a/src/node-types.json b/src/node-types.json index 85e59db..905f149 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -58,10 +58,6 @@ "type": "attributes", "named": true }, - { - "type": "extra_delimiter", - "named": true - }, { "type": "name", "named": true @@ -73,6 +69,11 @@ ] } }, + { + "type": "input", + "named": true, + "fields": {} + }, { "type": "language", "named": true, @@ -88,6 +89,16 @@ ] } }, + { + "type": "name", + "named": true, + "fields": {} + }, + { + "type": "output", + "named": true, + "fields": {} + }, { "type": "platform", "named": true, @@ -103,6 +114,11 @@ ] } }, + { + "type": "separator", + "named": true, + "fields": {} + }, { "type": "test", "named": true, @@ -111,10 +127,6 @@ "multiple": true, "required": true, "types": [ - { - "type": "extra_delimiter", - "named": true - }, { "type": "header", "named": true @@ -154,34 +166,14 @@ "type": "error", "named": true }, - { - "type": "extra_delimiter", - "named": true - }, { "type": "fail_fast", "named": true }, - { - "type": "input", - "named": true - }, - { - "type": "name", - "named": true - }, - { - "type": "output", - "named": true - }, { "type": "parameter", "named": true }, - { - "type": "separator", - "named": true - }, { "type": "skip", "named": true diff --git a/src/parser.c b/src/parser.c index 4721fbe..0cfee41 100644 --- a/src/parser.c +++ b/src/parser.c @@ -7,12 +7,12 @@ #define LANGUAGE_VERSION 14 #define STATE_COUNT 37 #define LARGE_STATE_COUNT 2 -#define SYMBOL_COUNT 27 -#define ALIAS_COUNT 1 +#define SYMBOL_COUNT 32 +#define ALIAS_COUNT 3 #define TOKEN_COUNT 19 #define EXTERNAL_TOKEN_COUNT 6 #define FIELD_COUNT 1 -#define MAX_ALIAS_SEQUENCE_LENGTH 6 +#define MAX_ALIAS_SEQUENCE_LENGTH 4 #define PRODUCTION_ID_COUNT 7 enum ts_symbol_identifiers { @@ -27,12 +27,12 @@ enum ts_symbol_identifiers { anon_sym_COLONplatform = 9, sym__lang = 10, sym__os = 11, - sym__dashes = 12, - sym__equals_begin = 13, - sym__equals_end = 14, - sym__extra_delimiter_equals_begin = 15, - sym__extra_delimiter_equals_end = 16, - sym__extra_delimiter_dashes = 17, + aux_sym__dashes_token1 = 12, + sym__equals_begin_ext = 13, + sym__equals_end_ext = 14, + sym__suffix_equals_begin = 15, + sym__suffix_equals_end = 16, + sym__suffix_dashes = 17, sym___error_recovery = 18, sym_file = 19, sym_test = 20, @@ -40,15 +40,22 @@ enum ts_symbol_identifiers { sym_attributes = 22, sym_language = 23, sym_platform = 24, - aux_sym_file_repeat1 = 25, - aux_sym_attributes_repeat1 = 26, - alias_sym_output = 27, + sym__equals_begin = 25, + sym__equals_end = 26, + sym__dashes = 27, + aux_sym_file_repeat1 = 28, + aux_sym_test_repeat1 = 29, + aux_sym_header_repeat1 = 30, + aux_sym_attributes_repeat1 = 31, + alias_sym_input = 32, + alias_sym_name = 33, + alias_sym_output = 34, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", - [aux_sym_test_token1] = "input", - [aux_sym_header_token1] = "name", + [aux_sym_test_token1] = "test_token1", + [aux_sym_header_token1] = "header_token1", [sym_skip] = "skip", [sym_error] = "error", [sym_fail_fast] = "fail_fast", @@ -58,12 +65,12 @@ static const char * const ts_symbol_names[] = { [anon_sym_COLONplatform] = ":platform", [sym__lang] = "parameter", [sym__os] = "parameter", - [sym__dashes] = "separator", - [sym__equals_begin] = "separator", - [sym__equals_end] = "separator", - [sym__extra_delimiter_equals_begin] = "extra_delimiter", - [sym__extra_delimiter_equals_end] = "extra_delimiter", - [sym__extra_delimiter_dashes] = "extra_delimiter", + [aux_sym__dashes_token1] = "_dashes_token1", + [sym__equals_begin_ext] = "_equals_begin_ext", + [sym__equals_end_ext] = "_equals_end_ext", + [sym__suffix_equals_begin] = "_suffix_equals_begin", + [sym__suffix_equals_end] = "_suffix_equals_end", + [sym__suffix_dashes] = "_suffix_dashes", [sym___error_recovery] = "__error_recovery", [sym_file] = "file", [sym_test] = "test", @@ -71,8 +78,15 @@ static const char * const ts_symbol_names[] = { [sym_attributes] = "attributes", [sym_language] = "language", [sym_platform] = "platform", + [sym__equals_begin] = "separator", + [sym__equals_end] = "separator", + [sym__dashes] = "separator", [aux_sym_file_repeat1] = "file_repeat1", + [aux_sym_test_repeat1] = "test_repeat1", + [aux_sym_header_repeat1] = "header_repeat1", [aux_sym_attributes_repeat1] = "attributes_repeat1", + [alias_sym_input] = "input", + [alias_sym_name] = "name", [alias_sym_output] = "output", }; @@ -89,12 +103,12 @@ static const TSSymbol ts_symbol_map[] = { [anon_sym_COLONplatform] = anon_sym_COLONplatform, [sym__lang] = sym__lang, [sym__os] = sym__lang, - [sym__dashes] = sym__equals_begin, - [sym__equals_begin] = sym__equals_begin, - [sym__equals_end] = sym__equals_begin, - [sym__extra_delimiter_equals_begin] = sym__extra_delimiter_equals_begin, - [sym__extra_delimiter_equals_end] = sym__extra_delimiter_equals_begin, - [sym__extra_delimiter_dashes] = sym__extra_delimiter_equals_begin, + [aux_sym__dashes_token1] = aux_sym__dashes_token1, + [sym__equals_begin_ext] = sym__equals_begin_ext, + [sym__equals_end_ext] = sym__equals_end_ext, + [sym__suffix_equals_begin] = sym__suffix_equals_begin, + [sym__suffix_equals_end] = sym__suffix_equals_end, + [sym__suffix_dashes] = sym__suffix_dashes, [sym___error_recovery] = sym___error_recovery, [sym_file] = sym_file, [sym_test] = sym_test, @@ -102,8 +116,15 @@ static const TSSymbol ts_symbol_map[] = { [sym_attributes] = sym_attributes, [sym_language] = sym_language, [sym_platform] = sym_platform, + [sym__equals_begin] = sym__equals_begin, + [sym__equals_end] = sym__equals_begin, + [sym__dashes] = sym__equals_begin, [aux_sym_file_repeat1] = aux_sym_file_repeat1, + [aux_sym_test_repeat1] = aux_sym_test_repeat1, + [aux_sym_header_repeat1] = aux_sym_header_repeat1, [aux_sym_attributes_repeat1] = aux_sym_attributes_repeat1, + [alias_sym_input] = alias_sym_input, + [alias_sym_name] = alias_sym_name, [alias_sym_output] = alias_sym_output, }; @@ -113,12 +134,12 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .named = true, }, [aux_sym_test_token1] = { - .visible = true, - .named = true, + .visible = false, + .named = false, }, [aux_sym_header_token1] = { - .visible = true, - .named = true, + .visible = false, + .named = false, }, [sym_skip] = { .visible = true, @@ -156,28 +177,28 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym__dashes] = { - .visible = true, - .named = true, + [aux_sym__dashes_token1] = { + .visible = false, + .named = false, }, - [sym__equals_begin] = { - .visible = true, + [sym__equals_begin_ext] = { + .visible = false, .named = true, }, - [sym__equals_end] = { - .visible = true, + [sym__equals_end_ext] = { + .visible = false, .named = true, }, - [sym__extra_delimiter_equals_begin] = { - .visible = true, + [sym__suffix_equals_begin] = { + .visible = false, .named = true, }, - [sym__extra_delimiter_equals_end] = { - .visible = true, + [sym__suffix_equals_end] = { + .visible = false, .named = true, }, - [sym__extra_delimiter_dashes] = { - .visible = true, + [sym__suffix_dashes] = { + .visible = false, .named = true, }, [sym___error_recovery] = { @@ -208,14 +229,42 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, + [sym__equals_begin] = { + .visible = true, + .named = true, + }, + [sym__equals_end] = { + .visible = true, + .named = true, + }, + [sym__dashes] = { + .visible = true, + .named = true, + }, [aux_sym_file_repeat1] = { .visible = false, .named = false, }, + [aux_sym_test_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_header_repeat1] = { + .visible = false, + .named = false, + }, [aux_sym_attributes_repeat1] = { .visible = false, .named = false, }, + [alias_sym_input] = { + .visible = true, + .named = true, + }, + [alias_sym_name] = { + .visible = true, + .named = true, + }, [alias_sym_output] = { .visible = true, .named = true, @@ -232,9 +281,9 @@ static const char * const ts_field_names[] = { }; static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { - [1] = {.index = 0, .length = 1}, - [2] = {.index = 1, .length = 1}, - [4] = {.index = 2, .length = 2}, + [2] = {.index = 0, .length = 1}, + [4] = {.index = 1, .length = 1}, + [6] = {.index = 2, .length = 2}, }; static const TSFieldMapEntry ts_field_map_entries[] = { @@ -249,18 +298,26 @@ static const TSFieldMapEntry ts_field_map_entries[] = { static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { [0] = {0}, + [1] = { + [1] = alias_sym_input, + }, [3] = { - [2] = alias_sym_output, + [1] = alias_sym_name, }, [5] = { + [1] = alias_sym_input, [3] = alias_sym_output, }, - [6] = { - [4] = alias_sym_output, - }, }; static const uint16_t ts_non_terminal_alias_map[] = { + aux_sym_test_repeat1, 3, + aux_sym_test_repeat1, + alias_sym_input, + alias_sym_output, + aux_sym_header_repeat1, 2, + aux_sym_header_repeat1, + alias_sym_name, 0, }; @@ -283,9 +340,9 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [15] = 15, [16] = 16, [17] = 17, - [18] = 18, + [18] = 16, [19] = 19, - [20] = 20, + [20] = 17, [21] = 21, [22] = 22, [23] = 23, @@ -309,42 +366,34 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(85); - if (lookahead == '\n') SKIP(83) - if (lookahead == '\r') SKIP(82) - if (lookahead == '(') ADVANCE(94); - if (lookahead == ')') ADVANCE(95); - if (lookahead == '-') ADVANCE(98); - if (lookahead == ':') ADVANCE(23); - if (lookahead == 'a') ADVANCE(119); - if (lookahead == 'd') ADVANCE(130); - if (lookahead == 'f') ADVANCE(131); - if (lookahead == 'i') ADVANCE(124); - if (lookahead == 'l') ADVANCE(114); - if (lookahead == 'm') ADVANCE(99); - if (lookahead == 'n') ADVANCE(107); - if (lookahead == 'o') ADVANCE(129); - if (lookahead == 's') ADVANCE(125); - if (lookahead == 'w') ADVANCE(116); - if (lookahead == '.' || + if (eof) ADVANCE(83); + if (lookahead == '\n') SKIP(81) + if (lookahead == '\r') SKIP(80) + if (lookahead == '(') ADVANCE(92); + if (lookahead == ')') ADVANCE(93); + if (lookahead == ':') ADVANCE(87); + if (lookahead == '-' || + lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(141); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(95); + if (lookahead != 0) ADVANCE(86); END_STATE(); case 1: - if (lookahead == '\n') SKIP(1) - if (lookahead == '\r') ADVANCE(88); - if (lookahead == '-') ADVANCE(87); - if (lookahead != 0) ADVANCE(88); + if (lookahead == '\n') SKIP(2) END_STATE(); case 2: - if (lookahead == '\n') SKIP(3) + if (lookahead == '\n') SKIP(2) + if (lookahead == '\r') SKIP(1) + if (lookahead == ':') ADVANCE(87); + if (lookahead != 0) ADVANCE(86); END_STATE(); case 3: if (lookahead == '\n') SKIP(3) - if (lookahead == '\r') SKIP(2) - if (lookahead != 0) ADVANCE(89); + if (lookahead == '\r') ADVANCE(84); + if (lookahead == '-') ADVANCE(85); + if (lookahead != 0) ADVANCE(84); END_STATE(); case 4: if (lookahead == '\n') SKIP(5) @@ -352,774 +401,320 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { case 5: if (lookahead == '\n') SKIP(5) if (lookahead == '\r') SKIP(4) - if (lookahead == '-') ADVANCE(8); + if (lookahead != 0) ADVANCE(86); END_STATE(); case 6: - if (lookahead == '\n') SKIP(5) - if (lookahead == '\r') SKIP(4) - if (lookahead == '-') ADVANCE(8); - if (lookahead == 'a') ADVANCE(48); - if (lookahead == 'd') ADVANCE(69); - if (lookahead == 'f') ADVANCE(66); - if (lookahead == 'i') ADVANCE(54); - if (lookahead == 'l') ADVANCE(38); - if (lookahead == 'm') ADVANCE(14); - if (lookahead == 'n') ADVANCE(26); - if (lookahead == 'o') ADVANCE(61); - if (lookahead == 's') ADVANCE(59); - if (lookahead == 'w') ADVANCE(40); + if (lookahead == '(') ADVANCE(92); + if (lookahead == ')') ADVANCE(93); + if (lookahead == '-' || + lookahead == '.' || + ('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(95); END_STATE(); case 7: - if (lookahead == '-') ADVANCE(143); + if (lookahead == '-') ADVANCE(97); END_STATE(); case 8: - if (lookahead == '-') ADVANCE(7); + if (lookahead == '-') ADVANCE(29); END_STATE(); case 9: - if (lookahead == '-') ADVANCE(30); + if (lookahead == 'a') ADVANCE(35); END_STATE(); case 10: - if (lookahead == 'a') ADVANCE(36); + if (lookahead == 'a') ADVANCE(46); END_STATE(); case 11: - if (lookahead == 'a') ADVANCE(47); + if (lookahead == 'a') ADVANCE(72); END_STATE(); case 12: - if (lookahead == 'a') ADVANCE(73); + if (lookahead == 'a') ADVANCE(70); END_STATE(); case 13: - if (lookahead == 'a') ADVANCE(71); + if (lookahead == 'a') ADVANCE(19); END_STATE(); case 14: - if (lookahead == 'a') ADVANCE(19); + if (lookahead == 'a') ADVANCE(47); + if (lookahead == 'd') ADVANCE(68); + if (lookahead == 'f') ADVANCE(65); + if (lookahead == 'i') ADVANCE(53); + if (lookahead == 'l') ADVANCE(37); + if (lookahead == 'm') ADVANCE(13); + if (lookahead == 'n') ADVANCE(25); + if (lookahead == 'o') ADVANCE(60); + if (lookahead == 's') ADVANCE(58); + if (lookahead == 'w') ADVANCE(39); END_STATE(); case 15: - if (lookahead == 'a') ADVANCE(33); + if (lookahead == 'a') ADVANCE(32); END_STATE(); case 16: - if (lookahead == 'a') ADVANCE(34); + if (lookahead == 'a') ADVANCE(33); END_STATE(); case 17: - if (lookahead == 'a') ADVANCE(68); + if (lookahead == 'a') ADVANCE(67); END_STATE(); case 18: - if (lookahead == 'b') ADVANCE(72); + if (lookahead == 'b') ADVANCE(71); END_STATE(); case 19: - if (lookahead == 'c') ADVANCE(54); + if (lookahead == 'c') ADVANCE(53); END_STATE(); case 20: - if (lookahead == 'd') ADVANCE(142); + if (lookahead == 'd') ADVANCE(96); END_STATE(); case 21: - if (lookahead == 'd') ADVANCE(53); + if (lookahead == 'd') ADVANCE(52); END_STATE(); case 22: - if (lookahead == 'd') ADVANCE(67); + if (lookahead == 'd') ADVANCE(66); END_STATE(); case 23: - if (lookahead == 'e') ADVANCE(65); - if (lookahead == 'f') ADVANCE(10); - if (lookahead == 'l') ADVANCE(11); - if (lookahead == 'p') ADVANCE(44); - if (lookahead == 's') ADVANCE(41); + if (lookahead == 'e') ADVANCE(91); END_STATE(); case 24: - if (lookahead == 'e') ADVANCE(93); + if (lookahead == 'e') ADVANCE(18); END_STATE(); case 25: - if (lookahead == 'e') ADVANCE(18); + if (lookahead == 'e') ADVANCE(74); END_STATE(); case 26: - if (lookahead == 'e') ADVANCE(75); + if (lookahead == 'e') ADVANCE(48); END_STATE(); case 27: - if (lookahead == 'e') ADVANCE(49); + if (lookahead == 'e') ADVANCE(24); END_STATE(); case 28: - if (lookahead == 'e') ADVANCE(25); + if (lookahead == 'f') ADVANCE(42); END_STATE(); case 29: - if (lookahead == 'f') ADVANCE(42); + if (lookahead == 'f') ADVANCE(12); END_STATE(); case 30: - if (lookahead == 'f') ADVANCE(13); + if (lookahead == 'f') ADVANCE(55); END_STATE(); case 31: - if (lookahead == 'f') ADVANCE(56); + if (lookahead == 'g') ADVANCE(76); END_STATE(); case 32: - if (lookahead == 'g') ADVANCE(77); + if (lookahead == 'g') ADVANCE(23); END_STATE(); case 33: - if (lookahead == 'g') ADVANCE(24); + if (lookahead == 'g') ADVANCE(57); END_STATE(); case 34: - if (lookahead == 'g') ADVANCE(58); + if (lookahead == 'i') ADVANCE(59); END_STATE(); case 35: - if (lookahead == 'i') ADVANCE(60); + if (lookahead == 'i') ADVANCE(41); END_STATE(); case 36: - if (lookahead == 'i') ADVANCE(43); + if (lookahead == 'i') ADVANCE(69); END_STATE(); case 37: - if (lookahead == 'i') ADVANCE(70); + if (lookahead == 'i') ADVANCE(49); END_STATE(); case 38: - if (lookahead == 'i') ADVANCE(50); + if (lookahead == 'i') ADVANCE(20); END_STATE(); case 39: - if (lookahead == 'i') ADVANCE(20); + if (lookahead == 'i') ADVANCE(50); END_STATE(); case 40: - if (lookahead == 'i') ADVANCE(51); + if (lookahead == 'k') ADVANCE(34); END_STATE(); case 41: - if (lookahead == 'k') ADVANCE(35); + if (lookahead == 'l') ADVANCE(8); END_STATE(); case 42: - if (lookahead == 'l') ADVANCE(80); + if (lookahead == 'l') ADVANCE(79); END_STATE(); case 43: - if (lookahead == 'l') ADVANCE(9); + if (lookahead == 'l') ADVANCE(11); END_STATE(); case 44: - if (lookahead == 'l') ADVANCE(12); + if (lookahead == 'l') ADVANCE(17); END_STATE(); case 45: - if (lookahead == 'l') ADVANCE(17); + if (lookahead == 'm') ADVANCE(94); END_STATE(); case 46: - if (lookahead == 'm') ADVANCE(96); + if (lookahead == 'n') ADVANCE(31); END_STATE(); case 47: - if (lookahead == 'n') ADVANCE(32); + if (lookahead == 'n') ADVANCE(22); END_STATE(); case 48: - if (lookahead == 'n') ADVANCE(22); + if (lookahead == 'n') ADVANCE(18); END_STATE(); case 49: - if (lookahead == 'n') ADVANCE(18); + if (lookahead == 'n') ADVANCE(75); END_STATE(); case 50: - if (lookahead == 'n') ADVANCE(76); + if (lookahead == 'n') ADVANCE(21); END_STATE(); case 51: - if (lookahead == 'n') ADVANCE(21); + if (lookahead == 'n') ADVANCE(28); END_STATE(); case 52: - if (lookahead == 'n') ADVANCE(29); + if (lookahead == 'o') ADVANCE(77); END_STATE(); case 53: - if (lookahead == 'o') ADVANCE(78); + if (lookahead == 'o') ADVANCE(69); END_STATE(); case 54: - if (lookahead == 'o') ADVANCE(70); + if (lookahead == 'o') ADVANCE(62); END_STATE(); case 55: if (lookahead == 'o') ADVANCE(63); END_STATE(); case 56: - if (lookahead == 'o') ADVANCE(64); + if (lookahead == 'o') ADVANCE(38); END_STATE(); case 57: - if (lookahead == 'o') ADVANCE(39); + if (lookahead == 'o') ADVANCE(51); END_STATE(); case 58: - if (lookahead == 'o') ADVANCE(52); + if (lookahead == 'o') ADVANCE(44); END_STATE(); case 59: - if (lookahead == 'o') ADVANCE(45); + if (lookahead == 'p') ADVANCE(88); END_STATE(); case 60: - if (lookahead == 'p') ADVANCE(90); + if (lookahead == 'p') ADVANCE(26); END_STATE(); case 61: - if (lookahead == 'p') ADVANCE(27); + if (lookahead == 'r') ADVANCE(54); END_STATE(); case 62: - if (lookahead == 'r') ADVANCE(55); + if (lookahead == 'r') ADVANCE(89); END_STATE(); case 63: - if (lookahead == 'r') ADVANCE(91); + if (lookahead == 'r') ADVANCE(45); END_STATE(); case 64: - if (lookahead == 'r') ADVANCE(46); + if (lookahead == 'r') ADVANCE(61); END_STATE(); case 65: - if (lookahead == 'r') ADVANCE(62); + if (lookahead == 'r') ADVANCE(27); END_STATE(); case 66: - if (lookahead == 'r') ADVANCE(28); + if (lookahead == 'r') ADVANCE(56); END_STATE(); case 67: - if (lookahead == 'r') ADVANCE(57); + if (lookahead == 'r') ADVANCE(36); END_STATE(); case 68: - if (lookahead == 'r') ADVANCE(37); + if (lookahead == 'r') ADVANCE(16); END_STATE(); case 69: - if (lookahead == 'r') ADVANCE(16); + if (lookahead == 's') ADVANCE(96); END_STATE(); case 70: - if (lookahead == 's') ADVANCE(142); + if (lookahead == 's') ADVANCE(73); END_STATE(); case 71: - if (lookahead == 's') ADVANCE(74); + if (lookahead == 's') ADVANCE(20); END_STATE(); case 72: - if (lookahead == 's') ADVANCE(20); + if (lookahead == 't') ADVANCE(30); END_STATE(); case 73: - if (lookahead == 't') ADVANCE(31); + if (lookahead == 't') ADVANCE(90); END_STATE(); case 74: - if (lookahead == 't') ADVANCE(92); + if (lookahead == 't') ADVANCE(18); END_STATE(); case 75: - if (lookahead == 't') ADVANCE(18); + if (lookahead == 'u') ADVANCE(78); END_STATE(); case 76: - if (lookahead == 'u') ADVANCE(79); + if (lookahead == 'u') ADVANCE(15); END_STATE(); case 77: - if (lookahead == 'u') ADVANCE(15); + if (lookahead == 'w') ADVANCE(69); END_STATE(); case 78: - if (lookahead == 'w') ADVANCE(70); + if (lookahead == 'x') ADVANCE(96); END_STATE(); case 79: - if (lookahead == 'x') ADVANCE(142); + if (lookahead == 'y') ADVANCE(96); END_STATE(); case 80: - if (lookahead == 'y') ADVANCE(142); + if (eof) ADVANCE(83); + if (lookahead == '\n') SKIP(81) END_STATE(); case 81: - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); + if (eof) ADVANCE(83); + if (lookahead == '\n') SKIP(81) + if (lookahead == '\r') SKIP(80) + if (lookahead == ':') ADVANCE(87); + if (lookahead != 0) ADVANCE(86); END_STATE(); case 82: - if (eof) ADVANCE(85); - if (lookahead == '\n') SKIP(83) + if (eof) ADVANCE(83); + if (lookahead == '\n') SKIP(82) + if (lookahead == '\r') ADVANCE(84); + if (lookahead != 0) ADVANCE(84); END_STATE(); case 83: - if (eof) ADVANCE(85); - if (lookahead == '\n') SKIP(83) - if (lookahead == '\r') SKIP(82) - if (lookahead == '-') ADVANCE(8); - if (lookahead == ':') ADVANCE(23); + ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 84: - if (eof) ADVANCE(85); - if (lookahead == '\n') SKIP(84) - if (lookahead == '\r') ADVANCE(88); - if (lookahead != 0) ADVANCE(88); + ACCEPT_TOKEN(aux_sym_test_token1); END_STATE(); case 85: - ACCEPT_TOKEN(ts_builtin_sym_end); + ACCEPT_TOKEN(aux_sym_test_token1); + if (lookahead == '-') ADVANCE(7); END_STATE(); case 86: - ACCEPT_TOKEN(aux_sym_test_token1); - if (lookahead == '-') ADVANCE(143); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(88); + ACCEPT_TOKEN(aux_sym_header_token1); END_STATE(); case 87: - ACCEPT_TOKEN(aux_sym_test_token1); - if (lookahead == '-') ADVANCE(86); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(88); - END_STATE(); - case 88: - ACCEPT_TOKEN(aux_sym_test_token1); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(88); - END_STATE(); - case 89: ACCEPT_TOKEN(aux_sym_header_token1); - if (lookahead != 0 && - lookahead != '\n' && - lookahead != '\r') ADVANCE(89); + if (lookahead == 'e') ADVANCE(64); + if (lookahead == 'f') ADVANCE(9); + if (lookahead == 'l') ADVANCE(10); + if (lookahead == 'p') ADVANCE(43); + if (lookahead == 's') ADVANCE(40); END_STATE(); - case 90: + case 88: ACCEPT_TOKEN(sym_skip); END_STATE(); - case 91: + case 89: ACCEPT_TOKEN(sym_error); END_STATE(); - case 92: + case 90: ACCEPT_TOKEN(sym_fail_fast); END_STATE(); - case 93: + case 91: ACCEPT_TOKEN(anon_sym_COLONlanguage); END_STATE(); - case 94: + case 92: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); - case 95: + case 93: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); - case 96: + case 94: ACCEPT_TOKEN(anon_sym_COLONplatform); END_STATE(); - case 97: - ACCEPT_TOKEN(sym__lang); - if (lookahead == '-') ADVANCE(143); - if (lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 98: - ACCEPT_TOKEN(sym__lang); - if (lookahead == '-') ADVANCE(97); - if (lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 99: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'a') ADVANCE(103); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 100: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'a') ADVANCE(112); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 101: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'a') ADVANCE(133); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('b' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 102: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'b') ADVANCE(135); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 103: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'c') ADVANCE(124); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 104: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'd') ADVANCE(141); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 105: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'd') ADVANCE(132); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 106: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'd') ADVANCE(126); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 107: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'e') ADVANCE(136); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 108: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'e') ADVANCE(102); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 109: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'e') ADVANCE(121); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 110: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'e') ADVANCE(108); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 111: + case 95: ACCEPT_TOKEN(sym__lang); - if (lookahead == 'f') ADVANCE(117); if (lookahead == '-' || lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(95); END_STATE(); - case 112: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'g') ADVANCE(128); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); + case 96: + ACCEPT_TOKEN(sym__os); END_STATE(); - case 113: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'i') ADVANCE(134); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 114: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'i') ADVANCE(120); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 115: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'i') ADVANCE(104); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 116: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'i') ADVANCE(123); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 117: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'l') ADVANCE(140); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 118: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'l') ADVANCE(101); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 119: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'n') ADVANCE(105); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 120: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'n') ADVANCE(137); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 121: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'n') ADVANCE(102); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 122: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'n') ADVANCE(111); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 123: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'n') ADVANCE(106); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 124: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'o') ADVANCE(134); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 125: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'o') ADVANCE(118); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 126: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'o') ADVANCE(138); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 127: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'o') ADVANCE(115); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 128: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'o') ADVANCE(122); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 129: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'p') ADVANCE(109); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 130: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'r') ADVANCE(100); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 131: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'r') ADVANCE(110); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 132: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'r') ADVANCE(127); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 133: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'r') ADVANCE(113); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 134: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 's') ADVANCE(141); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 135: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 's') ADVANCE(104); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 136: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 't') ADVANCE(102); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 137: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'u') ADVANCE(139); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 138: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'w') ADVANCE(134); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 139: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'x') ADVANCE(141); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 140: - ACCEPT_TOKEN(sym__lang); - if (lookahead == 'y') ADVANCE(141); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 141: - ACCEPT_TOKEN(sym__lang); - if (lookahead == '-' || - lookahead == '.' || - ('0' <= lookahead && lookahead <= '9') || - ('A' <= lookahead && lookahead <= 'Z') || - lookahead == '_' || - ('a' <= lookahead && lookahead <= 'z')) ADVANCE(141); - END_STATE(); - case 142: - ACCEPT_TOKEN(sym__os); - END_STATE(); - case 143: - ACCEPT_TOKEN(sym__dashes); - if (lookahead == '-') ADVANCE(143); + case 97: + ACCEPT_TOKEN(aux_sym__dashes_token1); + if (lookahead == '-') ADVANCE(97); END_STATE(); default: return false; @@ -1129,46 +724,47 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0, .external_lex_state = 1}, [1] = {.lex_state = 0, .external_lex_state = 2}, - [2] = {.lex_state = 0, .external_lex_state = 3}, + [2] = {.lex_state = 2, .external_lex_state = 3}, [3] = {.lex_state = 0, .external_lex_state = 3}, [4] = {.lex_state = 0, .external_lex_state = 3}, - [5] = {.lex_state = 0, .external_lex_state = 3}, - [6] = {.lex_state = 0, .external_lex_state = 3}, - [7] = {.lex_state = 0, .external_lex_state = 3}, + [5] = {.lex_state = 2, .external_lex_state = 3}, + [6] = {.lex_state = 2, .external_lex_state = 3}, + [7] = {.lex_state = 0, .external_lex_state = 2}, [8] = {.lex_state = 0, .external_lex_state = 3}, [9] = {.lex_state = 0, .external_lex_state = 2}, - [10] = {.lex_state = 0, .external_lex_state = 2}, - [11] = {.lex_state = 84, .external_lex_state = 4}, - [12] = {.lex_state = 84, .external_lex_state = 4}, - [13] = {.lex_state = 1, .external_lex_state = 5}, - [14] = {.lex_state = 1, .external_lex_state = 5}, - [15] = {.lex_state = 84, .external_lex_state = 2}, - [16] = {.lex_state = 1, .external_lex_state = 5}, - [17] = {.lex_state = 84, .external_lex_state = 2}, - [18] = {.lex_state = 0, .external_lex_state = 2}, - [19] = {.lex_state = 1}, - [20] = {.lex_state = 1}, - [21] = {.lex_state = 0, .external_lex_state = 2}, - [22] = {.lex_state = 0, .external_lex_state = 2}, - [23] = {.lex_state = 1}, - [24] = {.lex_state = 1}, - [25] = {.lex_state = 3, .external_lex_state = 6}, - [26] = {.lex_state = 0, .external_lex_state = 3}, + [10] = {.lex_state = 0, .external_lex_state = 3}, + [11] = {.lex_state = 0, .external_lex_state = 3}, + [12] = {.lex_state = 3}, + [13] = {.lex_state = 82, .external_lex_state = 4}, + [14] = {.lex_state = 82, .external_lex_state = 2}, + [15] = {.lex_state = 82, .external_lex_state = 2}, + [16] = {.lex_state = 82, .external_lex_state = 2}, + [17] = {.lex_state = 82, .external_lex_state = 2}, + [18] = {.lex_state = 3}, + [19] = {.lex_state = 82, .external_lex_state = 2}, + [20] = {.lex_state = 3}, + [21] = {.lex_state = 82, .external_lex_state = 5}, + [22] = {.lex_state = 5, .external_lex_state = 6}, + [23] = {.lex_state = 0, .external_lex_state = 3}, + [24] = {.lex_state = 5}, + [25] = {.lex_state = 82}, + [26] = {.lex_state = 6}, [27] = {.lex_state = 6}, - [28] = {.lex_state = 81}, - [29] = {.lex_state = 6}, - [30] = {.lex_state = 0, .external_lex_state = 3}, - [31] = {.lex_state = 0}, - [32] = {.lex_state = 0}, - [33] = {.lex_state = 3}, + [28] = {.lex_state = 14}, + [29] = {.lex_state = 82}, + [30] = {.lex_state = 82}, + [31] = {.lex_state = 6}, + [32] = {.lex_state = 6}, + [33] = {.lex_state = 82}, [34] = {.lex_state = 0}, - [35] = {.lex_state = 0}, - [36] = {.lex_state = 0}, + [35] = {.lex_state = 6}, + [36] = {.lex_state = 5}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), + [aux_sym_header_token1] = ACTIONS(1), [sym_skip] = ACTIONS(1), [sym_error] = ACTIONS(1), [sym_fail_fast] = ACTIONS(1), @@ -1177,388 +773,410 @@ static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [anon_sym_RPAREN] = ACTIONS(1), [anon_sym_COLONplatform] = ACTIONS(1), [sym__lang] = ACTIONS(1), - [sym__os] = ACTIONS(1), - [sym__dashes] = ACTIONS(1), - [sym__equals_begin] = ACTIONS(1), - [sym__equals_end] = ACTIONS(1), - [sym__extra_delimiter_equals_begin] = ACTIONS(1), - [sym__extra_delimiter_equals_end] = ACTIONS(1), - [sym__extra_delimiter_dashes] = ACTIONS(1), + [sym__equals_begin_ext] = ACTIONS(1), + [sym__equals_end_ext] = ACTIONS(1), + [sym__suffix_equals_begin] = ACTIONS(1), + [sym__suffix_equals_end] = ACTIONS(1), + [sym__suffix_dashes] = ACTIONS(1), [sym___error_recovery] = ACTIONS(1), }, [1] = { - [sym_file] = STATE(36), - [sym_test] = STATE(9), - [sym_header] = STATE(19), - [aux_sym_file_repeat1] = STATE(9), + [sym_file] = STATE(34), + [sym_test] = STATE(7), + [sym_header] = STATE(25), + [sym__equals_begin] = STATE(24), + [aux_sym_file_repeat1] = STATE(7), [ts_builtin_sym_end] = ACTIONS(3), - [sym__equals_begin] = ACTIONS(5), + [sym__equals_begin_ext] = ACTIONS(5), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 7, - ACTIONS(9), 1, - anon_sym_COLONlanguage, + [0] = 10, + ACTIONS(7), 1, + aux_sym_header_token1, ACTIONS(11), 1, - anon_sym_COLONplatform, - ACTIONS(13), 1, - sym__equals_end, - STATE(5), 1, - aux_sym_attributes_repeat1, - STATE(30), 1, - sym_attributes, - STATE(8), 2, - sym_language, - sym_platform, - ACTIONS(7), 3, - sym_skip, - sym_error, - sym_fail_fast, - [25] = 7, - ACTIONS(9), 1, anon_sym_COLONlanguage, - ACTIONS(11), 1, + ACTIONS(13), 1, anon_sym_COLONplatform, ACTIONS(15), 1, - sym__equals_end, - STATE(5), 1, + sym__equals_end_ext, + STATE(4), 1, aux_sym_attributes_repeat1, - STATE(26), 1, + STATE(5), 1, + aux_sym_header_repeat1, + STATE(23), 1, sym_attributes, - STATE(8), 2, + STATE(30), 1, + sym__equals_end, + STATE(10), 2, sym_language, sym_platform, - ACTIONS(7), 3, + ACTIONS(9), 3, sym_skip, sym_error, sym_fail_fast, - [50] = 6, + [34] = 6, ACTIONS(20), 1, anon_sym_COLONlanguage, ACTIONS(23), 1, anon_sym_COLONplatform, ACTIONS(26), 1, - sym__equals_end, - STATE(4), 1, + sym__equals_end_ext, + STATE(3), 1, aux_sym_attributes_repeat1, - STATE(8), 2, + STATE(10), 2, sym_language, sym_platform, ACTIONS(17), 3, sym_skip, sym_error, sym_fail_fast, - [72] = 6, - ACTIONS(9), 1, - anon_sym_COLONlanguage, + [56] = 6, ACTIONS(11), 1, + anon_sym_COLONlanguage, + ACTIONS(13), 1, anon_sym_COLONplatform, ACTIONS(28), 1, - sym__equals_end, - STATE(4), 1, + sym__equals_end_ext, + STATE(3), 1, aux_sym_attributes_repeat1, - STATE(8), 2, + STATE(10), 2, sym_language, sym_platform, - ACTIONS(7), 3, - sym_skip, - sym_error, - sym_fail_fast, - [94] = 1, - ACTIONS(30), 6, - sym__equals_end, + ACTIONS(9), 3, sym_skip, sym_error, sym_fail_fast, - anon_sym_COLONlanguage, - anon_sym_COLONplatform, - [103] = 1, - ACTIONS(32), 6, - sym__equals_end, + [78] = 3, + ACTIONS(30), 1, + aux_sym_header_token1, + STATE(5), 1, + aux_sym_header_repeat1, + ACTIONS(33), 6, + sym__equals_end_ext, sym_skip, sym_error, sym_fail_fast, anon_sym_COLONlanguage, anon_sym_COLONplatform, - [112] = 1, - ACTIONS(34), 6, - sym__equals_end, + [93] = 2, + ACTIONS(35), 1, + aux_sym_header_token1, + ACTIONS(37), 6, + sym__equals_end_ext, sym_skip, sym_error, sym_fail_fast, anon_sym_COLONlanguage, anon_sym_COLONplatform, - [121] = 4, + [105] = 5, ACTIONS(5), 1, - sym__equals_begin, - ACTIONS(36), 1, + sym__equals_begin_ext, + ACTIONS(39), 1, ts_builtin_sym_end, - STATE(19), 1, + STATE(24), 1, + sym__equals_begin, + STATE(25), 1, sym_header, - STATE(10), 2, + STATE(9), 2, sym_test, aux_sym_file_repeat1, - [135] = 4, - ACTIONS(38), 1, + [122] = 1, + ACTIONS(41), 6, + sym__equals_end_ext, + sym_skip, + sym_error, + sym_fail_fast, + anon_sym_COLONlanguage, + anon_sym_COLONplatform, + [131] = 5, + ACTIONS(43), 1, ts_builtin_sym_end, - ACTIONS(40), 1, + ACTIONS(45), 1, + sym__equals_begin_ext, + STATE(24), 1, sym__equals_begin, - STATE(19), 1, + STATE(25), 1, sym_header, - STATE(10), 2, + STATE(9), 2, sym_test, aux_sym_file_repeat1, - [149] = 3, - ACTIONS(45), 1, - aux_sym_test_token1, - ACTIONS(47), 1, - sym__extra_delimiter_dashes, - ACTIONS(43), 2, - sym__equals_begin, - ts_builtin_sym_end, - [160] = 3, - ACTIONS(51), 1, - aux_sym_test_token1, - ACTIONS(53), 1, - sym__extra_delimiter_dashes, - ACTIONS(49), 2, - sym__equals_begin, - ts_builtin_sym_end, - [171] = 2, - ACTIONS(57), 1, - sym__extra_delimiter_equals_end, - ACTIONS(55), 2, + [148] = 1, + ACTIONS(48), 6, + sym__equals_end_ext, + sym_skip, + sym_error, + sym_fail_fast, + anon_sym_COLONlanguage, + anon_sym_COLONplatform, + [157] = 1, + ACTIONS(50), 6, + sym__equals_end_ext, + sym_skip, + sym_error, + sym_fail_fast, + anon_sym_COLONlanguage, + anon_sym_COLONplatform, + [166] = 4, + ACTIONS(52), 1, aux_sym_test_token1, + ACTIONS(54), 1, + aux_sym__dashes_token1, + STATE(14), 1, sym__dashes, + STATE(18), 1, + aux_sym_test_repeat1, [179] = 2, - ACTIONS(61), 1, - sym__extra_delimiter_equals_end, - ACTIONS(59), 2, + ACTIONS(58), 1, + sym__suffix_dashes, + ACTIONS(56), 3, + sym__equals_begin_ext, + ts_builtin_sym_end, aux_sym_test_token1, - sym__dashes, - [187] = 2, - ACTIONS(45), 1, + [188] = 3, + ACTIONS(62), 1, aux_sym_test_token1, - ACTIONS(43), 2, - sym__equals_begin, + STATE(15), 1, + aux_sym_test_repeat1, + ACTIONS(60), 2, + sym__equals_begin_ext, ts_builtin_sym_end, - [195] = 2, - ACTIONS(65), 1, - sym__extra_delimiter_equals_end, - ACTIONS(63), 2, + [199] = 3, + ACTIONS(62), 1, aux_sym_test_token1, - sym__dashes, - [203] = 2, - ACTIONS(69), 1, + STATE(16), 1, + aux_sym_test_repeat1, + ACTIONS(64), 2, + sym__equals_begin_ext, + ts_builtin_sym_end, + [210] = 3, + ACTIONS(68), 1, aux_sym_test_token1, - ACTIONS(67), 2, - sym__equals_begin, + STATE(16), 1, + aux_sym_test_repeat1, + ACTIONS(66), 2, + sym__equals_begin_ext, ts_builtin_sym_end, - [211] = 1, - ACTIONS(71), 2, - sym__equals_begin, + [221] = 1, + ACTIONS(71), 3, + sym__equals_begin_ext, ts_builtin_sym_end, - [216] = 2, - ACTIONS(73), 1, aux_sym_test_token1, - ACTIONS(75), 1, - sym__dashes, - [223] = 1, - ACTIONS(77), 2, + [227] = 3, + ACTIONS(73), 1, aux_sym_test_token1, - sym__dashes, - [228] = 1, - ACTIONS(79), 2, - sym__equals_begin, + ACTIONS(76), 1, + aux_sym__dashes_token1, + STATE(18), 1, + aux_sym_test_repeat1, + [237] = 1, + ACTIONS(78), 3, + sym__equals_begin_ext, ts_builtin_sym_end, - [233] = 1, - ACTIONS(81), 2, - sym__equals_begin, - ts_builtin_sym_end, - [238] = 1, - ACTIONS(59), 2, aux_sym_test_token1, - sym__dashes, [243] = 1, - ACTIONS(63), 2, + ACTIONS(80), 2, aux_sym_test_token1, - sym__dashes, + aux_sym__dashes_token1, [248] = 2, - ACTIONS(83), 1, + ACTIONS(82), 1, + aux_sym_test_token1, + ACTIONS(84), 1, + sym__suffix_equals_end, + [255] = 2, + ACTIONS(86), 1, aux_sym_header_token1, - ACTIONS(85), 1, - sym__extra_delimiter_equals_begin, - [255] = 1, - ACTIONS(13), 1, - sym__equals_end, - [259] = 1, - ACTIONS(87), 1, - sym__os, - [263] = 1, - ACTIONS(89), 1, - sym__lang, - [267] = 1, - ACTIONS(91), 1, - sym__dashes, - [271] = 1, - ACTIONS(93), 1, + ACTIONS(88), 1, + sym__suffix_equals_begin, + [262] = 2, + ACTIONS(15), 1, + sym__equals_end_ext, + STATE(29), 1, sym__equals_end, - [275] = 1, - ACTIONS(95), 1, - anon_sym_RPAREN, - [279] = 1, - ACTIONS(97), 1, - anon_sym_RPAREN, - [283] = 1, - ACTIONS(99), 1, + [269] = 2, + ACTIONS(90), 1, aux_sym_header_token1, - [287] = 1, - ACTIONS(101), 1, + STATE(2), 1, + aux_sym_header_repeat1, + [276] = 2, + ACTIONS(92), 1, + aux_sym_test_token1, + STATE(12), 1, + aux_sym_test_repeat1, + [283] = 1, + ACTIONS(94), 1, anon_sym_LPAREN, + [287] = 1, + ACTIONS(96), 1, + sym__lang, [291] = 1, - ACTIONS(103), 1, - anon_sym_LPAREN, + ACTIONS(98), 1, + sym__os, [295] = 1, - ACTIONS(105), 1, + ACTIONS(100), 1, + aux_sym_test_token1, + [299] = 1, + ACTIONS(102), 1, + aux_sym_test_token1, + [303] = 1, + ACTIONS(104), 1, + anon_sym_RPAREN, + [307] = 1, + ACTIONS(106), 1, + anon_sym_RPAREN, + [311] = 1, + ACTIONS(108), 1, + aux_sym_test_token1, + [315] = 1, + ACTIONS(110), 1, ts_builtin_sym_end, + [319] = 1, + ACTIONS(112), 1, + anon_sym_LPAREN, + [323] = 1, + ACTIONS(114), 1, + aux_sym_header_token1, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(2)] = 0, - [SMALL_STATE(3)] = 25, - [SMALL_STATE(4)] = 50, - [SMALL_STATE(5)] = 72, - [SMALL_STATE(6)] = 94, - [SMALL_STATE(7)] = 103, - [SMALL_STATE(8)] = 112, - [SMALL_STATE(9)] = 121, - [SMALL_STATE(10)] = 135, - [SMALL_STATE(11)] = 149, - [SMALL_STATE(12)] = 160, - [SMALL_STATE(13)] = 171, - [SMALL_STATE(14)] = 179, - [SMALL_STATE(15)] = 187, - [SMALL_STATE(16)] = 195, - [SMALL_STATE(17)] = 203, - [SMALL_STATE(18)] = 211, - [SMALL_STATE(19)] = 216, - [SMALL_STATE(20)] = 223, - [SMALL_STATE(21)] = 228, - [SMALL_STATE(22)] = 233, - [SMALL_STATE(23)] = 238, - [SMALL_STATE(24)] = 243, - [SMALL_STATE(25)] = 248, - [SMALL_STATE(26)] = 255, - [SMALL_STATE(27)] = 259, - [SMALL_STATE(28)] = 263, - [SMALL_STATE(29)] = 267, - [SMALL_STATE(30)] = 271, - [SMALL_STATE(31)] = 275, - [SMALL_STATE(32)] = 279, - [SMALL_STATE(33)] = 283, - [SMALL_STATE(34)] = 287, - [SMALL_STATE(35)] = 291, - [SMALL_STATE(36)] = 295, + [SMALL_STATE(3)] = 34, + [SMALL_STATE(4)] = 56, + [SMALL_STATE(5)] = 78, + [SMALL_STATE(6)] = 93, + [SMALL_STATE(7)] = 105, + [SMALL_STATE(8)] = 122, + [SMALL_STATE(9)] = 131, + [SMALL_STATE(10)] = 148, + [SMALL_STATE(11)] = 157, + [SMALL_STATE(12)] = 166, + [SMALL_STATE(13)] = 179, + [SMALL_STATE(14)] = 188, + [SMALL_STATE(15)] = 199, + [SMALL_STATE(16)] = 210, + [SMALL_STATE(17)] = 221, + [SMALL_STATE(18)] = 227, + [SMALL_STATE(19)] = 237, + [SMALL_STATE(20)] = 243, + [SMALL_STATE(21)] = 248, + [SMALL_STATE(22)] = 255, + [SMALL_STATE(23)] = 262, + [SMALL_STATE(24)] = 269, + [SMALL_STATE(25)] = 276, + [SMALL_STATE(26)] = 283, + [SMALL_STATE(27)] = 287, + [SMALL_STATE(28)] = 291, + [SMALL_STATE(29)] = 295, + [SMALL_STATE(30)] = 299, + [SMALL_STATE(31)] = 303, + [SMALL_STATE(32)] = 307, + [SMALL_STATE(33)] = 311, + [SMALL_STATE(34)] = 315, + [SMALL_STATE(35)] = 319, + [SMALL_STATE(36)] = 323, }; 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_file, 0), - [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), - [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), - [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), - [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), - [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [17] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 4), SHIFT_REPEAT(8), - [20] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 4), SHIFT_REPEAT(35), - [23] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 4), SHIFT_REPEAT(34), - [26] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 4), - [28] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributes, 1, .production_id = 2), - [30] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_platform, 4), - [32] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_language, 4), - [34] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 1, .production_id = 1), - [36] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file, 1), - [38] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2), - [40] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2), SHIFT_REPEAT(25), - [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 3), - [45] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), - [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), - [49] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 2), - [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), - [53] = {.entry = {.count = 1, .reusable = true}}, SHIFT(15), - [55] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_header, 3), - [57] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), - [59] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_header, 5), - [61] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), - [63] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_header, 4), - [65] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), - [67] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 4), - [69] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), - [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 4, .production_id = 5), - [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), - [75] = {.entry = {.count = 1, .reusable = false}}, SHIFT(12), - [77] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_header, 6), - [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 5, .production_id = 6), - [81] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 3, .production_id = 3), - [83] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), - [85] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), - [87] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), - [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [93] = {.entry = {.count = 1, .reusable = true}}, SHIFT(14), - [95] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), - [97] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), - [99] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), - [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), - [103] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [105] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(6), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [11] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [13] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(21), + [17] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 6), SHIFT_REPEAT(10), + [20] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 6), SHIFT_REPEAT(26), + [23] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 6), SHIFT_REPEAT(35), + [26] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 2, .production_id = 6), + [28] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_attributes, 1, .production_id = 4), + [30] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_header_repeat1, 2), SHIFT_REPEAT(6), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_header_repeat1, 2), + [35] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_header_repeat1, 1), + [37] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_header_repeat1, 1), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_file, 1), + [41] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_language, 4), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2), + [45] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_file_repeat1, 2), SHIFT_REPEAT(22), + [48] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_attributes_repeat1, 1, .production_id = 2), + [50] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_platform, 4), + [52] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [54] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), + [56] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__dashes, 1), + [58] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [60] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 3, .production_id = 1), + [62] = {.entry = {.count = 1, .reusable = true}}, SHIFT(17), + [64] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_test, 4, .production_id = 5), + [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_test_repeat1, 2), + [68] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_test_repeat1, 2), SHIFT_REPEAT(17), + [71] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_test_repeat1, 1), + [73] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_test_repeat1, 2), SHIFT_REPEAT(20), + [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_test_repeat1, 2), + [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__dashes, 2), + [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_test_repeat1, 1), + [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equals_end, 1), + [84] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equals_begin, 1), + [88] = {.entry = {.count = 1, .reusable = true}}, SHIFT(36), + [90] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [94] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), + [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_header, 4, .production_id = 3), + [102] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_header, 3, .production_id = 3), + [104] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [106] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equals_end, 2), + [110] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [112] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [114] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__equals_begin, 2), }; enum ts_external_scanner_symbol_identifiers { - ts_external_token__equals_begin = 0, - ts_external_token__equals_end = 1, - ts_external_token__extra_delimiter_equals_begin = 2, - ts_external_token__extra_delimiter_equals_end = 3, - ts_external_token__extra_delimiter_dashes = 4, + ts_external_token__equals_begin_ext = 0, + ts_external_token__equals_end_ext = 1, + ts_external_token__suffix_equals_begin = 2, + ts_external_token__suffix_equals_end = 3, + ts_external_token__suffix_dashes = 4, ts_external_token___error_recovery = 5, }; static const TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { - [ts_external_token__equals_begin] = sym__equals_begin, - [ts_external_token__equals_end] = sym__equals_end, - [ts_external_token__extra_delimiter_equals_begin] = sym__extra_delimiter_equals_begin, - [ts_external_token__extra_delimiter_equals_end] = sym__extra_delimiter_equals_end, - [ts_external_token__extra_delimiter_dashes] = sym__extra_delimiter_dashes, + [ts_external_token__equals_begin_ext] = sym__equals_begin_ext, + [ts_external_token__equals_end_ext] = sym__equals_end_ext, + [ts_external_token__suffix_equals_begin] = sym__suffix_equals_begin, + [ts_external_token__suffix_equals_end] = sym__suffix_equals_end, + [ts_external_token__suffix_dashes] = sym__suffix_dashes, [ts_external_token___error_recovery] = sym___error_recovery, }; static const bool ts_external_scanner_states[7][EXTERNAL_TOKEN_COUNT] = { [1] = { - [ts_external_token__equals_begin] = true, - [ts_external_token__equals_end] = true, - [ts_external_token__extra_delimiter_equals_begin] = true, - [ts_external_token__extra_delimiter_equals_end] = true, - [ts_external_token__extra_delimiter_dashes] = true, + [ts_external_token__equals_begin_ext] = true, + [ts_external_token__equals_end_ext] = true, + [ts_external_token__suffix_equals_begin] = true, + [ts_external_token__suffix_equals_end] = true, + [ts_external_token__suffix_dashes] = true, [ts_external_token___error_recovery] = true, }, [2] = { - [ts_external_token__equals_begin] = true, + [ts_external_token__equals_begin_ext] = true, }, [3] = { - [ts_external_token__equals_end] = true, + [ts_external_token__equals_end_ext] = true, }, [4] = { - [ts_external_token__equals_begin] = true, - [ts_external_token__extra_delimiter_dashes] = true, + [ts_external_token__equals_begin_ext] = true, + [ts_external_token__suffix_dashes] = true, }, [5] = { - [ts_external_token__extra_delimiter_equals_end] = true, + [ts_external_token__suffix_equals_end] = true, }, [6] = { - [ts_external_token__extra_delimiter_equals_begin] = true, + [ts_external_token__suffix_equals_begin] = true, }, }; diff --git a/src/scanner.c b/src/scanner.c index 0acfa3a..cc0b269 100644 --- a/src/scanner.c +++ b/src/scanner.c @@ -6,15 +6,15 @@ enum { EQUALS_BEGIN, EQUALS_END, - EXTRA_DELIMITER_EQUALS_BEGIN, - EXTRA_DELIMITER_EQUALS_END, - EXTRA_DELIMITER_DASHES, + SUFFIX_EQUALS_BEGIN, + SUFFIX_EQUALS_END, + SUFFIX_DASHES, ERROR_RECOVERY, }; typedef struct { - uint32_t equals_length; - Array(char) extra_delimiter; + uint32_t suffix_length; + Array(char) suffix; } Scanner; static inline void advance(TSLexer *lexer) { lexer->advance(lexer, false); } @@ -23,34 +23,34 @@ static inline void skip(TSLexer *lexer) { lexer->advance(lexer, true); } void *tree_sitter_test_external_scanner_create() { Scanner *scanner = (Scanner *)ts_calloc(1, sizeof(Scanner)); - array_init(&scanner->extra_delimiter); + array_init(&scanner->suffix); return scanner; } unsigned tree_sitter_test_external_scanner_serialize(void *payload, char *buffer) { Scanner *scanner = (Scanner *)payload; - if (sizeof(scanner->equals_length) + sizeof(scanner->extra_delimiter.size) + scanner->extra_delimiter.size > + if (sizeof scanner->suffix_length + sizeof scanner->suffix.size + scanner->suffix.size > TREE_SITTER_SERIALIZATION_BUFFER_SIZE) { return 0; } size_t size = 0; - *(uint32_t *)(buffer + size) = scanner->equals_length; - size += sizeof(scanner->equals_length); + *(uint32_t *)(buffer + size) = scanner->suffix_length; + size += sizeof scanner->suffix_length; - *(uint32_t *)(buffer + size) = scanner->extra_delimiter.size; - size += sizeof(scanner->extra_delimiter.size); - memcpy(buffer + size, scanner->extra_delimiter.contents, scanner->extra_delimiter.size); - size += scanner->extra_delimiter.size; + *(uint32_t *)(buffer + size) = scanner->suffix.size; + size += sizeof scanner->suffix.size; + memcpy(buffer + size, scanner->suffix.contents, scanner->suffix.size); + size += scanner->suffix.size; return size; } void tree_sitter_test_external_scanner_deserialize(void *payload, const char *buffer, unsigned length) { Scanner *scanner = (Scanner *)payload; - array_clear(&scanner->extra_delimiter); + array_clear(&scanner->suffix); if (length == 0) { return; @@ -58,14 +58,14 @@ void tree_sitter_test_external_scanner_deserialize(void *payload, const char *bu size_t size = 0; - scanner->equals_length = *(uint32_t *)(buffer + size); - size += sizeof(scanner->equals_length); + scanner->suffix_length = *(uint32_t *)(buffer + size); + size += sizeof scanner->suffix_length; uint32_t array_size = *(uint32_t *)(buffer + size); - size += sizeof(scanner->extra_delimiter.size); - array_grow_by(&scanner->extra_delimiter, array_size); - memcpy(scanner->extra_delimiter.contents, buffer + size, scanner->extra_delimiter.size); - size += scanner->extra_delimiter.size; + size += sizeof scanner->suffix.size; + array_grow_by(&scanner->suffix, array_size); + memcpy(scanner->suffix.contents, buffer + size, scanner->suffix.size); + size += scanner->suffix.size; assert(size == length); } @@ -77,36 +77,36 @@ bool tree_sitter_test_external_scanner_scan(void *payload, TSLexer *lexer, const return false; } - if (scanner->equals_length > 0 && valid_symbols[EXTRA_DELIMITER_EQUALS_BEGIN]) { + if (scanner->suffix_length > 0 && valid_symbols[SUFFIX_EQUALS_BEGIN]) { while (!iswspace(lexer->lookahead) && !lexer->eof(lexer)) { - array_push(&scanner->extra_delimiter, lexer->lookahead); + array_push(&scanner->suffix, lexer->lookahead); advance(lexer); } - lexer->result_symbol = EXTRA_DELIMITER_EQUALS_BEGIN; - return scanner->extra_delimiter.size > 0; + lexer->result_symbol = SUFFIX_EQUALS_BEGIN; + return scanner->suffix.size > 0; } - if (scanner->equals_length == 0 && valid_symbols[EXTRA_DELIMITER_EQUALS_END] && scanner->extra_delimiter.size > 0) { + if (scanner->suffix_length == 0 && valid_symbols[SUFFIX_EQUALS_END] && scanner->suffix.size > 0) { uint32_t index = 0; - while (!iswspace(lexer->lookahead) && !lexer->eof(lexer) && index < scanner->extra_delimiter.size && - scanner->extra_delimiter.contents[index++] == lexer->lookahead) { + while (!iswspace(lexer->lookahead) && !lexer->eof(lexer) && index < scanner->suffix.size && + scanner->suffix.contents[index++] == lexer->lookahead) { advance(lexer); } - lexer->result_symbol = EXTRA_DELIMITER_EQUALS_END; - return index == scanner->extra_delimiter.size; + lexer->result_symbol = SUFFIX_EQUALS_END; + return index == scanner->suffix.size; } - if (scanner->equals_length == 0 && valid_symbols[EXTRA_DELIMITER_DASHES] && scanner->extra_delimiter.size > 0) { + if (scanner->suffix_length == 0 && valid_symbols[SUFFIX_DASHES] && scanner->suffix.size > 0) { uint32_t index = 0; - while (!iswspace(lexer->lookahead) && !lexer->eof(lexer) && index < scanner->extra_delimiter.size && - scanner->extra_delimiter.contents[index++] == lexer->lookahead) { + while (!iswspace(lexer->lookahead) && !lexer->eof(lexer) && index < scanner->suffix.size && + scanner->suffix.contents[index++] == lexer->lookahead) { advance(lexer); } - lexer->result_symbol = EXTRA_DELIMITER_DASHES; - return index == scanner->extra_delimiter.size; + lexer->result_symbol = SUFFIX_DASHES; + return index == scanner->suffix.size; } if (valid_symbols[EQUALS_BEGIN]) { @@ -116,10 +116,10 @@ bool tree_sitter_test_external_scanner_scan(void *payload, TSLexer *lexer, const while (lexer->lookahead == '=') { advance(lexer); - scanner->equals_length++; + scanner->suffix_length += 1; } - if (scanner->equals_length > 0) { + if (scanner->suffix_length > 0) { lexer->result_symbol = EQUALS_BEGIN; return true; } @@ -136,14 +136,14 @@ bool tree_sitter_test_external_scanner_scan(void *payload, TSLexer *lexer, const equals_length++; } - if (equals_length == scanner->equals_length) { + if (equals_length == scanner->suffix_length) { lexer->result_symbol = EQUALS_END; - scanner->equals_length = 0; + scanner->suffix_length = 0; return true; } if (equals_length > 0) { lexer->result_symbol = ERROR_RECOVERY; - scanner->equals_length = UINT32_MAX; + scanner->suffix_length = UINT32_MAX; return true; } @@ -155,6 +155,6 @@ bool tree_sitter_test_external_scanner_scan(void *payload, TSLexer *lexer, const void tree_sitter_test_external_scanner_destroy(void *payload) { Scanner *scanner = (Scanner *)payload; - array_delete(&scanner->extra_delimiter); + array_delete(&scanner->suffix); ts_free(scanner); } diff --git a/test/corpus/test.tst b/test/corpus/test.tst deleted file mode 100644 index 47298b4..0000000 --- a/test/corpus/test.tst +++ /dev/null @@ -1,25 +0,0 @@ -=====||| -hi -=====||| - -===== -hi -===== - -hi - ---- - -(hi) - ----||| - -(file - (test - (header - (separator) - (name) - (separator)) - (input) - (separator) - (output)))