diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..f363cc5 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,39 @@ +root = true + +[*] +charset = utf-8 + +[*.{json,toml,yml,gyp}] +indent_style = space +indent_size = 2 + +[*.js] +indent_style = space +indent_size = 2 + +[*.{c,cc,h}] +indent_style = space +indent_size = 4 + +[*.rs] +indent_style = space +indent_size = 4 + +[*.{py,pyi}] +indent_style = space +indent_size = 4 + +[*.swift] +indent_style = space +indent_size = 4 + +[*.go] +indent_style = tab +indent_size = 8 + +[Makefile] +indent_style = tab +indent_size = 8 + +[parser.c] +indent_size = 2 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4cb1058 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text=auto eol=lf + +src/*.json linguist-generated +src/parser.c linguist-generated +src/tree_sitter/* linguist-generated + +bindings/** linguist-generated +binding.gyp linguist-generated +setup.py linguist-generated +Makefile linguist-generated +Package.swift linguist-generated diff --git a/.gitignore b/.gitignore index 993218f..4889d00 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ node_modules test.d2 .vscode tree-sitter-d2.code-workspace + diff --git a/Cargo.toml b/Cargo.toml index 03a037c..e315875 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,7 +14,7 @@ include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*"] path = "bindings/rust/lib.rs" [dependencies] -tree-sitter = "~0.20.10" +tree-sitter-language = "0.1.0" [build-dependencies] cc = "1.0" diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..92101d5 --- /dev/null +++ b/Package.swift @@ -0,0 +1,60 @@ +// swift-tools-version:5.3 +import PackageDescription + +let package = Package( + name: "TreeSitterD2", + products: [ + .library(name: "TreeSitterD2", targets: ["TreeSitterD2"]), + ], + dependencies: [ + .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), + ], + targets: [ + .target( + name: "TreeSitterD2", + dependencies: [], + path: ".", + exclude: [ + "Cargo.toml", + "Makefile", + "binding.gyp", + "bindings/c", + "bindings/go", + "bindings/node", + "bindings/python", + "bindings/rust", + "prebuilds", + "grammar.js", + "package.json", + "package-lock.json", + "pyproject.toml", + "setup.py", + "test", + "examples", + ".editorconfig", + ".github", + ".gitignore", + ".gitattributes", + ".gitmodules", + ], + sources: [ + "src/parser.c", + // NOTE: if your language has an external scanner, add it here. + ], + resources: [ + .copy("queries") + ], + publicHeadersPath: "bindings/swift", + cSettings: [.headerSearchPath("src")] + ), + .testTarget( + name: "TreeSitterD2Tests", + dependencies: [ + "SwiftTreeSitter", + "TreeSitterD2", + ], + path: "bindings/swift/TreeSitterD2Tests" + ) + ], + cLanguageStandard: .c11 +) diff --git a/binding.gyp b/binding.gyp index 919050d..cd55f42 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,18 +2,29 @@ "targets": [ { "target_name": "tree_sitter_d2_binding", + "dependencies": [ + " -#include "nan.h" +#include -using namespace v8; +typedef struct TSLanguage TSLanguage; -extern "C" TSLanguage * tree_sitter_YOUR_LANGUAGE_NAME(); +extern "C" TSLanguage *tree_sitter_d2(); -namespace { +// "tree-sitter", "language" hashed with BLAKE2 +const napi_type_tag LANGUAGE_TYPE_TAG = { + 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 +}; -NAN_METHOD(New) {} - -void Init(Local exports, Local module) { - Local tpl = Nan::New(New); - tpl->SetClassName(Nan::New("Language").ToLocalChecked()); - tpl->InstanceTemplate()->SetInternalFieldCount(1); - - Local constructor = Nan::GetFunction(tpl).ToLocalChecked(); - Local instance = constructor->NewInstance(Nan::GetCurrentContext()).ToLocalChecked(); - Nan::SetInternalFieldPointer(instance, 0, tree_sitter_YOUR_LANGUAGE_NAME()); - - Nan::Set(instance, Nan::New("name").ToLocalChecked(), Nan::New("YOUR_LANGUAGE_NAME").ToLocalChecked()); - Nan::Set(module, Nan::New("exports").ToLocalChecked(), instance); +Napi::Object Init(Napi::Env env, Napi::Object exports) { + exports["name"] = Napi::String::New(env, "d2"); + auto language = Napi::External::New(env, tree_sitter_d2()); + language.TypeTag(&LANGUAGE_TYPE_TAG); + exports["language"] = language; + return exports; } -NODE_MODULE(tree_sitter_YOUR_LANGUAGE_NAME_binding, Init) - -} // namespace +NODE_API_MODULE(tree_sitter_d2_binding, Init) diff --git a/bindings/node/binding_test.js b/bindings/node/binding_test.js new file mode 100644 index 0000000..afede30 --- /dev/null +++ b/bindings/node/binding_test.js @@ -0,0 +1,9 @@ +/// + +const assert = require("node:assert"); +const { test } = require("node:test"); + +test("can load grammar", () => { + const parser = new (require("tree-sitter"))(); + assert.doesNotThrow(() => parser.setLanguage(require("."))); +}); diff --git a/bindings/node/index.d.ts b/bindings/node/index.d.ts new file mode 100644 index 0000000..efe259e --- /dev/null +++ b/bindings/node/index.d.ts @@ -0,0 +1,28 @@ +type BaseNode = { + type: string; + named: boolean; +}; + +type ChildNode = { + multiple: boolean; + required: boolean; + types: BaseNode[]; +}; + +type NodeInfo = + | (BaseNode & { + subtypes: BaseNode[]; + }) + | (BaseNode & { + fields: { [name: string]: ChildNode }; + children: ChildNode[]; + }); + +type Language = { + name: string; + language: unknown; + nodeTypeInfo: NodeInfo[]; +}; + +declare const language: Language; +export = language; diff --git a/bindings/node/index.js b/bindings/node/index.js index 814d8b0..6657bcf 100644 --- a/bindings/node/index.js +++ b/bindings/node/index.js @@ -1,18 +1,6 @@ -try { - module.exports = require("../../build/Release/tree_sitter_YOUR_LANGUAGE_NAME_binding"); -} catch (error1) { - if (error1.code !== 'MODULE_NOT_FOUND') { - throw error1; - } - try { - module.exports = require("../../build/Debug/tree_sitter_YOUR_LANGUAGE_NAME_binding"); - } catch (error2) { - if (error2.code !== 'MODULE_NOT_FOUND') { - throw error2; - } - throw error1 - } -} +const root = require("path").join(__dirname, "..", ".."); + +module.exports = require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); diff --git a/bindings/python/tests/test_binding.py b/bindings/python/tests/test_binding.py new file mode 100644 index 0000000..5bd6eb3 --- /dev/null +++ b/bindings/python/tests/test_binding.py @@ -0,0 +1,11 @@ +from unittest import TestCase + +import tree_sitter, tree_sitter_d2 + + +class TestLanguage(TestCase): + def test_can_load_grammar(self): + try: + tree_sitter.Language(tree_sitter_d2.language()) + except Exception: + self.fail("Error loading D2 grammar") diff --git a/bindings/python/tree_sitter_d2/__init__.py b/bindings/python/tree_sitter_d2/__init__.py new file mode 100644 index 0000000..83ffaf7 --- /dev/null +++ b/bindings/python/tree_sitter_d2/__init__.py @@ -0,0 +1,42 @@ +"""D2 grammar for tree-sitter""" + +from importlib.resources import files as _files + +from ._binding import language + + +def _get_query(name, file): + query = _files(f"{__package__}.queries") / file + globals()[name] = query.read_text() + return globals()[name] + + +def __getattr__(name): + # NOTE: uncomment these to include any queries that this grammar contains: + + # if name == "HIGHLIGHTS_QUERY": + # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") + # if name == "INJECTIONS_QUERY": + # return _get_query("INJECTIONS_QUERY", "injections.scm") + # if name == "LOCALS_QUERY": + # return _get_query("LOCALS_QUERY", "locals.scm") + # if name == "TAGS_QUERY": + # return _get_query("TAGS_QUERY", "tags.scm") + + raise AttributeError(f"module {__name__!r} has no attribute {name!r}") + + +__all__ = [ + "language", + # "HIGHLIGHTS_QUERY", + # "INJECTIONS_QUERY", + # "LOCALS_QUERY", + # "TAGS_QUERY", +] + + +def __dir__(): + return sorted(__all__ + [ + "__all__", "__builtins__", "__cached__", "__doc__", "__file__", + "__loader__", "__name__", "__package__", "__path__", "__spec__", + ]) diff --git a/bindings/python/tree_sitter_d2/__init__.pyi b/bindings/python/tree_sitter_d2/__init__.pyi new file mode 100644 index 0000000..abf6633 --- /dev/null +++ b/bindings/python/tree_sitter_d2/__init__.pyi @@ -0,0 +1,10 @@ +from typing import Final + +# NOTE: uncomment these to include any queries that this grammar contains: + +# HIGHLIGHTS_QUERY: Final[str] +# INJECTIONS_QUERY: Final[str] +# LOCALS_QUERY: Final[str] +# TAGS_QUERY: Final[str] + +def language() -> object: ... diff --git a/bindings/python/tree_sitter_d2/binding.c b/bindings/python/tree_sitter_d2/binding.c new file mode 100644 index 0000000..f58431f --- /dev/null +++ b/bindings/python/tree_sitter_d2/binding.c @@ -0,0 +1,27 @@ +#include + +typedef struct TSLanguage TSLanguage; + +TSLanguage *tree_sitter_d2(void); + +static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { + return PyCapsule_New(tree_sitter_d2(), "tree_sitter.Language", NULL); +} + +static PyMethodDef methods[] = { + {"language", _binding_language, METH_NOARGS, + "Get the tree-sitter language for this grammar."}, + {NULL, NULL, 0, NULL} +}; + +static struct PyModuleDef module = { + .m_base = PyModuleDef_HEAD_INIT, + .m_name = "_binding", + .m_doc = NULL, + .m_size = -1, + .m_methods = methods +}; + +PyMODINIT_FUNC PyInit__binding(void) { + return PyModule_Create(&module); +} diff --git a/bindings/python/tree_sitter_d2/py.typed b/bindings/python/tree_sitter_d2/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/bindings/rust/build.rs b/bindings/rust/build.rs index c6061f0..4cc26f5 100644 --- a/bindings/rust/build.rs +++ b/bindings/rust/build.rs @@ -7,6 +7,9 @@ fn main() { .flag_if_supported("-Wno-unused-parameter") .flag_if_supported("-Wno-unused-but-set-variable") .flag_if_supported("-Wno-trigraphs"); + #[cfg(target_env = "msvc")] + c_config.flag("-utf-8"); + let parser_path = src_dir.join("parser.c"); c_config.file(&parser_path); diff --git a/bindings/rust/lib.rs b/bindings/rust/lib.rs index b3d2209..940ef99 100644 --- a/bindings/rust/lib.rs +++ b/bindings/rust/lib.rs @@ -1,13 +1,18 @@ -//! This crate provides YOUR_LANGUAGE_NAME language support for the [tree-sitter][] parsing library. +//! This crate provides D2 language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [language][language func] function to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: //! //! ``` -//! let code = ""; +//! let code = r#" +//! "#; //! let mut parser = tree_sitter::Parser::new(); -//! parser.set_language(tree_sitter_YOUR_LANGUAGE_NAME::language()).expect("Error loading YOUR_LANGUAGE_NAME grammar"); +//! let language = tree_sitter_d2::LANGUAGE; +//! parser +//! .set_language(&language.into()) +//! .expect("Error loading D2 parser"); //! let tree = parser.parse(code, None).unwrap(); +//! assert!(!tree.root_node().has_error()); //! ``` //! //! [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html @@ -15,30 +20,26 @@ //! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ -use tree_sitter::Language; +use tree_sitter_language::LanguageFn; extern "C" { - fn tree_sitter_YOUR_LANGUAGE_NAME() -> Language; + fn tree_sitter_d2() -> *const (); } -/// Get the tree-sitter [Language][] for this grammar. -/// -/// [Language]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Language.html -pub fn language() -> Language { - unsafe { tree_sitter_YOUR_LANGUAGE_NAME() } -} +/// The tree-sitter [`LanguageFn`] for this grammar. +pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_d2) }; /// The content of the [`node-types.json`][] file for this grammar. /// /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types -pub const NODE_TYPES: &'static str = include_str!("../../src/node-types.json"); +pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); -// Uncomment these to include any queries that this grammar contains +// NOTE: uncomment these to include any queries that this grammar contains: -// pub const HIGHLIGHTS_QUERY: &'static str = include_str!("../../queries/highlights.scm"); -// pub const INJECTIONS_QUERY: &'static str = include_str!("../../queries/injections.scm"); -// pub const LOCALS_QUERY: &'static str = include_str!("../../queries/locals.scm"); -// pub const TAGS_QUERY: &'static str = include_str!("../../queries/tags.scm"); +// pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/highlights.scm"); +// pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); +// pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); +// pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); #[cfg(test)] mod tests { @@ -46,7 +47,7 @@ mod tests { fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser - .set_language(super::language()) - .expect("Error loading YOUR_LANGUAGE_NAME language"); + .set_language(&super::LANGUAGE.into()) + .expect("Error loading D2 parser"); } } diff --git a/bindings/swift/TreeSitterD2/d2.h b/bindings/swift/TreeSitterD2/d2.h new file mode 100644 index 0000000..2dfaf8e --- /dev/null +++ b/bindings/swift/TreeSitterD2/d2.h @@ -0,0 +1,16 @@ +#ifndef TREE_SITTER_D2_H_ +#define TREE_SITTER_D2_H_ + +typedef struct TSLanguage TSLanguage; + +#ifdef __cplusplus +extern "C" { +#endif + +const TSLanguage *tree_sitter_d2(void); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_D2_H_ diff --git a/bindings/swift/TreeSitterD2Tests/TreeSitterD2Tests.swift b/bindings/swift/TreeSitterD2Tests/TreeSitterD2Tests.swift new file mode 100644 index 0000000..1f82e60 --- /dev/null +++ b/bindings/swift/TreeSitterD2Tests/TreeSitterD2Tests.swift @@ -0,0 +1,12 @@ +import XCTest +import SwiftTreeSitter +import TreeSitterD2 + +final class TreeSitterD2Tests: XCTestCase { + func testCanLoadGrammar() throws { + let parser = Parser() + let language = Language(language: tree_sitter_d2()) + XCTAssertNoThrow(try parser.setLanguage(language), + "Error loading D2 grammar") + } +} diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..38053b6 --- /dev/null +++ b/go.mod @@ -0,0 +1,5 @@ +module github.com/tree-sitter/tree-sitter-d2 + +go 1.23 + +require github.com/tree-sitter/go-tree-sitter v0.23 diff --git a/grammar.js b/grammar.js index 651592d..a1606dc 100644 --- a/grammar.js +++ b/grammar.js @@ -1,85 +1,43 @@ -module.exports = grammar({ - name: 'd2', - - rules: { - source_file: $ => repeat(choice( - // $.direction, - $.expression, - $._comment, - )), - - extras: $ => choice( - $._comment, - /\s+/, - ), - - direction: _ => seq("direction", ":", choice( - "up", - "right", - "left", - "down" - )), - - expression: $ => prec.right(seq( - optional("("), - repeat1(choice( - $.identifier, - $.connection, - )), - optional(")"), - optional(seq( - $.connection_identifier, - $.sub_identifier - )), - optional(seq(":", optional($.label), optional($.container))), - optional(choice(/\n+\s*/, ";")), - )), - - label_block: $ => choice( - seq(":", optional($.label), optional($.container)), - // seq(":", $.container), - // seq(":", $.label), - ), +const newline = /\n/; +const terminator = choice(newline, ';', '\0'); - container: $ => seq("{", repeat($.expression), "}"), +const opseq = (...x) => optional(seq(...x)) - label: _ => /.+/, +module.exports = grammar({ + name: 'd2', - // building blocks + extras: $ => [ + $.comment, + /\s/, + ], - identifier: $ => prec.right(repeat1( + rules: { + source_file: $ => repeat( choice( - $._ident_regex, - $.sub_identifier, - "-", + $.declaration, + $.comment, ) - )), - - sub_identifier: $ => seq(".", $.identifier), - - // Trust me it's better that way than doing it via seq's/repeat's - connection: _ => choice( - /--+/, - /<-+/, - /-+>/, - /<-+>/, - - // Multiline arrows - seq(/--+/, /\\\n+\s+/, /--+/), - seq(/<-+/, /\\\n+\s+/, /--+/), - seq(/--+/, /\\\n+\s+/, /-+>/), - seq(/<-+/, /\\\n+\s+/, /-+>/), ), - connection_identifier: _ => /\[\d+\]/, - - // param_value: _ => /[\w\-_]+/i, + declaration: $ => seq( + $.identifier, + opseq($.connection, $.identifier), + optional($.label), + terminator, + ), - // const-like rules + connection: _ => "->", + label: _ => seq(":", /.*/), - _ident_regex: _ => /[\p{L}0-9_"' ]+/, + identifier: $ => seq($._ident_recursive, opseq(".", $.field)), + field: $ => $._ident_base, + _ident_recursive: $ => seq( + $._ident_base, + opseq(/[\s\'\-\_]+/, $._ident_recursive), + ), + _ident_base: _ => /[\w]+/, - _comment: _ => token(seq('#', /.*\n/)), + comment: _ => token(seq('#', /.*/)), } }); diff --git a/log.html b/log.html new file mode 100644 index 0000000..2020bf0 --- /dev/null +++ b/log.html @@ -0,0 +1,16379 @@ + + + + + + + + + + + + +new_parse + + + + + + + + + +process version:0, version_count:1, state:1, row:0, col:0 + + + + + + + + + +lex_internal state:2, row:0, column:0 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:8 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724000 + + +4 + + + + + +node_head_0->node_0x600003724000 + + +0 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724000->node_0x600003728000 + + +_identifier_token1 + + + + + + + + + + + + +process version:0, version_count:1, state:4, row:0, col:8 + + + + + + + + + +lex_internal state:1, row:0, column:8 + + + + + + + + + +lexed_lookahead sym:declaration_token1, size:1 + + + + + + + + + +reduce sym:identifier, child_count:1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037240f0 + + +2 + + + + + +node_head_0->node_0x6000037240f0 + + +0 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +shift state:13 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724000 + + +13 + + + + + +node_head_0->node_0x600003724000 + + +0 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:1, state:13, row:1, col:0 + + + + + + + + + +lex_internal state:0, row:1, column:0 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:10 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724000 + + +13 + + + + + +node_head_0->node_0x600003724000 + + +0 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +resume version:0 + + + + + + + + + +recover_to_previous state:1, depth:3 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_head_1 + + + +node_0x6000037242d0 + + + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037242d0 + + + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:0, row:1, col:10 + + + + + + + + + +lex_internal state:0, row:1, column:10 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:3 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037242d0 + + + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037242d0 + + + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:3, state:1, row:1, col:0 + + + + + + + + + +lex_internal state:2, row:1, column:0 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:10 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037245a0 + + +4 + + + + + +node_head_1->node_0x6000037245a0 + + +1 + + + + + +node_0x6000037242d0 + + + + + + + +node_0x6000037245a0->node_0x6000037242d0 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:3, state:4, row:1, col:10 + + + + + + + + + +lex_internal state:1, row:1, column:10 + + + + + + + + + +lexed_lookahead sym:declaration_token1, size:1 + + + + + + + + + +reduce sym:identifier, child_count:1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724690 + + +2 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +identifier + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +shift state:13 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037245a0 + + +13 + + + + + +node_head_1->node_0x6000037245a0 + + +1 + + + + + +node_0x600003724690 + + +2 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +declaration_token1 + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +identifier + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:3, state:13, row:2, col:0 + + + + + + + + + +lex_internal state:0, row:2, column:0 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037245a0 + + +13 + + + + + +node_head_1->node_0x6000037245a0 + + +1 + + + + + +node_0x600003724690 + + +2 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +declaration_token1 + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +identifier + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:1, col:10 + + + + + + + + + +lex_internal state:2, row:1, column:10 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:3 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_0->node_0x6000037243c0 + + +0 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x6000037245a0 + + +13 + + + + + +node_head_1->node_0x6000037245a0 + + +1 + + + + + +node_0x600003724690 + + +2 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +declaration_token1 + + + + + +node_head_2 + + + +node_0x600003724780 + + +4 + + + + + +node_head_2->node_0x600003724780 + + +2 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:4, row:2, col:2 + + + + + + + + + +lex_internal state:1, row:2, column:2 + + + + + + + + + +lex_internal state:0, row:2, column:2 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:2, col:2 + + + + + + + + + +lex_internal state:0, row:2, column:2 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037242d0 + + + + + + + +node_head_2->node_0x6000037242d0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037242d0 + + + + + + + +node_head_2->node_0x6000037242d0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:2, col:2 + + + + + + + + + +lex_internal state:2, row:2, column:2 + + + + + + + + + +lexed_lookahead sym: , size:1 + + + + + + + + + +shift state:7 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724690 + + +7 + + + + + +node_head_2->node_0x600003724690 + + +2 + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:7, row:2, col:3 + + + + + + + + + +lex_internal state:0, row:2, column:3 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:1 + + + + + + + + + +shift state:5 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +4 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_2->node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:5, row:2, col:4 + + + + + + + + + +lex_internal state:1, row:2, column:4 + + + + + + + + + +lex_internal state:0, row:2, column:4 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:6 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:2, col:4 + + + + + + + + + +lex_internal state:0, row:2, column:4 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:6 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:2, col:4 + + + + + + + + + +lex_internal state:2, row:2, column:4 + + + + + + + + + +lexed_lookahead sym: , size:1 + + + + + + + + + +shift state:7 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724780 + + +7 + + + + + +node_head_2->node_0x600003724780 + + +2 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +' ' + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:7, row:2, col:5 + + + + + + + + + +lex_internal state:0, row:2, column:5 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:5 + + + + + + + + + +shift state:5 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +5 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037245a0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724870 + + +5 + + + + + +node_head_2->node_0x600003724870 + + +2 + + + + + +node_0x600003724780 + + +7 + + + + + +node_0x600003724870->node_0x600003724780 + + +_identifier_token1 + + + + + +node_0x6000037242d0 + + + + + + + +node_0x600003724690->node_0x6000037242d0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +' ' + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037242d0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724870 + + +5 + + + + + +node_head_0->node_0x600003724870 + + +0 + + + + + +node_0x600003724780 + + +7 + + + + + +node_0x600003724870->node_0x600003724780 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x600003724780->node_0x6000037244b0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:5, row:2, col:10 + + + + + + + + + +lex_internal state:1, row:2, column:10 + + + + + + + + + +lexed_lookahead sym:declaration_token1, size:1 + + + + + + + + + +reduce sym:identifier, child_count:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037242d0 + + +2 + + + + + +node_head_0->node_0x6000037242d0 + + +0 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +shift state:13 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:2, col:10 + + + + + + + + + +lex_internal state:0, row:2, column:10 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:4 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724870 + + + + + + + +node_head_2->node_0x600003724870 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724870 + + + + + + + +node_head_2->node_0x600003724870 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:2, col:10 + + + + + + + + + +lex_internal state:2, row:2, column:10 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:4 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724690 + + +4 + + + + + +node_head_2->node_0x600003724690 + + +2 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:3, state:13, row:3, col:0 + + + + + + + + + +lex_internal state:0, row:3, column:0 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:3 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:3, state:4, row:3, col:3 + + + + + + + + + +lex_internal state:1, row:3, column:3 + + + + + + + + + +lex_internal state:0, row:3, column:3 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:0, row:3, col:3 + + + + + + + + + +lex_internal state:0, row:3, column:3 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_3 + + + +node_0x6000037245a0 + + + + + + + +node_head_3->node_0x6000037245a0 + + +3 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_3 + + + +node_0x6000037245a0 + + + + + + + +node_head_3->node_0x6000037245a0 + + +3 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:3, version_count:4, state:1, row:3, col:3 + + + + + + + + + +lex_internal state:2, row:3, column:3 + + + + + + + + + +lexed_lookahead sym: , size:1 + + + + + + + + + +shift state:7 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_3 + + + +node_0x6000037280f0 + + +7 + + + + + +node_head_3->node_0x6000037280f0 + + +3 + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:3, version_count:4, state:7, row:3, col:4 + + + + + + + + + +lex_internal state:0, row:3, column:4 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:1 + + + + + + + + + +shift state:5 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724780 + + +13 + + + + + +node_head_0->node_0x600003724780 + + +0 + + + + + +node_0x6000037242d0 + + +2 + + + + + +node_0x600003724780->node_0x6000037242d0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x600003724690 + + +4 + + + + + +node_head_1->node_0x600003724690 + + +1 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +_identifier_token1 + + + + + +node_head_2 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_3 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_3->node_0x6000037281e0 + + +3 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_0x6000037244b0 + + + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x6000037244b0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:5, row:3, col:5 + + + + + + + + + +lex_internal state:1, row:3, column:5 + + + + + + + + + +lex_internal state:0, row:3, column:5 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:6 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:3, col:5 + + + + + + + + + +lex_internal state:0, row:3, column:5 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:6 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724870 + + + + + + + +node_head_2->node_0x600003724870 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724870 + + + + + + + +node_head_2->node_0x600003724870 + + +2 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:3, col:5 + + + + + + + + + +lex_internal state:2, row:3, column:5 + + + + + + + + + +lexed_lookahead sym: , size:1 + + + + + + + + + +shift state:7 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x600003724690 + + +7 + + + + + +node_head_2->node_0x600003724690 + + +2 + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +' ' + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:2, version_count:3, state:7, row:3, col:6 + + + + + + + + + +lex_internal state:0, row:3, column:6 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:5 + + + + + + + + + +shift state:5 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + +5 + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + +7 + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + +5 + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037244b0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_0x6000037245a0 + + + + + + + +node_0x6000037280f0->node_0x6000037245a0 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +' ' + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037245a0->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037244b0 + + +5 + + + + + +node_head_0->node_0x6000037244b0 + + +0 + + + + + +node_0x600003724690 + + +7 + + + + + +node_0x6000037244b0->node_0x600003724690 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x600003724690->node_0x600003724870 + + +' ' + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:5, row:3, col:11 + + + + + + + + + +lex_internal state:1, row:3, column:11 + + + + + + + + + +lexed_lookahead sym:declaration_token1, size:1 + + + + + + + + + +reduce sym:identifier, child_count:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +2 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +shift state:13 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724690 + + +13 + + + + + +node_head_0->node_0x600003724690 + + +0 + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:3, col:11 + + + + + + + + + +lex_internal state:0, row:3, column:11 + + + + + + + + + +lexed_lookahead sym:comment, size:45 + + + + + + + + + +shift_extra + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724690 + + +13 + + + + + +node_head_0->node_0x600003724690 + + +0 + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037244b0 + + +? + + + + + +node_head_1->node_0x6000037244b0 + + +1 + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:13, row:4, col:0 + + + + + + + + + +lex_internal state:0, row:4, column:0 + + + + + + + + + +lexed_lookahead sym:comment, size:44 + + + + + + + + + +shift_extra + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037280f0 + + + + + + + +node_head_0->node_0x6000037280f0 + + +0 + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_head_1 + + + +node_0x6000037244b0 + + +? + + + + + +node_head_1->node_0x6000037244b0 + + +1 + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:13, row:4, col:44 + + + + + + + + + +lex_internal state:0, row:4, column:44 + + + + + + + + + +lexed_lookahead sym:comment, size:44 + + + + + + + + + +shift_extra + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037244b0 + + +? + + + + + +node_head_1->node_0x6000037244b0 + + +1 + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:4, col:44 + + + + + + + + + +shift_extra + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037242d0 + + +? + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +comment + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:0, version_count:2, state:13, row:5, col:43 + + + + + + + + + +lex_internal state:0, row:5, column:43 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037242d0 + + +? + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +comment + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:5, col:43 + + + + + + + + + +recover_to_previous state:1, depth:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037242d0 + + +? + + + + + +node_head_1->node_0x6000037242d0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037242d0->node_0x6000037244b0 + + +comment + + + + + +node_head_2 + + + +node_0x6000037283c0 + + + + + + + +node_head_2->node_0x6000037283c0 + + +2 + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x6000037243c0 + + +? + + + + + +node_0x6000037244b0->node_0x6000037243c0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037283c0 + + + + + + + +node_head_2->node_0x6000037283c0 + + +2 + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:5, col:43 + + + + + + + + + +lex_internal state:2, row:5, column:43 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:2 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037281e0 + + + + + + + +node_head_0->node_0x6000037281e0 + + +0 + + + + + +node_0x6000037280f0 + + + + + + + +node_0x6000037281e0->node_0x6000037280f0 + + +comment + + + + + +node_head_1 + + + +node_0x6000037243c0 + + +? + + + + + +node_head_1->node_0x6000037243c0 + + +1 + + + + + +node_0x6000037241e0 + + +? + + + + + +node_0x6000037243c0->node_0x6000037241e0 + + +_ERROR + + + + + +node_head_2 + + + +node_0x6000037244b0 + + +4 + + + + + +node_head_2->node_0x6000037244b0 + + +2 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037244b0->node_0x6000037283c0 + + +_identifier_token1 + + + + + +node_0x600003724690 + + +13 + + + + + +node_0x6000037280f0->node_0x600003724690 + + +comment + + + + + +node_0x600003724000 + + +13 + + + + + +node_0x6000037241e0->node_0x600003724000 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037245a0 + + +2 + + + + + +node_0x600003724690->node_0x6000037245a0 + + +declaration_token1 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x600003724000->node_0x6000037240f0 + + +declaration_token1 + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003724870 + + + + + + + +node_0x6000037245a0->node_0x600003724870 + + +identifier + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x6000037240f0->node_0x600003728000 + + +identifier + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + +node_0x600003724870->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037244b0 + + +4 + + + + + +node_head_0->node_0x6000037244b0 + + +0 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037244b0->node_0x6000037283c0 + + +_identifier_token1 + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:0, version_count:1, state:4, row:6, col:1 + + + + + + + + + +lex_internal state:1, row:6, column:1 + + + + + + + + + +lex_internal state:0, row:6, column:1 + + + + + + + + + +lexed_lookahead sym:-, size:1 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037244b0 + + +4 + + + + + +node_head_0->node_0x6000037244b0 + + +0 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037244b0->node_0x6000037283c0 + + +_identifier_token1 + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +resume version:0 + + + + + + + + + +recover_to_previous state:1, depth:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037244b0 + + +? + + + + + +node_head_0->node_0x6000037244b0 + + +0 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_head_1 + + + +node_0x600003724000 + + + + + + + +node_head_1->node_0x600003724000 + + +1 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +skip_token symbol:- + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724000 + + + + + + + +node_head_1->node_0x600003724000 + + +1 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:0, version_count:2, state:0, row:6, col:2 + + + + + + + + + +lex_internal state:0, row:6, column:2 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:5 + + + + + + + + + +recover_to_previous state:1, depth:3 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724000 + + + + + + + +node_head_1->node_0x600003724000 + + +1 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_head_2 + + + +node_0x6000037243c0 + + + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +skip_token symbol:_identifier_token1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724000 + + + + + + + +node_head_1->node_0x600003724000 + + +1 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_head_2 + + + +node_0x6000037243c0 + + + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:1, version_count:3, state:1, row:6, col:1 + + + + + + + + + +lex_internal state:2, row:6, column:1 + + + + + + + + + +lexed_lookahead sym:-, size:1 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724870 + + +4 + + + + + +node_head_1->node_0x600003724870 + + +1 + + + + + +node_0x600003724000 + + + + + + + +node_0x600003724870->node_0x600003724000 + + +'-' + + + + + +node_head_2 + + + +node_0x6000037243c0 + + + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:1, version_count:3, state:4, row:6, col:2 + + + + + + + + + +lex_internal state:1, row:6, column:2 + + + + + + + + + +lex_internal state:0, row:6, column:2 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:5 + + + + + + + + + +detect_error + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724870 + + +4 + + + + + +node_head_1->node_0x600003724870 + + +1 + + + + + +node_0x600003724000 + + + + + + + +node_0x600003724870->node_0x600003724000 + + +'-' + + + + + +node_head_2 + + + +node_0x6000037243c0 + + + + + + + +node_head_2->node_0x6000037243c0 + + +2 + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:2, version_count:3, state:1, row:6, col:2 + + + + + + + + + +lex_internal state:2, row:6, column:2 + + + + + + + + + +lexed_lookahead sym:_identifier_token1, size:5 + + + + + + + + + +shift state:4 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_0->node_0x6000037241e0 + + +0 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_head_1 + + + +node_0x600003724870 + + +4 + + + + + +node_head_1->node_0x600003724870 + + +1 + + + + + +node_0x600003724000 + + + + + + + +node_0x600003724870->node_0x600003724000 + + +'-' + + + + + +node_head_2 + + + +node_0x6000037245a0 + + +4 + + + + + +node_head_2->node_0x6000037245a0 + + +2 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x6000037245a0->node_0x6000037243c0 + + +_identifier_token1 + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037283c0 + + + + + + + +node_0x600003724000->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +condense + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +4 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x6000037245a0->node_0x6000037243c0 + + +_identifier_token1 + + + + + +node_head_1 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_1->node_0x6000037241e0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:0, version_count:2, state:4, row:6, col:7 + + + + + + + + + +lex_internal state:1, row:6, column:7 + + + + + + + + + +lexed_lookahead sym:declaration_token1, size:1 + + + + + + + + + +reduce sym:identifier, child_count:1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724000 + + +2 + + + + + +node_head_0->node_0x600003724000 + + +0 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x600003724000->node_0x6000037243c0 + + +identifier + + + + + +node_head_1 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_1->node_0x6000037241e0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +shift state:13 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +13 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724000 + + +2 + + + + + +node_0x6000037245a0->node_0x600003724000 + + +declaration_token1 + + + + + +node_head_1 + + + +node_0x6000037241e0 + + +? + + + + + +node_head_1->node_0x6000037241e0 + + +1 + + + + + +node_0x6000037244b0 + + +? + + + + + +node_0x6000037241e0->node_0x6000037244b0 + + +_ERROR + + + + + +node_0x6000037243c0 + + + + + + + +node_0x600003724000->node_0x6000037243c0 + + +identifier + + + + + +node_0x6000037240f0 + + +2 + + + + + +node_0x6000037244b0->node_0x6000037240f0 + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037240f0->node_0x6000037283c0 + + +identifier + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:1, version_count:2, state:0, row:6, col:7 + + + + + + + + + +lex_internal state:0, row:6, column:7 + + + + + + + + + +lexed_lookahead sym:end, size:1 + + + + + + + + + +recover_eof + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037245a0 + + +13 + + + + + +node_head_0->node_0x6000037245a0 + + +0 + + + + + +node_0x600003724000 + + +2 + + + + + +node_0x6000037245a0->node_0x600003724000 + + +declaration_token1 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x600003724000->node_0x6000037243c0 + + +identifier + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +process version:0, version_count:1, state:13, row:7, col:0 + + + + + + + + + +lex_internal state:0, row:7, column:0 + + + + + + + + + +lexed_lookahead sym:end, size:0 + + + + + + + + + +reduce sym:declaration, child_count:2 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x6000037240f0 + + +11 + + + + + +node_head_0->node_0x6000037240f0 + + +0 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x6000037240f0->node_0x6000037243c0 + + +declaration + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +reduce sym:source_file, child_count:1 + + + + + + + + +stack + + + +node_head_0 + + + +node_0x600003724000 + + +12 + + + + + +node_head_0->node_0x600003724000 + + +0 + + + + + +node_0x6000037243c0 + + + + + + + +node_0x600003724000->node_0x6000037243c0 + + +source_file + + + + + +node_0x6000037283c0 + + + + + + + +node_0x6000037243c0->node_0x6000037283c0 + + +ERROR + + + + + +node_0x6000037282d0 + + + + + + + +node_0x6000037283c0->node_0x6000037282d0 + + +comment + + + + + +node_0x600003724780 + + + + + + + +node_0x6000037282d0->node_0x600003724780 + + +comment + + + + + +node_0x600003728000 + + +1 + + + + + +node_0x600003724780->node_0x600003728000 + + +ERROR + + + + + + + + + + + + +accept + + + + + + + + + +select_smaller_error symbol:source_file, over_symbol:ERROR + + + + + + + + +stack + + + + + + + + + + +done + + + + + + + + +tree + + + +tree_0x16fcfe130 + + +source_file + + + + + +tree_0x600002620100 + + +ERROR + + + + + +tree_0x16fcfe130->tree_0x600002620100 + + + + + + + +tree_0x600002620108 + +comment + + + + + +tree_0x16fcfe130->tree_0x600002620108 + + + + + + + +tree_0x600002620110 + +comment + + + + + +tree_0x16fcfe130->tree_0x600002620110 + + + + + + + +tree_0x600002620118 + + +ERROR + + + + + +tree_0x16fcfe130->tree_0x600002620118 + + + + + + + +tree_0x600002620120 + + +declaration + + + + + +tree_0x16fcfe130->tree_0x600002620120 + + + + + + + +tree_0x600002620128 + +end + + + + + +tree_0x16fcfe130->tree_0x600002620128 + + + + + + + +tree_0x600002320070 + + +identifier + + + + + +tree_0x600002620100->tree_0x600002320070 + + + + + + + +tree_0x600002320078 + +declaration_token1 + + + + + +tree_0x600002620100->tree_0x600002320078 + + + + + + + +tree_0x600002320080 + + +_ERROR + + + + + +tree_0x600002620100->tree_0x600002320080 + + + + + + + +tree_0x600002c28120 + +_identifier_token1 + + + + + +tree_0x600002320070->tree_0x600002c28120 + + + + + + + +tree_0x600002c20180 + + +_ERROR + + + + + +tree_0x600002320080->tree_0x600002c20180 + + + + + + + +tree_0x600002c20188 + + +_ERROR + + + + + +tree_0x600002320080->tree_0x600002c20188 + + + + + + + +tree_0x600002c282a0 + + +_ERROR + + + + + +tree_0x600002c20180->tree_0x600002c282a0 + + + + + + + +tree_0x600002c282a8 + + +_ERROR + + + + + +tree_0x600002c20180->tree_0x600002c282a8 + + + + + + + +tree_0x600002c281e0 + + +_ERROR + + + + + +tree_0x600002c282a0->tree_0x600002c281e0 + + + + + + + +tree_0x600002c281e8 + + +_ERROR + + + + + +tree_0x600002c282a0->tree_0x600002c281e8 + + + + + + + +tree_0x600002c280c0 + +_identifier_token1 + + + + + +tree_0x600002c281e0->tree_0x600002c280c0 + + + + + + + +tree_0x600002c28180 + +_identifier_token1 + + + + + +tree_0x600002c281e8->tree_0x600002c28180 + + + + + + + +tree_0x600002c28480 + + +_ERROR + + + + + +tree_0x600002c282a8->tree_0x600002c28480 + + + + + + + +tree_0x600002c28488 + + +_ERROR + + + + + +tree_0x600002c282a8->tree_0x600002c28488 + + + + + + + +tree_0x600002c28360 + + +_ERROR + + + + + +tree_0x600002c28480->tree_0x600002c28360 + + + + + + + +tree_0x600002c28368 + + +_ERROR + + + + + +tree_0x600002c28480->tree_0x600002c28368 + + + + + + + +tree_0x600002c28240 + +_identifier_token1 + + + + + +tree_0x600002c28360->tree_0x600002c28240 + + + + + + + +tree_0x600002c28300 + +_identifier_token1 + + + + + +tree_0x600002c28368->tree_0x600002c28300 + + + + + + + +tree_0x600002c28540 + + +_ERROR + + + + + +tree_0x600002c28488->tree_0x600002c28540 + + + + + + + +tree_0x600002c28548 + + +_ERROR + + + + + +tree_0x600002c28488->tree_0x600002c28548 + + + + + + + +tree_0x600002c28420 + +_identifier_token1 + + + + + +tree_0x600002c28540->tree_0x600002c28420 + + + + + + + +tree_0x600002c284e0 + +_identifier_token1 + + + + + +tree_0x600002c28548->tree_0x600002c284e0 + + + + + + + +tree_0x600002c20120 + +_identifier_token1 + + + + + +tree_0x600002c20188->tree_0x600002c20120 + + + + + + + +tree_0x6000023200e0 + + +identifier + + + + + +tree_0x600002620118->tree_0x6000023200e0 + + + + + + + +tree_0x6000023200e8 + + +_ERROR + + + + + +tree_0x600002620118->tree_0x6000023200e8 + + + + + + + +tree_0x600002c20240 + +_identifier_token1 + + + + + +tree_0x6000023200e0->tree_0x600002c20240 + + + + + + + +tree_0x600002c202a0 + +- + + + + + +tree_0x6000023200e8->tree_0x600002c202a0 + + + + + + + +tree_0x600002c203c0 + + +identifier + + + + + +tree_0x600002620120->tree_0x600002c203c0 + + + + + + + +tree_0x600002c203c8 + +declaration_token1 + + + + + +tree_0x600002620120->tree_0x600002c203c8 + + + + + + + +tree_0x600002c201e0 + +_identifier_token1 + + + + + +tree_0x600002c203c0->tree_0x600002c201e0 + + + + + + + diff --git a/test/corpus/connections.txt b/old_tests/connections.txt similarity index 100% rename from test/corpus/connections.txt rename to old_tests/connections.txt diff --git a/test/corpus/connections_basic.txt b/old_tests/connections_basic.txt similarity index 100% rename from test/corpus/connections_basic.txt rename to old_tests/connections_basic.txt diff --git a/test/corpus/containers.txt b/old_tests/containers.txt similarity index 100% rename from test/corpus/containers.txt rename to old_tests/containers.txt diff --git a/test/corpus/labels.txt b/old_tests/labels.txt similarity index 81% rename from test/corpus/labels.txt rename to old_tests/labels.txt index 48e5e7f..546a31c 100644 --- a/test/corpus/labels.txt +++ b/old_tests/labels.txt @@ -19,13 +19,17 @@ Cloud: my cloud Shorthand container labels ================== -#gcloud: Google Cloud { -# # any content -#} +gcloud: Google Cloud { + # comment +} --- -(source_file) +(source_file + (expression + (identifier) + (label) + (container))) ================== Reserved keyword "label" diff --git a/test/corpus/shapes.txt b/old_tests/shapes.txt similarity index 97% rename from test/corpus/shapes.txt rename to old_tests/shapes.txt index f39e0d2..f28438b 100644 --- a/test/corpus/shapes.txt +++ b/old_tests/shapes.txt @@ -64,4 +64,4 @@ SQLite; Cassandra (expression (identifier)) (expression - (identifier))) \ No newline at end of file + (identifier))) diff --git a/package.json b/package.json index 023b105..bf52810 100644 --- a/package.json +++ b/package.json @@ -3,18 +3,46 @@ "version": "0.1.0", "description": "Tree sitter grammar for d2lang", "dependencies": { - "nan": "^2.17.0" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.1" + }, + "peerDependencies": { + "tree-sitter": "^0.21.1" + }, + "peerDependenciesMeta": { + "tree_sitter": { + "optional": true + } }, "main": "bindings/node", + "types": "bindings/node", "devDependencies": { - "tree-sitter-cli": "^0.20.8" + "tree-sitter-cli": "^0.20.8", + "prebuildify": "^6.0.1" }, "repository": "https://github.com/ravsii/tree-sitter-d2", "tree-sitter": [ { "scope": "source.d2", - "file-types": ["d2"], + "file-types": [ + "d2" + ], "injection-regex": "d2" } + ], + "scripts": { + "install": "node-gyp-build", + "prestart": "tree-sitter build --wasm", + "start": "tree-sitter playground", + "test": "node --test bindings/node/*_test.js" + }, + "files": [ + "grammar.js", + "binding.gyp", + "prebuilds/**", + "bindings/node/*", + "queries/*", + "src/**", + "*.wasm" ] } diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..f2c06b9 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,29 @@ +[build-system] +requires = ["setuptools>=42", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "tree-sitter-d2" +description = "D2 grammar for tree-sitter" +version = "0.0.1" +keywords = ["incremental", "parsing", "tree-sitter", "d2"] +classifiers = [ + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Topic :: Software Development :: Compilers", + "Topic :: Text Processing :: Linguistic", + "Typing :: Typed" +] +requires-python = ">=3.9" +license.text = "MIT" +readme = "README.md" + +[project.urls] +Homepage = "https://github.com/tree-sitter/tree-sitter-d2" + +[project.optional-dependencies] +core = ["tree-sitter~=0.22"] + +[tool.cibuildwheel] +build = "cp39-*" +build-frontend = "build" diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..411e7fe --- /dev/null +++ b/setup.py @@ -0,0 +1,62 @@ +from os.path import isdir, join +from platform import system + +from setuptools import Extension, find_packages, setup +from setuptools.command.build import build +from wheel.bdist_wheel import bdist_wheel + + +class Build(build): + def run(self): + if isdir("queries"): + dest = join(self.build_lib, "tree_sitter_d2", "queries") + self.copy_tree("queries", dest) + super().run() + + +class BdistWheel(bdist_wheel): + def get_tag(self): + python, abi, platform = super().get_tag() + if python.startswith("cp"): + python, abi = "cp39", "abi3" + return python, abi, platform + + +setup( + packages=find_packages("bindings/python"), + package_dir={"": "bindings/python"}, + package_data={ + "tree_sitter_d2": ["*.pyi", "py.typed"], + "tree_sitter_d2.queries": ["*.scm"], + }, + ext_package="tree_sitter_d2", + ext_modules=[ + Extension( + name="_binding", + sources=[ + "bindings/python/tree_sitter_d2/binding.c", + "src/parser.c", + # NOTE: if your language uses an external scanner, add it here. + ], + extra_compile_args=[ + "-std=c11", + "-fvisibility=hidden", + ] if system() != "Windows" else [ + "/std:c11", + "/utf-8", + ], + define_macros=[ + ("Py_LIMITED_API", "0x03090000"), + ("PY_SSIZE_T_CLEAN", None), + ("TREE_SITTER_HIDE_SYMBOLS", None), + ], + include_dirs=["src"], + py_limited_api=True, + ) + ], + cmdclass={ + "build": Build, + "bdist_wheel": BdistWheel + }, + zip_safe=False +) diff --git a/src/grammar.json b/src/grammar.json index 4801378..810a223 100644 --- a/src/grammar.json +++ b/src/grammar.json @@ -8,391 +8,160 @@ "members": [ { "type": "SYMBOL", - "name": "expression" + "name": "declaration" }, { "type": "SYMBOL", - "name": "_comment" + "name": "comment" } ] } }, - "extras": { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "_comment" - }, - { - "type": "PATTERN", - "value": "\\s+" - } - ] - }, - "direction": { + "declaration": { "type": "SEQ", "members": [ { - "type": "STRING", - "value": "direction" - }, - { - "type": "STRING", - "value": ":" + "type": "SYMBOL", + "name": "identifier" }, { "type": "CHOICE", "members": [ { - "type": "STRING", - "value": "up" - }, - { - "type": "STRING", - "value": "right" - }, - { - "type": "STRING", - "value": "left" - }, - { - "type": "STRING", - "value": "down" - } - ] - } - ] - }, - "expression": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "SEQ", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": "(" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "REPEAT1", - "content": { - "type": "CHOICE", + "type": "SEQ", "members": [ { "type": "SYMBOL", - "name": "identifier" + "name": "connection" }, { "type": "SYMBOL", - "name": "connection" + "name": "identifier" } ] + }, + { + "type": "BLANK" } - }, - { - "type": "CHOICE", - "members": [ - { - "type": "STRING", - "value": ")" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "SYMBOL", - "name": "connection_identifier" - }, - { - "type": "SYMBOL", - "name": "sub_identifier" - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": ":" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "label" - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "container" - }, - { - "type": "BLANK" - } - ] - } - ] - }, - { - "type": "BLANK" - } - ] - }, - { - "type": "CHOICE", - "members": [ - { - "type": "CHOICE", - "members": [ - { - "type": "PATTERN", - "value": "\\n+\\s*" - }, - { - "type": "STRING", - "value": ";" - } - ] - }, - { - "type": "BLANK" - } - ] - } - ] - } - }, - "label_block": { - "type": "CHOICE", - "members": [ + ] + }, { - "type": "SEQ", + "type": "CHOICE", "members": [ { - "type": "STRING", - "value": ":" - }, - { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "label" - }, - { - "type": "BLANK" - } - ] + "type": "SYMBOL", + "name": "label" }, { - "type": "CHOICE", - "members": [ - { - "type": "SYMBOL", - "name": "container" - }, - { - "type": "BLANK" - } - ] + "type": "BLANK" } ] - } - ] - }, - "container": { - "type": "SEQ", - "members": [ - { - "type": "STRING", - "value": "{" - }, - { - "type": "REPEAT", - "content": { - "type": "SYMBOL", - "name": "expression" - } }, { - "type": "STRING", - "value": "}" - } - ] - }, - "label": { - "type": "PATTERN", - "value": ".+" - }, - "identifier": { - "type": "PREC_RIGHT", - "value": 0, - "content": { - "type": "REPEAT1", - "content": { "type": "CHOICE", "members": [ { - "type": "SYMBOL", - "name": "_ident_regex" + "type": "PATTERN", + "value": "\\n" }, { - "type": "SYMBOL", - "name": "sub_identifier" + "type": "STRING", + "value": ";" }, { "type": "STRING", - "value": "-" + "value": "\u0000" } ] } - } + ] + }, + "connection": { + "type": "STRING", + "value": "->" }, - "sub_identifier": { + "label": { "type": "SEQ", "members": [ { "type": "STRING", - "value": "." + "value": ":" }, { - "type": "SYMBOL", - "name": "identifier" + "type": "PATTERN", + "value": ".*" } ] }, - "connection": { - "type": "CHOICE", + "identifier": { + "type": "SEQ", "members": [ { - "type": "PATTERN", - "value": "--+" - }, - { - "type": "PATTERN", - "value": "<-+" - }, - { - "type": "PATTERN", - "value": "-+>" - }, - { - "type": "PATTERN", - "value": "<-+>" - }, - { - "type": "SEQ", - "members": [ - { - "type": "PATTERN", - "value": "--+" - }, - { - "type": "PATTERN", - "value": "\\\\\\n+\\s+" - }, - { - "type": "PATTERN", - "value": "--+" - } - ] + "type": "SYMBOL", + "name": "_ident_recursive" }, { - "type": "SEQ", + "type": "CHOICE", "members": [ { - "type": "PATTERN", - "value": "<-+" - }, - { - "type": "PATTERN", - "value": "\\\\\\n+\\s+" + "type": "SEQ", + "members": [ + { + "type": "STRING", + "value": "." + }, + { + "type": "SYMBOL", + "name": "field" + } + ] }, { - "type": "PATTERN", - "value": "--+" + "type": "BLANK" } ] - }, + } + ] + }, + "field": { + "type": "SYMBOL", + "name": "_ident_base" + }, + "_ident_recursive": { + "type": "SEQ", + "members": [ { - "type": "SEQ", - "members": [ - { - "type": "PATTERN", - "value": "--+" - }, - { - "type": "PATTERN", - "value": "\\\\\\n+\\s+" - }, - { - "type": "PATTERN", - "value": "-+>" - } - ] + "type": "SYMBOL", + "name": "_ident_base" }, { - "type": "SEQ", + "type": "CHOICE", "members": [ { - "type": "PATTERN", - "value": "<-+" - }, - { - "type": "PATTERN", - "value": "\\\\\\n+\\s+" + "type": "SEQ", + "members": [ + { + "type": "PATTERN", + "value": "[\\s\\'\\-\\_]+" + }, + { + "type": "SYMBOL", + "name": "_ident_recursive" + } + ] }, { - "type": "PATTERN", - "value": "-+>" + "type": "BLANK" } ] } ] }, - "connection_identifier": { - "type": "PATTERN", - "value": "\\[\\d+\\]" - }, - "_ident_regex": { + "_ident_base": { "type": "PATTERN", - "value": "[\\p{L}0-9_\"' ]+" + "value": "[\\w]+" }, - "_comment": { + "comment": { "type": "TOKEN", "content": { "type": "SEQ", @@ -403,13 +172,17 @@ }, { "type": "PATTERN", - "value": ".*\\n" + "value": ".*" } ] } } }, "extras": [ + { + "type": "SYMBOL", + "name": "comment" + }, { "type": "PATTERN", "value": "\\s" @@ -421,4 +194,3 @@ "inline": [], "supertypes": [] } - diff --git a/src/node-types.json b/src/node-types.json index 492211b..3766c8c 100644 --- a/src/node-types.json +++ b/src/node-types.json @@ -1,26 +1,6 @@ [ { - "type": "connection", - "named": true, - "fields": {} - }, - { - "type": "container", - "named": true, - "fields": {}, - "children": { - "multiple": true, - "required": false, - "types": [ - { - "type": "expression", - "named": true - } - ] - } - }, - { - "type": "expression", + "type": "declaration", "named": true, "fields": {}, "children": { @@ -31,14 +11,6 @@ "type": "connection", "named": true }, - { - "type": "connection_identifier", - "named": true - }, - { - "type": "container", - "named": true - }, { "type": "identifier", "named": true @@ -46,29 +18,35 @@ { "type": "label", "named": true - }, - { - "type": "sub_identifier", - "named": true } ] } }, + { + "type": "field", + "named": true, + "fields": {} + }, { "type": "identifier", "named": true, "fields": {}, "children": { - "multiple": true, + "multiple": false, "required": false, "types": [ { - "type": "sub_identifier", + "type": "field", "named": true } ] } }, + { + "type": "label", + "named": true, + "fields": {} + }, { "type": "source_file", "named": true, @@ -78,37 +56,18 @@ "required": false, "types": [ { - "type": "expression", + "type": "comment", "named": true - } - ] - } - }, - { - "type": "sub_identifier", - "named": true, - "fields": {}, - "children": { - "multiple": false, - "required": true, - "types": [ + }, { - "type": "identifier", + "type": "declaration", "named": true } ] } }, { - "type": "(", - "named": false - }, - { - "type": ")", - "named": false - }, - { - "type": "-", + "type": "\u0000", "named": false }, { @@ -124,39 +83,11 @@ "named": false }, { - "type": "connection_identifier", + "type": "comment", "named": true }, { - "type": "direction", - "named": false - }, - { - "type": "down", - "named": false - }, - { - "type": "label", + "type": "connection", "named": true - }, - { - "type": "left", - "named": false - }, - { - "type": "right", - "named": false - }, - { - "type": "up", - "named": false - }, - { - "type": "{", - "named": false - }, - { - "type": "}", - "named": false } ] \ No newline at end of file diff --git a/src/parser.c b/src/parser.c index 505a866..bc3fe2e 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1,129 +1,80 @@ -#include +#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) -#pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif #define LANGUAGE_VERSION 14 -#define STATE_COUNT 102 -#define LARGE_STATE_COUNT 8 -#define SYMBOL_COUNT 34 +#define STATE_COUNT 23 +#define LARGE_STATE_COUNT 2 +#define SYMBOL_COUNT 18 #define ALIAS_COUNT 0 -#define TOKEN_COUNT 24 +#define TOKEN_COUNT 11 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 0 -#define MAX_ALIAS_SEQUENCE_LENGTH 9 +#define MAX_ALIAS_SEQUENCE_LENGTH 5 #define PRODUCTION_ID_COUNT 1 -enum { - anon_sym_direction = 1, - anon_sym_COLON = 2, - anon_sym_up = 3, - anon_sym_right = 4, - anon_sym_left = 5, - anon_sym_down = 6, - anon_sym_LPAREN = 7, - anon_sym_RPAREN = 8, - aux_sym_expression_token1 = 9, - anon_sym_SEMI = 10, - anon_sym_LBRACE = 11, - anon_sym_RBRACE = 12, +enum ts_symbol_identifiers { + aux_sym_declaration_token1 = 1, + anon_sym_SEMI = 2, + anon_sym_NULL = 3, + sym_connection = 4, + anon_sym_COLON = 5, + aux_sym_label_token1 = 6, + anon_sym_DOT = 7, + aux_sym__ident_recursive_token1 = 8, + sym__ident_base = 9, + sym_comment = 10, + sym_source_file = 11, + sym_declaration = 12, sym_label = 13, - anon_sym_DASH = 14, - anon_sym_DOT = 15, - aux_sym_connection_token1 = 16, - aux_sym_connection_token2 = 17, - aux_sym_connection_token3 = 18, - aux_sym_connection_token4 = 19, - aux_sym_connection_token5 = 20, - sym_connection_identifier = 21, - sym__ident_regex = 22, - sym__comment = 23, - sym_source_file = 24, - sym_expression = 25, - sym_container = 26, - sym_identifier = 27, - sym_sub_identifier = 28, - sym_connection = 29, - aux_sym_source_file_repeat1 = 30, - aux_sym_expression_repeat1 = 31, - aux_sym_container_repeat1 = 32, - aux_sym_identifier_repeat1 = 33, + sym_identifier = 14, + sym_field = 15, + sym__ident_recursive = 16, + aux_sym_source_file_repeat1 = 17, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", - [anon_sym_direction] = "direction", - [anon_sym_COLON] = ":", - [anon_sym_up] = "up", - [anon_sym_right] = "right", - [anon_sym_left] = "left", - [anon_sym_down] = "down", - [anon_sym_LPAREN] = "(", - [anon_sym_RPAREN] = ")", - [aux_sym_expression_token1] = "expression_token1", + [aux_sym_declaration_token1] = "declaration_token1", [anon_sym_SEMI] = ";", - [anon_sym_LBRACE] = "{", - [anon_sym_RBRACE] = "}", - [sym_label] = "label", - [anon_sym_DASH] = "-", + [anon_sym_NULL] = "\0", + [sym_connection] = "connection", + [anon_sym_COLON] = ":", + [aux_sym_label_token1] = "label_token1", [anon_sym_DOT] = ".", - [aux_sym_connection_token1] = "connection_token1", - [aux_sym_connection_token2] = "connection_token2", - [aux_sym_connection_token3] = "connection_token3", - [aux_sym_connection_token4] = "connection_token4", - [aux_sym_connection_token5] = "connection_token5", - [sym_connection_identifier] = "connection_identifier", - [sym__ident_regex] = "_ident_regex", - [sym__comment] = "_comment", + [aux_sym__ident_recursive_token1] = "_ident_recursive_token1", + [sym__ident_base] = "_ident_base", + [sym_comment] = "comment", [sym_source_file] = "source_file", - [sym_expression] = "expression", - [sym_container] = "container", + [sym_declaration] = "declaration", + [sym_label] = "label", [sym_identifier] = "identifier", - [sym_sub_identifier] = "sub_identifier", - [sym_connection] = "connection", + [sym_field] = "field", + [sym__ident_recursive] = "_ident_recursive", [aux_sym_source_file_repeat1] = "source_file_repeat1", - [aux_sym_expression_repeat1] = "expression_repeat1", - [aux_sym_container_repeat1] = "container_repeat1", - [aux_sym_identifier_repeat1] = "identifier_repeat1", }; static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, - [anon_sym_direction] = anon_sym_direction, - [anon_sym_COLON] = anon_sym_COLON, - [anon_sym_up] = anon_sym_up, - [anon_sym_right] = anon_sym_right, - [anon_sym_left] = anon_sym_left, - [anon_sym_down] = anon_sym_down, - [anon_sym_LPAREN] = anon_sym_LPAREN, - [anon_sym_RPAREN] = anon_sym_RPAREN, - [aux_sym_expression_token1] = aux_sym_expression_token1, + [aux_sym_declaration_token1] = aux_sym_declaration_token1, [anon_sym_SEMI] = anon_sym_SEMI, - [anon_sym_LBRACE] = anon_sym_LBRACE, - [anon_sym_RBRACE] = anon_sym_RBRACE, - [sym_label] = sym_label, - [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_NULL] = anon_sym_NULL, + [sym_connection] = sym_connection, + [anon_sym_COLON] = anon_sym_COLON, + [aux_sym_label_token1] = aux_sym_label_token1, [anon_sym_DOT] = anon_sym_DOT, - [aux_sym_connection_token1] = aux_sym_connection_token1, - [aux_sym_connection_token2] = aux_sym_connection_token2, - [aux_sym_connection_token3] = aux_sym_connection_token3, - [aux_sym_connection_token4] = aux_sym_connection_token4, - [aux_sym_connection_token5] = aux_sym_connection_token5, - [sym_connection_identifier] = sym_connection_identifier, - [sym__ident_regex] = sym__ident_regex, - [sym__comment] = sym__comment, + [aux_sym__ident_recursive_token1] = aux_sym__ident_recursive_token1, + [sym__ident_base] = sym__ident_base, + [sym_comment] = sym_comment, [sym_source_file] = sym_source_file, - [sym_expression] = sym_expression, - [sym_container] = sym_container, + [sym_declaration] = sym_declaration, + [sym_label] = sym_label, [sym_identifier] = sym_identifier, - [sym_sub_identifier] = sym_sub_identifier, - [sym_connection] = sym_connection, + [sym_field] = sym_field, + [sym__ident_recursive] = sym__ident_recursive, [aux_sym_source_file_repeat1] = aux_sym_source_file_repeat1, - [aux_sym_expression_repeat1] = aux_sym_expression_repeat1, - [aux_sym_container_repeat1] = aux_sym_container_repeat1, - [aux_sym_identifier_repeat1] = aux_sym_identifier_repeat1, }; static const TSSymbolMetadata ts_symbol_metadata[] = { @@ -131,39 +82,7 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = false, .named = true, }, - [anon_sym_direction] = { - .visible = true, - .named = false, - }, - [anon_sym_COLON] = { - .visible = true, - .named = false, - }, - [anon_sym_up] = { - .visible = true, - .named = false, - }, - [anon_sym_right] = { - .visible = true, - .named = false, - }, - [anon_sym_left] = { - .visible = true, - .named = false, - }, - [anon_sym_down] = { - .visible = true, - .named = false, - }, - [anon_sym_LPAREN] = { - .visible = true, - .named = false, - }, - [anon_sym_RPAREN] = { - .visible = true, - .named = false, - }, - [aux_sym_expression_token1] = { + [aux_sym_declaration_token1] = { .visible = false, .named = false, }, @@ -171,67 +90,47 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = false, }, - [anon_sym_LBRACE] = { - .visible = true, - .named = false, - }, - [anon_sym_RBRACE] = { + [anon_sym_NULL] = { .visible = true, .named = false, }, - [sym_label] = { + [sym_connection] = { .visible = true, .named = true, }, - [anon_sym_DASH] = { - .visible = true, - .named = false, - }, - [anon_sym_DOT] = { + [anon_sym_COLON] = { .visible = true, .named = false, }, - [aux_sym_connection_token1] = { - .visible = false, - .named = false, - }, - [aux_sym_connection_token2] = { - .visible = false, - .named = false, - }, - [aux_sym_connection_token3] = { + [aux_sym_label_token1] = { .visible = false, .named = false, }, - [aux_sym_connection_token4] = { - .visible = false, + [anon_sym_DOT] = { + .visible = true, .named = false, }, - [aux_sym_connection_token5] = { + [aux_sym__ident_recursive_token1] = { .visible = false, .named = false, }, - [sym_connection_identifier] = { - .visible = true, - .named = true, - }, - [sym__ident_regex] = { + [sym__ident_base] = { .visible = false, .named = true, }, - [sym__comment] = { - .visible = false, + [sym_comment] = { + .visible = true, .named = true, }, [sym_source_file] = { .visible = true, .named = true, }, - [sym_expression] = { + [sym_declaration] = { .visible = true, .named = true, }, - [sym_container] = { + [sym_label] = { .visible = true, .named = true, }, @@ -239,30 +138,18 @@ static const TSSymbolMetadata ts_symbol_metadata[] = { .visible = true, .named = true, }, - [sym_sub_identifier] = { + [sym_field] = { .visible = true, .named = true, }, - [sym_connection] = { - .visible = true, + [sym__ident_recursive] = { + .visible = false, .named = true, }, [aux_sym_source_file_repeat1] = { .visible = false, .named = false, }, - [aux_sym_expression_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_container_repeat1] = { - .visible = false, - .named = false, - }, - [aux_sym_identifier_repeat1] = { - .visible = false, - .named = false, - }, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { @@ -279,1509 +166,153 @@ static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [2] = 2, [3] = 3, [4] = 4, - [5] = 3, - [6] = 2, - [7] = 4, + [5] = 5, + [6] = 6, + [7] = 7, [8] = 8, [9] = 9, [10] = 10, [11] = 11, [12] = 12, - [13] = 11, + [13] = 13, [14] = 14, [15] = 15, [16] = 16, - [17] = 16, - [18] = 9, - [19] = 14, + [17] = 17, + [18] = 18, + [19] = 19, [20] = 20, [21] = 21, [22] = 22, - [23] = 15, - [24] = 24, - [25] = 25, - [26] = 26, - [27] = 27, - [28] = 28, - [29] = 29, - [30] = 21, - [31] = 28, - [32] = 24, - [33] = 33, - [34] = 22, - [35] = 25, - [36] = 36, - [37] = 37, - [38] = 27, - [39] = 39, - [40] = 40, - [41] = 26, - [42] = 42, - [43] = 20, - [44] = 37, - [45] = 39, - [46] = 29, - [47] = 33, - [48] = 48, - [49] = 36, - [50] = 50, - [51] = 51, - [52] = 40, - [53] = 42, - [54] = 54, - [55] = 55, - [56] = 56, - [57] = 48, - [58] = 56, - [59] = 51, - [60] = 60, - [61] = 61, - [62] = 62, - [63] = 63, - [64] = 50, - [65] = 65, - [66] = 66, - [67] = 55, - [68] = 66, - [69] = 62, - [70] = 54, - [71] = 61, - [72] = 60, - [73] = 65, - [74] = 63, - [75] = 75, - [76] = 76, - [77] = 77, - [78] = 78, - [79] = 79, - [80] = 80, - [81] = 81, - [82] = 82, - [83] = 81, - [84] = 75, - [85] = 79, - [86] = 77, - [87] = 76, - [88] = 82, - [89] = 80, - [90] = 78, - [91] = 91, - [92] = 91, - [93] = 93, - [94] = 94, - [95] = 95, - [96] = 94, - [97] = 95, - [98] = 98, - [99] = 93, - [100] = 98, - [101] = 101, }; -static inline bool sym_label_character_set_1(int32_t c) { - return (c < 6576 - ? (c < 2972 - ? (c < 2185 - ? (c < 1329 - ? (c < 736 - ? (c < 170 - ? (c < 'A' - ? (c < '\'' - ? c == '"' - : (c <= '\'' || (c >= '0' && c <= '9'))) - : (c <= 'Z' || (c < 'a' - ? c == '_' - : c <= 'z'))) - : (c <= 170 || (c < 216 - ? (c < 186 - ? c == 181 - : (c <= 186 || (c >= 192 && c <= 214))) - : (c <= 246 || (c < 710 - ? (c >= 248 && c <= 705) - : c <= 721))))) - : (c <= 740 || (c < 902 - ? (c < 886 - ? (c < 750 - ? c == 748 - : (c <= 750 || (c >= 880 && c <= 884))) - : (c <= 887 || (c < 895 - ? (c >= 890 && c <= 893) - : c <= 895))) - : (c <= 902 || (c < 931 - ? (c < 908 - ? (c >= 904 && c <= 906) - : (c <= 908 || (c >= 910 && c <= 929))) - : (c <= 1013 || (c < 1162 - ? (c >= 1015 && c <= 1153) - : c <= 1327))))))) - : (c <= 1366 || (c < 1810 - ? (c < 1649 - ? (c < 1519 - ? (c < 1376 - ? c == 1369 - : (c <= 1416 || (c >= 1488 && c <= 1514))) - : (c <= 1522 || (c < 1646 - ? (c >= 1568 && c <= 1610) - : c <= 1647))) - : (c <= 1747 || (c < 1786 - ? (c < 1765 - ? c == 1749 - : (c <= 1766 || (c >= 1774 && c <= 1775))) - : (c <= 1788 || (c < 1808 - ? c == 1791 - : c <= 1808))))) - : (c <= 1839 || (c < 2074 - ? (c < 2036 - ? (c < 1969 - ? (c >= 1869 && c <= 1957) - : (c <= 1969 || (c >= 1994 && c <= 2026))) - : (c <= 2037 || (c < 2048 - ? c == 2042 - : c <= 2069))) - : (c <= 2074 || (c < 2112 - ? (c < 2088 - ? c == 2084 - : c <= 2088) - : (c <= 2136 || (c < 2160 - ? (c >= 2144 && c <= 2154) - : c <= 2183))))))))) - : (c <= 2190 || (c < 2654 - ? (c < 2510 - ? (c < 2437 - ? (c < 2384 - ? (c < 2308 - ? (c >= 2208 && c <= 2249) - : (c <= 2361 || c == 2365)) - : (c <= 2384 || (c < 2417 - ? (c >= 2392 && c <= 2401) - : c <= 2432))) - : (c <= 2444 || (c < 2482 - ? (c < 2451 - ? (c >= 2447 && c <= 2448) - : (c <= 2472 || (c >= 2474 && c <= 2480))) - : (c <= 2482 || (c < 2493 - ? (c >= 2486 && c <= 2489) - : c <= 2493))))) - : (c <= 2510 || (c < 2579 - ? (c < 2556 - ? (c < 2527 - ? (c >= 2524 && c <= 2525) - : (c <= 2529 || (c >= 2544 && c <= 2545))) - : (c <= 2556 || (c < 2575 - ? (c >= 2565 && c <= 2570) - : c <= 2576))) - : (c <= 2600 || (c < 2613 - ? (c < 2610 - ? (c >= 2602 && c <= 2608) - : c <= 2611) - : (c <= 2614 || (c < 2649 - ? (c >= 2616 && c <= 2617) - : c <= 2652))))))) - : (c <= 2654 || (c < 2835 - ? (c < 2741 - ? (c < 2707 - ? (c < 2693 - ? (c >= 2674 && c <= 2676) - : (c <= 2701 || (c >= 2703 && c <= 2705))) - : (c <= 2728 || (c < 2738 - ? (c >= 2730 && c <= 2736) - : c <= 2739))) - : (c <= 2745 || (c < 2809 - ? (c < 2768 - ? c == 2749 - : (c <= 2768 || (c >= 2784 && c <= 2785))) - : (c <= 2809 || (c < 2831 - ? (c >= 2821 && c <= 2828) - : c <= 2832))))) - : (c <= 2856 || (c < 2929 - ? (c < 2877 - ? (c < 2866 - ? (c >= 2858 && c <= 2864) - : (c <= 2867 || (c >= 2869 && c <= 2873))) - : (c <= 2877 || (c < 2911 - ? (c >= 2908 && c <= 2909) - : c <= 2913))) - : (c <= 2929 || (c < 2958 - ? (c < 2949 - ? c == 2947 - : c <= 2954) - : (c <= 2960 || (c < 2969 - ? (c >= 2962 && c <= 2965) - : c <= 2970))))))))))) - : (c <= 2972 || (c < 4096 - ? (c < 3406 - ? (c < 3200 - ? (c < 3086 - ? (c < 2990 - ? (c < 2979 - ? (c >= 2974 && c <= 2975) - : (c <= 2980 || (c >= 2984 && c <= 2986))) - : (c <= 3001 || (c < 3077 - ? c == 3024 - : c <= 3084))) - : (c <= 3088 || (c < 3160 - ? (c < 3114 - ? (c >= 3090 && c <= 3112) - : (c <= 3129 || c == 3133)) - : (c <= 3162 || (c < 3168 - ? c == 3165 - : c <= 3169))))) - : (c <= 3200 || (c < 3293 - ? (c < 3242 - ? (c < 3214 - ? (c >= 3205 && c <= 3212) - : (c <= 3216 || (c >= 3218 && c <= 3240))) - : (c <= 3251 || (c < 3261 - ? (c >= 3253 && c <= 3257) - : c <= 3261))) - : (c <= 3294 || (c < 3342 - ? (c < 3313 - ? (c >= 3296 && c <= 3297) - : (c <= 3314 || (c >= 3332 && c <= 3340))) - : (c <= 3344 || (c < 3389 - ? (c >= 3346 && c <= 3386) - : c <= 3389))))))) - : (c <= 3406 || (c < 3718 - ? (c < 3517 - ? (c < 3461 - ? (c < 3423 - ? (c >= 3412 && c <= 3414) - : (c <= 3425 || (c >= 3450 && c <= 3455))) - : (c <= 3478 || (c < 3507 - ? (c >= 3482 && c <= 3505) - : c <= 3515))) - : (c <= 3517 || (c < 3648 - ? (c < 3585 - ? (c >= 3520 && c <= 3526) - : (c <= 3632 || (c >= 3634 && c <= 3635))) - : (c <= 3654 || (c < 3716 - ? (c >= 3713 && c <= 3714) - : c <= 3716))))) - : (c <= 3722 || (c < 3782 - ? (c < 3762 - ? (c < 3749 - ? (c >= 3724 && c <= 3747) - : (c <= 3749 || (c >= 3751 && c <= 3760))) - : (c <= 3763 || (c < 3776 - ? c == 3773 - : c <= 3780))) - : (c <= 3782 || (c < 3904 - ? (c < 3840 - ? (c >= 3804 && c <= 3807) - : c <= 3840) - : (c <= 3911 || (c < 3976 - ? (c >= 3913 && c <= 3948) - : c <= 3980))))))))) - : (c <= 4138 || (c < 4882 - ? (c < 4682 - ? (c < 4213 - ? (c < 4193 - ? (c < 4176 - ? c == 4159 - : (c <= 4181 || (c >= 4186 && c <= 4189))) - : (c <= 4193 || (c < 4206 - ? (c >= 4197 && c <= 4198) - : c <= 4208))) - : (c <= 4225 || (c < 4301 - ? (c < 4256 - ? c == 4238 - : (c <= 4293 || c == 4295)) - : (c <= 4301 || (c < 4348 - ? (c >= 4304 && c <= 4346) - : c <= 4680))))) - : (c <= 4685 || (c < 4786 - ? (c < 4704 - ? (c < 4696 - ? (c >= 4688 && c <= 4694) - : (c <= 4696 || (c >= 4698 && c <= 4701))) - : (c <= 4744 || (c < 4752 - ? (c >= 4746 && c <= 4749) - : c <= 4784))) - : (c <= 4789 || (c < 4802 - ? (c < 4800 - ? (c >= 4792 && c <= 4798) - : c <= 4800) - : (c <= 4805 || (c < 4824 - ? (c >= 4808 && c <= 4822) - : c <= 4880))))))) - : (c <= 4885 || (c < 5998 - ? (c < 5761 - ? (c < 5112 - ? (c < 4992 - ? (c >= 4888 && c <= 4954) - : (c <= 5007 || (c >= 5024 && c <= 5109))) - : (c <= 5117 || (c < 5743 - ? (c >= 5121 && c <= 5740) - : c <= 5759))) - : (c <= 5786 || (c < 5919 - ? (c < 5873 - ? (c >= 5792 && c <= 5866) - : (c <= 5880 || (c >= 5888 && c <= 5905))) - : (c <= 5937 || (c < 5984 - ? (c >= 5952 && c <= 5969) - : c <= 5996))))) - : (c <= 6000 || (c < 6314 - ? (c < 6176 - ? (c < 6103 - ? (c >= 6016 && c <= 6067) - : (c <= 6103 || c == 6108)) - : (c <= 6264 || (c < 6279 - ? (c >= 6272 && c <= 6276) - : c <= 6312))) - : (c <= 6314 || (c < 6480 - ? (c < 6400 - ? (c >= 6320 && c <= 6389) - : c <= 6430) - : (c <= 6509 || (c < 6528 - ? (c >= 6512 && c <= 6516) - : c <= 6571))))))))))))) - : (c <= 6601 || (c < 43259 - ? (c < 8579 - ? (c < 8031 - ? (c < 7357 - ? (c < 7086 - ? (c < 6917 - ? (c < 6688 - ? (c >= 6656 && c <= 6678) - : (c <= 6740 || c == 6823)) - : (c <= 6963 || (c < 7043 - ? (c >= 6981 && c <= 6988) - : c <= 7072))) - : (c <= 7087 || (c < 7258 - ? (c < 7168 - ? (c >= 7098 && c <= 7141) - : (c <= 7203 || (c >= 7245 && c <= 7247))) - : (c <= 7293 || (c < 7312 - ? (c >= 7296 && c <= 7304) - : c <= 7354))))) - : (c <= 7359 || (c < 7960 - ? (c < 7418 - ? (c < 7406 - ? (c >= 7401 && c <= 7404) - : (c <= 7411 || (c >= 7413 && c <= 7414))) - : (c <= 7418 || (c < 7680 - ? (c >= 7424 && c <= 7615) - : c <= 7957))) - : (c <= 7965 || (c < 8025 - ? (c < 8008 - ? (c >= 7968 && c <= 8005) - : (c <= 8013 || (c >= 8016 && c <= 8023))) - : (c <= 8025 || (c < 8029 - ? c == 8027 - : c <= 8029))))))) - : (c <= 8061 || (c < 8450 - ? (c < 8150 - ? (c < 8130 - ? (c < 8118 - ? (c >= 8064 && c <= 8116) - : (c <= 8124 || c == 8126)) - : (c <= 8132 || (c < 8144 - ? (c >= 8134 && c <= 8140) - : c <= 8147))) - : (c <= 8155 || (c < 8305 - ? (c < 8178 - ? (c >= 8160 && c <= 8172) - : (c <= 8180 || (c >= 8182 && c <= 8188))) - : (c <= 8305 || (c < 8336 - ? c == 8319 - : c <= 8348))))) - : (c <= 8450 || (c < 8488 - ? (c < 8473 - ? (c < 8458 - ? c == 8455 - : (c <= 8467 || c == 8469)) - : (c <= 8477 || (c < 8486 - ? c == 8484 - : c <= 8486))) - : (c <= 8488 || (c < 8508 - ? (c < 8495 - ? (c >= 8490 && c <= 8493) - : c <= 8505) - : (c <= 8511 || (c < 8526 - ? (c >= 8517 && c <= 8521) - : c <= 8526))))))))) - : (c <= 8580 || (c < 12593 - ? (c < 11712 - ? (c < 11568 - ? (c < 11520 - ? (c < 11499 - ? (c >= 11264 && c <= 11492) - : (c <= 11502 || (c >= 11506 && c <= 11507))) - : (c <= 11557 || (c < 11565 - ? c == 11559 - : c <= 11565))) - : (c <= 11623 || (c < 11688 - ? (c < 11648 - ? c == 11631 - : (c <= 11670 || (c >= 11680 && c <= 11686))) - : (c <= 11694 || (c < 11704 - ? (c >= 11696 && c <= 11702) - : c <= 11710))))) - : (c <= 11718 || (c < 12347 - ? (c < 11823 - ? (c < 11728 - ? (c >= 11720 && c <= 11726) - : (c <= 11734 || (c >= 11736 && c <= 11742))) - : (c <= 11823 || (c < 12337 - ? (c >= 12293 && c <= 12294) - : c <= 12341))) - : (c <= 12348 || (c < 12449 - ? (c < 12445 - ? (c >= 12353 && c <= 12438) - : c <= 12447) - : (c <= 12538 || (c < 12549 - ? (c >= 12540 && c <= 12543) - : c <= 12591))))))) - : (c <= 12686 || (c < 42775 - ? (c < 42192 - ? (c < 19903 - ? (c < 12784 - ? (c >= 12704 && c <= 12735) - : (c <= 12799 || c == 13312)) - : (c <= 19903 || (c < 40959 - ? c == 19968 - : c <= 42124))) - : (c <= 42237 || (c < 42560 - ? (c < 42512 - ? (c >= 42240 && c <= 42508) - : (c <= 42527 || (c >= 42538 && c <= 42539))) - : (c <= 42606 || (c < 42656 - ? (c >= 42623 && c <= 42653) - : c <= 42725))))) - : (c <= 42783 || (c < 43011 - ? (c < 42963 - ? (c < 42891 - ? (c >= 42786 && c <= 42888) - : (c <= 42954 || (c >= 42960 && c <= 42961))) - : (c <= 42963 || (c < 42994 - ? (c >= 42965 && c <= 42969) - : c <= 43009))) - : (c <= 43013 || (c < 43072 - ? (c < 43020 - ? (c >= 43015 && c <= 43018) - : c <= 43042) - : (c <= 43123 || (c < 43250 - ? (c >= 43138 && c <= 43187) - : c <= 43255))))))))))) - : (c <= 43259 || (c < 65313 - ? (c < 43808 - ? (c < 43642 - ? (c < 43488 - ? (c < 43360 - ? (c < 43274 - ? (c >= 43261 && c <= 43262) - : (c <= 43301 || (c >= 43312 && c <= 43334))) - : (c <= 43388 || (c < 43471 - ? (c >= 43396 && c <= 43442) - : c <= 43471))) - : (c <= 43492 || (c < 43584 - ? (c < 43514 - ? (c >= 43494 && c <= 43503) - : (c <= 43518 || (c >= 43520 && c <= 43560))) - : (c <= 43586 || (c < 43616 - ? (c >= 43588 && c <= 43595) - : c <= 43638))))) - : (c <= 43642 || (c < 43739 - ? (c < 43705 - ? (c < 43697 - ? (c >= 43646 && c <= 43695) - : (c <= 43697 || (c >= 43701 && c <= 43702))) - : (c <= 43709 || (c < 43714 - ? c == 43712 - : c <= 43714))) - : (c <= 43741 || (c < 43777 - ? (c < 43762 - ? (c >= 43744 && c <= 43754) - : c <= 43764) - : (c <= 43782 || (c < 43793 - ? (c >= 43785 && c <= 43790) - : c <= 43798))))))) - : (c <= 43814 || (c < 64287 - ? (c < 55216 - ? (c < 43888 - ? (c < 43824 - ? (c >= 43816 && c <= 43822) - : (c <= 43866 || (c >= 43868 && c <= 43881))) - : (c <= 44002 || (c < 55203 - ? c == 44032 - : c <= 55203))) - : (c <= 55238 || (c < 64256 - ? (c < 63744 - ? (c >= 55243 && c <= 55291) - : (c <= 64109 || (c >= 64112 && c <= 64217))) - : (c <= 64262 || (c < 64285 - ? (c >= 64275 && c <= 64279) - : c <= 64285))))) - : (c <= 64296 || (c < 64467 - ? (c < 64320 - ? (c < 64312 - ? (c >= 64298 && c <= 64310) - : (c <= 64316 || c == 64318)) - : (c <= 64321 || (c < 64326 - ? (c >= 64323 && c <= 64324) - : c <= 64433))) - : (c <= 64829 || (c < 65008 - ? (c < 64914 - ? (c >= 64848 && c <= 64911) - : c <= 64967) - : (c <= 65019 || (c < 65142 - ? (c >= 65136 && c <= 65140) - : c <= 65276))))))))) - : (c <= 65338 || (c < 66864 - ? (c < 66176 - ? (c < 65536 - ? (c < 65482 - ? (c < 65382 - ? (c >= 65345 && c <= 65370) - : (c <= 65470 || (c >= 65474 && c <= 65479))) - : (c <= 65487 || (c < 65498 - ? (c >= 65490 && c <= 65495) - : c <= 65500))) - : (c <= 65547 || (c < 65599 - ? (c < 65576 - ? (c >= 65549 && c <= 65574) - : (c <= 65594 || (c >= 65596 && c <= 65597))) - : (c <= 65613 || (c < 65664 - ? (c >= 65616 && c <= 65629) - : c <= 65786))))) - : (c <= 66204 || (c < 66464 - ? (c < 66370 - ? (c < 66304 - ? (c >= 66208 && c <= 66256) - : (c <= 66335 || (c >= 66349 && c <= 66368))) - : (c <= 66377 || (c < 66432 - ? (c >= 66384 && c <= 66421) - : c <= 66461))) - : (c <= 66499 || (c < 66736 - ? (c < 66560 - ? (c >= 66504 && c <= 66511) - : c <= 66717) - : (c <= 66771 || (c < 66816 - ? (c >= 66776 && c <= 66811) - : c <= 66855))))))) - : (c <= 66915 || (c < 67506 - ? (c < 66995 - ? (c < 66964 - ? (c < 66940 - ? (c >= 66928 && c <= 66938) - : (c <= 66954 || (c >= 66956 && c <= 66962))) - : (c <= 66965 || (c < 66979 - ? (c >= 66967 && c <= 66977) - : c <= 66993))) - : (c <= 67001 || (c < 67424 - ? (c < 67072 - ? (c >= 67003 && c <= 67004) - : (c <= 67382 || (c >= 67392 && c <= 67413))) - : (c <= 67431 || (c < 67463 - ? (c >= 67456 && c <= 67461) - : c <= 67504))))) - : (c <= 67514 || (c < 67680 - ? (c < 67639 - ? (c < 67592 - ? (c >= 67584 && c <= 67589) - : (c <= 67592 || (c >= 67594 && c <= 67637))) - : (c <= 67640 || (c < 67647 - ? c == 67644 - : c <= 67669))) - : (c <= 67702 || (c < 67828 - ? (c < 67808 - ? (c >= 67712 && c <= 67742) - : c <= 67826) - : (c <= 67829 || (c < 67872 - ? (c >= 67840 && c <= 67861) - : c <= 67883))))))))))))))); -} - -static inline bool sym_label_character_set_2(int32_t c) { - return (c < 6528 - ? (c < 2969 - ? (c < 2160 - ? (c < 1162 - ? (c < 710 - ? (c < 'a' - ? (c < '0' - ? (c < '"' - ? c == ' ' - : (c <= '"' || c == '\'')) - : (c <= '9' || (c < '_' - ? (c >= 'A' && c <= 'Z') - : c <= '_'))) - : (c <= 'z' || (c < 192 - ? (c < 181 - ? c == 170 - : (c <= 181 || c == 186)) - : (c <= 214 || (c < 248 - ? (c >= 216 && c <= 246) - : c <= 705))))) - : (c <= 721 || (c < 895 - ? (c < 880 - ? (c < 748 - ? (c >= 736 && c <= 740) - : (c <= 748 || c == 750)) - : (c <= 884 || (c < 890 - ? (c >= 886 && c <= 887) - : c <= 893))) - : (c <= 895 || (c < 910 - ? (c < 904 - ? c == 902 - : (c <= 906 || c == 908)) - : (c <= 929 || (c < 1015 - ? (c >= 931 && c <= 1013) - : c <= 1153))))))) - : (c <= 1327 || (c < 1808 - ? (c < 1646 - ? (c < 1488 - ? (c < 1369 - ? (c >= 1329 && c <= 1366) - : (c <= 1369 || (c >= 1376 && c <= 1416))) - : (c <= 1514 || (c < 1568 - ? (c >= 1519 && c <= 1522) - : c <= 1610))) - : (c <= 1647 || (c < 1774 - ? (c < 1749 - ? (c >= 1649 && c <= 1747) - : (c <= 1749 || (c >= 1765 && c <= 1766))) - : (c <= 1775 || (c < 1791 - ? (c >= 1786 && c <= 1788) - : c <= 1791))))) - : (c <= 1808 || (c < 2048 - ? (c < 1994 - ? (c < 1869 - ? (c >= 1810 && c <= 1839) - : (c <= 1957 || c == 1969)) - : (c <= 2026 || (c < 2042 - ? (c >= 2036 && c <= 2037) - : c <= 2042))) - : (c <= 2069 || (c < 2088 - ? (c < 2084 - ? c == 2074 - : c <= 2084) - : (c <= 2088 || (c < 2144 - ? (c >= 2112 && c <= 2136) - : c <= 2154))))))))) - : (c <= 2183 || (c < 2649 - ? (c < 2493 - ? (c < 2417 - ? (c < 2365 - ? (c < 2208 - ? (c >= 2185 && c <= 2190) - : (c <= 2249 || (c >= 2308 && c <= 2361))) - : (c <= 2365 || (c < 2392 - ? c == 2384 - : c <= 2401))) - : (c <= 2432 || (c < 2474 - ? (c < 2447 - ? (c >= 2437 && c <= 2444) - : (c <= 2448 || (c >= 2451 && c <= 2472))) - : (c <= 2480 || (c < 2486 - ? c == 2482 - : c <= 2489))))) - : (c <= 2493 || (c < 2575 - ? (c < 2544 - ? (c < 2524 - ? c == 2510 - : (c <= 2525 || (c >= 2527 && c <= 2529))) - : (c <= 2545 || (c < 2565 - ? c == 2556 - : c <= 2570))) - : (c <= 2576 || (c < 2610 - ? (c < 2602 - ? (c >= 2579 && c <= 2600) - : c <= 2608) - : (c <= 2611 || (c < 2616 - ? (c >= 2613 && c <= 2614) - : c <= 2617))))))) - : (c <= 2652 || (c < 2831 - ? (c < 2738 - ? (c < 2703 - ? (c < 2674 - ? c == 2654 - : (c <= 2676 || (c >= 2693 && c <= 2701))) - : (c <= 2705 || (c < 2730 - ? (c >= 2707 && c <= 2728) - : c <= 2736))) - : (c <= 2739 || (c < 2784 - ? (c < 2749 - ? (c >= 2741 && c <= 2745) - : (c <= 2749 || c == 2768)) - : (c <= 2785 || (c < 2821 - ? c == 2809 - : c <= 2828))))) - : (c <= 2832 || (c < 2911 - ? (c < 2869 - ? (c < 2858 - ? (c >= 2835 && c <= 2856) - : (c <= 2864 || (c >= 2866 && c <= 2867))) - : (c <= 2873 || (c < 2908 - ? c == 2877 - : c <= 2909))) - : (c <= 2913 || (c < 2949 - ? (c < 2947 - ? c == 2929 - : c <= 2947) - : (c <= 2954 || (c < 2962 - ? (c >= 2958 && c <= 2960) - : c <= 2965))))))))))) - : (c <= 2970 || (c < 3976 - ? (c < 3389 - ? (c < 3168 - ? (c < 3077 - ? (c < 2984 - ? (c < 2974 - ? c == 2972 - : (c <= 2975 || (c >= 2979 && c <= 2980))) - : (c <= 2986 || (c < 3024 - ? (c >= 2990 && c <= 3001) - : c <= 3024))) - : (c <= 3084 || (c < 3133 - ? (c < 3090 - ? (c >= 3086 && c <= 3088) - : (c <= 3112 || (c >= 3114 && c <= 3129))) - : (c <= 3133 || (c < 3165 - ? (c >= 3160 && c <= 3162) - : c <= 3165))))) - : (c <= 3169 || (c < 3261 - ? (c < 3218 - ? (c < 3205 - ? c == 3200 - : (c <= 3212 || (c >= 3214 && c <= 3216))) - : (c <= 3240 || (c < 3253 - ? (c >= 3242 && c <= 3251) - : c <= 3257))) - : (c <= 3261 || (c < 3332 - ? (c < 3296 - ? (c >= 3293 && c <= 3294) - : (c <= 3297 || (c >= 3313 && c <= 3314))) - : (c <= 3340 || (c < 3346 - ? (c >= 3342 && c <= 3344) - : c <= 3386))))))) - : (c <= 3389 || (c < 3716 - ? (c < 3507 - ? (c < 3450 - ? (c < 3412 - ? c == 3406 - : (c <= 3414 || (c >= 3423 && c <= 3425))) - : (c <= 3455 || (c < 3482 - ? (c >= 3461 && c <= 3478) - : c <= 3505))) - : (c <= 3515 || (c < 3634 - ? (c < 3520 - ? c == 3517 - : (c <= 3526 || (c >= 3585 && c <= 3632))) - : (c <= 3635 || (c < 3713 - ? (c >= 3648 && c <= 3654) - : c <= 3714))))) - : (c <= 3716 || (c < 3776 - ? (c < 3751 - ? (c < 3724 - ? (c >= 3718 && c <= 3722) - : (c <= 3747 || c == 3749)) - : (c <= 3760 || (c < 3773 - ? (c >= 3762 && c <= 3763) - : c <= 3773))) - : (c <= 3780 || (c < 3840 - ? (c < 3804 - ? c == 3782 - : c <= 3807) - : (c <= 3840 || (c < 3913 - ? (c >= 3904 && c <= 3911) - : c <= 3948))))))))) - : (c <= 3980 || (c < 4824 - ? (c < 4348 - ? (c < 4206 - ? (c < 4186 - ? (c < 4159 - ? (c >= 4096 && c <= 4138) - : (c <= 4159 || (c >= 4176 && c <= 4181))) - : (c <= 4189 || (c < 4197 - ? c == 4193 - : c <= 4198))) - : (c <= 4208 || (c < 4295 - ? (c < 4238 - ? (c >= 4213 && c <= 4225) - : (c <= 4238 || (c >= 4256 && c <= 4293))) - : (c <= 4295 || (c < 4304 - ? c == 4301 - : c <= 4346))))) - : (c <= 4680 || (c < 4752 - ? (c < 4698 - ? (c < 4688 - ? (c >= 4682 && c <= 4685) - : (c <= 4694 || c == 4696)) - : (c <= 4701 || (c < 4746 - ? (c >= 4704 && c <= 4744) - : c <= 4749))) - : (c <= 4784 || (c < 4800 - ? (c < 4792 - ? (c >= 4786 && c <= 4789) - : c <= 4798) - : (c <= 4800 || (c < 4808 - ? (c >= 4802 && c <= 4805) - : c <= 4822))))))) - : (c <= 4880 || (c < 5984 - ? (c < 5743 - ? (c < 5024 - ? (c < 4888 - ? (c >= 4882 && c <= 4885) - : (c <= 4954 || (c >= 4992 && c <= 5007))) - : (c <= 5109 || (c < 5121 - ? (c >= 5112 && c <= 5117) - : c <= 5740))) - : (c <= 5759 || (c < 5888 - ? (c < 5792 - ? (c >= 5761 && c <= 5786) - : (c <= 5866 || (c >= 5873 && c <= 5880))) - : (c <= 5905 || (c < 5952 - ? (c >= 5919 && c <= 5937) - : c <= 5969))))) - : (c <= 5996 || (c < 6279 - ? (c < 6108 - ? (c < 6016 - ? (c >= 5998 && c <= 6000) - : (c <= 6067 || c == 6103)) - : (c <= 6108 || (c < 6272 - ? (c >= 6176 && c <= 6264) - : c <= 6276))) - : (c <= 6312 || (c < 6400 - ? (c < 6320 - ? c == 6314 - : c <= 6389) - : (c <= 6430 || (c < 6512 - ? (c >= 6480 && c <= 6509) - : c <= 6516))))))))))))) - : (c <= 6571 || (c < 43250 - ? (c < 8526 - ? (c < 8029 - ? (c < 7312 - ? (c < 7043 - ? (c < 6823 - ? (c < 6656 - ? (c >= 6576 && c <= 6601) - : (c <= 6678 || (c >= 6688 && c <= 6740))) - : (c <= 6823 || (c < 6981 - ? (c >= 6917 && c <= 6963) - : c <= 6988))) - : (c <= 7072 || (c < 7245 - ? (c < 7098 - ? (c >= 7086 && c <= 7087) - : (c <= 7141 || (c >= 7168 && c <= 7203))) - : (c <= 7247 || (c < 7296 - ? (c >= 7258 && c <= 7293) - : c <= 7304))))) - : (c <= 7354 || (c < 7680 - ? (c < 7413 - ? (c < 7401 - ? (c >= 7357 && c <= 7359) - : (c <= 7404 || (c >= 7406 && c <= 7411))) - : (c <= 7414 || (c < 7424 - ? c == 7418 - : c <= 7615))) - : (c <= 7957 || (c < 8016 - ? (c < 7968 - ? (c >= 7960 && c <= 7965) - : (c <= 8005 || (c >= 8008 && c <= 8013))) - : (c <= 8023 || (c < 8027 - ? c == 8025 - : c <= 8027))))))) - : (c <= 8029 || (c < 8336 - ? (c < 8144 - ? (c < 8126 - ? (c < 8064 - ? (c >= 8031 && c <= 8061) - : (c <= 8116 || (c >= 8118 && c <= 8124))) - : (c <= 8126 || (c < 8134 - ? (c >= 8130 && c <= 8132) - : c <= 8140))) - : (c <= 8147 || (c < 8182 - ? (c < 8160 - ? (c >= 8150 && c <= 8155) - : (c <= 8172 || (c >= 8178 && c <= 8180))) - : (c <= 8188 || (c < 8319 - ? c == 8305 - : c <= 8319))))) - : (c <= 8348 || (c < 8486 - ? (c < 8469 - ? (c < 8455 - ? c == 8450 - : (c <= 8455 || (c >= 8458 && c <= 8467))) - : (c <= 8469 || (c < 8484 - ? (c >= 8473 && c <= 8477) - : c <= 8484))) - : (c <= 8486 || (c < 8495 - ? (c < 8490 - ? c == 8488 - : c <= 8493) - : (c <= 8505 || (c < 8517 - ? (c >= 8508 && c <= 8511) - : c <= 8521))))))))) - : (c <= 8526 || (c < 12549 - ? (c < 11704 - ? (c < 11565 - ? (c < 11506 - ? (c < 11264 - ? (c >= 8579 && c <= 8580) - : (c <= 11492 || (c >= 11499 && c <= 11502))) - : (c <= 11507 || (c < 11559 - ? (c >= 11520 && c <= 11557) - : c <= 11559))) - : (c <= 11565 || (c < 11680 - ? (c < 11631 - ? (c >= 11568 && c <= 11623) - : (c <= 11631 || (c >= 11648 && c <= 11670))) - : (c <= 11686 || (c < 11696 - ? (c >= 11688 && c <= 11694) - : c <= 11702))))) - : (c <= 11710 || (c < 12337 - ? (c < 11736 - ? (c < 11720 - ? (c >= 11712 && c <= 11718) - : (c <= 11726 || (c >= 11728 && c <= 11734))) - : (c <= 11742 || (c < 12293 - ? c == 11823 - : c <= 12294))) - : (c <= 12341 || (c < 12445 - ? (c < 12353 - ? (c >= 12347 && c <= 12348) - : c <= 12438) - : (c <= 12447 || (c < 12540 - ? (c >= 12449 && c <= 12538) - : c <= 12543))))))) - : (c <= 12591 || (c < 42656 - ? (c < 40959 - ? (c < 13312 - ? (c < 12704 - ? (c >= 12593 && c <= 12686) - : (c <= 12735 || (c >= 12784 && c <= 12799))) - : (c <= 13312 || (c < 19968 - ? c == 19903 - : c <= 19968))) - : (c <= 42124 || (c < 42538 - ? (c < 42240 - ? (c >= 42192 && c <= 42237) - : (c <= 42508 || (c >= 42512 && c <= 42527))) - : (c <= 42539 || (c < 42623 - ? (c >= 42560 && c <= 42606) - : c <= 42653))))) - : (c <= 42725 || (c < 42994 - ? (c < 42960 - ? (c < 42786 - ? (c >= 42775 && c <= 42783) - : (c <= 42888 || (c >= 42891 && c <= 42954))) - : (c <= 42961 || (c < 42965 - ? c == 42963 - : c <= 42969))) - : (c <= 43009 || (c < 43020 - ? (c < 43015 - ? (c >= 43011 && c <= 43013) - : c <= 43018) - : (c <= 43042 || (c < 43138 - ? (c >= 43072 && c <= 43123) - : c <= 43187))))))))))) - : (c <= 43255 || (c < 65313 - ? (c < 43808 - ? (c < 43616 - ? (c < 43471 - ? (c < 43312 - ? (c < 43261 - ? c == 43259 - : (c <= 43262 || (c >= 43274 && c <= 43301))) - : (c <= 43334 || (c < 43396 - ? (c >= 43360 && c <= 43388) - : c <= 43442))) - : (c <= 43471 || (c < 43520 - ? (c < 43494 - ? (c >= 43488 && c <= 43492) - : (c <= 43503 || (c >= 43514 && c <= 43518))) - : (c <= 43560 || (c < 43588 - ? (c >= 43584 && c <= 43586) - : c <= 43595))))) - : (c <= 43638 || (c < 43714 - ? (c < 43701 - ? (c < 43646 - ? c == 43642 - : (c <= 43695 || c == 43697)) - : (c <= 43702 || (c < 43712 - ? (c >= 43705 && c <= 43709) - : c <= 43712))) - : (c <= 43714 || (c < 43777 - ? (c < 43744 - ? (c >= 43739 && c <= 43741) - : (c <= 43754 || (c >= 43762 && c <= 43764))) - : (c <= 43782 || (c < 43793 - ? (c >= 43785 && c <= 43790) - : c <= 43798))))))) - : (c <= 43814 || (c < 64287 - ? (c < 55216 - ? (c < 43888 - ? (c < 43824 - ? (c >= 43816 && c <= 43822) - : (c <= 43866 || (c >= 43868 && c <= 43881))) - : (c <= 44002 || (c < 55203 - ? c == 44032 - : c <= 55203))) - : (c <= 55238 || (c < 64256 - ? (c < 63744 - ? (c >= 55243 && c <= 55291) - : (c <= 64109 || (c >= 64112 && c <= 64217))) - : (c <= 64262 || (c < 64285 - ? (c >= 64275 && c <= 64279) - : c <= 64285))))) - : (c <= 64296 || (c < 64467 - ? (c < 64320 - ? (c < 64312 - ? (c >= 64298 && c <= 64310) - : (c <= 64316 || c == 64318)) - : (c <= 64321 || (c < 64326 - ? (c >= 64323 && c <= 64324) - : c <= 64433))) - : (c <= 64829 || (c < 65008 - ? (c < 64914 - ? (c >= 64848 && c <= 64911) - : c <= 64967) - : (c <= 65019 || (c < 65142 - ? (c >= 65136 && c <= 65140) - : c <= 65276))))))))) - : (c <= 65338 || (c < 66864 - ? (c < 66176 - ? (c < 65536 - ? (c < 65482 - ? (c < 65382 - ? (c >= 65345 && c <= 65370) - : (c <= 65470 || (c >= 65474 && c <= 65479))) - : (c <= 65487 || (c < 65498 - ? (c >= 65490 && c <= 65495) - : c <= 65500))) - : (c <= 65547 || (c < 65599 - ? (c < 65576 - ? (c >= 65549 && c <= 65574) - : (c <= 65594 || (c >= 65596 && c <= 65597))) - : (c <= 65613 || (c < 65664 - ? (c >= 65616 && c <= 65629) - : c <= 65786))))) - : (c <= 66204 || (c < 66464 - ? (c < 66370 - ? (c < 66304 - ? (c >= 66208 && c <= 66256) - : (c <= 66335 || (c >= 66349 && c <= 66368))) - : (c <= 66377 || (c < 66432 - ? (c >= 66384 && c <= 66421) - : c <= 66461))) - : (c <= 66499 || (c < 66736 - ? (c < 66560 - ? (c >= 66504 && c <= 66511) - : c <= 66717) - : (c <= 66771 || (c < 66816 - ? (c >= 66776 && c <= 66811) - : c <= 66855))))))) - : (c <= 66915 || (c < 67506 - ? (c < 66995 - ? (c < 66964 - ? (c < 66940 - ? (c >= 66928 && c <= 66938) - : (c <= 66954 || (c >= 66956 && c <= 66962))) - : (c <= 66965 || (c < 66979 - ? (c >= 66967 && c <= 66977) - : c <= 66993))) - : (c <= 67001 || (c < 67424 - ? (c < 67072 - ? (c >= 67003 && c <= 67004) - : (c <= 67382 || (c >= 67392 && c <= 67413))) - : (c <= 67431 || (c < 67463 - ? (c >= 67456 && c <= 67461) - : c <= 67504))))) - : (c <= 67514 || (c < 67680 - ? (c < 67639 - ? (c < 67592 - ? (c >= 67584 && c <= 67589) - : (c <= 67592 || (c >= 67594 && c <= 67637))) - : (c <= 67640 || (c < 67647 - ? c == 67644 - : c <= 67669))) - : (c <= 67702 || (c < 67828 - ? (c < 67808 - ? (c >= 67712 && c <= 67742) - : c <= 67826) - : (c <= 67829 || (c < 67872 - ? (c >= 67840 && c <= 67861) - : c <= 67883))))))))))))))); -} - static bool ts_lex(TSLexer *lexer, TSStateId state) { START_LEXER(); eof = lexer->eof(lexer); switch (state) { case 0: - if (eof) ADVANCE(30); - if (lookahead == '#') ADVANCE(1); - if (lookahead == '(') ADVANCE(37); - if (lookahead == ')') ADVANCE(39); - if (lookahead == '-') ADVANCE(55); - if (lookahead == '.') ADVANCE(57); - if (lookahead == ':') ADVANCE(32); - if (lookahead == ';') ADVANCE(41); - if (lookahead == '<') ADVANCE(6); - if (lookahead == '[') ADVANCE(26); - if (lookahead == '\\') ADVANCE(2); - if (lookahead == 'd') ADVANCE(14); - if (lookahead == 'l') ADVANCE(9); - if (lookahead == 'r') ADVANCE(15); - if (lookahead == 'u') ADVANCE(20); - if (lookahead == '{') ADVANCE(43); - if (lookahead == '}') ADVANCE(45); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') SKIP(0) + if (eof) ADVANCE(4); + if ((!eof && lookahead == 00)) ADVANCE(8); + if (lookahead == '#') ADVANCE(18); + if (lookahead == '-') ADVANCE(3); + if (lookahead == '.') ADVANCE(13); + if (lookahead == ':') ADVANCE(10); + if (lookahead == ';') ADVANCE(7); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(0); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(17); END_STATE(); case 1: - if (lookahead == '\n') ADVANCE(69); - if (lookahead != 0) ADVANCE(1); + ADVANCE_MAP( + 0, 8, + '\n', 5, + '#', 18, + '-', 15, + '.', 13, + ':', 10, + ';', 7, + '\'', 16, + '_', 16, + ); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(14); END_STATE(); case 2: - if (lookahead == '\n') ADVANCE(3); + if ((!eof && lookahead == 00)) ADVANCE(8); + if (lookahead == '\n') ADVANCE(6); + if (lookahead == '#') ADVANCE(18); + if (lookahead == '-') ADVANCE(3); + if (lookahead == '.') ADVANCE(13); + if (lookahead == ':') ADVANCE(10); + if (lookahead == ';') ADVANCE(7); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') SKIP(2); END_STATE(); case 3: - if (lookahead == '\n') ADVANCE(63); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(64); + if (lookahead == '>') ADVANCE(9); END_STATE(); case 4: - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(49); - if (lookahead == '(') ADVANCE(38); - if (lookahead == '-') ADVANCE(56); - if (lookahead == '.') ADVANCE(58); - if (lookahead == ';') ADVANCE(42); - if (lookahead == '<') ADVANCE(51); - if (lookahead == '{') ADVANCE(44); - if (lookahead == '}') ADVANCE(46); - if (lookahead == '\t' || - lookahead == '\r') ADVANCE(49); - if (sym_label_character_set_1(lookahead)) ADVANCE(52); - if (lookahead != 0) ADVANCE(53); + ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 5: - if (lookahead == ' ') ADVANCE(67); - if (lookahead == '-') ADVANCE(54); - if (lookahead == '.') ADVANCE(57); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r') SKIP(5) - if (sym_label_character_set_1(lookahead)) ADVANCE(68); + ACCEPT_TOKEN(aux_sym_declaration_token1); + if (lookahead == '\n') ADVANCE(5); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(14); END_STATE(); case 6: - if (lookahead == '-') ADVANCE(60); + ACCEPT_TOKEN(aux_sym_declaration_token1); + if (lookahead == '\n') ADVANCE(6); END_STATE(); case 7: - if (lookahead == ']') ADVANCE(65); - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(7); + ACCEPT_TOKEN(anon_sym_SEMI); END_STATE(); case 8: - if (lookahead == 'c') ADVANCE(24); + ACCEPT_TOKEN(anon_sym_NULL); END_STATE(); case 9: - if (lookahead == 'e') ADVANCE(11); + ACCEPT_TOKEN(sym_connection); END_STATE(); case 10: - if (lookahead == 'e') ADVANCE(8); + ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 11: - if (lookahead == 'f') ADVANCE(22); + ACCEPT_TOKEN(aux_sym_label_token1); + if (lookahead == '#') ADVANCE(12); + if (lookahead == '\t' || + (0x0b <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(11); + if (lookahead != 0 && + (lookahead < '\t' || '\r' < lookahead)) ADVANCE(12); END_STATE(); case 12: - if (lookahead == 'g') ADVANCE(13); + ACCEPT_TOKEN(aux_sym_label_token1); + if (lookahead != 0 && + lookahead != '\n') ADVANCE(12); END_STATE(); case 13: - if (lookahead == 'h') ADVANCE(23); + ACCEPT_TOKEN(anon_sym_DOT); END_STATE(); case 14: - if (lookahead == 'i') ADVANCE(21); - if (lookahead == 'o') ADVANCE(25); + ACCEPT_TOKEN(aux_sym__ident_recursive_token1); + if (lookahead == '\n') ADVANCE(5); + if (lookahead == '-') ADVANCE(15); + if (lookahead == '\'' || + lookahead == '_') ADVANCE(16); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ') ADVANCE(14); END_STATE(); case 15: - if (lookahead == 'i') ADVANCE(12); + ACCEPT_TOKEN(aux_sym__ident_recursive_token1); + if (lookahead == '>') ADVANCE(9); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ' || + lookahead == '\'' || + lookahead == '-' || + lookahead == '_') ADVANCE(16); END_STATE(); case 16: - if (lookahead == 'i') ADVANCE(19); + ACCEPT_TOKEN(aux_sym__ident_recursive_token1); + if (('\t' <= lookahead && lookahead <= '\r') || + lookahead == ' ' || + lookahead == '\'' || + lookahead == '-' || + lookahead == '_') ADVANCE(16); END_STATE(); case 17: - if (lookahead == 'n') ADVANCE(36); + ACCEPT_TOKEN(sym__ident_base); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(17); END_STATE(); case 18: - if (lookahead == 'n') ADVANCE(31); - END_STATE(); - case 19: - if (lookahead == 'o') ADVANCE(18); - END_STATE(); - case 20: - if (lookahead == 'p') ADVANCE(33); - END_STATE(); - case 21: - if (lookahead == 'r') ADVANCE(10); - END_STATE(); - case 22: - if (lookahead == 't') ADVANCE(35); - END_STATE(); - case 23: - if (lookahead == 't') ADVANCE(34); - END_STATE(); - case 24: - if (lookahead == 't') ADVANCE(16); - END_STATE(); - case 25: - if (lookahead == 'w') ADVANCE(17); - END_STATE(); - case 26: - if (('0' <= lookahead && lookahead <= '9')) ADVANCE(7); - END_STATE(); - case 27: - if (eof) ADVANCE(30); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(66); - if (lookahead == '#') ADVANCE(1); - if (lookahead == '(') ADVANCE(37); - if (lookahead == ')') ADVANCE(39); - if (lookahead == '-') ADVANCE(55); - if (lookahead == '.') ADVANCE(57); - if (lookahead == ':') ADVANCE(32); - if (lookahead == ';') ADVANCE(41); - if (lookahead == '<') ADVANCE(6); - if (lookahead == '[') ADVANCE(26); - if (lookahead == '\\') ADVANCE(2); - if (lookahead == '{') ADVANCE(43); - if (lookahead == '}') ADVANCE(45); - if (lookahead == '\t' || - lookahead == '\r') SKIP(27) - if (sym_label_character_set_1(lookahead)) ADVANCE(68); - END_STATE(); - case 28: - if (eof) ADVANCE(30); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(48); - if (lookahead == '#') ADVANCE(47); - if (lookahead == '(') ADVANCE(38); - if (lookahead == '-') ADVANCE(56); - if (lookahead == '.') ADVANCE(58); - if (lookahead == ';') ADVANCE(42); - if (lookahead == '<') ADVANCE(51); - if (lookahead == '{') ADVANCE(44); - if (lookahead == '\t' || - lookahead == '\r') ADVANCE(48); - if (sym_label_character_set_1(lookahead)) ADVANCE(52); - if (lookahead != 0) ADVANCE(53); - END_STATE(); - case 29: - if (eof) ADVANCE(30); - if (lookahead == ' ') ADVANCE(67); - if (lookahead == '#') ADVANCE(1); - if (lookahead == '(') ADVANCE(37); - if (lookahead == '-') ADVANCE(55); - if (lookahead == '.') ADVANCE(57); - if (lookahead == '<') ADVANCE(6); - if (lookahead == '}') ADVANCE(45); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r') SKIP(29) - if (sym_label_character_set_1(lookahead)) ADVANCE(68); - END_STATE(); - case 30: - ACCEPT_TOKEN(ts_builtin_sym_end); - END_STATE(); - case 31: - ACCEPT_TOKEN(anon_sym_direction); - END_STATE(); - case 32: - ACCEPT_TOKEN(anon_sym_COLON); - END_STATE(); - case 33: - ACCEPT_TOKEN(anon_sym_up); - END_STATE(); - case 34: - ACCEPT_TOKEN(anon_sym_right); - END_STATE(); - case 35: - ACCEPT_TOKEN(anon_sym_left); - END_STATE(); - case 36: - ACCEPT_TOKEN(anon_sym_down); - END_STATE(); - case 37: - ACCEPT_TOKEN(anon_sym_LPAREN); - END_STATE(); - case 38: - ACCEPT_TOKEN(anon_sym_LPAREN); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 39: - ACCEPT_TOKEN(anon_sym_RPAREN); - END_STATE(); - case 40: - ACCEPT_TOKEN(aux_sym_expression_token1); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(40); - if (lookahead == '\t' || - lookahead == '\r') ADVANCE(40); - END_STATE(); - case 41: - ACCEPT_TOKEN(anon_sym_SEMI); - END_STATE(); - case 42: - ACCEPT_TOKEN(anon_sym_SEMI); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 43: - ACCEPT_TOKEN(anon_sym_LBRACE); - END_STATE(); - case 44: - ACCEPT_TOKEN(anon_sym_LBRACE); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 45: - ACCEPT_TOKEN(anon_sym_RBRACE); - END_STATE(); - case 46: - ACCEPT_TOKEN(anon_sym_RBRACE); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 47: - ACCEPT_TOKEN(sym_label); - if (lookahead == '\n') ADVANCE(69); - if (lookahead != 0) ADVANCE(47); - END_STATE(); - case 48: - ACCEPT_TOKEN(sym_label); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(48); - if (lookahead == '#') ADVANCE(47); - if (lookahead == '(') ADVANCE(38); - if (lookahead == '-') ADVANCE(56); - if (lookahead == '.') ADVANCE(58); - if (lookahead == ';') ADVANCE(42); - if (lookahead == '<') ADVANCE(51); - if (lookahead == '{') ADVANCE(44); - if (lookahead == '\t' || - lookahead == '\r') ADVANCE(48); - if (sym_label_character_set_1(lookahead)) ADVANCE(52); - if (lookahead != 0) ADVANCE(53); - END_STATE(); - case 49: - ACCEPT_TOKEN(sym_label); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(49); - if (lookahead == '(') ADVANCE(38); - if (lookahead == '-') ADVANCE(56); - if (lookahead == '.') ADVANCE(58); - if (lookahead == ';') ADVANCE(42); - if (lookahead == '<') ADVANCE(51); - if (lookahead == '{') ADVANCE(44); - if (lookahead == '}') ADVANCE(46); - if (lookahead == '\t' || - lookahead == '\r') ADVANCE(49); - if (sym_label_character_set_1(lookahead)) ADVANCE(52); - if (lookahead != 0) ADVANCE(53); - END_STATE(); - case 50: - ACCEPT_TOKEN(sym_label); - if (lookahead == '-') ADVANCE(50); - if (lookahead == '>') ADVANCE(53); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 51: - ACCEPT_TOKEN(sym_label); - if (lookahead == '-') ADVANCE(50); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 52: - ACCEPT_TOKEN(sym_label); - if (sym_label_character_set_2(lookahead)) ADVANCE(52); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 53: - ACCEPT_TOKEN(sym_label); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 54: - ACCEPT_TOKEN(anon_sym_DASH); - END_STATE(); - case 55: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(59); - if (lookahead == '>') ADVANCE(61); - END_STATE(); - case 56: - ACCEPT_TOKEN(anon_sym_DASH); - if (lookahead == '-') ADVANCE(50); - if (lookahead == '>') ADVANCE(53); + ACCEPT_TOKEN(sym_comment); if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 57: - ACCEPT_TOKEN(anon_sym_DOT); - END_STATE(); - case 58: - ACCEPT_TOKEN(anon_sym_DOT); - if (lookahead != 0 && - lookahead != '\n') ADVANCE(53); - END_STATE(); - case 59: - ACCEPT_TOKEN(aux_sym_connection_token1); - if (lookahead == '-') ADVANCE(59); - if (lookahead == '>') ADVANCE(61); - END_STATE(); - case 60: - ACCEPT_TOKEN(aux_sym_connection_token2); - if (lookahead == '-') ADVANCE(60); - if (lookahead == '>') ADVANCE(62); - END_STATE(); - case 61: - ACCEPT_TOKEN(aux_sym_connection_token3); - END_STATE(); - case 62: - ACCEPT_TOKEN(aux_sym_connection_token4); - END_STATE(); - case 63: - ACCEPT_TOKEN(aux_sym_connection_token5); - if (lookahead == '\n') ADVANCE(63); - if (lookahead == '\t' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(64); - END_STATE(); - case 64: - ACCEPT_TOKEN(aux_sym_connection_token5); - if (lookahead == '\t' || - lookahead == '\n' || - lookahead == '\r' || - lookahead == ' ') ADVANCE(64); - END_STATE(); - case 65: - ACCEPT_TOKEN(sym_connection_identifier); - END_STATE(); - case 66: - ACCEPT_TOKEN(sym__ident_regex); - if (lookahead == '\n') ADVANCE(40); - if (lookahead == ' ') ADVANCE(66); - if (sym_label_character_set_1(lookahead)) ADVANCE(68); - END_STATE(); - case 67: - ACCEPT_TOKEN(sym__ident_regex); - if (lookahead == ' ') ADVANCE(67); - if (sym_label_character_set_1(lookahead)) ADVANCE(68); - END_STATE(); - case 68: - ACCEPT_TOKEN(sym__ident_regex); - if (sym_label_character_set_2(lookahead)) ADVANCE(68); - END_STATE(); - case 69: - ACCEPT_TOKEN(sym__comment); + lookahead != '\n') ADVANCE(18); END_STATE(); default: return false; @@ -1790,2079 +321,323 @@ static bool ts_lex(TSLexer *lexer, TSStateId state) { static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, - [1] = {.lex_state = 29}, - [2] = {.lex_state = 27}, - [3] = {.lex_state = 27}, - [4] = {.lex_state = 27}, - [5] = {.lex_state = 27}, - [6] = {.lex_state = 27}, - [7] = {.lex_state = 27}, - [8] = {.lex_state = 29}, - [9] = {.lex_state = 27}, - [10] = {.lex_state = 29}, - [11] = {.lex_state = 27}, - [12] = {.lex_state = 29}, - [13] = {.lex_state = 27}, - [14] = {.lex_state = 29}, - [15] = {.lex_state = 27}, - [16] = {.lex_state = 29}, - [17] = {.lex_state = 29}, - [18] = {.lex_state = 27}, - [19] = {.lex_state = 29}, - [20] = {.lex_state = 28}, - [21] = {.lex_state = 27}, - [22] = {.lex_state = 28}, - [23] = {.lex_state = 27}, - [24] = {.lex_state = 27}, - [25] = {.lex_state = 28}, - [26] = {.lex_state = 28}, - [27] = {.lex_state = 28}, - [28] = {.lex_state = 27}, - [29] = {.lex_state = 27}, - [30] = {.lex_state = 27}, - [31] = {.lex_state = 27}, - [32] = {.lex_state = 27}, - [33] = {.lex_state = 27}, - [34] = {.lex_state = 4}, - [35] = {.lex_state = 4}, - [36] = {.lex_state = 27}, - [37] = {.lex_state = 27}, - [38] = {.lex_state = 4}, - [39] = {.lex_state = 27}, - [40] = {.lex_state = 27}, - [41] = {.lex_state = 4}, - [42] = {.lex_state = 27}, - [43] = {.lex_state = 4}, - [44] = {.lex_state = 27}, - [45] = {.lex_state = 27}, - [46] = {.lex_state = 27}, - [47] = {.lex_state = 27}, - [48] = {.lex_state = 27}, - [49] = {.lex_state = 27}, - [50] = {.lex_state = 27}, - [51] = {.lex_state = 27}, - [52] = {.lex_state = 27}, - [53] = {.lex_state = 27}, - [54] = {.lex_state = 27}, - [55] = {.lex_state = 27}, - [56] = {.lex_state = 29}, - [57] = {.lex_state = 27}, - [58] = {.lex_state = 29}, - [59] = {.lex_state = 27}, - [60] = {.lex_state = 27}, - [61] = {.lex_state = 27}, - [62] = {.lex_state = 27}, - [63] = {.lex_state = 27}, - [64] = {.lex_state = 27}, - [65] = {.lex_state = 27}, - [66] = {.lex_state = 27}, - [67] = {.lex_state = 27}, - [68] = {.lex_state = 27}, - [69] = {.lex_state = 27}, - [70] = {.lex_state = 27}, - [71] = {.lex_state = 27}, - [72] = {.lex_state = 27}, - [73] = {.lex_state = 27}, - [74] = {.lex_state = 27}, - [75] = {.lex_state = 29}, - [76] = {.lex_state = 29}, - [77] = {.lex_state = 29}, - [78] = {.lex_state = 29}, - [79] = {.lex_state = 29}, - [80] = {.lex_state = 29}, - [81] = {.lex_state = 29}, - [82] = {.lex_state = 29}, - [83] = {.lex_state = 29}, - [84] = {.lex_state = 29}, - [85] = {.lex_state = 29}, - [86] = {.lex_state = 29}, - [87] = {.lex_state = 29}, - [88] = {.lex_state = 29}, - [89] = {.lex_state = 29}, - [90] = {.lex_state = 29}, - [91] = {.lex_state = 5}, - [92] = {.lex_state = 5}, - [93] = {.lex_state = 0}, - [94] = {.lex_state = 0}, - [95] = {.lex_state = 0}, - [96] = {.lex_state = 0}, - [97] = {.lex_state = 0}, - [98] = {.lex_state = 0}, - [99] = {.lex_state = 0}, - [100] = {.lex_state = 0}, - [101] = {.lex_state = 0}, + [1] = {.lex_state = 0}, + [2] = {.lex_state = 1}, + [3] = {.lex_state = 0}, + [4] = {.lex_state = 2}, + [5] = {.lex_state = 2}, + [6] = {.lex_state = 0}, + [7] = {.lex_state = 2}, + [8] = {.lex_state = 2}, + [9] = {.lex_state = 2}, + [10] = {.lex_state = 2}, + [11] = {.lex_state = 0}, + [12] = {.lex_state = 2}, + [13] = {.lex_state = 2}, + [14] = {.lex_state = 2}, + [15] = {.lex_state = 0}, + [16] = {.lex_state = 0}, + [17] = {.lex_state = 0}, + [18] = {.lex_state = 0}, + [19] = {.lex_state = 0}, + [20] = {.lex_state = 0}, + [21] = {.lex_state = 11}, + [22] = {.lex_state = 0}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [ts_builtin_sym_end] = ACTIONS(1), - [anon_sym_direction] = ACTIONS(1), - [anon_sym_COLON] = ACTIONS(1), - [anon_sym_up] = ACTIONS(1), - [anon_sym_right] = ACTIONS(1), - [anon_sym_left] = ACTIONS(1), - [anon_sym_down] = ACTIONS(1), - [anon_sym_LPAREN] = ACTIONS(1), - [anon_sym_RPAREN] = ACTIONS(1), [anon_sym_SEMI] = ACTIONS(1), - [anon_sym_LBRACE] = ACTIONS(1), - [anon_sym_RBRACE] = ACTIONS(1), - [anon_sym_DASH] = ACTIONS(1), + [anon_sym_NULL] = ACTIONS(1), + [sym_connection] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), [anon_sym_DOT] = ACTIONS(1), - [aux_sym_connection_token1] = ACTIONS(1), - [aux_sym_connection_token2] = ACTIONS(1), - [aux_sym_connection_token3] = ACTIONS(1), - [aux_sym_connection_token4] = ACTIONS(1), - [aux_sym_connection_token5] = ACTIONS(1), - [sym_connection_identifier] = ACTIONS(1), - [sym__comment] = ACTIONS(1), + [sym__ident_base] = ACTIONS(1), + [sym_comment] = ACTIONS(3), }, [1] = { - [sym_source_file] = STATE(101), - [sym_expression] = STATE(10), - [sym_identifier] = STATE(3), - [sym_sub_identifier] = STATE(11), - [sym_connection] = STATE(3), - [aux_sym_source_file_repeat1] = STATE(10), - [aux_sym_expression_repeat1] = STATE(3), - [aux_sym_identifier_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(3), - [anon_sym_LPAREN] = ACTIONS(5), - [anon_sym_DASH] = ACTIONS(7), - [anon_sym_DOT] = ACTIONS(9), - [aux_sym_connection_token1] = ACTIONS(11), - [aux_sym_connection_token2] = ACTIONS(11), - [aux_sym_connection_token3] = ACTIONS(13), - [aux_sym_connection_token4] = ACTIONS(13), - [sym__ident_regex] = ACTIONS(15), - [sym__comment] = ACTIONS(17), - }, - [2] = { - [sym_identifier] = STATE(2), - [sym_sub_identifier] = STATE(11), - [sym_connection] = STATE(2), - [aux_sym_expression_repeat1] = STATE(2), - [aux_sym_identifier_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(19), - [anon_sym_COLON] = ACTIONS(21), - [anon_sym_LPAREN] = ACTIONS(21), - [anon_sym_RPAREN] = ACTIONS(21), - [aux_sym_expression_token1] = ACTIONS(21), - [anon_sym_SEMI] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(23), - [anon_sym_DOT] = ACTIONS(26), - [aux_sym_connection_token1] = ACTIONS(29), - [aux_sym_connection_token2] = ACTIONS(29), - [aux_sym_connection_token3] = ACTIONS(32), - [aux_sym_connection_token4] = ACTIONS(32), - [sym_connection_identifier] = ACTIONS(21), - [sym__ident_regex] = ACTIONS(23), - [sym__comment] = ACTIONS(21), - }, - [3] = { - [sym_identifier] = STATE(2), - [sym_sub_identifier] = STATE(11), - [sym_connection] = STATE(2), - [aux_sym_expression_repeat1] = STATE(2), - [aux_sym_identifier_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(35), - [anon_sym_COLON] = ACTIONS(37), - [anon_sym_LPAREN] = ACTIONS(39), - [anon_sym_RPAREN] = ACTIONS(41), - [aux_sym_expression_token1] = ACTIONS(43), - [anon_sym_SEMI] = ACTIONS(43), - [anon_sym_DASH] = ACTIONS(7), - [anon_sym_DOT] = ACTIONS(9), - [aux_sym_connection_token1] = ACTIONS(11), - [aux_sym_connection_token2] = ACTIONS(11), - [aux_sym_connection_token3] = ACTIONS(13), - [aux_sym_connection_token4] = ACTIONS(13), - [sym_connection_identifier] = ACTIONS(45), - [sym__ident_regex] = ACTIONS(7), - [sym__comment] = ACTIONS(39), - }, - [4] = { - [sym_identifier] = STATE(2), - [sym_sub_identifier] = STATE(11), - [sym_connection] = STATE(2), - [aux_sym_expression_repeat1] = STATE(2), - [aux_sym_identifier_repeat1] = STATE(11), - [ts_builtin_sym_end] = ACTIONS(47), - [anon_sym_COLON] = ACTIONS(49), - [anon_sym_LPAREN] = ACTIONS(51), - [anon_sym_RPAREN] = ACTIONS(53), - [aux_sym_expression_token1] = ACTIONS(55), - [anon_sym_SEMI] = ACTIONS(55), - [anon_sym_DASH] = ACTIONS(7), - [anon_sym_DOT] = ACTIONS(9), - [aux_sym_connection_token1] = ACTIONS(11), - [aux_sym_connection_token2] = ACTIONS(11), - [aux_sym_connection_token3] = ACTIONS(13), - [aux_sym_connection_token4] = ACTIONS(13), - [sym_connection_identifier] = ACTIONS(57), - [sym__ident_regex] = ACTIONS(7), - [sym__comment] = ACTIONS(51), - }, - [5] = { - [sym_identifier] = STATE(6), - [sym_sub_identifier] = STATE(13), - [sym_connection] = STATE(6), - [aux_sym_expression_repeat1] = STATE(6), - [aux_sym_identifier_repeat1] = STATE(13), - [anon_sym_COLON] = ACTIONS(59), - [anon_sym_LPAREN] = ACTIONS(39), - [anon_sym_RPAREN] = ACTIONS(61), - [aux_sym_expression_token1] = ACTIONS(63), - [anon_sym_SEMI] = ACTIONS(63), - [anon_sym_RBRACE] = ACTIONS(39), - [anon_sym_DASH] = ACTIONS(65), - [anon_sym_DOT] = ACTIONS(67), - [aux_sym_connection_token1] = ACTIONS(69), - [aux_sym_connection_token2] = ACTIONS(69), - [aux_sym_connection_token3] = ACTIONS(71), - [aux_sym_connection_token4] = ACTIONS(71), - [sym_connection_identifier] = ACTIONS(73), - [sym__ident_regex] = ACTIONS(65), - }, - [6] = { - [sym_identifier] = STATE(6), - [sym_sub_identifier] = STATE(13), - [sym_connection] = STATE(6), - [aux_sym_expression_repeat1] = STATE(6), - [aux_sym_identifier_repeat1] = STATE(13), - [anon_sym_COLON] = ACTIONS(21), - [anon_sym_LPAREN] = ACTIONS(21), - [anon_sym_RPAREN] = ACTIONS(21), - [aux_sym_expression_token1] = ACTIONS(21), - [anon_sym_SEMI] = ACTIONS(21), - [anon_sym_RBRACE] = ACTIONS(21), - [anon_sym_DASH] = ACTIONS(75), - [anon_sym_DOT] = ACTIONS(78), - [aux_sym_connection_token1] = ACTIONS(81), - [aux_sym_connection_token2] = ACTIONS(81), - [aux_sym_connection_token3] = ACTIONS(84), - [aux_sym_connection_token4] = ACTIONS(84), - [sym_connection_identifier] = ACTIONS(21), - [sym__ident_regex] = ACTIONS(75), - }, - [7] = { - [sym_identifier] = STATE(6), - [sym_sub_identifier] = STATE(13), - [sym_connection] = STATE(6), - [aux_sym_expression_repeat1] = STATE(6), - [aux_sym_identifier_repeat1] = STATE(13), - [anon_sym_COLON] = ACTIONS(87), - [anon_sym_LPAREN] = ACTIONS(51), - [anon_sym_RPAREN] = ACTIONS(89), - [aux_sym_expression_token1] = ACTIONS(91), - [anon_sym_SEMI] = ACTIONS(91), - [anon_sym_RBRACE] = ACTIONS(51), - [anon_sym_DASH] = ACTIONS(65), - [anon_sym_DOT] = ACTIONS(67), - [aux_sym_connection_token1] = ACTIONS(69), - [aux_sym_connection_token2] = ACTIONS(69), - [aux_sym_connection_token3] = ACTIONS(71), - [aux_sym_connection_token4] = ACTIONS(71), - [sym_connection_identifier] = ACTIONS(93), - [sym__ident_regex] = ACTIONS(65), + [sym_source_file] = STATE(22), + [sym_declaration] = STATE(6), + [sym_identifier] = STATE(4), + [sym__ident_recursive] = STATE(5), + [aux_sym_source_file_repeat1] = STATE(6), + [ts_builtin_sym_end] = ACTIONS(5), + [sym__ident_base] = ACTIONS(7), + [sym_comment] = ACTIONS(9), }, }; static const uint16_t ts_small_parse_table[] = { - [0] = 11, - ACTIONS(95), 1, - ts_builtin_sym_end, - ACTIONS(97), 1, - anon_sym_LPAREN, - ACTIONS(100), 1, - anon_sym_DASH, - ACTIONS(103), 1, - anon_sym_DOT, - ACTIONS(112), 1, - sym__ident_regex, - ACTIONS(115), 1, - sym__comment, - ACTIONS(106), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(109), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(8), 2, - sym_expression, - aux_sym_source_file_repeat1, - STATE(11), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(3), 3, - sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [40] = 5, - ACTIONS(118), 1, - ts_builtin_sym_end, - ACTIONS(125), 1, - anon_sym_DOT, - ACTIONS(122), 2, - anon_sym_DASH, - sym__ident_regex, - STATE(9), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - ACTIONS(120), 11, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__comment, - [68] = 11, - ACTIONS(5), 1, - anon_sym_LPAREN, - ACTIONS(7), 1, - anon_sym_DASH, - ACTIONS(9), 1, - anon_sym_DOT, + [0] = 3, + ACTIONS(13), 1, + aux_sym__ident_recursive_token1, ACTIONS(15), 1, - sym__ident_regex, - ACTIONS(128), 1, - ts_builtin_sym_end, - ACTIONS(130), 1, - sym__comment, - ACTIONS(11), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(13), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(8), 2, - sym_expression, - aux_sym_source_file_repeat1, - STATE(11), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(3), 3, - sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [108] = 5, - ACTIONS(9), 1, - anon_sym_DOT, - ACTIONS(132), 1, - ts_builtin_sym_end, - ACTIONS(136), 2, - anon_sym_DASH, - sym__ident_regex, - STATE(9), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - ACTIONS(134), 11, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, + sym_comment, + ACTIONS(11), 6, + aux_sym_declaration_token1, anon_sym_SEMI, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__comment, - [136] = 10, - ACTIONS(138), 1, - anon_sym_LPAREN, - ACTIONS(141), 1, - anon_sym_RBRACE, - ACTIONS(143), 1, - anon_sym_DASH, - ACTIONS(146), 1, - anon_sym_DOT, - ACTIONS(155), 1, - sym__ident_regex, - ACTIONS(149), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(152), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(12), 2, - sym_expression, - aux_sym_container_repeat1, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(5), 3, - sym_identifier, + anon_sym_NULL, sym_connection, - aux_sym_expression_repeat1, - [173] = 4, - ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(158), 2, - anon_sym_DASH, - sym__ident_regex, - STATE(18), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - ACTIONS(134), 11, anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_RBRACE, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - [198] = 10, - ACTIONS(65), 1, - anon_sym_DASH, - ACTIONS(67), 1, anon_sym_DOT, - ACTIONS(160), 1, - anon_sym_LPAREN, - ACTIONS(162), 1, - anon_sym_RBRACE, - ACTIONS(164), 1, - sym__ident_regex, - ACTIONS(69), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(71), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(12), 2, - sym_expression, - aux_sym_container_repeat1, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(5), 3, - sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [235] = 3, - ACTIONS(166), 1, + [15] = 6, + ACTIONS(17), 1, ts_builtin_sym_end, - ACTIONS(170), 1, - aux_sym_connection_token5, - ACTIONS(168), 14, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - sym__comment, - [258] = 10, - ACTIONS(65), 1, - anon_sym_DASH, - ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(160), 1, - anon_sym_LPAREN, - ACTIONS(164), 1, - sym__ident_regex, - ACTIONS(172), 1, - anon_sym_RBRACE, - ACTIONS(69), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(71), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(19), 2, - sym_expression, - aux_sym_container_repeat1, - STATE(5), 3, - sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [295] = 10, - ACTIONS(65), 1, - anon_sym_DASH, - ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(160), 1, - anon_sym_LPAREN, - ACTIONS(164), 1, - sym__ident_regex, - ACTIONS(174), 1, - anon_sym_RBRACE, - ACTIONS(69), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(71), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(14), 2, - sym_expression, - aux_sym_container_repeat1, - STATE(5), 3, + ACTIONS(19), 1, + sym__ident_base, + ACTIONS(22), 1, + sym_comment, + STATE(4), 1, sym_identifier, + STATE(5), 1, + sym__ident_recursive, + STATE(3), 2, + sym_declaration, + aux_sym_source_file_repeat1, + [35] = 6, + ACTIONS(15), 1, + sym_comment, + ACTIONS(25), 1, + aux_sym_declaration_token1, + ACTIONS(29), 1, sym_connection, - aux_sym_expression_repeat1, - [332] = 4, - ACTIONS(179), 1, - anon_sym_DOT, - ACTIONS(176), 2, - anon_sym_DASH, - sym__ident_regex, - STATE(18), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - ACTIONS(120), 11, + ACTIONS(31), 1, anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_RBRACE, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - [357] = 10, - ACTIONS(65), 1, - anon_sym_DASH, - ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(160), 1, - anon_sym_LPAREN, - ACTIONS(164), 1, - sym__ident_regex, - ACTIONS(182), 1, - anon_sym_RBRACE, - ACTIONS(69), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(71), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(12), 2, - sym_expression, - aux_sym_container_repeat1, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(5), 3, - sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [394] = 6, - ACTIONS(47), 1, - ts_builtin_sym_end, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(186), 1, + STATE(12), 1, sym_label, - STATE(60), 1, - sym_container, - ACTIONS(55), 2, - aux_sym_expression_token1, + ACTIONS(27), 2, anon_sym_SEMI, - ACTIONS(51), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [422] = 2, - ACTIONS(188), 1, - ts_builtin_sym_end, - ACTIONS(190), 14, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - sym__comment, - [442] = 6, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(192), 1, - ts_builtin_sym_end, - ACTIONS(198), 1, - sym_label, - STATE(54), 1, - sym_container, - ACTIONS(196), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [470] = 2, - ACTIONS(200), 1, - aux_sym_connection_token5, - ACTIONS(168), 14, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - [490] = 2, - ACTIONS(166), 1, - ts_builtin_sym_end, - ACTIONS(168), 14, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - sym__comment, - [510] = 6, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(202), 1, - ts_builtin_sym_end, - ACTIONS(208), 1, - sym_label, - STATE(55), 1, - sym_container, - ACTIONS(206), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [538] = 6, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(210), 1, - ts_builtin_sym_end, - ACTIONS(216), 1, - sym_label, - STATE(66), 1, - sym_container, - ACTIONS(214), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_DASH, + anon_sym_NULL, + [55] = 4, + ACTIONS(15), 1, + sym_comment, + ACTIONS(33), 1, + aux_sym_declaration_token1, + ACTIONS(37), 1, anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [566] = 6, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(218), 1, - ts_builtin_sym_end, - ACTIONS(224), 1, - sym_label, - STATE(61), 1, - sym_container, - ACTIONS(222), 2, - aux_sym_expression_token1, + ACTIONS(35), 4, anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [594] = 2, - ACTIONS(226), 1, - ts_builtin_sym_end, - ACTIONS(228), 14, + anon_sym_NULL, + sym_connection, anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - sym__comment, - [614] = 5, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(202), 1, + [71] = 6, + ACTIONS(7), 1, + sym__ident_base, + ACTIONS(39), 1, ts_builtin_sym_end, - STATE(55), 1, - sym_container, - ACTIONS(206), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [639] = 1, - ACTIONS(190), 14, - anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, + ACTIONS(41), 1, + sym_comment, + STATE(4), 1, + sym_identifier, + STATE(5), 1, + sym__ident_recursive, + STATE(3), 2, + sym_declaration, + aux_sym_source_file_repeat1, + [91] = 3, + ACTIONS(15), 1, + sym_comment, + ACTIONS(43), 1, + aux_sym_declaration_token1, + ACTIONS(45), 5, anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - [656] = 1, - ACTIONS(228), 14, + anon_sym_NULL, + sym_connection, anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - [673] = 1, - ACTIONS(168), 14, + [105] = 5, + ACTIONS(15), 1, + sym_comment, + ACTIONS(31), 1, anon_sym_COLON, - anon_sym_LPAREN, - anon_sym_RPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym_connection_identifier, - sym__ident_regex, - [690] = 5, ACTIONS(47), 1, - ts_builtin_sym_end, - ACTIONS(49), 1, - anon_sym_COLON, - ACTIONS(57), 1, - sym_connection_identifier, - ACTIONS(55), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(51), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [715] = 5, - ACTIONS(232), 1, - anon_sym_LBRACE, - ACTIONS(234), 1, - sym_label, - STATE(70), 1, - sym_container, - ACTIONS(230), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [740] = 5, - ACTIONS(232), 1, - anon_sym_LBRACE, - ACTIONS(238), 1, - sym_label, - STATE(67), 1, - sym_container, - ACTIONS(236), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [765] = 5, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(210), 1, - ts_builtin_sym_end, - STATE(66), 1, - sym_container, - ACTIONS(214), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [790] = 5, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(240), 1, - ts_builtin_sym_end, - STATE(62), 1, - sym_container, - ACTIONS(244), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(242), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [815] = 5, - ACTIONS(232), 1, - anon_sym_LBRACE, - ACTIONS(248), 1, - sym_label, - STATE(71), 1, - sym_container, - ACTIONS(246), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [840] = 5, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(218), 1, - ts_builtin_sym_end, - STATE(61), 1, - sym_container, - ACTIONS(222), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [865] = 5, - ACTIONS(184), 1, - anon_sym_LBRACE, - ACTIONS(192), 1, - ts_builtin_sym_end, - STATE(54), 1, - sym_container, - ACTIONS(196), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [890] = 5, - ACTIONS(232), 1, - anon_sym_LBRACE, - ACTIONS(252), 1, + aux_sym_declaration_token1, + STATE(14), 1, sym_label, - STATE(68), 1, - sym_container, - ACTIONS(250), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [915] = 5, - ACTIONS(202), 1, - ts_builtin_sym_end, - ACTIONS(254), 1, - anon_sym_COLON, - ACTIONS(256), 1, - sym_connection_identifier, - ACTIONS(206), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [940] = 5, - ACTIONS(232), 1, - anon_sym_LBRACE, - ACTIONS(258), 1, - sym_label, - STATE(72), 1, - sym_container, - ACTIONS(91), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(51), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [965] = 4, - ACTIONS(232), 1, - anon_sym_LBRACE, - STATE(69), 1, - sym_container, - ACTIONS(260), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(242), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [987] = 4, - ACTIONS(232), 1, - anon_sym_LBRACE, - STATE(71), 1, - sym_container, - ACTIONS(246), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1009] = 4, - ACTIONS(232), 1, - anon_sym_LBRACE, - STATE(67), 1, - sym_container, - ACTIONS(236), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1031] = 4, - ACTIONS(87), 1, - anon_sym_COLON, - ACTIONS(93), 1, - sym_connection_identifier, - ACTIONS(91), 2, - aux_sym_expression_token1, + ACTIONS(49), 2, anon_sym_SEMI, - ACTIONS(51), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1053] = 4, - ACTIONS(218), 1, - ts_builtin_sym_end, - ACTIONS(262), 1, - anon_sym_COLON, - ACTIONS(222), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1075] = 4, - ACTIONS(232), 1, - anon_sym_LBRACE, - STATE(68), 1, - sym_container, - ACTIONS(250), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1097] = 4, - ACTIONS(202), 1, - ts_builtin_sym_end, - ACTIONS(254), 1, - anon_sym_COLON, - ACTIONS(206), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1119] = 4, - ACTIONS(210), 1, - ts_builtin_sym_end, - ACTIONS(264), 1, - anon_sym_COLON, - ACTIONS(214), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1141] = 4, - ACTIONS(232), 1, - anon_sym_LBRACE, - STATE(70), 1, - sym_container, - ACTIONS(230), 2, - aux_sym_expression_token1, + anon_sym_NULL, + [122] = 3, + ACTIONS(15), 1, + sym_comment, + ACTIONS(51), 1, + aux_sym_declaration_token1, + ACTIONS(53), 4, anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1163] = 4, - ACTIONS(266), 1, + anon_sym_NULL, + sym_connection, anon_sym_COLON, - ACTIONS(268), 1, - sym_connection_identifier, - ACTIONS(236), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1185] = 3, - ACTIONS(240), 1, - ts_builtin_sym_end, - ACTIONS(244), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(242), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1204] = 3, - ACTIONS(210), 1, - ts_builtin_sym_end, - ACTIONS(214), 2, - aux_sym_expression_token1, + [135] = 3, + ACTIONS(15), 1, + sym_comment, + ACTIONS(55), 1, + aux_sym_declaration_token1, + ACTIONS(57), 4, anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1223] = 7, - ACTIONS(65), 1, - anon_sym_DASH, - ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(164), 1, - sym__ident_regex, - ACTIONS(69), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(71), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(7), 3, - sym_identifier, + anon_sym_NULL, sym_connection, - aux_sym_expression_repeat1, - [1250] = 3, - ACTIONS(270), 1, anon_sym_COLON, - ACTIONS(246), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1269] = 7, + [148] = 4, + ACTIONS(3), 1, + sym_comment, ACTIONS(7), 1, - anon_sym_DASH, - ACTIONS(9), 1, - anon_sym_DOT, - ACTIONS(15), 1, - sym__ident_regex, - ACTIONS(11), 2, - aux_sym_connection_token1, - aux_sym_connection_token2, - ACTIONS(13), 2, - aux_sym_connection_token3, - aux_sym_connection_token4, - STATE(11), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - STATE(4), 3, + sym__ident_base, + STATE(5), 1, + sym__ident_recursive, + STATE(8), 1, sym_identifier, - sym_connection, - aux_sym_expression_repeat1, - [1296] = 3, - ACTIONS(272), 1, - anon_sym_COLON, - ACTIONS(250), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1315] = 3, - ACTIONS(202), 1, - ts_builtin_sym_end, - ACTIONS(206), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1334] = 3, - ACTIONS(192), 1, - ts_builtin_sym_end, - ACTIONS(196), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1353] = 3, - ACTIONS(274), 1, - ts_builtin_sym_end, - ACTIONS(278), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(276), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1372] = 2, - ACTIONS(280), 1, - ts_builtin_sym_end, - ACTIONS(282), 11, - anon_sym_LPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1389] = 3, - ACTIONS(266), 1, - anon_sym_COLON, - ACTIONS(236), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1408] = 2, - ACTIONS(284), 1, - ts_builtin_sym_end, - ACTIONS(286), 11, - anon_sym_LPAREN, - aux_sym_expression_token1, - anon_sym_SEMI, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1425] = 3, - ACTIONS(218), 1, - ts_builtin_sym_end, - ACTIONS(222), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - sym__comment, - [1444] = 2, - ACTIONS(250), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(212), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1460] = 2, - ACTIONS(246), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(220), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1476] = 2, - ACTIONS(288), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(276), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1492] = 2, - ACTIONS(260), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(242), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1508] = 2, - ACTIONS(230), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(194), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1524] = 2, - ACTIONS(236), 2, - aux_sym_expression_token1, - anon_sym_SEMI, - ACTIONS(204), 9, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1540] = 1, - ACTIONS(286), 11, - anon_sym_LPAREN, - aux_sym_expression_token1, + [161] = 3, + ACTIONS(15), 1, + sym_comment, + ACTIONS(59), 1, + aux_sym_declaration_token1, + ACTIONS(61), 2, anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1554] = 1, - ACTIONS(282), 11, - anon_sym_LPAREN, - aux_sym_expression_token1, + anon_sym_NULL, + [172] = 3, + ACTIONS(15), 1, + sym_comment, + ACTIONS(63), 1, + aux_sym_declaration_token1, + ACTIONS(65), 2, anon_sym_SEMI, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__ident_regex, - [1568] = 2, - ACTIONS(218), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(220), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1583] = 2, - ACTIONS(47), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(51), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1598] = 2, - ACTIONS(210), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(212), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1613] = 2, - ACTIONS(290), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(292), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1628] = 2, - ACTIONS(192), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(194), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1643] = 2, - ACTIONS(202), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(204), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1658] = 2, - ACTIONS(240), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(242), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1673] = 2, - ACTIONS(274), 2, - ts_builtin_sym_end, - sym__ident_regex, - ACTIONS(276), 8, - anon_sym_LPAREN, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - sym__comment, - [1688] = 2, - ACTIONS(240), 1, - sym__ident_regex, - ACTIONS(242), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1702] = 2, - ACTIONS(218), 1, - sym__ident_regex, - ACTIONS(220), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1716] = 2, - ACTIONS(192), 1, - sym__ident_regex, - ACTIONS(194), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1730] = 2, - ACTIONS(210), 1, - sym__ident_regex, - ACTIONS(212), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1744] = 2, - ACTIONS(47), 1, - sym__ident_regex, - ACTIONS(51), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1758] = 2, - ACTIONS(274), 1, - sym__ident_regex, - ACTIONS(276), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1772] = 2, - ACTIONS(202), 1, - sym__ident_regex, - ACTIONS(204), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1786] = 2, - ACTIONS(290), 1, - sym__ident_regex, - ACTIONS(292), 8, - anon_sym_LPAREN, - anon_sym_RBRACE, - anon_sym_DASH, - anon_sym_DOT, - aux_sym_connection_token1, - aux_sym_connection_token2, - aux_sym_connection_token3, - aux_sym_connection_token4, - [1800] = 5, - ACTIONS(65), 1, - anon_sym_DASH, + anon_sym_NULL, + [183] = 3, + ACTIONS(15), 1, + sym_comment, ACTIONS(67), 1, - anon_sym_DOT, - ACTIONS(164), 1, - sym__ident_regex, - STATE(30), 1, - sym_identifier, - STATE(13), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - [1817] = 5, + aux_sym_declaration_token1, + ACTIONS(69), 2, + anon_sym_SEMI, + anon_sym_NULL, + [194] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(71), 1, + sym__ident_base, + STATE(10), 1, + sym_field, + [204] = 1, + ACTIONS(73), 3, + ts_builtin_sym_end, + sym__ident_base, + sym_comment, + [210] = 3, + ACTIONS(3), 1, + sym_comment, ACTIONS(7), 1, - anon_sym_DASH, - ACTIONS(9), 1, - anon_sym_DOT, + sym__ident_base, + STATE(7), 1, + sym__ident_recursive, + [220] = 1, + ACTIONS(75), 3, + ts_builtin_sym_end, + sym__ident_base, + sym_comment, + [226] = 1, + ACTIONS(77), 3, + ts_builtin_sym_end, + sym__ident_base, + sym_comment, + [232] = 1, + ACTIONS(79), 3, + ts_builtin_sym_end, + sym__ident_base, + sym_comment, + [238] = 2, ACTIONS(15), 1, - sym__ident_regex, - STATE(21), 1, - sym_identifier, - STATE(11), 2, - sym_sub_identifier, - aux_sym_identifier_repeat1, - [1834] = 2, - ACTIONS(294), 1, - anon_sym_DOT, - STATE(51), 1, - sym_sub_identifier, - [1841] = 2, - ACTIONS(296), 1, - anon_sym_DOT, - STATE(64), 1, - sym_sub_identifier, - [1848] = 2, - ACTIONS(296), 1, - anon_sym_DOT, - STATE(57), 1, - sym_sub_identifier, - [1855] = 2, - ACTIONS(294), 1, - anon_sym_DOT, - STATE(50), 1, - sym_sub_identifier, - [1862] = 2, - ACTIONS(294), 1, - anon_sym_DOT, - STATE(48), 1, - sym_sub_identifier, - [1869] = 2, - ACTIONS(298), 1, - aux_sym_connection_token1, - ACTIONS(300), 1, - aux_sym_connection_token3, - [1876] = 2, - ACTIONS(296), 1, - anon_sym_DOT, - STATE(59), 1, - sym_sub_identifier, - [1883] = 2, - ACTIONS(302), 1, - aux_sym_connection_token1, - ACTIONS(304), 1, - aux_sym_connection_token3, - [1890] = 1, - ACTIONS(306), 1, + sym_comment, + ACTIONS(81), 1, + aux_sym_label_token1, + [245] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(83), 1, ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { - [SMALL_STATE(8)] = 0, - [SMALL_STATE(9)] = 40, - [SMALL_STATE(10)] = 68, - [SMALL_STATE(11)] = 108, - [SMALL_STATE(12)] = 136, - [SMALL_STATE(13)] = 173, - [SMALL_STATE(14)] = 198, - [SMALL_STATE(15)] = 235, - [SMALL_STATE(16)] = 258, - [SMALL_STATE(17)] = 295, - [SMALL_STATE(18)] = 332, - [SMALL_STATE(19)] = 357, - [SMALL_STATE(20)] = 394, - [SMALL_STATE(21)] = 422, - [SMALL_STATE(22)] = 442, - [SMALL_STATE(23)] = 470, - [SMALL_STATE(24)] = 490, - [SMALL_STATE(25)] = 510, - [SMALL_STATE(26)] = 538, - [SMALL_STATE(27)] = 566, - [SMALL_STATE(28)] = 594, - [SMALL_STATE(29)] = 614, - [SMALL_STATE(30)] = 639, - [SMALL_STATE(31)] = 656, - [SMALL_STATE(32)] = 673, - [SMALL_STATE(33)] = 690, - [SMALL_STATE(34)] = 715, - [SMALL_STATE(35)] = 740, - [SMALL_STATE(36)] = 765, - [SMALL_STATE(37)] = 790, - [SMALL_STATE(38)] = 815, - [SMALL_STATE(39)] = 840, - [SMALL_STATE(40)] = 865, - [SMALL_STATE(41)] = 890, - [SMALL_STATE(42)] = 915, - [SMALL_STATE(43)] = 940, - [SMALL_STATE(44)] = 965, - [SMALL_STATE(45)] = 987, - [SMALL_STATE(46)] = 1009, - [SMALL_STATE(47)] = 1031, - [SMALL_STATE(48)] = 1053, - [SMALL_STATE(49)] = 1075, - [SMALL_STATE(50)] = 1097, - [SMALL_STATE(51)] = 1119, - [SMALL_STATE(52)] = 1141, - [SMALL_STATE(53)] = 1163, - [SMALL_STATE(54)] = 1185, - [SMALL_STATE(55)] = 1204, - [SMALL_STATE(56)] = 1223, - [SMALL_STATE(57)] = 1250, - [SMALL_STATE(58)] = 1269, - [SMALL_STATE(59)] = 1296, - [SMALL_STATE(60)] = 1315, - [SMALL_STATE(61)] = 1334, - [SMALL_STATE(62)] = 1353, - [SMALL_STATE(63)] = 1372, - [SMALL_STATE(64)] = 1389, - [SMALL_STATE(65)] = 1408, - [SMALL_STATE(66)] = 1425, - [SMALL_STATE(67)] = 1444, - [SMALL_STATE(68)] = 1460, - [SMALL_STATE(69)] = 1476, - [SMALL_STATE(70)] = 1492, - [SMALL_STATE(71)] = 1508, - [SMALL_STATE(72)] = 1524, - [SMALL_STATE(73)] = 1540, - [SMALL_STATE(74)] = 1554, - [SMALL_STATE(75)] = 1568, - [SMALL_STATE(76)] = 1583, - [SMALL_STATE(77)] = 1598, - [SMALL_STATE(78)] = 1613, - [SMALL_STATE(79)] = 1628, - [SMALL_STATE(80)] = 1643, - [SMALL_STATE(81)] = 1658, - [SMALL_STATE(82)] = 1673, - [SMALL_STATE(83)] = 1688, - [SMALL_STATE(84)] = 1702, - [SMALL_STATE(85)] = 1716, - [SMALL_STATE(86)] = 1730, - [SMALL_STATE(87)] = 1744, - [SMALL_STATE(88)] = 1758, - [SMALL_STATE(89)] = 1772, - [SMALL_STATE(90)] = 1786, - [SMALL_STATE(91)] = 1800, - [SMALL_STATE(92)] = 1817, - [SMALL_STATE(93)] = 1834, - [SMALL_STATE(94)] = 1841, - [SMALL_STATE(95)] = 1848, - [SMALL_STATE(96)] = 1855, - [SMALL_STATE(97)] = 1862, - [SMALL_STATE(98)] = 1869, - [SMALL_STATE(99)] = 1876, - [SMALL_STATE(100)] = 1883, - [SMALL_STATE(101)] = 1890, + [SMALL_STATE(2)] = 0, + [SMALL_STATE(3)] = 15, + [SMALL_STATE(4)] = 35, + [SMALL_STATE(5)] = 55, + [SMALL_STATE(6)] = 71, + [SMALL_STATE(7)] = 91, + [SMALL_STATE(8)] = 105, + [SMALL_STATE(9)] = 122, + [SMALL_STATE(10)] = 135, + [SMALL_STATE(11)] = 148, + [SMALL_STATE(12)] = 161, + [SMALL_STATE(13)] = 172, + [SMALL_STATE(14)] = 183, + [SMALL_STATE(15)] = 194, + [SMALL_STATE(16)] = 204, + [SMALL_STATE(17)] = 210, + [SMALL_STATE(18)] = 220, + [SMALL_STATE(19)] = 226, + [SMALL_STATE(20)] = 232, + [SMALL_STATE(21)] = 238, + [SMALL_STATE(22)] = 245, }; 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 = false}}, SHIFT(58), - [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), - [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(92), - [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), - [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), - [15] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), - [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), - [19] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_expression_repeat1, 2), - [21] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), - [23] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(11), - [26] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(92), - [29] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(15), - [32] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(24), - [35] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 1), - [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), - [39] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 1), - [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), - [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), - [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96), - [47] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 2), - [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), - [51] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 2), - [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), - [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(80), - [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(93), - [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(43), - [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), - [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(87), - [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), - [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(91), - [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), - [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), - [73] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), - [75] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(13), - [78] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(91), - [81] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(23), - [84] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_expression_repeat1, 2), SHIFT_REPEAT(32), - [87] = {.entry = {.count = 1, .reusable = false}}, SHIFT(35), - [89] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), - [91] = {.entry = {.count = 1, .reusable = false}}, SHIFT(89), - [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(99), - [95] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), - [97] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(58), - [100] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(11), - [103] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(92), - [106] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(15), - [109] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(24), - [112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(11), - [115] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_source_file_repeat1, 2), SHIFT_REPEAT(8), - [118] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_identifier_repeat1, 2), - [120] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_identifier_repeat1, 2), - [122] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_identifier_repeat1, 2), SHIFT_REPEAT(9), - [125] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_identifier_repeat1, 2), SHIFT_REPEAT(92), - [128] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1), - [130] = {.entry = {.count = 1, .reusable = false}}, SHIFT(8), - [132] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1), - [134] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1), - [136] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), - [138] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(56), - [141] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), - [143] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(13), - [146] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(91), - [149] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(23), - [152] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(32), - [155] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_container_repeat1, 2), SHIFT_REPEAT(13), - [158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), - [160] = {.entry = {.count = 1, .reusable = false}}, SHIFT(56), - [162] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), - [164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), - [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection, 1), - [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection, 1), - [170] = {.entry = {.count = 1, .reusable = false}}, SHIFT(98), - [172] = {.entry = {.count = 1, .reusable = false}}, SHIFT(63), - [174] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), - [176] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_identifier_repeat1, 2), SHIFT_REPEAT(18), - [179] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_identifier_repeat1, 2), SHIFT_REPEAT(91), - [182] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), - [184] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), - [186] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), - [188] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_sub_identifier, 2), - [190] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_sub_identifier, 2), - [192] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 6), - [194] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 6), - [196] = {.entry = {.count = 1, .reusable = false}}, SHIFT(81), - [198] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), - [200] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100), - [202] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 3), - [204] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 3), - [206] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), - [208] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), - [210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 4), - [212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 4), - [214] = {.entry = {.count = 1, .reusable = false}}, SHIFT(75), - [216] = {.entry = {.count = 1, .reusable = false}}, SHIFT(39), - [218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 5), - [220] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 5), - [222] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), - [224] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), - [226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_connection, 3), - [228] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_connection, 3), - [230] = {.entry = {.count = 1, .reusable = false}}, SHIFT(83), - [232] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), - [234] = {.entry = {.count = 1, .reusable = false}}, SHIFT(44), - [236] = {.entry = {.count = 1, .reusable = false}}, SHIFT(86), - [238] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), - [240] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 7), - [242] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 7), - [244] = {.entry = {.count = 1, .reusable = false}}, SHIFT(82), - [246] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), - [248] = {.entry = {.count = 1, .reusable = false}}, SHIFT(52), - [250] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), - [252] = {.entry = {.count = 1, .reusable = false}}, SHIFT(45), - [254] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), - [256] = {.entry = {.count = 1, .reusable = false}}, SHIFT(97), - [258] = {.entry = {.count = 1, .reusable = false}}, SHIFT(46), - [260] = {.entry = {.count = 1, .reusable = false}}, SHIFT(88), - [262] = {.entry = {.count = 1, .reusable = false}}, SHIFT(22), - [264] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), - [266] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), - [268] = {.entry = {.count = 1, .reusable = false}}, SHIFT(95), - [270] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), - [272] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), - [274] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 8), - [276] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 8), - [278] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), - [280] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_container, 2), - [282] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_container, 2), - [284] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_container, 3), - [286] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_container, 3), - [288] = {.entry = {.count = 1, .reusable = false}}, SHIFT(90), - [290] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_expression, 9), - [292] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_expression, 9), - [294] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), - [296] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), - [298] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), - [300] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), - [302] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), - [304] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), - [306] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 0, 0, 0), + [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [9] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [11] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident_recursive, 1, 0, 0), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(17), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), + [17] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), + [19] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(2), + [22] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_source_file_repeat1, 2, 0, 0), SHIFT_REPEAT(3), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(16), + [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(16), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [31] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21), + [33] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 1, 0, 0), + [35] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 1, 0, 0), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(15), + [39] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_source_file, 1, 0, 0), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [43] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__ident_recursive, 3, 0, 0), + [45] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__ident_recursive, 3, 0, 0), + [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(19), + [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(19), + [51] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 1, 0, 0), + [53] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field, 1, 0, 0), + [55] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_identifier, 3, 0, 0), + [57] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_identifier, 3, 0, 0), + [59] = {.entry = {.count = 1, .reusable = true}}, SHIFT(18), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(18), + [63] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 2, 0, 0), + [65] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label, 2, 0, 0), + [67] = {.entry = {.count = 1, .reusable = true}}, SHIFT(20), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(20), + [71] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [73] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 2, 0, 0), + [75] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 3, 0, 0), + [77] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 4, 0, 0), + [79] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_declaration, 5, 0, 0), + [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [83] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), }; #ifdef __cplusplus extern "C" { #endif -#ifdef _WIN32 -#define extern __declspec(dllexport) +#ifdef TREE_SITTER_HIDE_SYMBOLS +#define TS_PUBLIC +#elif defined(_WIN32) +#define TS_PUBLIC __declspec(dllexport) +#else +#define TS_PUBLIC __attribute__((visibility("default"))) #endif -extern const TSLanguage *tree_sitter_d2(void) { +TS_PUBLIC const TSLanguage *tree_sitter_d2(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, diff --git a/src/tree_sitter/alloc.h b/src/tree_sitter/alloc.h new file mode 100644 index 0000000..1f4466d --- /dev/null +++ b/src/tree_sitter/alloc.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +// Allow clients to override allocation functions +#ifdef TREE_SITTER_REUSE_ALLOCATOR + +extern void *(*ts_current_malloc)(size_t); +extern void *(*ts_current_calloc)(size_t, size_t); +extern void *(*ts_current_realloc)(void *, size_t); +extern void (*ts_current_free)(void *); + +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#else + +#ifndef ts_malloc +#define ts_malloc malloc +#endif +#ifndef ts_calloc +#define ts_calloc calloc +#endif +#ifndef ts_realloc +#define ts_realloc realloc +#endif +#ifndef ts_free +#define ts_free free +#endif + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/src/tree_sitter/array.h b/src/tree_sitter/array.h new file mode 100644 index 0000000..15a3b23 --- /dev/null +++ b/src/tree_sitter/array.h @@ -0,0 +1,290 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./alloc.h" + +#include +#include +#include +#include +#include + +#ifdef _MSC_VER +#pragma warning(disable : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wunused-variable" +#endif + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +/// Initialize an array. +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +/// Create an empty array. +#define array_new() \ + { NULL, 0, 0 } + +/// Get a pointer to the element at a given `index` in the array. +#define array_get(self, _index) \ + (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) + +/// Get a pointer to the first element in the array. +#define array_front(self) array_get(self, 0) + +/// Get a pointer to the last element in the array. +#define array_back(self) array_get(self, (self)->size - 1) + +/// Clear the array, setting its size to zero. Note that this does not free any +/// memory allocated for the array's contents. +#define array_clear(self) ((self)->size = 0) + +/// Reserve `new_capacity` elements of space in the array. If `new_capacity` is +/// less than the array's current capacity, this function has no effect. +#define array_reserve(self, new_capacity) \ + _array__reserve((Array *)(self), array_elem_size(self), new_capacity) + +/// Free any memory allocated for this array. Note that this does not free any +/// memory allocated for the array's contents. +#define array_delete(self) _array__delete((Array *)(self)) + +/// Push a new `element` onto the end of the array. +#define array_push(self, element) \ + (_array__grow((Array *)(self), 1, array_elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +/// Increase the array's size by `count` elements. +/// New elements are zero-initialized. +#define array_grow_by(self, count) \ + do { \ + if ((count) == 0) break; \ + _array__grow((Array *)(self), count, array_elem_size(self)); \ + memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ + (self)->size += (count); \ + } while (0) + +/// Append all elements from one array to the end of another. +#define array_push_all(self, other) \ + array_extend((self), (other)->size, (other)->contents) + +/// Append `count` elements to the end of the array, reading their values from the +/// `contents` pointer. +#define array_extend(self, count, contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), (self)->size, \ + 0, count, contents \ + ) + +/// Remove `old_count` elements from the array starting at the given `index`. At +/// the same index, insert `new_count` new elements, reading their values from the +/// `new_contents` pointer. +#define array_splice(self, _index, old_count, new_count, new_contents) \ + _array__splice( \ + (Array *)(self), array_elem_size(self), _index, \ + old_count, new_count, new_contents \ + ) + +/// Insert one `element` into the array at the given `index`. +#define array_insert(self, _index, element) \ + _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) + +/// Remove one element from the array at the given `index`. +#define array_erase(self, _index) \ + _array__erase((Array *)(self), array_elem_size(self), _index) + +/// Pop the last element off the array, returning the element by value. +#define array_pop(self) ((self)->contents[--(self)->size]) + +/// Assign the contents of one array to another, reallocating if necessary. +#define array_assign(self, other) \ + _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) + +/// Swap one array with another +#define array_swap(self, other) \ + _array__swap((Array *)(self), (Array *)(other)) + +/// Get the size of the array contents +#define array_elem_size(self) (sizeof *(self)->contents) + +/// Search a sorted array for a given `needle` value, using the given `compare` +/// callback to determine the order. +/// +/// If an existing element is found to be equal to `needle`, then the `index` +/// out-parameter is set to the existing value's index, and the `exists` +/// out-parameter is set to true. Otherwise, `index` is set to an index where +/// `needle` should be inserted in order to preserve the sorting, and `exists` +/// is set to false. +#define array_search_sorted_with(self, compare, needle, _index, _exists) \ + _array__search_sorted(self, 0, compare, , needle, _index, _exists) + +/// Search a sorted array for a given `needle` value, using integer comparisons +/// of a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_with`. +#define array_search_sorted_by(self, field, needle, _index, _exists) \ + _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) + +/// Insert a given `value` into a sorted array, using the given `compare` +/// callback to determine the order. +#define array_insert_sorted_with(self, compare, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +/// Insert a given `value` into a sorted array, using integer comparisons of +/// a given struct field (specified with a leading dot) to determine the order. +/// +/// See also `array_search_sorted_by`. +#define array_insert_sorted_by(self, field, value) \ + do { \ + unsigned _index, _exists; \ + array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ + if (!_exists) array_insert(self, _index, value); \ + } while (0) + +// Private + +typedef Array(void) Array; + +/// This is not what you're looking for, see `array_delete`. +static inline void _array__delete(Array *self) { + if (self->contents) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; + } +} + +/// This is not what you're looking for, see `array_erase`. +static inline void _array__erase(Array *self, size_t element_size, + uint32_t index) { + assert(index < self->size); + char *contents = (char *)self->contents; + memmove(contents + index * element_size, contents + (index + 1) * element_size, + (self->size - index - 1) * element_size); + self->size--; +} + +/// This is not what you're looking for, see `array_reserve`. +static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { + if (new_capacity > self->capacity) { + if (self->contents) { + self->contents = ts_realloc(self->contents, new_capacity * element_size); + } else { + self->contents = ts_malloc(new_capacity * element_size); + } + self->capacity = new_capacity; + } +} + +/// This is not what you're looking for, see `array_assign`. +static inline void _array__assign(Array *self, const Array *other, size_t element_size) { + _array__reserve(self, element_size, other->size); + self->size = other->size; + memcpy(self->contents, other->contents, self->size * element_size); +} + +/// This is not what you're looking for, see `array_swap`. +static inline void _array__swap(Array *self, Array *other) { + Array swap = *other; + *other = *self; + *self = swap; +} + +/// This is not what you're looking for, see `array_push` or `array_grow_by`. +static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { + uint32_t new_size = self->size + count; + if (new_size > self->capacity) { + uint32_t new_capacity = self->capacity * 2; + if (new_capacity < 8) new_capacity = 8; + if (new_capacity < new_size) new_capacity = new_size; + _array__reserve(self, element_size, new_capacity); + } +} + +/// This is not what you're looking for, see `array_splice`. +static inline void _array__splice(Array *self, size_t element_size, + uint32_t index, uint32_t old_count, + uint32_t new_count, const void *elements) { + uint32_t new_size = self->size + new_count - old_count; + uint32_t old_end = index + old_count; + uint32_t new_end = index + new_count; + assert(old_end <= self->size); + + _array__reserve(self, element_size, new_size); + + char *contents = (char *)self->contents; + if (self->size > old_end) { + memmove( + contents + new_end * element_size, + contents + old_end * element_size, + (self->size - old_end) * element_size + ); + } + if (new_count > 0) { + if (elements) { + memcpy( + (contents + index * element_size), + elements, + new_count * element_size + ); + } else { + memset( + (contents + index * element_size), + 0, + new_count * element_size + ); + } + } + self->size += new_count - old_count; +} + +/// A binary search routine, based on Rust's `std::slice::binary_search_by`. +/// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. +#define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ + do { \ + *(_index) = start; \ + *(_exists) = false; \ + uint32_t size = (self)->size - *(_index); \ + if (size == 0) break; \ + int comparison; \ + while (size > 1) { \ + uint32_t half_size = size / 2; \ + uint32_t mid_index = *(_index) + half_size; \ + comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ + if (comparison <= 0) *(_index) = mid_index; \ + size -= half_size; \ + } \ + comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ + if (comparison == 0) *(_exists) = true; \ + else if (comparison < 0) *(_index) += 1; \ + } while (0) + +/// Helper macro for the `_sorted_by` routines below. This takes the left (existing) +/// parameter by reference in order to work with the generic sorting function above. +#define _compare_int(a, b) ((int)*(a) - (int)(b)) + +#ifdef _MSC_VER +#pragma warning(default : 4101) +#elif defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic pop +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/src/tree_sitter/parser.h b/src/tree_sitter/parser.h index 2b14ac1..799f599 100644 --- a/src/tree_sitter/parser.h +++ b/src/tree_sitter/parser.h @@ -13,9 +13,8 @@ extern "C" { #define ts_builtin_sym_end 0 #define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 -typedef uint16_t TSStateId; - #ifndef TREE_SITTER_API_H_ +typedef uint16_t TSStateId; typedef uint16_t TSSymbol; typedef uint16_t TSFieldId; typedef struct TSLanguage TSLanguage; @@ -48,6 +47,7 @@ struct TSLexer { uint32_t (*get_column)(TSLexer *); bool (*is_at_included_range_start)(const TSLexer *); bool (*eof)(const TSLexer *); + void (*log)(const TSLexer *, const char *, ...); }; typedef enum { @@ -87,6 +87,11 @@ typedef union { } entry; } TSParseActionEntry; +typedef struct { + int32_t start; + int32_t end; +} TSCharacterRange; + struct TSLanguage { uint32_t version; uint32_t symbol_count; @@ -126,13 +131,38 @@ struct TSLanguage { const TSStateId *primary_state_ids; }; +static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { + uint32_t index = 0; + uint32_t size = len - index; + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = index + half_size; + TSCharacterRange *range = &ranges[mid_index]; + if (lookahead >= range->start && lookahead <= range->end) { + return true; + } else if (lookahead > range->end) { + index = mid_index; + } + size -= half_size; + } + TSCharacterRange *range = &ranges[index]; + return (lookahead >= range->start && lookahead <= range->end); +} + /* * Lexer Macros */ +#ifdef _MSC_VER +#define UNUSED __pragma(warning(suppress : 4101)) +#else +#define UNUSED __attribute__((unused)) +#endif + #define START_LEXER() \ bool result = false; \ bool skip = false; \ + UNUSED \ bool eof = false; \ int32_t lookahead; \ goto start; \ @@ -148,6 +178,17 @@ struct TSLanguage { goto next_state; \ } +#define ADVANCE_MAP(...) \ + { \ + static const uint16_t map[] = { __VA_ARGS__ }; \ + for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ + if (map[i] == lookahead) { \ + state = map[i + 1]; \ + goto next_state; \ + } \ + } \ + } + #define SKIP(state_value) \ { \ skip = true; \ @@ -166,7 +207,7 @@ struct TSLanguage { * Parse Table Macros */ -#define SMALL_STATE(id) id - LARGE_STATE_COUNT +#define SMALL_STATE(id) ((id) - LARGE_STATE_COUNT) #define STATE(id) id @@ -176,7 +217,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value \ + .state = (state_value) \ } \ }} @@ -184,7 +225,7 @@ struct TSLanguage { {{ \ .shift = { \ .type = TSParseActionTypeShift, \ - .state = state_value, \ + .state = (state_value), \ .repetition = true \ } \ }} @@ -197,14 +238,15 @@ struct TSLanguage { } \ }} -#define REDUCE(symbol_val, child_count_val, ...) \ - {{ \ - .reduce = { \ - .type = TSParseActionTypeReduce, \ - .symbol = symbol_val, \ - .child_count = child_count_val, \ - __VA_ARGS__ \ - }, \ +#define REDUCE(symbol_name, children, precedence, prod_id) \ + {{ \ + .reduce = { \ + .type = TSParseActionTypeReduce, \ + .symbol = symbol_name, \ + .child_count = children, \ + .dynamic_precedence = precedence, \ + .production_id = prod_id \ + }, \ }} #define RECOVER() \ diff --git a/test.html b/test.html new file mode 100644 index 0000000..55bec5a --- /dev/null +++ b/test.html @@ -0,0 +1,24 @@ + + + + Tree-sitter Highlighting + + + + + + + diff --git a/test/corpus/docs/getting_started/hello_world.txt b/test/corpus/docs/getting_started/hello_world.txt new file mode 100644 index 0000000..468610b --- /dev/null +++ b/test/corpus/docs/getting_started/hello_world.txt @@ -0,0 +1,14 @@ +==================||| +Hello World +==================||| + +x -> y: hello world + +---||| + +(source_file + (declaration + (identifier) + (connection) + (identifier) + (label))) diff --git a/test/corpus/docs/getting_started/shapes.txt b/test/corpus/docs/getting_started/shapes.txt new file mode 100644 index 0000000..4cf0f84 --- /dev/null +++ b/test/corpus/docs/getting_started/shapes.txt @@ -0,0 +1,100 @@ +================== +Shapes +================== + +imAShape +im_a_shape +im a shape +i'm a shape +# notice that one-hyphen is not a connection +# whereas, `a--shape` would be a connection +a-shape + +--- + +(source_file + (declaration + (identifier)) + (declaration + (identifier)) + (declaration + (identifier)) + (declaration + (identifier)) + (comment) + (comment) + (declaration + (identifier))) + +================== +Multiple Shapes +================== + +SQLite; Cassandra + +--- + +(source_file + (declaration + (identifier)) + (declaration + (identifier))) + +================== +Shape and Label +================== + +pg: PostgreSQL + +--- + +(source_file + (declaration + (identifier) + (label))) + +================== +Subshape +================== + +Cloud: my cloud +Cloud.shape: cloud + +--- + +(source_file + (declaration + (identifier) + (label)) + (declaration + (identifier + (field)) + (label))) + +================== +Example (summary) +================== + +pg: PostgreSQL +Cloud: my cloud +Cloud.shape: cloud +SQLite +Cassandra + +--- + +(source_file + (declaration + (identifier) + (label)) + (declaration + (identifier) + (label)) + (declaration + (identifier + (field)) + (label)) + (declaration + (identifier)) + (declaration + (identifier)))