diff --git a/Makefile b/Makefile index 890315bb..bb2ba08e 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,9 @@ NAME := zograscope -CXXFLAGS += -std=c++11 -Wall -Wextra -MMD -MP -Isrc/ -Ithird-party/ -DYYDEBUG -CXXFLAGS += -pthread +CFLAGS += -MMD -MP +CFLAGS += -Ithird-party/tree-sitter/include/ -Ithird-party/tree-sitter/src/ +CXXFLAGS += -std=c++11 -Wall -Wextra -DYYDEBUG -pthread +CXXFLAGS += -Isrc/ -Ithird-party/ $(CFLAGS) LDFLAGS += -g -lboost_iostreams -lboost_program_options -lboost_filesystem LDFLAGS += -lboost_system -pthread @@ -81,9 +83,10 @@ rwildcard = $(foreach d,$(wildcard $1*),$(call rwildcard,$d/,$2) \ lib := $(out_dir)/lib$(NAME).a -lib_sources := $(call rwildcard, src/, *.cpp) \ - $(call rwildcard, third-party/, *.cpp) -lib_sources := $(filter-out %.gen.cpp,$(lib_sources)) +lib_sources_cpp := $(call rwildcard, src/, *.cpp) \ + $(call rwildcard, third-party/, *.cpp) +lib_sources_cpp := $(filter-out %.gen.cpp,$(lib_sources_cpp)) +lib_sources_c := $(call rwildcard, third-party/, *.c) lib_autocpp := $(addprefix $(out_dir)/src/c/, \ c11-lexer.gen.cpp c11-parser.gen.cpp) @@ -94,7 +97,8 @@ lib_autohpp := $(addprefix $(out_dir)/src/c/, \ lib_autohpp += $(addprefix $(out_dir)/src/make/, \ make-lexer.gen.hpp make-parser.gen.hpp) -lib_objects := $(sort $(lib_sources:%.cpp=$(out_dir)/%.o) \ +lib_objects := $(sort $(lib_sources_cpp:%.cpp=$(out_dir)/%.o) \ + $(lib_sources_c:%.c=$(out_dir)/%.o) \ $(lib_autocpp:%.cpp=%.o)) lib_depends := $(lib_objects:.o=.d) diff --git a/README.md b/README.md index 24d3be12..33875c04 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ of an experiment, but this situation gets better. | C | C11 and earlier with common extensions, but without K&R syntax | | C++ | C++14 and earlier with common extensions | | GNU Make | Most of the syntax | +| Lua | Version 5.3 | #### C #### @@ -98,6 +99,14 @@ Note the following: some tuning, this should happen over time (Makefiles aren't changed that often) +#### Lua #### + +Newly added (March 2021) with very little testing so far. However, the +language is small and simple enough to not pose much difficulties. + +Note the following: + * non-5.3 versions might still work, albeit can produce worse results + #### Other #### More languages should be added in the future, maybe with external parsers that @@ -265,6 +274,8 @@ custom allocators. [TinyXML2][tinyxml2] is used for parsing XML. +[tree-sitter][tree-sitter] is used for parsing of some languages. + [Catch2][catch] is used for tests. ### References ### @@ -297,6 +308,7 @@ Kaizhong Zhang and Dennis Shasha. [dtl]: https://github.com/cubicdaiya/dtl [pmr]: https://github.com/phalpern/CppCon2017Code [tinyxml2]: https://github.com/leethomason/tinyxml2 +[tree-sitter]: https://tree-sitter.github.io/ [catch]: https://github.com/catchorg/Catch2 [cd]: http://www.merlin.uzh.ch/publication/show/2531 diff --git a/src/Language.cpp b/src/Language.cpp index c2fe330f..f40d6f8c 100644 --- a/src/Language.cpp +++ b/src/Language.cpp @@ -30,6 +30,7 @@ #include "c/C11Language.hpp" #include "make/MakeLanguage.hpp" #include "srcml/cxx/SrcmlCxxLanguage.hpp" +#include "ts/lua/TSLuaLanguage.hpp" #include "tree.hpp" namespace fs = boost::filesystem; @@ -61,6 +62,9 @@ Language::create(const std::string &fileName, const std::string &l) if (lang == "cxx" || lang == "srcml:cxx") { return std::unique_ptr(new SrcmlCxxLanguage()); } + if (lang == "lua" || lang == "ts:lua") { + return std::unique_ptr(new TsLuaLanguage()); + } if (lang == "make") { return std::unique_ptr(new MakeLanguage()); } @@ -99,6 +103,10 @@ detectLanguage(const std::string &stem, const std::string &ext) return "cxx"; } + if (ext == ".lua") { + return "lua"; + } + using boost::algorithm::ends_with; if (ends_with(stem, "makefile") || ext == ".mk" || ext == ".mak") { return "make"; diff --git a/src/STree.cpp b/src/STree.cpp index 1ec452a1..cd08f234 100644 --- a/src/STree.cpp +++ b/src/STree.cpp @@ -59,13 +59,16 @@ print(const PNode *node, const std::string &contents, Language &lang) Decoration labelHi = 78_fg + bold; Decoration stypeHi = 222_fg; + Decoration badStypeHi = 88_bg; trees::print(std::cout, node, [&](std::ostream &os, const PNode *node) { + bool badSType = (node->stype == SType{} && !node->children.empty()); + os << (labelHi << '`' << contents.substr(node->value.from, node->value.len) << '`') << ", " - << (stypeHi << lang.toString(node->stype)) + << ((badSType ? badStypeHi : stypeHi) << lang.toString(node->stype)) << '\n'; }); } diff --git a/src/tree.hpp b/src/tree.hpp index cc81c993..c4c670c9 100644 --- a/src/tree.hpp +++ b/src/tree.hpp @@ -64,8 +64,8 @@ struct Node State state : 8; bool satellite : 1; // Decorative element or node whose match was finalized. bool moved : 1; - bool last : 1; - bool leaf : 1; + bool last : 1; // This is root of a tree from the last layer. + bool leaf : 1; // This node corresponds to something in the source. Node(allocator_type al = {}) : children(al), diff --git a/src/ts/TSTransformer.cpp b/src/ts/TSTransformer.cpp new file mode 100644 index 00000000..9da432c2 --- /dev/null +++ b/src/ts/TSTransformer.cpp @@ -0,0 +1,213 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +#include "TSTransformer.hpp" + +#include +#include +#include +#include + +#include +#include "tree_sitter/api.h" + +#include "TreeBuilder.hpp" +#include "types.hpp" + +// XXX: hard-coded width of a tabulation character. +const int tabWidth = 4; + +static void updatePosition(boost::string_ref str, int &line, int &col); +static bool isSeparator(Type type); + +TSTransformer::TSTransformer(const std::string &contents, + const TSLanguage &tsLanguage, + TreeBuilder &tb, + const std::unordered_map &stypes, + const std::unordered_map &types, + bool debug) + : contents(contents), tsLanguage(tsLanguage), tb(tb), stypes(stypes), + types(types), debug(debug) +{ } + +void +TSTransformer::transform() +{ + std::unique_ptr parser(ts_parser_new(), + &ts_parser_delete); + ts_parser_set_language(parser.get(), &tsLanguage); + + std::unique_ptr tree( + ts_parser_parse_string(parser.get(), NULL, + contents.c_str(), contents.size()), + &ts_tree_delete + ); + if (tree == nullptr) { + throw std::runtime_error("Failed to build a tree"); + } + + position = 0; + line = 1; + col = 1; + + tb.setRoot(visit(ts_tree_root_node(tree.get()))); + + if (debug) { + for (const std::string &type : badSTypes) { + std::cout << "(TSTransformer) No SType for: " << type << '\n'; + } + for (const std::string &type : badTypes) { + std::cout << "(TSTransformer) No Type for: " << type << '\n'; + } + } +} + +PNode * +TSTransformer::visit(const TSNode &node) +{ + SType stype = {}; + const char *type = ts_node_type(node); + auto it = stypes.find(type); + if (it != stypes.end()) { + stype = it->second; + } else if (debug) { + uint32_t from = ts_node_start_byte(node); + uint32_t to = ts_node_end_byte(node); + boost::string_ref val(contents.c_str() + from, to - from); + badSTypes.insert(type + (": `" + val.to_string() + '`')); + } + + PNode *pnode = tb.addNode({}, stype); + + uint32_t childCount = ts_node_child_count(node); + for (uint32_t i = 0; i < childCount; ++i) { + const TSNode child = ts_node_child(node, i); + if (ts_node_child_count(child) == 0) { + SType stype = {}; + auto it = stypes.find(ts_node_type(child)); + if (it != stypes.end()) { + stype = it->second; + } + + visitLeaf(stype, pnode, child); + } else { + tb.append(pnode, visit(child)); + } + } + + return pnode; +} + +void +TSTransformer::visitLeaf(SType stype, PNode *pnode, const TSNode &leaf) +{ + uint32_t from = ts_node_start_byte(leaf); + uint32_t to = ts_node_end_byte(leaf); + + boost::string_ref skipped(contents.c_str() + position, from - position); + updatePosition(skipped, line, col); + + boost::string_ref val(contents.c_str() + from, to - from); + Type type = determineType(leaf); + + if (stype == SType{} && isSeparator(type)) { + stype = stypes.at("separator"); + } + + const std::uint32_t len = to - from; + tb.append(pnode, tb.addNode(Text{from, len, 0, 0, static_cast(type)}, + Location{line, col, 0, 0}, stype)); + + updatePosition(val, line, col); + position = to; +} + +// Goes over characters in the string and updates line and column accordingly. +static void +updatePosition(boost::string_ref str, int &line, int &col) +{ + while (!str.empty()) { + switch (str.front()) { + case '\n': + ++line; + col = 1; + break; + case '\t': + col += tabWidth - (col - 1)%tabWidth; + break; + + default: + ++col; + break; + } + str.remove_prefix(1); + } +} + +Type +TSTransformer::determineType(const TSNode &node) +{ + const char *type = ts_node_type(node); + auto it = types.find(type); + if (it != types.cend()) { + return it->second; + } + + if (debug) { + uint32_t from = ts_node_start_byte(node); + uint32_t to = ts_node_end_byte(node); + boost::string_ref val(contents.c_str() + from, to - from); + badTypes.insert(type + (": `" + val.to_string() + '`')); + } + + return Type::Other; +} + +// Determines whether type is a separator. +static bool +isSeparator(Type type) +{ + switch (type) { + case Type::Jumps: + case Type::Types: + case Type::LeftBrackets: + case Type::RightBrackets: + case Type::Comparisons: + case Type::Operators: + case Type::LogicalOperators: + case Type::Assignments: + case Type::Keywords: + case Type::Other: + return true; + + case Type::Virtual: + case Type::Functions: + case Type::UserTypes: + case Type::Identifiers: + case Type::Specifiers: + case Type::Directives: + case Type::Comments: + case Type::StrConstants: + case Type::IntConstants: + case Type::FPConstants: + case Type::CharConstants: + case Type::NonInterchangeable: + return false; + } + + assert(false && "Unhandled enumeration item"); + return false; +} diff --git a/src/ts/TSTransformer.hpp b/src/ts/TSTransformer.hpp new file mode 100644 index 00000000..c140b846 --- /dev/null +++ b/src/ts/TSTransformer.hpp @@ -0,0 +1,70 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +#ifndef ZOGRASCOPE__TS__TSTRANSFORMER_HPP__ +#define ZOGRASCOPE__TS__TSTRANSFORMER_HPP__ + +#include +#include +#include + +#include "tree_sitter/api.h" + +class PNode; +class TreeBuilder; + +enum class SType : std::uint8_t; +enum class Type : std::uint8_t; + +// Uses tree-sitter to parse a file and transforms the result into PTree. +class TSTransformer +{ +public: + // Remembers parameters to use them later. `contents`, `styles` and `types` + // have to be lvalues. + TSTransformer(const std::string &contents, const TSLanguage &tsLanguage, + TreeBuilder &tb, + const std::unordered_map &stypes, + const std::unordered_map &types, + bool debug); + +public: + // Does all the work of transforming. + void transform(); + +private: + // Transforms a single node. + PNode * visit(const TSNode &node); + // Transforms a leaf. + void visitLeaf(SType stype, PNode *pnode, const TSNode &leaf); + // Determines type of a child of the specified node. + Type determineType(const TSNode &node); + +private: + const std::string &contents; // Contents to parse. + const TSLanguage &tsLanguage; // Language to use. + TreeBuilder &tb; // Result builder. + const std::unordered_map &stypes; // Node type -> SType. + const std::unordered_map &types; // Node type -> Type. + std::unordered_set badSTypes; // Missing stypes. + std::unordered_set badTypes; // Missing types. + int line; // Current line. + int col; // Current column. + uint32_t position; // Parsing position. + bool debug; // Debugging state. +}; + +#endif // ZOGRASCOPE__TS__TSTRANSFORMER_HPP__ diff --git a/src/ts/lua/TSLuaLanguage.cpp b/src/ts/lua/TSLuaLanguage.cpp new file mode 100644 index 00000000..aba3059f --- /dev/null +++ b/src/ts/lua/TSLuaLanguage.cpp @@ -0,0 +1,427 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +#include "ts/lua/TSLuaLanguage.hpp" + +#include + +#include "ts/lua/TSLuaSType.hpp" +#include "ts/TSTransformer.hpp" +#include "TreeBuilder.hpp" +#include "mtypes.hpp" +#include "tree.hpp" +#include "types.hpp" + +using namespace tslua; + +extern "C" const TSLanguage *tree_sitter_lua(void); + +TsLuaLanguage::TsLuaLanguage() : tsLanguage(*tree_sitter_lua()) +{ + stypes = { + { "separator", +TSLuaSType::Separator }, + { "comment", +TSLuaSType::Comment }, + + { "program", +TSLuaSType::Program }, + + { "function", +TSLuaSType::Function }, + { "function_definition", +TSLuaSType::Function }, + { "local_function", +TSLuaSType::Function }, + { "function_name", +TSLuaSType::FunctionName }, + { "function_name_field", +TSLuaSType::FunctionName }, + { "function_body", +TSLuaSType::FunctionBody }, + { "parameters", +TSLuaSType::Parameters }, + { "parameter", +TSLuaSType::Parameter }, + + { "function_call", +TSLuaSType::FunctionCall }, + { "function_call_statement", +TSLuaSType::CallStatement }, + { "arguments", +TSLuaSType::Arguments }, + + { "local_variable_declaration_statement", +TSLuaSType::DeclStatement }, + { "variable_declaration_statement", +TSLuaSType::DeclStatement }, + { "local_variable_declaration", +TSLuaSType::VariableDecl }, + { "variable_declaration", +TSLuaSType::VariableDecl }, + { "variable_declarator", +TSLuaSType::VariableDeclarator }, + + { "unary_operation", +TSLuaSType::UnaryOperation }, + { "binary_operation", +TSLuaSType::BinaryOperation }, + + { "expression", +TSLuaSType::Expression }, + { "condition_expression", +TSLuaSType::ConditionExpression }, + { "loop_expression", +TSLuaSType::LoopExpression }, + { "field_expression", +TSLuaSType::FieldExpression }, + + { "if_statement", +TSLuaSType::IfStatement }, + { "elseif", +TSLuaSType::ElseIfStatement }, + { "else", +TSLuaSType::ElseStatement }, + + { "do_statement", +TSLuaSType::DoStatement }, + { "repeat_statement", +TSLuaSType::RepeatStatement }, + { "while_statement", +TSLuaSType::WhileStatement }, + { "for_in_statement", +TSLuaSType::ForInStatement }, + { "for_statement", +TSLuaSType::ForStatement }, + + { "goto_statement", +TSLuaSType::GotoStatement }, + { "label_statement", +TSLuaSType::LabelStatement }, + { "return_statement", +TSLuaSType::ReturnStatement }, + + { "table", +TSLuaSType::Table }, + { "field", +TSLuaSType::Field }, + { "quoted_field", +TSLuaSType::QuotedField }, + + { "global_variable", +TSLuaSType::GlobalVariable }, + + { "not", +TSLuaSType::UnaryOperator }, + { "and", +TSLuaSType::BinaryOperator }, + { "or", +TSLuaSType::BinaryOperator }, + }; + + types = { + { "local", Type::Specifiers }, + + { "comment", Type::Comments }, + + { "function", Type::Keywords }, + { "while", Type::Keywords }, + { "repeat", Type::Keywords }, + { "until", Type::Keywords }, + { "if", Type::Keywords }, + { "then", Type::Keywords }, + { "else", Type::Keywords }, + { "elseif", Type::Keywords }, + { "end", Type::Keywords }, + { "for", Type::Keywords }, + { "in", Type::Keywords }, + { "do", Type::Keywords }, + { "true", Type::Keywords }, + { "false", Type::Keywords }, + { "return", Type::Keywords }, + { "nil", Type::Keywords }, + + { "break_statement", Type::Jumps }, + { "next", Type::Jumps }, + { "goto", Type::Jumps }, + + { "number", Type::IntConstants }, + { "string", Type::StrConstants }, + + { "method", Type::Functions }, + + { "_G", Type::Identifiers }, + { "_VERSION", Type::Identifiers }, + { "self", Type::Identifiers }, + { "identifier", Type::Identifiers }, + { "property_identifier", Type::Identifiers }, + + { "and", Type::Keywords }, + { "or", Type::Keywords }, + { "not", Type::Keywords }, + + { "==", Type::Comparisons }, + { "~=", Type::Comparisons }, + { "<", Type::Comparisons }, + { ">", Type::Comparisons }, + { "<=", Type::Comparisons }, + { ">=", Type::Comparisons }, + + { "~", Type::Operators }, + { "#", Type::Operators }, + { "-", Type::Operators }, + { "+", Type::Operators }, + { "%", Type::Operators }, + { "*", Type::Operators }, + { "/", Type::Operators }, + { "//", Type::Operators }, + { "^", Type::Operators }, + { "|", Type::Operators }, + { "&", Type::Operators }, + { "<<", Type::Operators }, + { ">>", Type::Operators }, + { "..", Type::Operators }, + + { "=", Type::Assignments }, + + { "(", Type::LeftBrackets }, + { "{", Type::LeftBrackets }, + { "[", Type::LeftBrackets }, + + { ")", Type::RightBrackets }, + { "}", Type::RightBrackets }, + { "]", Type::RightBrackets }, + + { ",", Type::Other }, + { ":", Type::Other }, + { "::", Type::Other }, + { ";", Type::Other }, + { ".", Type::Other }, + { "spread", Type::Other }, + }; +} + +Type +TsLuaLanguage::mapToken(int token) const +{ return static_cast(token); } + +TreeBuilder +TsLuaLanguage::parse(const std::string &contents, + const std::string &/*fileName*/, bool debug, + cpp17::pmr::monolithic &mr) const +{ + TreeBuilder tb(mr); + TSTransformer(contents, tsLanguage, tb, stypes, types, debug).transform(); + return tb; +} + +bool +TsLuaLanguage::isTravellingNode(const Node */*x*/) const +{ return false; } + +bool +TsLuaLanguage::hasFixedStructure(const Node */*x*/) const +{ return false; } + +bool +TsLuaLanguage::canBeFlattened(const Node */*parent*/, const Node *child, + int level) const +{ + switch (level) { + case 0: + case 1: + case 2: + return false; + default: + return -child->stype != TSLuaSType::FunctionCall + && -child->stype != TSLuaSType::VariableDecl + && -child->stype != TSLuaSType::Parameter; + } +} + +bool +TsLuaLanguage::isUnmovable(const Node */*x*/) const +{ return false; } + +bool +TsLuaLanguage::isContainer(const Node *x) const +{ + return -x->stype == TSLuaSType::FunctionBody + || -x->stype == TSLuaSType::DoStatement; +} + +bool +TsLuaLanguage::isDiffable(const Node *x) const +{ return Language::isDiffable(x); } + +bool +TsLuaLanguage::isStructural(const Node *x) const +{ + return Language::isStructural(x) + || x->label == "end" + || x->label == "," + || x->label == ";"; +} + +bool +TsLuaLanguage::isEolContinuation(const Node */*x*/) const +{ return false; } + +bool +TsLuaLanguage::alwaysMatches(const Node *x) const +{ return (-x->stype == TSLuaSType::Program); } + +bool +TsLuaLanguage::isPseudoParameter(const Node */*x*/) const +{ return false; } + +bool +TsLuaLanguage::shouldSplice(SType parent, const Node *childNode) const +{ + TSLuaSType child = -childNode->stype; + + // Splice all but first BinaryOperation node of a nesting chain. + if (-parent == TSLuaSType::BinaryOperation && + child == TSLuaSType::BinaryOperation) { + bool oneLevel = true; + const Node *n = (childNode->next && !childNode->next->last) + ? childNode->next + : childNode; + for (const Node *node : n->children) { + if (-node->stype == TSLuaSType::BinaryOperation) { + oneLevel = false; + break; + } + } + if (!oneLevel) { + return true; + } + } + + if (child == TSLuaSType::Parameters || + child == TSLuaSType::Arguments) { + return true; + } + return false; +} + +bool +TsLuaLanguage::isValueNode(SType stype) const +{ + return -stype == TSLuaSType::ConditionExpression + || -stype == TSLuaSType::LoopExpression; +} + +bool +TsLuaLanguage::isLayerBreak(SType /*parent*/, SType stype) const +{ + return -stype == TSLuaSType::FunctionCall + || -stype == TSLuaSType::Function + || -stype == TSLuaSType::VariableDecl + || -stype == TSLuaSType::Field + || -stype == TSLuaSType::Parameter + || -stype == TSLuaSType::ReturnStatement + || -stype == TSLuaSType::UnaryOperation + || -stype == TSLuaSType::BinaryOperation + || isValueNode(stype); +} + +bool +TsLuaLanguage::shouldDropLeadingWS(SType /*stype*/) const +{ return false; } + +bool +TsLuaLanguage::isSatellite(SType stype) const +{ return (-stype == TSLuaSType::Separator); } + +MType +TsLuaLanguage::classify(SType stype) const +{ + switch (-stype) { + case TSLuaSType::VariableDecl: + return MType::Declaration; + + case TSLuaSType::IfStatement: + case TSLuaSType::ElseIfStatement: + case TSLuaSType::ElseStatement: + case TSLuaSType::RepeatStatement: + case TSLuaSType::WhileStatement: + case TSLuaSType::ForInStatement: + case TSLuaSType::ForStatement: + case TSLuaSType::GotoStatement: + case TSLuaSType::LabelStatement: + case TSLuaSType::ReturnStatement: + case TSLuaSType::CallStatement: + case TSLuaSType::DeclStatement: + return MType::Statement; + + case TSLuaSType::Function: + return MType::Function; + + case TSLuaSType::FunctionCall: + return MType::Call; + + case TSLuaSType::Parameter: + return MType::Parameter; + + case TSLuaSType::Comment: + return MType::Comment; + + case TSLuaSType::FunctionBody: + case TSLuaSType::DoStatement: + return MType::Block; + + default: + return MType::Other; + } +} + +const char * +TsLuaLanguage::toString(SType stype) const +{ + switch (-stype) { + case TSLuaSType::None: return "TSLuaSType::None"; + + case TSLuaSType::Separator: return "TSLuaSType::Separator"; + case TSLuaSType::Comment: return "TSLuaSType::Comment"; + + case TSLuaSType::Program: return "TSLuaSType::Program"; + + case TSLuaSType::Function: return "TSLuaSType::Function"; + case TSLuaSType::FunctionName: return "TSLuaSType::FunctionName"; + case TSLuaSType::FunctionBody: return "TSLuaSType::FunctionBody"; + case TSLuaSType::Parameters: return "TSLuaSType::Parameters"; + case TSLuaSType::Parameter: return "TSLuaSType::Parameter"; + + case TSLuaSType::FunctionCall: return "TSLuaSType::FunctionCall"; + case TSLuaSType::Arguments: return "TSLuaSType::Arguments"; + + case TSLuaSType::VariableDecl: return "TSLuaSType::VariableDecl"; + case TSLuaSType::VariableDeclarator: + return "TSLuaSType::VariableDeclarator"; + + case TSLuaSType::UnaryOperation: + return "TSLuaSType::UnaryOperation"; + case TSLuaSType::BinaryOperation: + return "TSLuaSType::BinaryOperation"; + + case TSLuaSType::Expression: return "TSLuaSType::Expression"; + case TSLuaSType::ConditionExpression: + return "TSLuaSType::ConditionExpression"; + case TSLuaSType::LoopExpression: + return "TSLuaSType::LoopExpression"; + case TSLuaSType::FieldExpression: + return "TSLuaSType::FieldExpression"; + + case TSLuaSType::IfStatement: return "TSLuaSType::IfStatement"; + case TSLuaSType::ElseIfStatement: + return "TSLuaSType::ElseIfStatement"; + case TSLuaSType::ElseStatement: + return "TSLuaSType::ElseStatement"; + + case TSLuaSType::DoStatement: return "TSLuaSType::DoStatement"; + case TSLuaSType::RepeatStatement: + return "TSLuaSType::RepeatStatement"; + case TSLuaSType::WhileStatement: + return "TSLuaSType::WhileStatement"; + case TSLuaSType::ForInStatement: + return "TSLuaSType::ForInStatement"; + case TSLuaSType::ForStatement: return "TSLuaSType::ForStatement"; + + case TSLuaSType::GotoStatement: + return "TSLuaSType::GotoStatement"; + case TSLuaSType::LabelStatement: + return "TSLuaSType::LabelStatement"; + case TSLuaSType::ReturnStatement: + return "TSLuaSType::ReturnStatement"; + case TSLuaSType::CallStatement: + return "TSLuaSType::CallStatement"; + case TSLuaSType::DeclStatement: + return "TSLuaSType::DeclStatement"; + + case TSLuaSType::Table: return "TSLuaSType::Table"; + case TSLuaSType::Field: return "TSLuaSType::Field"; + case TSLuaSType::QuotedField: return "TSLuaSType::QuotedField"; + + case TSLuaSType::GlobalVariable: + return "TSLuaSType::GlobalVariable"; + + case TSLuaSType::UnaryOperator: + return "TSLuaSType::UnaryOperator"; + case TSLuaSType::BinaryOperator: + return "TSLuaSType::BinaryOperator"; + } + + assert(false && "Unhandled enumeration item"); + return ""; +} diff --git a/src/ts/lua/TSLuaLanguage.hpp b/src/ts/lua/TSLuaLanguage.hpp new file mode 100644 index 00000000..0b847ab0 --- /dev/null +++ b/src/ts/lua/TSLuaLanguage.hpp @@ -0,0 +1,93 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +#ifndef ZOGRASCOPE__TS__LUA__TSLUALANGUAGE_HPP__ +#define ZOGRASCOPE__TS__LUA__TSLUALANGUAGE_HPP__ + +#include + +#include "Language.hpp" + +struct TSLanguage; + +// Lua-specific routines. +class TsLuaLanguage : public Language +{ +public: + // Initializes Lua-specific data. + TsLuaLanguage(); + +public: + // Maps language-specific token to an element of Type enumeration. + virtual Type mapToken(int token) const override; + // Parses source file into a tree. + virtual TreeBuilder parse(const std::string &contents, + const std::string &fileName, + bool debug, + cpp17::pmr::monolithic &mr) const override; + + // Checks whether node doesn't have fixed position within a tree and can + // move between internal nodes as long as post-order of leafs is preserved. + virtual bool isTravellingNode(const Node *x) const override; + // Checks whether the node enforces fixed structure (fixed number of + // children at particular places). + virtual bool hasFixedStructure(const Node *x) const override; + // Checks whether a node can be flattened on a specific level of flattening. + virtual bool canBeFlattened(const Node *parent, const Node *child, + int level) const override; + // Checks whether a node should be considered for a move. + virtual bool isUnmovable(const Node *x) const override; + // Checks whether a node is a container. + virtual bool isContainer(const Node *x) const override; + // Checks whether spelling of a node can be diffed. + virtual bool isDiffable(const Node *x) const override; + // Checks whether a node represents a structural (auxiliary, like braces) + // token. + virtual bool isStructural(const Node *x) const override; + // Checks whether a node represents a token used to declare line + // continuation. + virtual bool isEolContinuation(const Node *x) const override; + // Checks whether a node always matches another node with the same stype. + virtual bool alwaysMatches(const Node *x) const override; + // Checks whether parameter node (as reported by `classify()`) represents a + // true parameter and not something like "no argument list". + virtual bool isPseudoParameter(const Node *x) const override; + // Checks whether child node needs to be replaced in its parent with its + // children. + virtual bool shouldSplice(SType parent, + const Node *childNode) const override; + // Checks whether the type corresponds to a value node. + virtual bool isValueNode(SType stype) const override; + // Checks whether this node with its descendants should be placed one level + // deeper. + virtual bool isLayerBreak(SType parent, SType stype) const override; + // Checks whether leading space in spelling of nodes of this kind should be + // skipped for the purposes of comparison. + virtual bool shouldDropLeadingWS(SType stype) const override; + // Checks whether nodes of this kind are secondary for comparison. + virtual bool isSatellite(SType stype) const override; + // Maps language-specific stype to generic mtype. + virtual MType classify(SType stype) const override; + // Stringifies value of SType enumeration. + virtual const char * toString(SType stype) const override; + +private: + const TSLanguage &tsLanguage; // Language description. + std::unordered_map stypes; // Maps nodes to STypes. + std::unordered_map types; // Maps nodes to Types. +}; + +#endif // ZOGRASCOPE__TS__LUA__TSLUALANGUAGE_HPP__ diff --git a/src/ts/lua/TSLuaSType.hpp b/src/ts/lua/TSLuaSType.hpp new file mode 100644 index 00000000..bc300699 --- /dev/null +++ b/src/ts/lua/TSLuaSType.hpp @@ -0,0 +1,99 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +#ifndef ZOGRASCOPE__TS__LUA__TSLUASTYPE_HPP__ +#define ZOGRASCOPE__TS__LUA__TSLUASTYPE_HPP__ + +#include + +enum class SType : std::uint8_t; + +// The namespace is necessary to avoid ODR violation for negation operator. +namespace tslua { + +// Lua-specific STypes. +enum class TSLuaSType : std::uint8_t +{ + None, + + Separator, + Comment, + + Program, + + Function, + FunctionName, + FunctionBody, + Parameters, + Parameter, + + FunctionCall, + Arguments, + + VariableDecl, + VariableDeclarator, + + UnaryOperation, + BinaryOperation, + + Expression, + ConditionExpression, + LoopExpression, + FieldExpression, + + IfStatement, + ElseIfStatement, + ElseStatement, + + DoStatement, + RepeatStatement, + WhileStatement, + ForInStatement, + ForStatement, + + GotoStatement, + LabelStatement, + ReturnStatement, + CallStatement, + DeclStatement, + + Table, + Field, + QuotedField, + + GlobalVariable, + + UnaryOperator, + BinaryOperator, +}; + +// "Conversion operator": TSLuaSType -> SType. +constexpr SType +operator+(TSLuaSType stype) +{ + return static_cast(stype); +} + +// "Conversion operator": SType -> TSLuaSType. +constexpr TSLuaSType +operator-(SType stype) +{ + return static_cast(stype); +} + +} + +#endif // ZOGRASCOPE__TS__LUA__TSLUASTYPE_HPP__ diff --git a/tests/Language.cpp b/tests/Language.cpp index 87f2f9b8..b8d77d4f 100644 --- a/tests/Language.cpp +++ b/tests/Language.cpp @@ -42,6 +42,12 @@ static std::string makeFile = R"( all: $(target1) target2 )"; +static std::string luaFile = R"( + local function func(arg, ...) + return arg + end +)"; + TEST_CASE("Language can be forced", "[language]") { cpp17::pmr::monolithic mr; @@ -136,6 +142,13 @@ TEST_CASE("Make is detected", "[language]") CHECK_FALSE(lang->parse(makeFile, "", false, mr).hasFailed()); } +TEST_CASE("Lua is detected", "[language]") +{ + cpp17::pmr::monolithic mr; + std::unique_ptr lang = Language::create("file.lua"); + CHECK_FALSE(lang->parse(luaFile, "", false, mr).hasFailed()); +} + TEST_CASE("Language matching", "[language]") { SECTION("Matching against any supported language") @@ -144,6 +157,7 @@ TEST_CASE("Language matching", "[language]") CHECK(Language::matches("file.c", "")); CHECK(Language::matches("file.h", "")); CHECK(Language::matches("file.cpp", "")); + CHECK(Language::matches("file.lua", "")); } SECTION("Matching against any specific languages") @@ -151,16 +165,20 @@ TEST_CASE("Language matching", "[language]") CHECK(Language::matches("Makefile", "make")); CHECK(Language::matches("file.c", "c")); CHECK(Language::matches("file.cpp", "cxx")); + CHECK(Language::matches("file.lua", "lua")); CHECK_FALSE(Language::matches("Makefile", "cxx")); CHECK_FALSE(Language::matches("file.c", "make")); CHECK_FALSE(Language::matches("file.cpp", "c")); + CHECK_FALSE(Language::matches("file.h", "lua")); } SECTION("Headers") { CHECK(Language::matches("file.h", "c")); CHECK(Language::matches("file.h", "cxx")); + CHECK_FALSE(Language::matches("file.h", "make")); + CHECK_FALSE(Language::matches("file.h", "lua")); } } diff --git a/tests/tests.cpp b/tests/tests.cpp index 76e489cb..ad08251b 100644 --- a/tests/tests.cpp +++ b/tests/tests.cpp @@ -127,6 +127,12 @@ parseCxx(const std::string &str) return parse("test-input.cpp", str, true); } +Tree +parseLua(const std::string &str) +{ + return parse("test-input.lua", str, true); +} + // Parses source into a tree. static Tree parse(const std::string &fileName, const std::string &str, bool coarse) @@ -285,6 +291,13 @@ diffSrcmlCxx(const std::string &left, const std::string &right) return diffSources(left, right, true, "test-input.cpp", "/// "); } +#undef diffTsLua +std::string +diffTsLua(const std::string &left, const std::string &right) +{ + return diffSources(left, right, true, "test-input.lua", "--- "); +} + // Compares two sources with expectation being embedded in them in form of // trailing markers. Returns difference report. static std::string diff --git a/tests/tests.hpp b/tests/tests.hpp index 59a86647..e103f533 100644 --- a/tests/tests.hpp +++ b/tests/tests.hpp @@ -116,6 +116,9 @@ Tree parseMake(const std::string &str); // Parses C++ source into a tree. Tree parseCxx(const std::string &str); +// Parses Lua source into a tree. +Tree parseLua(const std::string &str); + // Finds the first node of specified type which has a matching value of its // label (or any label if `label` is an empty string). const Node * findNode(const Tree &tree, Type type, @@ -167,6 +170,16 @@ std::string diffSrcmlCxx(const std::string &left, const std::string &right); reportDiffFailure(difference); \ } while (false) +// Compares two Lua sources with expectation being embedded in them in form of +// trailing `--- ` markers. Returns difference report. +std::string diffTsLua(const std::string &left, const std::string &right); +// This is a wrapper that makes reported failure point be somewhere in the test. +#define diffTsLua(left, right) do { \ + std::string difference = diffTsLua((left), (right)); \ + CHECK(difference.empty()); \ + reportDiffFailure(difference); \ + } while (false) + // Prints report. This function is needed to make our custom output appear // after Catch's failure report. void reportDiffFailure(const std::string &report); diff --git a/tests/tooling/Matcher.cpp b/tests/tooling/Matcher.cpp index 1d03177a..ec2c22e6 100644 --- a/tests/tooling/Matcher.cpp +++ b/tests/tooling/Matcher.cpp @@ -47,6 +47,11 @@ TEST_CASE("Comment matcher works", "[tooling][matcher][.srcml]") CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); CHECK(nMatches == 3); } + SECTION("In Lua") { + Tree tree = parseLua("--[[a]] --[[b]]"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 2); + } } TEST_CASE("Directive matcher works", "[tooling][matcher][.srcml]") @@ -96,6 +101,11 @@ TEST_CASE("Statement matcher works", "[tooling][matcher][.srcml]") CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); CHECK(nMatches == 3); } + SECTION("In Lua") { + Tree tree = parseLua("function f() a() v = b() c() end"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 3); + } } TEST_CASE("Block matcher works", "[tooling][matcher][.srcml]") @@ -118,6 +128,11 @@ TEST_CASE("Block matcher works", "[tooling][matcher][.srcml]") CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); CHECK(nMatches == 4); } + SECTION("In Lua") { + Tree tree = parseLua("function f() do end end"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 2); + } } TEST_CASE("Call matcher works", "[tooling][matcher][.srcml]") @@ -145,4 +160,63 @@ TEST_CASE("Call matcher works", "[tooling][matcher][.srcml]") CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); CHECK(nMatches == 3); } + SECTION("In Lua") { + Tree tree = parseLua("call1() call2()"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 2); + } +} + +TEST_CASE("Parameter matcher works", "[tooling][matcher][.srcml]") +{ + Matcher matcher(MType::Parameter, nullptr); + + int nMatches = 0; + + auto matchHandler = [&](Node */*node*/) { + ++nMatches; + }; + + SECTION("In C") { + Tree tree = parseC("void f(int a1, int a2, int a3, int a4) { }", true); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } + SECTION("In C++") { + Tree tree = parseCxx("void f(int a1, int a2, int a3, int a4) { }"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } + SECTION("In Lua") { + Tree tree = parseLua("function f(a1, a2, a3, a4) ; end"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } +} + +TEST_CASE("Declaration matcher works", "[tooling][matcher][.srcml]") +{ + Matcher matcher(MType::Declaration, nullptr); + + int nMatches = 0; + + auto matchHandler = [&](Node */*node*/) { + ++nMatches; + }; + + SECTION("In C") { + Tree tree = parseC("int a1; int a2; int a3; int a4;", true); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } + SECTION("In C++") { + Tree tree = parseCxx("int a1; int a2; int a3; int a4;"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } + SECTION("In Lua") { + Tree tree = parseLua("a1 = 1; a2 = 2; a3 = 3; a4 = 4"); + CHECK(matcher.match(tree.getRoot(), *tree.getLanguage(), matchHandler)); + CHECK(nMatches == 4); + } } diff --git a/tests/ts/lua/ts-lua-diffing.cpp b/tests/ts/lua/ts-lua-diffing.cpp new file mode 100644 index 00000000..1fd16270 --- /dev/null +++ b/tests/ts/lua/ts-lua-diffing.cpp @@ -0,0 +1,42 @@ +// Copyright (C) 2021 xaizek +// +// This file is part of zograscope. +// +// zograscope is free software: you can redistribute it and/or modify +// it under the terms of version 3 of the GNU Affero General Public License as +// published by the Free Software Foundation. +// +// zograscope is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. +// +// You should have received a copy of the GNU Affero General Public License +// along with zograscope. If not, see . + +// These are tests of comparison and all of its phases. + +#include "Catch/catch.hpp" + +#include "tests.hpp" + +TEST_CASE("Lua functions are matched", "[ts-lua][comparison]") +{ + diffTsLua(R"( + function f(a) + a.call() + b.call() --- Deletions + end + + function g(a) + end + )", R"( + function f(a) + a.call() + end + + function g(a) + b.call() --- Additions + end + )"); +} diff --git a/third-party/tree-sitter/include/tree_sitter/api.h b/third-party/tree-sitter/include/tree_sitter/api.h new file mode 100644 index 00000000..caa05f52 --- /dev/null +++ b/third-party/tree-sitter/include/tree_sitter/api.h @@ -0,0 +1,882 @@ +#ifndef TREE_SITTER_API_H_ +#define TREE_SITTER_API_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include + +/****************************/ +/* Section - ABI Versioning */ +/****************************/ + +/** + * The latest ABI version that is supported by the current version of the + * library. When Languages are generated by the Tree-sitter CLI, they are + * assigned an ABI version number that corresponds to the current CLI version. + * The Tree-sitter library is generally backwards-compatible with languages + * generated using older CLI versions, but is not forwards-compatible. + */ +#define TREE_SITTER_LANGUAGE_VERSION 12 + +/** + * The earliest ABI version that is supported by the current version of the + * library. + */ +#define TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION 9 + +/*******************/ +/* Section - Types */ +/*******************/ + +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +typedef struct TSParser TSParser; +typedef struct TSTree TSTree; +typedef struct TSQuery TSQuery; +typedef struct TSQueryCursor TSQueryCursor; + +typedef enum { + TSInputEncodingUTF8, + TSInputEncodingUTF16, +} TSInputEncoding; + +typedef enum { + TSSymbolTypeRegular, + TSSymbolTypeAnonymous, + TSSymbolTypeAuxiliary, +} TSSymbolType; + +typedef struct { + uint32_t row; + uint32_t column; +} TSPoint; + +typedef struct { + TSPoint start_point; + TSPoint end_point; + uint32_t start_byte; + uint32_t end_byte; +} TSRange; + +typedef struct { + void *payload; + const char *(*read)(void *payload, uint32_t byte_index, TSPoint position, uint32_t *bytes_read); + TSInputEncoding encoding; +} TSInput; + +typedef enum { + TSLogTypeParse, + TSLogTypeLex, +} TSLogType; + +typedef struct { + void *payload; + void (*log)(void *payload, TSLogType, const char *); +} TSLogger; + +typedef struct { + uint32_t start_byte; + uint32_t old_end_byte; + uint32_t new_end_byte; + TSPoint start_point; + TSPoint old_end_point; + TSPoint new_end_point; +} TSInputEdit; + +typedef struct { + uint32_t context[4]; + const void *id; + const TSTree *tree; +} TSNode; + +typedef struct { + const void *tree; + const void *id; + uint32_t context[2]; +} TSTreeCursor; + +typedef struct { + TSNode node; + uint32_t index; +} TSQueryCapture; + +typedef struct { + uint32_t id; + uint16_t pattern_index; + uint16_t capture_count; + const TSQueryCapture *captures; +} TSQueryMatch; + +typedef enum { + TSQueryPredicateStepTypeDone, + TSQueryPredicateStepTypeCapture, + TSQueryPredicateStepTypeString, +} TSQueryPredicateStepType; + +typedef struct { + TSQueryPredicateStepType type; + uint32_t value_id; +} TSQueryPredicateStep; + +typedef enum { + TSQueryErrorNone = 0, + TSQueryErrorSyntax, + TSQueryErrorNodeType, + TSQueryErrorField, + TSQueryErrorCapture, + TSQueryErrorStructure, +} TSQueryError; + +/********************/ +/* Section - Parser */ +/********************/ + +/** + * Create a new parser. + */ +TSParser *ts_parser_new(void); + +/** + * Delete the parser, freeing all of the memory that it used. + */ +void ts_parser_delete(TSParser *parser); + +/** + * Set the language that the parser should use for parsing. + * + * Returns a boolean indicating whether or not the language was successfully + * assigned. True means assignment succeeded. False means there was a version + * mismatch: the language was generated with an incompatible version of the + * Tree-sitter CLI. Check the language's version using `ts_language_version` + * and compare it to this library's `TREE_SITTER_LANGUAGE_VERSION` and + * `TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION` constants. + */ +bool ts_parser_set_language(TSParser *self, const TSLanguage *language); + +/** + * Get the parser's current language. + */ +const TSLanguage *ts_parser_language(const TSParser *self); + +/** + * Set the ranges of text that the parser should include when parsing. + * + * By default, the parser will always include entire documents. This function + * allows you to parse only a *portion* of a document but still return a syntax + * tree whose ranges match up with the document as a whole. You can also pass + * multiple disjoint ranges. + * + * The second and third parameters specify the location and length of an array + * of ranges. The parser does *not* take ownership of these ranges; it copies + * the data, so it doesn't matter how these ranges are allocated. + * + * If `length` is zero, then the entire document will be parsed. Otherwise, + * the given ranges must be ordered from earliest to latest in the document, + * and they must not overlap. That is, the following must hold for all + * `i` < `length - 1`: + * + * ranges[i].end_byte <= ranges[i + 1].start_byte + * + * If this requirement is not satisfied, the operation will fail, the ranges + * will not be assigned, and this function will return `false`. On success, + * this function returns `true` + */ +bool ts_parser_set_included_ranges( + TSParser *self, + const TSRange *ranges, + uint32_t length +); + +/** + * Get the ranges of text that the parser will include when parsing. + * + * The returned pointer is owned by the parser. The caller should not free it + * or write to it. The length of the array will be written to the given + * `length` pointer. + */ +const TSRange *ts_parser_included_ranges( + const TSParser *self, + uint32_t *length +); + +/** + * Use the parser to parse some source code and create a syntax tree. + * + * If you are parsing this document for the first time, pass `NULL` for the + * `old_tree` parameter. Otherwise, if you have already parsed an earlier + * version of this document and the document has since been edited, pass the + * previous syntax tree so that the unchanged parts of it can be reused. + * This will save time and memory. For this to work correctly, you must have + * already edited the old syntax tree using the `ts_tree_edit` function in a + * way that exactly matches the source code changes. + * + * The `TSInput` parameter lets you specify how to read the text. It has the + * following three fields: + * 1. `read`: A function to retrieve a chunk of text at a given byte offset + * and (row, column) position. The function should return a pointer to the + * text and write its length to the `bytes_read` pointer. The parser does + * not take ownership of this buffer; it just borrows it until it has + * finished reading it. The function should write a zero value to the + * `bytes_read` pointer to indicate the end of the document. + * 2. `payload`: An arbitrary pointer that will be passed to each invocation + * of the `read` function. + * 3. `encoding`: An indication of how the text is encoded. Either + * `TSInputEncodingUTF8` or `TSInputEncodingUTF16`. + * + * This function returns a syntax tree on success, and `NULL` on failure. There + * are three possible reasons for failure: + * 1. The parser does not have a language assigned. Check for this using the + `ts_parser_language` function. + * 2. Parsing was cancelled due to a timeout that was set by an earlier call to + * the `ts_parser_set_timeout_micros` function. You can resume parsing from + * where the parser left out by calling `ts_parser_parse` again with the + * same arguments. Or you can start parsing from scratch by first calling + * `ts_parser_reset`. + * 3. Parsing was cancelled using a cancellation flag that was set by an + * earlier call to `ts_parser_set_cancellation_flag`. You can resume parsing + * from where the parser left out by calling `ts_parser_parse` again with + * the same arguments. + */ +TSTree *ts_parser_parse( + TSParser *self, + const TSTree *old_tree, + TSInput input +); + +/** + * Use the parser to parse some source code stored in one contiguous buffer. + * The first two parameters are the same as in the `ts_parser_parse` function + * above. The second two parameters indicate the location of the buffer and its + * length in bytes. + */ +TSTree *ts_parser_parse_string( + TSParser *self, + const TSTree *old_tree, + const char *string, + uint32_t length +); + +/** + * Use the parser to parse some source code stored in one contiguous buffer with + * a given encoding. The first four parameters work the same as in the + * `ts_parser_parse_string` method above. The final parameter indicates whether + * the text is encoded as UTF8 or UTF16. + */ +TSTree *ts_parser_parse_string_encoding( + TSParser *self, + const TSTree *old_tree, + const char *string, + uint32_t length, + TSInputEncoding encoding +); + +/** + * Instruct the parser to start the next parse from the beginning. + * + * If the parser previously failed because of a timeout or a cancellation, then + * by default, it will resume where it left off on the next call to + * `ts_parser_parse` or other parsing functions. If you don't want to resume, + * and instead intend to use this parser to parse some other document, you must + * call `ts_parser_reset` first. + */ +void ts_parser_reset(TSParser *self); + +/** + * Set the maximum duration in microseconds that parsing should be allowed to + * take before halting. + * + * If parsing takes longer than this, it will halt early, returning NULL. + * See `ts_parser_parse` for more information. + */ +void ts_parser_set_timeout_micros(TSParser *self, uint64_t timeout); + +/** + * Get the duration in microseconds that parsing is allowed to take. + */ +uint64_t ts_parser_timeout_micros(const TSParser *self); + +/** + * Set the parser's current cancellation flag pointer. + * + * If a non-null pointer is assigned, then the parser will periodically read + * from this pointer during parsing. If it reads a non-zero value, it will + * halt early, returning NULL. See `ts_parser_parse` for more information. + */ +void ts_parser_set_cancellation_flag(TSParser *self, const size_t *flag); + +/** + * Get the parser's current cancellation flag pointer. + */ +const size_t *ts_parser_cancellation_flag(const TSParser *self); + +/** + * Set the logger that a parser should use during parsing. + * + * The parser does not take ownership over the logger payload. If a logger was + * previously assigned, the caller is responsible for releasing any memory + * owned by the previous logger. + */ +void ts_parser_set_logger(TSParser *self, TSLogger logger); + +/** + * Get the parser's current logger. + */ +TSLogger ts_parser_logger(const TSParser *self); + +/** + * Set the file descriptor to which the parser should write debugging graphs + * during parsing. The graphs are formatted in the DOT language. You may want + * to pipe these graphs directly to a `dot(1)` process in order to generate + * SVG output. You can turn off this logging by passing a negative number. + */ +void ts_parser_print_dot_graphs(TSParser *self, int file); + +/******************/ +/* Section - Tree */ +/******************/ + +/** + * Create a shallow copy of the syntax tree. This is very fast. + * + * You need to copy a syntax tree in order to use it on more than one thread at + * a time, as syntax trees are not thread safe. + */ +TSTree *ts_tree_copy(const TSTree *self); + +/** + * Delete the syntax tree, freeing all of the memory that it used. + */ +void ts_tree_delete(TSTree *self); + +/** + * Get the root node of the syntax tree. + */ +TSNode ts_tree_root_node(const TSTree *self); + +/** + * Get the language that was used to parse the syntax tree. + */ +const TSLanguage *ts_tree_language(const TSTree *); + +/** + * Edit the syntax tree to keep it in sync with source code that has been + * edited. + * + * You must describe the edit both in terms of byte offsets and in terms of + * (row, column) coordinates. + */ +void ts_tree_edit(TSTree *self, const TSInputEdit *edit); + +/** + * Compare an old edited syntax tree to a new syntax tree representing the same + * document, returning an array of ranges whose syntactic structure has changed. + * + * For this to work correctly, the old syntax tree must have been edited such + * that its ranges match up to the new tree. Generally, you'll want to call + * this function right after calling one of the `ts_parser_parse` functions. + * You need to pass the old tree that was passed to parse, as well as the new + * tree that was returned from that function. + * + * The returned array is allocated using `malloc` and the caller is responsible + * for freeing it using `free`. The length of the array will be written to the + * given `length` pointer. + */ +TSRange *ts_tree_get_changed_ranges( + const TSTree *old_tree, + const TSTree *new_tree, + uint32_t *length +); + +/** + * Write a DOT graph describing the syntax tree to the given file. + */ +void ts_tree_print_dot_graph(const TSTree *, FILE *); + +/******************/ +/* Section - Node */ +/******************/ + +/** + * Get the node's type as a null-terminated string. + */ +const char *ts_node_type(TSNode); + +/** + * Get the node's type as a numerical id. + */ +TSSymbol ts_node_symbol(TSNode); + +/** + * Get the node's start byte. + */ +uint32_t ts_node_start_byte(TSNode); + +/** + * Get the node's start position in terms of rows and columns. + */ +TSPoint ts_node_start_point(TSNode); + +/** + * Get the node's end byte. + */ +uint32_t ts_node_end_byte(TSNode); + +/** + * Get the node's end position in terms of rows and columns. + */ +TSPoint ts_node_end_point(TSNode); + +/** + * Get an S-expression representing the node as a string. + * + * This string is allocated with `malloc` and the caller is responsible for + * freeing it using `free`. + */ +char *ts_node_string(TSNode); + +/** + * Check if the node is null. Functions like `ts_node_child` and + * `ts_node_next_sibling` will return a null node to indicate that no such node + * was found. + */ +bool ts_node_is_null(TSNode); + +/** + * Check if the node is *named*. Named nodes correspond to named rules in the + * grammar, whereas *anonymous* nodes correspond to string literals in the + * grammar. + */ +bool ts_node_is_named(TSNode); + +/** + * Check if the node is *missing*. Missing nodes are inserted by the parser in + * order to recover from certain kinds of syntax errors. + */ +bool ts_node_is_missing(TSNode); + +/** + * Check if the node is *extra*. Extra nodes represent things like comments, + * which are not required the grammar, but can appear anywhere. + */ +bool ts_node_is_extra(TSNode); + +/** + * Check if a syntax node has been edited. + */ +bool ts_node_has_changes(TSNode); + +/** + * Check if the node is a syntax error or contains any syntax errors. + */ +bool ts_node_has_error(TSNode); + +/** + * Get the node's immediate parent. + */ +TSNode ts_node_parent(TSNode); + +/** + * Get the node's child at the given index, where zero represents the first + * child. + */ +TSNode ts_node_child(TSNode, uint32_t); + +/** + * Get the node's number of children. + */ +uint32_t ts_node_child_count(TSNode); + +/** + * Get the node's *named* child at the given index. + * + * See also `ts_node_is_named`. + */ +TSNode ts_node_named_child(TSNode, uint32_t); + +/** + * Get the node's number of *named* children. + * + * See also `ts_node_is_named`. + */ +uint32_t ts_node_named_child_count(TSNode); + +/** + * Get the node's child with the given field name. + */ +TSNode ts_node_child_by_field_name( + TSNode self, + const char *field_name, + uint32_t field_name_length +); + +/** + * Get the node's child with the given numerical field id. + * + * You can convert a field name to an id using the + * `ts_language_field_id_for_name` function. + */ +TSNode ts_node_child_by_field_id(TSNode, TSFieldId); + +/** + * Get the node's next / previous sibling. + */ +TSNode ts_node_next_sibling(TSNode); +TSNode ts_node_prev_sibling(TSNode); + +/** + * Get the node's next / previous *named* sibling. + */ +TSNode ts_node_next_named_sibling(TSNode); +TSNode ts_node_prev_named_sibling(TSNode); + +/** + * Get the node's first child that extends beyond the given byte offset. + */ +TSNode ts_node_first_child_for_byte(TSNode, uint32_t); + +/** + * Get the node's first named child that extends beyond the given byte offset. + */ +TSNode ts_node_first_named_child_for_byte(TSNode, uint32_t); + +/** + * Get the smallest node within this node that spans the given range of bytes + * or (row, column) positions. + */ +TSNode ts_node_descendant_for_byte_range(TSNode, uint32_t, uint32_t); +TSNode ts_node_descendant_for_point_range(TSNode, TSPoint, TSPoint); + +/** + * Get the smallest named node within this node that spans the given range of + * bytes or (row, column) positions. + */ +TSNode ts_node_named_descendant_for_byte_range(TSNode, uint32_t, uint32_t); +TSNode ts_node_named_descendant_for_point_range(TSNode, TSPoint, TSPoint); + +/** + * Edit the node to keep it in-sync with source code that has been edited. + * + * This function is only rarely needed. When you edit a syntax tree with the + * `ts_tree_edit` function, all of the nodes that you retrieve from the tree + * afterward will already reflect the edit. You only need to use `ts_node_edit` + * when you have a `TSNode` instance that you want to keep and continue to use + * after an edit. + */ +void ts_node_edit(TSNode *, const TSInputEdit *); + +/** + * Check if two nodes are identical. + */ +bool ts_node_eq(TSNode, TSNode); + +/************************/ +/* Section - TreeCursor */ +/************************/ + +/** + * Create a new tree cursor starting from the given node. + * + * A tree cursor allows you to walk a syntax tree more efficiently than is + * possible using the `TSNode` functions. It is a mutable object that is always + * on a certain syntax node, and can be moved imperatively to different nodes. + */ +TSTreeCursor ts_tree_cursor_new(TSNode); + +/** + * Delete a tree cursor, freeing all of the memory that it used. + */ +void ts_tree_cursor_delete(TSTreeCursor *); + +/** + * Re-initialize a tree cursor to start at a different node. + */ +void ts_tree_cursor_reset(TSTreeCursor *, TSNode); + +/** + * Get the tree cursor's current node. + */ +TSNode ts_tree_cursor_current_node(const TSTreeCursor *); + +/** + * Get the field name of the tree cursor's current node. + * + * This returns `NULL` if the current node doesn't have a field. + * See also `ts_node_child_by_field_name`. + */ +const char *ts_tree_cursor_current_field_name(const TSTreeCursor *); + +/** + * Get the field name of the tree cursor's current node. + * + * This returns zero if the current node doesn't have a field. + * See also `ts_node_child_by_field_id`, `ts_language_field_id_for_name`. + */ +TSFieldId ts_tree_cursor_current_field_id(const TSTreeCursor *); + +/** + * Move the cursor to the parent of its current node. + * + * This returns `true` if the cursor successfully moved, and returns `false` + * if there was no parent node (the cursor was already on the root node). + */ +bool ts_tree_cursor_goto_parent(TSTreeCursor *); + +/** + * Move the cursor to the next sibling of its current node. + * + * This returns `true` if the cursor successfully moved, and returns `false` + * if there was no next sibling node. + */ +bool ts_tree_cursor_goto_next_sibling(TSTreeCursor *); + +/** + * Move the cursor to the first child of its current node. + * + * This returns `true` if the cursor successfully moved, and returns `false` + * if there were no children. + */ +bool ts_tree_cursor_goto_first_child(TSTreeCursor *); + +/** + * Move the cursor to the first child of its current node that extends beyond + * the given byte offset. + * + * This returns the index of the child node if one was found, and returns -1 + * if no such child was found. + */ +int64_t ts_tree_cursor_goto_first_child_for_byte(TSTreeCursor *, uint32_t); + +TSTreeCursor ts_tree_cursor_copy(const TSTreeCursor *); + +/*******************/ +/* Section - Query */ +/*******************/ + +/** + * Create a new query from a string containing one or more S-expression + * patterns. The query is associated with a particular language, and can + * only be run on syntax nodes parsed with that language. + * + * If all of the given patterns are valid, this returns a `TSQuery`. + * If a pattern is invalid, this returns `NULL`, and provides two pieces + * of information about the problem: + * 1. The byte offset of the error is written to the `error_offset` parameter. + * 2. The type of error is written to the `error_type` parameter. + */ +TSQuery *ts_query_new( + const TSLanguage *language, + const char *source, + uint32_t source_len, + uint32_t *error_offset, + TSQueryError *error_type +); + +/** + * Delete a query, freeing all of the memory that it used. + */ +void ts_query_delete(TSQuery *); + +/** + * Get the number of patterns, captures, or string literals in the query. + */ +uint32_t ts_query_pattern_count(const TSQuery *); +uint32_t ts_query_capture_count(const TSQuery *); +uint32_t ts_query_string_count(const TSQuery *); + +/** + * Get the byte offset where the given pattern starts in the query's source. + * + * This can be useful when combining queries by concatenating their source + * code strings. + */ +uint32_t ts_query_start_byte_for_pattern(const TSQuery *, uint32_t); + +/** + * Get all of the predicates for the given pattern in the query. + * + * The predicates are represented as a single array of steps. There are three + * types of steps in this array, which correspond to the three legal values for + * the `type` field: + * - `TSQueryPredicateStepTypeCapture` - Steps with this type represent names + * of captures. Their `value_id` can be used with the + * `ts_query_capture_name_for_id` function to obtain the name of the capture. + * - `TSQueryPredicateStepTypeString` - Steps with this type represent literal + * strings. Their `value_id` can be used with the + * `ts_query_string_value_for_id` function to obtain their string value. + * - `TSQueryPredicateStepTypeDone` - Steps with this type are *sentinels* + * that represent the end of an individual predicate. If a pattern has two + * predicates, then there will be two steps with this `type` in the array. + */ +const TSQueryPredicateStep *ts_query_predicates_for_pattern( + const TSQuery *self, + uint32_t pattern_index, + uint32_t *length +); + +bool ts_query_step_is_definite( + const TSQuery *self, + uint32_t byte_offset +); + +/** + * Get the name and length of one of the query's captures, or one of the + * query's string literals. Each capture and string is associated with a + * numeric id based on the order that it appeared in the query's source. + */ +const char *ts_query_capture_name_for_id( + const TSQuery *, + uint32_t id, + uint32_t *length +); +const char *ts_query_string_value_for_id( + const TSQuery *, + uint32_t id, + uint32_t *length +); + +/** + * Disable a certain capture within a query. + * + * This prevents the capture from being returned in matches, and also avoids + * any resource usage associated with recording the capture. Currently, there + * is no way to undo this. + */ +void ts_query_disable_capture(TSQuery *, const char *, uint32_t); + +/** + * Disable a certain pattern within a query. + * + * This prevents the pattern from matching and removes most of the overhead + * associated with the pattern. Currently, there is no way to undo this. + */ +void ts_query_disable_pattern(TSQuery *, uint32_t); + +/** + * Create a new cursor for executing a given query. + * + * The cursor stores the state that is needed to iteratively search + * for matches. To use the query cursor, first call `ts_query_cursor_exec` + * to start running a given query on a given syntax node. Then, there are + * two options for consuming the results of the query: + * 1. Repeatedly call `ts_query_cursor_next_match` to iterate over all of the + * *matches* in the order that they were found. Each match contains the + * index of the pattern that matched, and an array of captures. Because + * multiple patterns can match the same set of nodes, one match may contain + * captures that appear *before* some of the captures from a previous match. + * 2. Repeatedly call `ts_query_cursor_next_capture` to iterate over all of the + * individual *captures* in the order that they appear. This is useful if + * don't care about which pattern matched, and just want a single ordered + * sequence of captures. + * + * If you don't care about consuming all of the results, you can stop calling + * `ts_query_cursor_next_match` or `ts_query_cursor_next_capture` at any point. + * You can then start executing another query on another node by calling + * `ts_query_cursor_exec` again. + */ +TSQueryCursor *ts_query_cursor_new(void); + +/** + * Delete a query cursor, freeing all of the memory that it used. + */ +void ts_query_cursor_delete(TSQueryCursor *); + +/** + * Start running a given query on a given node. + */ +void ts_query_cursor_exec(TSQueryCursor *, const TSQuery *, TSNode); + +/** + * Set the range of bytes or (row, column) positions in which the query + * will be executed. + */ +void ts_query_cursor_set_byte_range(TSQueryCursor *, uint32_t, uint32_t); +void ts_query_cursor_set_point_range(TSQueryCursor *, TSPoint, TSPoint); + +/** + * Advance to the next match of the currently running query. + * + * If there is a match, write it to `*match` and return `true`. + * Otherwise, return `false`. + */ +bool ts_query_cursor_next_match(TSQueryCursor *, TSQueryMatch *match); +void ts_query_cursor_remove_match(TSQueryCursor *, uint32_t id); + +/** + * Advance to the next capture of the currently running query. + * + * If there is a capture, write its match to `*match` and its index within + * the matche's capture list to `*capture_index`. Otherwise, return `false`. + */ +bool ts_query_cursor_next_capture( + TSQueryCursor *, + TSQueryMatch *match, + uint32_t *capture_index +); + +/**********************/ +/* Section - Language */ +/**********************/ + +/** + * Get the number of distinct node types in the language. + */ +uint32_t ts_language_symbol_count(const TSLanguage *); + +/** + * Get a node type string for the given numerical id. + */ +const char *ts_language_symbol_name(const TSLanguage *, TSSymbol); + +/** + * Get the numerical id for the given node type string. + */ +TSSymbol ts_language_symbol_for_name( + const TSLanguage *self, + const char *string, + uint32_t length, + bool is_named +); + +/** + * Get the number of distinct field names in the language. + */ +uint32_t ts_language_field_count(const TSLanguage *); + +/** + * Get the field name string for the given numerical id. + */ +const char *ts_language_field_name_for_id(const TSLanguage *, TSFieldId); + +/** + * Get the numerical id for the given field name string. + */ +TSFieldId ts_language_field_id_for_name(const TSLanguage *, const char *, uint32_t); + +/** + * Check whether the given node type id belongs to named nodes, anonymous nodes, + * or a hidden nodes. + * + * See also `ts_node_is_named`. Hidden nodes are never returned from the API. + */ +TSSymbolType ts_language_symbol_type(const TSLanguage *, TSSymbol); + +/** + * Get the ABI version number for this language. This version number is used + * to ensure that languages were generated by a compatible version of + * Tree-sitter. + * + * See also `ts_parser_set_language`. + */ +uint32_t ts_language_version(const TSLanguage *); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_API_H_ diff --git a/third-party/tree-sitter/include/tree_sitter/parser.h b/third-party/tree-sitter/include/tree_sitter/parser.h new file mode 100644 index 00000000..c5a788ff --- /dev/null +++ b/third-party/tree-sitter/include/tree_sitter/parser.h @@ -0,0 +1,238 @@ +#ifndef TREE_SITTER_PARSER_H_ +#define TREE_SITTER_PARSER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#define ts_builtin_sym_error ((TSSymbol)-1) +#define ts_builtin_sym_end 0 +#define TREE_SITTER_SERIALIZATION_BUFFER_SIZE 1024 + +#ifndef TREE_SITTER_API_H_ +typedef uint16_t TSSymbol; +typedef uint16_t TSFieldId; +typedef struct TSLanguage TSLanguage; +#endif + +typedef struct { + TSFieldId field_id; + uint8_t child_index; + bool inherited; +} TSFieldMapEntry; + +typedef struct { + uint16_t index; + uint16_t length; +} TSFieldMapSlice; + +typedef uint16_t TSStateId; + +typedef struct { + bool visible : 1; + bool named : 1; + bool supertype: 1; +} TSSymbolMetadata; + +typedef struct TSLexer TSLexer; + +struct TSLexer { + int32_t lookahead; + TSSymbol result_symbol; + void (*advance)(TSLexer *, bool); + void (*mark_end)(TSLexer *); + uint32_t (*get_column)(TSLexer *); + bool (*is_at_included_range_start)(const TSLexer *); + bool (*eof)(const TSLexer *); +}; + +typedef enum { + TSParseActionTypeShift, + TSParseActionTypeReduce, + TSParseActionTypeAccept, + TSParseActionTypeRecover, +} TSParseActionType; + +typedef struct { + union { + struct { + TSStateId state; + bool extra : 1; + bool repetition : 1; + } shift; + struct { + TSSymbol symbol; + int16_t dynamic_precedence; + uint8_t child_count; + uint8_t production_id; + } reduce; + } params; + TSParseActionType type : 4; +} TSParseAction; + +typedef struct { + uint16_t lex_state; + uint16_t external_lex_state; +} TSLexMode; + +typedef union { + TSParseAction action; + struct { + uint8_t count; + bool reusable : 1; + } entry; +} TSParseActionEntry; + +struct TSLanguage { + uint32_t version; + uint32_t symbol_count; + uint32_t alias_count; + uint32_t token_count; + uint32_t external_token_count; + const char **symbol_names; + const TSSymbolMetadata *symbol_metadata; + const uint16_t *parse_table; + const TSParseActionEntry *parse_actions; + const TSLexMode *lex_modes; + const TSSymbol *alias_sequences; + uint16_t max_alias_sequence_length; + bool (*lex_fn)(TSLexer *, TSStateId); + bool (*keyword_lex_fn)(TSLexer *, TSStateId); + TSSymbol keyword_capture_token; + struct { + const bool *states; + const TSSymbol *symbol_map; + void *(*create)(void); + void (*destroy)(void *); + bool (*scan)(void *, TSLexer *, const bool *symbol_whitelist); + unsigned (*serialize)(void *, char *); + void (*deserialize)(void *, const char *, unsigned); + } external_scanner; + uint32_t field_count; + const TSFieldMapSlice *field_map_slices; + const TSFieldMapEntry *field_map_entries; + const char **field_names; + uint32_t large_state_count; + const uint16_t *small_parse_table; + const uint32_t *small_parse_table_map; + const TSSymbol *public_symbol_map; + const uint16_t *alias_map; + uint32_t state_count; +}; + +/* + * Lexer Macros + */ + +#define START_LEXER() \ + bool result = false; \ + bool skip = false; \ + bool eof = false; \ + int32_t lookahead; \ + goto start; \ + next_state: \ + lexer->advance(lexer, skip); \ + start: \ + skip = false; \ + lookahead = lexer->lookahead; + +#define ADVANCE(state_value) \ + { \ + state = state_value; \ + goto next_state; \ + } + +#define SKIP(state_value) \ + { \ + skip = true; \ + state = state_value; \ + goto next_state; \ + } + +#define ACCEPT_TOKEN(symbol_value) \ + result = true; \ + lexer->result_symbol = symbol_value; \ + lexer->mark_end(lexer); + +#define END_STATE() return result; + +/* + * Parse Table Macros + */ + +#define SMALL_STATE(id) id - LARGE_STATE_COUNT + +#define STATE(id) id + +#define ACTIONS(id) id + +#define SHIFT(state_value) \ + { \ + { \ + .params = { \ + .shift = { \ + .state = state_value \ + } \ + }, \ + .type = TSParseActionTypeShift \ + } \ + } + +#define SHIFT_REPEAT(state_value) \ + { \ + { \ + .params = { \ + .shift = { \ + .state = state_value, \ + .repetition = true \ + } \ + }, \ + .type = TSParseActionTypeShift \ + } \ + } + +#define RECOVER() \ + { \ + { .type = TSParseActionTypeRecover } \ + } + +#define SHIFT_EXTRA() \ + { \ + { \ + .params = { \ + .shift = { \ + .extra = true \ + } \ + }, \ + .type = TSParseActionTypeShift \ + } \ + } + +#define REDUCE(symbol_val, child_count_val, ...) \ + { \ + { \ + .params = { \ + .reduce = { \ + .symbol = symbol_val, \ + .child_count = child_count_val, \ + __VA_ARGS__ \ + }, \ + }, \ + .type = TSParseActionTypeReduce \ + } \ + } + +#define ACCEPT_INPUT() \ + { \ + { .type = TSParseActionTypeAccept } \ + } + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSER_H_ diff --git a/third-party/tree-sitter/parsers/README.md b/third-party/tree-sitter/parsers/README.md new file mode 100644 index 00000000..53dda841 --- /dev/null +++ b/third-party/tree-sitter/parsers/README.md @@ -0,0 +1,6 @@ +`lua-*` files +============= + +Lua parser is generated from a grammar based on + + https://github.com/Azganoth/tree-sitter-lua diff --git a/third-party/tree-sitter/parsers/lua-parser.c b/third-party/tree-sitter/parsers/lua-parser.c new file mode 100644 index 00000000..96c978b5 --- /dev/null +++ b/third-party/tree-sitter/parsers/lua-parser.c @@ -0,0 +1,42609 @@ +#include + +#if defined(__GNUC__) || defined(__clang__) +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmissing-field-initializers" +#endif + +#define LANGUAGE_VERSION 12 +#define STATE_COUNT 892 +#define LARGE_STATE_COUNT 12 +#define SYMBOL_COUNT 120 +#define ALIAS_COUNT 4 +#define TOKEN_COUNT 64 +#define EXTERNAL_TOKEN_COUNT 2 +#define FIELD_COUNT 1 +#define MAX_ALIAS_SEQUENCE_LENGTH 8 + +enum { + anon_sym_return = 1, + anon_sym_COMMA = 2, + anon_sym_EQ = 3, + anon_sym_local = 4, + anon_sym_LBRACK = 5, + anon_sym_RBRACK = 6, + anon_sym_DOT = 7, + anon_sym_do = 8, + anon_sym_end = 9, + anon_sym_if = 10, + anon_sym_then = 11, + anon_sym_elseif = 12, + anon_sym_else = 13, + anon_sym_while = 14, + anon_sym_repeat = 15, + anon_sym_until = 16, + anon_sym_for = 17, + anon_sym_in = 18, + anon_sym_goto = 19, + sym_break_statement = 20, + anon_sym_COLON_COLON = 21, + anon_sym_SEMI = 22, + anon_sym_function = 23, + anon_sym_COLON = 24, + anon_sym_LPAREN = 25, + anon_sym_RPAREN = 26, + sym_spread = 27, + sym_self = 28, + sym_next = 29, + anon_sym__G = 30, + anon_sym__VERSION = 31, + anon_sym_LBRACE = 32, + anon_sym_RBRACE = 33, + anon_sym_or = 34, + anon_sym_and = 35, + anon_sym_LT = 36, + anon_sym_LT_EQ = 37, + anon_sym_EQ_EQ = 38, + anon_sym_TILDE_EQ = 39, + anon_sym_GT_EQ = 40, + anon_sym_GT = 41, + anon_sym_PIPE = 42, + anon_sym_TILDE = 43, + anon_sym_AMP = 44, + anon_sym_LT_LT = 45, + anon_sym_GT_GT = 46, + anon_sym_PLUS = 47, + anon_sym_DASH = 48, + anon_sym_STAR = 49, + anon_sym_SLASH = 50, + anon_sym_SLASH_SLASH = 51, + anon_sym_PERCENT = 52, + anon_sym_DOT_DOT = 53, + anon_sym_CARET = 54, + anon_sym_not = 55, + anon_sym_POUND = 56, + sym_number = 57, + sym_nil = 58, + sym_true = 59, + sym_false = 60, + sym_identifier = 61, + sym_comment = 62, + sym_string = 63, + sym_program = 64, + sym_return_statement = 65, + sym_variable_declaration_statement = 66, + sym_variable_declaration = 67, + sym_local_variable_declaration_statement = 68, + sym_local_variable_declaration = 69, + sym__variable_declarator = 70, + sym_field_expression = 71, + sym__local_variable_declarator = 72, + sym_do_statement = 73, + sym_if_statement = 74, + sym_elseif = 75, + sym_else = 76, + sym_while_statement = 77, + sym_repeat_statement = 78, + sym_for_statement = 79, + sym_for_in_statement = 80, + sym__loop_expression = 81, + sym__in_loop_expression = 82, + sym_goto_statement = 83, + sym_label_statement = 84, + sym__empty_statement = 85, + sym_function_statement = 86, + sym_local_function_statement = 87, + sym_function_call_statement = 88, + sym_function_call = 89, + sym_arguments = 90, + sym_function_name = 91, + sym_function_name_field = 92, + sym_parameters = 93, + sym__parameter_list = 94, + sym__first_parameter = 95, + sym__comma_identifier = 96, + sym__comma_spread = 97, + sym__spread_param = 98, + sym__function_body = 99, + sym_function_body = 100, + sym__expression = 101, + sym_global_variable = 102, + sym__prefix = 103, + sym_function_definition = 104, + sym_table = 105, + sym_field = 106, + sym_quoted_field = 107, + sym__field_sequence = 108, + sym__field_sep = 109, + sym_binary_operation = 110, + sym_unary_operation = 111, + aux_sym_program_repeat1 = 112, + aux_sym_return_statement_repeat1 = 113, + aux_sym_variable_declaration_repeat1 = 114, + aux_sym__local_variable_declarator_repeat1 = 115, + aux_sym_if_statement_repeat1 = 116, + aux_sym_function_name_field_repeat1 = 117, + aux_sym__parameter_list_repeat1 = 118, + aux_sym__field_sequence_repeat1 = 119, + alias_sym_condition_expression = 120, + alias_sym_expression = 121, + alias_sym_method = 122, + alias_sym_property_identifier = 123, +}; + +static const char *ts_symbol_names[] = { + [ts_builtin_sym_end] = "end", + [anon_sym_return] = "return", + [anon_sym_COMMA] = ",", + [anon_sym_EQ] = "=", + [anon_sym_local] = "local", + [anon_sym_LBRACK] = "[", + [anon_sym_RBRACK] = "]", + [anon_sym_DOT] = ".", + [anon_sym_do] = "do", + [anon_sym_end] = "end", + [anon_sym_if] = "if", + [anon_sym_then] = "then", + [anon_sym_elseif] = "elseif", + [anon_sym_else] = "else", + [anon_sym_while] = "while", + [anon_sym_repeat] = "repeat", + [anon_sym_until] = "until", + [anon_sym_for] = "for", + [anon_sym_in] = "in", + [anon_sym_goto] = "goto", + [sym_break_statement] = "break_statement", + [anon_sym_COLON_COLON] = "::", + [anon_sym_SEMI] = ";", + [anon_sym_function] = "function", + [anon_sym_COLON] = ":", + [anon_sym_LPAREN] = "(", + [anon_sym_RPAREN] = ")", + [sym_spread] = "spread", + [sym_self] = "self", + [sym_next] = "next", + [anon_sym__G] = "_G", + [anon_sym__VERSION] = "_VERSION", + [anon_sym_LBRACE] = "{", + [anon_sym_RBRACE] = "}", + [anon_sym_or] = "or", + [anon_sym_and] = "and", + [anon_sym_LT] = "<", + [anon_sym_LT_EQ] = "<=", + [anon_sym_EQ_EQ] = "==", + [anon_sym_TILDE_EQ] = "~=", + [anon_sym_GT_EQ] = ">=", + [anon_sym_GT] = ">", + [anon_sym_PIPE] = "|", + [anon_sym_TILDE] = "~", + [anon_sym_AMP] = "&", + [anon_sym_LT_LT] = "<<", + [anon_sym_GT_GT] = ">>", + [anon_sym_PLUS] = "+", + [anon_sym_DASH] = "-", + [anon_sym_STAR] = "*", + [anon_sym_SLASH] = "/", + [anon_sym_SLASH_SLASH] = "//", + [anon_sym_PERCENT] = "%", + [anon_sym_DOT_DOT] = "..", + [anon_sym_CARET] = "^", + [anon_sym_not] = "not", + [anon_sym_POUND] = "#", + [sym_number] = "number", + [sym_nil] = "nil", + [sym_true] = "true", + [sym_false] = "false", + [sym_identifier] = "identifier", + [sym_comment] = "comment", + [sym_string] = "string", + [sym_program] = "program", + [sym_return_statement] = "return_statement", + [sym_variable_declaration_statement] = "variable_declaration_statement", + [sym_variable_declaration] = "variable_declaration", + [sym_local_variable_declaration_statement] = "local_variable_declaration_statement", + [sym_local_variable_declaration] = "local_variable_declaration", + [sym__variable_declarator] = "_variable_declarator", + [sym_field_expression] = "field_expression", + [sym__local_variable_declarator] = "variable_declarator", + [sym_do_statement] = "do_statement", + [sym_if_statement] = "if_statement", + [sym_elseif] = "elseif", + [sym_else] = "else", + [sym_while_statement] = "while_statement", + [sym_repeat_statement] = "repeat_statement", + [sym_for_statement] = "for_statement", + [sym_for_in_statement] = "for_in_statement", + [sym__loop_expression] = "loop_expression", + [sym__in_loop_expression] = "loop_expression", + [sym_goto_statement] = "goto_statement", + [sym_label_statement] = "label_statement", + [sym__empty_statement] = "_empty_statement", + [sym_function_statement] = "function", + [sym_local_function_statement] = "local_function", + [sym_function_call_statement] = "function_call_statement", + [sym_function_call] = "function_call", + [sym_arguments] = "arguments", + [sym_function_name] = "function_name", + [sym_function_name_field] = "function_name_field", + [sym_parameters] = "parameters", + [sym__parameter_list] = "_parameter_list", + [sym__first_parameter] = "parameter", + [sym__comma_identifier] = "parameter", + [sym__comma_spread] = "parameter", + [sym__spread_param] = "parameter", + [sym__function_body] = "_function_body", + [sym_function_body] = "function_body", + [sym__expression] = "_expression", + [sym_global_variable] = "global_variable", + [sym__prefix] = "_prefix", + [sym_function_definition] = "function_definition", + [sym_table] = "table", + [sym_field] = "field", + [sym_quoted_field] = "quoted_field", + [sym__field_sequence] = "_field_sequence", + [sym__field_sep] = "_field_sep", + [sym_binary_operation] = "binary_operation", + [sym_unary_operation] = "unary_operation", + [aux_sym_program_repeat1] = "program_repeat1", + [aux_sym_return_statement_repeat1] = "return_statement_repeat1", + [aux_sym_variable_declaration_repeat1] = "variable_declaration_repeat1", + [aux_sym__local_variable_declarator_repeat1] = "_local_variable_declarator_repeat1", + [aux_sym_if_statement_repeat1] = "if_statement_repeat1", + [aux_sym_function_name_field_repeat1] = "function_name_field_repeat1", + [aux_sym__parameter_list_repeat1] = "_parameter_list_repeat1", + [aux_sym__field_sequence_repeat1] = "_field_sequence_repeat1", + [alias_sym_condition_expression] = "condition_expression", + [alias_sym_expression] = "expression", + [alias_sym_method] = "method", + [alias_sym_property_identifier] = "property_identifier", +}; + +static TSSymbol ts_symbol_map[] = { + [ts_builtin_sym_end] = ts_builtin_sym_end, + [anon_sym_return] = anon_sym_return, + [anon_sym_COMMA] = anon_sym_COMMA, + [anon_sym_EQ] = anon_sym_EQ, + [anon_sym_local] = anon_sym_local, + [anon_sym_LBRACK] = anon_sym_LBRACK, + [anon_sym_RBRACK] = anon_sym_RBRACK, + [anon_sym_DOT] = anon_sym_DOT, + [anon_sym_do] = anon_sym_do, + [anon_sym_end] = anon_sym_end, + [anon_sym_if] = anon_sym_if, + [anon_sym_then] = anon_sym_then, + [anon_sym_elseif] = anon_sym_elseif, + [anon_sym_else] = anon_sym_else, + [anon_sym_while] = anon_sym_while, + [anon_sym_repeat] = anon_sym_repeat, + [anon_sym_until] = anon_sym_until, + [anon_sym_for] = anon_sym_for, + [anon_sym_in] = anon_sym_in, + [anon_sym_goto] = anon_sym_goto, + [sym_break_statement] = sym_break_statement, + [anon_sym_COLON_COLON] = anon_sym_COLON_COLON, + [anon_sym_SEMI] = anon_sym_SEMI, + [anon_sym_function] = anon_sym_function, + [anon_sym_COLON] = anon_sym_COLON, + [anon_sym_LPAREN] = anon_sym_LPAREN, + [anon_sym_RPAREN] = anon_sym_RPAREN, + [sym_spread] = sym_spread, + [sym_self] = sym_self, + [sym_next] = sym_next, + [anon_sym__G] = anon_sym__G, + [anon_sym__VERSION] = anon_sym__VERSION, + [anon_sym_LBRACE] = anon_sym_LBRACE, + [anon_sym_RBRACE] = anon_sym_RBRACE, + [anon_sym_or] = anon_sym_or, + [anon_sym_and] = anon_sym_and, + [anon_sym_LT] = anon_sym_LT, + [anon_sym_LT_EQ] = anon_sym_LT_EQ, + [anon_sym_EQ_EQ] = anon_sym_EQ_EQ, + [anon_sym_TILDE_EQ] = anon_sym_TILDE_EQ, + [anon_sym_GT_EQ] = anon_sym_GT_EQ, + [anon_sym_GT] = anon_sym_GT, + [anon_sym_PIPE] = anon_sym_PIPE, + [anon_sym_TILDE] = anon_sym_TILDE, + [anon_sym_AMP] = anon_sym_AMP, + [anon_sym_LT_LT] = anon_sym_LT_LT, + [anon_sym_GT_GT] = anon_sym_GT_GT, + [anon_sym_PLUS] = anon_sym_PLUS, + [anon_sym_DASH] = anon_sym_DASH, + [anon_sym_STAR] = anon_sym_STAR, + [anon_sym_SLASH] = anon_sym_SLASH, + [anon_sym_SLASH_SLASH] = anon_sym_SLASH_SLASH, + [anon_sym_PERCENT] = anon_sym_PERCENT, + [anon_sym_DOT_DOT] = anon_sym_DOT_DOT, + [anon_sym_CARET] = anon_sym_CARET, + [anon_sym_not] = anon_sym_not, + [anon_sym_POUND] = anon_sym_POUND, + [sym_number] = sym_number, + [sym_nil] = sym_nil, + [sym_true] = sym_true, + [sym_false] = sym_false, + [sym_identifier] = sym_identifier, + [sym_comment] = sym_comment, + [sym_string] = sym_string, + [sym_program] = sym_program, + [sym_return_statement] = sym_return_statement, + [sym_variable_declaration_statement] = sym_variable_declaration_statement, + [sym_variable_declaration] = sym_variable_declaration, + [sym_local_variable_declaration_statement] = sym_local_variable_declaration_statement, + [sym_local_variable_declaration] = sym_local_variable_declaration, + [sym__variable_declarator] = sym__variable_declarator, + [sym_field_expression] = sym_field_expression, + [sym__local_variable_declarator] = sym__local_variable_declarator, + [sym_do_statement] = sym_do_statement, + [sym_if_statement] = sym_if_statement, + [sym_elseif] = sym_elseif, + [sym_else] = sym_else, + [sym_while_statement] = sym_while_statement, + [sym_repeat_statement] = sym_repeat_statement, + [sym_for_statement] = sym_for_statement, + [sym_for_in_statement] = sym_for_in_statement, + [sym__loop_expression] = sym__loop_expression, + [sym__in_loop_expression] = sym__loop_expression, + [sym_goto_statement] = sym_goto_statement, + [sym_label_statement] = sym_label_statement, + [sym__empty_statement] = sym__empty_statement, + [sym_function_statement] = sym_function_statement, + [sym_local_function_statement] = sym_local_function_statement, + [sym_function_call_statement] = sym_function_call_statement, + [sym_function_call] = sym_function_call, + [sym_arguments] = sym_arguments, + [sym_function_name] = sym_function_name, + [sym_function_name_field] = sym_function_name_field, + [sym_parameters] = sym_parameters, + [sym__parameter_list] = sym__parameter_list, + [sym__first_parameter] = sym__first_parameter, + [sym__comma_identifier] = sym__first_parameter, + [sym__comma_spread] = sym__first_parameter, + [sym__spread_param] = sym__first_parameter, + [sym__function_body] = sym__function_body, + [sym_function_body] = sym_function_body, + [sym__expression] = sym__expression, + [sym_global_variable] = sym_global_variable, + [sym__prefix] = sym__prefix, + [sym_function_definition] = sym_function_definition, + [sym_table] = sym_table, + [sym_field] = sym_field, + [sym_quoted_field] = sym_quoted_field, + [sym__field_sequence] = sym__field_sequence, + [sym__field_sep] = sym__field_sep, + [sym_binary_operation] = sym_binary_operation, + [sym_unary_operation] = sym_unary_operation, + [aux_sym_program_repeat1] = aux_sym_program_repeat1, + [aux_sym_return_statement_repeat1] = aux_sym_return_statement_repeat1, + [aux_sym_variable_declaration_repeat1] = aux_sym_variable_declaration_repeat1, + [aux_sym__local_variable_declarator_repeat1] = aux_sym__local_variable_declarator_repeat1, + [aux_sym_if_statement_repeat1] = aux_sym_if_statement_repeat1, + [aux_sym_function_name_field_repeat1] = aux_sym_function_name_field_repeat1, + [aux_sym__parameter_list_repeat1] = aux_sym__parameter_list_repeat1, + [aux_sym__field_sequence_repeat1] = aux_sym__field_sequence_repeat1, + [alias_sym_condition_expression] = alias_sym_condition_expression, + [alias_sym_expression] = alias_sym_expression, + [alias_sym_method] = alias_sym_method, + [alias_sym_property_identifier] = alias_sym_property_identifier, +}; + +static const TSSymbolMetadata ts_symbol_metadata[] = { + [ts_builtin_sym_end] = { + .visible = false, + .named = true, + }, + [anon_sym_return] = { + .visible = true, + .named = false, + }, + [anon_sym_COMMA] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_local] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACK] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_do] = { + .visible = true, + .named = false, + }, + [anon_sym_end] = { + .visible = true, + .named = false, + }, + [anon_sym_if] = { + .visible = true, + .named = false, + }, + [anon_sym_then] = { + .visible = true, + .named = false, + }, + [anon_sym_elseif] = { + .visible = true, + .named = false, + }, + [anon_sym_else] = { + .visible = true, + .named = false, + }, + [anon_sym_while] = { + .visible = true, + .named = false, + }, + [anon_sym_repeat] = { + .visible = true, + .named = false, + }, + [anon_sym_until] = { + .visible = true, + .named = false, + }, + [anon_sym_for] = { + .visible = true, + .named = false, + }, + [anon_sym_in] = { + .visible = true, + .named = false, + }, + [anon_sym_goto] = { + .visible = true, + .named = false, + }, + [sym_break_statement] = { + .visible = true, + .named = true, + }, + [anon_sym_COLON_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_SEMI] = { + .visible = true, + .named = false, + }, + [anon_sym_function] = { + .visible = true, + .named = false, + }, + [anon_sym_COLON] = { + .visible = true, + .named = false, + }, + [anon_sym_LPAREN] = { + .visible = true, + .named = false, + }, + [anon_sym_RPAREN] = { + .visible = true, + .named = false, + }, + [sym_spread] = { + .visible = true, + .named = true, + }, + [sym_self] = { + .visible = true, + .named = true, + }, + [sym_next] = { + .visible = true, + .named = true, + }, + [anon_sym__G] = { + .visible = true, + .named = false, + }, + [anon_sym__VERSION] = { + .visible = true, + .named = false, + }, + [anon_sym_LBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_RBRACE] = { + .visible = true, + .named = false, + }, + [anon_sym_or] = { + .visible = true, + .named = false, + }, + [anon_sym_and] = { + .visible = true, + .named = false, + }, + [anon_sym_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_EQ_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_EQ] = { + .visible = true, + .named = false, + }, + [anon_sym_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_PIPE] = { + .visible = true, + .named = false, + }, + [anon_sym_TILDE] = { + .visible = true, + .named = false, + }, + [anon_sym_AMP] = { + .visible = true, + .named = false, + }, + [anon_sym_LT_LT] = { + .visible = true, + .named = false, + }, + [anon_sym_GT_GT] = { + .visible = true, + .named = false, + }, + [anon_sym_PLUS] = { + .visible = true, + .named = false, + }, + [anon_sym_DASH] = { + .visible = true, + .named = false, + }, + [anon_sym_STAR] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_SLASH_SLASH] = { + .visible = true, + .named = false, + }, + [anon_sym_PERCENT] = { + .visible = true, + .named = false, + }, + [anon_sym_DOT_DOT] = { + .visible = true, + .named = false, + }, + [anon_sym_CARET] = { + .visible = true, + .named = false, + }, + [anon_sym_not] = { + .visible = true, + .named = false, + }, + [anon_sym_POUND] = { + .visible = true, + .named = false, + }, + [sym_number] = { + .visible = true, + .named = true, + }, + [sym_nil] = { + .visible = true, + .named = true, + }, + [sym_true] = { + .visible = true, + .named = true, + }, + [sym_false] = { + .visible = true, + .named = true, + }, + [sym_identifier] = { + .visible = true, + .named = true, + }, + [sym_comment] = { + .visible = true, + .named = true, + }, + [sym_string] = { + .visible = true, + .named = true, + }, + [sym_program] = { + .visible = true, + .named = true, + }, + [sym_return_statement] = { + .visible = true, + .named = true, + }, + [sym_variable_declaration_statement] = { + .visible = true, + .named = true, + }, + [sym_variable_declaration] = { + .visible = true, + .named = true, + }, + [sym_local_variable_declaration_statement] = { + .visible = true, + .named = true, + }, + [sym_local_variable_declaration] = { + .visible = true, + .named = true, + }, + [sym__variable_declarator] = { + .visible = false, + .named = true, + }, + [sym_field_expression] = { + .visible = true, + .named = true, + }, + [sym__local_variable_declarator] = { + .visible = true, + .named = true, + }, + [sym_do_statement] = { + .visible = true, + .named = true, + }, + [sym_if_statement] = { + .visible = true, + .named = true, + }, + [sym_elseif] = { + .visible = true, + .named = true, + }, + [sym_else] = { + .visible = true, + .named = true, + }, + [sym_while_statement] = { + .visible = true, + .named = true, + }, + [sym_repeat_statement] = { + .visible = true, + .named = true, + }, + [sym_for_statement] = { + .visible = true, + .named = true, + }, + [sym_for_in_statement] = { + .visible = true, + .named = true, + }, + [sym__loop_expression] = { + .visible = true, + .named = true, + }, + [sym__in_loop_expression] = { + .visible = true, + .named = true, + }, + [sym_goto_statement] = { + .visible = true, + .named = true, + }, + [sym_label_statement] = { + .visible = true, + .named = true, + }, + [sym__empty_statement] = { + .visible = false, + .named = true, + }, + [sym_function_statement] = { + .visible = true, + .named = true, + }, + [sym_local_function_statement] = { + .visible = true, + .named = true, + }, + [sym_function_call_statement] = { + .visible = true, + .named = true, + }, + [sym_function_call] = { + .visible = true, + .named = true, + }, + [sym_arguments] = { + .visible = true, + .named = true, + }, + [sym_function_name] = { + .visible = true, + .named = true, + }, + [sym_function_name_field] = { + .visible = true, + .named = true, + }, + [sym_parameters] = { + .visible = true, + .named = true, + }, + [sym__parameter_list] = { + .visible = false, + .named = true, + }, + [sym__first_parameter] = { + .visible = true, + .named = false, + }, + [sym__comma_identifier] = { + .visible = true, + .named = false, + }, + [sym__comma_spread] = { + .visible = true, + .named = false, + }, + [sym__spread_param] = { + .visible = true, + .named = false, + }, + [sym__function_body] = { + .visible = false, + .named = true, + }, + [sym_function_body] = { + .visible = true, + .named = true, + }, + [sym__expression] = { + .visible = false, + .named = true, + }, + [sym_global_variable] = { + .visible = true, + .named = true, + }, + [sym__prefix] = { + .visible = false, + .named = true, + }, + [sym_function_definition] = { + .visible = true, + .named = true, + }, + [sym_table] = { + .visible = true, + .named = true, + }, + [sym_field] = { + .visible = true, + .named = true, + }, + [sym_quoted_field] = { + .visible = true, + .named = true, + }, + [sym__field_sequence] = { + .visible = false, + .named = true, + }, + [sym__field_sep] = { + .visible = false, + .named = true, + }, + [sym_binary_operation] = { + .visible = true, + .named = true, + }, + [sym_unary_operation] = { + .visible = true, + .named = true, + }, + [aux_sym_program_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_return_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_variable_declaration_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__local_variable_declarator_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_if_statement_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym_function_name_field_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__parameter_list_repeat1] = { + .visible = false, + .named = false, + }, + [aux_sym__field_sequence_repeat1] = { + .visible = false, + .named = false, + }, + [alias_sym_condition_expression] = { + .visible = true, + .named = true, + }, + [alias_sym_expression] = { + .visible = true, + .named = true, + }, + [alias_sym_method] = { + .visible = true, + .named = true, + }, + [alias_sym_property_identifier] = { + .visible = true, + .named = true, + }, +}; + +enum { + field_object = 1, +}; + +static const char *ts_field_names[] = { + [0] = NULL, + [field_object] = "object", +}; + +static const TSFieldMapSlice ts_field_map_slices[12] = { + [2] = {.index = 0, .length = 1}, +}; + +static const TSFieldMapEntry ts_field_map_entries[] = { + [0] = + {field_object, 0}, +}; + +static TSSymbol ts_alias_sequences[12][MAX_ALIAS_SEQUENCE_LENGTH] = { + [0] = {0}, + [1] = { + [0] = alias_sym_expression, + }, + [3] = { + [2] = alias_sym_condition_expression, + }, + [4] = { + [1] = sym__local_variable_declarator, + }, + [5] = { + [0] = sym__local_variable_declarator, + }, + [6] = { + [2] = alias_sym_property_identifier, + }, + [7] = { + [1] = alias_sym_condition_expression, + }, + [8] = { + [3] = alias_sym_condition_expression, + }, + [9] = { + [1] = alias_sym_property_identifier, + }, + [10] = { + [2] = alias_sym_method, + }, + [11] = { + [4] = alias_sym_condition_expression, + }, +}; + +static uint16_t ts_non_terminal_alias_map[] = { + sym__variable_declarator, 2, + sym__variable_declarator, + sym__local_variable_declarator, + sym__expression, 3, + sym__expression, + alias_sym_condition_expression, + alias_sym_expression, + 0, +}; + +static bool ts_lex(TSLexer *lexer, TSStateId state) { + START_LEXER(); + eof = lexer->eof(lexer); + switch (state) { + case 0: + if (eof) ADVANCE(95); + if (lookahead == '#') ADVANCE(177); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ')') ADVANCE(138); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(105); + if (lookahead == '/') ADVANCE(169); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(136); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == ']') ADVANCE(104); + if (lookahead == '^') ADVANCE(174); + if (lookahead == '_') ADVANCE(18); + if (lookahead == 'a') ADVANCE(60); + if (lookahead == 'b') ADVANCE(74); + if (lookahead == 'd') ADVANCE(66); + if (lookahead == 'e') ADVANCE(53); + if (lookahead == 'f') ADVANCE(24); + if (lookahead == 'g') ADVANCE(67); + if (lookahead == 'i') ADVANCE(42); + if (lookahead == 'l') ADVANCE(68); + if (lookahead == 'n') ADVANCE(32); + if (lookahead == 'o') ADVANCE(72); + if (lookahead == 'r') ADVANCE(33); + if (lookahead == 's') ADVANCE(39); + if (lookahead == 't') ADVANCE(48); + if (lookahead == 'u') ADVANCE(65); + if (lookahead == 'w') ADVANCE(46); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(149); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(0) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + END_STATE(); + case 1: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(105); + if (lookahead == '/') ADVANCE(169); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(136); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == '^') ADVANCE(174); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'a') ADVANCE(234); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'e') ADVANCE(229); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'o') ADVANCE(244); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(1) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('c' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 2: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(105); + if (lookahead == '/') ADVANCE(169); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(136); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == '^') ADVANCE(174); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'a') ADVANCE(234); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'e') ADVANCE(232); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'o') ADVANCE(244); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(2) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('c' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 3: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(105); + if (lookahead == '/') ADVANCE(169); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(136); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == '^') ADVANCE(174); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'a') ADVANCE(234); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'o') ADVANCE(244); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'u') ADVANCE(235); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(3) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('c' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 4: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(16); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '=') ADVANCE(99); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'e') ADVANCE(229); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(4) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 5: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(16); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '=') ADVANCE(99); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'e') ADVANCE(232); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(5) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 6: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(16); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '=') ADVANCE(99); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'u') ADVANCE(235); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(6) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 7: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'e') ADVANCE(229); + if (lookahead == 'f') ADVANCE(198); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(7) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 8: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'e') ADVANCE(232); + if (lookahead == 'f') ADVANCE(198); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(8) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 9: + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'f') ADVANCE(198); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'u') ADVANCE(235); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(9) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 10: + if (lookahead == '(') ADVANCE(137); + if (lookahead == '.') ADVANCE(14); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(10) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 11: + if (lookahead == '(') ADVANCE(137); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 's') ADVANCE(213); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(11) + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 12: + if (lookahead == ')') ADVANCE(138); + if (lookahead == '.') ADVANCE(14); + if (lookahead == 's') ADVANCE(213); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(12) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 13: + if (lookahead == '.') ADVANCE(139); + END_STATE(); + case 14: + if (lookahead == '.') ADVANCE(13); + END_STATE(); + case 15: + if (lookahead == '.') ADVANCE(13); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(181); + END_STATE(); + case 16: + if (lookahead == ':') ADVANCE(131); + END_STATE(); + case 17: + if (lookahead == 'E') ADVANCE(22); + END_STATE(); + case 18: + if (lookahead == 'G') ADVANCE(144); + if (lookahead == 'V') ADVANCE(17); + END_STATE(); + case 19: + if (lookahead == 'I') ADVANCE(21); + END_STATE(); + case 20: + if (lookahead == 'N') ADVANCE(146); + END_STATE(); + case 21: + if (lookahead == 'O') ADVANCE(20); + END_STATE(); + case 22: + if (lookahead == 'R') ADVANCE(23); + END_STATE(); + case 23: + if (lookahead == 'S') ADVANCE(19); + END_STATE(); + case 24: + if (lookahead == 'a') ADVANCE(59); + if (lookahead == 'o') ADVANCE(73); + if (lookahead == 'u') ADVANCE(64); + END_STATE(); + case 25: + if (lookahead == 'a') ADVANCE(52); + END_STATE(); + case 26: + if (lookahead == 'a') ADVANCE(56); + END_STATE(); + case 27: + if (lookahead == 'a') ADVANCE(80); + END_STATE(); + case 28: + if (lookahead == 'c') ADVANCE(26); + END_STATE(); + case 29: + if (lookahead == 'c') ADVANCE(81); + END_STATE(); + case 30: + if (lookahead == 'd') ADVANCE(152); + END_STATE(); + case 31: + if (lookahead == 'd') ADVANCE(109); + END_STATE(); + case 32: + if (lookahead == 'e') ADVANCE(86); + if (lookahead == 'i') ADVANCE(54); + if (lookahead == 'o') ADVANCE(78); + END_STATE(); + case 33: + if (lookahead == 'e') ADVANCE(71); + END_STATE(); + case 34: + if (lookahead == 'e') ADVANCE(25); + END_STATE(); + case 35: + if (lookahead == 'e') ADVANCE(116); + END_STATE(); + case 36: + if (lookahead == 'e') ADVANCE(186); + END_STATE(); + case 37: + if (lookahead == 'e') ADVANCE(188); + END_STATE(); + case 38: + if (lookahead == 'e') ADVANCE(118); + END_STATE(); + case 39: + if (lookahead == 'e') ADVANCE(55); + END_STATE(); + case 40: + if (lookahead == 'e') ADVANCE(27); + END_STATE(); + case 41: + if (lookahead == 'e') ADVANCE(61); + END_STATE(); + case 42: + if (lookahead == 'f') ADVANCE(111); + if (lookahead == 'n') ADVANCE(126); + END_STATE(); + case 43: + if (lookahead == 'f') ADVANCE(140); + END_STATE(); + case 44: + if (lookahead == 'f') ADVANCE(114); + END_STATE(); + case 45: + if (lookahead == 'f') ADVANCE(255); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(45) + if (('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 46: + if (lookahead == 'h') ADVANCE(49); + END_STATE(); + case 47: + if (lookahead == 'h') ADVANCE(41); + END_STATE(); + case 48: + if (lookahead == 'h') ADVANCE(41); + if (lookahead == 'r') ADVANCE(85); + END_STATE(); + case 49: + if (lookahead == 'i') ADVANCE(58); + END_STATE(); + case 50: + if (lookahead == 'i') ADVANCE(70); + END_STATE(); + case 51: + if (lookahead == 'i') ADVANCE(57); + END_STATE(); + case 52: + if (lookahead == 'k') ADVANCE(129); + END_STATE(); + case 53: + if (lookahead == 'l') ADVANCE(76); + if (lookahead == 'n') ADVANCE(31); + END_STATE(); + case 54: + if (lookahead == 'l') ADVANCE(184); + END_STATE(); + case 55: + if (lookahead == 'l') ADVANCE(43); + END_STATE(); + case 56: + if (lookahead == 'l') ADVANCE(101); + END_STATE(); + case 57: + if (lookahead == 'l') ADVANCE(122); + END_STATE(); + case 58: + if (lookahead == 'l') ADVANCE(38); + END_STATE(); + case 59: + if (lookahead == 'l') ADVANCE(77); + END_STATE(); + case 60: + if (lookahead == 'n') ADVANCE(30); + END_STATE(); + case 61: + if (lookahead == 'n') ADVANCE(113); + END_STATE(); + case 62: + if (lookahead == 'n') ADVANCE(96); + END_STATE(); + case 63: + if (lookahead == 'n') ADVANCE(133); + END_STATE(); + case 64: + if (lookahead == 'n') ADVANCE(29); + END_STATE(); + case 65: + if (lookahead == 'n') ADVANCE(83); + END_STATE(); + case 66: + if (lookahead == 'o') ADVANCE(107); + END_STATE(); + case 67: + if (lookahead == 'o') ADVANCE(82); + END_STATE(); + case 68: + if (lookahead == 'o') ADVANCE(28); + END_STATE(); + case 69: + if (lookahead == 'o') ADVANCE(127); + END_STATE(); + case 70: + if (lookahead == 'o') ADVANCE(63); + END_STATE(); + case 71: + if (lookahead == 'p') ADVANCE(40); + if (lookahead == 't') ADVANCE(84); + END_STATE(); + case 72: + if (lookahead == 'r') ADVANCE(150); + END_STATE(); + case 73: + if (lookahead == 'r') ADVANCE(124); + END_STATE(); + case 74: + if (lookahead == 'r') ADVANCE(34); + END_STATE(); + case 75: + if (lookahead == 'r') ADVANCE(62); + END_STATE(); + case 76: + if (lookahead == 's') ADVANCE(35); + END_STATE(); + case 77: + if (lookahead == 's') ADVANCE(37); + END_STATE(); + case 78: + if (lookahead == 't') ADVANCE(175); + END_STATE(); + case 79: + if (lookahead == 't') ADVANCE(142); + END_STATE(); + case 80: + if (lookahead == 't') ADVANCE(120); + END_STATE(); + case 81: + if (lookahead == 't') ADVANCE(50); + END_STATE(); + case 82: + if (lookahead == 't') ADVANCE(69); + END_STATE(); + case 83: + if (lookahead == 't') ADVANCE(51); + END_STATE(); + case 84: + if (lookahead == 'u') ADVANCE(75); + END_STATE(); + case 85: + if (lookahead == 'u') ADVANCE(36); + END_STATE(); + case 86: + if (lookahead == 'x') ADVANCE(79); + END_STATE(); + case 87: + if (lookahead == '+' || + lookahead == '-') ADVANCE(88); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(183); + END_STATE(); + case 88: + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(183); + END_STATE(); + case 89: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(180); + END_STATE(); + case 90: + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(182); + END_STATE(); + case 91: + if (eof) ADVANCE(95); + if (lookahead == '#') ADVANCE(177); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(105); + if (lookahead == '/') ADVANCE(169); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(136); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == '^') ADVANCE(174); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'a') ADVANCE(234); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'o') ADVANCE(244); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(91) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('c' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 92: + if (eof) ADVANCE(95); + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ')') ADVANCE(138); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '[') ADVANCE(103); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'f') ADVANCE(198); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '}') ADVANCE(149); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(92) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 93: + if (eof) ADVANCE(95); + if (lookahead == '#') ADVANCE(177); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(15); + if (lookahead == '0') ADVANCE(178); + if (lookahead == ':') ADVANCE(16); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '=') ADVANCE(99); + if (lookahead == '_') ADVANCE(191); + if (lookahead == 'b') ADVANCE(246); + if (lookahead == 'd') ADVANCE(236); + if (lookahead == 'f') ADVANCE(197); + if (lookahead == 'g') ADVANCE(237); + if (lookahead == 'i') ADVANCE(215); + if (lookahead == 'l') ADVANCE(238); + if (lookahead == 'n') ADVANCE(206); + if (lookahead == 'r') ADVANCE(207); + if (lookahead == 's') ADVANCE(213); + if (lookahead == 't') ADVANCE(242); + if (lookahead == 'w') ADVANCE(218); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '~') ADVANCE(161); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(93) + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + if (('A' <= lookahead && lookahead <= 'Z') || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 94: + if (eof) ADVANCE(95); + if (lookahead == '%') ADVANCE(171); + if (lookahead == '&') ADVANCE(163); + if (lookahead == '(') ADVANCE(137); + if (lookahead == ')') ADVANCE(138); + if (lookahead == '*') ADVANCE(168); + if (lookahead == '+') ADVANCE(166); + if (lookahead == ',') ADVANCE(98); + if (lookahead == '-') ADVANCE(167); + if (lookahead == '.') ADVANCE(106); + if (lookahead == '/') ADVANCE(169); + if (lookahead == ':') ADVANCE(135); + if (lookahead == ';') ADVANCE(132); + if (lookahead == '<') ADVANCE(154); + if (lookahead == '=') ADVANCE(100); + if (lookahead == '>') ADVANCE(159); + if (lookahead == '[') ADVANCE(103); + if (lookahead == ']') ADVANCE(104); + if (lookahead == '^') ADVANCE(174); + if (lookahead == 'a') ADVANCE(60); + if (lookahead == 'd') ADVANCE(66); + if (lookahead == 'e') ADVANCE(53); + if (lookahead == 'o') ADVANCE(72); + if (lookahead == 't') ADVANCE(47); + if (lookahead == 'u') ADVANCE(65); + if (lookahead == '{') ADVANCE(148); + if (lookahead == '|') ADVANCE(160); + if (lookahead == '}') ADVANCE(149); + if (lookahead == '~') ADVANCE(162); + if (lookahead == '\t' || + lookahead == '\n' || + lookahead == '\r' || + lookahead == ' ') SKIP(94) + END_STATE(); + case 95: + ACCEPT_TOKEN(ts_builtin_sym_end); + END_STATE(); + case 96: + ACCEPT_TOKEN(anon_sym_return); + END_STATE(); + case 97: + ACCEPT_TOKEN(anon_sym_return); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 98: + ACCEPT_TOKEN(anon_sym_COMMA); + END_STATE(); + case 99: + ACCEPT_TOKEN(anon_sym_EQ); + END_STATE(); + case 100: + ACCEPT_TOKEN(anon_sym_EQ); + if (lookahead == '=') ADVANCE(156); + END_STATE(); + case 101: + ACCEPT_TOKEN(anon_sym_local); + END_STATE(); + case 102: + ACCEPT_TOKEN(anon_sym_local); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 103: + ACCEPT_TOKEN(anon_sym_LBRACK); + END_STATE(); + case 104: + ACCEPT_TOKEN(anon_sym_RBRACK); + END_STATE(); + case 105: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(173); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(181); + END_STATE(); + case 106: + ACCEPT_TOKEN(anon_sym_DOT); + if (lookahead == '.') ADVANCE(172); + END_STATE(); + case 107: + ACCEPT_TOKEN(anon_sym_do); + END_STATE(); + case 108: + ACCEPT_TOKEN(anon_sym_do); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 109: + ACCEPT_TOKEN(anon_sym_end); + END_STATE(); + case 110: + ACCEPT_TOKEN(anon_sym_end); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 111: + ACCEPT_TOKEN(anon_sym_if); + END_STATE(); + case 112: + ACCEPT_TOKEN(anon_sym_if); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 113: + ACCEPT_TOKEN(anon_sym_then); + END_STATE(); + case 114: + ACCEPT_TOKEN(anon_sym_elseif); + END_STATE(); + case 115: + ACCEPT_TOKEN(anon_sym_elseif); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 116: + ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'i') ADVANCE(44); + END_STATE(); + case 117: + ACCEPT_TOKEN(anon_sym_else); + if (lookahead == 'i') ADVANCE(217); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 118: + ACCEPT_TOKEN(anon_sym_while); + END_STATE(); + case 119: + ACCEPT_TOKEN(anon_sym_while); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 120: + ACCEPT_TOKEN(anon_sym_repeat); + END_STATE(); + case 121: + ACCEPT_TOKEN(anon_sym_repeat); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 122: + ACCEPT_TOKEN(anon_sym_until); + END_STATE(); + case 123: + ACCEPT_TOKEN(anon_sym_until); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 124: + ACCEPT_TOKEN(anon_sym_for); + END_STATE(); + case 125: + ACCEPT_TOKEN(anon_sym_for); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 126: + ACCEPT_TOKEN(anon_sym_in); + END_STATE(); + case 127: + ACCEPT_TOKEN(anon_sym_goto); + END_STATE(); + case 128: + ACCEPT_TOKEN(anon_sym_goto); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 129: + ACCEPT_TOKEN(sym_break_statement); + END_STATE(); + case 130: + ACCEPT_TOKEN(sym_break_statement); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 131: + ACCEPT_TOKEN(anon_sym_COLON_COLON); + END_STATE(); + case 132: + ACCEPT_TOKEN(anon_sym_SEMI); + END_STATE(); + case 133: + ACCEPT_TOKEN(anon_sym_function); + END_STATE(); + case 134: + ACCEPT_TOKEN(anon_sym_function); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 135: + ACCEPT_TOKEN(anon_sym_COLON); + END_STATE(); + case 136: + ACCEPT_TOKEN(anon_sym_COLON); + if (lookahead == ':') ADVANCE(131); + END_STATE(); + case 137: + ACCEPT_TOKEN(anon_sym_LPAREN); + END_STATE(); + case 138: + ACCEPT_TOKEN(anon_sym_RPAREN); + END_STATE(); + case 139: + ACCEPT_TOKEN(sym_spread); + END_STATE(); + case 140: + ACCEPT_TOKEN(sym_self); + END_STATE(); + case 141: + ACCEPT_TOKEN(sym_self); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 142: + ACCEPT_TOKEN(sym_next); + END_STATE(); + case 143: + ACCEPT_TOKEN(sym_next); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 144: + ACCEPT_TOKEN(anon_sym__G); + END_STATE(); + case 145: + ACCEPT_TOKEN(anon_sym__G); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 146: + ACCEPT_TOKEN(anon_sym__VERSION); + END_STATE(); + case 147: + ACCEPT_TOKEN(anon_sym__VERSION); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 148: + ACCEPT_TOKEN(anon_sym_LBRACE); + END_STATE(); + case 149: + ACCEPT_TOKEN(anon_sym_RBRACE); + END_STATE(); + case 150: + ACCEPT_TOKEN(anon_sym_or); + END_STATE(); + case 151: + ACCEPT_TOKEN(anon_sym_or); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 152: + ACCEPT_TOKEN(anon_sym_and); + END_STATE(); + case 153: + ACCEPT_TOKEN(anon_sym_and); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 154: + ACCEPT_TOKEN(anon_sym_LT); + if (lookahead == '<') ADVANCE(164); + if (lookahead == '=') ADVANCE(155); + END_STATE(); + case 155: + ACCEPT_TOKEN(anon_sym_LT_EQ); + END_STATE(); + case 156: + ACCEPT_TOKEN(anon_sym_EQ_EQ); + END_STATE(); + case 157: + ACCEPT_TOKEN(anon_sym_TILDE_EQ); + END_STATE(); + case 158: + ACCEPT_TOKEN(anon_sym_GT_EQ); + END_STATE(); + case 159: + ACCEPT_TOKEN(anon_sym_GT); + if (lookahead == '=') ADVANCE(158); + if (lookahead == '>') ADVANCE(165); + END_STATE(); + case 160: + ACCEPT_TOKEN(anon_sym_PIPE); + END_STATE(); + case 161: + ACCEPT_TOKEN(anon_sym_TILDE); + END_STATE(); + case 162: + ACCEPT_TOKEN(anon_sym_TILDE); + if (lookahead == '=') ADVANCE(157); + END_STATE(); + case 163: + ACCEPT_TOKEN(anon_sym_AMP); + END_STATE(); + case 164: + ACCEPT_TOKEN(anon_sym_LT_LT); + END_STATE(); + case 165: + ACCEPT_TOKEN(anon_sym_GT_GT); + END_STATE(); + case 166: + ACCEPT_TOKEN(anon_sym_PLUS); + END_STATE(); + case 167: + ACCEPT_TOKEN(anon_sym_DASH); + END_STATE(); + case 168: + ACCEPT_TOKEN(anon_sym_STAR); + END_STATE(); + case 169: + ACCEPT_TOKEN(anon_sym_SLASH); + if (lookahead == '/') ADVANCE(170); + END_STATE(); + case 170: + ACCEPT_TOKEN(anon_sym_SLASH_SLASH); + END_STATE(); + case 171: + ACCEPT_TOKEN(anon_sym_PERCENT); + END_STATE(); + case 172: + ACCEPT_TOKEN(anon_sym_DOT_DOT); + END_STATE(); + case 173: + ACCEPT_TOKEN(anon_sym_DOT_DOT); + if (lookahead == '.') ADVANCE(139); + END_STATE(); + case 174: + ACCEPT_TOKEN(anon_sym_CARET); + END_STATE(); + case 175: + ACCEPT_TOKEN(anon_sym_not); + END_STATE(); + case 176: + ACCEPT_TOKEN(anon_sym_not); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 177: + ACCEPT_TOKEN(anon_sym_POUND); + END_STATE(); + case 178: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(181); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(87); + if (lookahead == 'X' || + lookahead == 'x') ADVANCE(89); + if (('1' <= lookahead && lookahead <= '9')) ADVANCE(179); + END_STATE(); + case 179: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(181); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(87); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(179); + END_STATE(); + case 180: + ACCEPT_TOKEN(sym_number); + if (lookahead == '.') ADVANCE(90); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(87); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(180); + END_STATE(); + case 181: + ACCEPT_TOKEN(sym_number); + if (lookahead == 'E' || + lookahead == 'e') ADVANCE(87); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(181); + END_STATE(); + case 182: + ACCEPT_TOKEN(sym_number); + if (lookahead == 'P' || + lookahead == 'p') ADVANCE(87); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'F') || + ('a' <= lookahead && lookahead <= 'f')) ADVANCE(182); + END_STATE(); + case 183: + ACCEPT_TOKEN(sym_number); + if (('0' <= lookahead && lookahead <= '9')) ADVANCE(183); + END_STATE(); + case 184: + ACCEPT_TOKEN(sym_nil); + END_STATE(); + case 185: + ACCEPT_TOKEN(sym_nil); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 186: + ACCEPT_TOKEN(sym_true); + END_STATE(); + case 187: + ACCEPT_TOKEN(sym_true); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 188: + ACCEPT_TOKEN(sym_false); + END_STATE(); + case 189: + ACCEPT_TOKEN(sym_false); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 190: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'E') ADVANCE(195); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 191: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'G') ADVANCE(145); + if (lookahead == 'V') ADVANCE(190); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 192: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'I') ADVANCE(194); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 193: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'N') ADVANCE(147); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 194: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'O') ADVANCE(193); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 195: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'R') ADVANCE(196); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 196: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'S') ADVANCE(192); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 197: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'a') ADVANCE(223); + if (lookahead == 'o') ADVANCE(243); + if (lookahead == 'u') ADVANCE(233); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 198: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'a') ADVANCE(223); + if (lookahead == 'u') ADVANCE(233); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 199: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'a') ADVANCE(222); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 200: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'a') ADVANCE(225); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 201: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'a') ADVANCE(251); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('b' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 202: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'c') ADVANCE(200); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 203: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'c') ADVANCE(252); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 204: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'd') ADVANCE(110); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 205: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'd') ADVANCE(153); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 206: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(258); + if (lookahead == 'i') ADVANCE(224); + if (lookahead == 'o') ADVANCE(249); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 207: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(241); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 208: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(199); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 209: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(187); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 210: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(189); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 211: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(119); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 212: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(117); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 213: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(227); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 214: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'e') ADVANCE(201); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 215: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'f') ADVANCE(112); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 216: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'f') ADVANCE(141); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 217: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'f') ADVANCE(115); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 218: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'h') ADVANCE(219); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 219: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'i') ADVANCE(228); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 220: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'i') ADVANCE(240); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 221: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'i') ADVANCE(226); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 222: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'k') ADVANCE(130); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 223: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(247); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 224: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(185); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 225: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(102); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 226: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(123); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 227: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(216); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 228: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(211); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 229: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'l') ADVANCE(248); + if (lookahead == 'n') ADVANCE(204); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 230: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(97); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 231: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(134); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 232: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(204); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 233: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(203); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 234: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(205); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 235: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'n') ADVANCE(254); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 236: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(108); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 237: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(253); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 238: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(202); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 239: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(128); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 240: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'o') ADVANCE(231); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 241: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'p') ADVANCE(214); + if (lookahead == 't') ADVANCE(256); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 242: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'r') ADVANCE(257); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 243: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'r') ADVANCE(125); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 244: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'r') ADVANCE(151); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 245: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'r') ADVANCE(230); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 246: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'r') ADVANCE(208); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 247: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 's') ADVANCE(210); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 248: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 's') ADVANCE(212); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 249: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(176); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 250: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(143); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 251: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(121); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 252: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(220); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 253: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(239); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 254: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 't') ADVANCE(221); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 255: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'u') ADVANCE(233); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 256: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'u') ADVANCE(245); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 257: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'u') ADVANCE(209); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 258: + ACCEPT_TOKEN(sym_identifier); + if (lookahead == 'x') ADVANCE(250); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + case 259: + ACCEPT_TOKEN(sym_identifier); + if (('0' <= lookahead && lookahead <= '9') || + ('A' <= lookahead && lookahead <= 'Z') || + lookahead == '_' || + ('a' <= lookahead && lookahead <= 'z')) ADVANCE(259); + END_STATE(); + default: + return false; + } +} + +static TSLexMode ts_lex_modes[STATE_COUNT] = { + [0] = {.lex_state = 0, .external_lex_state = 1}, + [1] = {.lex_state = 93, .external_lex_state = 1}, + [2] = {.lex_state = 4, .external_lex_state = 1}, + [3] = {.lex_state = 4, .external_lex_state = 1}, + [4] = {.lex_state = 4, .external_lex_state = 1}, + [5] = {.lex_state = 4, .external_lex_state = 1}, + [6] = {.lex_state = 4, .external_lex_state = 1}, + [7] = {.lex_state = 4, .external_lex_state = 1}, + [8] = {.lex_state = 4, .external_lex_state = 1}, + [9] = {.lex_state = 4, .external_lex_state = 1}, + [10] = {.lex_state = 4, .external_lex_state = 1}, + [11] = {.lex_state = 4, .external_lex_state = 1}, + [12] = {.lex_state = 5, .external_lex_state = 1}, + [13] = {.lex_state = 4, .external_lex_state = 1}, + [14] = {.lex_state = 5, .external_lex_state = 1}, + [15] = {.lex_state = 5, .external_lex_state = 1}, + [16] = {.lex_state = 5, .external_lex_state = 1}, + [17] = {.lex_state = 5, .external_lex_state = 1}, + [18] = {.lex_state = 5, .external_lex_state = 1}, + [19] = {.lex_state = 5, .external_lex_state = 1}, + [20] = {.lex_state = 5, .external_lex_state = 1}, + [21] = {.lex_state = 5, .external_lex_state = 1}, + [22] = {.lex_state = 5, .external_lex_state = 1}, + [23] = {.lex_state = 5, .external_lex_state = 1}, + [24] = {.lex_state = 5, .external_lex_state = 1}, + [25] = {.lex_state = 5, .external_lex_state = 1}, + [26] = {.lex_state = 5, .external_lex_state = 1}, + [27] = {.lex_state = 5, .external_lex_state = 1}, + [28] = {.lex_state = 5, .external_lex_state = 1}, + [29] = {.lex_state = 93, .external_lex_state = 1}, + [30] = {.lex_state = 6, .external_lex_state = 1}, + [31] = {.lex_state = 5, .external_lex_state = 1}, + [32] = {.lex_state = 5, .external_lex_state = 1}, + [33] = {.lex_state = 5, .external_lex_state = 1}, + [34] = {.lex_state = 6, .external_lex_state = 1}, + [35] = {.lex_state = 5, .external_lex_state = 1}, + [36] = {.lex_state = 5, .external_lex_state = 1}, + [37] = {.lex_state = 5, .external_lex_state = 1}, + [38] = {.lex_state = 5, .external_lex_state = 1}, + [39] = {.lex_state = 5, .external_lex_state = 1}, + [40] = {.lex_state = 6, .external_lex_state = 1}, + [41] = {.lex_state = 6, .external_lex_state = 1}, + [42] = {.lex_state = 6, .external_lex_state = 1}, + [43] = {.lex_state = 5, .external_lex_state = 1}, + [44] = {.lex_state = 5, .external_lex_state = 1}, + [45] = {.lex_state = 5, .external_lex_state = 1}, + [46] = {.lex_state = 5, .external_lex_state = 1}, + [47] = {.lex_state = 5, .external_lex_state = 1}, + [48] = {.lex_state = 6, .external_lex_state = 1}, + [49] = {.lex_state = 5, .external_lex_state = 1}, + [50] = {.lex_state = 6, .external_lex_state = 1}, + [51] = {.lex_state = 5, .external_lex_state = 1}, + [52] = {.lex_state = 5, .external_lex_state = 1}, + [53] = {.lex_state = 6, .external_lex_state = 1}, + [54] = {.lex_state = 5, .external_lex_state = 1}, + [55] = {.lex_state = 5, .external_lex_state = 1}, + [56] = {.lex_state = 5, .external_lex_state = 1}, + [57] = {.lex_state = 5, .external_lex_state = 1}, + [58] = {.lex_state = 5, .external_lex_state = 1}, + [59] = {.lex_state = 5, .external_lex_state = 1}, + [60] = {.lex_state = 5, .external_lex_state = 1}, + [61] = {.lex_state = 5, .external_lex_state = 1}, + [62] = {.lex_state = 5, .external_lex_state = 1}, + [63] = {.lex_state = 5, .external_lex_state = 1}, + [64] = {.lex_state = 5, .external_lex_state = 1}, + [65] = {.lex_state = 5, .external_lex_state = 1}, + [66] = {.lex_state = 5, .external_lex_state = 1}, + [67] = {.lex_state = 1, .external_lex_state = 1}, + [68] = {.lex_state = 93, .external_lex_state = 1}, + [69] = {.lex_state = 1, .external_lex_state = 1}, + [70] = {.lex_state = 6, .external_lex_state = 1}, + [71] = {.lex_state = 1, .external_lex_state = 1}, + [72] = {.lex_state = 1, .external_lex_state = 1}, + [73] = {.lex_state = 1, .external_lex_state = 1}, + [74] = {.lex_state = 1, .external_lex_state = 1}, + [75] = {.lex_state = 1, .external_lex_state = 1}, + [76] = {.lex_state = 3, .external_lex_state = 1}, + [77] = {.lex_state = 1, .external_lex_state = 1}, + [78] = {.lex_state = 2, .external_lex_state = 1}, + [79] = {.lex_state = 91, .external_lex_state = 1}, + [80] = {.lex_state = 1, .external_lex_state = 1}, + [81] = {.lex_state = 3, .external_lex_state = 1}, + [82] = {.lex_state = 1, .external_lex_state = 1}, + [83] = {.lex_state = 1, .external_lex_state = 1}, + [84] = {.lex_state = 1, .external_lex_state = 1}, + [85] = {.lex_state = 2, .external_lex_state = 1}, + [86] = {.lex_state = 1, .external_lex_state = 1}, + [87] = {.lex_state = 1, .external_lex_state = 1}, + [88] = {.lex_state = 1, .external_lex_state = 1}, + [89] = {.lex_state = 1, .external_lex_state = 1}, + [90] = {.lex_state = 91, .external_lex_state = 1}, + [91] = {.lex_state = 1, .external_lex_state = 1}, + [92] = {.lex_state = 3, .external_lex_state = 1}, + [93] = {.lex_state = 1, .external_lex_state = 1}, + [94] = {.lex_state = 91, .external_lex_state = 1}, + [95] = {.lex_state = 2, .external_lex_state = 1}, + [96] = {.lex_state = 91, .external_lex_state = 1}, + [97] = {.lex_state = 2, .external_lex_state = 1}, + [98] = {.lex_state = 3, .external_lex_state = 1}, + [99] = {.lex_state = 3, .external_lex_state = 1}, + [100] = {.lex_state = 91, .external_lex_state = 1}, + [101] = {.lex_state = 91, .external_lex_state = 1}, + [102] = {.lex_state = 3, .external_lex_state = 1}, + [103] = {.lex_state = 2, .external_lex_state = 1}, + [104] = {.lex_state = 2, .external_lex_state = 1}, + [105] = {.lex_state = 2, .external_lex_state = 1}, + [106] = {.lex_state = 2, .external_lex_state = 1}, + [107] = {.lex_state = 91, .external_lex_state = 1}, + [108] = {.lex_state = 91, .external_lex_state = 1}, + [109] = {.lex_state = 3, .external_lex_state = 1}, + [110] = {.lex_state = 2, .external_lex_state = 1}, + [111] = {.lex_state = 3, .external_lex_state = 1}, + [112] = {.lex_state = 91, .external_lex_state = 1}, + [113] = {.lex_state = 3, .external_lex_state = 1}, + [114] = {.lex_state = 3, .external_lex_state = 1}, + [115] = {.lex_state = 2, .external_lex_state = 1}, + [116] = {.lex_state = 2, .external_lex_state = 1}, + [117] = {.lex_state = 2, .external_lex_state = 1}, + [118] = {.lex_state = 3, .external_lex_state = 1}, + [119] = {.lex_state = 1, .external_lex_state = 1}, + [120] = {.lex_state = 91, .external_lex_state = 1}, + [121] = {.lex_state = 91, .external_lex_state = 1}, + [122] = {.lex_state = 91, .external_lex_state = 1}, + [123] = {.lex_state = 91, .external_lex_state = 1}, + [124] = {.lex_state = 3, .external_lex_state = 1}, + [125] = {.lex_state = 2, .external_lex_state = 1}, + [126] = {.lex_state = 3, .external_lex_state = 1}, + [127] = {.lex_state = 2, .external_lex_state = 1}, + [128] = {.lex_state = 2, .external_lex_state = 1}, + [129] = {.lex_state = 3, .external_lex_state = 1}, + [130] = {.lex_state = 3, .external_lex_state = 1}, + [131] = {.lex_state = 91, .external_lex_state = 1}, + [132] = {.lex_state = 2, .external_lex_state = 1}, + [133] = {.lex_state = 91, .external_lex_state = 1}, + [134] = {.lex_state = 91, .external_lex_state = 1}, + [135] = {.lex_state = 1, .external_lex_state = 1}, + [136] = {.lex_state = 3, .external_lex_state = 1}, + [137] = {.lex_state = 2, .external_lex_state = 1}, + [138] = {.lex_state = 91, .external_lex_state = 1}, + [139] = {.lex_state = 3, .external_lex_state = 1}, + [140] = {.lex_state = 1, .external_lex_state = 1}, + [141] = {.lex_state = 1, .external_lex_state = 1}, + [142] = {.lex_state = 1, .external_lex_state = 1}, + [143] = {.lex_state = 1, .external_lex_state = 1}, + [144] = {.lex_state = 1, .external_lex_state = 1}, + [145] = {.lex_state = 1, .external_lex_state = 1}, + [146] = {.lex_state = 1, .external_lex_state = 1}, + [147] = {.lex_state = 1, .external_lex_state = 1}, + [148] = {.lex_state = 1, .external_lex_state = 1}, + [149] = {.lex_state = 1, .external_lex_state = 1}, + [150] = {.lex_state = 91, .external_lex_state = 1}, + [151] = {.lex_state = 1, .external_lex_state = 1}, + [152] = {.lex_state = 2, .external_lex_state = 1}, + [153] = {.lex_state = 1, .external_lex_state = 1}, + [154] = {.lex_state = 1, .external_lex_state = 1}, + [155] = {.lex_state = 1, .external_lex_state = 1}, + [156] = {.lex_state = 3, .external_lex_state = 1}, + [157] = {.lex_state = 1, .external_lex_state = 1}, + [158] = {.lex_state = 1, .external_lex_state = 1}, + [159] = {.lex_state = 1, .external_lex_state = 1}, + [160] = {.lex_state = 1, .external_lex_state = 1}, + [161] = {.lex_state = 3, .external_lex_state = 1}, + [162] = {.lex_state = 91, .external_lex_state = 1}, + [163] = {.lex_state = 1, .external_lex_state = 1}, + [164] = {.lex_state = 1, .external_lex_state = 1}, + [165] = {.lex_state = 2, .external_lex_state = 1}, + [166] = {.lex_state = 1, .external_lex_state = 1}, + [167] = {.lex_state = 1, .external_lex_state = 1}, + [168] = {.lex_state = 1, .external_lex_state = 1}, + [169] = {.lex_state = 1, .external_lex_state = 1}, + [170] = {.lex_state = 1, .external_lex_state = 1}, + [171] = {.lex_state = 91, .external_lex_state = 1}, + [172] = {.lex_state = 1, .external_lex_state = 1}, + [173] = {.lex_state = 1, .external_lex_state = 1}, + [174] = {.lex_state = 1, .external_lex_state = 1}, + [175] = {.lex_state = 91, .external_lex_state = 1}, + [176] = {.lex_state = 2, .external_lex_state = 1}, + [177] = {.lex_state = 1, .external_lex_state = 1}, + [178] = {.lex_state = 1, .external_lex_state = 1}, + [179] = {.lex_state = 3, .external_lex_state = 1}, + [180] = {.lex_state = 1, .external_lex_state = 1}, + [181] = {.lex_state = 3, .external_lex_state = 1}, + [182] = {.lex_state = 2, .external_lex_state = 1}, + [183] = {.lex_state = 1, .external_lex_state = 1}, + [184] = {.lex_state = 1, .external_lex_state = 1}, + [185] = {.lex_state = 1, .external_lex_state = 1}, + [186] = {.lex_state = 91, .external_lex_state = 1}, + [187] = {.lex_state = 91, .external_lex_state = 1}, + [188] = {.lex_state = 91, .external_lex_state = 1}, + [189] = {.lex_state = 3, .external_lex_state = 1}, + [190] = {.lex_state = 2, .external_lex_state = 1}, + [191] = {.lex_state = 91, .external_lex_state = 1}, + [192] = {.lex_state = 3, .external_lex_state = 1}, + [193] = {.lex_state = 3, .external_lex_state = 1}, + [194] = {.lex_state = 3, .external_lex_state = 1}, + [195] = {.lex_state = 2, .external_lex_state = 1}, + [196] = {.lex_state = 91, .external_lex_state = 1}, + [197] = {.lex_state = 2, .external_lex_state = 1}, + [198] = {.lex_state = 91, .external_lex_state = 1}, + [199] = {.lex_state = 91, .external_lex_state = 1}, + [200] = {.lex_state = 3, .external_lex_state = 1}, + [201] = {.lex_state = 91, .external_lex_state = 1}, + [202] = {.lex_state = 91, .external_lex_state = 1}, + [203] = {.lex_state = 91, .external_lex_state = 1}, + [204] = {.lex_state = 3, .external_lex_state = 1}, + [205] = {.lex_state = 91, .external_lex_state = 1}, + [206] = {.lex_state = 91, .external_lex_state = 1}, + [207] = {.lex_state = 91, .external_lex_state = 1}, + [208] = {.lex_state = 3, .external_lex_state = 1}, + [209] = {.lex_state = 91, .external_lex_state = 1}, + [210] = {.lex_state = 3, .external_lex_state = 1}, + [211] = {.lex_state = 3, .external_lex_state = 1}, + [212] = {.lex_state = 91, .external_lex_state = 1}, + [213] = {.lex_state = 2, .external_lex_state = 1}, + [214] = {.lex_state = 91, .external_lex_state = 1}, + [215] = {.lex_state = 2, .external_lex_state = 1}, + [216] = {.lex_state = 2, .external_lex_state = 1}, + [217] = {.lex_state = 3, .external_lex_state = 1}, + [218] = {.lex_state = 2, .external_lex_state = 1}, + [219] = {.lex_state = 2, .external_lex_state = 1}, + [220] = {.lex_state = 3, .external_lex_state = 1}, + [221] = {.lex_state = 2, .external_lex_state = 1}, + [222] = {.lex_state = 3, .external_lex_state = 1}, + [223] = {.lex_state = 3, .external_lex_state = 1}, + [224] = {.lex_state = 2, .external_lex_state = 1}, + [225] = {.lex_state = 3, .external_lex_state = 1}, + [226] = {.lex_state = 3, .external_lex_state = 1}, + [227] = {.lex_state = 2, .external_lex_state = 1}, + [228] = {.lex_state = 2, .external_lex_state = 1}, + [229] = {.lex_state = 2, .external_lex_state = 1}, + [230] = {.lex_state = 2, .external_lex_state = 1}, + [231] = {.lex_state = 2, .external_lex_state = 1}, + [232] = {.lex_state = 2, .external_lex_state = 1}, + [233] = {.lex_state = 3, .external_lex_state = 1}, + [234] = {.lex_state = 3, .external_lex_state = 1}, + [235] = {.lex_state = 91, .external_lex_state = 1}, + [236] = {.lex_state = 2, .external_lex_state = 1}, + [237] = {.lex_state = 3, .external_lex_state = 1}, + [238] = {.lex_state = 2, .external_lex_state = 1}, + [239] = {.lex_state = 3, .external_lex_state = 1}, + [240] = {.lex_state = 91, .external_lex_state = 1}, + [241] = {.lex_state = 91, .external_lex_state = 1}, + [242] = {.lex_state = 3, .external_lex_state = 1}, + [243] = {.lex_state = 2, .external_lex_state = 1}, + [244] = {.lex_state = 3, .external_lex_state = 1}, + [245] = {.lex_state = 91, .external_lex_state = 1}, + [246] = {.lex_state = 3, .external_lex_state = 1}, + [247] = {.lex_state = 2, .external_lex_state = 1}, + [248] = {.lex_state = 91, .external_lex_state = 1}, + [249] = {.lex_state = 91, .external_lex_state = 1}, + [250] = {.lex_state = 91, .external_lex_state = 1}, + [251] = {.lex_state = 2, .external_lex_state = 1}, + [252] = {.lex_state = 3, .external_lex_state = 1}, + [253] = {.lex_state = 3, .external_lex_state = 1}, + [254] = {.lex_state = 2, .external_lex_state = 1}, + [255] = {.lex_state = 91, .external_lex_state = 1}, + [256] = {.lex_state = 2, .external_lex_state = 1}, + [257] = {.lex_state = 3, .external_lex_state = 1}, + [258] = {.lex_state = 3, .external_lex_state = 1}, + [259] = {.lex_state = 3, .external_lex_state = 1}, + [260] = {.lex_state = 2, .external_lex_state = 1}, + [261] = {.lex_state = 2, .external_lex_state = 1}, + [262] = {.lex_state = 91, .external_lex_state = 1}, + [263] = {.lex_state = 3, .external_lex_state = 1}, + [264] = {.lex_state = 91, .external_lex_state = 1}, + [265] = {.lex_state = 3, .external_lex_state = 1}, + [266] = {.lex_state = 3, .external_lex_state = 1}, + [267] = {.lex_state = 3, .external_lex_state = 1}, + [268] = {.lex_state = 91, .external_lex_state = 1}, + [269] = {.lex_state = 2, .external_lex_state = 1}, + [270] = {.lex_state = 2, .external_lex_state = 1}, + [271] = {.lex_state = 3, .external_lex_state = 1}, + [272] = {.lex_state = 3, .external_lex_state = 1}, + [273] = {.lex_state = 91, .external_lex_state = 1}, + [274] = {.lex_state = 2, .external_lex_state = 1}, + [275] = {.lex_state = 2, .external_lex_state = 1}, + [276] = {.lex_state = 2, .external_lex_state = 1}, + [277] = {.lex_state = 2, .external_lex_state = 1}, + [278] = {.lex_state = 91, .external_lex_state = 1}, + [279] = {.lex_state = 2, .external_lex_state = 1}, + [280] = {.lex_state = 2, .external_lex_state = 1}, + [281] = {.lex_state = 91, .external_lex_state = 1}, + [282] = {.lex_state = 91, .external_lex_state = 1}, + [283] = {.lex_state = 91, .external_lex_state = 1}, + [284] = {.lex_state = 91, .external_lex_state = 1}, + [285] = {.lex_state = 94, .external_lex_state = 1}, + [286] = {.lex_state = 94, .external_lex_state = 1}, + [287] = {.lex_state = 94, .external_lex_state = 1}, + [288] = {.lex_state = 94, .external_lex_state = 1}, + [289] = {.lex_state = 94, .external_lex_state = 1}, + [290] = {.lex_state = 94, .external_lex_state = 1}, + [291] = {.lex_state = 94, .external_lex_state = 1}, + [292] = {.lex_state = 94, .external_lex_state = 1}, + [293] = {.lex_state = 94, .external_lex_state = 1}, + [294] = {.lex_state = 94, .external_lex_state = 1}, + [295] = {.lex_state = 94, .external_lex_state = 1}, + [296] = {.lex_state = 94, .external_lex_state = 1}, + [297] = {.lex_state = 94, .external_lex_state = 1}, + [298] = {.lex_state = 94, .external_lex_state = 1}, + [299] = {.lex_state = 94, .external_lex_state = 1}, + [300] = {.lex_state = 4, .external_lex_state = 1}, + [301] = {.lex_state = 4, .external_lex_state = 1}, + [302] = {.lex_state = 4, .external_lex_state = 1}, + [303] = {.lex_state = 4, .external_lex_state = 1}, + [304] = {.lex_state = 4, .external_lex_state = 1}, + [305] = {.lex_state = 4, .external_lex_state = 1}, + [306] = {.lex_state = 4, .external_lex_state = 1}, + [307] = {.lex_state = 4, .external_lex_state = 1}, + [308] = {.lex_state = 6, .external_lex_state = 1}, + [309] = {.lex_state = 93, .external_lex_state = 1}, + [310] = {.lex_state = 94, .external_lex_state = 2}, + [311] = {.lex_state = 6, .external_lex_state = 1}, + [312] = {.lex_state = 94, .external_lex_state = 2}, + [313] = {.lex_state = 5, .external_lex_state = 1}, + [314] = {.lex_state = 94, .external_lex_state = 2}, + [315] = {.lex_state = 94, .external_lex_state = 2}, + [316] = {.lex_state = 92, .external_lex_state = 1}, + [317] = {.lex_state = 92, .external_lex_state = 1}, + [318] = {.lex_state = 5, .external_lex_state = 1}, + [319] = {.lex_state = 94, .external_lex_state = 2}, + [320] = {.lex_state = 94, .external_lex_state = 2}, + [321] = {.lex_state = 92, .external_lex_state = 1}, + [322] = {.lex_state = 92, .external_lex_state = 1}, + [323] = {.lex_state = 7, .external_lex_state = 1}, + [324] = {.lex_state = 94, .external_lex_state = 2}, + [325] = {.lex_state = 94, .external_lex_state = 2}, + [326] = {.lex_state = 94, .external_lex_state = 2}, + [327] = {.lex_state = 94, .external_lex_state = 2}, + [328] = {.lex_state = 94, .external_lex_state = 2}, + [329] = {.lex_state = 93, .external_lex_state = 1}, + [330] = {.lex_state = 5, .external_lex_state = 1}, + [331] = {.lex_state = 6, .external_lex_state = 1}, + [332] = {.lex_state = 94, .external_lex_state = 2}, + [333] = {.lex_state = 94, .external_lex_state = 2}, + [334] = {.lex_state = 92, .external_lex_state = 1}, + [335] = {.lex_state = 94, .external_lex_state = 2}, + [336] = {.lex_state = 4, .external_lex_state = 1}, + [337] = {.lex_state = 94, .external_lex_state = 2}, + [338] = {.lex_state = 94, .external_lex_state = 2}, + [339] = {.lex_state = 93, .external_lex_state = 1}, + [340] = {.lex_state = 94, .external_lex_state = 2}, + [341] = {.lex_state = 94, .external_lex_state = 2}, + [342] = {.lex_state = 92, .external_lex_state = 1}, + [343] = {.lex_state = 5, .external_lex_state = 1}, + [344] = {.lex_state = 4, .external_lex_state = 1}, + [345] = {.lex_state = 4, .external_lex_state = 1}, + [346] = {.lex_state = 93, .external_lex_state = 1}, + [347] = {.lex_state = 6, .external_lex_state = 1}, + [348] = {.lex_state = 4, .external_lex_state = 1}, + [349] = {.lex_state = 6, .external_lex_state = 1}, + [350] = {.lex_state = 93, .external_lex_state = 1}, + [351] = {.lex_state = 4, .external_lex_state = 1}, + [352] = {.lex_state = 4, .external_lex_state = 1}, + [353] = {.lex_state = 4, .external_lex_state = 1}, + [354] = {.lex_state = 5, .external_lex_state = 1}, + [355] = {.lex_state = 5, .external_lex_state = 1}, + [356] = {.lex_state = 92, .external_lex_state = 1}, + [357] = {.lex_state = 92, .external_lex_state = 1}, + [358] = {.lex_state = 93, .external_lex_state = 1}, + [359] = {.lex_state = 4, .external_lex_state = 1}, + [360] = {.lex_state = 4, .external_lex_state = 1}, + [361] = {.lex_state = 4, .external_lex_state = 1}, + [362] = {.lex_state = 4, .external_lex_state = 1}, + [363] = {.lex_state = 4, .external_lex_state = 1}, + [364] = {.lex_state = 4, .external_lex_state = 1}, + [365] = {.lex_state = 4, .external_lex_state = 1}, + [366] = {.lex_state = 5, .external_lex_state = 1}, + [367] = {.lex_state = 4, .external_lex_state = 1}, + [368] = {.lex_state = 6, .external_lex_state = 1}, + [369] = {.lex_state = 4, .external_lex_state = 1}, + [370] = {.lex_state = 6, .external_lex_state = 1}, + [371] = {.lex_state = 4, .external_lex_state = 1}, + [372] = {.lex_state = 4, .external_lex_state = 1}, + [373] = {.lex_state = 4, .external_lex_state = 1}, + [374] = {.lex_state = 5, .external_lex_state = 1}, + [375] = {.lex_state = 4, .external_lex_state = 1}, + [376] = {.lex_state = 6, .external_lex_state = 1}, + [377] = {.lex_state = 93, .external_lex_state = 1}, + [378] = {.lex_state = 4, .external_lex_state = 1}, + [379] = {.lex_state = 93, .external_lex_state = 1}, + [380] = {.lex_state = 4, .external_lex_state = 1}, + [381] = {.lex_state = 4, .external_lex_state = 1}, + [382] = {.lex_state = 4, .external_lex_state = 1}, + [383] = {.lex_state = 4, .external_lex_state = 1}, + [384] = {.lex_state = 4, .external_lex_state = 1}, + [385] = {.lex_state = 5, .external_lex_state = 1}, + [386] = {.lex_state = 94, .external_lex_state = 1}, + [387] = {.lex_state = 8, .external_lex_state = 1}, + [388] = {.lex_state = 92, .external_lex_state = 1}, + [389] = {.lex_state = 93, .external_lex_state = 1}, + [390] = {.lex_state = 6, .external_lex_state = 1}, + [391] = {.lex_state = 9, .external_lex_state = 1}, + [392] = {.lex_state = 92, .external_lex_state = 1}, + [393] = {.lex_state = 93, .external_lex_state = 1}, + [394] = {.lex_state = 5, .external_lex_state = 1}, + [395] = {.lex_state = 6, .external_lex_state = 1}, + [396] = {.lex_state = 5, .external_lex_state = 1}, + [397] = {.lex_state = 93, .external_lex_state = 1}, + [398] = {.lex_state = 6, .external_lex_state = 1}, + [399] = {.lex_state = 6, .external_lex_state = 1}, + [400] = {.lex_state = 6, .external_lex_state = 1}, + [401] = {.lex_state = 93, .external_lex_state = 1}, + [402] = {.lex_state = 6, .external_lex_state = 1}, + [403] = {.lex_state = 6, .external_lex_state = 1}, + [404] = {.lex_state = 93, .external_lex_state = 1}, + [405] = {.lex_state = 5, .external_lex_state = 1}, + [406] = {.lex_state = 93, .external_lex_state = 1}, + [407] = {.lex_state = 6, .external_lex_state = 1}, + [408] = {.lex_state = 6, .external_lex_state = 1}, + [409] = {.lex_state = 94, .external_lex_state = 2}, + [410] = {.lex_state = 6, .external_lex_state = 1}, + [411] = {.lex_state = 6, .external_lex_state = 1}, + [412] = {.lex_state = 5, .external_lex_state = 1}, + [413] = {.lex_state = 93, .external_lex_state = 1}, + [414] = {.lex_state = 6, .external_lex_state = 1}, + [415] = {.lex_state = 6, .external_lex_state = 1}, + [416] = {.lex_state = 6, .external_lex_state = 1}, + [417] = {.lex_state = 6, .external_lex_state = 1}, + [418] = {.lex_state = 6, .external_lex_state = 1}, + [419] = {.lex_state = 6, .external_lex_state = 1}, + [420] = {.lex_state = 5, .external_lex_state = 1}, + [421] = {.lex_state = 93, .external_lex_state = 1}, + [422] = {.lex_state = 93, .external_lex_state = 1}, + [423] = {.lex_state = 93, .external_lex_state = 1}, + [424] = {.lex_state = 5, .external_lex_state = 1}, + [425] = {.lex_state = 6, .external_lex_state = 1}, + [426] = {.lex_state = 6, .external_lex_state = 1}, + [427] = {.lex_state = 5, .external_lex_state = 1}, + [428] = {.lex_state = 93, .external_lex_state = 1}, + [429] = {.lex_state = 5, .external_lex_state = 1}, + [430] = {.lex_state = 6, .external_lex_state = 1}, + [431] = {.lex_state = 5, .external_lex_state = 1}, + [432] = {.lex_state = 5, .external_lex_state = 1}, + [433] = {.lex_state = 5, .external_lex_state = 1}, + [434] = {.lex_state = 5, .external_lex_state = 1}, + [435] = {.lex_state = 5, .external_lex_state = 1}, + [436] = {.lex_state = 5, .external_lex_state = 1}, + [437] = {.lex_state = 6, .external_lex_state = 1}, + [438] = {.lex_state = 93, .external_lex_state = 1}, + [439] = {.lex_state = 93, .external_lex_state = 1}, + [440] = {.lex_state = 6, .external_lex_state = 1}, + [441] = {.lex_state = 94, .external_lex_state = 2}, + [442] = {.lex_state = 6, .external_lex_state = 1}, + [443] = {.lex_state = 93, .external_lex_state = 1}, + [444] = {.lex_state = 6, .external_lex_state = 1}, + [445] = {.lex_state = 6, .external_lex_state = 1}, + [446] = {.lex_state = 93, .external_lex_state = 1}, + [447] = {.lex_state = 6, .external_lex_state = 1}, + [448] = {.lex_state = 93, .external_lex_state = 1}, + [449] = {.lex_state = 5, .external_lex_state = 1}, + [450] = {.lex_state = 93, .external_lex_state = 1}, + [451] = {.lex_state = 5, .external_lex_state = 1}, + [452] = {.lex_state = 5, .external_lex_state = 1}, + [453] = {.lex_state = 93, .external_lex_state = 1}, + [454] = {.lex_state = 5, .external_lex_state = 1}, + [455] = {.lex_state = 93, .external_lex_state = 1}, + [456] = {.lex_state = 5, .external_lex_state = 1}, + [457] = {.lex_state = 5, .external_lex_state = 1}, + [458] = {.lex_state = 93, .external_lex_state = 1}, + [459] = {.lex_state = 5, .external_lex_state = 1}, + [460] = {.lex_state = 93, .external_lex_state = 1}, + [461] = {.lex_state = 93, .external_lex_state = 1}, + [462] = {.lex_state = 5, .external_lex_state = 1}, + [463] = {.lex_state = 5, .external_lex_state = 1}, + [464] = {.lex_state = 93, .external_lex_state = 1}, + [465] = {.lex_state = 5, .external_lex_state = 1}, + [466] = {.lex_state = 93, .external_lex_state = 1}, + [467] = {.lex_state = 93, .external_lex_state = 1}, + [468] = {.lex_state = 5, .external_lex_state = 1}, + [469] = {.lex_state = 5, .external_lex_state = 1}, + [470] = {.lex_state = 5, .external_lex_state = 1}, + [471] = {.lex_state = 93, .external_lex_state = 1}, + [472] = {.lex_state = 92, .external_lex_state = 1}, + [473] = {.lex_state = 92, .external_lex_state = 1}, + [474] = {.lex_state = 92, .external_lex_state = 1}, + [475] = {.lex_state = 92, .external_lex_state = 1}, + [476] = {.lex_state = 92, .external_lex_state = 1}, + [477] = {.lex_state = 92, .external_lex_state = 1}, + [478] = {.lex_state = 92, .external_lex_state = 1}, + [479] = {.lex_state = 92, .external_lex_state = 1}, + [480] = {.lex_state = 92, .external_lex_state = 1}, + [481] = {.lex_state = 92, .external_lex_state = 1}, + [482] = {.lex_state = 92, .external_lex_state = 1}, + [483] = {.lex_state = 92, .external_lex_state = 1}, + [484] = {.lex_state = 92, .external_lex_state = 1}, + [485] = {.lex_state = 92, .external_lex_state = 1}, + [486] = {.lex_state = 92, .external_lex_state = 1}, + [487] = {.lex_state = 92, .external_lex_state = 1}, + [488] = {.lex_state = 92, .external_lex_state = 1}, + [489] = {.lex_state = 92, .external_lex_state = 1}, + [490] = {.lex_state = 92, .external_lex_state = 1}, + [491] = {.lex_state = 92, .external_lex_state = 1}, + [492] = {.lex_state = 92, .external_lex_state = 1}, + [493] = {.lex_state = 92, .external_lex_state = 1}, + [494] = {.lex_state = 92, .external_lex_state = 1}, + [495] = {.lex_state = 92, .external_lex_state = 1}, + [496] = {.lex_state = 92, .external_lex_state = 1}, + [497] = {.lex_state = 92, .external_lex_state = 1}, + [498] = {.lex_state = 92, .external_lex_state = 1}, + [499] = {.lex_state = 92, .external_lex_state = 1}, + [500] = {.lex_state = 92, .external_lex_state = 1}, + [501] = {.lex_state = 92, .external_lex_state = 1}, + [502] = {.lex_state = 92, .external_lex_state = 1}, + [503] = {.lex_state = 92, .external_lex_state = 1}, + [504] = {.lex_state = 92, .external_lex_state = 1}, + [505] = {.lex_state = 92, .external_lex_state = 1}, + [506] = {.lex_state = 92, .external_lex_state = 1}, + [507] = {.lex_state = 92, .external_lex_state = 1}, + [508] = {.lex_state = 92, .external_lex_state = 1}, + [509] = {.lex_state = 92, .external_lex_state = 1}, + [510] = {.lex_state = 92, .external_lex_state = 1}, + [511] = {.lex_state = 92, .external_lex_state = 1}, + [512] = {.lex_state = 92, .external_lex_state = 1}, + [513] = {.lex_state = 92, .external_lex_state = 1}, + [514] = {.lex_state = 92, .external_lex_state = 1}, + [515] = {.lex_state = 92, .external_lex_state = 1}, + [516] = {.lex_state = 92, .external_lex_state = 1}, + [517] = {.lex_state = 92, .external_lex_state = 1}, + [518] = {.lex_state = 92, .external_lex_state = 1}, + [519] = {.lex_state = 92, .external_lex_state = 1}, + [520] = {.lex_state = 92, .external_lex_state = 1}, + [521] = {.lex_state = 92, .external_lex_state = 1}, + [522] = {.lex_state = 92, .external_lex_state = 1}, + [523] = {.lex_state = 92, .external_lex_state = 1}, + [524] = {.lex_state = 92, .external_lex_state = 1}, + [525] = {.lex_state = 92, .external_lex_state = 1}, + [526] = {.lex_state = 92, .external_lex_state = 1}, + [527] = {.lex_state = 92, .external_lex_state = 1}, + [528] = {.lex_state = 92, .external_lex_state = 1}, + [529] = {.lex_state = 92, .external_lex_state = 1}, + [530] = {.lex_state = 92, .external_lex_state = 1}, + [531] = {.lex_state = 92, .external_lex_state = 1}, + [532] = {.lex_state = 92, .external_lex_state = 1}, + [533] = {.lex_state = 92, .external_lex_state = 1}, + [534] = {.lex_state = 92, .external_lex_state = 1}, + [535] = {.lex_state = 92, .external_lex_state = 1}, + [536] = {.lex_state = 92, .external_lex_state = 1}, + [537] = {.lex_state = 92, .external_lex_state = 1}, + [538] = {.lex_state = 92, .external_lex_state = 1}, + [539] = {.lex_state = 92, .external_lex_state = 1}, + [540] = {.lex_state = 92, .external_lex_state = 1}, + [541] = {.lex_state = 92, .external_lex_state = 1}, + [542] = {.lex_state = 92, .external_lex_state = 1}, + [543] = {.lex_state = 92, .external_lex_state = 1}, + [544] = {.lex_state = 92, .external_lex_state = 1}, + [545] = {.lex_state = 92, .external_lex_state = 1}, + [546] = {.lex_state = 92, .external_lex_state = 1}, + [547] = {.lex_state = 92, .external_lex_state = 1}, + [548] = {.lex_state = 92, .external_lex_state = 1}, + [549] = {.lex_state = 92, .external_lex_state = 1}, + [550] = {.lex_state = 92, .external_lex_state = 1}, + [551] = {.lex_state = 92, .external_lex_state = 1}, + [552] = {.lex_state = 92, .external_lex_state = 1}, + [553] = {.lex_state = 92, .external_lex_state = 1}, + [554] = {.lex_state = 92, .external_lex_state = 1}, + [555] = {.lex_state = 92, .external_lex_state = 1}, + [556] = {.lex_state = 92, .external_lex_state = 1}, + [557] = {.lex_state = 92, .external_lex_state = 1}, + [558] = {.lex_state = 92, .external_lex_state = 1}, + [559] = {.lex_state = 92, .external_lex_state = 1}, + [560] = {.lex_state = 92, .external_lex_state = 1}, + [561] = {.lex_state = 92, .external_lex_state = 1}, + [562] = {.lex_state = 92, .external_lex_state = 1}, + [563] = {.lex_state = 92, .external_lex_state = 1}, + [564] = {.lex_state = 92, .external_lex_state = 1}, + [565] = {.lex_state = 92, .external_lex_state = 1}, + [566] = {.lex_state = 92, .external_lex_state = 1}, + [567] = {.lex_state = 92, .external_lex_state = 1}, + [568] = {.lex_state = 92, .external_lex_state = 1}, + [569] = {.lex_state = 92, .external_lex_state = 1}, + [570] = {.lex_state = 92, .external_lex_state = 1}, + [571] = {.lex_state = 92, .external_lex_state = 1}, + [572] = {.lex_state = 92, .external_lex_state = 1}, + [573] = {.lex_state = 92, .external_lex_state = 1}, + [574] = {.lex_state = 92, .external_lex_state = 1}, + [575] = {.lex_state = 92, .external_lex_state = 1}, + [576] = {.lex_state = 92, .external_lex_state = 1}, + [577] = {.lex_state = 92, .external_lex_state = 1}, + [578] = {.lex_state = 92, .external_lex_state = 1}, + [579] = {.lex_state = 92, .external_lex_state = 1}, + [580] = {.lex_state = 92, .external_lex_state = 1}, + [581] = {.lex_state = 92, .external_lex_state = 1}, + [582] = {.lex_state = 92, .external_lex_state = 1}, + [583] = {.lex_state = 92, .external_lex_state = 1}, + [584] = {.lex_state = 92, .external_lex_state = 1}, + [585] = {.lex_state = 92, .external_lex_state = 1}, + [586] = {.lex_state = 92, .external_lex_state = 1}, + [587] = {.lex_state = 92, .external_lex_state = 1}, + [588] = {.lex_state = 92, .external_lex_state = 1}, + [589] = {.lex_state = 92, .external_lex_state = 1}, + [590] = {.lex_state = 92, .external_lex_state = 1}, + [591] = {.lex_state = 92, .external_lex_state = 1}, + [592] = {.lex_state = 92, .external_lex_state = 1}, + [593] = {.lex_state = 92, .external_lex_state = 1}, + [594] = {.lex_state = 92, .external_lex_state = 1}, + [595] = {.lex_state = 92, .external_lex_state = 1}, + [596] = {.lex_state = 92, .external_lex_state = 1}, + [597] = {.lex_state = 92, .external_lex_state = 1}, + [598] = {.lex_state = 92, .external_lex_state = 1}, + [599] = {.lex_state = 92, .external_lex_state = 1}, + [600] = {.lex_state = 92, .external_lex_state = 1}, + [601] = {.lex_state = 92, .external_lex_state = 1}, + [602] = {.lex_state = 92, .external_lex_state = 1}, + [603] = {.lex_state = 92, .external_lex_state = 1}, + [604] = {.lex_state = 92, .external_lex_state = 1}, + [605] = {.lex_state = 92, .external_lex_state = 1}, + [606] = {.lex_state = 92, .external_lex_state = 1}, + [607] = {.lex_state = 92, .external_lex_state = 1}, + [608] = {.lex_state = 92, .external_lex_state = 1}, + [609] = {.lex_state = 92, .external_lex_state = 1}, + [610] = {.lex_state = 92, .external_lex_state = 1}, + [611] = {.lex_state = 92, .external_lex_state = 1}, + [612] = {.lex_state = 92, .external_lex_state = 1}, + [613] = {.lex_state = 92, .external_lex_state = 1}, + [614] = {.lex_state = 92, .external_lex_state = 1}, + [615] = {.lex_state = 92, .external_lex_state = 1}, + [616] = {.lex_state = 92, .external_lex_state = 1}, + [617] = {.lex_state = 92, .external_lex_state = 1}, + [618] = {.lex_state = 92, .external_lex_state = 1}, + [619] = {.lex_state = 92, .external_lex_state = 1}, + [620] = {.lex_state = 92, .external_lex_state = 1}, + [621] = {.lex_state = 92, .external_lex_state = 1}, + [622] = {.lex_state = 92, .external_lex_state = 1}, + [623] = {.lex_state = 92, .external_lex_state = 1}, + [624] = {.lex_state = 92, .external_lex_state = 1}, + [625] = {.lex_state = 92, .external_lex_state = 1}, + [626] = {.lex_state = 92, .external_lex_state = 1}, + [627] = {.lex_state = 92, .external_lex_state = 1}, + [628] = {.lex_state = 92, .external_lex_state = 1}, + [629] = {.lex_state = 92, .external_lex_state = 1}, + [630] = {.lex_state = 92, .external_lex_state = 1}, + [631] = {.lex_state = 92, .external_lex_state = 1}, + [632] = {.lex_state = 92, .external_lex_state = 1}, + [633] = {.lex_state = 92, .external_lex_state = 1}, + [634] = {.lex_state = 92, .external_lex_state = 1}, + [635] = {.lex_state = 92, .external_lex_state = 1}, + [636] = {.lex_state = 92, .external_lex_state = 1}, + [637] = {.lex_state = 92, .external_lex_state = 1}, + [638] = {.lex_state = 92, .external_lex_state = 1}, + [639] = {.lex_state = 92, .external_lex_state = 1}, + [640] = {.lex_state = 94, .external_lex_state = 2}, + [641] = {.lex_state = 94, .external_lex_state = 2}, + [642] = {.lex_state = 94, .external_lex_state = 2}, + [643] = {.lex_state = 94, .external_lex_state = 2}, + [644] = {.lex_state = 94, .external_lex_state = 2}, + [645] = {.lex_state = 94, .external_lex_state = 2}, + [646] = {.lex_state = 94, .external_lex_state = 2}, + [647] = {.lex_state = 94, .external_lex_state = 2}, + [648] = {.lex_state = 94, .external_lex_state = 2}, + [649] = {.lex_state = 94, .external_lex_state = 2}, + [650] = {.lex_state = 94, .external_lex_state = 2}, + [651] = {.lex_state = 94, .external_lex_state = 2}, + [652] = {.lex_state = 94, .external_lex_state = 2}, + [653] = {.lex_state = 94, .external_lex_state = 2}, + [654] = {.lex_state = 94, .external_lex_state = 2}, + [655] = {.lex_state = 94, .external_lex_state = 2}, + [656] = {.lex_state = 94, .external_lex_state = 2}, + [657] = {.lex_state = 94, .external_lex_state = 2}, + [658] = {.lex_state = 94, .external_lex_state = 2}, + [659] = {.lex_state = 94, .external_lex_state = 2}, + [660] = {.lex_state = 94, .external_lex_state = 2}, + [661] = {.lex_state = 94, .external_lex_state = 2}, + [662] = {.lex_state = 94, .external_lex_state = 2}, + [663] = {.lex_state = 94, .external_lex_state = 2}, + [664] = {.lex_state = 94, .external_lex_state = 2}, + [665] = {.lex_state = 94, .external_lex_state = 2}, + [666] = {.lex_state = 94, .external_lex_state = 2}, + [667] = {.lex_state = 94, .external_lex_state = 2}, + [668] = {.lex_state = 94, .external_lex_state = 2}, + [669] = {.lex_state = 94, .external_lex_state = 2}, + [670] = {.lex_state = 94, .external_lex_state = 2}, + [671] = {.lex_state = 94, .external_lex_state = 2}, + [672] = {.lex_state = 11, .external_lex_state = 2}, + [673] = {.lex_state = 0, .external_lex_state = 2}, + [674] = {.lex_state = 0, .external_lex_state = 2}, + [675] = {.lex_state = 0, .external_lex_state = 1}, + [676] = {.lex_state = 0, .external_lex_state = 1}, + [677] = {.lex_state = 12, .external_lex_state = 2}, + [678] = {.lex_state = 0, .external_lex_state = 2}, + [679] = {.lex_state = 0, .external_lex_state = 2}, + [680] = {.lex_state = 10, .external_lex_state = 2}, + [681] = {.lex_state = 0, .external_lex_state = 2}, + [682] = {.lex_state = 0, .external_lex_state = 2}, + [683] = {.lex_state = 0, .external_lex_state = 2}, + [684] = {.lex_state = 0, .external_lex_state = 2}, + [685] = {.lex_state = 0, .external_lex_state = 2}, + [686] = {.lex_state = 0, .external_lex_state = 2}, + [687] = {.lex_state = 0, .external_lex_state = 2}, + [688] = {.lex_state = 0, .external_lex_state = 2}, + [689] = {.lex_state = 10, .external_lex_state = 2}, + [690] = {.lex_state = 10, .external_lex_state = 2}, + [691] = {.lex_state = 10, .external_lex_state = 2}, + [692] = {.lex_state = 0, .external_lex_state = 2}, + [693] = {.lex_state = 0, .external_lex_state = 2}, + [694] = {.lex_state = 0, .external_lex_state = 2}, + [695] = {.lex_state = 0, .external_lex_state = 2}, + [696] = {.lex_state = 0, .external_lex_state = 2}, + [697] = {.lex_state = 0, .external_lex_state = 2}, + [698] = {.lex_state = 0, .external_lex_state = 2}, + [699] = {.lex_state = 0, .external_lex_state = 2}, + [700] = {.lex_state = 0, .external_lex_state = 2}, + [701] = {.lex_state = 0, .external_lex_state = 2}, + [702] = {.lex_state = 0, .external_lex_state = 1}, + [703] = {.lex_state = 0, .external_lex_state = 2}, + [704] = {.lex_state = 0, .external_lex_state = 1}, + [705] = {.lex_state = 0, .external_lex_state = 2}, + [706] = {.lex_state = 0, .external_lex_state = 1}, + [707] = {.lex_state = 0, .external_lex_state = 1}, + [708] = {.lex_state = 0, .external_lex_state = 2}, + [709] = {.lex_state = 0, .external_lex_state = 2}, + [710] = {.lex_state = 0, .external_lex_state = 1}, + [711] = {.lex_state = 0, .external_lex_state = 2}, + [712] = {.lex_state = 0, .external_lex_state = 2}, + [713] = {.lex_state = 0, .external_lex_state = 2}, + [714] = {.lex_state = 0, .external_lex_state = 2}, + [715] = {.lex_state = 0, .external_lex_state = 2}, + [716] = {.lex_state = 0, .external_lex_state = 2}, + [717] = {.lex_state = 0, .external_lex_state = 2}, + [718] = {.lex_state = 0, .external_lex_state = 2}, + [719] = {.lex_state = 0, .external_lex_state = 2}, + [720] = {.lex_state = 0, .external_lex_state = 2}, + [721] = {.lex_state = 0, .external_lex_state = 2}, + [722] = {.lex_state = 0, .external_lex_state = 2}, + [723] = {.lex_state = 0, .external_lex_state = 2}, + [724] = {.lex_state = 0, .external_lex_state = 2}, + [725] = {.lex_state = 0, .external_lex_state = 2}, + [726] = {.lex_state = 45, .external_lex_state = 2}, + [727] = {.lex_state = 45, .external_lex_state = 2}, + [728] = {.lex_state = 0, .external_lex_state = 2}, + [729] = {.lex_state = 0, .external_lex_state = 2}, + [730] = {.lex_state = 0, .external_lex_state = 2}, + [731] = {.lex_state = 0, .external_lex_state = 2}, + [732] = {.lex_state = 0, .external_lex_state = 2}, + [733] = {.lex_state = 10, .external_lex_state = 2}, + [734] = {.lex_state = 0, .external_lex_state = 2}, + [735] = {.lex_state = 0, .external_lex_state = 2}, + [736] = {.lex_state = 0, .external_lex_state = 2}, + [737] = {.lex_state = 0, .external_lex_state = 2}, + [738] = {.lex_state = 10, .external_lex_state = 2}, + [739] = {.lex_state = 0, .external_lex_state = 2}, + [740] = {.lex_state = 0, .external_lex_state = 2}, + [741] = {.lex_state = 0, .external_lex_state = 2}, + [742] = {.lex_state = 0, .external_lex_state = 2}, + [743] = {.lex_state = 0, .external_lex_state = 2}, + [744] = {.lex_state = 45, .external_lex_state = 2}, + [745] = {.lex_state = 0, .external_lex_state = 2}, + [746] = {.lex_state = 0, .external_lex_state = 2}, + [747] = {.lex_state = 10, .external_lex_state = 2}, + [748] = {.lex_state = 0, .external_lex_state = 2}, + [749] = {.lex_state = 0, .external_lex_state = 2}, + [750] = {.lex_state = 45, .external_lex_state = 2}, + [751] = {.lex_state = 0, .external_lex_state = 2}, + [752] = {.lex_state = 0, .external_lex_state = 2}, + [753] = {.lex_state = 0, .external_lex_state = 2}, + [754] = {.lex_state = 10, .external_lex_state = 2}, + [755] = {.lex_state = 0, .external_lex_state = 2}, + [756] = {.lex_state = 0, .external_lex_state = 2}, + [757] = {.lex_state = 0, .external_lex_state = 2}, + [758] = {.lex_state = 0, .external_lex_state = 2}, + [759] = {.lex_state = 0, .external_lex_state = 2}, + [760] = {.lex_state = 0, .external_lex_state = 2}, + [761] = {.lex_state = 0, .external_lex_state = 2}, + [762] = {.lex_state = 0, .external_lex_state = 2}, + [763] = {.lex_state = 10, .external_lex_state = 2}, + [764] = {.lex_state = 0, .external_lex_state = 2}, + [765] = {.lex_state = 0, .external_lex_state = 2}, + [766] = {.lex_state = 0, .external_lex_state = 2}, + [767] = {.lex_state = 0, .external_lex_state = 2}, + [768] = {.lex_state = 0, .external_lex_state = 2}, + [769] = {.lex_state = 0, .external_lex_state = 2}, + [770] = {.lex_state = 0, .external_lex_state = 2}, + [771] = {.lex_state = 0, .external_lex_state = 2}, + [772] = {.lex_state = 0, .external_lex_state = 2}, + [773] = {.lex_state = 0, .external_lex_state = 2}, + [774] = {.lex_state = 0, .external_lex_state = 2}, + [775] = {.lex_state = 0, .external_lex_state = 2}, + [776] = {.lex_state = 0, .external_lex_state = 2}, + [777] = {.lex_state = 0, .external_lex_state = 2}, + [778] = {.lex_state = 0, .external_lex_state = 2}, + [779] = {.lex_state = 10, .external_lex_state = 2}, + [780] = {.lex_state = 10, .external_lex_state = 2}, + [781] = {.lex_state = 0, .external_lex_state = 2}, + [782] = {.lex_state = 10, .external_lex_state = 2}, + [783] = {.lex_state = 0, .external_lex_state = 2}, + [784] = {.lex_state = 0, .external_lex_state = 2}, + [785] = {.lex_state = 10, .external_lex_state = 2}, + [786] = {.lex_state = 10, .external_lex_state = 2}, + [787] = {.lex_state = 0, .external_lex_state = 2}, + [788] = {.lex_state = 10, .external_lex_state = 2}, + [789] = {.lex_state = 0, .external_lex_state = 2}, + [790] = {.lex_state = 0, .external_lex_state = 2}, + [791] = {.lex_state = 0, .external_lex_state = 2}, + [792] = {.lex_state = 0, .external_lex_state = 2}, + [793] = {.lex_state = 0, .external_lex_state = 2}, + [794] = {.lex_state = 0, .external_lex_state = 2}, + [795] = {.lex_state = 0, .external_lex_state = 2}, + [796] = {.lex_state = 0, .external_lex_state = 2}, + [797] = {.lex_state = 0, .external_lex_state = 2}, + [798] = {.lex_state = 0, .external_lex_state = 2}, + [799] = {.lex_state = 10, .external_lex_state = 2}, + [800] = {.lex_state = 10, .external_lex_state = 2}, + [801] = {.lex_state = 10, .external_lex_state = 2}, + [802] = {.lex_state = 0, .external_lex_state = 2}, + [803] = {.lex_state = 0, .external_lex_state = 2}, + [804] = {.lex_state = 10, .external_lex_state = 2}, + [805] = {.lex_state = 0, .external_lex_state = 2}, + [806] = {.lex_state = 0, .external_lex_state = 2}, + [807] = {.lex_state = 10, .external_lex_state = 2}, + [808] = {.lex_state = 0, .external_lex_state = 2}, + [809] = {.lex_state = 0, .external_lex_state = 2}, + [810] = {.lex_state = 10, .external_lex_state = 2}, + [811] = {.lex_state = 0, .external_lex_state = 2}, + [812] = {.lex_state = 0, .external_lex_state = 2}, + [813] = {.lex_state = 10, .external_lex_state = 2}, + [814] = {.lex_state = 0, .external_lex_state = 2}, + [815] = {.lex_state = 0, .external_lex_state = 2}, + [816] = {.lex_state = 0, .external_lex_state = 2}, + [817] = {.lex_state = 0, .external_lex_state = 2}, + [818] = {.lex_state = 0, .external_lex_state = 2}, + [819] = {.lex_state = 0, .external_lex_state = 2}, + [820] = {.lex_state = 0, .external_lex_state = 2}, + [821] = {.lex_state = 0, .external_lex_state = 2}, + [822] = {.lex_state = 0, .external_lex_state = 2}, + [823] = {.lex_state = 0, .external_lex_state = 2}, + [824] = {.lex_state = 0, .external_lex_state = 2}, + [825] = {.lex_state = 0, .external_lex_state = 2}, + [826] = {.lex_state = 0, .external_lex_state = 2}, + [827] = {.lex_state = 0, .external_lex_state = 2}, + [828] = {.lex_state = 0, .external_lex_state = 2}, + [829] = {.lex_state = 0, .external_lex_state = 2}, + [830] = {.lex_state = 0, .external_lex_state = 2}, + [831] = {.lex_state = 0, .external_lex_state = 2}, + [832] = {.lex_state = 0, .external_lex_state = 2}, + [833] = {.lex_state = 0, .external_lex_state = 2}, + [834] = {.lex_state = 0, .external_lex_state = 2}, + [835] = {.lex_state = 0, .external_lex_state = 2}, + [836] = {.lex_state = 0, .external_lex_state = 2}, + [837] = {.lex_state = 0, .external_lex_state = 2}, + [838] = {.lex_state = 0, .external_lex_state = 2}, + [839] = {.lex_state = 10, .external_lex_state = 2}, + [840] = {.lex_state = 10, .external_lex_state = 2}, + [841] = {.lex_state = 0, .external_lex_state = 2}, + [842] = {.lex_state = 10, .external_lex_state = 2}, + [843] = {.lex_state = 0, .external_lex_state = 2}, + [844] = {.lex_state = 0, .external_lex_state = 2}, + [845] = {.lex_state = 0, .external_lex_state = 2}, + [846] = {.lex_state = 0, .external_lex_state = 2}, + [847] = {.lex_state = 0, .external_lex_state = 2}, + [848] = {.lex_state = 0, .external_lex_state = 2}, + [849] = {.lex_state = 0, .external_lex_state = 2}, + [850] = {.lex_state = 0, .external_lex_state = 2}, + [851] = {.lex_state = 0, .external_lex_state = 2}, + [852] = {.lex_state = 0, .external_lex_state = 2}, + [853] = {.lex_state = 0, .external_lex_state = 2}, + [854] = {.lex_state = 0, .external_lex_state = 2}, + [855] = {.lex_state = 0, .external_lex_state = 2}, + [856] = {.lex_state = 0, .external_lex_state = 2}, + [857] = {.lex_state = 10, .external_lex_state = 2}, + [858] = {.lex_state = 0, .external_lex_state = 2}, + [859] = {.lex_state = 10, .external_lex_state = 2}, + [860] = {.lex_state = 0, .external_lex_state = 2}, + [861] = {.lex_state = 0, .external_lex_state = 2}, + [862] = {.lex_state = 0, .external_lex_state = 2}, + [863] = {.lex_state = 0, .external_lex_state = 2}, + [864] = {.lex_state = 0, .external_lex_state = 2}, + [865] = {.lex_state = 10, .external_lex_state = 2}, + [866] = {.lex_state = 0, .external_lex_state = 2}, + [867] = {.lex_state = 10, .external_lex_state = 2}, + [868] = {.lex_state = 10, .external_lex_state = 2}, + [869] = {.lex_state = 0, .external_lex_state = 2}, + [870] = {.lex_state = 0, .external_lex_state = 2}, + [871] = {.lex_state = 0, .external_lex_state = 2}, + [872] = {.lex_state = 10, .external_lex_state = 2}, + [873] = {.lex_state = 10, .external_lex_state = 2}, + [874] = {.lex_state = 0, .external_lex_state = 2}, + [875] = {.lex_state = 10, .external_lex_state = 2}, + [876] = {.lex_state = 10, .external_lex_state = 2}, + [877] = {.lex_state = 0, .external_lex_state = 2}, + [878] = {.lex_state = 0, .external_lex_state = 2}, + [879] = {.lex_state = 0, .external_lex_state = 2}, + [880] = {.lex_state = 10, .external_lex_state = 2}, + [881] = {.lex_state = 0, .external_lex_state = 2}, + [882] = {.lex_state = 0, .external_lex_state = 2}, + [883] = {.lex_state = 0, .external_lex_state = 2}, + [884] = {.lex_state = 0, .external_lex_state = 2}, + [885] = {.lex_state = 0, .external_lex_state = 2}, + [886] = {.lex_state = 0, .external_lex_state = 2}, + [887] = {.lex_state = 10, .external_lex_state = 2}, + [888] = {.lex_state = 0, .external_lex_state = 2}, + [889] = {.lex_state = 10, .external_lex_state = 2}, + [890] = {.lex_state = 10, .external_lex_state = 2}, + [891] = {.lex_state = 10, .external_lex_state = 2}, +}; + +enum { + ts_external_token_comment = 0, + ts_external_token_string = 1, +}; + +static TSSymbol ts_external_scanner_symbol_map[EXTERNAL_TOKEN_COUNT] = { + [ts_external_token_comment] = sym_comment, + [ts_external_token_string] = sym_string, +}; + +static bool ts_external_scanner_states[3][EXTERNAL_TOKEN_COUNT] = { + [1] = { + [ts_external_token_comment] = true, + [ts_external_token_string] = true, + }, + [2] = { + [ts_external_token_comment] = true, + }, +}; + +static uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { + [0] = { + [ts_builtin_sym_end] = ACTIONS(1), + [anon_sym_return] = ACTIONS(1), + [anon_sym_COMMA] = ACTIONS(1), + [anon_sym_EQ] = ACTIONS(1), + [anon_sym_local] = ACTIONS(1), + [anon_sym_LBRACK] = ACTIONS(1), + [anon_sym_RBRACK] = ACTIONS(1), + [anon_sym_DOT] = ACTIONS(1), + [anon_sym_do] = ACTIONS(1), + [anon_sym_end] = ACTIONS(1), + [anon_sym_if] = ACTIONS(1), + [anon_sym_then] = ACTIONS(1), + [anon_sym_elseif] = ACTIONS(1), + [anon_sym_else] = ACTIONS(1), + [anon_sym_while] = ACTIONS(1), + [anon_sym_repeat] = ACTIONS(1), + [anon_sym_until] = ACTIONS(1), + [anon_sym_for] = ACTIONS(1), + [anon_sym_in] = ACTIONS(1), + [anon_sym_goto] = ACTIONS(1), + [sym_break_statement] = ACTIONS(1), + [anon_sym_COLON_COLON] = ACTIONS(1), + [anon_sym_SEMI] = ACTIONS(1), + [anon_sym_function] = ACTIONS(1), + [anon_sym_COLON] = ACTIONS(1), + [anon_sym_LPAREN] = ACTIONS(1), + [anon_sym_RPAREN] = ACTIONS(1), + [sym_spread] = ACTIONS(1), + [sym_self] = ACTIONS(1), + [sym_next] = ACTIONS(1), + [anon_sym__G] = ACTIONS(1), + [anon_sym__VERSION] = ACTIONS(1), + [anon_sym_LBRACE] = ACTIONS(1), + [anon_sym_RBRACE] = ACTIONS(1), + [anon_sym_or] = ACTIONS(1), + [anon_sym_and] = ACTIONS(1), + [anon_sym_LT] = ACTIONS(1), + [anon_sym_LT_EQ] = ACTIONS(1), + [anon_sym_EQ_EQ] = ACTIONS(1), + [anon_sym_TILDE_EQ] = ACTIONS(1), + [anon_sym_GT_EQ] = ACTIONS(1), + [anon_sym_GT] = ACTIONS(1), + [anon_sym_PIPE] = ACTIONS(1), + [anon_sym_TILDE] = ACTIONS(1), + [anon_sym_AMP] = ACTIONS(1), + [anon_sym_LT_LT] = ACTIONS(1), + [anon_sym_GT_GT] = ACTIONS(1), + [anon_sym_PLUS] = ACTIONS(1), + [anon_sym_DASH] = ACTIONS(1), + [anon_sym_STAR] = ACTIONS(1), + [anon_sym_SLASH] = ACTIONS(1), + [anon_sym_SLASH_SLASH] = ACTIONS(1), + [anon_sym_PERCENT] = ACTIONS(1), + [anon_sym_DOT_DOT] = ACTIONS(1), + [anon_sym_CARET] = ACTIONS(1), + [anon_sym_not] = ACTIONS(1), + [anon_sym_POUND] = ACTIONS(1), + [sym_number] = ACTIONS(1), + [sym_nil] = ACTIONS(1), + [sym_true] = ACTIONS(1), + [sym_false] = ACTIONS(1), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(1), + }, + [1] = { + [sym_program] = STATE(884), + [sym_return_statement] = STATE(883), + [sym_variable_declaration_statement] = STATE(29), + [sym_variable_declaration] = STATE(438), + [sym_local_variable_declaration_statement] = STATE(29), + [sym_local_variable_declaration] = STATE(448), + [sym__variable_declarator] = STATE(90), + [sym_field_expression] = STATE(96), + [sym_do_statement] = STATE(29), + [sym_if_statement] = STATE(29), + [sym_while_statement] = STATE(29), + [sym_repeat_statement] = STATE(29), + [sym_for_statement] = STATE(29), + [sym_for_in_statement] = STATE(29), + [sym_goto_statement] = STATE(29), + [sym_label_statement] = STATE(29), + [sym__empty_statement] = STATE(29), + [sym_function_statement] = STATE(29), + [sym_local_function_statement] = STATE(29), + [sym_function_call_statement] = STATE(29), + [sym_function_call] = STATE(150), + [sym__expression] = STATE(268), + [sym_global_variable] = STATE(79), + [sym__prefix] = STATE(79), + [sym_function_definition] = STATE(205), + [sym_table] = STATE(205), + [sym_binary_operation] = STATE(205), + [sym_unary_operation] = STATE(205), + [aux_sym_program_repeat1] = STATE(29), + [ts_builtin_sym_end] = ACTIONS(5), + [anon_sym_return] = ACTIONS(7), + [anon_sym_local] = ACTIONS(9), + [anon_sym_do] = ACTIONS(11), + [anon_sym_if] = ACTIONS(13), + [anon_sym_while] = ACTIONS(15), + [anon_sym_repeat] = ACTIONS(17), + [anon_sym_for] = ACTIONS(19), + [anon_sym_goto] = ACTIONS(21), + [sym_break_statement] = ACTIONS(23), + [anon_sym_COLON_COLON] = ACTIONS(25), + [anon_sym_SEMI] = ACTIONS(27), + [anon_sym_function] = ACTIONS(29), + [anon_sym_LPAREN] = ACTIONS(31), + [sym_spread] = ACTIONS(33), + [sym_self] = ACTIONS(35), + [sym_next] = ACTIONS(37), + [anon_sym__G] = ACTIONS(39), + [anon_sym__VERSION] = ACTIONS(39), + [anon_sym_LBRACE] = ACTIONS(41), + [anon_sym_TILDE] = ACTIONS(43), + [anon_sym_DASH] = ACTIONS(43), + [anon_sym_not] = ACTIONS(45), + [anon_sym_POUND] = ACTIONS(43), + [sym_number] = ACTIONS(33), + [sym_nil] = ACTIONS(37), + [sym_true] = ACTIONS(37), + [sym_false] = ACTIONS(37), + [sym_identifier] = ACTIONS(47), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(33), + }, + [2] = { + [sym_return_statement] = STATE(692), + [sym_variable_declaration_statement] = STATE(4), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(4), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(4), + [sym_if_statement] = STATE(4), + [sym_elseif] = STATE(693), + [sym_else] = STATE(815), + [sym_while_statement] = STATE(4), + [sym_repeat_statement] = STATE(4), + [sym_for_statement] = STATE(4), + [sym_for_in_statement] = STATE(4), + [sym_goto_statement] = STATE(4), + [sym_label_statement] = STATE(4), + [sym__empty_statement] = STATE(4), + [sym_function_statement] = STATE(4), + [sym_local_function_statement] = STATE(4), + [sym_function_call_statement] = STATE(4), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(4), + [aux_sym_if_statement_repeat1] = STATE(693), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(55), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(71), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(75), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [3] = { + [sym_return_statement] = STATE(681), + [sym_variable_declaration_statement] = STATE(13), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(13), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_elseif] = STATE(682), + [sym_else] = STATE(771), + [sym_while_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_for_in_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym_label_statement] = STATE(13), + [sym__empty_statement] = STATE(13), + [sym_function_statement] = STATE(13), + [sym_local_function_statement] = STATE(13), + [sym_function_call_statement] = STATE(13), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(13), + [aux_sym_if_statement_repeat1] = STATE(682), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(97), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(99), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(101), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [4] = { + [sym_return_statement] = STATE(687), + [sym_variable_declaration_statement] = STATE(13), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(13), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_elseif] = STATE(694), + [sym_else] = STATE(825), + [sym_while_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_for_in_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym_label_statement] = STATE(13), + [sym__empty_statement] = STATE(13), + [sym_function_statement] = STATE(13), + [sym_local_function_statement] = STATE(13), + [sym_function_call_statement] = STATE(13), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(13), + [aux_sym_if_statement_repeat1] = STATE(694), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(103), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(99), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(101), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [5] = { + [sym_return_statement] = STATE(688), + [sym_variable_declaration_statement] = STATE(7), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(7), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(7), + [sym_if_statement] = STATE(7), + [sym_elseif] = STATE(679), + [sym_else] = STATE(784), + [sym_while_statement] = STATE(7), + [sym_repeat_statement] = STATE(7), + [sym_for_statement] = STATE(7), + [sym_for_in_statement] = STATE(7), + [sym_goto_statement] = STATE(7), + [sym_label_statement] = STATE(7), + [sym__empty_statement] = STATE(7), + [sym_function_statement] = STATE(7), + [sym_local_function_statement] = STATE(7), + [sym_function_call_statement] = STATE(7), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(7), + [aux_sym_if_statement_repeat1] = STATE(679), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(105), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(107), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(109), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [6] = { + [sym_return_statement] = STATE(686), + [sym_variable_declaration_statement] = STATE(3), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(3), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(3), + [sym_if_statement] = STATE(3), + [sym_elseif] = STATE(684), + [sym_else] = STATE(767), + [sym_while_statement] = STATE(3), + [sym_repeat_statement] = STATE(3), + [sym_for_statement] = STATE(3), + [sym_for_in_statement] = STATE(3), + [sym_goto_statement] = STATE(3), + [sym_label_statement] = STATE(3), + [sym__empty_statement] = STATE(3), + [sym_function_statement] = STATE(3), + [sym_local_function_statement] = STATE(3), + [sym_function_call_statement] = STATE(3), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(3), + [aux_sym_if_statement_repeat1] = STATE(684), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(111), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(113), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(115), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [7] = { + [sym_return_statement] = STATE(700), + [sym_variable_declaration_statement] = STATE(13), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(13), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_elseif] = STATE(701), + [sym_else] = STATE(824), + [sym_while_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_for_in_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym_label_statement] = STATE(13), + [sym__empty_statement] = STATE(13), + [sym_function_statement] = STATE(13), + [sym_local_function_statement] = STATE(13), + [sym_function_call_statement] = STATE(13), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(13), + [aux_sym_if_statement_repeat1] = STATE(701), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(117), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(99), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(101), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [8] = { + [sym_return_statement] = STATE(678), + [sym_variable_declaration_statement] = STATE(9), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(9), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(9), + [sym_if_statement] = STATE(9), + [sym_elseif] = STATE(697), + [sym_else] = STATE(846), + [sym_while_statement] = STATE(9), + [sym_repeat_statement] = STATE(9), + [sym_for_statement] = STATE(9), + [sym_for_in_statement] = STATE(9), + [sym_goto_statement] = STATE(9), + [sym_label_statement] = STATE(9), + [sym__empty_statement] = STATE(9), + [sym_function_statement] = STATE(9), + [sym_local_function_statement] = STATE(9), + [sym_function_call_statement] = STATE(9), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(9), + [aux_sym_if_statement_repeat1] = STATE(697), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(119), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(121), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(123), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [9] = { + [sym_return_statement] = STATE(698), + [sym_variable_declaration_statement] = STATE(13), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(13), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_elseif] = STATE(699), + [sym_else] = STATE(836), + [sym_while_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_for_in_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym_label_statement] = STATE(13), + [sym__empty_statement] = STATE(13), + [sym_function_statement] = STATE(13), + [sym_local_function_statement] = STATE(13), + [sym_function_call_statement] = STATE(13), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(13), + [aux_sym_if_statement_repeat1] = STATE(699), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(125), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(59), + [anon_sym_else] = ACTIONS(61), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(99), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(101), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [10] = { + [sym_return_statement] = STATE(724), + [sym_variable_declaration_statement] = STATE(11), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(11), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(11), + [sym_if_statement] = STATE(11), + [sym_while_statement] = STATE(11), + [sym_repeat_statement] = STATE(11), + [sym_for_statement] = STATE(11), + [sym_for_in_statement] = STATE(11), + [sym_goto_statement] = STATE(11), + [sym_label_statement] = STATE(11), + [sym__empty_statement] = STATE(11), + [sym_function_statement] = STATE(11), + [sym_local_function_statement] = STATE(11), + [sym_function_call_statement] = STATE(11), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(11), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(127), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(127), + [anon_sym_else] = ACTIONS(127), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(129), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(131), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, + [11] = { + [sym_return_statement] = STATE(756), + [sym_variable_declaration_statement] = STATE(13), + [sym_variable_declaration] = STATE(382), + [sym_local_variable_declaration_statement] = STATE(13), + [sym_local_variable_declaration] = STATE(384), + [sym__variable_declarator] = STATE(67), + [sym_field_expression] = STATE(72), + [sym_do_statement] = STATE(13), + [sym_if_statement] = STATE(13), + [sym_while_statement] = STATE(13), + [sym_repeat_statement] = STATE(13), + [sym_for_statement] = STATE(13), + [sym_for_in_statement] = STATE(13), + [sym_goto_statement] = STATE(13), + [sym_label_statement] = STATE(13), + [sym__empty_statement] = STATE(13), + [sym_function_statement] = STATE(13), + [sym_local_function_statement] = STATE(13), + [sym_function_call_statement] = STATE(13), + [sym_function_call] = STATE(93), + [sym__expression] = STATE(178), + [sym_global_variable] = STATE(69), + [sym__prefix] = STATE(69), + [sym_function_definition] = STATE(158), + [sym_table] = STATE(158), + [sym_binary_operation] = STATE(158), + [sym_unary_operation] = STATE(158), + [aux_sym_program_repeat1] = STATE(13), + [anon_sym_return] = ACTIONS(49), + [anon_sym_local] = ACTIONS(51), + [anon_sym_do] = ACTIONS(53), + [anon_sym_end] = ACTIONS(133), + [anon_sym_if] = ACTIONS(57), + [anon_sym_elseif] = ACTIONS(133), + [anon_sym_else] = ACTIONS(133), + [anon_sym_while] = ACTIONS(63), + [anon_sym_repeat] = ACTIONS(65), + [anon_sym_for] = ACTIONS(67), + [anon_sym_goto] = ACTIONS(69), + [sym_break_statement] = ACTIONS(99), + [anon_sym_COLON_COLON] = ACTIONS(73), + [anon_sym_SEMI] = ACTIONS(101), + [anon_sym_function] = ACTIONS(77), + [anon_sym_LPAREN] = ACTIONS(79), + [sym_spread] = ACTIONS(81), + [sym_self] = ACTIONS(83), + [sym_next] = ACTIONS(85), + [anon_sym__G] = ACTIONS(87), + [anon_sym__VERSION] = ACTIONS(87), + [anon_sym_LBRACE] = ACTIONS(89), + [anon_sym_TILDE] = ACTIONS(91), + [anon_sym_DASH] = ACTIONS(91), + [anon_sym_not] = ACTIONS(93), + [anon_sym_POUND] = ACTIONS(91), + [sym_number] = ACTIONS(81), + [sym_nil] = ACTIONS(85), + [sym_true] = ACTIONS(85), + [sym_false] = ACTIONS(85), + [sym_identifier] = ACTIONS(95), + [sym_comment] = ACTIONS(3), + [sym_string] = ACTIONS(81), + }, +}; + +static uint16_t ts_small_parse_table[] = { + [0] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(141), 1, + anon_sym_end, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(777), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [127] = 31, + ACTIONS(3), 1, + sym_comment, + ACTIONS(181), 1, + anon_sym_local, + ACTIONS(184), 1, + anon_sym_do, + ACTIONS(187), 1, + anon_sym_if, + ACTIONS(190), 1, + anon_sym_while, + ACTIONS(193), 1, + anon_sym_repeat, + ACTIONS(196), 1, + anon_sym_for, + ACTIONS(199), 1, + anon_sym_goto, + ACTIONS(202), 1, + sym_break_statement, + ACTIONS(205), 1, + anon_sym_COLON_COLON, + ACTIONS(208), 1, + anon_sym_SEMI, + ACTIONS(211), 1, + anon_sym_function, + ACTIONS(214), 1, + anon_sym_LPAREN, + ACTIONS(220), 1, + sym_self, + ACTIONS(229), 1, + anon_sym_LBRACE, + ACTIONS(235), 1, + anon_sym_not, + ACTIONS(238), 1, + sym_identifier, + STATE(67), 1, + sym__variable_declarator, + STATE(72), 1, + sym_field_expression, + STATE(93), 1, + sym_function_call, + STATE(178), 1, + sym__expression, + STATE(382), 1, + sym_variable_declaration, + STATE(384), 1, + sym_local_variable_declaration, + ACTIONS(226), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(69), 2, + sym_global_variable, + sym__prefix, + ACTIONS(217), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(232), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(179), 4, + anon_sym_return, + anon_sym_end, + anon_sym_elseif, + anon_sym_else, + ACTIONS(223), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(13), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [250] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(241), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(811), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [377] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(243), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(843), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [504] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(245), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(850), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [631] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(247), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(847), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [758] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(249), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(852), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [885] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(251), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(854), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1012] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(253), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(856), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1139] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(153), 1, + sym_break_statement, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(157), 1, + anon_sym_SEMI, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(255), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + STATE(828), 2, + sym_return_statement, + sym_function_body, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(51), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1266] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(257), 1, + anon_sym_end, + ACTIONS(259), 1, + sym_break_statement, + ACTIONS(261), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(769), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(47), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1392] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(263), 1, + anon_sym_end, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(829), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1518] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(269), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(834), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1644] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(271), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(832), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1770] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(273), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(877), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [1896] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(275), 1, + anon_sym_end, + ACTIONS(277), 1, + sym_break_statement, + ACTIONS(279), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(803), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(32), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2022] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(281), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(858), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2148] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(7), 1, + anon_sym_return, + ACTIONS(9), 1, + anon_sym_local, + ACTIONS(11), 1, + anon_sym_do, + ACTIONS(13), 1, + anon_sym_if, + ACTIONS(15), 1, + anon_sym_while, + ACTIONS(17), 1, + anon_sym_repeat, + ACTIONS(19), 1, + anon_sym_for, + ACTIONS(21), 1, + anon_sym_goto, + ACTIONS(25), 1, + anon_sym_COLON_COLON, + ACTIONS(29), 1, + anon_sym_function, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(283), 1, + ts_builtin_sym_end, + ACTIONS(285), 1, + sym_break_statement, + ACTIONS(287), 1, + anon_sym_SEMI, + STATE(90), 1, + sym__variable_declarator, + STATE(96), 1, + sym_field_expression, + STATE(150), 1, + sym_function_call, + STATE(268), 1, + sym__expression, + STATE(438), 1, + sym_variable_declaration, + STATE(448), 1, + sym_local_variable_declaration, + STATE(809), 1, + sym_return_statement, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(79), 2, + sym_global_variable, + sym__prefix, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(68), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2274] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(301), 1, + anon_sym_until, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(307), 1, + sym_break_statement, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(311), 1, + anon_sym_SEMI, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(798), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(34), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2400] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(333), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(848), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2526] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(335), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(781), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2652] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(337), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(845), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2778] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(339), 1, + anon_sym_until, + ACTIONS(341), 1, + sym_break_statement, + ACTIONS(343), 1, + anon_sym_SEMI, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(778), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(70), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [2904] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(345), 1, + anon_sym_end, + ACTIONS(347), 1, + sym_break_statement, + ACTIONS(349), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(806), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(28), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3030] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(351), 1, + anon_sym_end, + ACTIONS(353), 1, + sym_break_statement, + ACTIONS(355), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(819), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(26), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3156] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(357), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(795), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3282] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(359), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(866), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3408] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(361), 1, + anon_sym_end, + ACTIONS(363), 1, + sym_break_statement, + ACTIONS(365), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(768), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(65), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3534] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(367), 1, + anon_sym_until, + ACTIONS(369), 1, + sym_break_statement, + ACTIONS(371), 1, + anon_sym_SEMI, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(864), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(41), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3660] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(341), 1, + sym_break_statement, + ACTIONS(343), 1, + anon_sym_SEMI, + ACTIONS(373), 1, + anon_sym_until, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(792), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(70), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3786] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(375), 1, + anon_sym_until, + ACTIONS(377), 1, + sym_break_statement, + ACTIONS(379), 1, + anon_sym_SEMI, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(886), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(50), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [3912] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(381), 1, + anon_sym_end, + ACTIONS(383), 1, + sym_break_statement, + ACTIONS(385), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(837), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(25), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4038] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(387), 1, + anon_sym_end, + ACTIONS(389), 1, + sym_break_statement, + ACTIONS(391), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(841), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(24), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4164] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(393), 1, + anon_sym_end, + ACTIONS(395), 1, + sym_break_statement, + ACTIONS(397), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(770), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(61), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4290] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(399), 1, + anon_sym_end, + ACTIONS(401), 1, + sym_break_statement, + ACTIONS(403), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(844), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(59), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4416] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(405), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(772), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4542] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(341), 1, + sym_break_statement, + ACTIONS(343), 1, + anon_sym_SEMI, + ACTIONS(407), 1, + anon_sym_until, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(808), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(70), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4668] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(409), 1, + anon_sym_end, + ACTIONS(411), 1, + sym_break_statement, + ACTIONS(413), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(888), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(38), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4794] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(341), 1, + sym_break_statement, + ACTIONS(343), 1, + anon_sym_SEMI, + ACTIONS(415), 1, + anon_sym_until, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(860), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(70), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [4920] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(417), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(816), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5046] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(419), 1, + anon_sym_end, + ACTIONS(421), 1, + sym_break_statement, + ACTIONS(423), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(794), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(33), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5172] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(289), 1, + anon_sym_return, + ACTIONS(291), 1, + anon_sym_local, + ACTIONS(293), 1, + anon_sym_do, + ACTIONS(295), 1, + anon_sym_if, + ACTIONS(297), 1, + anon_sym_while, + ACTIONS(299), 1, + anon_sym_repeat, + ACTIONS(303), 1, + anon_sym_for, + ACTIONS(305), 1, + anon_sym_goto, + ACTIONS(309), 1, + anon_sym_COLON_COLON, + ACTIONS(313), 1, + anon_sym_function, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(425), 1, + anon_sym_until, + ACTIONS(427), 1, + sym_break_statement, + ACTIONS(429), 1, + anon_sym_SEMI, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + STATE(791), 1, + sym_return_statement, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(48), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5298] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(431), 1, + anon_sym_end, + ACTIONS(433), 1, + sym_break_statement, + ACTIONS(435), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(789), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(57), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5424] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(437), 1, + anon_sym_end, + ACTIONS(439), 1, + sym_break_statement, + ACTIONS(441), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(822), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(58), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5550] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(443), 1, + anon_sym_end, + ACTIONS(445), 1, + sym_break_statement, + ACTIONS(447), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(820), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(23), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5676] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(449), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(805), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5802] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(451), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(830), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [5928] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(453), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(835), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6054] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(455), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(766), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6180] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(457), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(773), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6306] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(459), 1, + anon_sym_end, + ACTIONS(461), 1, + sym_break_statement, + ACTIONS(463), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(874), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(37), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6432] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(465), 1, + anon_sym_end, + ACTIONS(467), 1, + sym_break_statement, + ACTIONS(469), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(818), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(60), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6558] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(471), 1, + anon_sym_end, + ACTIONS(473), 1, + sym_break_statement, + ACTIONS(475), 1, + anon_sym_SEMI, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(802), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(31), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6684] = 33, + ACTIONS(3), 1, + sym_comment, + ACTIONS(135), 1, + anon_sym_return, + ACTIONS(137), 1, + anon_sym_local, + ACTIONS(139), 1, + anon_sym_do, + ACTIONS(143), 1, + anon_sym_if, + ACTIONS(145), 1, + anon_sym_while, + ACTIONS(147), 1, + anon_sym_repeat, + ACTIONS(149), 1, + anon_sym_for, + ACTIONS(151), 1, + anon_sym_goto, + ACTIONS(155), 1, + anon_sym_COLON_COLON, + ACTIONS(159), 1, + anon_sym_function, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(265), 1, + sym_break_statement, + ACTIONS(267), 1, + anon_sym_SEMI, + ACTIONS(477), 1, + anon_sym_end, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + STATE(765), 1, + sym_return_statement, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6810] = 31, + ACTIONS(3), 1, + sym_comment, + ACTIONS(479), 1, + anon_sym_local, + ACTIONS(482), 1, + anon_sym_do, + ACTIONS(485), 1, + anon_sym_if, + ACTIONS(488), 1, + anon_sym_while, + ACTIONS(491), 1, + anon_sym_repeat, + ACTIONS(494), 1, + anon_sym_for, + ACTIONS(497), 1, + anon_sym_goto, + ACTIONS(500), 1, + sym_break_statement, + ACTIONS(503), 1, + anon_sym_COLON_COLON, + ACTIONS(506), 1, + anon_sym_SEMI, + ACTIONS(509), 1, + anon_sym_function, + ACTIONS(512), 1, + anon_sym_LPAREN, + ACTIONS(518), 1, + sym_self, + ACTIONS(527), 1, + anon_sym_LBRACE, + ACTIONS(533), 1, + anon_sym_not, + ACTIONS(536), 1, + sym_identifier, + STATE(78), 1, + sym__variable_declarator, + STATE(95), 1, + sym_field_expression, + STATE(152), 1, + sym_function_call, + STATE(247), 1, + sym__expression, + STATE(433), 1, + sym_local_variable_declaration, + STATE(436), 1, + sym_variable_declaration, + ACTIONS(179), 2, + anon_sym_return, + anon_sym_end, + ACTIONS(524), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(85), 2, + sym_global_variable, + sym__prefix, + ACTIONS(515), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(530), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(521), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(66), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [6931] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(543), 1, + anon_sym_EQ, + STATE(732), 1, + aux_sym_variable_declaration_repeat1, + ACTIONS(545), 23, + sym_string, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(539), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7002] = 32, + ACTIONS(3), 1, + sym_comment, + ACTIONS(179), 1, + anon_sym_return, + ACTIONS(547), 1, + ts_builtin_sym_end, + ACTIONS(549), 1, + anon_sym_local, + ACTIONS(552), 1, + anon_sym_do, + ACTIONS(555), 1, + anon_sym_if, + ACTIONS(558), 1, + anon_sym_while, + ACTIONS(561), 1, + anon_sym_repeat, + ACTIONS(564), 1, + anon_sym_for, + ACTIONS(567), 1, + anon_sym_goto, + ACTIONS(570), 1, + sym_break_statement, + ACTIONS(573), 1, + anon_sym_COLON_COLON, + ACTIONS(576), 1, + anon_sym_SEMI, + ACTIONS(579), 1, + anon_sym_function, + ACTIONS(582), 1, + anon_sym_LPAREN, + ACTIONS(588), 1, + sym_self, + ACTIONS(597), 1, + anon_sym_LBRACE, + ACTIONS(603), 1, + anon_sym_not, + ACTIONS(606), 1, + sym_identifier, + STATE(90), 1, + sym__variable_declarator, + STATE(96), 1, + sym_field_expression, + STATE(150), 1, + sym_function_call, + STATE(268), 1, + sym__expression, + STATE(438), 1, + sym_variable_declaration, + STATE(448), 1, + sym_local_variable_declaration, + ACTIONS(594), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(79), 2, + sym_global_variable, + sym__prefix, + ACTIONS(585), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(600), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(591), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(68), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [7125] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(613), 1, + anon_sym_LBRACK, + ACTIONS(615), 1, + anon_sym_DOT, + ACTIONS(617), 1, + anon_sym_COLON, + ACTIONS(619), 1, + anon_sym_LPAREN, + ACTIONS(622), 1, + anon_sym_LBRACE, + ACTIONS(625), 1, + sym_string, + STATE(80), 1, + sym_table, + STATE(82), 1, + sym_arguments, + ACTIONS(611), 20, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + sym_spread, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7206] = 31, + ACTIONS(3), 1, + sym_comment, + ACTIONS(628), 1, + anon_sym_local, + ACTIONS(631), 1, + anon_sym_do, + ACTIONS(634), 1, + anon_sym_if, + ACTIONS(637), 1, + anon_sym_while, + ACTIONS(640), 1, + anon_sym_repeat, + ACTIONS(643), 1, + anon_sym_for, + ACTIONS(646), 1, + anon_sym_goto, + ACTIONS(649), 1, + sym_break_statement, + ACTIONS(652), 1, + anon_sym_COLON_COLON, + ACTIONS(655), 1, + anon_sym_SEMI, + ACTIONS(658), 1, + anon_sym_function, + ACTIONS(661), 1, + anon_sym_LPAREN, + ACTIONS(667), 1, + sym_self, + ACTIONS(676), 1, + anon_sym_LBRACE, + ACTIONS(682), 1, + anon_sym_not, + ACTIONS(685), 1, + sym_identifier, + STATE(81), 1, + sym__variable_declarator, + STATE(102), 1, + sym_field_expression, + STATE(156), 1, + sym_function_call, + STATE(239), 1, + sym__expression, + STATE(445), 1, + sym_local_variable_declaration, + STATE(447), 1, + sym_variable_declaration, + ACTIONS(179), 2, + anon_sym_return, + anon_sym_until, + ACTIONS(673), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(76), 2, + sym_global_variable, + sym__prefix, + ACTIONS(664), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(679), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(670), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + STATE(70), 15, + sym_variable_declaration_statement, + sym_local_variable_declaration_statement, + sym_do_statement, + sym_if_statement, + sym_while_statement, + sym_repeat_statement, + sym_for_statement, + sym_for_in_statement, + sym_goto_statement, + sym_label_statement, + sym__empty_statement, + sym_function_statement, + sym_local_function_statement, + sym_function_call_statement, + aux_sym_program_repeat1, + [7327] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(690), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(688), 32, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7391] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(692), 32, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7455] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 2, + anon_sym_COMMA, + anon_sym_LBRACK, + ACTIONS(692), 3, + anon_sym_EQ, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 22, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7523] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(704), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(702), 32, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7587] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(708), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(706), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7650] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(710), 1, + anon_sym_LBRACK, + ACTIONS(712), 1, + anon_sym_DOT, + ACTIONS(714), 1, + anon_sym_COLON, + ACTIONS(716), 1, + anon_sym_LPAREN, + ACTIONS(719), 1, + anon_sym_LBRACE, + ACTIONS(722), 1, + sym_string, + STATE(129), 1, + sym_table, + STATE(136), 1, + sym_arguments, + ACTIONS(611), 20, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + sym_spread, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7729] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(727), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(725), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7792] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(729), 1, + anon_sym_EQ, + STATE(749), 1, + aux_sym_variable_declaration_repeat1, + ACTIONS(545), 23, + sym_string, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(539), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7861] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(731), 1, + anon_sym_LBRACK, + ACTIONS(733), 1, + anon_sym_DOT, + ACTIONS(735), 1, + anon_sym_COLON, + ACTIONS(737), 1, + anon_sym_LPAREN, + ACTIONS(740), 1, + anon_sym_LBRACE, + ACTIONS(743), 1, + sym_string, + STATE(107), 1, + sym_table, + STATE(108), 1, + sym_arguments, + ACTIONS(611), 21, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + sym_spread, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [7940] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(748), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(746), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8003] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(750), 1, + anon_sym_EQ, + STATE(740), 1, + aux_sym_variable_declaration_repeat1, + ACTIONS(545), 23, + sym_string, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(539), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8072] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(754), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(752), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8135] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(758), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(756), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8198] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 1, + anon_sym_LBRACK, + ACTIONS(692), 2, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8265] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(760), 1, + anon_sym_LBRACK, + ACTIONS(762), 1, + anon_sym_DOT, + ACTIONS(764), 1, + anon_sym_COLON, + ACTIONS(766), 1, + anon_sym_LPAREN, + ACTIONS(769), 1, + anon_sym_LBRACE, + ACTIONS(772), 1, + sym_string, + STATE(127), 1, + sym_arguments, + STATE(128), 1, + sym_table, + ACTIONS(611), 20, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + sym_spread, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8344] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(777), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(775), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8407] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(779), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8470] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(783), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8533] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(789), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(787), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8596] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(791), 1, + anon_sym_EQ, + STATE(723), 1, + aux_sym_variable_declaration_repeat1, + ACTIONS(545), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(539), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8665] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(795), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(793), 31, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8728] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(690), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(688), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8790] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 8, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT_DOT, + ACTIONS(799), 9, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(545), 14, + anon_sym_LBRACK, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + ACTIONS(797), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8856] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 2, + anon_sym_COMMA, + anon_sym_LBRACK, + ACTIONS(692), 3, + anon_sym_EQ, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 23, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8922] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(692), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [8984] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(692), 29, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9046] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(690), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(688), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9108] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 2, + anon_sym_COMMA, + anon_sym_LBRACK, + ACTIONS(692), 3, + anon_sym_EQ, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 22, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9174] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(704), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(702), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9236] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(690), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(688), 29, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9298] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(704), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(702), 29, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9360] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(692), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9422] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(704), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(702), 30, + anon_sym_return, + anon_sym_EQ, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9484] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 2, + anon_sym_COMMA, + anon_sym_LBRACK, + ACTIONS(692), 3, + anon_sym_EQ, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 22, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9550] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(779), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9611] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(708), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(706), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9672] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(748), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(746), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9733] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(754), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(752), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9794] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(783), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9855] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(727), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(725), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9916] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 1, + anon_sym_LBRACK, + ACTIONS(692), 2, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [9981] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 1, + anon_sym_LBRACK, + ACTIONS(692), 2, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10046] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(708), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(706), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10107] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(727), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(725), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10168] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(783), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10229] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(789), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(787), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10290] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(777), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(775), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10351] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(779), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10412] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + ACTIONS(807), 1, + anon_sym_or, + ACTIONS(809), 1, + anon_sym_and, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + STATE(307), 1, + aux_sym_return_statement_repeat1, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(805), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(801), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10503] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(758), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(756), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10564] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(708), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(706), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10625] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(785), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(783), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10686] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(795), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(793), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10747] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(795), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(793), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10808] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(758), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(756), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10869] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(777), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(775), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10930] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(754), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(752), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [10991] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(748), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(746), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11052] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(748), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(746), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11113] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(789), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(787), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11174] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(781), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(779), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11235] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(694), 1, + anon_sym_LBRACK, + ACTIONS(692), 2, + anon_sym_DOT, + anon_sym_COLON, + ACTIONS(699), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(696), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11300] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(777), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(775), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11361] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(727), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(725), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11422] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + ACTIONS(807), 1, + anon_sym_or, + ACTIONS(809), 1, + anon_sym_and, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + STATE(305), 1, + aux_sym_return_statement_repeat1, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(835), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(833), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11513] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(754), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(752), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11574] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(795), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(793), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11635] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(789), 25, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(787), 28, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11696] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(758), 24, + sym_string, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(756), 29, + anon_sym_return, + anon_sym_local, + anon_sym_DOT, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + anon_sym_COLON, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11757] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + ACTIONS(807), 1, + anon_sym_or, + ACTIONS(809), 1, + anon_sym_and, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + STATE(303), 1, + aux_sym_return_statement_repeat1, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(839), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(837), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11848] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11930] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(845), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [11990] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12052] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 19, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 28, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12118] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12194] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12256] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12334] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12406] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(851), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12468] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 8, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT_DOT, + ACTIONS(799), 10, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(545), 14, + anon_sym_LBRACK, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + ACTIONS(797), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12532] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(855), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(853), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12592] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 8, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT_DOT, + ACTIONS(799), 9, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(545), 14, + anon_sym_LBRACK, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + ACTIONS(797), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12656] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(857), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12716] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(809), 1, + anon_sym_and, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12800] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12874] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(539), 8, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_SLASH, + anon_sym_DOT_DOT, + ACTIONS(799), 9, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(545), 14, + anon_sym_LBRACK, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + ACTIONS(797), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [12938] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13008] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13068] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(807), 1, + anon_sym_or, + ACTIONS(809), 1, + anon_sym_and, + ACTIONS(815), 1, + anon_sym_PIPE, + ACTIONS(817), 1, + anon_sym_TILDE, + ACTIONS(819), 1, + anon_sym_AMP, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(811), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(821), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(813), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(863), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(861), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13154] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(827), 1, + anon_sym_SLASH, + ACTIONS(829), 1, + anon_sym_DOT_DOT, + ACTIONS(831), 1, + anon_sym_CARET, + ACTIONS(823), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(825), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13224] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + ACTIONS(867), 1, + anon_sym_or, + ACTIONS(869), 1, + anon_sym_and, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + STATE(376), 1, + aux_sym_return_statement_repeat1, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(835), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(833), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13313] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + ACTIONS(895), 1, + anon_sym_or, + ACTIONS(897), 1, + anon_sym_and, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + STATE(377), 1, + aux_sym_return_statement_repeat1, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(805), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(801), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13402] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13463] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13532] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + ACTIONS(933), 1, + anon_sym_or, + ACTIONS(935), 1, + anon_sym_and, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + STATE(354), 1, + aux_sym_return_statement_repeat1, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(805), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(801), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13621] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(963), 1, + anon_sym_or, + ACTIONS(965), 1, + anon_sym_and, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(961), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(959), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13706] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13787] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 12, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13864] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(965), 1, + anon_sym_and, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [13947] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(963), 1, + anon_sym_or, + ACTIONS(965), 1, + anon_sym_and, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(981), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(979), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14032] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + ACTIONS(895), 1, + anon_sym_or, + ACTIONS(897), 1, + anon_sym_and, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + STATE(358), 1, + aux_sym_return_statement_repeat1, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(835), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(833), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14121] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 28, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14186] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14255] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14316] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + ACTIONS(895), 1, + anon_sym_or, + ACTIONS(897), 1, + anon_sym_and, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + STATE(350), 1, + aux_sym_return_statement_repeat1, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(839), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(837), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14405] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + ACTIONS(933), 1, + anon_sym_or, + ACTIONS(935), 1, + anon_sym_and, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + STATE(355), 1, + aux_sym_return_statement_repeat1, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(839), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(837), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14494] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(851), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 29, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14555] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(963), 1, + anon_sym_or, + ACTIONS(965), 1, + anon_sym_and, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(985), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(983), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14640] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + ACTIONS(867), 1, + anon_sym_or, + ACTIONS(869), 1, + anon_sym_and, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + STATE(368), 1, + aux_sym_return_statement_repeat1, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(805), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(801), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14729] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14800] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + ACTIONS(867), 1, + anon_sym_or, + ACTIONS(869), 1, + anon_sym_and, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + STATE(370), 1, + aux_sym_return_statement_repeat1, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(839), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(837), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14889] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + ACTIONS(933), 1, + anon_sym_or, + ACTIONS(935), 1, + anon_sym_and, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + STATE(343), 1, + aux_sym_return_statement_repeat1, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(835), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(833), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [14978] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(963), 1, + anon_sym_or, + ACTIONS(965), 1, + anon_sym_and, + ACTIONS(971), 1, + anon_sym_PIPE, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(967), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(969), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(989), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(987), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15063] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15136] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(921), 1, + anon_sym_CARET, + ACTIONS(927), 1, + anon_sym_SLASH, + ACTIONS(929), 1, + anon_sym_DOT_DOT, + ACTIONS(973), 1, + anon_sym_TILDE, + ACTIONS(975), 1, + anon_sym_AMP, + ACTIONS(923), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(977), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(925), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15211] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15287] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15355] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(895), 1, + anon_sym_or, + ACTIONS(897), 1, + anon_sym_and, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(863), 10, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(861), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15439] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(851), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15499] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(851), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15559] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(845), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15617] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(845), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15675] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(867), 1, + anon_sym_or, + ACTIONS(869), 1, + anon_sym_and, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(863), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(861), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15759] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15833] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(855), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(853), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15891] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(897), 1, + anon_sym_and, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 10, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [15973] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(845), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16031] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(903), 1, + anon_sym_PIPE, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(899), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(901), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 10, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16111] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(905), 1, + anon_sym_TILDE, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16185] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16261] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(857), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16319] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(907), 1, + anon_sym_AMP, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16391] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(909), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16461] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16519] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16577] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(917), 1, + anon_sym_DOT_DOT, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(911), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16645] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(915), 1, + anon_sym_SLASH, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(913), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 20, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16709] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16781] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(843), 23, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16841] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16911] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [16991] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(843), 23, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17051] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(611), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(609), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17109] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(919), 1, + anon_sym_CARET, + ACTIONS(851), 23, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17169] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(935), 1, + anon_sym_and, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17251] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17331] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17399] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17475] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17549] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 19, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17613] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17685] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17745] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(857), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17803] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(857), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17861] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17929] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [17989] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18059] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18127] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 19, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18191] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18251] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18319] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18379] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(855), 23, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(853), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18437] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(869), 1, + anon_sym_and, + ACTIONS(875), 1, + anon_sym_PIPE, + ACTIONS(877), 1, + anon_sym_TILDE, + ACTIONS(879), 1, + anon_sym_AMP, + ACTIONS(887), 1, + anon_sym_SLASH, + ACTIONS(889), 1, + anon_sym_DOT_DOT, + ACTIONS(891), 1, + anon_sym_CARET, + ACTIONS(871), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(881), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(883), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(885), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(873), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18519] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(855), 24, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_CARET, + anon_sym_POUND, + sym_number, + ACTIONS(853), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18577] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(933), 1, + anon_sym_or, + ACTIONS(935), 1, + anon_sym_and, + ACTIONS(941), 1, + anon_sym_PIPE, + ACTIONS(943), 1, + anon_sym_TILDE, + ACTIONS(945), 1, + anon_sym_AMP, + ACTIONS(953), 1, + anon_sym_SLASH, + ACTIONS(955), 1, + anon_sym_DOT_DOT, + ACTIONS(957), 1, + anon_sym_CARET, + ACTIONS(937), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(947), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(949), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(951), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(939), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(863), 9, + sym_string, + anon_sym_COMMA, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(861), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18661] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18730] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18799] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1015), 1, + anon_sym_or, + ACTIONS(1017), 1, + anon_sym_and, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(985), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(983), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18882] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(851), 22, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [18941] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1031), 1, + anon_sym_or, + ACTIONS(1033), 1, + anon_sym_and, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(981), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(979), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19024] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1015), 1, + anon_sym_or, + ACTIONS(1017), 1, + anon_sym_and, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(981), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(979), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19107] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19166] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1017), 1, + anon_sym_and, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19247] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1033), 1, + anon_sym_and, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19328] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(851), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19387] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1055), 1, + anon_sym_or, + ACTIONS(1057), 1, + anon_sym_and, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(985), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(983), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19470] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19529] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19608] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19683] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19750] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19817] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19896] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [19955] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 23, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20028] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20091] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 12, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20166] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20239] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20310] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20377] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1055), 1, + anon_sym_or, + ACTIONS(1057), 1, + anon_sym_and, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(961), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(959), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20460] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1031), 1, + anon_sym_or, + ACTIONS(1033), 1, + anon_sym_and, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(989), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(987), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20543] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1015), 1, + anon_sym_or, + ACTIONS(1017), 1, + anon_sym_and, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(961), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(959), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20626] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1031), 1, + anon_sym_or, + ACTIONS(1033), 1, + anon_sym_and, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(961), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(959), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20709] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20772] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20831] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 16, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20898] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1031), 1, + anon_sym_or, + ACTIONS(1033), 1, + anon_sym_and, + ACTIONS(1039), 1, + anon_sym_PIPE, + ACTIONS(1041), 1, + anon_sym_TILDE, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1035), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1037), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(985), 9, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(983), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [20981] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21052] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 13, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21125] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(843), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21184] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(997), 1, + anon_sym_SLASH, + ACTIONS(999), 1, + anon_sym_DOT_DOT, + ACTIONS(1001), 1, + anon_sym_CARET, + ACTIONS(1015), 1, + anon_sym_or, + ACTIONS(1017), 1, + anon_sym_and, + ACTIONS(1023), 1, + anon_sym_PIPE, + ACTIONS(1025), 1, + anon_sym_TILDE, + ACTIONS(1027), 1, + anon_sym_AMP, + ACTIONS(991), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(993), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1019), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(995), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1021), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(989), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(987), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21267] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1043), 1, + anon_sym_AMP, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 14, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21338] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 12, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21413] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21492] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1055), 1, + anon_sym_or, + ACTIONS(1057), 1, + anon_sym_and, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(981), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(979), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21575] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1057), 1, + anon_sym_and, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(841), 21, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21656] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1045), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 15, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21725] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1009), 1, + anon_sym_SLASH, + ACTIONS(1011), 1, + anon_sym_DOT_DOT, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(1055), 1, + anon_sym_or, + ACTIONS(1057), 1, + anon_sym_and, + ACTIONS(1063), 1, + anon_sym_PIPE, + ACTIONS(1065), 1, + anon_sym_TILDE, + ACTIONS(1067), 1, + anon_sym_AMP, + ACTIONS(1003), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1005), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1059), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1007), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1061), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(989), 8, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_POUND, + sym_number, + ACTIONS(987), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21808] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1013), 1, + anon_sym_CARET, + ACTIONS(851), 21, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(849), 27, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21867] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21934] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 19, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(841), 25, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [21997] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(843), 22, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 26, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + anon_sym_DOT_DOT, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [22056] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1029), 1, + anon_sym_CARET, + ACTIONS(1051), 1, + anon_sym_SLASH, + ACTIONS(1053), 1, + anon_sym_DOT_DOT, + ACTIONS(1047), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1049), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_POUND, + sym_number, + ACTIONS(841), 24, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_or, + anon_sym_and, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [22123] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1069), 1, + anon_sym_LBRACK, + ACTIONS(1071), 1, + anon_sym_DOT, + ACTIONS(1073), 1, + anon_sym_COLON, + ACTIONS(1075), 1, + anon_sym_LPAREN, + ACTIONS(1077), 1, + anon_sym_LBRACE, + ACTIONS(1079), 1, + sym_string, + STATE(287), 1, + sym_arguments, + STATE(292), 1, + sym_table, + ACTIONS(609), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(611), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22188] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(775), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(777), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22235] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(752), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(754), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22282] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(692), 1, + anon_sym_DOT, + ACTIONS(694), 5, + sym_string, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACE, + ACTIONS(696), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(699), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22333] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(756), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(758), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22380] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(688), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(690), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22427] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(779), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(781), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22474] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(746), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(748), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22521] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(692), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(694), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22568] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(793), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(795), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22615] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(706), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(708), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22662] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(702), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(704), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22709] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(725), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(727), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22756] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(787), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(789), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22803] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(783), 6, + anon_sym_DOT, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(785), 33, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_LBRACK, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_RPAREN, + anon_sym_LBRACE, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [22850] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1083), 1, + anon_sym_COMMA, + STATE(302), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1085), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1081), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [22897] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1083), 1, + anon_sym_COMMA, + STATE(300), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1089), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1087), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [22944] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1093), 1, + anon_sym_COMMA, + STATE(302), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1096), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [22991] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + STATE(304), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1100), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1098), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23037] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1102), 1, + anon_sym_COMMA, + STATE(304), 1, + aux_sym_return_statement_repeat1, + ACTIONS(863), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(861), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23083] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + STATE(304), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1107), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1105), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23129] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 12, + sym_string, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23171] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(803), 1, + anon_sym_COMMA, + STATE(304), 1, + aux_sym_return_statement_repeat1, + ACTIONS(835), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(833), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23217] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1109), 1, + anon_sym_COMMA, + STATE(308), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1096), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23262] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1112), 1, + anon_sym_COMMA, + STATE(309), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1096), 12, + sym_string, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23307] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(857), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(859), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [23348] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1115), 1, + anon_sym_COMMA, + STATE(331), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1089), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1087), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23393] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(845), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(847), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [23434] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1117), 1, + anon_sym_COMMA, + STATE(313), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1096), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23479] = 12, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(841), 3, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 17, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [23538] = 11, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(841), 3, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(843), 18, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + [23595] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1154), 1, + anon_sym_RBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + STATE(881), 1, + sym__field_sequence, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [23670] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1162), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(790), 1, + sym__field_sequence, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [23745] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1164), 1, + anon_sym_COMMA, + STATE(313), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1085), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1081), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [23790] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(841), 1, + anon_sym_else, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 12, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + [23855] = 14, + ACTIONS(3), 1, + sym_comment, + ACTIONS(841), 1, + anon_sym_else, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(843), 13, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + [23918] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1172), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + STATE(838), 1, + sym__field_sequence, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [23993] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1174), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + STATE(849), 1, + sym__field_sequence, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [24068] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1178), 1, + anon_sym_SEMI, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(441), 1, + sym__expression, + STATE(705), 1, + sym__empty_statement, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1176), 3, + anon_sym_end, + anon_sym_elseif, + anon_sym_else, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [24139] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(849), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(851), 27, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + [24182] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(793), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(795), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [24223] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(706), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(708), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [24264] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(853), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(855), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [24305] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(609), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(611), 28, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [24346] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1182), 1, + anon_sym_COMMA, + STATE(339), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1089), 12, + sym_string, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1087), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [24391] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1164), 1, + anon_sym_COMMA, + STATE(318), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1089), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1087), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [24436] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1115), 1, + anon_sym_COMMA, + STATE(308), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1085), 11, + sym_string, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1081), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [24481] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(841), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(843), 27, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + [24524] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(841), 4, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + ACTIONS(843), 21, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + [24575] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1184), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(797), 1, + sym__field_sequence, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [24650] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(841), 5, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(843), 27, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + [24693] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1188), 1, + anon_sym_EQ, + ACTIONS(1190), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1186), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [24736] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(841), 4, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + ACTIONS(843), 24, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_DOT_DOT, + [24783] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(841), 4, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + ACTIONS(843), 21, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + [24834] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1182), 1, + anon_sym_COMMA, + STATE(309), 1, + aux_sym__local_variable_declarator_repeat1, + ACTIONS(1085), 12, + sym_string, + ts_builtin_sym_end, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1081), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [24879] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(841), 4, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + ACTIONS(843), 19, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + [24932] = 10, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(841), 4, + anon_sym_else, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + ACTIONS(843), 18, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_RBRACK, + anon_sym_do, + anon_sym_end, + anon_sym_then, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + [24987] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1192), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(709), 1, + sym_field, + STATE(821), 1, + sym__field_sequence, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [25062] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + STATE(374), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1107), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1105), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25106] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1196), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1194), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25146] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(857), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25186] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1198), 1, + anon_sym_COMMA, + STATE(346), 1, + aux_sym_return_statement_repeat1, + ACTIONS(863), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(861), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25230] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 12, + sym_string, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25270] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1203), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1201), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25310] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1205), 1, + anon_sym_COMMA, + STATE(349), 1, + aux_sym_return_statement_repeat1, + ACTIONS(863), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(861), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25354] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + STATE(346), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1100), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1098), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25398] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1210), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1208), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25438] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1214), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1212), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25478] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1218), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1216), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25518] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + STATE(374), 1, + aux_sym_return_statement_repeat1, + ACTIONS(835), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(833), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25562] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(931), 1, + anon_sym_COMMA, + STATE(374), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1100), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1098), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25606] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1220), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(721), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [25678] = 19, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + ACTIONS(1222), 1, + anon_sym_RBRACE, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(721), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [25750] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + STATE(346), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1107), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1105), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25794] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1226), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1224), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25834] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1228), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25874] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1232), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25914] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1236), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25954] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1240), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [25994] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(845), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26034] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1244), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26074] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 12, + sym_string, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26114] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1250), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1248), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26154] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + STATE(349), 1, + aux_sym_return_statement_repeat1, + ACTIONS(835), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(833), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26198] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1254), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1252), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26238] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + STATE(349), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1100), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1098), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26282] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1256), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26322] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1262), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1260), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26362] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1266), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1264), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26402] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1268), 1, + anon_sym_COMMA, + STATE(374), 1, + aux_sym_return_statement_repeat1, + ACTIONS(863), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(861), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26446] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1273), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1271), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26486] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(865), 1, + anon_sym_COMMA, + STATE(349), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1107), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1105), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26530] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(893), 1, + anon_sym_COMMA, + STATE(346), 1, + aux_sym_return_statement_repeat1, + ACTIONS(835), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(833), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26574] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1277), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1275), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26614] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 13, + sym_string, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_EQ, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1091), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26654] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1281), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1279), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26694] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1285), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1283), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26734] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1289), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1287), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26774] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1293), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1291), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26814] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1297), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1295), 22, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_elseif, + anon_sym_else, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26854] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1299), 1, + anon_sym_EQ, + ACTIONS(1190), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1186), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [26895] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(692), 1, + anon_sym_DOT, + ACTIONS(1301), 1, + anon_sym_EQ, + ACTIONS(696), 4, + anon_sym_LT, + anon_sym_GT, + anon_sym_TILDE, + anon_sym_SLASH, + ACTIONS(694), 5, + sym_string, + anon_sym_LBRACK, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACE, + ACTIONS(699), 20, + anon_sym_COMMA, + anon_sym_SEMI, + anon_sym_RBRACE, + anon_sym_or, + anon_sym_and, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + anon_sym_PIPE, + anon_sym_AMP, + anon_sym_LT_LT, + anon_sym_GT_GT, + anon_sym_PLUS, + anon_sym_DASH, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + anon_sym_DOT_DOT, + anon_sym_CARET, + [26940] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1176), 1, + anon_sym_end, + ACTIONS(1178), 1, + anon_sym_SEMI, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(441), 1, + sym__expression, + STATE(705), 1, + sym__empty_statement, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [27009] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1178), 1, + anon_sym_SEMI, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1303), 1, + ts_builtin_sym_end, + STATE(293), 1, + sym_field_expression, + STATE(441), 1, + sym__expression, + STATE(705), 1, + sym__empty_statement, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [27078] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1305), 1, + anon_sym_EQ, + ACTIONS(1190), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1186), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27119] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1307), 1, + anon_sym_EQ, + ACTIONS(1190), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1186), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27160] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1176), 1, + anon_sym_until, + ACTIONS(1178), 1, + anon_sym_SEMI, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(441), 1, + sym__expression, + STATE(705), 1, + sym__empty_statement, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [27229] = 18, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1138), 1, + anon_sym_LBRACK, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1160), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(641), 1, + sym__expression, + STATE(721), 1, + sym_field, + STATE(823), 1, + sym_quoted_field, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [27298] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1281), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1279), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27336] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(857), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27374] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1203), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1201), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27412] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1210), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1208), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27450] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(845), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27488] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1210), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1208), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27526] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1214), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1212), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27564] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1218), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1216), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27602] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1236), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27640] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1226), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1224), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27678] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1240), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27716] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1232), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27754] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1311), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1309), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27792] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1228), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27830] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1244), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27868] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1250), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1248), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [27906] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(861), 1, + anon_sym_else, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(863), 8, + ts_builtin_sym_end, + anon_sym_COMMA, + anon_sym_do, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + [27970] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1196), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1194), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28008] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1254), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1252), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28046] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1203), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1201), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28084] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(857), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28122] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1256), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28160] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1262), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1260), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28198] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1266), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1264), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28236] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1273), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1271), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28274] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1277), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1275), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28312] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1293), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1291), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28350] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1228), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28388] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1203), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1201), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28426] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1210), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1208), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28464] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1214), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1212), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28502] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1236), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28540] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1230), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1228), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28578] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1232), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28616] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1214), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1212), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28654] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1218), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1216), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28692] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1281), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1279), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28730] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1238), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1236), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28768] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1285), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1283), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28806] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1218), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1216), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28844] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1297), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1295), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28882] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1234), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1232), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28920] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(845), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28958] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1289), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1287), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [28996] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(859), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(857), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29034] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1289), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1287), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29072] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1285), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1283), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29110] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(847), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(845), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29148] = 20, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1319), 1, + anon_sym_else, + ACTIONS(1321), 1, + anon_sym_SEMI, + STATE(674), 1, + aux_sym_return_statement_repeat1, + STATE(714), 1, + sym__empty_statement, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + ACTIONS(1315), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + [29220] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1281), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1279), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29258] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1226), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1224), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29296] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1285), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1283), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29334] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1297), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1295), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29372] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1240), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29410] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1289), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1287), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_until, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29448] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1297), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1295), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29486] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1325), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1323), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29524] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1293), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1291), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29562] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1293), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1291), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29600] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1277), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1275), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29638] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1277), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1275), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29676] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1273), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1271), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29714] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1273), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1271), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29752] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1266), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1264), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29790] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1262), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1260), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29828] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1266), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1264), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29866] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1256), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29904] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1262), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1260), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29942] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1258), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1256), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [29980] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1254), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1252), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30018] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1196), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1194), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30056] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1244), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30094] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1250), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1248), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30132] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1254), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1252), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30170] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1196), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1194), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30208] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1246), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1244), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30246] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1242), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1240), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30284] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1226), 10, + sym_string, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1224), 20, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_end, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30322] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1250), 11, + sym_string, + ts_builtin_sym_end, + anon_sym_COLON_COLON, + anon_sym_SEMI, + anon_sym_LPAREN, + sym_spread, + anon_sym_LBRACE, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + sym_number, + ACTIONS(1248), 19, + anon_sym_return, + anon_sym_local, + anon_sym_do, + anon_sym_if, + anon_sym_while, + anon_sym_repeat, + anon_sym_for, + anon_sym_goto, + sym_break_statement, + anon_sym_function, + sym_self, + sym_next, + anon_sym__G, + anon_sym__VERSION, + anon_sym_not, + sym_nil, + sym_true, + sym_false, + sym_identifier, + [30360] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1327), 1, + anon_sym_RPAREN, + STATE(293), 1, + sym_field_expression, + STATE(648), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30423] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1329), 1, + anon_sym_RPAREN, + STATE(293), 1, + sym_field_expression, + STATE(640), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30486] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1331), 1, + anon_sym_RPAREN, + STATE(293), 1, + sym_field_expression, + STATE(644), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30549] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1333), 1, + anon_sym_RPAREN, + STATE(293), 1, + sym_field_expression, + STATE(643), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30612] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + ACTIONS(1335), 1, + anon_sym_RPAREN, + STATE(293), 1, + sym_field_expression, + STATE(642), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30675] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(341), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30735] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(221), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30795] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(181), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30855] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(179), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30915] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(272), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [30975] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(314), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31035] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(658), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31095] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(649), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31155] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(652), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31215] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(236), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31275] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(214), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31335] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(161), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31395] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(668), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31455] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(263), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31515] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(190), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31575] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(189), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31635] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(149), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31695] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(657), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31755] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(271), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31815] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(267), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31875] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(266), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31935] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(265), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [31995] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(252), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32055] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(237), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32115] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(647), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32175] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(259), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32235] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(258), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32295] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(257), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32355] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(253), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32415] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(244), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32475] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(324), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32535] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(261), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32595] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(264), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32655] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(177), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32715] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(276), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32775] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(165), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32835] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(193), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32895] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(651), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [32955] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(319), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33015] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(246), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33075] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(196), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33135] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(198), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33195] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(186), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33255] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(199), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33315] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(202), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33375] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(203), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33435] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(206), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33495] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(207), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33555] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(209), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33615] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(187), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33675] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(212), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33735] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(146), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33795] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(182), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33855] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(315), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33915] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(340), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [33975] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(338), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34035] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(157), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34095] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(171), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34155] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(337), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34215] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(646), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34275] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(170), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34335] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(335), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34395] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(119), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34455] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(140), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34515] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(183), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34575] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(135), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34635] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(166), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34695] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(333), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34755] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(332), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34815] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(645), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34875] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(650), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34935] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(262), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [34995] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(188), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35055] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(175), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35115] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(176), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35175] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(320), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35235] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(159), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35295] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(409), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35355] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(279), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35415] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(656), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35475] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(248), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35535] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(215), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35595] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(216), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35655] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(218), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35715] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(219), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35775] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(329), 1, + anon_sym_not, + ACTIONS(331), 1, + sym_identifier, + ACTIONS(1345), 1, + anon_sym_function, + STATE(102), 1, + sym_field_expression, + STATE(242), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(327), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35835] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(227), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35895] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(228), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [35955] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(229), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36015] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(230), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36075] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(231), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36135] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1337), 1, + anon_sym_function, + ACTIONS(1341), 1, + anon_sym_not, + ACTIONS(1343), 1, + sym_identifier, + STATE(95), 1, + sym_field_expression, + STATE(232), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1339), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36195] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(243), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36255] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(284), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36315] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(283), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36375] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(282), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36435] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(281), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36495] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(278), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36555] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(273), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36615] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(255), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36675] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(250), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36735] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(249), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36795] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(245), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36855] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(143), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36915] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1353), 1, + anon_sym_function, + ACTIONS(1357), 1, + anon_sym_not, + ACTIONS(1359), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(162), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1355), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [36975] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(251), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37035] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(144), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37095] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(169), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37155] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(167), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37215] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(168), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37275] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(185), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37335] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(184), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37395] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(180), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37455] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(173), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37515] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(172), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37575] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(174), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37635] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(164), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37695] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(93), 1, + anon_sym_not, + ACTIONS(95), 1, + sym_identifier, + ACTIONS(1361), 1, + anon_sym_function, + STATE(72), 1, + sym_field_expression, + STATE(163), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(91), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37755] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(254), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37815] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(256), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37875] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(655), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37935] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(260), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [37995] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(160), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38055] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(238), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38115] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(661), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38175] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(241), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38235] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(670), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38295] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(659), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38355] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(654), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38415] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(269), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38475] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(270), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38535] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(274), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38595] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(234), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38655] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(211), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38715] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(200), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38775] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(194), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38835] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(208), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38895] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(210), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [38955] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(217), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39015] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(220), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39075] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(222), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39135] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(225), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39195] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(315), 1, + anon_sym_LPAREN, + ACTIONS(319), 1, + sym_self, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1345), 1, + anon_sym_function, + ACTIONS(1349), 1, + anon_sym_not, + ACTIONS(1351), 1, + sym_identifier, + STATE(102), 1, + sym_field_expression, + STATE(226), 1, + sym__expression, + ACTIONS(323), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(317), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1347), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(321), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(76), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(204), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39255] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(660), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39315] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(275), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39375] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(662), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39435] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(667), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39495] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(277), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39555] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(161), 1, + anon_sym_LPAREN, + ACTIONS(165), 1, + sym_self, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(175), 1, + anon_sym_not, + ACTIONS(177), 1, + sym_identifier, + ACTIONS(1337), 1, + anon_sym_function, + STATE(95), 1, + sym_field_expression, + STATE(280), 1, + sym__expression, + ACTIONS(169), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(163), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(173), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(167), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(85), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(213), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39615] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(664), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39675] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(671), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39735] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(35), 1, + sym_self, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(45), 1, + anon_sym_not, + ACTIONS(47), 1, + sym_identifier, + ACTIONS(1353), 1, + anon_sym_function, + STATE(96), 1, + sym_field_expression, + STATE(240), 1, + sym__expression, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(33), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(43), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(37), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(79), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(205), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39795] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(665), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39855] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(669), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39915] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(666), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [39975] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(663), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40035] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1140), 1, + anon_sym_function, + ACTIONS(1142), 1, + anon_sym_LPAREN, + ACTIONS(1146), 1, + sym_self, + ACTIONS(1152), 1, + anon_sym_LBRACE, + ACTIONS(1158), 1, + anon_sym_not, + ACTIONS(1180), 1, + sym_identifier, + STATE(293), 1, + sym_field_expression, + STATE(653), 1, + sym__expression, + ACTIONS(1150), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(1144), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1156), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(1148), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(285), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(328), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40095] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(154), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40155] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(141), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40215] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(147), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40275] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(145), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40335] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(155), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40395] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(79), 1, + anon_sym_LPAREN, + ACTIONS(83), 1, + sym_self, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1361), 1, + anon_sym_function, + ACTIONS(1365), 1, + anon_sym_not, + ACTIONS(1367), 1, + sym_identifier, + STATE(72), 1, + sym_field_expression, + STATE(148), 1, + sym__expression, + ACTIONS(87), 2, + anon_sym__G, + anon_sym__VERSION, + ACTIONS(81), 3, + sym_string, + sym_spread, + sym_number, + ACTIONS(1363), 3, + anon_sym_TILDE, + anon_sym_DASH, + anon_sym_POUND, + ACTIONS(85), 4, + sym_next, + sym_nil, + sym_true, + sym_false, + STATE(69), 4, + sym__variable_declarator, + sym_function_call, + sym_global_variable, + sym__prefix, + STATE(158), 4, + sym_function_definition, + sym_table, + sym_binary_operation, + sym_unary_operation, + [40455] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1369), 1, + anon_sym_RPAREN, + STATE(748), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40515] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1371), 3, + anon_sym_COMMA, + anon_sym_SEMI, + anon_sym_RBRACE, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40571] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1373), 1, + anon_sym_RPAREN, + STATE(751), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40631] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1375), 1, + anon_sym_RPAREN, + STATE(753), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40691] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1377), 1, + anon_sym_RPAREN, + STATE(746), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40751] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1379), 1, + anon_sym_do, + STATE(722), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40811] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1381), 3, + anon_sym_COMMA, + anon_sym_SEMI, + anon_sym_RBRACE, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40867] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1383), 1, + anon_sym_do, + STATE(728), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40927] = 17, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1385), 1, + anon_sym_RPAREN, + STATE(752), 1, + aux_sym_return_statement_repeat1, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [40987] = 16, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1387), 1, + anon_sym_COMMA, + ACTIONS(1389), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41044] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1391), 1, + anon_sym_COMMA, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41098] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1393), 1, + anon_sym_then, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41152] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1395), 1, + anon_sym_then, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41206] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1397), 1, + anon_sym_then, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41260] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1399), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41314] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1401), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41368] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1403), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41422] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1405), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41476] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1407), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41530] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1409), 1, + anon_sym_RPAREN, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41584] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1411), 1, + anon_sym_RPAREN, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41638] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1413), 1, + anon_sym_RPAREN, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41692] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1415), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41746] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1417), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41800] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1419), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41854] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1421), 1, + anon_sym_RPAREN, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41908] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1423), 1, + anon_sym_then, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [41962] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1425), 1, + anon_sym_RPAREN, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [42016] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1427), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [42070] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1429), 1, + anon_sym_do, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [42124] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1431), 1, + anon_sym_RBRACK, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [42178] = 15, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1120), 1, + anon_sym_PIPE, + ACTIONS(1122), 1, + anon_sym_TILDE, + ACTIONS(1124), 1, + anon_sym_AMP, + ACTIONS(1132), 1, + anon_sym_SLASH, + ACTIONS(1134), 1, + anon_sym_DOT_DOT, + ACTIONS(1136), 1, + anon_sym_CARET, + ACTIONS(1166), 1, + anon_sym_and, + ACTIONS(1313), 1, + anon_sym_or, + ACTIONS(1433), 1, + anon_sym_then, + ACTIONS(1126), 2, + anon_sym_LT_LT, + anon_sym_GT_GT, + ACTIONS(1128), 2, + anon_sym_PLUS, + anon_sym_DASH, + ACTIONS(1168), 2, + anon_sym_LT, + anon_sym_GT, + ACTIONS(1130), 3, + anon_sym_STAR, + anon_sym_SLASH_SLASH, + anon_sym_PERCENT, + ACTIONS(1170), 4, + anon_sym_LT_EQ, + anon_sym_EQ_EQ, + anon_sym_TILDE_EQ, + anon_sym_GT_EQ, + [42232] = 8, + ACTIONS(3), 1, + sym_comment, + ACTIONS(31), 1, + anon_sym_LPAREN, + ACTIONS(1435), 1, + sym_self, + ACTIONS(1437), 1, + sym_identifier, + STATE(96), 1, + sym_field_expression, + STATE(675), 1, + sym__variable_declarator, + ACTIONS(39), 2, + anon_sym__G, + anon_sym__VERSION, + STATE(676), 3, + sym_function_call, + sym_global_variable, + sym__prefix, + [42260] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(861), 1, + anon_sym_else, + ACTIONS(1439), 1, + anon_sym_COMMA, + STATE(673), 1, + aux_sym_return_statement_repeat1, + ACTIONS(863), 7, + ts_builtin_sym_end, + anon_sym_do, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + anon_sym_SEMI, + anon_sym_RPAREN, + [42282] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1444), 1, + anon_sym_else, + ACTIONS(1446), 1, + anon_sym_SEMI, + STATE(673), 1, + aux_sym_return_statement_repeat1, + STATE(708), 1, + sym__empty_statement, + ACTIONS(1442), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + [42307] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1448), 2, + anon_sym_COMMA, + anon_sym_EQ, + ACTIONS(545), 6, + sym_string, + anon_sym_LBRACK, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + anon_sym_LBRACE, + [42323] = 9, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(731), 1, + anon_sym_LBRACK, + ACTIONS(1450), 1, + anon_sym_DOT, + ACTIONS(1452), 1, + anon_sym_COLON, + ACTIONS(1454), 1, + anon_sym_LPAREN, + ACTIONS(1456), 1, + sym_string, + STATE(107), 1, + sym_table, + STATE(108), 1, + sym_arguments, + [42351] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1458), 1, + anon_sym_RPAREN, + ACTIONS(1460), 1, + sym_spread, + STATE(711), 1, + sym__first_parameter, + ACTIONS(1462), 2, + sym_self, + sym_identifier, + STATE(783), 2, + sym__parameter_list, + sym__spread_param, + [42372] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1464), 1, + anon_sym_end, + ACTIONS(1466), 1, + anon_sym_elseif, + STATE(836), 1, + sym_else, + STATE(699), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42392] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1468), 1, + anon_sym_end, + STATE(824), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42412] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + ACTIONS(1472), 1, + sym_identifier, + STATE(12), 1, + sym_parameters, + STATE(235), 1, + sym__function_body, + STATE(742), 1, + sym_function_name, + STATE(764), 1, + sym_function_name_field, + [42434] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1474), 1, + anon_sym_end, + STATE(774), 1, + sym_else, + STATE(685), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42454] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1474), 1, + anon_sym_end, + STATE(774), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42474] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1476), 1, + anon_sym_end, + STATE(776), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42494] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1478), 1, + anon_sym_end, + STATE(771), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42514] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1480), 1, + anon_sym_end, + STATE(775), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42534] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1478), 1, + anon_sym_end, + STATE(771), 1, + sym_else, + STATE(682), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42554] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1482), 1, + anon_sym_end, + STATE(831), 1, + sym_else, + STATE(695), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42574] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1468), 1, + anon_sym_end, + STATE(824), 1, + sym_else, + STATE(701), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42594] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + ACTIONS(1472), 1, + sym_identifier, + STATE(19), 1, + sym_parameters, + STATE(151), 1, + sym__function_body, + STATE(735), 1, + sym_function_name, + STATE(764), 1, + sym_function_name_field, + [42616] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + ACTIONS(1472), 1, + sym_identifier, + STATE(14), 1, + sym_parameters, + STATE(233), 1, + sym__function_body, + STATE(736), 1, + sym_function_name, + STATE(764), 1, + sym_function_name_field, + [42638] = 7, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + ACTIONS(1472), 1, + sym_identifier, + STATE(21), 1, + sym_parameters, + STATE(195), 1, + sym__function_body, + STATE(757), 1, + sym_function_name, + STATE(764), 1, + sym_function_name_field, + [42660] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1484), 1, + anon_sym_end, + STATE(825), 1, + sym_else, + STATE(694), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42680] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1484), 1, + anon_sym_end, + STATE(825), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42700] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1482), 1, + anon_sym_end, + STATE(831), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42720] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1486), 1, + anon_sym_end, + STATE(833), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42740] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1488), 1, + anon_sym_end, + STATE(826), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42760] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1464), 1, + anon_sym_end, + ACTIONS(1466), 1, + anon_sym_elseif, + STATE(836), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42780] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1490), 1, + anon_sym_end, + STATE(827), 1, + sym_else, + STATE(696), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42800] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1490), 1, + anon_sym_end, + STATE(827), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42820] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1492), 1, + anon_sym_end, + STATE(882), 1, + sym_else, + STATE(683), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42840] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(61), 1, + anon_sym_else, + ACTIONS(1466), 1, + anon_sym_elseif, + ACTIONS(1492), 1, + anon_sym_end, + STATE(882), 1, + sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42860] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(89), 1, + anon_sym_LBRACE, + ACTIONS(1494), 1, + anon_sym_LPAREN, + ACTIONS(1496), 1, + sym_string, + STATE(80), 1, + sym_table, + STATE(86), 1, + sym_arguments, + [42879] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1498), 1, + anon_sym_end, + ACTIONS(1500), 1, + anon_sym_elseif, + ACTIONS(1503), 1, + anon_sym_else, + STATE(703), 2, + sym_elseif, + aux_sym_if_statement_repeat1, + [42896] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(171), 1, + anon_sym_LBRACE, + ACTIONS(1505), 1, + anon_sym_LPAREN, + ACTIONS(1507), 1, + sym_string, + STATE(117), 1, + sym_arguments, + STATE(128), 1, + sym_table, + [42915] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1319), 1, + anon_sym_else, + ACTIONS(1315), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + [42928] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(325), 1, + anon_sym_LBRACE, + ACTIONS(1509), 1, + anon_sym_LPAREN, + ACTIONS(1511), 1, + sym_string, + STATE(126), 1, + sym_arguments, + STATE(129), 1, + sym_table, + [42947] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(41), 1, + anon_sym_LBRACE, + ACTIONS(1454), 1, + anon_sym_LPAREN, + ACTIONS(1456), 1, + sym_string, + STATE(107), 1, + sym_table, + STATE(133), 1, + sym_arguments, + [42966] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1515), 1, + anon_sym_else, + ACTIONS(1513), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + [42979] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1519), 1, + anon_sym_RBRACE, + STATE(357), 1, + sym__field_sep, + STATE(712), 1, + aux_sym__field_sequence_repeat1, + ACTIONS(1517), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [42996] = 6, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1075), 1, + anon_sym_LPAREN, + ACTIONS(1077), 1, + anon_sym_LBRACE, + ACTIONS(1079), 1, + sym_string, + STATE(286), 1, + sym_arguments, + STATE(292), 1, + sym_table, + [43015] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1521), 1, + anon_sym_COMMA, + ACTIONS(1523), 1, + anon_sym_RPAREN, + STATE(812), 1, + sym__comma_spread, + STATE(715), 2, + sym__comma_identifier, + aux_sym__parameter_list_repeat1, + [43032] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1222), 1, + anon_sym_RBRACE, + STATE(356), 1, + sym__field_sep, + STATE(713), 1, + aux_sym__field_sequence_repeat1, + ACTIONS(1525), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [43049] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1530), 1, + anon_sym_RBRACE, + STATE(392), 1, + sym__field_sep, + STATE(713), 1, + aux_sym__field_sequence_repeat1, + ACTIONS(1527), 2, + anon_sym_COMMA, + anon_sym_SEMI, + [43066] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1444), 1, + anon_sym_else, + ACTIONS(1442), 4, + ts_builtin_sym_end, + anon_sym_end, + anon_sym_elseif, + anon_sym_until, + [43079] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1521), 1, + anon_sym_COMMA, + ACTIONS(1532), 1, + anon_sym_RPAREN, + STATE(869), 1, + sym__comma_spread, + STATE(717), 2, + sym__comma_identifier, + aux_sym__parameter_list_repeat1, + [43096] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1534), 1, + anon_sym_COMMA, + ACTIONS(1536), 1, + anon_sym_EQ, + ACTIONS(1538), 1, + anon_sym_in, + STATE(737), 1, + aux_sym__local_variable_declarator_repeat1, + [43112] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1540), 1, + anon_sym_COMMA, + ACTIONS(1543), 1, + anon_sym_RPAREN, + STATE(717), 2, + sym__comma_identifier, + aux_sym__parameter_list_repeat1, + [43126] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1545), 1, + anon_sym_DOT, + STATE(720), 1, + aux_sym_function_name_field_repeat1, + ACTIONS(1547), 2, + anon_sym_COLON, + anon_sym_LPAREN, + [43140] = 5, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1545), 1, + anon_sym_DOT, + ACTIONS(1549), 1, + anon_sym_COLON, + ACTIONS(1552), 1, + anon_sym_LPAREN, + STATE(718), 1, + aux_sym_function_name_field_repeat1, + [43156] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1555), 1, + anon_sym_DOT, + STATE(720), 1, + aux_sym_function_name_field_repeat1, + ACTIONS(1558), 2, + anon_sym_COLON, + anon_sym_LPAREN, + [43170] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1530), 3, + anon_sym_COMMA, + anon_sym_SEMI, + anon_sym_RBRACE, + [43179] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1383), 1, + anon_sym_do, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43192] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(1560), 1, + anon_sym_EQ, + STATE(758), 1, + aux_sym_variable_declaration_repeat1, + [43205] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(133), 1, + anon_sym_else, + ACTIONS(1562), 2, + anon_sym_end, + anon_sym_elseif, + [43216] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1564), 3, + anon_sym_DOT, + anon_sym_COLON, + anon_sym_LPAREN, + [43225] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1566), 1, + anon_sym_function, + ACTIONS(1568), 1, + sym_identifier, + STATE(390), 1, + sym__local_variable_declarator, + [43238] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1570), 1, + anon_sym_function, + ACTIONS(1572), 1, + sym_identifier, + STATE(389), 1, + sym__local_variable_declarator, + [43251] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1574), 1, + anon_sym_do, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43264] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(20), 1, + sym_parameters, + STATE(348), 1, + sym__function_body, + [43277] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(21), 1, + sym_parameters, + STATE(195), 1, + sym__function_body, + [43290] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(15), 1, + sym_parameters, + STATE(421), 1, + sym__function_body, + [43303] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(1576), 1, + anon_sym_EQ, + STATE(758), 1, + aux_sym_variable_declaration_repeat1, + [43316] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1578), 1, + sym_identifier, + STATE(853), 1, + sym__in_loop_expression, + STATE(855), 1, + sym__loop_expression, + [43329] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(19), 1, + sym_parameters, + STATE(151), 1, + sym__function_body, + [43342] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(20), 1, + sym_parameters, + STATE(360), 1, + sym__function_body, + [43355] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(18), 1, + sym_parameters, + STATE(425), 1, + sym__function_body, + [43368] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1534), 1, + anon_sym_COMMA, + ACTIONS(1580), 1, + anon_sym_in, + STATE(755), 1, + aux_sym__local_variable_declarator_repeat1, + [43381] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1578), 1, + sym_identifier, + STATE(878), 1, + sym__loop_expression, + STATE(879), 1, + sym__in_loop_expression, + [43394] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(14), 1, + sym_parameters, + STATE(233), 1, + sym__function_body, + [43407] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(1582), 1, + anon_sym_EQ, + STATE(758), 1, + aux_sym_variable_declaration_repeat1, + [43420] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(16), 1, + sym_parameters, + STATE(412), 1, + sym__function_body, + [43433] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(15), 1, + sym_parameters, + STATE(406), 1, + sym__function_body, + [43446] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(12), 1, + sym_parameters, + STATE(235), 1, + sym__function_body, + [43459] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1584), 1, + anon_sym_function, + ACTIONS(1586), 1, + sym_identifier, + STATE(336), 1, + sym__local_variable_declarator, + [43472] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(18), 1, + sym_parameters, + STATE(395), 1, + sym__function_body, + [43485] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1588), 1, + anon_sym_RPAREN, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43498] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1578), 1, + sym_identifier, + STATE(870), 1, + sym__loop_expression, + STATE(871), 1, + sym__in_loop_expression, + [43511] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1590), 1, + anon_sym_RPAREN, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43524] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(541), 1, + anon_sym_COMMA, + ACTIONS(1592), 1, + anon_sym_EQ, + STATE(758), 1, + aux_sym_variable_declaration_repeat1, + [43537] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1594), 1, + anon_sym_function, + ACTIONS(1596), 1, + sym_identifier, + STATE(385), 1, + sym__local_variable_declarator, + [43550] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1598), 1, + anon_sym_RPAREN, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43563] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1600), 1, + anon_sym_RPAREN, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43576] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1317), 1, + anon_sym_COMMA, + ACTIONS(1602), 1, + anon_sym_RPAREN, + STATE(673), 1, + aux_sym_return_statement_repeat1, + [43589] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1578), 1, + sym_identifier, + STATE(862), 1, + sym__loop_expression, + STATE(863), 1, + sym__in_loop_expression, + [43602] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 1, + anon_sym_in, + ACTIONS(1604), 1, + anon_sym_COMMA, + STATE(755), 1, + aux_sym__local_variable_declarator_repeat1, + [43615] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1609), 1, + anon_sym_else, + ACTIONS(1607), 2, + anon_sym_end, + anon_sym_elseif, + [43626] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(16), 1, + sym_parameters, + STATE(420), 1, + sym__function_body, + [43639] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1611), 1, + anon_sym_COMMA, + ACTIONS(1614), 1, + anon_sym_EQ, + STATE(758), 1, + aux_sym_variable_declaration_repeat1, + [43652] = 4, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1470), 1, + anon_sym_LPAREN, + STATE(17), 1, + sym_parameters, + STATE(327), 1, + sym__function_body, + [43665] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1096), 2, + anon_sym_COMMA, + anon_sym_in, + [43673] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1616), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [43681] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1618), 2, + anon_sym_COMMA, + anon_sym_RPAREN, + [43689] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1620), 1, + sym_spread, + ACTIONS(1622), 1, + sym_identifier, + [43699] = 3, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1624), 1, + anon_sym_COLON, + ACTIONS(1626), 1, + anon_sym_LPAREN, + [43709] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1628), 1, + anon_sym_end, + [43716] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1630), 1, + anon_sym_end, + [43723] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1478), 1, + anon_sym_end, + [43730] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1632), 1, + anon_sym_end, + [43737] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1634), 1, + anon_sym_end, + [43744] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1636), 1, + anon_sym_end, + [43751] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1474), 1, + anon_sym_end, + [43758] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1638), 1, + anon_sym_end, + [43765] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1640), 1, + anon_sym_end, + [43772] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1480), 1, + anon_sym_end, + [43779] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1642), 1, + anon_sym_end, + [43786] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1644), 1, + anon_sym_end, + [43793] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1646), 1, + anon_sym_end, + [43800] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1648), 1, + anon_sym_until, + [43807] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1650), 1, + sym_identifier, + [43814] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1652), 1, + sym_identifier, + [43821] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1654), 1, + anon_sym_end, + [43828] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1656), 1, + sym_identifier, + [43835] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1658), 1, + anon_sym_RPAREN, + [43842] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1468), 1, + anon_sym_end, + [43849] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1660), 1, + sym_identifier, + [43856] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1662), 1, + sym_identifier, + [43863] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1664), 1, + anon_sym_RPAREN, + [43870] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1666), 1, + sym_identifier, + [43877] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1668), 1, + anon_sym_end, + [43884] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1670), 1, + anon_sym_RBRACE, + [43891] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1672), 1, + anon_sym_until, + [43898] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1674), 1, + anon_sym_until, + [43905] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1676), 1, + anon_sym_COLON_COLON, + [43912] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1678), 1, + anon_sym_end, + [43919] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1680), 1, + anon_sym_end, + [43926] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1682), 1, + anon_sym_COLON_COLON, + [43933] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1684), 1, + anon_sym_RBRACE, + [43940] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1686), 1, + anon_sym_until, + [43947] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1688), 1, + sym_identifier, + [43954] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1690), 1, + sym_identifier, + [43961] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1692), 1, + sym_identifier, + [43968] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1694), 1, + anon_sym_end, + [43975] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1696), 1, + anon_sym_end, + [43982] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1698), 1, + sym_identifier, + [43989] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1700), 1, + anon_sym_end, + [43996] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1702), 1, + anon_sym_end, + [44003] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1704), 1, + sym_identifier, + [44010] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1706), 1, + anon_sym_until, + [44017] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1708), 1, + ts_builtin_sym_end, + [44024] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1710), 1, + sym_identifier, + [44031] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1712), 1, + anon_sym_end, + [44038] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1532), 1, + anon_sym_RPAREN, + [44045] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1714), 1, + sym_identifier, + [44052] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1716), 1, + anon_sym_LPAREN, + [44059] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1484), 1, + anon_sym_end, + [44066] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1718), 1, + anon_sym_end, + [44073] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1720), 1, + anon_sym_EQ, + [44080] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1722), 1, + anon_sym_end, + [44087] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1724), 1, + anon_sym_end, + [44094] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1726), 1, + anon_sym_end, + [44101] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1728), 1, + anon_sym_RBRACE, + [44108] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1730), 1, + anon_sym_end, + [44115] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1732), 1, + anon_sym_EQ, + [44122] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1492), 1, + anon_sym_end, + [44129] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1482), 1, + anon_sym_end, + [44136] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1734), 1, + anon_sym_end, + [44143] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1488), 1, + anon_sym_end, + [44150] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1736), 1, + anon_sym_end, + [44157] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1738), 1, + anon_sym_end, + [44164] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1740), 1, + anon_sym_end, + [44171] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1486), 1, + anon_sym_end, + [44178] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1742), 1, + anon_sym_end, + [44185] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1744), 1, + anon_sym_end, + [44192] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1746), 1, + anon_sym_end, + [44199] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1748), 1, + anon_sym_end, + [44206] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1490), 1, + anon_sym_end, + [44213] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1750), 1, + anon_sym_end, + [44220] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1752), 1, + anon_sym_RBRACE, + [44227] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1754), 1, + sym_identifier, + [44234] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1756), 1, + sym_identifier, + [44241] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1758), 1, + anon_sym_end, + [44248] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1760), 1, + sym_identifier, + [44255] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1762), 1, + anon_sym_end, + [44262] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1764), 1, + anon_sym_end, + [44269] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1766), 1, + anon_sym_end, + [44276] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1464), 1, + anon_sym_end, + [44283] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1768), 1, + anon_sym_end, + [44290] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1770), 1, + anon_sym_end, + [44297] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1772), 1, + anon_sym_RBRACE, + [44304] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1774), 1, + anon_sym_end, + [44311] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1776), 1, + anon_sym_COLON_COLON, + [44318] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1778), 1, + anon_sym_end, + [44325] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1780), 1, + anon_sym_do, + [44332] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1782), 1, + anon_sym_end, + [44339] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1784), 1, + anon_sym_do, + [44346] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1786), 1, + anon_sym_end, + [44353] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1788), 1, + sym_identifier, + [44360] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1790), 1, + anon_sym_end, + [44367] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1792), 1, + sym_identifier, + [44374] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1794), 1, + anon_sym_until, + [44381] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1796), 1, + anon_sym_RPAREN, + [44388] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1798), 1, + anon_sym_do, + [44395] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1800), 1, + anon_sym_do, + [44402] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1802), 1, + anon_sym_until, + [44409] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1804), 1, + sym_identifier, + [44416] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1806), 1, + anon_sym_end, + [44423] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1808), 1, + sym_identifier, + [44430] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1810), 1, + sym_identifier, + [44437] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1812), 1, + anon_sym_RPAREN, + [44444] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1814), 1, + anon_sym_do, + [44451] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1816), 1, + anon_sym_do, + [44458] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1818), 1, + sym_identifier, + [44465] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1820), 1, + sym_identifier, + [44472] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1822), 1, + anon_sym_end, + [44479] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1824), 1, + sym_identifier, + [44486] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1826), 1, + sym_identifier, + [44493] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1828), 1, + anon_sym_end, + [44500] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1830), 1, + anon_sym_do, + [44507] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1832), 1, + anon_sym_do, + [44514] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1834), 1, + sym_identifier, + [44521] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1836), 1, + anon_sym_RBRACE, + [44528] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1476), 1, + anon_sym_end, + [44535] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(283), 1, + ts_builtin_sym_end, + [44542] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1838), 1, + ts_builtin_sym_end, + [44549] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1840), 1, + anon_sym_COLON_COLON, + [44556] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1842), 1, + anon_sym_until, + [44563] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1844), 1, + sym_identifier, + [44570] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1846), 1, + anon_sym_end, + [44577] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1848), 1, + sym_identifier, + [44584] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1622), 1, + sym_identifier, + [44591] = 2, + ACTIONS(3), 1, + sym_comment, + ACTIONS(1850), 1, + sym_identifier, +}; + +static uint32_t ts_small_parse_table_map[] = { + [SMALL_STATE(12)] = 0, + [SMALL_STATE(13)] = 127, + [SMALL_STATE(14)] = 250, + [SMALL_STATE(15)] = 377, + [SMALL_STATE(16)] = 504, + [SMALL_STATE(17)] = 631, + [SMALL_STATE(18)] = 758, + [SMALL_STATE(19)] = 885, + [SMALL_STATE(20)] = 1012, + [SMALL_STATE(21)] = 1139, + [SMALL_STATE(22)] = 1266, + [SMALL_STATE(23)] = 1392, + [SMALL_STATE(24)] = 1518, + [SMALL_STATE(25)] = 1644, + [SMALL_STATE(26)] = 1770, + [SMALL_STATE(27)] = 1896, + [SMALL_STATE(28)] = 2022, + [SMALL_STATE(29)] = 2148, + [SMALL_STATE(30)] = 2274, + [SMALL_STATE(31)] = 2400, + [SMALL_STATE(32)] = 2526, + [SMALL_STATE(33)] = 2652, + [SMALL_STATE(34)] = 2778, + [SMALL_STATE(35)] = 2904, + [SMALL_STATE(36)] = 3030, + [SMALL_STATE(37)] = 3156, + [SMALL_STATE(38)] = 3282, + [SMALL_STATE(39)] = 3408, + [SMALL_STATE(40)] = 3534, + [SMALL_STATE(41)] = 3660, + [SMALL_STATE(42)] = 3786, + [SMALL_STATE(43)] = 3912, + [SMALL_STATE(44)] = 4038, + [SMALL_STATE(45)] = 4164, + [SMALL_STATE(46)] = 4290, + [SMALL_STATE(47)] = 4416, + [SMALL_STATE(48)] = 4542, + [SMALL_STATE(49)] = 4668, + [SMALL_STATE(50)] = 4794, + [SMALL_STATE(51)] = 4920, + [SMALL_STATE(52)] = 5046, + [SMALL_STATE(53)] = 5172, + [SMALL_STATE(54)] = 5298, + [SMALL_STATE(55)] = 5424, + [SMALL_STATE(56)] = 5550, + [SMALL_STATE(57)] = 5676, + [SMALL_STATE(58)] = 5802, + [SMALL_STATE(59)] = 5928, + [SMALL_STATE(60)] = 6054, + [SMALL_STATE(61)] = 6180, + [SMALL_STATE(62)] = 6306, + [SMALL_STATE(63)] = 6432, + [SMALL_STATE(64)] = 6558, + [SMALL_STATE(65)] = 6684, + [SMALL_STATE(66)] = 6810, + [SMALL_STATE(67)] = 6931, + [SMALL_STATE(68)] = 7002, + [SMALL_STATE(69)] = 7125, + [SMALL_STATE(70)] = 7206, + [SMALL_STATE(71)] = 7327, + [SMALL_STATE(72)] = 7391, + [SMALL_STATE(73)] = 7455, + [SMALL_STATE(74)] = 7523, + [SMALL_STATE(75)] = 7587, + [SMALL_STATE(76)] = 7650, + [SMALL_STATE(77)] = 7729, + [SMALL_STATE(78)] = 7792, + [SMALL_STATE(79)] = 7861, + [SMALL_STATE(80)] = 7940, + [SMALL_STATE(81)] = 8003, + [SMALL_STATE(82)] = 8072, + [SMALL_STATE(83)] = 8135, + [SMALL_STATE(84)] = 8198, + [SMALL_STATE(85)] = 8265, + [SMALL_STATE(86)] = 8344, + [SMALL_STATE(87)] = 8407, + [SMALL_STATE(88)] = 8470, + [SMALL_STATE(89)] = 8533, + [SMALL_STATE(90)] = 8596, + [SMALL_STATE(91)] = 8665, + [SMALL_STATE(92)] = 8728, + [SMALL_STATE(93)] = 8790, + [SMALL_STATE(94)] = 8856, + [SMALL_STATE(95)] = 8922, + [SMALL_STATE(96)] = 8984, + [SMALL_STATE(97)] = 9046, + [SMALL_STATE(98)] = 9108, + [SMALL_STATE(99)] = 9174, + [SMALL_STATE(100)] = 9236, + [SMALL_STATE(101)] = 9298, + [SMALL_STATE(102)] = 9360, + [SMALL_STATE(103)] = 9422, + [SMALL_STATE(104)] = 9484, + [SMALL_STATE(105)] = 9550, + [SMALL_STATE(106)] = 9611, + [SMALL_STATE(107)] = 9672, + [SMALL_STATE(108)] = 9733, + [SMALL_STATE(109)] = 9794, + [SMALL_STATE(110)] = 9855, + [SMALL_STATE(111)] = 9916, + [SMALL_STATE(112)] = 9981, + [SMALL_STATE(113)] = 10046, + [SMALL_STATE(114)] = 10107, + [SMALL_STATE(115)] = 10168, + [SMALL_STATE(116)] = 10229, + [SMALL_STATE(117)] = 10290, + [SMALL_STATE(118)] = 10351, + [SMALL_STATE(119)] = 10412, + [SMALL_STATE(120)] = 10503, + [SMALL_STATE(121)] = 10564, + [SMALL_STATE(122)] = 10625, + [SMALL_STATE(123)] = 10686, + [SMALL_STATE(124)] = 10747, + [SMALL_STATE(125)] = 10808, + [SMALL_STATE(126)] = 10869, + [SMALL_STATE(127)] = 10930, + [SMALL_STATE(128)] = 10991, + [SMALL_STATE(129)] = 11052, + [SMALL_STATE(130)] = 11113, + [SMALL_STATE(131)] = 11174, + [SMALL_STATE(132)] = 11235, + [SMALL_STATE(133)] = 11300, + [SMALL_STATE(134)] = 11361, + [SMALL_STATE(135)] = 11422, + [SMALL_STATE(136)] = 11513, + [SMALL_STATE(137)] = 11574, + [SMALL_STATE(138)] = 11635, + [SMALL_STATE(139)] = 11696, + [SMALL_STATE(140)] = 11757, + [SMALL_STATE(141)] = 11848, + [SMALL_STATE(142)] = 11930, + [SMALL_STATE(143)] = 11990, + [SMALL_STATE(144)] = 12052, + [SMALL_STATE(145)] = 12118, + [SMALL_STATE(146)] = 12194, + [SMALL_STATE(147)] = 12256, + [SMALL_STATE(148)] = 12334, + [SMALL_STATE(149)] = 12406, + [SMALL_STATE(150)] = 12468, + [SMALL_STATE(151)] = 12532, + [SMALL_STATE(152)] = 12592, + [SMALL_STATE(153)] = 12656, + [SMALL_STATE(154)] = 12716, + [SMALL_STATE(155)] = 12800, + [SMALL_STATE(156)] = 12874, + [SMALL_STATE(157)] = 12938, + [SMALL_STATE(158)] = 13008, + [SMALL_STATE(159)] = 13068, + [SMALL_STATE(160)] = 13154, + [SMALL_STATE(161)] = 13224, + [SMALL_STATE(162)] = 13313, + [SMALL_STATE(163)] = 13402, + [SMALL_STATE(164)] = 13463, + [SMALL_STATE(165)] = 13532, + [SMALL_STATE(166)] = 13621, + [SMALL_STATE(167)] = 13706, + [SMALL_STATE(168)] = 13787, + [SMALL_STATE(169)] = 13864, + [SMALL_STATE(170)] = 13947, + [SMALL_STATE(171)] = 14032, + [SMALL_STATE(172)] = 14121, + [SMALL_STATE(173)] = 14186, + [SMALL_STATE(174)] = 14255, + [SMALL_STATE(175)] = 14316, + [SMALL_STATE(176)] = 14405, + [SMALL_STATE(177)] = 14494, + [SMALL_STATE(178)] = 14555, + [SMALL_STATE(179)] = 14640, + [SMALL_STATE(180)] = 14729, + [SMALL_STATE(181)] = 14800, + [SMALL_STATE(182)] = 14889, + [SMALL_STATE(183)] = 14978, + [SMALL_STATE(184)] = 15063, + [SMALL_STATE(185)] = 15136, + [SMALL_STATE(186)] = 15211, + [SMALL_STATE(187)] = 15287, + [SMALL_STATE(188)] = 15355, + [SMALL_STATE(189)] = 15439, + [SMALL_STATE(190)] = 15499, + [SMALL_STATE(191)] = 15559, + [SMALL_STATE(192)] = 15617, + [SMALL_STATE(193)] = 15675, + [SMALL_STATE(194)] = 15759, + [SMALL_STATE(195)] = 15833, + [SMALL_STATE(196)] = 15891, + [SMALL_STATE(197)] = 15973, + [SMALL_STATE(198)] = 16031, + [SMALL_STATE(199)] = 16111, + [SMALL_STATE(200)] = 16185, + [SMALL_STATE(201)] = 16261, + [SMALL_STATE(202)] = 16319, + [SMALL_STATE(203)] = 16391, + [SMALL_STATE(204)] = 16461, + [SMALL_STATE(205)] = 16519, + [SMALL_STATE(206)] = 16577, + [SMALL_STATE(207)] = 16645, + [SMALL_STATE(208)] = 16709, + [SMALL_STATE(209)] = 16781, + [SMALL_STATE(210)] = 16841, + [SMALL_STATE(211)] = 16911, + [SMALL_STATE(212)] = 16991, + [SMALL_STATE(213)] = 17051, + [SMALL_STATE(214)] = 17109, + [SMALL_STATE(215)] = 17169, + [SMALL_STATE(216)] = 17251, + [SMALL_STATE(217)] = 17331, + [SMALL_STATE(218)] = 17399, + [SMALL_STATE(219)] = 17475, + [SMALL_STATE(220)] = 17549, + [SMALL_STATE(221)] = 17613, + [SMALL_STATE(222)] = 17685, + [SMALL_STATE(223)] = 17745, + [SMALL_STATE(224)] = 17803, + [SMALL_STATE(225)] = 17861, + [SMALL_STATE(226)] = 17929, + [SMALL_STATE(227)] = 17989, + [SMALL_STATE(228)] = 18059, + [SMALL_STATE(229)] = 18127, + [SMALL_STATE(230)] = 18191, + [SMALL_STATE(231)] = 18251, + [SMALL_STATE(232)] = 18319, + [SMALL_STATE(233)] = 18379, + [SMALL_STATE(234)] = 18437, + [SMALL_STATE(235)] = 18519, + [SMALL_STATE(236)] = 18577, + [SMALL_STATE(237)] = 18661, + [SMALL_STATE(238)] = 18730, + [SMALL_STATE(239)] = 18799, + [SMALL_STATE(240)] = 18882, + [SMALL_STATE(241)] = 18941, + [SMALL_STATE(242)] = 19024, + [SMALL_STATE(243)] = 19107, + [SMALL_STATE(244)] = 19166, + [SMALL_STATE(245)] = 19247, + [SMALL_STATE(246)] = 19328, + [SMALL_STATE(247)] = 19387, + [SMALL_STATE(248)] = 19470, + [SMALL_STATE(249)] = 19529, + [SMALL_STATE(250)] = 19608, + [SMALL_STATE(251)] = 19683, + [SMALL_STATE(252)] = 19750, + [SMALL_STATE(253)] = 19817, + [SMALL_STATE(254)] = 19896, + [SMALL_STATE(255)] = 19955, + [SMALL_STATE(256)] = 20028, + [SMALL_STATE(257)] = 20091, + [SMALL_STATE(258)] = 20166, + [SMALL_STATE(259)] = 20239, + [SMALL_STATE(260)] = 20310, + [SMALL_STATE(261)] = 20377, + [SMALL_STATE(262)] = 20460, + [SMALL_STATE(263)] = 20543, + [SMALL_STATE(264)] = 20626, + [SMALL_STATE(265)] = 20709, + [SMALL_STATE(266)] = 20772, + [SMALL_STATE(267)] = 20831, + [SMALL_STATE(268)] = 20898, + [SMALL_STATE(269)] = 20981, + [SMALL_STATE(270)] = 21052, + [SMALL_STATE(271)] = 21125, + [SMALL_STATE(272)] = 21184, + [SMALL_STATE(273)] = 21267, + [SMALL_STATE(274)] = 21338, + [SMALL_STATE(275)] = 21413, + [SMALL_STATE(276)] = 21492, + [SMALL_STATE(277)] = 21575, + [SMALL_STATE(278)] = 21656, + [SMALL_STATE(279)] = 21725, + [SMALL_STATE(280)] = 21808, + [SMALL_STATE(281)] = 21867, + [SMALL_STATE(282)] = 21934, + [SMALL_STATE(283)] = 21997, + [SMALL_STATE(284)] = 22056, + [SMALL_STATE(285)] = 22123, + [SMALL_STATE(286)] = 22188, + [SMALL_STATE(287)] = 22235, + [SMALL_STATE(288)] = 22282, + [SMALL_STATE(289)] = 22333, + [SMALL_STATE(290)] = 22380, + [SMALL_STATE(291)] = 22427, + [SMALL_STATE(292)] = 22474, + [SMALL_STATE(293)] = 22521, + [SMALL_STATE(294)] = 22568, + [SMALL_STATE(295)] = 22615, + [SMALL_STATE(296)] = 22662, + [SMALL_STATE(297)] = 22709, + [SMALL_STATE(298)] = 22756, + [SMALL_STATE(299)] = 22803, + [SMALL_STATE(300)] = 22850, + [SMALL_STATE(301)] = 22897, + [SMALL_STATE(302)] = 22944, + [SMALL_STATE(303)] = 22991, + [SMALL_STATE(304)] = 23037, + [SMALL_STATE(305)] = 23083, + [SMALL_STATE(306)] = 23129, + [SMALL_STATE(307)] = 23171, + [SMALL_STATE(308)] = 23217, + [SMALL_STATE(309)] = 23262, + [SMALL_STATE(310)] = 23307, + [SMALL_STATE(311)] = 23348, + [SMALL_STATE(312)] = 23393, + [SMALL_STATE(313)] = 23434, + [SMALL_STATE(314)] = 23479, + [SMALL_STATE(315)] = 23538, + [SMALL_STATE(316)] = 23595, + [SMALL_STATE(317)] = 23670, + [SMALL_STATE(318)] = 23745, + [SMALL_STATE(319)] = 23790, + [SMALL_STATE(320)] = 23855, + [SMALL_STATE(321)] = 23918, + [SMALL_STATE(322)] = 23993, + [SMALL_STATE(323)] = 24068, + [SMALL_STATE(324)] = 24139, + [SMALL_STATE(325)] = 24182, + [SMALL_STATE(326)] = 24223, + [SMALL_STATE(327)] = 24264, + [SMALL_STATE(328)] = 24305, + [SMALL_STATE(329)] = 24346, + [SMALL_STATE(330)] = 24391, + [SMALL_STATE(331)] = 24436, + [SMALL_STATE(332)] = 24481, + [SMALL_STATE(333)] = 24524, + [SMALL_STATE(334)] = 24575, + [SMALL_STATE(335)] = 24650, + [SMALL_STATE(336)] = 24693, + [SMALL_STATE(337)] = 24736, + [SMALL_STATE(338)] = 24783, + [SMALL_STATE(339)] = 24834, + [SMALL_STATE(340)] = 24879, + [SMALL_STATE(341)] = 24932, + [SMALL_STATE(342)] = 24987, + [SMALL_STATE(343)] = 25062, + [SMALL_STATE(344)] = 25106, + [SMALL_STATE(345)] = 25146, + [SMALL_STATE(346)] = 25186, + [SMALL_STATE(347)] = 25230, + [SMALL_STATE(348)] = 25270, + [SMALL_STATE(349)] = 25310, + [SMALL_STATE(350)] = 25354, + [SMALL_STATE(351)] = 25398, + [SMALL_STATE(352)] = 25438, + [SMALL_STATE(353)] = 25478, + [SMALL_STATE(354)] = 25518, + [SMALL_STATE(355)] = 25562, + [SMALL_STATE(356)] = 25606, + [SMALL_STATE(357)] = 25678, + [SMALL_STATE(358)] = 25750, + [SMALL_STATE(359)] = 25794, + [SMALL_STATE(360)] = 25834, + [SMALL_STATE(361)] = 25874, + [SMALL_STATE(362)] = 25914, + [SMALL_STATE(363)] = 25954, + [SMALL_STATE(364)] = 25994, + [SMALL_STATE(365)] = 26034, + [SMALL_STATE(366)] = 26074, + [SMALL_STATE(367)] = 26114, + [SMALL_STATE(368)] = 26154, + [SMALL_STATE(369)] = 26198, + [SMALL_STATE(370)] = 26238, + [SMALL_STATE(371)] = 26282, + [SMALL_STATE(372)] = 26322, + [SMALL_STATE(373)] = 26362, + [SMALL_STATE(374)] = 26402, + [SMALL_STATE(375)] = 26446, + [SMALL_STATE(376)] = 26486, + [SMALL_STATE(377)] = 26530, + [SMALL_STATE(378)] = 26574, + [SMALL_STATE(379)] = 26614, + [SMALL_STATE(380)] = 26654, + [SMALL_STATE(381)] = 26694, + [SMALL_STATE(382)] = 26734, + [SMALL_STATE(383)] = 26774, + [SMALL_STATE(384)] = 26814, + [SMALL_STATE(385)] = 26854, + [SMALL_STATE(386)] = 26895, + [SMALL_STATE(387)] = 26940, + [SMALL_STATE(388)] = 27009, + [SMALL_STATE(389)] = 27078, + [SMALL_STATE(390)] = 27119, + [SMALL_STATE(391)] = 27160, + [SMALL_STATE(392)] = 27229, + [SMALL_STATE(393)] = 27298, + [SMALL_STATE(394)] = 27336, + [SMALL_STATE(395)] = 27374, + [SMALL_STATE(396)] = 27412, + [SMALL_STATE(397)] = 27450, + [SMALL_STATE(398)] = 27488, + [SMALL_STATE(399)] = 27526, + [SMALL_STATE(400)] = 27564, + [SMALL_STATE(401)] = 27602, + [SMALL_STATE(402)] = 27640, + [SMALL_STATE(403)] = 27678, + [SMALL_STATE(404)] = 27716, + [SMALL_STATE(405)] = 27754, + [SMALL_STATE(406)] = 27792, + [SMALL_STATE(407)] = 27830, + [SMALL_STATE(408)] = 27868, + [SMALL_STATE(409)] = 27906, + [SMALL_STATE(410)] = 27970, + [SMALL_STATE(411)] = 28008, + [SMALL_STATE(412)] = 28046, + [SMALL_STATE(413)] = 28084, + [SMALL_STATE(414)] = 28122, + [SMALL_STATE(415)] = 28160, + [SMALL_STATE(416)] = 28198, + [SMALL_STATE(417)] = 28236, + [SMALL_STATE(418)] = 28274, + [SMALL_STATE(419)] = 28312, + [SMALL_STATE(420)] = 28350, + [SMALL_STATE(421)] = 28388, + [SMALL_STATE(422)] = 28426, + [SMALL_STATE(423)] = 28464, + [SMALL_STATE(424)] = 28502, + [SMALL_STATE(425)] = 28540, + [SMALL_STATE(426)] = 28578, + [SMALL_STATE(427)] = 28616, + [SMALL_STATE(428)] = 28654, + [SMALL_STATE(429)] = 28692, + [SMALL_STATE(430)] = 28730, + [SMALL_STATE(431)] = 28768, + [SMALL_STATE(432)] = 28806, + [SMALL_STATE(433)] = 28844, + [SMALL_STATE(434)] = 28882, + [SMALL_STATE(435)] = 28920, + [SMALL_STATE(436)] = 28958, + [SMALL_STATE(437)] = 28996, + [SMALL_STATE(438)] = 29034, + [SMALL_STATE(439)] = 29072, + [SMALL_STATE(440)] = 29110, + [SMALL_STATE(441)] = 29148, + [SMALL_STATE(442)] = 29220, + [SMALL_STATE(443)] = 29258, + [SMALL_STATE(444)] = 29296, + [SMALL_STATE(445)] = 29334, + [SMALL_STATE(446)] = 29372, + [SMALL_STATE(447)] = 29410, + [SMALL_STATE(448)] = 29448, + [SMALL_STATE(449)] = 29486, + [SMALL_STATE(450)] = 29524, + [SMALL_STATE(451)] = 29562, + [SMALL_STATE(452)] = 29600, + [SMALL_STATE(453)] = 29638, + [SMALL_STATE(454)] = 29676, + [SMALL_STATE(455)] = 29714, + [SMALL_STATE(456)] = 29752, + [SMALL_STATE(457)] = 29790, + [SMALL_STATE(458)] = 29828, + [SMALL_STATE(459)] = 29866, + [SMALL_STATE(460)] = 29904, + [SMALL_STATE(461)] = 29942, + [SMALL_STATE(462)] = 29980, + [SMALL_STATE(463)] = 30018, + [SMALL_STATE(464)] = 30056, + [SMALL_STATE(465)] = 30094, + [SMALL_STATE(466)] = 30132, + [SMALL_STATE(467)] = 30170, + [SMALL_STATE(468)] = 30208, + [SMALL_STATE(469)] = 30246, + [SMALL_STATE(470)] = 30284, + [SMALL_STATE(471)] = 30322, + [SMALL_STATE(472)] = 30360, + [SMALL_STATE(473)] = 30423, + [SMALL_STATE(474)] = 30486, + [SMALL_STATE(475)] = 30549, + [SMALL_STATE(476)] = 30612, + [SMALL_STATE(477)] = 30675, + [SMALL_STATE(478)] = 30735, + [SMALL_STATE(479)] = 30795, + [SMALL_STATE(480)] = 30855, + [SMALL_STATE(481)] = 30915, + [SMALL_STATE(482)] = 30975, + [SMALL_STATE(483)] = 31035, + [SMALL_STATE(484)] = 31095, + [SMALL_STATE(485)] = 31155, + [SMALL_STATE(486)] = 31215, + [SMALL_STATE(487)] = 31275, + [SMALL_STATE(488)] = 31335, + [SMALL_STATE(489)] = 31395, + [SMALL_STATE(490)] = 31455, + [SMALL_STATE(491)] = 31515, + [SMALL_STATE(492)] = 31575, + [SMALL_STATE(493)] = 31635, + [SMALL_STATE(494)] = 31695, + [SMALL_STATE(495)] = 31755, + [SMALL_STATE(496)] = 31815, + [SMALL_STATE(497)] = 31875, + [SMALL_STATE(498)] = 31935, + [SMALL_STATE(499)] = 31995, + [SMALL_STATE(500)] = 32055, + [SMALL_STATE(501)] = 32115, + [SMALL_STATE(502)] = 32175, + [SMALL_STATE(503)] = 32235, + [SMALL_STATE(504)] = 32295, + [SMALL_STATE(505)] = 32355, + [SMALL_STATE(506)] = 32415, + [SMALL_STATE(507)] = 32475, + [SMALL_STATE(508)] = 32535, + [SMALL_STATE(509)] = 32595, + [SMALL_STATE(510)] = 32655, + [SMALL_STATE(511)] = 32715, + [SMALL_STATE(512)] = 32775, + [SMALL_STATE(513)] = 32835, + [SMALL_STATE(514)] = 32895, + [SMALL_STATE(515)] = 32955, + [SMALL_STATE(516)] = 33015, + [SMALL_STATE(517)] = 33075, + [SMALL_STATE(518)] = 33135, + [SMALL_STATE(519)] = 33195, + [SMALL_STATE(520)] = 33255, + [SMALL_STATE(521)] = 33315, + [SMALL_STATE(522)] = 33375, + [SMALL_STATE(523)] = 33435, + [SMALL_STATE(524)] = 33495, + [SMALL_STATE(525)] = 33555, + [SMALL_STATE(526)] = 33615, + [SMALL_STATE(527)] = 33675, + [SMALL_STATE(528)] = 33735, + [SMALL_STATE(529)] = 33795, + [SMALL_STATE(530)] = 33855, + [SMALL_STATE(531)] = 33915, + [SMALL_STATE(532)] = 33975, + [SMALL_STATE(533)] = 34035, + [SMALL_STATE(534)] = 34095, + [SMALL_STATE(535)] = 34155, + [SMALL_STATE(536)] = 34215, + [SMALL_STATE(537)] = 34275, + [SMALL_STATE(538)] = 34335, + [SMALL_STATE(539)] = 34395, + [SMALL_STATE(540)] = 34455, + [SMALL_STATE(541)] = 34515, + [SMALL_STATE(542)] = 34575, + [SMALL_STATE(543)] = 34635, + [SMALL_STATE(544)] = 34695, + [SMALL_STATE(545)] = 34755, + [SMALL_STATE(546)] = 34815, + [SMALL_STATE(547)] = 34875, + [SMALL_STATE(548)] = 34935, + [SMALL_STATE(549)] = 34995, + [SMALL_STATE(550)] = 35055, + [SMALL_STATE(551)] = 35115, + [SMALL_STATE(552)] = 35175, + [SMALL_STATE(553)] = 35235, + [SMALL_STATE(554)] = 35295, + [SMALL_STATE(555)] = 35355, + [SMALL_STATE(556)] = 35415, + [SMALL_STATE(557)] = 35475, + [SMALL_STATE(558)] = 35535, + [SMALL_STATE(559)] = 35595, + [SMALL_STATE(560)] = 35655, + [SMALL_STATE(561)] = 35715, + [SMALL_STATE(562)] = 35775, + [SMALL_STATE(563)] = 35835, + [SMALL_STATE(564)] = 35895, + [SMALL_STATE(565)] = 35955, + [SMALL_STATE(566)] = 36015, + [SMALL_STATE(567)] = 36075, + [SMALL_STATE(568)] = 36135, + [SMALL_STATE(569)] = 36195, + [SMALL_STATE(570)] = 36255, + [SMALL_STATE(571)] = 36315, + [SMALL_STATE(572)] = 36375, + [SMALL_STATE(573)] = 36435, + [SMALL_STATE(574)] = 36495, + [SMALL_STATE(575)] = 36555, + [SMALL_STATE(576)] = 36615, + [SMALL_STATE(577)] = 36675, + [SMALL_STATE(578)] = 36735, + [SMALL_STATE(579)] = 36795, + [SMALL_STATE(580)] = 36855, + [SMALL_STATE(581)] = 36915, + [SMALL_STATE(582)] = 36975, + [SMALL_STATE(583)] = 37035, + [SMALL_STATE(584)] = 37095, + [SMALL_STATE(585)] = 37155, + [SMALL_STATE(586)] = 37215, + [SMALL_STATE(587)] = 37275, + [SMALL_STATE(588)] = 37335, + [SMALL_STATE(589)] = 37395, + [SMALL_STATE(590)] = 37455, + [SMALL_STATE(591)] = 37515, + [SMALL_STATE(592)] = 37575, + [SMALL_STATE(593)] = 37635, + [SMALL_STATE(594)] = 37695, + [SMALL_STATE(595)] = 37755, + [SMALL_STATE(596)] = 37815, + [SMALL_STATE(597)] = 37875, + [SMALL_STATE(598)] = 37935, + [SMALL_STATE(599)] = 37995, + [SMALL_STATE(600)] = 38055, + [SMALL_STATE(601)] = 38115, + [SMALL_STATE(602)] = 38175, + [SMALL_STATE(603)] = 38235, + [SMALL_STATE(604)] = 38295, + [SMALL_STATE(605)] = 38355, + [SMALL_STATE(606)] = 38415, + [SMALL_STATE(607)] = 38475, + [SMALL_STATE(608)] = 38535, + [SMALL_STATE(609)] = 38595, + [SMALL_STATE(610)] = 38655, + [SMALL_STATE(611)] = 38715, + [SMALL_STATE(612)] = 38775, + [SMALL_STATE(613)] = 38835, + [SMALL_STATE(614)] = 38895, + [SMALL_STATE(615)] = 38955, + [SMALL_STATE(616)] = 39015, + [SMALL_STATE(617)] = 39075, + [SMALL_STATE(618)] = 39135, + [SMALL_STATE(619)] = 39195, + [SMALL_STATE(620)] = 39255, + [SMALL_STATE(621)] = 39315, + [SMALL_STATE(622)] = 39375, + [SMALL_STATE(623)] = 39435, + [SMALL_STATE(624)] = 39495, + [SMALL_STATE(625)] = 39555, + [SMALL_STATE(626)] = 39615, + [SMALL_STATE(627)] = 39675, + [SMALL_STATE(628)] = 39735, + [SMALL_STATE(629)] = 39795, + [SMALL_STATE(630)] = 39855, + [SMALL_STATE(631)] = 39915, + [SMALL_STATE(632)] = 39975, + [SMALL_STATE(633)] = 40035, + [SMALL_STATE(634)] = 40095, + [SMALL_STATE(635)] = 40155, + [SMALL_STATE(636)] = 40215, + [SMALL_STATE(637)] = 40275, + [SMALL_STATE(638)] = 40335, + [SMALL_STATE(639)] = 40395, + [SMALL_STATE(640)] = 40455, + [SMALL_STATE(641)] = 40515, + [SMALL_STATE(642)] = 40571, + [SMALL_STATE(643)] = 40631, + [SMALL_STATE(644)] = 40691, + [SMALL_STATE(645)] = 40751, + [SMALL_STATE(646)] = 40811, + [SMALL_STATE(647)] = 40867, + [SMALL_STATE(648)] = 40927, + [SMALL_STATE(649)] = 40987, + [SMALL_STATE(650)] = 41044, + [SMALL_STATE(651)] = 41098, + [SMALL_STATE(652)] = 41152, + [SMALL_STATE(653)] = 41206, + [SMALL_STATE(654)] = 41260, + [SMALL_STATE(655)] = 41314, + [SMALL_STATE(656)] = 41368, + [SMALL_STATE(657)] = 41422, + [SMALL_STATE(658)] = 41476, + [SMALL_STATE(659)] = 41530, + [SMALL_STATE(660)] = 41584, + [SMALL_STATE(661)] = 41638, + [SMALL_STATE(662)] = 41692, + [SMALL_STATE(663)] = 41746, + [SMALL_STATE(664)] = 41800, + [SMALL_STATE(665)] = 41854, + [SMALL_STATE(666)] = 41908, + [SMALL_STATE(667)] = 41962, + [SMALL_STATE(668)] = 42016, + [SMALL_STATE(669)] = 42070, + [SMALL_STATE(670)] = 42124, + [SMALL_STATE(671)] = 42178, + [SMALL_STATE(672)] = 42232, + [SMALL_STATE(673)] = 42260, + [SMALL_STATE(674)] = 42282, + [SMALL_STATE(675)] = 42307, + [SMALL_STATE(676)] = 42323, + [SMALL_STATE(677)] = 42351, + [SMALL_STATE(678)] = 42372, + [SMALL_STATE(679)] = 42392, + [SMALL_STATE(680)] = 42412, + [SMALL_STATE(681)] = 42434, + [SMALL_STATE(682)] = 42454, + [SMALL_STATE(683)] = 42474, + [SMALL_STATE(684)] = 42494, + [SMALL_STATE(685)] = 42514, + [SMALL_STATE(686)] = 42534, + [SMALL_STATE(687)] = 42554, + [SMALL_STATE(688)] = 42574, + [SMALL_STATE(689)] = 42594, + [SMALL_STATE(690)] = 42616, + [SMALL_STATE(691)] = 42638, + [SMALL_STATE(692)] = 42660, + [SMALL_STATE(693)] = 42680, + [SMALL_STATE(694)] = 42700, + [SMALL_STATE(695)] = 42720, + [SMALL_STATE(696)] = 42740, + [SMALL_STATE(697)] = 42760, + [SMALL_STATE(698)] = 42780, + [SMALL_STATE(699)] = 42800, + [SMALL_STATE(700)] = 42820, + [SMALL_STATE(701)] = 42840, + [SMALL_STATE(702)] = 42860, + [SMALL_STATE(703)] = 42879, + [SMALL_STATE(704)] = 42896, + [SMALL_STATE(705)] = 42915, + [SMALL_STATE(706)] = 42928, + [SMALL_STATE(707)] = 42947, + [SMALL_STATE(708)] = 42966, + [SMALL_STATE(709)] = 42979, + [SMALL_STATE(710)] = 42996, + [SMALL_STATE(711)] = 43015, + [SMALL_STATE(712)] = 43032, + [SMALL_STATE(713)] = 43049, + [SMALL_STATE(714)] = 43066, + [SMALL_STATE(715)] = 43079, + [SMALL_STATE(716)] = 43096, + [SMALL_STATE(717)] = 43112, + [SMALL_STATE(718)] = 43126, + [SMALL_STATE(719)] = 43140, + [SMALL_STATE(720)] = 43156, + [SMALL_STATE(721)] = 43170, + [SMALL_STATE(722)] = 43179, + [SMALL_STATE(723)] = 43192, + [SMALL_STATE(724)] = 43205, + [SMALL_STATE(725)] = 43216, + [SMALL_STATE(726)] = 43225, + [SMALL_STATE(727)] = 43238, + [SMALL_STATE(728)] = 43251, + [SMALL_STATE(729)] = 43264, + [SMALL_STATE(730)] = 43277, + [SMALL_STATE(731)] = 43290, + [SMALL_STATE(732)] = 43303, + [SMALL_STATE(733)] = 43316, + [SMALL_STATE(734)] = 43329, + [SMALL_STATE(735)] = 43342, + [SMALL_STATE(736)] = 43355, + [SMALL_STATE(737)] = 43368, + [SMALL_STATE(738)] = 43381, + [SMALL_STATE(739)] = 43394, + [SMALL_STATE(740)] = 43407, + [SMALL_STATE(741)] = 43420, + [SMALL_STATE(742)] = 43433, + [SMALL_STATE(743)] = 43446, + [SMALL_STATE(744)] = 43459, + [SMALL_STATE(745)] = 43472, + [SMALL_STATE(746)] = 43485, + [SMALL_STATE(747)] = 43498, + [SMALL_STATE(748)] = 43511, + [SMALL_STATE(749)] = 43524, + [SMALL_STATE(750)] = 43537, + [SMALL_STATE(751)] = 43550, + [SMALL_STATE(752)] = 43563, + [SMALL_STATE(753)] = 43576, + [SMALL_STATE(754)] = 43589, + [SMALL_STATE(755)] = 43602, + [SMALL_STATE(756)] = 43615, + [SMALL_STATE(757)] = 43626, + [SMALL_STATE(758)] = 43639, + [SMALL_STATE(759)] = 43652, + [SMALL_STATE(760)] = 43665, + [SMALL_STATE(761)] = 43673, + [SMALL_STATE(762)] = 43681, + [SMALL_STATE(763)] = 43689, + [SMALL_STATE(764)] = 43699, + [SMALL_STATE(765)] = 43709, + [SMALL_STATE(766)] = 43716, + [SMALL_STATE(767)] = 43723, + [SMALL_STATE(768)] = 43730, + [SMALL_STATE(769)] = 43737, + [SMALL_STATE(770)] = 43744, + [SMALL_STATE(771)] = 43751, + [SMALL_STATE(772)] = 43758, + [SMALL_STATE(773)] = 43765, + [SMALL_STATE(774)] = 43772, + [SMALL_STATE(775)] = 43779, + [SMALL_STATE(776)] = 43786, + [SMALL_STATE(777)] = 43793, + [SMALL_STATE(778)] = 43800, + [SMALL_STATE(779)] = 43807, + [SMALL_STATE(780)] = 43814, + [SMALL_STATE(781)] = 43821, + [SMALL_STATE(782)] = 43828, + [SMALL_STATE(783)] = 43835, + [SMALL_STATE(784)] = 43842, + [SMALL_STATE(785)] = 43849, + [SMALL_STATE(786)] = 43856, + [SMALL_STATE(787)] = 43863, + [SMALL_STATE(788)] = 43870, + [SMALL_STATE(789)] = 43877, + [SMALL_STATE(790)] = 43884, + [SMALL_STATE(791)] = 43891, + [SMALL_STATE(792)] = 43898, + [SMALL_STATE(793)] = 43905, + [SMALL_STATE(794)] = 43912, + [SMALL_STATE(795)] = 43919, + [SMALL_STATE(796)] = 43926, + [SMALL_STATE(797)] = 43933, + [SMALL_STATE(798)] = 43940, + [SMALL_STATE(799)] = 43947, + [SMALL_STATE(800)] = 43954, + [SMALL_STATE(801)] = 43961, + [SMALL_STATE(802)] = 43968, + [SMALL_STATE(803)] = 43975, + [SMALL_STATE(804)] = 43982, + [SMALL_STATE(805)] = 43989, + [SMALL_STATE(806)] = 43996, + [SMALL_STATE(807)] = 44003, + [SMALL_STATE(808)] = 44010, + [SMALL_STATE(809)] = 44017, + [SMALL_STATE(810)] = 44024, + [SMALL_STATE(811)] = 44031, + [SMALL_STATE(812)] = 44038, + [SMALL_STATE(813)] = 44045, + [SMALL_STATE(814)] = 44052, + [SMALL_STATE(815)] = 44059, + [SMALL_STATE(816)] = 44066, + [SMALL_STATE(817)] = 44073, + [SMALL_STATE(818)] = 44080, + [SMALL_STATE(819)] = 44087, + [SMALL_STATE(820)] = 44094, + [SMALL_STATE(821)] = 44101, + [SMALL_STATE(822)] = 44108, + [SMALL_STATE(823)] = 44115, + [SMALL_STATE(824)] = 44122, + [SMALL_STATE(825)] = 44129, + [SMALL_STATE(826)] = 44136, + [SMALL_STATE(827)] = 44143, + [SMALL_STATE(828)] = 44150, + [SMALL_STATE(829)] = 44157, + [SMALL_STATE(830)] = 44164, + [SMALL_STATE(831)] = 44171, + [SMALL_STATE(832)] = 44178, + [SMALL_STATE(833)] = 44185, + [SMALL_STATE(834)] = 44192, + [SMALL_STATE(835)] = 44199, + [SMALL_STATE(836)] = 44206, + [SMALL_STATE(837)] = 44213, + [SMALL_STATE(838)] = 44220, + [SMALL_STATE(839)] = 44227, + [SMALL_STATE(840)] = 44234, + [SMALL_STATE(841)] = 44241, + [SMALL_STATE(842)] = 44248, + [SMALL_STATE(843)] = 44255, + [SMALL_STATE(844)] = 44262, + [SMALL_STATE(845)] = 44269, + [SMALL_STATE(846)] = 44276, + [SMALL_STATE(847)] = 44283, + [SMALL_STATE(848)] = 44290, + [SMALL_STATE(849)] = 44297, + [SMALL_STATE(850)] = 44304, + [SMALL_STATE(851)] = 44311, + [SMALL_STATE(852)] = 44318, + [SMALL_STATE(853)] = 44325, + [SMALL_STATE(854)] = 44332, + [SMALL_STATE(855)] = 44339, + [SMALL_STATE(856)] = 44346, + [SMALL_STATE(857)] = 44353, + [SMALL_STATE(858)] = 44360, + [SMALL_STATE(859)] = 44367, + [SMALL_STATE(860)] = 44374, + [SMALL_STATE(861)] = 44381, + [SMALL_STATE(862)] = 44388, + [SMALL_STATE(863)] = 44395, + [SMALL_STATE(864)] = 44402, + [SMALL_STATE(865)] = 44409, + [SMALL_STATE(866)] = 44416, + [SMALL_STATE(867)] = 44423, + [SMALL_STATE(868)] = 44430, + [SMALL_STATE(869)] = 44437, + [SMALL_STATE(870)] = 44444, + [SMALL_STATE(871)] = 44451, + [SMALL_STATE(872)] = 44458, + [SMALL_STATE(873)] = 44465, + [SMALL_STATE(874)] = 44472, + [SMALL_STATE(875)] = 44479, + [SMALL_STATE(876)] = 44486, + [SMALL_STATE(877)] = 44493, + [SMALL_STATE(878)] = 44500, + [SMALL_STATE(879)] = 44507, + [SMALL_STATE(880)] = 44514, + [SMALL_STATE(881)] = 44521, + [SMALL_STATE(882)] = 44528, + [SMALL_STATE(883)] = 44535, + [SMALL_STATE(884)] = 44542, + [SMALL_STATE(885)] = 44549, + [SMALL_STATE(886)] = 44556, + [SMALL_STATE(887)] = 44563, + [SMALL_STATE(888)] = 44570, + [SMALL_STATE(889)] = 44577, + [SMALL_STATE(890)] = 44584, + [SMALL_STATE(891)] = 44591, +}; + +static TSParseActionEntry ts_parse_actions[] = { + [0] = {.entry = {.count = 0, .reusable = false}}, + [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), + [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), + [5] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 0), + [7] = {.entry = {.count = 1, .reusable = false}}, SHIFT(388), + [9] = {.entry = {.count = 1, .reusable = false}}, SHIFT(727), + [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(62), + [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(485), + [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(489), + [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(40), + [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(733), + [21] = {.entry = {.count = 1, .reusable = false}}, SHIFT(889), + [23] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), + [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(887), + [27] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), + [29] = {.entry = {.count = 1, .reusable = false}}, SHIFT(680), + [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(629), + [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(205), + [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(79), + [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(205), + [39] = {.entry = {.count = 1, .reusable = false}}, SHIFT(134), + [41] = {.entry = {.count = 1, .reusable = true}}, SHIFT(342), + [43] = {.entry = {.count = 1, .reusable = true}}, SHIFT(628), + [45] = {.entry = {.count = 1, .reusable = false}}, SHIFT(628), + [47] = {.entry = {.count = 1, .reusable = false}}, SHIFT(94), + [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(323), + [51] = {.entry = {.count = 1, .reusable = false}}, SHIFT(744), + [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(54), + [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(352), + [57] = {.entry = {.count = 1, .reusable = false}}, SHIFT(633), + [59] = {.entry = {.count = 1, .reusable = false}}, SHIFT(514), + [61] = {.entry = {.count = 1, .reusable = false}}, SHIFT(36), + [63] = {.entry = {.count = 1, .reusable = false}}, SHIFT(483), + [65] = {.entry = {.count = 1, .reusable = false}}, SHIFT(53), + [67] = {.entry = {.count = 1, .reusable = false}}, SHIFT(738), + [69] = {.entry = {.count = 1, .reusable = false}}, SHIFT(785), + [71] = {.entry = {.count = 1, .reusable = false}}, SHIFT(4), + [73] = {.entry = {.count = 1, .reusable = true}}, SHIFT(873), + [75] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), + [77] = {.entry = {.count = 1, .reusable = false}}, SHIFT(689), + [79] = {.entry = {.count = 1, .reusable = true}}, SHIFT(623), + [81] = {.entry = {.count = 1, .reusable = true}}, SHIFT(158), + [83] = {.entry = {.count = 1, .reusable = false}}, SHIFT(69), + [85] = {.entry = {.count = 1, .reusable = false}}, SHIFT(158), + [87] = {.entry = {.count = 1, .reusable = false}}, SHIFT(77), + [89] = {.entry = {.count = 1, .reusable = true}}, SHIFT(322), + [91] = {.entry = {.count = 1, .reusable = true}}, SHIFT(510), + [93] = {.entry = {.count = 1, .reusable = false}}, SHIFT(510), + [95] = {.entry = {.count = 1, .reusable = false}}, SHIFT(73), + [97] = {.entry = {.count = 1, .reusable = false}}, SHIFT(407), + [99] = {.entry = {.count = 1, .reusable = false}}, SHIFT(13), + [101] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), + [103] = {.entry = {.count = 1, .reusable = false}}, SHIFT(365), + [105] = {.entry = {.count = 1, .reusable = false}}, SHIFT(423), + [107] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), + [109] = {.entry = {.count = 1, .reusable = true}}, SHIFT(7), + [111] = {.entry = {.count = 1, .reusable = false}}, SHIFT(399), + [113] = {.entry = {.count = 1, .reusable = false}}, SHIFT(3), + [115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), + [117] = {.entry = {.count = 1, .reusable = false}}, SHIFT(464), + [119] = {.entry = {.count = 1, .reusable = false}}, SHIFT(427), + [121] = {.entry = {.count = 1, .reusable = false}}, SHIFT(9), + [123] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), + [125] = {.entry = {.count = 1, .reusable = false}}, SHIFT(468), + [127] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif, 3, .production_id = 7), + [129] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), + [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(11), + [133] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif, 4, .production_id = 7), + [135] = {.entry = {.count = 1, .reusable = false}}, SHIFT(387), + [137] = {.entry = {.count = 1, .reusable = false}}, SHIFT(750), + [139] = {.entry = {.count = 1, .reusable = false}}, SHIFT(49), + [141] = {.entry = {.count = 1, .reusable = false}}, SHIFT(201), + [143] = {.entry = {.count = 1, .reusable = false}}, SHIFT(627), + [145] = {.entry = {.count = 1, .reusable = false}}, SHIFT(630), + [147] = {.entry = {.count = 1, .reusable = false}}, SHIFT(42), + [149] = {.entry = {.count = 1, .reusable = false}}, SHIFT(754), + [151] = {.entry = {.count = 1, .reusable = false}}, SHIFT(891), + [153] = {.entry = {.count = 1, .reusable = false}}, SHIFT(51), + [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(857), + [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), + [159] = {.entry = {.count = 1, .reusable = false}}, SHIFT(691), + [161] = {.entry = {.count = 1, .reusable = true}}, SHIFT(604), + [163] = {.entry = {.count = 1, .reusable = true}}, SHIFT(213), + [165] = {.entry = {.count = 1, .reusable = false}}, SHIFT(85), + [167] = {.entry = {.count = 1, .reusable = false}}, SHIFT(213), + [169] = {.entry = {.count = 1, .reusable = false}}, SHIFT(110), + [171] = {.entry = {.count = 1, .reusable = true}}, SHIFT(317), + [173] = {.entry = {.count = 1, .reusable = true}}, SHIFT(625), + [175] = {.entry = {.count = 1, .reusable = false}}, SHIFT(625), + [177] = {.entry = {.count = 1, .reusable = false}}, SHIFT(104), + [179] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), + [181] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(744), + [184] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(54), + [187] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(633), + [190] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(483), + [193] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(53), + [196] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(738), + [199] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(785), + [202] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(13), + [205] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(873), + [208] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(13), + [211] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(689), + [214] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(623), + [217] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(158), + [220] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(69), + [223] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(158), + [226] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(77), + [229] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(322), + [232] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(510), + [235] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(510), + [238] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(73), + [241] = {.entry = {.count = 1, .reusable = false}}, SHIFT(223), + [243] = {.entry = {.count = 1, .reusable = false}}, SHIFT(413), + [245] = {.entry = {.count = 1, .reusable = false}}, SHIFT(394), + [247] = {.entry = {.count = 1, .reusable = false}}, SHIFT(310), + [249] = {.entry = {.count = 1, .reusable = false}}, SHIFT(437), + [251] = {.entry = {.count = 1, .reusable = false}}, SHIFT(153), + [253] = {.entry = {.count = 1, .reusable = false}}, SHIFT(345), + [255] = {.entry = {.count = 1, .reusable = false}}, SHIFT(224), + [257] = {.entry = {.count = 1, .reusable = false}}, SHIFT(402), + [259] = {.entry = {.count = 1, .reusable = false}}, SHIFT(47), + [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), + [263] = {.entry = {.count = 1, .reusable = false}}, SHIFT(344), + [265] = {.entry = {.count = 1, .reusable = false}}, SHIFT(66), + [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(66), + [269] = {.entry = {.count = 1, .reusable = false}}, SHIFT(463), + [271] = {.entry = {.count = 1, .reusable = false}}, SHIFT(462), + [273] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else, 2), + [275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(444), + [277] = {.entry = {.count = 1, .reusable = false}}, SHIFT(32), + [279] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), + [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT(466), + [283] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 1), + [285] = {.entry = {.count = 1, .reusable = false}}, SHIFT(68), + [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(68), + [289] = {.entry = {.count = 1, .reusable = false}}, SHIFT(391), + [291] = {.entry = {.count = 1, .reusable = false}}, SHIFT(726), + [293] = {.entry = {.count = 1, .reusable = false}}, SHIFT(27), + [295] = {.entry = {.count = 1, .reusable = false}}, SHIFT(631), + [297] = {.entry = {.count = 1, .reusable = false}}, SHIFT(632), + [299] = {.entry = {.count = 1, .reusable = false}}, SHIFT(30), + [301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(562), + [303] = {.entry = {.count = 1, .reusable = false}}, SHIFT(747), + [305] = {.entry = {.count = 1, .reusable = false}}, SHIFT(807), + [307] = {.entry = {.count = 1, .reusable = false}}, SHIFT(34), + [309] = {.entry = {.count = 1, .reusable = true}}, SHIFT(865), + [311] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), + [313] = {.entry = {.count = 1, .reusable = false}}, SHIFT(690), + [315] = {.entry = {.count = 1, .reusable = true}}, SHIFT(620), + [317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(204), + [319] = {.entry = {.count = 1, .reusable = false}}, SHIFT(76), + [321] = {.entry = {.count = 1, .reusable = false}}, SHIFT(204), + [323] = {.entry = {.count = 1, .reusable = false}}, SHIFT(114), + [325] = {.entry = {.count = 1, .reusable = true}}, SHIFT(334), + [327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(516), + [329] = {.entry = {.count = 1, .reusable = false}}, SHIFT(516), + [331] = {.entry = {.count = 1, .reusable = false}}, SHIFT(98), + [333] = {.entry = {.count = 1, .reusable = false}}, SHIFT(467), + [335] = {.entry = {.count = 1, .reusable = false}}, SHIFT(430), + [337] = {.entry = {.count = 1, .reusable = false}}, SHIFT(471), + [339] = {.entry = {.count = 1, .reusable = false}}, SHIFT(481), + [341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(70), + [343] = {.entry = {.count = 1, .reusable = true}}, SHIFT(70), + [345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(446), + [347] = {.entry = {.count = 1, .reusable = false}}, SHIFT(28), + [349] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), + [351] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_else, 1), + [353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), + [355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(26), + [357] = {.entry = {.count = 1, .reusable = false}}, SHIFT(401), + [359] = {.entry = {.count = 1, .reusable = false}}, SHIFT(424), + [361] = {.entry = {.count = 1, .reusable = false}}, SHIFT(400), + [363] = {.entry = {.count = 1, .reusable = false}}, SHIFT(65), + [365] = {.entry = {.count = 1, .reusable = true}}, SHIFT(65), + [367] = {.entry = {.count = 1, .reusable = false}}, SHIFT(602), + [369] = {.entry = {.count = 1, .reusable = false}}, SHIFT(41), + [371] = {.entry = {.count = 1, .reusable = true}}, SHIFT(41), + [373] = {.entry = {.count = 1, .reusable = false}}, SHIFT(548), + [375] = {.entry = {.count = 1, .reusable = false}}, SHIFT(511), + [377] = {.entry = {.count = 1, .reusable = false}}, SHIFT(50), + [379] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), + [381] = {.entry = {.count = 1, .reusable = false}}, SHIFT(469), + [383] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), + [385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), + [387] = {.entry = {.count = 1, .reusable = false}}, SHIFT(470), + [389] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), + [391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), + [393] = {.entry = {.count = 1, .reusable = false}}, SHIFT(403), + [395] = {.entry = {.count = 1, .reusable = false}}, SHIFT(61), + [397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), + [399] = {.entry = {.count = 1, .reusable = false}}, SHIFT(432), + [401] = {.entry = {.count = 1, .reusable = false}}, SHIFT(59), + [403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(59), + [405] = {.entry = {.count = 1, .reusable = false}}, SHIFT(410), + [407] = {.entry = {.count = 1, .reusable = false}}, SHIFT(541), + [409] = {.entry = {.count = 1, .reusable = false}}, SHIFT(431), + [411] = {.entry = {.count = 1, .reusable = false}}, SHIFT(38), + [413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), + [415] = {.entry = {.count = 1, .reusable = false}}, SHIFT(555), + [417] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_body, 1), + [419] = {.entry = {.count = 1, .reusable = false}}, SHIFT(428), + [421] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), + [423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), + [425] = {.entry = {.count = 1, .reusable = false}}, SHIFT(537), + [427] = {.entry = {.count = 1, .reusable = false}}, SHIFT(48), + [429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), + [431] = {.entry = {.count = 1, .reusable = false}}, SHIFT(381), + [433] = {.entry = {.count = 1, .reusable = false}}, SHIFT(57), + [435] = {.entry = {.count = 1, .reusable = true}}, SHIFT(57), + [437] = {.entry = {.count = 1, .reusable = false}}, SHIFT(363), + [439] = {.entry = {.count = 1, .reusable = false}}, SHIFT(58), + [441] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), + [443] = {.entry = {.count = 1, .reusable = false}}, SHIFT(359), + [445] = {.entry = {.count = 1, .reusable = false}}, SHIFT(23), + [447] = {.entry = {.count = 1, .reusable = true}}, SHIFT(23), + [449] = {.entry = {.count = 1, .reusable = false}}, SHIFT(362), + [451] = {.entry = {.count = 1, .reusable = false}}, SHIFT(369), + [453] = {.entry = {.count = 1, .reusable = false}}, SHIFT(465), + [455] = {.entry = {.count = 1, .reusable = false}}, SHIFT(367), + [457] = {.entry = {.count = 1, .reusable = false}}, SHIFT(411), + [459] = {.entry = {.count = 1, .reusable = false}}, SHIFT(439), + [461] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), + [463] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), + [465] = {.entry = {.count = 1, .reusable = false}}, SHIFT(353), + [467] = {.entry = {.count = 1, .reusable = false}}, SHIFT(60), + [469] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), + [471] = {.entry = {.count = 1, .reusable = false}}, SHIFT(443), + [473] = {.entry = {.count = 1, .reusable = false}}, SHIFT(31), + [475] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), + [477] = {.entry = {.count = 1, .reusable = false}}, SHIFT(408), + [479] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(750), + [482] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(49), + [485] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(627), + [488] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(630), + [491] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(42), + [494] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(754), + [497] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(891), + [500] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(66), + [503] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(857), + [506] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(66), + [509] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(691), + [512] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(604), + [515] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(213), + [518] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(85), + [521] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(213), + [524] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(110), + [527] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(317), + [530] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(625), + [533] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(625), + [536] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(104), + [539] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__prefix, 1), + [541] = {.entry = {.count = 1, .reusable = true}}, SHIFT(672), + [543] = {.entry = {.count = 1, .reusable = false}}, SHIFT(539), + [545] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefix, 1), + [547] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), + [549] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(727), + [552] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(62), + [555] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(485), + [558] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(489), + [561] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(40), + [564] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(733), + [567] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(889), + [570] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(68), + [573] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(887), + [576] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(68), + [579] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(680), + [582] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(629), + [585] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(205), + [588] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(79), + [591] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(205), + [594] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(134), + [597] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(342), + [600] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(628), + [603] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(628), + [606] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(94), + [609] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__expression, 1), + [611] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expression, 1), + [613] = {.entry = {.count = 1, .reusable = true}}, SHIFT(626), + [615] = {.entry = {.count = 1, .reusable = false}}, SHIFT(839), + [617] = {.entry = {.count = 1, .reusable = false}}, SHIFT(840), + [619] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(473), + [622] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(322), + [625] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(80), + [628] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(726), + [631] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(27), + [634] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(631), + [637] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(632), + [640] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(30), + [643] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(747), + [646] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(807), + [649] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(70), + [652] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(865), + [655] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(70), + [658] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(690), + [661] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(620), + [664] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(204), + [667] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(76), + [670] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(204), + [673] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(114), + [676] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(334), + [679] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(516), + [682] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(516), + [685] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2), SHIFT_REPEAT(98), + [688] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_declarator, 4), + [690] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_declarator, 4), + [692] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__variable_declarator, 1), + [694] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__variable_declarator, 1), + [696] = {.entry = {.count = 2, .reusable = false}}, REDUCE(sym__variable_declarator, 1), REDUCE(sym__expression, 1), + [699] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__variable_declarator, 1), REDUCE(sym__expression, 1), + [702] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_field_expression, 3, .production_id = 6), + [704] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field_expression, 3, .production_id = 6), + [706] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 2), + [708] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 2), + [710] = {.entry = {.count = 1, .reusable = true}}, SHIFT(622), + [712] = {.entry = {.count = 1, .reusable = false}}, SHIFT(799), + [714] = {.entry = {.count = 1, .reusable = false}}, SHIFT(800), + [716] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(476), + [719] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(334), + [722] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(129), + [725] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_global_variable, 1), + [727] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_global_variable, 1), + [729] = {.entry = {.count = 1, .reusable = false}}, SHIFT(512), + [731] = {.entry = {.count = 1, .reusable = true}}, SHIFT(556), + [733] = {.entry = {.count = 1, .reusable = false}}, SHIFT(813), + [735] = {.entry = {.count = 1, .reusable = false}}, SHIFT(810), + [737] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(474), + [740] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(342), + [743] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(107), + [746] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 1), + [748] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 1), + [750] = {.entry = {.count = 1, .reusable = false}}, SHIFT(480), + [752] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 2, .dynamic_precedence = 1), + [754] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 2, .dynamic_precedence = 1), + [756] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__prefix, 3), + [758] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__prefix, 3), + [760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(605), + [762] = {.entry = {.count = 1, .reusable = false}}, SHIFT(788), + [764] = {.entry = {.count = 1, .reusable = false}}, SHIFT(786), + [766] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(475), + [769] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(317), + [772] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expression, 1), SHIFT(128), + [775] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call, 4, .dynamic_precedence = 1, .production_id = 10), + [777] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call, 4, .dynamic_precedence = 1, .production_id = 10), + [779] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 3), + [781] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 3), + [783] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 4), + [785] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 4), + [787] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_arguments, 2), + [789] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_arguments, 2), + [791] = {.entry = {.count = 1, .reusable = false}}, SHIFT(581), + [793] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_table, 3), + [795] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_table, 3), + [797] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_call_statement, 1), + [799] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_call_statement, 1), + [801] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 3, .production_id = 5), + [803] = {.entry = {.count = 1, .reusable = true}}, SHIFT(553), + [805] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 3, .production_id = 5), + [807] = {.entry = {.count = 1, .reusable = false}}, SHIFT(634), + [809] = {.entry = {.count = 1, .reusable = false}}, SHIFT(635), + [811] = {.entry = {.count = 1, .reusable = false}}, SHIFT(636), + [813] = {.entry = {.count = 1, .reusable = true}}, SHIFT(636), + [815] = {.entry = {.count = 1, .reusable = true}}, SHIFT(637), + [817] = {.entry = {.count = 1, .reusable = false}}, SHIFT(638), + [819] = {.entry = {.count = 1, .reusable = true}}, SHIFT(639), + [821] = {.entry = {.count = 1, .reusable = true}}, SHIFT(599), + [823] = {.entry = {.count = 1, .reusable = true}}, SHIFT(583), + [825] = {.entry = {.count = 1, .reusable = true}}, SHIFT(580), + [827] = {.entry = {.count = 1, .reusable = false}}, SHIFT(580), + [829] = {.entry = {.count = 1, .reusable = false}}, SHIFT(533), + [831] = {.entry = {.count = 1, .reusable = true}}, SHIFT(528), + [833] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 4, .production_id = 5), + [835] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 4, .production_id = 5), + [837] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_variable_declaration, 4), + [839] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_variable_declaration, 4), + [841] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_binary_operation, 3), + [843] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_binary_operation, 3), + [845] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 3), + [847] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 3), + [849] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_unary_operation, 2), + [851] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_unary_operation, 2), + [853] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_definition, 2), + [855] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_definition, 2), + [857] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__function_body, 2), + [859] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__function_body, 2), + [861] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_return_statement_repeat1, 2), + [863] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), + [865] = {.entry = {.count = 1, .reusable = true}}, SHIFT(513), + [867] = {.entry = {.count = 1, .reusable = false}}, SHIFT(609), + [869] = {.entry = {.count = 1, .reusable = false}}, SHIFT(610), + [871] = {.entry = {.count = 1, .reusable = false}}, SHIFT(611), + [873] = {.entry = {.count = 1, .reusable = true}}, SHIFT(611), + [875] = {.entry = {.count = 1, .reusable = true}}, SHIFT(612), + [877] = {.entry = {.count = 1, .reusable = false}}, SHIFT(613), + [879] = {.entry = {.count = 1, .reusable = true}}, SHIFT(614), + [881] = {.entry = {.count = 1, .reusable = true}}, SHIFT(615), + [883] = {.entry = {.count = 1, .reusable = true}}, SHIFT(616), + [885] = {.entry = {.count = 1, .reusable = true}}, SHIFT(617), + [887] = {.entry = {.count = 1, .reusable = false}}, SHIFT(617), + [889] = {.entry = {.count = 1, .reusable = false}}, SHIFT(618), + [891] = {.entry = {.count = 1, .reusable = true}}, SHIFT(619), + [893] = {.entry = {.count = 1, .reusable = true}}, SHIFT(549), + [895] = {.entry = {.count = 1, .reusable = false}}, SHIFT(517), + [897] = {.entry = {.count = 1, .reusable = false}}, SHIFT(518), + [899] = {.entry = {.count = 1, .reusable = false}}, SHIFT(519), + [901] = {.entry = {.count = 1, .reusable = true}}, SHIFT(519), + [903] = {.entry = {.count = 1, .reusable = true}}, SHIFT(520), + [905] = {.entry = {.count = 1, .reusable = false}}, SHIFT(521), + [907] = {.entry = {.count = 1, .reusable = true}}, SHIFT(522), + [909] = {.entry = {.count = 1, .reusable = true}}, SHIFT(523), + [911] = {.entry = {.count = 1, .reusable = true}}, SHIFT(524), + [913] = {.entry = {.count = 1, .reusable = true}}, SHIFT(525), + [915] = {.entry = {.count = 1, .reusable = false}}, SHIFT(525), + [917] = {.entry = {.count = 1, .reusable = false}}, SHIFT(526), + [919] = {.entry = {.count = 1, .reusable = true}}, SHIFT(527), + [921] = {.entry = {.count = 1, .reusable = true}}, SHIFT(594), + [923] = {.entry = {.count = 1, .reusable = true}}, SHIFT(591), + [925] = {.entry = {.count = 1, .reusable = true}}, SHIFT(592), + [927] = {.entry = {.count = 1, .reusable = false}}, SHIFT(592), + [929] = {.entry = {.count = 1, .reusable = false}}, SHIFT(593), + [931] = {.entry = {.count = 1, .reusable = true}}, SHIFT(486), + [933] = {.entry = {.count = 1, .reusable = false}}, SHIFT(558), + [935] = {.entry = {.count = 1, .reusable = false}}, SHIFT(559), + [937] = {.entry = {.count = 1, .reusable = false}}, SHIFT(560), + [939] = {.entry = {.count = 1, .reusable = true}}, SHIFT(560), + [941] = {.entry = {.count = 1, .reusable = true}}, SHIFT(561), + [943] = {.entry = {.count = 1, .reusable = false}}, SHIFT(478), + [945] = {.entry = {.count = 1, .reusable = true}}, SHIFT(563), + [947] = {.entry = {.count = 1, .reusable = true}}, SHIFT(564), + [949] = {.entry = {.count = 1, .reusable = true}}, SHIFT(565), + [951] = {.entry = {.count = 1, .reusable = true}}, SHIFT(566), + [953] = {.entry = {.count = 1, .reusable = false}}, SHIFT(566), + [955] = {.entry = {.count = 1, .reusable = false}}, SHIFT(567), + [957] = {.entry = {.count = 1, .reusable = true}}, SHIFT(568), + [959] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 5, .production_id = 11), + [961] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 5, .production_id = 11), + [963] = {.entry = {.count = 1, .reusable = false}}, SHIFT(584), + [965] = {.entry = {.count = 1, .reusable = false}}, SHIFT(585), + [967] = {.entry = {.count = 1, .reusable = false}}, SHIFT(586), + [969] = {.entry = {.count = 1, .reusable = true}}, SHIFT(586), + [971] = {.entry = {.count = 1, .reusable = true}}, SHIFT(587), + [973] = {.entry = {.count = 1, .reusable = false}}, SHIFT(588), + [975] = {.entry = {.count = 1, .reusable = true}}, SHIFT(589), + [977] = {.entry = {.count = 1, .reusable = true}}, SHIFT(590), + [979] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 3, .production_id = 3), + [981] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 3, .production_id = 3), + [983] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 1, .production_id = 1), + [985] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 1, .production_id = 1), + [987] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_repeat_statement, 4, .production_id = 8), + [989] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_repeat_statement, 4, .production_id = 8), + [991] = {.entry = {.count = 1, .reusable = true}}, SHIFT(499), + [993] = {.entry = {.count = 1, .reusable = true}}, SHIFT(498), + [995] = {.entry = {.count = 1, .reusable = true}}, SHIFT(497), + [997] = {.entry = {.count = 1, .reusable = false}}, SHIFT(497), + [999] = {.entry = {.count = 1, .reusable = false}}, SHIFT(496), + [1001] = {.entry = {.count = 1, .reusable = true}}, SHIFT(495), + [1003] = {.entry = {.count = 1, .reusable = true}}, SHIFT(598), + [1005] = {.entry = {.count = 1, .reusable = true}}, SHIFT(596), + [1007] = {.entry = {.count = 1, .reusable = true}}, SHIFT(595), + [1009] = {.entry = {.count = 1, .reusable = false}}, SHIFT(595), + [1011] = {.entry = {.count = 1, .reusable = false}}, SHIFT(582), + [1013] = {.entry = {.count = 1, .reusable = true}}, SHIFT(569), + [1015] = {.entry = {.count = 1, .reusable = false}}, SHIFT(506), + [1017] = {.entry = {.count = 1, .reusable = false}}, SHIFT(505), + [1019] = {.entry = {.count = 1, .reusable = false}}, SHIFT(504), + [1021] = {.entry = {.count = 1, .reusable = true}}, SHIFT(504), + [1023] = {.entry = {.count = 1, .reusable = true}}, SHIFT(503), + [1025] = {.entry = {.count = 1, .reusable = false}}, SHIFT(502), + [1027] = {.entry = {.count = 1, .reusable = true}}, SHIFT(500), + [1029] = {.entry = {.count = 1, .reusable = true}}, SHIFT(557), + [1031] = {.entry = {.count = 1, .reusable = false}}, SHIFT(579), + [1033] = {.entry = {.count = 1, .reusable = false}}, SHIFT(578), + [1035] = {.entry = {.count = 1, .reusable = false}}, SHIFT(577), + [1037] = {.entry = {.count = 1, .reusable = true}}, SHIFT(577), + [1039] = {.entry = {.count = 1, .reusable = true}}, SHIFT(576), + [1041] = {.entry = {.count = 1, .reusable = false}}, SHIFT(575), + [1043] = {.entry = {.count = 1, .reusable = true}}, SHIFT(574), + [1045] = {.entry = {.count = 1, .reusable = true}}, SHIFT(573), + [1047] = {.entry = {.count = 1, .reusable = true}}, SHIFT(572), + [1049] = {.entry = {.count = 1, .reusable = true}}, SHIFT(571), + [1051] = {.entry = {.count = 1, .reusable = false}}, SHIFT(571), + [1053] = {.entry = {.count = 1, .reusable = false}}, SHIFT(570), + [1055] = {.entry = {.count = 1, .reusable = false}}, SHIFT(624), + [1057] = {.entry = {.count = 1, .reusable = false}}, SHIFT(621), + [1059] = {.entry = {.count = 1, .reusable = false}}, SHIFT(608), + [1061] = {.entry = {.count = 1, .reusable = true}}, SHIFT(608), + [1063] = {.entry = {.count = 1, .reusable = true}}, SHIFT(607), + [1065] = {.entry = {.count = 1, .reusable = false}}, SHIFT(606), + [1067] = {.entry = {.count = 1, .reusable = true}}, SHIFT(600), + [1069] = {.entry = {.count = 1, .reusable = true}}, SHIFT(603), + [1071] = {.entry = {.count = 1, .reusable = false}}, SHIFT(876), + [1073] = {.entry = {.count = 1, .reusable = true}}, SHIFT(872), + [1075] = {.entry = {.count = 1, .reusable = true}}, SHIFT(472), + [1077] = {.entry = {.count = 1, .reusable = true}}, SHIFT(321), + [1079] = {.entry = {.count = 1, .reusable = true}}, SHIFT(292), + [1081] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_variable_declarator, 2), + [1083] = {.entry = {.count = 1, .reusable = true}}, SHIFT(842), + [1085] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_variable_declarator, 2), + [1087] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__local_variable_declarator, 1), + [1089] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__local_variable_declarator, 1), + [1091] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), + [1093] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), SHIFT_REPEAT(842), + [1096] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), + [1098] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_variable_declaration, 5), + [1100] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_variable_declaration, 5), + [1102] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), SHIFT_REPEAT(553), + [1105] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration, 5, .production_id = 5), + [1107] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration, 5, .production_id = 5), + [1109] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), SHIFT_REPEAT(804), + [1112] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), SHIFT_REPEAT(801), + [1115] = {.entry = {.count = 1, .reusable = true}}, SHIFT(804), + [1117] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), SHIFT_REPEAT(782), + [1120] = {.entry = {.count = 1, .reusable = true}}, SHIFT(530), + [1122] = {.entry = {.count = 1, .reusable = false}}, SHIFT(477), + [1124] = {.entry = {.count = 1, .reusable = true}}, SHIFT(531), + [1126] = {.entry = {.count = 1, .reusable = true}}, SHIFT(532), + [1128] = {.entry = {.count = 1, .reusable = true}}, SHIFT(535), + [1130] = {.entry = {.count = 1, .reusable = true}}, SHIFT(538), + [1132] = {.entry = {.count = 1, .reusable = false}}, SHIFT(538), + [1134] = {.entry = {.count = 1, .reusable = true}}, SHIFT(544), + [1136] = {.entry = {.count = 1, .reusable = true}}, SHIFT(545), + [1138] = {.entry = {.count = 1, .reusable = true}}, SHIFT(597), + [1140] = {.entry = {.count = 1, .reusable = false}}, SHIFT(759), + [1142] = {.entry = {.count = 1, .reusable = true}}, SHIFT(601), + [1144] = {.entry = {.count = 1, .reusable = true}}, SHIFT(328), + [1146] = {.entry = {.count = 1, .reusable = false}}, SHIFT(285), + [1148] = {.entry = {.count = 1, .reusable = false}}, SHIFT(328), + [1150] = {.entry = {.count = 1, .reusable = false}}, SHIFT(297), + [1152] = {.entry = {.count = 1, .reusable = true}}, SHIFT(316), + [1154] = {.entry = {.count = 1, .reusable = true}}, SHIFT(326), + [1156] = {.entry = {.count = 1, .reusable = true}}, SHIFT(507), + [1158] = {.entry = {.count = 1, .reusable = false}}, SHIFT(507), + [1160] = {.entry = {.count = 1, .reusable = false}}, SHIFT(386), + [1162] = {.entry = {.count = 1, .reusable = true}}, SHIFT(106), + [1164] = {.entry = {.count = 1, .reusable = true}}, SHIFT(782), + [1166] = {.entry = {.count = 1, .reusable = true}}, SHIFT(552), + [1168] = {.entry = {.count = 1, .reusable = false}}, SHIFT(482), + [1170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(482), + [1172] = {.entry = {.count = 1, .reusable = true}}, SHIFT(295), + [1174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), + [1176] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 1), + [1178] = {.entry = {.count = 1, .reusable = true}}, SHIFT(705), + [1180] = {.entry = {.count = 1, .reusable = false}}, SHIFT(288), + [1182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(801), + [1184] = {.entry = {.count = 1, .reusable = true}}, SHIFT(113), + [1186] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_variable_declaration, 2), + [1188] = {.entry = {.count = 1, .reusable = true}}, SHIFT(540), + [1190] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_variable_declaration, 2), + [1192] = {.entry = {.count = 1, .reusable = true}}, SHIFT(121), + [1194] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 5), + [1196] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 5), + [1198] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), SHIFT_REPEAT(549), + [1201] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_function_statement, 4), + [1203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_function_statement, 4), + [1205] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), SHIFT_REPEAT(513), + [1208] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 4), + [1210] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 4), + [1212] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 4, .production_id = 7), + [1214] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 4, .production_id = 7), + [1216] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 4, .production_id = 7), + [1218] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 4, .production_id = 7), + [1220] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_sequence, 3), + [1222] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_sequence, 2), + [1224] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 4), + [1226] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 4), + [1228] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_function_statement, 3), + [1230] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_statement, 3), + [1232] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_label_statement, 3), + [1234] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label_statement, 3), + [1236] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 3), + [1238] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 3), + [1240] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_statement, 4), + [1242] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_statement, 4), + [1244] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 5, .production_id = 7), + [1246] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 5, .production_id = 7), + [1248] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 5, .production_id = 7), + [1250] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 5, .production_id = 7), + [1252] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_statement, 5), + [1254] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_statement, 5), + [1256] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 6, .production_id = 7), + [1258] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 6, .production_id = 7), + [1260] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_while_statement, 6, .production_id = 7), + [1262] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_while_statement, 6, .production_id = 7), + [1264] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_statement, 6), + [1266] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_statement, 6), + [1268] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), SHIFT_REPEAT(486), + [1271] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_for_in_statement, 6), + [1273] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_for_in_statement, 6), + [1275] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 7, .production_id = 7), + [1277] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 7, .production_id = 7), + [1279] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_goto_statement, 2), + [1281] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_goto_statement, 2), + [1283] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_do_statement, 2), + [1285] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_do_statement, 2), + [1287] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_variable_declaration_statement, 1), + [1289] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_variable_declaration_statement, 1), + [1291] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_if_statement, 8, .production_id = 7), + [1293] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_if_statement, 8, .production_id = 7), + [1295] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_local_variable_declaration_statement, 1), + [1297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_local_variable_declaration_statement, 1), + [1299] = {.entry = {.count = 1, .reusable = true}}, SHIFT(551), + [1301] = {.entry = {.count = 1, .reusable = false}}, SHIFT(536), + [1303] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 1), + [1305] = {.entry = {.count = 1, .reusable = true}}, SHIFT(550), + [1307] = {.entry = {.count = 1, .reusable = true}}, SHIFT(479), + [1309] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 2), + [1311] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 2), + [1313] = {.entry = {.count = 1, .reusable = true}}, SHIFT(515), + [1315] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 2), + [1317] = {.entry = {.count = 1, .reusable = true}}, SHIFT(554), + [1319] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 2), + [1321] = {.entry = {.count = 1, .reusable = true}}, SHIFT(714), + [1323] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_parameters, 3), + [1325] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_parameters, 3), + [1327] = {.entry = {.count = 1, .reusable = true}}, SHIFT(298), + [1329] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), + [1331] = {.entry = {.count = 1, .reusable = true}}, SHIFT(138), + [1333] = {.entry = {.count = 1, .reusable = true}}, SHIFT(116), + [1335] = {.entry = {.count = 1, .reusable = true}}, SHIFT(130), + [1337] = {.entry = {.count = 1, .reusable = false}}, SHIFT(730), + [1339] = {.entry = {.count = 1, .reusable = true}}, SHIFT(491), + [1341] = {.entry = {.count = 1, .reusable = false}}, SHIFT(491), + [1343] = {.entry = {.count = 1, .reusable = false}}, SHIFT(132), + [1345] = {.entry = {.count = 1, .reusable = false}}, SHIFT(739), + [1347] = {.entry = {.count = 1, .reusable = true}}, SHIFT(492), + [1349] = {.entry = {.count = 1, .reusable = false}}, SHIFT(492), + [1351] = {.entry = {.count = 1, .reusable = false}}, SHIFT(111), + [1353] = {.entry = {.count = 1, .reusable = false}}, SHIFT(743), + [1355] = {.entry = {.count = 1, .reusable = true}}, SHIFT(487), + [1357] = {.entry = {.count = 1, .reusable = false}}, SHIFT(487), + [1359] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), + [1361] = {.entry = {.count = 1, .reusable = false}}, SHIFT(734), + [1363] = {.entry = {.count = 1, .reusable = true}}, SHIFT(493), + [1365] = {.entry = {.count = 1, .reusable = false}}, SHIFT(493), + [1367] = {.entry = {.count = 1, .reusable = false}}, SHIFT(84), + [1369] = {.entry = {.count = 1, .reusable = true}}, SHIFT(87), + [1371] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 1), + [1373] = {.entry = {.count = 1, .reusable = true}}, SHIFT(118), + [1375] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), + [1377] = {.entry = {.count = 1, .reusable = true}}, SHIFT(131), + [1379] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__in_loop_expression, 3), + [1381] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_field, 3), + [1383] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__in_loop_expression, 4), + [1385] = {.entry = {.count = 1, .reusable = true}}, SHIFT(291), + [1387] = {.entry = {.count = 1, .reusable = true}}, SHIFT(494), + [1389] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__loop_expression, 5), + [1391] = {.entry = {.count = 1, .reusable = true}}, SHIFT(484), + [1393] = {.entry = {.count = 1, .reusable = true}}, SHIFT(10), + [1395] = {.entry = {.count = 1, .reusable = true}}, SHIFT(5), + [1397] = {.entry = {.count = 1, .reusable = true}}, SHIFT(2), + [1399] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), + [1401] = {.entry = {.count = 1, .reusable = true}}, SHIFT(817), + [1403] = {.entry = {.count = 1, .reusable = true}}, SHIFT(100), + [1405] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__loop_expression, 7), + [1407] = {.entry = {.count = 1, .reusable = true}}, SHIFT(63), + [1409] = {.entry = {.count = 1, .reusable = true}}, SHIFT(125), + [1411] = {.entry = {.count = 1, .reusable = true}}, SHIFT(139), + [1413] = {.entry = {.count = 1, .reusable = true}}, SHIFT(289), + [1415] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), + [1417] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), + [1419] = {.entry = {.count = 1, .reusable = true}}, SHIFT(71), + [1421] = {.entry = {.count = 1, .reusable = true}}, SHIFT(120), + [1423] = {.entry = {.count = 1, .reusable = true}}, SHIFT(6), + [1425] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), + [1427] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), + [1429] = {.entry = {.count = 1, .reusable = true}}, SHIFT(46), + [1431] = {.entry = {.count = 1, .reusable = true}}, SHIFT(290), + [1433] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), + [1435] = {.entry = {.count = 1, .reusable = false}}, SHIFT(676), + [1437] = {.entry = {.count = 1, .reusable = false}}, SHIFT(96), + [1439] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_return_statement_repeat1, 2), SHIFT_REPEAT(554), + [1442] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 3), + [1444] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 3), + [1446] = {.entry = {.count = 1, .reusable = true}}, SHIFT(708), + [1448] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_variable_declaration_repeat1, 2, .production_id = 4), + [1450] = {.entry = {.count = 1, .reusable = true}}, SHIFT(813), + [1452] = {.entry = {.count = 1, .reusable = true}}, SHIFT(810), + [1454] = {.entry = {.count = 1, .reusable = true}}, SHIFT(474), + [1456] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), + [1458] = {.entry = {.count = 1, .reusable = true}}, SHIFT(405), + [1460] = {.entry = {.count = 1, .reusable = true}}, SHIFT(787), + [1462] = {.entry = {.count = 1, .reusable = false}}, SHIFT(761), + [1464] = {.entry = {.count = 1, .reusable = true}}, SHIFT(468), + [1466] = {.entry = {.count = 1, .reusable = true}}, SHIFT(514), + [1468] = {.entry = {.count = 1, .reusable = true}}, SHIFT(464), + [1470] = {.entry = {.count = 1, .reusable = true}}, SHIFT(677), + [1472] = {.entry = {.count = 1, .reusable = true}}, SHIFT(719), + [1474] = {.entry = {.count = 1, .reusable = true}}, SHIFT(414), + [1476] = {.entry = {.count = 1, .reusable = true}}, SHIFT(453), + [1478] = {.entry = {.count = 1, .reusable = true}}, SHIFT(407), + [1480] = {.entry = {.count = 1, .reusable = true}}, SHIFT(418), + [1482] = {.entry = {.count = 1, .reusable = true}}, SHIFT(371), + [1484] = {.entry = {.count = 1, .reusable = true}}, SHIFT(365), + [1486] = {.entry = {.count = 1, .reusable = true}}, SHIFT(378), + [1488] = {.entry = {.count = 1, .reusable = true}}, SHIFT(452), + [1490] = {.entry = {.count = 1, .reusable = true}}, SHIFT(459), + [1492] = {.entry = {.count = 1, .reusable = true}}, SHIFT(461), + [1494] = {.entry = {.count = 1, .reusable = true}}, SHIFT(473), + [1496] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), + [1498] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2), + [1500] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_if_statement_repeat1, 2), SHIFT_REPEAT(514), + [1503] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_if_statement_repeat1, 2), + [1505] = {.entry = {.count = 1, .reusable = true}}, SHIFT(475), + [1507] = {.entry = {.count = 1, .reusable = true}}, SHIFT(128), + [1509] = {.entry = {.count = 1, .reusable = true}}, SHIFT(476), + [1511] = {.entry = {.count = 1, .reusable = true}}, SHIFT(129), + [1513] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_return_statement, 4), + [1515] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_return_statement, 4), + [1517] = {.entry = {.count = 1, .reusable = true}}, SHIFT(357), + [1519] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__field_sequence, 1), + [1521] = {.entry = {.count = 1, .reusable = true}}, SHIFT(763), + [1523] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 1), + [1525] = {.entry = {.count = 1, .reusable = true}}, SHIFT(356), + [1527] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__field_sequence_repeat1, 2), SHIFT_REPEAT(392), + [1530] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__field_sequence_repeat1, 2), + [1532] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 2), + [1534] = {.entry = {.count = 1, .reusable = true}}, SHIFT(868), + [1536] = {.entry = {.count = 1, .reusable = true}}, SHIFT(547), + [1538] = {.entry = {.count = 1, .reusable = true}}, SHIFT(546), + [1540] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__parameter_list_repeat1, 2), SHIFT_REPEAT(890), + [1543] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym__parameter_list_repeat1, 2), + [1545] = {.entry = {.count = 1, .reusable = true}}, SHIFT(780), + [1547] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_name_field, 2, .production_id = 2), + [1549] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_function_name_field, 1, .production_id = 2), SHIFT(779), + [1552] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym_function_name, 1), REDUCE(sym_function_name_field, 1, .production_id = 2), + [1555] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_function_name_field_repeat1, 2), SHIFT_REPEAT(780), + [1558] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_name_field_repeat1, 2), + [1560] = {.entry = {.count = 1, .reusable = true}}, SHIFT(534), + [1562] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elseif, 4, .production_id = 7), + [1564] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_function_name_field_repeat1, 2, .production_id = 9), + [1566] = {.entry = {.count = 1, .reusable = false}}, SHIFT(867), + [1568] = {.entry = {.count = 1, .reusable = false}}, SHIFT(311), + [1570] = {.entry = {.count = 1, .reusable = false}}, SHIFT(880), + [1572] = {.entry = {.count = 1, .reusable = false}}, SHIFT(329), + [1574] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__in_loop_expression, 5), + [1576] = {.entry = {.count = 1, .reusable = true}}, SHIFT(542), + [1578] = {.entry = {.count = 1, .reusable = true}}, SHIFT(716), + [1580] = {.entry = {.count = 1, .reusable = true}}, SHIFT(501), + [1582] = {.entry = {.count = 1, .reusable = true}}, SHIFT(488), + [1584] = {.entry = {.count = 1, .reusable = false}}, SHIFT(875), + [1586] = {.entry = {.count = 1, .reusable = false}}, SHIFT(301), + [1588] = {.entry = {.count = 1, .reusable = true}}, SHIFT(122), + [1590] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), + [1592] = {.entry = {.count = 1, .reusable = true}}, SHIFT(529), + [1594] = {.entry = {.count = 1, .reusable = false}}, SHIFT(859), + [1596] = {.entry = {.count = 1, .reusable = false}}, SHIFT(330), + [1598] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), + [1600] = {.entry = {.count = 1, .reusable = true}}, SHIFT(299), + [1602] = {.entry = {.count = 1, .reusable = true}}, SHIFT(115), + [1604] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym__local_variable_declarator_repeat1, 2), SHIFT_REPEAT(868), + [1607] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_elseif, 5, .production_id = 7), + [1609] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_elseif, 5, .production_id = 7), + [1611] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_variable_declaration_repeat1, 2), SHIFT_REPEAT(672), + [1614] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_variable_declaration_repeat1, 2), + [1616] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__first_parameter, 1), + [1618] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__comma_identifier, 2), + [1620] = {.entry = {.count = 1, .reusable = true}}, SHIFT(861), + [1622] = {.entry = {.count = 1, .reusable = true}}, SHIFT(762), + [1624] = {.entry = {.count = 1, .reusable = true}}, SHIFT(779), + [1626] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_name, 1), + [1628] = {.entry = {.count = 1, .reusable = true}}, SHIFT(415), + [1630] = {.entry = {.count = 1, .reusable = true}}, SHIFT(372), + [1632] = {.entry = {.count = 1, .reusable = true}}, SHIFT(408), + [1634] = {.entry = {.count = 1, .reusable = true}}, SHIFT(410), + [1636] = {.entry = {.count = 1, .reusable = true}}, SHIFT(411), + [1638] = {.entry = {.count = 1, .reusable = true}}, SHIFT(416), + [1640] = {.entry = {.count = 1, .reusable = true}}, SHIFT(417), + [1642] = {.entry = {.count = 1, .reusable = true}}, SHIFT(419), + [1644] = {.entry = {.count = 1, .reusable = true}}, SHIFT(450), + [1646] = {.entry = {.count = 1, .reusable = true}}, SHIFT(191), + [1648] = {.entry = {.count = 1, .reusable = true}}, SHIFT(490), + [1650] = {.entry = {.count = 1, .reusable = true}}, SHIFT(814), + [1652] = {.entry = {.count = 1, .reusable = true}}, SHIFT(725), + [1654] = {.entry = {.count = 1, .reusable = true}}, SHIFT(398), + [1656] = {.entry = {.count = 1, .reusable = true}}, SHIFT(366), + [1658] = {.entry = {.count = 1, .reusable = true}}, SHIFT(449), + [1660] = {.entry = {.count = 1, .reusable = true}}, SHIFT(380), + [1662] = {.entry = {.count = 1, .reusable = true}}, SHIFT(704), + [1664] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__spread_param, 1), + [1666] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), + [1668] = {.entry = {.count = 1, .reusable = true}}, SHIFT(362), + [1670] = {.entry = {.count = 1, .reusable = true}}, SHIFT(137), + [1672] = {.entry = {.count = 1, .reusable = true}}, SHIFT(541), + [1674] = {.entry = {.count = 1, .reusable = true}}, SHIFT(509), + [1676] = {.entry = {.count = 1, .reusable = true}}, SHIFT(361), + [1678] = {.entry = {.count = 1, .reusable = true}}, SHIFT(471), + [1680] = {.entry = {.count = 1, .reusable = true}}, SHIFT(422), + [1682] = {.entry = {.count = 1, .reusable = true}}, SHIFT(426), + [1684] = {.entry = {.count = 1, .reusable = true}}, SHIFT(124), + [1686] = {.entry = {.count = 1, .reusable = true}}, SHIFT(481), + [1688] = {.entry = {.count = 1, .reusable = true}}, SHIFT(99), + [1690] = {.entry = {.count = 1, .reusable = true}}, SHIFT(706), + [1692] = {.entry = {.count = 1, .reusable = true}}, SHIFT(379), + [1694] = {.entry = {.count = 1, .reusable = true}}, SHIFT(467), + [1696] = {.entry = {.count = 1, .reusable = true}}, SHIFT(430), + [1698] = {.entry = {.count = 1, .reusable = true}}, SHIFT(347), + [1700] = {.entry = {.count = 1, .reusable = true}}, SHIFT(351), + [1702] = {.entry = {.count = 1, .reusable = true}}, SHIFT(466), + [1704] = {.entry = {.count = 1, .reusable = true}}, SHIFT(442), + [1706] = {.entry = {.count = 1, .reusable = true}}, SHIFT(543), + [1708] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 2), + [1710] = {.entry = {.count = 1, .reusable = true}}, SHIFT(707), + [1712] = {.entry = {.count = 1, .reusable = true}}, SHIFT(192), + [1714] = {.entry = {.count = 1, .reusable = true}}, SHIFT(101), + [1716] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_name, 3, .production_id = 10), + [1718] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_function_body, 2), + [1720] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_quoted_field, 3), + [1722] = {.entry = {.count = 1, .reusable = true}}, SHIFT(367), + [1724] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else, 2), + [1726] = {.entry = {.count = 1, .reusable = true}}, SHIFT(344), + [1728] = {.entry = {.count = 1, .reusable = true}}, SHIFT(123), + [1730] = {.entry = {.count = 1, .reusable = true}}, SHIFT(369), + [1732] = {.entry = {.count = 1, .reusable = true}}, SHIFT(536), + [1734] = {.entry = {.count = 1, .reusable = true}}, SHIFT(451), + [1736] = {.entry = {.count = 1, .reusable = true}}, SHIFT(197), + [1738] = {.entry = {.count = 1, .reusable = true}}, SHIFT(373), + [1740] = {.entry = {.count = 1, .reusable = true}}, SHIFT(375), + [1742] = {.entry = {.count = 1, .reusable = true}}, SHIFT(454), + [1744] = {.entry = {.count = 1, .reusable = true}}, SHIFT(383), + [1746] = {.entry = {.count = 1, .reusable = true}}, SHIFT(456), + [1748] = {.entry = {.count = 1, .reusable = true}}, SHIFT(457), + [1750] = {.entry = {.count = 1, .reusable = true}}, SHIFT(462), + [1752] = {.entry = {.count = 1, .reusable = true}}, SHIFT(294), + [1754] = {.entry = {.count = 1, .reusable = true}}, SHIFT(74), + [1756] = {.entry = {.count = 1, .reusable = true}}, SHIFT(702), + [1758] = {.entry = {.count = 1, .reusable = true}}, SHIFT(463), + [1760] = {.entry = {.count = 1, .reusable = true}}, SHIFT(306), + [1762] = {.entry = {.count = 1, .reusable = true}}, SHIFT(397), + [1764] = {.entry = {.count = 1, .reusable = true}}, SHIFT(465), + [1766] = {.entry = {.count = 1, .reusable = true}}, SHIFT(460), + [1768] = {.entry = {.count = 1, .reusable = true}}, SHIFT(312), + [1770] = {.entry = {.count = 1, .reusable = true}}, SHIFT(458), + [1772] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), + [1774] = {.entry = {.count = 1, .reusable = true}}, SHIFT(435), + [1776] = {.entry = {.count = 1, .reusable = true}}, SHIFT(404), + [1778] = {.entry = {.count = 1, .reusable = true}}, SHIFT(440), + [1780] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), + [1782] = {.entry = {.count = 1, .reusable = true}}, SHIFT(142), + [1784] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), + [1786] = {.entry = {.count = 1, .reusable = true}}, SHIFT(364), + [1788] = {.entry = {.count = 1, .reusable = true}}, SHIFT(885), + [1790] = {.entry = {.count = 1, .reusable = true}}, SHIFT(455), + [1792] = {.entry = {.count = 1, .reusable = true}}, SHIFT(741), + [1794] = {.entry = {.count = 1, .reusable = true}}, SHIFT(508), + [1796] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__comma_spread, 2), + [1798] = {.entry = {.count = 1, .reusable = true}}, SHIFT(44), + [1800] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), + [1802] = {.entry = {.count = 1, .reusable = true}}, SHIFT(548), + [1804] = {.entry = {.count = 1, .reusable = true}}, SHIFT(796), + [1806] = {.entry = {.count = 1, .reusable = true}}, SHIFT(396), + [1808] = {.entry = {.count = 1, .reusable = true}}, SHIFT(745), + [1810] = {.entry = {.count = 1, .reusable = true}}, SHIFT(760), + [1812] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__parameter_list, 3), + [1814] = {.entry = {.count = 1, .reusable = true}}, SHIFT(22), + [1816] = {.entry = {.count = 1, .reusable = true}}, SHIFT(45), + [1818] = {.entry = {.count = 1, .reusable = true}}, SHIFT(710), + [1820] = {.entry = {.count = 1, .reusable = true}}, SHIFT(793), + [1822] = {.entry = {.count = 1, .reusable = true}}, SHIFT(401), + [1824] = {.entry = {.count = 1, .reusable = true}}, SHIFT(729), + [1826] = {.entry = {.count = 1, .reusable = true}}, SHIFT(296), + [1828] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_else, 3), + [1830] = {.entry = {.count = 1, .reusable = true}}, SHIFT(56), + [1832] = {.entry = {.count = 1, .reusable = true}}, SHIFT(55), + [1834] = {.entry = {.count = 1, .reusable = true}}, SHIFT(731), + [1836] = {.entry = {.count = 1, .reusable = true}}, SHIFT(325), + [1838] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), + [1840] = {.entry = {.count = 1, .reusable = true}}, SHIFT(434), + [1842] = {.entry = {.count = 1, .reusable = true}}, SHIFT(555), + [1844] = {.entry = {.count = 1, .reusable = true}}, SHIFT(851), + [1846] = {.entry = {.count = 1, .reusable = true}}, SHIFT(424), + [1848] = {.entry = {.count = 1, .reusable = true}}, SHIFT(393), + [1850] = {.entry = {.count = 1, .reusable = true}}, SHIFT(429), +}; + +#ifdef __cplusplus +extern "C" { +#endif +void *tree_sitter_lua_external_scanner_create(void); +void tree_sitter_lua_external_scanner_destroy(void *); +bool tree_sitter_lua_external_scanner_scan(void *, TSLexer *, const bool *); +unsigned tree_sitter_lua_external_scanner_serialize(void *, char *); +void tree_sitter_lua_external_scanner_deserialize(void *, const char *, unsigned); + +#ifdef _WIN32 +#define extern __declspec(dllexport) +#endif + +extern const TSLanguage *tree_sitter_lua(void) { + static TSLanguage language = { + .version = LANGUAGE_VERSION, + .symbol_count = SYMBOL_COUNT, + .alias_count = ALIAS_COUNT, + .token_count = TOKEN_COUNT, + .external_token_count = EXTERNAL_TOKEN_COUNT, + .symbol_names = ts_symbol_names, + .symbol_metadata = ts_symbol_metadata, + .parse_table = (const uint16_t *)ts_parse_table, + .parse_actions = ts_parse_actions, + .lex_modes = ts_lex_modes, + .alias_sequences = (const TSSymbol *)ts_alias_sequences, + .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, + .lex_fn = ts_lex, + .external_scanner = { + (const bool *)ts_external_scanner_states, + ts_external_scanner_symbol_map, + tree_sitter_lua_external_scanner_create, + tree_sitter_lua_external_scanner_destroy, + tree_sitter_lua_external_scanner_scan, + tree_sitter_lua_external_scanner_serialize, + tree_sitter_lua_external_scanner_deserialize, + }, + .field_count = FIELD_COUNT, + .field_map_slices = (const TSFieldMapSlice *)ts_field_map_slices, + .field_map_entries = (const TSFieldMapEntry *)ts_field_map_entries, + .field_names = ts_field_names, + .large_state_count = LARGE_STATE_COUNT, + .small_parse_table = (const uint16_t *)ts_small_parse_table, + .small_parse_table_map = (const uint32_t *)ts_small_parse_table_map, + .public_symbol_map = ts_symbol_map, + .alias_map = ts_non_terminal_alias_map, + .state_count = STATE_COUNT, + }; + return &language; +} +#ifdef __cplusplus +} +#endif diff --git a/third-party/tree-sitter/parsers/lua-scanner.cpp b/third-party/tree-sitter/parsers/lua-scanner.cpp new file mode 100644 index 00000000..85b82721 --- /dev/null +++ b/third-party/tree-sitter/parsers/lua-scanner.cpp @@ -0,0 +1,229 @@ +#include +#include + +namespace { + + using std::iswspace; + + enum TokenType { + COMMENT, + STRING + }; + + struct Scanner { + static void skip(TSLexer *lexer) { lexer->advance(lexer, true); } + + static void advance(TSLexer *lexer) { lexer->advance(lexer, false); } + + static bool scan_sequence(TSLexer *lexer, const char *sequence) { + // Try to match all characters in the given 'sequence' + for (const char *c = sequence; *c; c++) { + if (lexer->lookahead == *c) { + // Consume the character in 'c' + advance(lexer); + } else { + return false; + } + } + + return true; + } + + static bool scan_multiline_content(TSLexer *lexer) { + // Initialize lua multiline content level count + int start_level = 0; + int end_level = 0; + + if (lexer->lookahead == '[') { + // Consume first appearance of '[' + advance(lexer); + + if (lexer->lookahead == '[' || lexer->lookahead == '=') { + while (lexer->lookahead == '=') { + // Increment level count + ++start_level; + + // Consume all '=' characters + advance(lexer); + } + + if (lexer->lookahead == '[') { + // Consume last appearance of '[' + advance(lexer); + + // Loop while not end of file (eof) + while (lexer->lookahead != 0) { + // Gives the end level count the same as start level count + end_level = start_level; + + if (lexer->lookahead == ']') { + // Consume first appearance of ']' + advance(lexer); + + if (lexer->lookahead == ']' || lexer->lookahead == '=') { + while (lexer->lookahead == '=' && end_level > 0) { + // Decrement level count + --end_level; + + // Consume all '=' characters + advance(lexer); + } + + if (lexer->lookahead == ']' && end_level == 0) { + // Consume last appearance of ']' + advance(lexer); + + return true; + } + } + } + + if (lexer->lookahead != 0) { + // Consume all but end of file (eof) + advance(lexer); + } + } + } + } + } + + return false; + } + + bool scan(TSLexer *lexer, const bool *valid_symbols) { + if (valid_symbols[COMMENT] || valid_symbols[STRING]) { + while (iswspace(lexer->lookahead)) { + skip(lexer); + } + + // Try to make a short literal string with single quote + if (lexer->lookahead == '\'') { + lexer->result_symbol = STRING; + + // Consume first appearance of '\'' + advance(lexer); + + // Loop when isn't new line neither end of file (eof) + while (lexer->lookahead != '\n' && lexer->lookahead != 0) { + if (lexer->lookahead == '\\') { + // Consume '\\' + advance(lexer); + + if (lexer->lookahead != '\n' && lexer->lookahead != 0) { + // Consume any character that isn't new line neither end of file (eof) + advance(lexer); + } else { + break; + } + } else { + if (lexer->lookahead == '\'') { + // Consume last appearance of '\'' + advance(lexer); + + return true; + } else { + if (lexer->lookahead != '\n' && lexer->lookahead != 0) { + // Consume any character that isn't new line neither end of file (eof) + advance(lexer); + } else { + break; + } + } + } + } + } + + // Try to make a short literal string with double quote + else if (lexer->lookahead == '"') { + lexer->result_symbol = STRING; + + // Consume first appearance of '"' + advance(lexer); + + // Loop when next character isn't new line neither end of file (eof) + while (lexer->lookahead != '\n' && lexer->lookahead != 0) { + if (lexer->lookahead == '\\') { + // Consume '\\' + advance(lexer); + + if (lexer->lookahead != '\n' && lexer->lookahead != 0) { + // Consume any character that isn't new line neither end of file (eof) + advance(lexer); + } else { + break; + } + } else { + if (lexer->lookahead == '"') { + // Consume last appearance of '"' + advance(lexer); + + return true; + } else { + if (lexer->lookahead != '\n' && lexer->lookahead != 0) { + // Consume any character that isn't new line neither end of file (eof) + advance(lexer); + } else { + break; + } + } + } + } + } + + // Try to make a comment + else if (scan_sequence(lexer, "--")) { + while (iswspace(lexer->lookahead) && lexer->lookahead != '\n' && lexer->lookahead != 0) { + advance(lexer); + } + + lexer->result_symbol = COMMENT; + + if (!scan_multiline_content(lexer)) { + while (lexer->lookahead != '\n' && lexer->lookahead != 0) { + // Consume any character that isn't new line neither end of file (eof) + advance(lexer); + } + } + + return true; + } + + // Try to make a long literal string with double bracket + else if (scan_multiline_content(lexer)) { + lexer->result_symbol = STRING; + + return true; + } + + return false; + } + + return false; + } + }; + +} + +extern "C" { + + void *tree_sitter_lua_external_scanner_create() { + return new Scanner(); + } + + void tree_sitter_lua_external_scanner_destroy(void *payload) { + Scanner *scanner = static_cast(payload); + delete scanner; + } + + bool tree_sitter_lua_external_scanner_scan(void *payload, TSLexer *lexer, const bool *valid_symbols) { + Scanner *scanner = static_cast(payload); + return scanner->scan(lexer, valid_symbols); + } + + unsigned tree_sitter_lua_external_scanner_serialize(void */*payload*/, char */*buffer*/) { + return 0; + } + + void tree_sitter_lua_external_scanner_deserialize(void */*payload*/, const char */*buffer*/, unsigned /*length*/) {} + +} diff --git a/third-party/tree-sitter/src/alloc.h b/third-party/tree-sitter/src/alloc.h new file mode 100644 index 00000000..dd487ca2 --- /dev/null +++ b/third-party/tree-sitter/src/alloc.h @@ -0,0 +1,87 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#if defined(TREE_SITTER_ALLOCATION_TRACKING) + +void *ts_record_malloc(size_t); +void *ts_record_calloc(size_t, size_t); +void *ts_record_realloc(void *, size_t); +void ts_record_free(void *); +bool ts_toggle_allocation_recording(bool); + +#define ts_malloc ts_record_malloc +#define ts_calloc ts_record_calloc +#define ts_realloc ts_record_realloc +#define ts_free ts_record_free + +#else + +// Allow clients to override allocation functions + +#ifndef ts_malloc +#define ts_malloc ts_malloc_default +#endif +#ifndef ts_calloc +#define ts_calloc ts_calloc_default +#endif +#ifndef ts_realloc +#define ts_realloc ts_realloc_default +#endif +#ifndef ts_free +#define ts_free ts_free_default +#endif + +#include + +static inline bool ts_toggle_allocation_recording(bool value) { + (void)value; + return false; +} + + +static inline void *ts_malloc_default(size_t size) { + void *result = malloc(size); + if (size > 0 && !result) { + fprintf(stderr, "tree-sitter failed to allocate %zu bytes", size); + exit(1); + } + return result; +} + +static inline void *ts_calloc_default(size_t count, size_t size) { + void *result = calloc(count, size); + if (count > 0 && !result) { + fprintf(stderr, "tree-sitter failed to allocate %zu bytes", count * size); + exit(1); + } + return result; +} + +static inline void *ts_realloc_default(void *buffer, size_t size) { + void *result = realloc(buffer, size); + if (size > 0 && !result) { + fprintf(stderr, "tree-sitter failed to reallocate %zu bytes", size); + exit(1); + } + return result; +} + +static inline void ts_free_default(void *buffer) { + free(buffer); +} + +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ diff --git a/third-party/tree-sitter/src/array.h b/third-party/tree-sitter/src/array.h new file mode 100644 index 00000000..5ff5580a --- /dev/null +++ b/third-party/tree-sitter/src/array.h @@ -0,0 +1,247 @@ +#ifndef TREE_SITTER_ARRAY_H_ +#define TREE_SITTER_ARRAY_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include +#include +#include "./alloc.h" + +#define Array(T) \ + struct { \ + T *contents; \ + uint32_t size; \ + uint32_t capacity; \ + } + +#define array_init(self) \ + ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) + +#define array_new() \ + { NULL, 0, 0 } + +#define array_get(self, index) \ + (assert((uint32_t)index < (self)->size), &(self)->contents[index]) + +#define array_front(self) array_get(self, 0) + +#define array_back(self) array_get(self, (self)->size - 1) + +#define array_clear(self) ((self)->size = 0) + +#define array_reserve(self, new_capacity) \ + array__reserve((VoidArray *)(self), array__elem_size(self), new_capacity) + +// Free any memory allocated for this array. +#define array_delete(self) array__delete((VoidArray *)self) + +#define array_push(self, element) \ + (array__grow((VoidArray *)(self), 1, array__elem_size(self)), \ + (self)->contents[(self)->size++] = (element)) + +// Increase the array's size by a given number of elements, reallocating +// if necessary. New elements are zero-initialized. +#define array_grow_by(self, count) \ + (array__grow((VoidArray *)(self), count, array__elem_size(self)), \ + memset((self)->contents + (self)->size, 0, (count) * array__elem_size(self)), \ + (self)->size += (count)) + +#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( \ + (VoidArray *)(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( \ + (VoidArray *)(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((VoidArray *)(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((VoidArray *)(self), array__elem_size(self), index) + +#define array_pop(self) ((self)->contents[--(self)->size]) + +#define array_assign(self, other) \ + array__assign((VoidArray *)(self), (const VoidArray *)(other), array__elem_size(self)) + +#define array_swap(self, other) \ + array__swap((VoidArray *)(self), (VoidArray *)(other)) + +// 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) VoidArray; + +#define array__elem_size(self) sizeof(*(self)->contents) + +static inline void array__delete(VoidArray *self) { + ts_free(self->contents); + self->contents = NULL; + self->size = 0; + self->capacity = 0; +} + +static inline void array__erase(VoidArray *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--; +} + +static inline void array__reserve(VoidArray *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; + } +} + +static inline void array__assign(VoidArray *self, const VoidArray *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); +} + +static inline void array__swap(VoidArray *self, VoidArray *other) { + VoidArray swap = *other; + *other = *self; + *self = swap; +} + +static inline void array__grow(VoidArray *self, size_t count, size_t element_size) { + size_t new_size = self->size + count; + if (new_size > self->capacity) { + size_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); + } +} + +static inline void array__splice(VoidArray *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`. +#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 __cplusplus +} +#endif + +#endif // TREE_SITTER_ARRAY_H_ diff --git a/third-party/tree-sitter/src/atomic.h b/third-party/tree-sitter/src/atomic.h new file mode 100644 index 00000000..16573242 --- /dev/null +++ b/third-party/tree-sitter/src/atomic.h @@ -0,0 +1,58 @@ +#ifndef TREE_SITTER_ATOMIC_H_ +#define TREE_SITTER_ATOMIC_H_ + +#include + +#ifdef __TINYC__ + +static inline size_t atomic_load(const volatile size_t *p) { + return *p; +} + +static inline uint32_t atomic_inc(volatile uint32_t *p) { + *p += 1; + return *p; +} + +static inline uint32_t atomic_dec(volatile uint32_t *p) { + *p-= 1; + return *p; +} + +#elif defined(_WIN32) + +#include + +static inline size_t atomic_load(const volatile size_t *p) { + return *p; +} + +static inline uint32_t atomic_inc(volatile uint32_t *p) { + return InterlockedIncrement((long volatile *)p); +} + +static inline uint32_t atomic_dec(volatile uint32_t *p) { + return InterlockedDecrement((long volatile *)p); +} + +#else + +static inline size_t atomic_load(const volatile size_t *p) { +#ifdef __ATOMIC_RELAXED + return __atomic_load_n(p, __ATOMIC_RELAXED); +#else + return __sync_fetch_and_add((volatile size_t *)p, 0); +#endif +} + +static inline uint32_t atomic_inc(volatile uint32_t *p) { + return __sync_add_and_fetch(p, 1u); +} + +static inline uint32_t atomic_dec(volatile uint32_t *p) { + return __sync_sub_and_fetch(p, 1u); +} + +#endif + +#endif // TREE_SITTER_ATOMIC_H_ diff --git a/third-party/tree-sitter/src/bits.h b/third-party/tree-sitter/src/bits.h new file mode 100644 index 00000000..ca8caf30 --- /dev/null +++ b/third-party/tree-sitter/src/bits.h @@ -0,0 +1,42 @@ +#ifndef TREE_SITTER_BITS_H_ +#define TREE_SITTER_BITS_H_ + +#include + +static inline uint32_t bitmask_for_index(uint16_t id) { + return (1u << (31 - id)); +} + +#ifdef __TINYC__ + +// Algorithm taken from the Hacker's Delight book +// See also https://graphics.stanford.edu/~seander/bithacks.html +static inline uint32_t count_leading_zeros(uint32_t x) { + int count = 0; + if (x == 0) return 32; + x = x - ((x >> 1) & 0x55555555); + x = (x & 0x33333333) + ((x >> 2) & 0x33333333); + count = (((x + (x >> 4)) & 0x0f0f0f0f) * 0x01010101) >> 24; + return count; +} + +#elif defined _WIN32 && !defined __GNUC__ + +#include + +static inline uint32_t count_leading_zeros(uint32_t x) { + if (x == 0) return 32; + uint32_t result; + _BitScanReverse(&result, x); + return 31 - result; +} + +#else + +static inline uint32_t count_leading_zeros(uint32_t x) { + if (x == 0) return 32; + return __builtin_clz(x); +} + +#endif +#endif // TREE_SITTER_BITS_H_ diff --git a/third-party/tree-sitter/src/clock.h b/third-party/tree-sitter/src/clock.h new file mode 100644 index 00000000..94545f35 --- /dev/null +++ b/third-party/tree-sitter/src/clock.h @@ -0,0 +1,141 @@ +#ifndef TREE_SITTER_CLOCK_H_ +#define TREE_SITTER_CLOCK_H_ + +#include + +typedef uint64_t TSDuration; + +#ifdef _WIN32 + +// Windows: +// * Represent a time as a performance counter value. +// * Represent a duration as a number of performance counter ticks. + +#include +typedef uint64_t TSClock; + +static inline TSDuration duration_from_micros(uint64_t micros) { + LARGE_INTEGER frequency; + QueryPerformanceFrequency(&frequency); + return micros * (uint64_t)frequency.QuadPart / 1000000; +} + +static inline uint64_t duration_to_micros(TSDuration self) { + LARGE_INTEGER frequency; + QueryPerformanceFrequency(&frequency); + return self * 1000000 / (uint64_t)frequency.QuadPart; +} + +static inline TSClock clock_null(void) { + return 0; +} + +static inline TSClock clock_now(void) { + LARGE_INTEGER result; + QueryPerformanceCounter(&result); + return (uint64_t)result.QuadPart; +} + +static inline TSClock clock_after(TSClock base, TSDuration duration) { + return base + duration; +} + +static inline bool clock_is_null(TSClock self) { + return !self; +} + +static inline bool clock_is_gt(TSClock self, TSClock other) { + return self > other; +} + +#elif defined(CLOCK_MONOTONIC) && !defined(__APPLE__) + +// POSIX with monotonic clock support (Linux) +// * Represent a time as a monotonic (seconds, nanoseconds) pair. +// * Represent a duration as a number of microseconds. +// +// On these platforms, parse timeouts will correspond accurately to +// real time, regardless of what other processes are running. + +#include +typedef struct timespec TSClock; + +static inline TSDuration duration_from_micros(uint64_t micros) { + return micros; +} + +static inline uint64_t duration_to_micros(TSDuration self) { + return self; +} + +static inline TSClock clock_now(void) { + TSClock result; + clock_gettime(CLOCK_MONOTONIC, &result); + return result; +} + +static inline TSClock clock_null(void) { + return (TSClock) {0, 0}; +} + +static inline TSClock clock_after(TSClock base, TSDuration duration) { + TSClock result = base; + result.tv_sec += duration / 1000000; + result.tv_nsec += (duration % 1000000) * 1000; + return result; +} + +static inline bool clock_is_null(TSClock self) { + return !self.tv_sec; +} + +static inline bool clock_is_gt(TSClock self, TSClock other) { + if (self.tv_sec > other.tv_sec) return true; + if (self.tv_sec < other.tv_sec) return false; + return self.tv_nsec > other.tv_nsec; +} + +#else + +// macOS or POSIX without monotonic clock support +// * Represent a time as a process clock value. +// * Represent a duration as a number of process clock ticks. +// +// On these platforms, parse timeouts may be affected by other processes, +// which is not ideal, but is better than using a non-monotonic time API +// like `gettimeofday`. + +#include +typedef uint64_t TSClock; + +static inline TSDuration duration_from_micros(uint64_t micros) { + return micros * (uint64_t)CLOCKS_PER_SEC / 1000000; +} + +static inline uint64_t duration_to_micros(TSDuration self) { + return self * 1000000 / (uint64_t)CLOCKS_PER_SEC; +} + +static inline TSClock clock_null(void) { + return 0; +} + +static inline TSClock clock_now(void) { + return (uint64_t)clock(); +} + +static inline TSClock clock_after(TSClock base, TSDuration duration) { + return base + duration; +} + +static inline bool clock_is_null(TSClock self) { + return !self; +} + +static inline bool clock_is_gt(TSClock self, TSClock other) { + return self > other; +} + +#endif + +#endif // TREE_SITTER_CLOCK_H_ diff --git a/third-party/tree-sitter/src/error_costs.h b/third-party/tree-sitter/src/error_costs.h new file mode 100644 index 00000000..32d3666a --- /dev/null +++ b/third-party/tree-sitter/src/error_costs.h @@ -0,0 +1,11 @@ +#ifndef TREE_SITTER_ERROR_COSTS_H_ +#define TREE_SITTER_ERROR_COSTS_H_ + +#define ERROR_STATE 0 +#define ERROR_COST_PER_RECOVERY 500 +#define ERROR_COST_PER_MISSING_TREE 110 +#define ERROR_COST_PER_SKIPPED_TREE 100 +#define ERROR_COST_PER_SKIPPED_LINE 30 +#define ERROR_COST_PER_SKIPPED_CHAR 1 + +#endif diff --git a/third-party/tree-sitter/src/get_changed_ranges.c b/third-party/tree-sitter/src/get_changed_ranges.c new file mode 100644 index 00000000..b8915544 --- /dev/null +++ b/third-party/tree-sitter/src/get_changed_ranges.c @@ -0,0 +1,484 @@ +#include "./get_changed_ranges.h" +#include "./subtree.h" +#include "./language.h" +#include "./error_costs.h" +#include "./tree_cursor.h" +#include + +// #define DEBUG_GET_CHANGED_RANGES + +static void ts_range_array_add(TSRangeArray *self, Length start, Length end) { + if (self->size > 0) { + TSRange *last_range = array_back(self); + if (start.bytes <= last_range->end_byte) { + last_range->end_byte = end.bytes; + last_range->end_point = end.extent; + return; + } + } + + if (start.bytes < end.bytes) { + TSRange range = { start.extent, end.extent, start.bytes, end.bytes }; + array_push(self, range); + } +} + +bool ts_range_array_intersects(const TSRangeArray *self, unsigned start_index, + uint32_t start_byte, uint32_t end_byte) { + for (unsigned i = start_index; i < self->size; i++) { + TSRange *range = &self->contents[i]; + if (range->end_byte > start_byte) { + if (range->start_byte >= end_byte) break; + return true; + } + } + return false; +} + +void ts_range_array_get_changed_ranges( + const TSRange *old_ranges, unsigned old_range_count, + const TSRange *new_ranges, unsigned new_range_count, + TSRangeArray *differences +) { + unsigned new_index = 0; + unsigned old_index = 0; + Length current_position = length_zero(); + bool in_old_range = false; + bool in_new_range = false; + + while (old_index < old_range_count || new_index < new_range_count) { + const TSRange *old_range = &old_ranges[old_index]; + const TSRange *new_range = &new_ranges[new_index]; + + Length next_old_position; + if (in_old_range) { + next_old_position = (Length) {old_range->end_byte, old_range->end_point}; + } else if (old_index < old_range_count) { + next_old_position = (Length) {old_range->start_byte, old_range->start_point}; + } else { + next_old_position = LENGTH_MAX; + } + + Length next_new_position; + if (in_new_range) { + next_new_position = (Length) {new_range->end_byte, new_range->end_point}; + } else if (new_index < new_range_count) { + next_new_position = (Length) {new_range->start_byte, new_range->start_point}; + } else { + next_new_position = LENGTH_MAX; + } + + if (next_old_position.bytes < next_new_position.bytes) { + if (in_old_range != in_new_range) { + ts_range_array_add(differences, current_position, next_old_position); + } + if (in_old_range) old_index++; + current_position = next_old_position; + in_old_range = !in_old_range; + } else if (next_new_position.bytes < next_old_position.bytes) { + if (in_old_range != in_new_range) { + ts_range_array_add(differences, current_position, next_new_position); + } + if (in_new_range) new_index++; + current_position = next_new_position; + in_new_range = !in_new_range; + } else { + if (in_old_range != in_new_range) { + ts_range_array_add(differences, current_position, next_new_position); + } + if (in_old_range) old_index++; + if (in_new_range) new_index++; + in_old_range = !in_old_range; + in_new_range = !in_new_range; + current_position = next_new_position; + } + } +} + +typedef struct { + TreeCursor cursor; + const TSLanguage *language; + unsigned visible_depth; + bool in_padding; +} Iterator; + +static Iterator iterator_new(TreeCursor *cursor, const Subtree *tree, const TSLanguage *language) { + array_clear(&cursor->stack); + array_push(&cursor->stack, ((TreeCursorEntry){ + .subtree = tree, + .position = length_zero(), + .child_index = 0, + .structural_child_index = 0, + })); + return (Iterator) { + .cursor = *cursor, + .language = language, + .visible_depth = 1, + .in_padding = false, + }; +} + +static bool iterator_done(Iterator *self) { + return self->cursor.stack.size == 0; +} + +static Length iterator_start_position(Iterator *self) { + TreeCursorEntry entry = *array_back(&self->cursor.stack); + if (self->in_padding) { + return entry.position; + } else { + return length_add(entry.position, ts_subtree_padding(*entry.subtree)); + } +} + +static Length iterator_end_position(Iterator *self) { + TreeCursorEntry entry = *array_back(&self->cursor.stack); + Length result = length_add(entry.position, ts_subtree_padding(*entry.subtree)); + if (self->in_padding) { + return result; + } else { + return length_add(result, ts_subtree_size(*entry.subtree)); + } +} + +static bool iterator_tree_is_visible(const Iterator *self) { + TreeCursorEntry entry = *array_back(&self->cursor.stack); + if (ts_subtree_visible(*entry.subtree)) return true; + if (self->cursor.stack.size > 1) { + Subtree parent = *self->cursor.stack.contents[self->cursor.stack.size - 2].subtree; + return ts_language_alias_at( + self->language, + parent.ptr->production_id, + entry.structural_child_index + ) != 0; + } + return false; +} + +static void iterator_get_visible_state( + const Iterator *self, + Subtree *tree, + TSSymbol *alias_symbol, + uint32_t *start_byte +) { + uint32_t i = self->cursor.stack.size - 1; + + if (self->in_padding) { + if (i == 0) return; + i--; + } + + for (; i + 1 > 0; i--) { + TreeCursorEntry entry = self->cursor.stack.contents[i]; + + if (i > 0) { + const Subtree *parent = self->cursor.stack.contents[i - 1].subtree; + *alias_symbol = ts_language_alias_at( + self->language, + parent->ptr->production_id, + entry.structural_child_index + ); + } + + if (ts_subtree_visible(*entry.subtree) || *alias_symbol) { + *tree = *entry.subtree; + *start_byte = entry.position.bytes; + break; + } + } +} + +static void iterator_ascend(Iterator *self) { + if (iterator_done(self)) return; + if (iterator_tree_is_visible(self) && !self->in_padding) self->visible_depth--; + if (array_back(&self->cursor.stack)->child_index > 0) self->in_padding = false; + self->cursor.stack.size--; +} + +static bool iterator_descend(Iterator *self, uint32_t goal_position) { + if (self->in_padding) return false; + + bool did_descend; + do { + did_descend = false; + TreeCursorEntry entry = *array_back(&self->cursor.stack); + Length position = entry.position; + uint32_t structural_child_index = 0; + for (uint32_t i = 0, n = ts_subtree_child_count(*entry.subtree); i < n; i++) { + const Subtree *child = &ts_subtree_children(*entry.subtree)[i]; + Length child_left = length_add(position, ts_subtree_padding(*child)); + Length child_right = length_add(child_left, ts_subtree_size(*child)); + + if (child_right.bytes > goal_position) { + array_push(&self->cursor.stack, ((TreeCursorEntry){ + .subtree = child, + .position = position, + .child_index = i, + .structural_child_index = structural_child_index, + })); + + if (iterator_tree_is_visible(self)) { + if (child_left.bytes > goal_position) { + self->in_padding = true; + } else { + self->visible_depth++; + } + return true; + } + + did_descend = true; + break; + } + + position = child_right; + if (!ts_subtree_extra(*child)) structural_child_index++; + } + } while (did_descend); + + return false; +} + +static void iterator_advance(Iterator *self) { + if (self->in_padding) { + self->in_padding = false; + if (iterator_tree_is_visible(self)) { + self->visible_depth++; + } else { + iterator_descend(self, 0); + } + return; + } + + for (;;) { + if (iterator_tree_is_visible(self)) self->visible_depth--; + TreeCursorEntry entry = array_pop(&self->cursor.stack); + if (iterator_done(self)) return; + + const Subtree *parent = array_back(&self->cursor.stack)->subtree; + uint32_t child_index = entry.child_index + 1; + if (ts_subtree_child_count(*parent) > child_index) { + Length position = length_add(entry.position, ts_subtree_total_size(*entry.subtree)); + uint32_t structural_child_index = entry.structural_child_index; + if (!ts_subtree_extra(*entry.subtree)) structural_child_index++; + const Subtree *next_child = &ts_subtree_children(*parent)[child_index]; + + array_push(&self->cursor.stack, ((TreeCursorEntry){ + .subtree = next_child, + .position = position, + .child_index = child_index, + .structural_child_index = structural_child_index, + })); + + if (iterator_tree_is_visible(self)) { + if (ts_subtree_padding(*next_child).bytes > 0) { + self->in_padding = true; + } else { + self->visible_depth++; + } + } else { + iterator_descend(self, 0); + } + break; + } + } +} + +typedef enum { + IteratorDiffers, + IteratorMayDiffer, + IteratorMatches, +} IteratorComparison; + +static IteratorComparison iterator_compare(const Iterator *old_iter, const Iterator *new_iter) { + Subtree old_tree = NULL_SUBTREE; + Subtree new_tree = NULL_SUBTREE; + uint32_t old_start = 0; + uint32_t new_start = 0; + TSSymbol old_alias_symbol = 0; + TSSymbol new_alias_symbol = 0; + iterator_get_visible_state(old_iter, &old_tree, &old_alias_symbol, &old_start); + iterator_get_visible_state(new_iter, &new_tree, &new_alias_symbol, &new_start); + + if (!old_tree.ptr && !new_tree.ptr) return IteratorMatches; + if (!old_tree.ptr || !new_tree.ptr) return IteratorDiffers; + + if ( + old_alias_symbol == new_alias_symbol && + ts_subtree_symbol(old_tree) == ts_subtree_symbol(new_tree) + ) { + if (old_start == new_start && + !ts_subtree_has_changes(old_tree) && + ts_subtree_symbol(old_tree) != ts_builtin_sym_error && + ts_subtree_size(old_tree).bytes == ts_subtree_size(new_tree).bytes && + ts_subtree_parse_state(old_tree) != TS_TREE_STATE_NONE && + ts_subtree_parse_state(new_tree) != TS_TREE_STATE_NONE && + (ts_subtree_parse_state(old_tree) == ERROR_STATE) == + (ts_subtree_parse_state(new_tree) == ERROR_STATE)) { + return IteratorMatches; + } else { + return IteratorMayDiffer; + } + } + + return IteratorDiffers; +} + +#ifdef DEBUG_GET_CHANGED_RANGES +static inline void iterator_print_state(Iterator *self) { + TreeCursorEntry entry = *array_back(&self->cursor.stack); + TSPoint start = iterator_start_position(self).extent; + TSPoint end = iterator_end_position(self).extent; + const char *name = ts_language_symbol_name(self->language, ts_subtree_symbol(*entry.subtree)); + printf( + "(%-25s %s\t depth:%u [%u, %u] - [%u, %u])", + name, self->in_padding ? "(p)" : " ", + self->visible_depth, + start.row + 1, start.column, + end.row + 1, end.column + ); +} +#endif + +unsigned ts_subtree_get_changed_ranges(const Subtree *old_tree, const Subtree *new_tree, + TreeCursor *cursor1, TreeCursor *cursor2, + const TSLanguage *language, + const TSRangeArray *included_range_differences, + TSRange **ranges) { + TSRangeArray results = array_new(); + + Iterator old_iter = iterator_new(cursor1, old_tree, language); + Iterator new_iter = iterator_new(cursor2, new_tree, language); + + unsigned included_range_difference_index = 0; + + Length position = iterator_start_position(&old_iter); + Length next_position = iterator_start_position(&new_iter); + if (position.bytes < next_position.bytes) { + ts_range_array_add(&results, position, next_position); + position = next_position; + } else if (position.bytes > next_position.bytes) { + ts_range_array_add(&results, next_position, position); + next_position = position; + } + + do { + #ifdef DEBUG_GET_CHANGED_RANGES + printf("At [%-2u, %-2u] Compare ", position.extent.row + 1, position.extent.column); + iterator_print_state(&old_iter); + printf("\tvs\t"); + iterator_print_state(&new_iter); + puts(""); + #endif + + // Compare the old and new subtrees. + IteratorComparison comparison = iterator_compare(&old_iter, &new_iter); + + // Even if the two subtrees appear to be identical, they could differ + // internally if they contain a range of text that was previously + // excluded from the parse, and is now included, or vice-versa. + if (comparison == IteratorMatches && ts_range_array_intersects( + included_range_differences, + included_range_difference_index, + position.bytes, + iterator_end_position(&old_iter).bytes + )) { + comparison = IteratorMayDiffer; + } + + bool is_changed = false; + switch (comparison) { + // If the subtrees are definitely identical, move to the end + // of both subtrees. + case IteratorMatches: + next_position = iterator_end_position(&old_iter); + break; + + // If the subtrees might differ internally, descend into both + // subtrees, finding the first child that spans the current position. + case IteratorMayDiffer: + if (iterator_descend(&old_iter, position.bytes)) { + if (!iterator_descend(&new_iter, position.bytes)) { + is_changed = true; + next_position = iterator_end_position(&old_iter); + } + } else if (iterator_descend(&new_iter, position.bytes)) { + is_changed = true; + next_position = iterator_end_position(&new_iter); + } else { + next_position = length_min( + iterator_end_position(&old_iter), + iterator_end_position(&new_iter) + ); + } + break; + + // If the subtrees are different, record a change and then move + // to the end of both subtrees. + case IteratorDiffers: + is_changed = true; + next_position = length_min( + iterator_end_position(&old_iter), + iterator_end_position(&new_iter) + ); + break; + } + + // Ensure that both iterators are caught up to the current position. + while ( + !iterator_done(&old_iter) && + iterator_end_position(&old_iter).bytes <= next_position.bytes + ) iterator_advance(&old_iter); + while ( + !iterator_done(&new_iter) && + iterator_end_position(&new_iter).bytes <= next_position.bytes + ) iterator_advance(&new_iter); + + // Ensure that both iterators are at the same depth in the tree. + while (old_iter.visible_depth > new_iter.visible_depth) { + iterator_ascend(&old_iter); + } + while (new_iter.visible_depth > old_iter.visible_depth) { + iterator_ascend(&new_iter); + } + + if (is_changed) { + #ifdef DEBUG_GET_CHANGED_RANGES + printf( + " change: [[%u, %u] - [%u, %u]]\n", + position.extent.row + 1, position.extent.column, + next_position.extent.row + 1, next_position.extent.column + ); + #endif + + ts_range_array_add(&results, position, next_position); + } + + position = next_position; + + // Keep track of the current position in the included range differences + // array in order to avoid scanning the entire array on each iteration. + while (included_range_difference_index < included_range_differences->size) { + const TSRange *range = &included_range_differences->contents[ + included_range_difference_index + ]; + if (range->end_byte <= position.bytes) { + included_range_difference_index++; + } else { + break; + } + } + } while (!iterator_done(&old_iter) && !iterator_done(&new_iter)); + + Length old_size = ts_subtree_total_size(*old_tree); + Length new_size = ts_subtree_total_size(*new_tree); + if (old_size.bytes < new_size.bytes) { + ts_range_array_add(&results, old_size, new_size); + } else if (new_size.bytes < old_size.bytes) { + ts_range_array_add(&results, new_size, old_size); + } + + *cursor1 = old_iter.cursor; + *cursor2 = new_iter.cursor; + *ranges = results.contents; + return results.size; +} diff --git a/third-party/tree-sitter/src/get_changed_ranges.h b/third-party/tree-sitter/src/get_changed_ranges.h new file mode 100644 index 00000000..a1f1dbb4 --- /dev/null +++ b/third-party/tree-sitter/src/get_changed_ranges.h @@ -0,0 +1,36 @@ +#ifndef TREE_SITTER_GET_CHANGED_RANGES_H_ +#define TREE_SITTER_GET_CHANGED_RANGES_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./tree_cursor.h" +#include "./subtree.h" + +typedef Array(TSRange) TSRangeArray; + +void ts_range_array_get_changed_ranges( + const TSRange *old_ranges, unsigned old_range_count, + const TSRange *new_ranges, unsigned new_range_count, + TSRangeArray *differences +); + +bool ts_range_array_intersects( + const TSRangeArray *self, unsigned start_index, + uint32_t start_byte, uint32_t end_byte +); + +unsigned ts_subtree_get_changed_ranges( + const Subtree *old_tree, const Subtree *new_tree, + TreeCursor *cursor1, TreeCursor *cursor2, + const TSLanguage *language, + const TSRangeArray *included_range_differences, + TSRange **ranges +); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_GET_CHANGED_RANGES_H_ diff --git a/third-party/tree-sitter/src/language.c b/third-party/tree-sitter/src/language.c new file mode 100644 index 00000000..9ccf2bc3 --- /dev/null +++ b/third-party/tree-sitter/src/language.c @@ -0,0 +1,149 @@ +#include "./language.h" +#include "./subtree.h" +#include "./error_costs.h" +#include + +uint32_t ts_language_symbol_count(const TSLanguage *self) { + return self->symbol_count + self->alias_count; +} + +uint32_t ts_language_version(const TSLanguage *self) { + return self->version; +} + +uint32_t ts_language_field_count(const TSLanguage *self) { + if (self->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_FIELDS) { + return self->field_count; + } else { + return 0; + } +} + +void ts_language_table_entry( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol, + TableEntry *result +) { + if (symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat) { + result->action_count = 0; + result->is_reusable = false; + result->actions = NULL; + } else { + assert(symbol < self->token_count); + uint32_t action_index = ts_language_lookup(self, state, symbol); + const TSParseActionEntry *entry = &self->parse_actions[action_index]; + result->action_count = entry->entry.count; + result->is_reusable = entry->entry.reusable; + result->actions = (const TSParseAction *)(entry + 1); + } +} + +TSSymbolMetadata ts_language_symbol_metadata( + const TSLanguage *self, + TSSymbol symbol +) { + if (symbol == ts_builtin_sym_error) { + return (TSSymbolMetadata){.visible = true, .named = true}; + } else if (symbol == ts_builtin_sym_error_repeat) { + return (TSSymbolMetadata){.visible = false, .named = false}; + } else { + return self->symbol_metadata[symbol]; + } +} + +TSSymbol ts_language_public_symbol( + const TSLanguage *self, + TSSymbol symbol +) { + if (symbol == ts_builtin_sym_error) return symbol; + if (self->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_SYMBOL_DEDUPING) { + return self->public_symbol_map[symbol]; + } else { + return symbol; + } +} + +const char *ts_language_symbol_name( + const TSLanguage *self, + TSSymbol symbol +) { + if (symbol == ts_builtin_sym_error) { + return "ERROR"; + } else if (symbol == ts_builtin_sym_error_repeat) { + return "_ERROR"; + } else if (symbol < ts_language_symbol_count(self)) { + return self->symbol_names[symbol]; + } else { + return NULL; + } +} + +TSSymbol ts_language_symbol_for_name( + const TSLanguage *self, + const char *string, + uint32_t length, + bool is_named +) { + if (!strncmp(string, "ERROR", length)) return ts_builtin_sym_error; + uint32_t count = ts_language_symbol_count(self); + for (TSSymbol i = 0; i < count; i++) { + TSSymbolMetadata metadata = ts_language_symbol_metadata(self, i); + if ((!metadata.visible && !metadata.supertype) || metadata.named != is_named) continue; + const char *symbol_name = self->symbol_names[i]; + if (!strncmp(symbol_name, string, length) && !symbol_name[length]) { + if (self->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_SYMBOL_DEDUPING) { + return self->public_symbol_map[i]; + } else { + return i; + } + } + } + return 0; +} + +TSSymbolType ts_language_symbol_type( + const TSLanguage *self, + TSSymbol symbol +) { + TSSymbolMetadata metadata = ts_language_symbol_metadata(self, symbol); + if (metadata.named) { + return TSSymbolTypeRegular; + } else if (metadata.visible) { + return TSSymbolTypeAnonymous; + } else { + return TSSymbolTypeAuxiliary; + } +} + +const char *ts_language_field_name_for_id( + const TSLanguage *self, + TSFieldId id +) { + uint32_t count = ts_language_field_count(self); + if (count && id <= count) { + return self->field_names[id]; + } else { + return NULL; + } +} + +TSFieldId ts_language_field_id_for_name( + const TSLanguage *self, + const char *name, + uint32_t name_length +) { + uint32_t count = ts_language_field_count(self); + for (TSSymbol i = 1; i < count + 1; i++) { + switch (strncmp(name, self->field_names[i], name_length)) { + case 0: + if (self->field_names[i][name_length] == 0) return i; + break; + case -1: + return 0; + default: + break; + } + } + return 0; +} diff --git a/third-party/tree-sitter/src/language.h b/third-party/tree-sitter/src/language.h new file mode 100644 index 00000000..e5c07aa2 --- /dev/null +++ b/third-party/tree-sitter/src/language.h @@ -0,0 +1,292 @@ +#ifndef TREE_SITTER_LANGUAGE_H_ +#define TREE_SITTER_LANGUAGE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./subtree.h" +#include "tree_sitter/parser.h" + +#define ts_builtin_sym_error_repeat (ts_builtin_sym_error - 1) +#define TREE_SITTER_LANGUAGE_VERSION_WITH_FIELDS 10 +#define TREE_SITTER_LANGUAGE_VERSION_WITH_SYMBOL_DEDUPING 11 +#define TREE_SITTER_LANGUAGE_VERSION_WITH_SMALL_STATES 11 +#define TREE_SITTER_LANGUAGE_VERSION_WITH_STATE_COUNT 12 +#define TREE_SITTER_LANGUAGE_VERSION_WITH_ALIAS_MAP 12 + +typedef struct { + const TSParseAction *actions; + uint32_t action_count; + bool is_reusable; +} TableEntry; + +typedef struct { + const TSLanguage *language; + const uint16_t *data; + const uint16_t *group_end; + TSStateId state; + uint16_t table_value; + uint16_t section_index; + uint16_t group_count; + bool is_small_state; + + const TSParseAction *actions; + TSSymbol symbol; + TSStateId next_state; + uint16_t action_count; +} LookaheadIterator; + +void ts_language_table_entry(const TSLanguage *, TSStateId, TSSymbol, TableEntry *); + +TSSymbolMetadata ts_language_symbol_metadata(const TSLanguage *, TSSymbol); + +TSSymbol ts_language_public_symbol(const TSLanguage *, TSSymbol); + +static inline bool ts_language_is_symbol_external(const TSLanguage *self, TSSymbol symbol) { + return 0 < symbol && symbol < self->external_token_count + 1; +} + +static inline const TSParseAction *ts_language_actions( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol, + uint32_t *count +) { + TableEntry entry; + ts_language_table_entry(self, state, symbol, &entry); + *count = entry.action_count; + return entry.actions; +} + +static inline bool ts_language_has_actions( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol +) { + TableEntry entry; + ts_language_table_entry(self, state, symbol, &entry); + return entry.action_count > 0; +} + +static inline bool ts_language_has_reduce_action( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol +) { + TableEntry entry; + ts_language_table_entry(self, state, symbol, &entry); + return entry.action_count > 0 && entry.actions[0].type == TSParseActionTypeReduce; +} + +// Lookup the table value for a given symbol and state. +// +// For non-terminal symbols, the table value represents a successor state. +// For terminal symbols, it represents an index in the actions table. +// For 'large' parse states, this is a direct lookup. For 'small' parse +// states, this requires searching through the symbol groups to find +// the given symbol. +static inline uint16_t ts_language_lookup( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol +) { + if ( + self->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_SMALL_STATES && + state >= self->large_state_count + ) { + uint32_t index = self->small_parse_table_map[state - self->large_state_count]; + const uint16_t *data = &self->small_parse_table[index]; + uint16_t group_count = *(data++); + for (unsigned i = 0; i < group_count; i++) { + uint16_t section_value = *(data++); + uint16_t symbol_count = *(data++); + for (unsigned i = 0; i < symbol_count; i++) { + if (*(data++) == symbol) return section_value; + } + } + return 0; + } else { + return self->parse_table[state * self->symbol_count + symbol]; + } +} + +// Iterate over all of the symbols that are valid in the given state. +// +// For 'large' parse states, this just requires iterating through +// all possible symbols and checking the parse table for each one. +// For 'small' parse states, this exploits the structure of the +// table to only visit the valid symbols. +static inline LookaheadIterator ts_language_lookaheads( + const TSLanguage *self, + TSStateId state +) { + bool is_small_state = + self->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_SMALL_STATES && + state >= self->large_state_count; + const uint16_t *data; + const uint16_t *group_end = NULL; + uint16_t group_count = 0; + if (is_small_state) { + uint32_t index = self->small_parse_table_map[state - self->large_state_count]; + data = &self->small_parse_table[index]; + group_end = data + 1; + group_count = *data; + } else { + data = &self->parse_table[state * self->symbol_count] - 1; + } + return (LookaheadIterator) { + .language = self, + .data = data, + .group_end = group_end, + .group_count = group_count, + .is_small_state = is_small_state, + .symbol = UINT16_MAX, + .next_state = 0, + }; +} + +static inline bool ts_lookahead_iterator_next(LookaheadIterator *self) { + // For small parse states, valid symbols are listed explicitly, + // grouped by their value. There's no need to look up the actions + // again until moving to the next group. + if (self->is_small_state) { + self->data++; + if (self->data == self->group_end) { + if (self->group_count == 0) return false; + self->group_count--; + self->table_value = *(self->data++); + unsigned symbol_count = *(self->data++); + self->group_end = self->data + symbol_count; + self->symbol = *self->data; + } else { + self->symbol = *self->data; + return true; + } + } + + // For large parse states, iterate through every symbol until one + // is found that has valid actions. + else { + do { + self->data++; + self->symbol++; + if (self->symbol >= self->language->symbol_count) return false; + self->table_value = *self->data; + } while (!self->table_value); + } + + // Depending on if the symbols is terminal or non-terminal, the table value either + // represents a list of actions or a successor state. + if (self->symbol < self->language->token_count) { + const TSParseActionEntry *entry = &self->language->parse_actions[self->table_value]; + self->action_count = entry->entry.count; + self->actions = (const TSParseAction *)(entry + 1); + self->next_state = 0; + } else { + self->action_count = 0; + self->next_state = self->table_value; + } + return true; +} + +static inline TSStateId ts_language_next_state( + const TSLanguage *self, + TSStateId state, + TSSymbol symbol +) { + if (symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat) { + return 0; + } else if (symbol < self->token_count) { + uint32_t count; + const TSParseAction *actions = ts_language_actions(self, state, symbol, &count); + if (count > 0) { + TSParseAction action = actions[count - 1]; + if (action.type == TSParseActionTypeShift) { + return action.params.shift.extra ? state : action.params.shift.state; + } + } + return 0; + } else { + return ts_language_lookup(self, state, symbol); + } +} + +static inline const bool *ts_language_enabled_external_tokens( + const TSLanguage *self, + unsigned external_scanner_state +) { + if (external_scanner_state == 0) { + return NULL; + } else { + return self->external_scanner.states + self->external_token_count * external_scanner_state; + } +} + +static inline const TSSymbol *ts_language_alias_sequence( + const TSLanguage *self, + uint32_t production_id +) { + return production_id ? + &self->alias_sequences[production_id * self->max_alias_sequence_length] : + NULL; +} + +static inline TSSymbol ts_language_alias_at( + const TSLanguage *self, + uint32_t production_id, + uint32_t child_index +) { + return production_id ? + self->alias_sequences[production_id * self->max_alias_sequence_length + child_index] : + 0; +} + +static inline void ts_language_field_map( + const TSLanguage *self, + uint32_t production_id, + const TSFieldMapEntry **start, + const TSFieldMapEntry **end +) { + if (self->version < TREE_SITTER_LANGUAGE_VERSION_WITH_FIELDS || self->field_count == 0) { + *start = NULL; + *end = NULL; + return; + } + + TSFieldMapSlice slice = self->field_map_slices[production_id]; + *start = &self->field_map_entries[slice.index]; + *end = &self->field_map_entries[slice.index] + slice.length; +} + +static inline void ts_language_aliases_for_symbol( + const TSLanguage *self, + TSSymbol original_symbol, + const TSSymbol **start, + const TSSymbol **end +) { + *start = &self->public_symbol_map[original_symbol]; + *end = *start + 1; + + if (self->version < TREE_SITTER_LANGUAGE_VERSION_WITH_ALIAS_MAP) return; + + unsigned i = 0; + for (;;) { + TSSymbol symbol = self->alias_map[i++]; + if (symbol == 0 || symbol > original_symbol) break; + uint16_t count = self->alias_map[i++]; + if (symbol == original_symbol) { + *start = &self->alias_map[i]; + *end = &self->alias_map[i + count]; + break; + } + i += count; + } +} + + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_LANGUAGE_H_ diff --git a/third-party/tree-sitter/src/length.h b/third-party/tree-sitter/src/length.h new file mode 100644 index 00000000..61de9fc1 --- /dev/null +++ b/third-party/tree-sitter/src/length.h @@ -0,0 +1,44 @@ +#ifndef TREE_SITTER_LENGTH_H_ +#define TREE_SITTER_LENGTH_H_ + +#include +#include +#include "./point.h" +#include "tree_sitter/api.h" + +typedef struct { + uint32_t bytes; + TSPoint extent; +} Length; + +static const Length LENGTH_UNDEFINED = {0, {0, 1}}; +static const Length LENGTH_MAX = {UINT32_MAX, {UINT32_MAX, UINT32_MAX}}; + +static inline bool length_is_undefined(Length length) { + return length.bytes == 0 && length.extent.column != 0; +} + +static inline Length length_min(Length len1, Length len2) { + return (len1.bytes < len2.bytes) ? len1 : len2; +} + +static inline Length length_add(Length len1, Length len2) { + Length result; + result.bytes = len1.bytes + len2.bytes; + result.extent = point_add(len1.extent, len2.extent); + return result; +} + +static inline Length length_sub(Length len1, Length len2) { + Length result; + result.bytes = len1.bytes - len2.bytes; + result.extent = point_sub(len1.extent, len2.extent); + return result; +} + +static inline Length length_zero(void) { + Length result = {0, {0, 0}}; + return result; +} + +#endif diff --git a/third-party/tree-sitter/src/lexer.c b/third-party/tree-sitter/src/lexer.c new file mode 100644 index 00000000..08e90a8c --- /dev/null +++ b/third-party/tree-sitter/src/lexer.c @@ -0,0 +1,391 @@ +#include +#include "./lexer.h" +#include "./subtree.h" +#include "./length.h" +#include "./unicode.h" + +#define LOG(message, character) \ + if (self->logger.log) { \ + snprintf( \ + self->debug_buffer, \ + TREE_SITTER_SERIALIZATION_BUFFER_SIZE, \ + 32 <= character && character < 127 ? \ + message " character:'%c'" : \ + message " character:%d", \ + character \ + ); \ + self->logger.log( \ + self->logger.payload, \ + TSLogTypeLex, \ + self->debug_buffer \ + ); \ + } + +static const int32_t BYTE_ORDER_MARK = 0xFEFF; + +static const TSRange DEFAULT_RANGE = { + .start_point = { + .row = 0, + .column = 0, + }, + .end_point = { + .row = UINT32_MAX, + .column = UINT32_MAX, + }, + .start_byte = 0, + .end_byte = UINT32_MAX +}; + +// Check if the lexer has reached EOF. This state is stored +// by setting the lexer's `current_included_range_index` such that +// it has consumed all of its available ranges. +static bool ts_lexer__eof(const TSLexer *_self) { + Lexer *self = (Lexer *)_self; + return self->current_included_range_index == self->included_range_count; +} + +// Clear the currently stored chunk of source code, because the lexer's +// position has changed. +static void ts_lexer__clear_chunk(Lexer *self) { + self->chunk = NULL; + self->chunk_size = 0; + self->chunk_start = 0; +} + +// Call the lexer's input callback to obtain a new chunk of source code +// for the current position. +static void ts_lexer__get_chunk(Lexer *self) { + self->chunk_start = self->current_position.bytes; + self->chunk = self->input.read( + self->input.payload, + self->current_position.bytes, + self->current_position.extent, + &self->chunk_size + ); + if (!self->chunk_size) { + self->current_included_range_index = self->included_range_count; + self->chunk = NULL; + } +} + +// Decode the next unicode character in the current chunk of source code. +// This assumes that the lexer has already retrieved a chunk of source +// code that spans the current position. +static void ts_lexer__get_lookahead(Lexer *self) { + uint32_t position_in_chunk = self->current_position.bytes - self->chunk_start; + uint32_t size = self->chunk_size - position_in_chunk; + + if (size == 0) { + self->lookahead_size = 1; + self->data.lookahead = '\0'; + return; + } + + const uint8_t *chunk = (const uint8_t *)self->chunk + position_in_chunk; + UnicodeDecodeFunction decode = self->input.encoding == TSInputEncodingUTF8 + ? ts_decode_utf8 + : ts_decode_utf16; + + self->lookahead_size = decode(chunk, size, &self->data.lookahead); + + // If this chunk ended in the middle of a multi-byte character, + // try again with a fresh chunk. + if (self->data.lookahead == TS_DECODE_ERROR && size < 4) { + ts_lexer__get_chunk(self); + chunk = (const uint8_t *)self->chunk; + size = self->chunk_size; + self->lookahead_size = decode(chunk, size, &self->data.lookahead); + } + + if (self->data.lookahead == TS_DECODE_ERROR) { + self->lookahead_size = 1; + } +} + +// Advance to the next character in the source code, retrieving a new +// chunk of source code if needed. +static void ts_lexer__advance(TSLexer *_self, bool skip) { + Lexer *self = (Lexer *)_self; + if (!self->chunk) return; + + if (skip) { + LOG("skip", self->data.lookahead); + } else { + LOG("consume", self->data.lookahead); + } + + if (self->lookahead_size) { + self->current_position.bytes += self->lookahead_size; + if (self->data.lookahead == '\n') { + self->current_position.extent.row++; + self->current_position.extent.column = 0; + } else { + self->current_position.extent.column += self->lookahead_size; + } + } + + const TSRange *current_range = NULL; + if (self->current_included_range_index < self->included_range_count) { + current_range = &self->included_ranges[self->current_included_range_index]; + if (self->current_position.bytes == current_range->end_byte) { + self->current_included_range_index++; + if (self->current_included_range_index < self->included_range_count) { + current_range++; + self->current_position = (Length) { + current_range->start_byte, + current_range->start_point, + }; + } else { + current_range = NULL; + } + } + } + + if (skip) self->token_start_position = self->current_position; + + if (current_range) { + if (self->current_position.bytes >= self->chunk_start + self->chunk_size) { + ts_lexer__get_chunk(self); + } + ts_lexer__get_lookahead(self); + } else { + ts_lexer__clear_chunk(self); + self->data.lookahead = '\0'; + self->lookahead_size = 1; + } +} + +// Mark that a token match has completed. This can be called multiple +// times if a longer match is found later. +static void ts_lexer__mark_end(TSLexer *_self) { + Lexer *self = (Lexer *)_self; + if (!ts_lexer__eof(&self->data)) { + // If the lexer is right at the beginning of included range, + // then the token should be considered to end at the *end* of the + // previous included range, rather than here. + TSRange *current_included_range = &self->included_ranges[ + self->current_included_range_index + ]; + if ( + self->current_included_range_index > 0 && + self->current_position.bytes == current_included_range->start_byte + ) { + TSRange *previous_included_range = current_included_range - 1; + self->token_end_position = (Length) { + previous_included_range->end_byte, + previous_included_range->end_point, + }; + return; + } + } + self->token_end_position = self->current_position; +} + +static uint32_t ts_lexer__get_column(TSLexer *_self) { + Lexer *self = (Lexer *)_self; + uint32_t goal_byte = self->current_position.bytes; + + self->current_position.bytes -= self->current_position.extent.column; + self->current_position.extent.column = 0; + + if (self->current_position.bytes < self->chunk_start) { + ts_lexer__get_chunk(self); + } + + uint32_t result = 0; + while (self->current_position.bytes < goal_byte) { + ts_lexer__advance(&self->data, false); + result++; + } + + return result; +} + +// Is the lexer at a boundary between two disjoint included ranges of +// source code? This is exposed as an API because some languages' external +// scanners need to perform custom actions at these boundaries. +static bool ts_lexer__is_at_included_range_start(const TSLexer *_self) { + const Lexer *self = (const Lexer *)_self; + if (self->current_included_range_index < self->included_range_count) { + TSRange *current_range = &self->included_ranges[self->current_included_range_index]; + return self->current_position.bytes == current_range->start_byte; + } else { + return false; + } +} + +void ts_lexer_init(Lexer *self) { + *self = (Lexer) { + .data = { + // The lexer's methods are stored as struct fields so that generated + // parsers can call them without needing to be linked against this + // library. + .advance = ts_lexer__advance, + .mark_end = ts_lexer__mark_end, + .get_column = ts_lexer__get_column, + .is_at_included_range_start = ts_lexer__is_at_included_range_start, + .eof = ts_lexer__eof, + .lookahead = 0, + .result_symbol = 0, + }, + .chunk = NULL, + .chunk_size = 0, + .chunk_start = 0, + .current_position = {0, {0, 0}}, + .logger = { + .payload = NULL, + .log = NULL + }, + .included_ranges = NULL, + .included_range_count = 0, + .current_included_range_index = 0, + }; + ts_lexer_set_included_ranges(self, NULL, 0); +} + +void ts_lexer_delete(Lexer *self) { + ts_free(self->included_ranges); +} + +static void ts_lexer_goto(Lexer *self, Length position) { + self->current_position = position; + bool found_included_range = false; + + // Move to the first valid position at or after the given position. + for (unsigned i = 0; i < self->included_range_count; i++) { + TSRange *included_range = &self->included_ranges[i]; + if (included_range->end_byte > position.bytes) { + if (included_range->start_byte > position.bytes) { + self->current_position = (Length) { + .bytes = included_range->start_byte, + .extent = included_range->start_point, + }; + } + + self->current_included_range_index = i; + found_included_range = true; + break; + } + } + + if (found_included_range) { + // If the current position is outside of the current chunk of text, + // then clear out the current chunk of text. + if (self->chunk && ( + position.bytes < self->chunk_start || + position.bytes >= self->chunk_start + self->chunk_size + )) { + ts_lexer__clear_chunk(self); + } + + self->lookahead_size = 0; + self->data.lookahead = '\0'; + } + + // If the given position is beyond any of included ranges, move to the EOF + // state - past the end of the included ranges. + else { + self->current_included_range_index = self->included_range_count; + TSRange *last_included_range = &self->included_ranges[self->included_range_count - 1]; + self->current_position = (Length) { + .bytes = last_included_range->end_byte, + .extent = last_included_range->end_point, + }; + ts_lexer__clear_chunk(self); + self->lookahead_size = 1; + self->data.lookahead = '\0'; + } +} + +void ts_lexer_set_input(Lexer *self, TSInput input) { + self->input = input; + ts_lexer__clear_chunk(self); + ts_lexer_goto(self, self->current_position); +} + +// Move the lexer to the given position. This doesn't do any work +// if the parser is already at the given position. +void ts_lexer_reset(Lexer *self, Length position) { + if (position.bytes != self->current_position.bytes) { + ts_lexer_goto(self, position); + } +} + +void ts_lexer_start(Lexer *self) { + self->token_start_position = self->current_position; + self->token_end_position = LENGTH_UNDEFINED; + self->data.result_symbol = 0; + if (!ts_lexer__eof(&self->data)) { + if (!self->chunk_size) ts_lexer__get_chunk(self); + if (!self->lookahead_size) ts_lexer__get_lookahead(self); + if ( + self->current_position.bytes == 0 && + self->data.lookahead == BYTE_ORDER_MARK + ) ts_lexer__advance(&self->data, true); + } +} + +void ts_lexer_finish(Lexer *self, uint32_t *lookahead_end_byte) { + if (length_is_undefined(self->token_end_position)) { + ts_lexer__mark_end(&self->data); + } + + uint32_t current_lookahead_end_byte = self->current_position.bytes + 1; + + // In order to determine that a byte sequence is invalid UTF8 or UTF16, + // the character decoding algorithm may have looked at the following byte. + // Therefore, the next byte *after* the current (invalid) character + // affects the interpretation of the current character. + if (self->data.lookahead == TS_DECODE_ERROR) { + current_lookahead_end_byte++; + } + + if (current_lookahead_end_byte > *lookahead_end_byte) { + *lookahead_end_byte = current_lookahead_end_byte; + } +} + +void ts_lexer_advance_to_end(Lexer *self) { + while (self->chunk) { + ts_lexer__advance(&self->data, false); + } +} + +void ts_lexer_mark_end(Lexer *self) { + ts_lexer__mark_end(&self->data); +} + +bool ts_lexer_set_included_ranges( + Lexer *self, + const TSRange *ranges, + uint32_t count +) { + if (count == 0 || !ranges) { + ranges = &DEFAULT_RANGE; + count = 1; + } else { + uint32_t previous_byte = 0; + for (unsigned i = 0; i < count; i++) { + const TSRange *range = &ranges[i]; + if ( + range->start_byte < previous_byte || + range->end_byte < range->start_byte + ) return false; + previous_byte = range->end_byte; + } + } + + size_t size = count * sizeof(TSRange); + self->included_ranges = ts_realloc(self->included_ranges, size); + memcpy(self->included_ranges, ranges, size); + self->included_range_count = count; + ts_lexer_goto(self, self->current_position); + return true; +} + +TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count) { + *count = self->included_range_count; + return self->included_ranges; +} + +#undef LOG diff --git a/third-party/tree-sitter/src/lexer.h b/third-party/tree-sitter/src/lexer.h new file mode 100644 index 00000000..5e392945 --- /dev/null +++ b/third-party/tree-sitter/src/lexer.h @@ -0,0 +1,48 @@ +#ifndef TREE_SITTER_LEXER_H_ +#define TREE_SITTER_LEXER_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./length.h" +#include "./subtree.h" +#include "tree_sitter/api.h" +#include "tree_sitter/parser.h" + +typedef struct { + TSLexer data; + Length current_position; + Length token_start_position; + Length token_end_position; + + TSRange *included_ranges; + size_t included_range_count; + size_t current_included_range_index; + + const char *chunk; + uint32_t chunk_start; + uint32_t chunk_size; + uint32_t lookahead_size; + + TSInput input; + TSLogger logger; + char debug_buffer[TREE_SITTER_SERIALIZATION_BUFFER_SIZE]; +} Lexer; + +void ts_lexer_init(Lexer *); +void ts_lexer_delete(Lexer *); +void ts_lexer_set_input(Lexer *, TSInput); +void ts_lexer_reset(Lexer *, Length); +void ts_lexer_start(Lexer *); +void ts_lexer_finish(Lexer *, uint32_t *); +void ts_lexer_advance_to_end(Lexer *); +void ts_lexer_mark_end(Lexer *); +bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count); +TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_LEXER_H_ diff --git a/third-party/tree-sitter/src/node.c b/third-party/tree-sitter/src/node.c new file mode 100644 index 00000000..8498f9c5 --- /dev/null +++ b/third-party/tree-sitter/src/node.c @@ -0,0 +1,683 @@ +#include +#include "./subtree.h" +#include "./tree.h" +#include "./language.h" + +typedef struct { + Subtree parent; + const TSTree *tree; + Length position; + uint32_t child_index; + uint32_t structural_child_index; + const TSSymbol *alias_sequence; +} NodeChildIterator; + +// TSNode - constructors + +TSNode ts_node_new( + const TSTree *tree, + const Subtree *subtree, + Length position, + TSSymbol alias +) { + return (TSNode) { + {position.bytes, position.extent.row, position.extent.column, alias}, + subtree, + tree, + }; +} + +static inline TSNode ts_node__null(void) { + return ts_node_new(NULL, NULL, length_zero(), 0); +} + +// TSNode - accessors + +uint32_t ts_node_start_byte(TSNode self) { + return self.context[0]; +} + +TSPoint ts_node_start_point(TSNode self) { + return (TSPoint) {self.context[1], self.context[2]}; +} + +static inline uint32_t ts_node__alias(const TSNode *self) { + return self->context[3]; +} + +static inline Subtree ts_node__subtree(TSNode self) { + return *(const Subtree *)self.id; +} + +// NodeChildIterator + +static inline NodeChildIterator ts_node_iterate_children(const TSNode *node) { + Subtree subtree = ts_node__subtree(*node); + if (ts_subtree_child_count(subtree) == 0) { + return (NodeChildIterator) {NULL_SUBTREE, node->tree, length_zero(), 0, 0, NULL}; + } + const TSSymbol *alias_sequence = ts_language_alias_sequence( + node->tree->language, + subtree.ptr->production_id + ); + return (NodeChildIterator) { + .tree = node->tree, + .parent = subtree, + .position = {ts_node_start_byte(*node), ts_node_start_point(*node)}, + .child_index = 0, + .structural_child_index = 0, + .alias_sequence = alias_sequence, + }; +} + +static inline bool ts_node_child_iterator_done(NodeChildIterator *self) { + return self->child_index == self->parent.ptr->child_count; +} + +static inline bool ts_node_child_iterator_next( + NodeChildIterator *self, + TSNode *result +) { + if (!self->parent.ptr || ts_node_child_iterator_done(self)) return false; + const Subtree *child = &ts_subtree_children(self->parent)[self->child_index]; + TSSymbol alias_symbol = 0; + if (!ts_subtree_extra(*child)) { + if (self->alias_sequence) { + alias_symbol = self->alias_sequence[self->structural_child_index]; + } + self->structural_child_index++; + } + if (self->child_index > 0) { + self->position = length_add(self->position, ts_subtree_padding(*child)); + } + *result = ts_node_new( + self->tree, + child, + self->position, + alias_symbol + ); + self->position = length_add(self->position, ts_subtree_size(*child)); + self->child_index++; + return true; +} + +// TSNode - private + +static inline bool ts_node__is_relevant(TSNode self, bool include_anonymous) { + Subtree tree = ts_node__subtree(self); + if (include_anonymous) { + return ts_subtree_visible(tree) || ts_node__alias(&self); + } else { + TSSymbol alias = ts_node__alias(&self); + if (alias) { + return ts_language_symbol_metadata(self.tree->language, alias).named; + } else { + return ts_subtree_visible(tree) && ts_subtree_named(tree); + } + } +} + +static inline uint32_t ts_node__relevant_child_count( + TSNode self, + bool include_anonymous +) { + Subtree tree = ts_node__subtree(self); + if (ts_subtree_child_count(tree) > 0) { + if (include_anonymous) { + return tree.ptr->visible_child_count; + } else { + return tree.ptr->named_child_count; + } + } else { + return 0; + } +} + +static inline TSNode ts_node__child( + TSNode self, + uint32_t child_index, + bool include_anonymous +) { + TSNode result = self; + bool did_descend = true; + + while (did_descend) { + did_descend = false; + + TSNode child; + uint32_t index = 0; + NodeChildIterator iterator = ts_node_iterate_children(&result); + while (ts_node_child_iterator_next(&iterator, &child)) { + if (ts_node__is_relevant(child, include_anonymous)) { + if (index == child_index) { + if (ts_node__is_relevant(self, true)) { + ts_tree_set_cached_parent(self.tree, &child, &self); + } + return child; + } + index++; + } else { + uint32_t grandchild_index = child_index - index; + uint32_t grandchild_count = ts_node__relevant_child_count(child, include_anonymous); + if (grandchild_index < grandchild_count) { + did_descend = true; + result = child; + child_index = grandchild_index; + break; + } + index += grandchild_count; + } + } + } + + return ts_node__null(); +} + +static bool ts_subtree_has_trailing_empty_descendant( + Subtree self, + Subtree other +) { + for (unsigned i = ts_subtree_child_count(self) - 1; i + 1 > 0; i--) { + Subtree child = ts_subtree_children(self)[i]; + if (ts_subtree_total_bytes(child) > 0) break; + if (child.ptr == other.ptr || ts_subtree_has_trailing_empty_descendant(child, other)) { + return true; + } + } + return false; +} + +static inline TSNode ts_node__prev_sibling(TSNode self, bool include_anonymous) { + Subtree self_subtree = ts_node__subtree(self); + bool self_is_empty = ts_subtree_total_bytes(self_subtree) == 0; + uint32_t target_end_byte = ts_node_end_byte(self); + + TSNode node = ts_node_parent(self); + TSNode earlier_node = ts_node__null(); + bool earlier_node_is_relevant = false; + + while (!ts_node_is_null(node)) { + TSNode earlier_child = ts_node__null(); + bool earlier_child_is_relevant = false; + bool found_child_containing_target = false; + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + if (child.id == self.id) break; + if (iterator.position.bytes > target_end_byte) { + found_child_containing_target = true; + break; + } + + if (iterator.position.bytes == target_end_byte && + (!self_is_empty || + ts_subtree_has_trailing_empty_descendant(ts_node__subtree(child), self_subtree))) { + found_child_containing_target = true; + break; + } + + if (ts_node__is_relevant(child, include_anonymous)) { + earlier_child = child; + earlier_child_is_relevant = true; + } else if (ts_node__relevant_child_count(child, include_anonymous) > 0) { + earlier_child = child; + earlier_child_is_relevant = false; + } + } + + if (found_child_containing_target) { + if (!ts_node_is_null(earlier_child)) { + earlier_node = earlier_child; + earlier_node_is_relevant = earlier_child_is_relevant; + } + node = child; + } else if (earlier_child_is_relevant) { + return earlier_child; + } else if (!ts_node_is_null(earlier_child)) { + node = earlier_child; + } else if (earlier_node_is_relevant) { + return earlier_node; + } else { + node = earlier_node; + } + } + + return ts_node__null(); +} + +static inline TSNode ts_node__next_sibling(TSNode self, bool include_anonymous) { + uint32_t target_end_byte = ts_node_end_byte(self); + + TSNode node = ts_node_parent(self); + TSNode later_node = ts_node__null(); + bool later_node_is_relevant = false; + + while (!ts_node_is_null(node)) { + TSNode later_child = ts_node__null(); + bool later_child_is_relevant = false; + TSNode child_containing_target = ts_node__null(); + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + if (iterator.position.bytes < target_end_byte) continue; + if (ts_node_start_byte(child) <= ts_node_start_byte(self)) { + if (ts_node__subtree(child).ptr != ts_node__subtree(self).ptr) { + child_containing_target = child; + } + } else if (ts_node__is_relevant(child, include_anonymous)) { + later_child = child; + later_child_is_relevant = true; + break; + } else if (ts_node__relevant_child_count(child, include_anonymous) > 0) { + later_child = child; + later_child_is_relevant = false; + break; + } + } + + if (!ts_node_is_null(child_containing_target)) { + if (!ts_node_is_null(later_child)) { + later_node = later_child; + later_node_is_relevant = later_child_is_relevant; + } + node = child_containing_target; + } else if (later_child_is_relevant) { + return later_child; + } else if (!ts_node_is_null(later_child)) { + node = later_child; + } else if (later_node_is_relevant) { + return later_node; + } else { + node = later_node; + } + } + + return ts_node__null(); +} + +static inline TSNode ts_node__first_child_for_byte( + TSNode self, + uint32_t goal, + bool include_anonymous +) { + TSNode node = self; + bool did_descend = true; + + while (did_descend) { + did_descend = false; + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + if (ts_node_end_byte(child) > goal) { + if (ts_node__is_relevant(child, include_anonymous)) { + return child; + } else if (ts_node_child_count(child) > 0) { + did_descend = true; + node = child; + break; + } + } + } + } + + return ts_node__null(); +} + +static inline TSNode ts_node__descendant_for_byte_range( + TSNode self, + uint32_t range_start, + uint32_t range_end, + bool include_anonymous +) { + TSNode node = self; + TSNode last_visible_node = self; + + bool did_descend = true; + while (did_descend) { + did_descend = false; + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + uint32_t node_end = iterator.position.bytes; + + // The end of this node must extend far enough forward to touch + // the end of the range and exceed the start of the range. + if (node_end < range_end) continue; + if (node_end <= range_start) continue; + + // The start of this node must extend far enough backward to + // touch the start of the range. + if (range_start < ts_node_start_byte(child)) break; + + node = child; + if (ts_node__is_relevant(node, include_anonymous)) { + ts_tree_set_cached_parent(self.tree, &child, &last_visible_node); + last_visible_node = node; + } + did_descend = true; + break; + } + } + + return last_visible_node; +} + +static inline TSNode ts_node__descendant_for_point_range( + TSNode self, + TSPoint range_start, + TSPoint range_end, + bool include_anonymous +) { + TSNode node = self; + TSNode last_visible_node = self; + + bool did_descend = true; + while (did_descend) { + did_descend = false; + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + TSPoint node_end = iterator.position.extent; + + // The end of this node must extend far enough forward to touch + // the end of the range and exceed the start of the range. + if (point_lt(node_end, range_end)) continue; + if (point_lte(node_end, range_start)) continue; + + // The start of this node must extend far enough backward to + // touch the start of the range. + if (point_lt(range_start, ts_node_start_point(child))) break; + + node = child; + if (ts_node__is_relevant(node, include_anonymous)) { + ts_tree_set_cached_parent(self.tree, &child, &last_visible_node); + last_visible_node = node; + } + did_descend = true; + break; + } + } + + return last_visible_node; +} + +// TSNode - public + +uint32_t ts_node_end_byte(TSNode self) { + return ts_node_start_byte(self) + ts_subtree_size(ts_node__subtree(self)).bytes; +} + +TSPoint ts_node_end_point(TSNode self) { + return point_add(ts_node_start_point(self), ts_subtree_size(ts_node__subtree(self)).extent); +} + +TSSymbol ts_node_symbol(TSNode self) { + TSSymbol symbol = ts_node__alias(&self); + if (!symbol) symbol = ts_subtree_symbol(ts_node__subtree(self)); + return ts_language_public_symbol(self.tree->language, symbol); +} + +const char *ts_node_type(TSNode self) { + TSSymbol symbol = ts_node__alias(&self); + if (!symbol) symbol = ts_subtree_symbol(ts_node__subtree(self)); + return ts_language_symbol_name(self.tree->language, symbol); +} + +char *ts_node_string(TSNode self) { + return ts_subtree_string(ts_node__subtree(self), self.tree->language, false); +} + +bool ts_node_eq(TSNode self, TSNode other) { + return self.tree == other.tree && self.id == other.id; +} + +bool ts_node_is_null(TSNode self) { + return self.id == 0; +} + +bool ts_node_is_extra(TSNode self) { + return ts_subtree_extra(ts_node__subtree(self)); +} + +bool ts_node_is_named(TSNode self) { + TSSymbol alias = ts_node__alias(&self); + return alias + ? ts_language_symbol_metadata(self.tree->language, alias).named + : ts_subtree_named(ts_node__subtree(self)); +} + +bool ts_node_is_missing(TSNode self) { + return ts_subtree_missing(ts_node__subtree(self)); +} + +bool ts_node_has_changes(TSNode self) { + return ts_subtree_has_changes(ts_node__subtree(self)); +} + +bool ts_node_has_error(TSNode self) { + return ts_subtree_error_cost(ts_node__subtree(self)) > 0; +} + +TSNode ts_node_parent(TSNode self) { + TSNode node = ts_tree_get_cached_parent(self.tree, &self); + if (node.id) return node; + + node = ts_tree_root_node(self.tree); + uint32_t end_byte = ts_node_end_byte(self); + if (node.id == self.id) return ts_node__null(); + + TSNode last_visible_node = node; + bool did_descend = true; + while (did_descend) { + did_descend = false; + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&node); + while (ts_node_child_iterator_next(&iterator, &child)) { + if ( + ts_node_start_byte(child) > ts_node_start_byte(self) || + child.id == self.id + ) break; + if (iterator.position.bytes >= end_byte) { + node = child; + if (ts_node__is_relevant(child, true)) { + ts_tree_set_cached_parent(self.tree, &node, &last_visible_node); + last_visible_node = node; + } + did_descend = true; + break; + } + } + } + + return last_visible_node; +} + +TSNode ts_node_child(TSNode self, uint32_t child_index) { + return ts_node__child(self, child_index, true); +} + +TSNode ts_node_named_child(TSNode self, uint32_t child_index) { + return ts_node__child(self, child_index, false); +} + +TSNode ts_node_child_by_field_id(TSNode self, TSFieldId field_id) { +recur: + if (!field_id || ts_node_child_count(self) == 0) return ts_node__null(); + + const TSFieldMapEntry *field_map, *field_map_end; + ts_language_field_map( + self.tree->language, + ts_node__subtree(self).ptr->production_id, + &field_map, + &field_map_end + ); + if (field_map == field_map_end) return ts_node__null(); + + // The field mappings are sorted by their field id. Scan all + // the mappings to find the ones for the given field id. + while (field_map->field_id < field_id) { + field_map++; + if (field_map == field_map_end) return ts_node__null(); + } + while (field_map_end[-1].field_id > field_id) { + field_map_end--; + if (field_map == field_map_end) return ts_node__null(); + } + + TSNode child; + NodeChildIterator iterator = ts_node_iterate_children(&self); + while (ts_node_child_iterator_next(&iterator, &child)) { + if (!ts_subtree_extra(ts_node__subtree(child))) { + uint32_t index = iterator.structural_child_index - 1; + if (index < field_map->child_index) continue; + + // Hidden nodes' fields are "inherited" by their visible parent. + if (field_map->inherited) { + + // If this is the *last* possible child node for this field, + // then perform a tail call to avoid recursion. + if (field_map + 1 == field_map_end) { + self = child; + goto recur; + } + + // Otherwise, descend into this child, but if it doesn't contain + // the field, continue searching subsequent children. + else { + TSNode result = ts_node_child_by_field_id(child, field_id); + if (result.id) return result; + field_map++; + if (field_map == field_map_end) return ts_node__null(); + } + } + + else if (ts_node__is_relevant(child, true)) { + return child; + } + + // If the field refers to a hidden node with visible children, + // return the first visible child. + else if (ts_node_child_count(child) > 0 ) { + return ts_node_child(child, 0); + } + + // Otherwise, continue searching subsequent children. + else { + field_map++; + if (field_map == field_map_end) return ts_node__null(); + } + } + } + + return ts_node__null(); +} + +TSNode ts_node_child_by_field_name( + TSNode self, + const char *name, + uint32_t name_length +) { + TSFieldId field_id = ts_language_field_id_for_name( + self.tree->language, + name, + name_length + ); + return ts_node_child_by_field_id(self, field_id); +} + +uint32_t ts_node_child_count(TSNode self) { + Subtree tree = ts_node__subtree(self); + if (ts_subtree_child_count(tree) > 0) { + return tree.ptr->visible_child_count; + } else { + return 0; + } +} + +uint32_t ts_node_named_child_count(TSNode self) { + Subtree tree = ts_node__subtree(self); + if (ts_subtree_child_count(tree) > 0) { + return tree.ptr->named_child_count; + } else { + return 0; + } +} + +TSNode ts_node_next_sibling(TSNode self) { + return ts_node__next_sibling(self, true); +} + +TSNode ts_node_next_named_sibling(TSNode self) { + return ts_node__next_sibling(self, false); +} + +TSNode ts_node_prev_sibling(TSNode self) { + return ts_node__prev_sibling(self, true); +} + +TSNode ts_node_prev_named_sibling(TSNode self) { + return ts_node__prev_sibling(self, false); +} + +TSNode ts_node_first_child_for_byte(TSNode self, uint32_t byte) { + return ts_node__first_child_for_byte(self, byte, true); +} + +TSNode ts_node_first_named_child_for_byte(TSNode self, uint32_t byte) { + return ts_node__first_child_for_byte(self, byte, false); +} + +TSNode ts_node_descendant_for_byte_range( + TSNode self, + uint32_t start, + uint32_t end +) { + return ts_node__descendant_for_byte_range(self, start, end, true); +} + +TSNode ts_node_named_descendant_for_byte_range( + TSNode self, + uint32_t start, + uint32_t end +) { + return ts_node__descendant_for_byte_range(self, start, end, false); +} + +TSNode ts_node_descendant_for_point_range( + TSNode self, + TSPoint start, + TSPoint end +) { + return ts_node__descendant_for_point_range(self, start, end, true); +} + +TSNode ts_node_named_descendant_for_point_range( + TSNode self, + TSPoint start, + TSPoint end +) { + return ts_node__descendant_for_point_range(self, start, end, false); +} + +void ts_node_edit(TSNode *self, const TSInputEdit *edit) { + uint32_t start_byte = ts_node_start_byte(*self); + TSPoint start_point = ts_node_start_point(*self); + + if (start_byte >= edit->old_end_byte) { + start_byte = edit->new_end_byte + (start_byte - edit->old_end_byte); + start_point = point_add(edit->new_end_point, point_sub(start_point, edit->old_end_point)); + } else if (start_byte > edit->start_byte) { + start_byte = edit->new_end_byte; + start_point = edit->new_end_point; + } + + self->context[0] = start_byte; + self->context[1] = start_point.row; + self->context[2] = start_point.column; +} diff --git a/third-party/tree-sitter/src/parser.c b/third-party/tree-sitter/src/parser.c new file mode 100644 index 00000000..e9d87ac9 --- /dev/null +++ b/third-party/tree-sitter/src/parser.c @@ -0,0 +1,1951 @@ +#include +#include +#include +#include +#include +#include "tree_sitter/api.h" +#include "./alloc.h" +#include "./array.h" +#include "./atomic.h" +#include "./clock.h" +#include "./error_costs.h" +#include "./get_changed_ranges.h" +#include "./language.h" +#include "./length.h" +#include "./lexer.h" +#include "./reduce_action.h" +#include "./reusable_node.h" +#include "./stack.h" +#include "./subtree.h" +#include "./tree.h" + +#define LOG(...) \ + if (self->lexer.logger.log || self->dot_graph_file) { \ + snprintf(self->lexer.debug_buffer, TREE_SITTER_SERIALIZATION_BUFFER_SIZE, __VA_ARGS__); \ + ts_parser__log(self); \ + } + +#define LOG_LOOKAHEAD(symbol_name, size) \ + if (self->lexer.logger.log || self->dot_graph_file) { \ + char *buf = self->lexer.debug_buffer; \ + const char *symbol = symbol_name; \ + int off = sprintf(buf, "lexed_lookahead sym:"); \ + for ( \ + int i = 0; \ + symbol[i] != '\0' \ + && off < TREE_SITTER_SERIALIZATION_BUFFER_SIZE; \ + i++ \ + ) { \ + switch (symbol[i]) { \ + case '\t': buf[off++] = '\\'; buf[off++] = 't'; break; \ + case '\n': buf[off++] = '\\'; buf[off++] = 'n'; break; \ + case '\v': buf[off++] = '\\'; buf[off++] = 'v'; break; \ + case '\f': buf[off++] = '\\'; buf[off++] = 'f'; break; \ + case '\r': buf[off++] = '\\'; buf[off++] = 'r'; break; \ + case '\\': buf[off++] = '\\'; buf[off++] = '\\'; break; \ + default: buf[off++] = symbol[i]; break; \ + } \ + } \ + snprintf( \ + buf + off, \ + TREE_SITTER_SERIALIZATION_BUFFER_SIZE - off, \ + ", size:%u", \ + size \ + ); \ + ts_parser__log(self); \ + } + +#define LOG_STACK() \ + if (self->dot_graph_file) { \ + ts_stack_print_dot_graph(self->stack, self->language, self->dot_graph_file); \ + fputs("\n\n", self->dot_graph_file); \ + } + +#define LOG_TREE(tree) \ + if (self->dot_graph_file) { \ + ts_subtree_print_dot_graph(tree, self->language, self->dot_graph_file); \ + fputs("\n", self->dot_graph_file); \ + } + +#define SYM_NAME(symbol) ts_language_symbol_name(self->language, symbol) + +#define TREE_NAME(tree) SYM_NAME(ts_subtree_symbol(tree)) + +static const unsigned MAX_VERSION_COUNT = 6; +static const unsigned MAX_VERSION_COUNT_OVERFLOW = 4; +static const unsigned MAX_SUMMARY_DEPTH = 16; +static const unsigned MAX_COST_DIFFERENCE = 16 * ERROR_COST_PER_SKIPPED_TREE; +static const unsigned OP_COUNT_PER_TIMEOUT_CHECK = 100; + +typedef struct { + Subtree token; + Subtree last_external_token; + uint32_t byte_index; +} TokenCache; + +struct TSParser { + Lexer lexer; + Stack *stack; + SubtreePool tree_pool; + const TSLanguage *language; + ReduceActionSet reduce_actions; + Subtree finished_tree; + SubtreeArray trailing_extras; + SubtreeArray trailing_extras2; + SubtreeArray scratch_trees; + TokenCache token_cache; + ReusableNode reusable_node; + void *external_scanner_payload; + FILE *dot_graph_file; + TSClock end_clock; + TSDuration timeout_duration; + unsigned accept_count; + unsigned operation_count; + const volatile size_t *cancellation_flag; + Subtree old_tree; + TSRangeArray included_range_differences; + unsigned included_range_difference_index; +}; + +typedef struct { + unsigned cost; + unsigned node_count; + int dynamic_precedence; + bool is_in_error; +} ErrorStatus; + +typedef enum { + ErrorComparisonTakeLeft, + ErrorComparisonPreferLeft, + ErrorComparisonNone, + ErrorComparisonPreferRight, + ErrorComparisonTakeRight, +} ErrorComparison; + +typedef struct { + const char *string; + uint32_t length; +} TSStringInput; + +// StringInput + +static const char *ts_string_input_read( + void *_self, + uint32_t byte, + TSPoint pt, + uint32_t *length +) { + (void)pt; + TSStringInput *self = (TSStringInput *)_self; + if (byte >= self->length) { + *length = 0; + return ""; + } else { + *length = self->length - byte; + return self->string + byte; + } +} + +// Parser - Private + +static void ts_parser__log(TSParser *self) { + if (self->lexer.logger.log) { + self->lexer.logger.log( + self->lexer.logger.payload, + TSLogTypeParse, + self->lexer.debug_buffer + ); + } + + if (self->dot_graph_file) { + fprintf(self->dot_graph_file, "graph {\nlabel=\""); + for (char *c = &self->lexer.debug_buffer[0]; *c != 0; c++) { + if (*c == '"') fputc('\\', self->dot_graph_file); + fputc(*c, self->dot_graph_file); + } + fprintf(self->dot_graph_file, "\"\n}\n\n"); + } +} + +static bool ts_parser__breakdown_top_of_stack( + TSParser *self, + StackVersion version +) { + bool did_break_down = false; + bool pending = false; + + do { + StackSliceArray pop = ts_stack_pop_pending(self->stack, version); + if (!pop.size) break; + + did_break_down = true; + pending = false; + for (uint32_t i = 0; i < pop.size; i++) { + StackSlice slice = pop.contents[i]; + TSStateId state = ts_stack_state(self->stack, slice.version); + Subtree parent = *array_front(&slice.subtrees); + + for (uint32_t j = 0, n = ts_subtree_child_count(parent); j < n; j++) { + Subtree child = ts_subtree_children(parent)[j]; + pending = ts_subtree_child_count(child) > 0; + + if (ts_subtree_is_error(child)) { + state = ERROR_STATE; + } else if (!ts_subtree_extra(child)) { + state = ts_language_next_state(self->language, state, ts_subtree_symbol(child)); + } + + ts_subtree_retain(child); + ts_stack_push(self->stack, slice.version, child, pending, state); + } + + for (uint32_t j = 1; j < slice.subtrees.size; j++) { + Subtree tree = slice.subtrees.contents[j]; + ts_stack_push(self->stack, slice.version, tree, false, state); + } + + ts_subtree_release(&self->tree_pool, parent); + array_delete(&slice.subtrees); + + LOG("breakdown_top_of_stack tree:%s", TREE_NAME(parent)); + LOG_STACK(); + } + } while (pending); + + return did_break_down; +} + +static void ts_parser__breakdown_lookahead( + TSParser *self, + Subtree *lookahead, + TSStateId state, + ReusableNode *reusable_node +) { + bool did_descend = false; + Subtree tree = reusable_node_tree(reusable_node); + while (ts_subtree_child_count(tree) > 0 && ts_subtree_parse_state(tree) != state) { + LOG("state_mismatch sym:%s", TREE_NAME(tree)); + reusable_node_descend(reusable_node); + tree = reusable_node_tree(reusable_node); + did_descend = true; + } + + if (did_descend) { + ts_subtree_release(&self->tree_pool, *lookahead); + *lookahead = tree; + ts_subtree_retain(*lookahead); + } +} + +static ErrorComparison ts_parser__compare_versions( + TSParser *self, + ErrorStatus a, + ErrorStatus b +) { + (void)self; + if (!a.is_in_error && b.is_in_error) { + if (a.cost < b.cost) { + return ErrorComparisonTakeLeft; + } else { + return ErrorComparisonPreferLeft; + } + } + + if (a.is_in_error && !b.is_in_error) { + if (b.cost < a.cost) { + return ErrorComparisonTakeRight; + } else { + return ErrorComparisonPreferRight; + } + } + + if (a.cost < b.cost) { + if ((b.cost - a.cost) * (1 + a.node_count) > MAX_COST_DIFFERENCE) { + return ErrorComparisonTakeLeft; + } else { + return ErrorComparisonPreferLeft; + } + } + + if (b.cost < a.cost) { + if ((a.cost - b.cost) * (1 + b.node_count) > MAX_COST_DIFFERENCE) { + return ErrorComparisonTakeRight; + } else { + return ErrorComparisonPreferRight; + } + } + + if (a.dynamic_precedence > b.dynamic_precedence) return ErrorComparisonPreferLeft; + if (b.dynamic_precedence > a.dynamic_precedence) return ErrorComparisonPreferRight; + return ErrorComparisonNone; +} + +static ErrorStatus ts_parser__version_status( + TSParser *self, + StackVersion version +) { + unsigned cost = ts_stack_error_cost(self->stack, version); + bool is_paused = ts_stack_is_paused(self->stack, version); + if (is_paused) cost += ERROR_COST_PER_SKIPPED_TREE; + return (ErrorStatus) { + .cost = cost, + .node_count = ts_stack_node_count_since_error(self->stack, version), + .dynamic_precedence = ts_stack_dynamic_precedence(self->stack, version), + .is_in_error = is_paused || ts_stack_state(self->stack, version) == ERROR_STATE + }; +} + +static bool ts_parser__better_version_exists( + TSParser *self, + StackVersion version, + bool is_in_error, + unsigned cost +) { + if (self->finished_tree.ptr && ts_subtree_error_cost(self->finished_tree) <= cost) { + return true; + } + + Length position = ts_stack_position(self->stack, version); + ErrorStatus status = { + .cost = cost, + .is_in_error = is_in_error, + .dynamic_precedence = ts_stack_dynamic_precedence(self->stack, version), + .node_count = ts_stack_node_count_since_error(self->stack, version), + }; + + for (StackVersion i = 0, n = ts_stack_version_count(self->stack); i < n; i++) { + if (i == version || + !ts_stack_is_active(self->stack, i) || + ts_stack_position(self->stack, i).bytes < position.bytes) continue; + ErrorStatus status_i = ts_parser__version_status(self, i); + switch (ts_parser__compare_versions(self, status, status_i)) { + case ErrorComparisonTakeRight: + return true; + case ErrorComparisonPreferRight: + if (ts_stack_can_merge(self->stack, i, version)) return true; + break; + default: + break; + } + } + + return false; +} + +static void ts_parser__restore_external_scanner( + TSParser *self, + Subtree external_token +) { + if (external_token.ptr) { + self->language->external_scanner.deserialize( + self->external_scanner_payload, + ts_external_scanner_state_data(&external_token.ptr->external_scanner_state), + external_token.ptr->external_scanner_state.length + ); + } else { + self->language->external_scanner.deserialize(self->external_scanner_payload, NULL, 0); + } +} + +static bool ts_parser__can_reuse_first_leaf( + TSParser *self, + TSStateId state, + Subtree tree, + TableEntry *table_entry +) { + TSLexMode current_lex_mode = self->language->lex_modes[state]; + TSSymbol leaf_symbol = ts_subtree_leaf_symbol(tree); + TSStateId leaf_state = ts_subtree_leaf_parse_state(tree); + TSLexMode leaf_lex_mode = self->language->lex_modes[leaf_state]; + + // At the end of a non-terminal extra node, the lexer normally returns + // NULL, which indicates that the parser should look for a reduce action + // at symbol `0`. Avoid reusing tokens in this situation to ensure that + // the same thing happens when incrementally reparsing. + if (current_lex_mode.lex_state == (uint16_t)(-1)) return false; + + // If the token was created in a state with the same set of lookaheads, it is reusable. + if ( + table_entry->action_count > 0 && + memcmp(&leaf_lex_mode, ¤t_lex_mode, sizeof(TSLexMode)) == 0 && + ( + leaf_symbol != self->language->keyword_capture_token || + (!ts_subtree_is_keyword(tree) && ts_subtree_parse_state(tree) == state) + ) + ) return true; + + // Empty tokens are not reusable in states with different lookaheads. + if (ts_subtree_size(tree).bytes == 0 && leaf_symbol != ts_builtin_sym_end) return false; + + // If the current state allows external tokens or other tokens that conflict with this + // token, this token is not reusable. + return current_lex_mode.external_lex_state == 0 && table_entry->is_reusable; +} + +static Subtree ts_parser__lex( + TSParser *self, + StackVersion version, + TSStateId parse_state +) { + TSLexMode lex_mode = self->language->lex_modes[parse_state]; + if (lex_mode.lex_state == (uint16_t)-1) { + LOG("no_lookahead_after_non_terminal_extra"); + return NULL_SUBTREE; + } + + Length start_position = ts_stack_position(self->stack, version); + Subtree external_token = ts_stack_last_external_token(self->stack, version); + const bool *valid_external_tokens = ts_language_enabled_external_tokens( + self->language, + lex_mode.external_lex_state + ); + + bool found_external_token = false; + bool error_mode = parse_state == ERROR_STATE; + bool skipped_error = false; + int32_t first_error_character = 0; + Length error_start_position = length_zero(); + Length error_end_position = length_zero(); + uint32_t lookahead_end_byte = 0; + ts_lexer_reset(&self->lexer, start_position); + + for (;;) { + Length current_position = self->lexer.current_position; + + if (valid_external_tokens) { + LOG( + "lex_external state:%d, row:%u, column:%u", + lex_mode.external_lex_state, + current_position.extent.row + 1, + current_position.extent.column + ); + ts_lexer_start(&self->lexer); + ts_parser__restore_external_scanner(self, external_token); + bool found_token = self->language->external_scanner.scan( + self->external_scanner_payload, + &self->lexer.data, + valid_external_tokens + ); + ts_lexer_finish(&self->lexer, &lookahead_end_byte); + + // Zero-length external tokens are generally allowed, but they're not + // allowed right after a syntax error. This is for two reasons: + // 1. After a syntax error, the lexer is looking for any possible token, + // as opposed to the specific set of tokens that are valid in some + // parse state. In this situation, it's very easy for an external + // scanner to produce unwanted zero-length tokens. + // 2. The parser sometimes inserts *missing* tokens to recover from + // errors. These tokens are also zero-length. If we allow more + // zero-length tokens to be created after missing tokens, it + // can lead to infinite loops. Forbidding zero-length tokens + // right at the point of error recovery is a conservative strategy + // for preventing this kind of infinite loop. + if (found_token && ( + self->lexer.token_end_position.bytes > current_position.bytes || + (!error_mode && ts_stack_has_advanced_since_error(self->stack, version)) + )) { + found_external_token = true; + break; + } + + ts_lexer_reset(&self->lexer, current_position); + } + + LOG( + "lex_internal state:%d, row:%u, column:%u", + lex_mode.lex_state, + current_position.extent.row + 1, + current_position.extent.column + ); + ts_lexer_start(&self->lexer); + bool found_token = self->language->lex_fn(&self->lexer.data, lex_mode.lex_state); + ts_lexer_finish(&self->lexer, &lookahead_end_byte); + if (found_token) break; + + if (!error_mode) { + error_mode = true; + lex_mode = self->language->lex_modes[ERROR_STATE]; + valid_external_tokens = ts_language_enabled_external_tokens( + self->language, + lex_mode.external_lex_state + ); + ts_lexer_reset(&self->lexer, start_position); + continue; + } + + if (!skipped_error) { + LOG("skip_unrecognized_character"); + skipped_error = true; + error_start_position = self->lexer.token_start_position; + error_end_position = self->lexer.token_start_position; + first_error_character = self->lexer.data.lookahead; + } + + if (self->lexer.current_position.bytes == error_end_position.bytes) { + if (self->lexer.data.eof(&self->lexer.data)) { + self->lexer.data.result_symbol = ts_builtin_sym_error; + break; + } + self->lexer.data.advance(&self->lexer.data, false); + } + + error_end_position = self->lexer.current_position; + } + + Subtree result; + if (skipped_error) { + Length padding = length_sub(error_start_position, start_position); + Length size = length_sub(error_end_position, error_start_position); + uint32_t lookahead_bytes = lookahead_end_byte - error_end_position.bytes; + result = ts_subtree_new_error( + &self->tree_pool, + first_error_character, + padding, + size, + lookahead_bytes, + parse_state, + self->language + ); + + LOG_LOOKAHEAD( + SYM_NAME(ts_subtree_symbol(result)), + ts_subtree_total_size(result).bytes + ); + } else { + if (self->lexer.token_end_position.bytes < self->lexer.token_start_position.bytes) { + self->lexer.token_start_position = self->lexer.token_end_position; + } + + bool is_keyword = false; + TSSymbol symbol = self->lexer.data.result_symbol; + Length padding = length_sub(self->lexer.token_start_position, start_position); + Length size = length_sub(self->lexer.token_end_position, self->lexer.token_start_position); + uint32_t lookahead_bytes = lookahead_end_byte - self->lexer.token_end_position.bytes; + + if (found_external_token) { + symbol = self->language->external_scanner.symbol_map[symbol]; + } else if (symbol == self->language->keyword_capture_token && symbol != 0) { + uint32_t end_byte = self->lexer.token_end_position.bytes; + ts_lexer_reset(&self->lexer, self->lexer.token_start_position); + ts_lexer_start(&self->lexer); + if ( + self->language->keyword_lex_fn(&self->lexer.data, 0) && + self->lexer.token_end_position.bytes == end_byte && + ts_language_has_actions(self->language, parse_state, self->lexer.data.result_symbol) + ) { + is_keyword = true; + symbol = self->lexer.data.result_symbol; + } + } + + result = ts_subtree_new_leaf( + &self->tree_pool, + symbol, + padding, + size, + lookahead_bytes, + parse_state, + found_external_token, + is_keyword, + self->language + ); + + if (found_external_token) { + unsigned length = self->language->external_scanner.serialize( + self->external_scanner_payload, + self->lexer.debug_buffer + ); + ts_external_scanner_state_init( + &((SubtreeHeapData *)result.ptr)->external_scanner_state, + self->lexer.debug_buffer, + length + ); + } + + LOG_LOOKAHEAD( + SYM_NAME(ts_subtree_symbol(result)), + ts_subtree_total_size(result).bytes + ); + } + + return result; +} + +static Subtree ts_parser__get_cached_token( + TSParser *self, + TSStateId state, + size_t position, + Subtree last_external_token, + TableEntry *table_entry +) { + TokenCache *cache = &self->token_cache; + if ( + cache->token.ptr && cache->byte_index == position && + ts_subtree_external_scanner_state_eq(cache->last_external_token, last_external_token) + ) { + ts_language_table_entry(self->language, state, ts_subtree_symbol(cache->token), table_entry); + if (ts_parser__can_reuse_first_leaf(self, state, cache->token, table_entry)) { + ts_subtree_retain(cache->token); + return cache->token; + } + } + return NULL_SUBTREE; +} + +static void ts_parser__set_cached_token( + TSParser *self, + size_t byte_index, + Subtree last_external_token, + Subtree token +) { + TokenCache *cache = &self->token_cache; + if (token.ptr) ts_subtree_retain(token); + if (last_external_token.ptr) ts_subtree_retain(last_external_token); + if (cache->token.ptr) ts_subtree_release(&self->tree_pool, cache->token); + if (cache->last_external_token.ptr) ts_subtree_release(&self->tree_pool, cache->last_external_token); + cache->token = token; + cache->byte_index = byte_index; + cache->last_external_token = last_external_token; +} + +static bool ts_parser__has_included_range_difference( + const TSParser *self, + uint32_t start_position, + uint32_t end_position +) { + return ts_range_array_intersects( + &self->included_range_differences, + self->included_range_difference_index, + start_position, + end_position + ); +} + +static Subtree ts_parser__reuse_node( + TSParser *self, + StackVersion version, + TSStateId *state, + uint32_t position, + Subtree last_external_token, + TableEntry *table_entry +) { + Subtree result; + while ((result = reusable_node_tree(&self->reusable_node)).ptr) { + uint32_t byte_offset = reusable_node_byte_offset(&self->reusable_node); + uint32_t end_byte_offset = byte_offset + ts_subtree_total_bytes(result); + + // Do not reuse an EOF node if the included ranges array has changes + // later on in the file. + if (ts_subtree_is_eof(result)) end_byte_offset = UINT32_MAX; + + if (byte_offset > position) { + LOG("before_reusable_node symbol:%s", TREE_NAME(result)); + break; + } + + if (byte_offset < position) { + LOG("past_reusable_node symbol:%s", TREE_NAME(result)); + if (end_byte_offset <= position || !reusable_node_descend(&self->reusable_node)) { + reusable_node_advance(&self->reusable_node); + } + continue; + } + + if (!ts_subtree_external_scanner_state_eq(self->reusable_node.last_external_token, last_external_token)) { + LOG("reusable_node_has_different_external_scanner_state symbol:%s", TREE_NAME(result)); + reusable_node_advance(&self->reusable_node); + continue; + } + + const char *reason = NULL; + if (ts_subtree_has_changes(result)) { + reason = "has_changes"; + } else if (ts_subtree_is_error(result)) { + reason = "is_error"; + } else if (ts_subtree_missing(result)) { + reason = "is_missing"; + } else if (ts_subtree_is_fragile(result)) { + reason = "is_fragile"; + } else if (ts_parser__has_included_range_difference(self, byte_offset, end_byte_offset)) { + reason = "contains_different_included_range"; + } + + if (reason) { + LOG("cant_reuse_node_%s tree:%s", reason, TREE_NAME(result)); + if (!reusable_node_descend(&self->reusable_node)) { + reusable_node_advance(&self->reusable_node); + ts_parser__breakdown_top_of_stack(self, version); + *state = ts_stack_state(self->stack, version); + } + continue; + } + + TSSymbol leaf_symbol = ts_subtree_leaf_symbol(result); + ts_language_table_entry(self->language, *state, leaf_symbol, table_entry); + if (!ts_parser__can_reuse_first_leaf(self, *state, result, table_entry)) { + LOG( + "cant_reuse_node symbol:%s, first_leaf_symbol:%s", + TREE_NAME(result), + SYM_NAME(leaf_symbol) + ); + reusable_node_advance_past_leaf(&self->reusable_node); + break; + } + + LOG("reuse_node symbol:%s", TREE_NAME(result)); + ts_subtree_retain(result); + return result; + } + + return NULL_SUBTREE; +} + +// Determine if a given tree should be replaced by an alternative tree. +// +// The decision is based on the trees' error costs (if any), their dynamic precedence, +// and finally, as a default, by a recursive comparison of the trees' symbols. +static bool ts_parser__select_tree(TSParser *self, Subtree left, Subtree right) { + if (!left.ptr) return true; + if (!right.ptr) return false; + + if (ts_subtree_error_cost(right) < ts_subtree_error_cost(left)) { + LOG("select_smaller_error symbol:%s, over_symbol:%s", TREE_NAME(right), TREE_NAME(left)); + return true; + } + + if (ts_subtree_error_cost(left) < ts_subtree_error_cost(right)) { + LOG("select_smaller_error symbol:%s, over_symbol:%s", TREE_NAME(left), TREE_NAME(right)); + return false; + } + + if (ts_subtree_dynamic_precedence(right) > ts_subtree_dynamic_precedence(left)) { + LOG("select_higher_precedence symbol:%s, prec:%u, over_symbol:%s, other_prec:%u", + TREE_NAME(right), ts_subtree_dynamic_precedence(right), TREE_NAME(left), + ts_subtree_dynamic_precedence(left)); + return true; + } + + if (ts_subtree_dynamic_precedence(left) > ts_subtree_dynamic_precedence(right)) { + LOG("select_higher_precedence symbol:%s, prec:%u, over_symbol:%s, other_prec:%u", + TREE_NAME(left), ts_subtree_dynamic_precedence(left), TREE_NAME(right), + ts_subtree_dynamic_precedence(right)); + return false; + } + + if (ts_subtree_error_cost(left) > 0) return true; + + int comparison = ts_subtree_compare(left, right); + switch (comparison) { + case -1: + LOG("select_earlier symbol:%s, over_symbol:%s", TREE_NAME(left), TREE_NAME(right)); + return false; + break; + case 1: + LOG("select_earlier symbol:%s, over_symbol:%s", TREE_NAME(right), TREE_NAME(left)); + return true; + default: + LOG("select_existing symbol:%s, over_symbol:%s", TREE_NAME(left), TREE_NAME(right)); + return false; + } +} + +// Determine if a given tree's children should be replaced by an alternative +// array of children. +static bool ts_parser__select_children( + TSParser *self, + Subtree left, + const SubtreeArray *children +) { + array_assign(&self->scratch_trees, children); + + // Create a temporary subtree using the scratch trees array. This node does + // not perform any allocation except for possibly growing the array to make + // room for its own heap data. The scratch tree is never explicitly released, + // so the same 'scratch trees' array can be reused again later. + MutableSubtree scratch_tree = ts_subtree_new_node( + ts_subtree_symbol(left), + &self->scratch_trees, + 0, + self->language + ); + + return ts_parser__select_tree( + self, + left, + ts_subtree_from_mut(scratch_tree) + ); +} + +static void ts_parser__shift( + TSParser *self, + StackVersion version, + TSStateId state, + Subtree lookahead, + bool extra +) { + Subtree subtree_to_push; + if (extra != ts_subtree_extra(lookahead)) { + MutableSubtree result = ts_subtree_make_mut(&self->tree_pool, lookahead); + ts_subtree_set_extra(&result); + subtree_to_push = ts_subtree_from_mut(result); + } else { + subtree_to_push = lookahead; + } + + bool is_pending = ts_subtree_child_count(subtree_to_push) > 0; + ts_stack_push(self->stack, version, subtree_to_push, is_pending, state); + if (ts_subtree_has_external_tokens(subtree_to_push)) { + ts_stack_set_last_external_token( + self->stack, version, ts_subtree_last_external_token(subtree_to_push) + ); + } +} + +static StackVersion ts_parser__reduce( + TSParser *self, + StackVersion version, + TSSymbol symbol, + uint32_t count, + int dynamic_precedence, + uint16_t production_id, + bool is_fragile, + bool end_of_non_terminal_extra +) { + uint32_t initial_version_count = ts_stack_version_count(self->stack); + + // Pop the given number of nodes from the given version of the parse stack. + // If stack versions have previously merged, then there may be more than one + // path back through the stack. For each path, create a new parent node to + // contain the popped children, and push it onto the stack in place of the + // children. + StackSliceArray pop = ts_stack_pop_count(self->stack, version, count); + uint32_t removed_version_count = 0; + for (uint32_t i = 0; i < pop.size; i++) { + StackSlice slice = pop.contents[i]; + StackVersion slice_version = slice.version - removed_version_count; + + // This is where new versions are added to the parse stack. The versions + // will all be sorted and truncated at the end of the outer parsing loop. + // Allow the maximum version count to be temporarily exceeded, but only + // by a limited threshold. + if (slice_version > MAX_VERSION_COUNT + MAX_VERSION_COUNT_OVERFLOW) { + ts_stack_remove_version(self->stack, slice_version); + ts_subtree_array_delete(&self->tree_pool, &slice.subtrees); + removed_version_count++; + while (i + 1 < pop.size) { + StackSlice next_slice = pop.contents[i + 1]; + if (next_slice.version != slice.version) break; + ts_subtree_array_delete(&self->tree_pool, &next_slice.subtrees); + i++; + } + continue; + } + + // Extra tokens on top of the stack should not be included in this new parent + // node. They will be re-pushed onto the stack after the parent node is + // created and pushed. + SubtreeArray children = slice.subtrees; + ts_subtree_array_remove_trailing_extras(&children, &self->trailing_extras); + + MutableSubtree parent = ts_subtree_new_node( + symbol, &children, production_id, self->language + ); + + // This pop operation may have caused multiple stack versions to collapse + // into one, because they all diverged from a common state. In that case, + // choose one of the arrays of trees to be the parent node's children, and + // delete the rest of the tree arrays. + while (i + 1 < pop.size) { + StackSlice next_slice = pop.contents[i + 1]; + if (next_slice.version != slice.version) break; + i++; + + SubtreeArray children = next_slice.subtrees; + ts_subtree_array_remove_trailing_extras(&children, &self->trailing_extras2); + + if (ts_parser__select_children( + self, + ts_subtree_from_mut(parent), + &children + )) { + ts_subtree_array_clear(&self->tree_pool, &self->trailing_extras); + ts_subtree_release(&self->tree_pool, ts_subtree_from_mut(parent)); + array_swap(&self->trailing_extras, &self->trailing_extras2); + parent = ts_subtree_new_node( + symbol, &children, production_id, self->language + ); + } else { + array_clear(&self->trailing_extras2); + ts_subtree_array_delete(&self->tree_pool, &next_slice.subtrees); + } + } + + TSStateId state = ts_stack_state(self->stack, slice_version); + TSStateId next_state = ts_language_next_state(self->language, state, symbol); + if (end_of_non_terminal_extra && next_state == state) { + parent.ptr->extra = true; + } + if (is_fragile || pop.size > 1 || initial_version_count > 1) { + parent.ptr->fragile_left = true; + parent.ptr->fragile_right = true; + parent.ptr->parse_state = TS_TREE_STATE_NONE; + } else { + parent.ptr->parse_state = state; + } + parent.ptr->dynamic_precedence += dynamic_precedence; + + // Push the parent node onto the stack, along with any extra tokens that + // were previously on top of the stack. + ts_stack_push(self->stack, slice_version, ts_subtree_from_mut(parent), false, next_state); + for (uint32_t j = 0; j < self->trailing_extras.size; j++) { + ts_stack_push(self->stack, slice_version, self->trailing_extras.contents[j], false, next_state); + } + + for (StackVersion j = 0; j < slice_version; j++) { + if (j == version) continue; + if (ts_stack_merge(self->stack, j, slice_version)) { + removed_version_count++; + break; + } + } + } + + // Return the first new stack version that was created. + return ts_stack_version_count(self->stack) > initial_version_count + ? initial_version_count + : STACK_VERSION_NONE; +} + +static void ts_parser__accept( + TSParser *self, + StackVersion version, + Subtree lookahead +) { + assert(ts_subtree_is_eof(lookahead)); + ts_stack_push(self->stack, version, lookahead, false, 1); + + StackSliceArray pop = ts_stack_pop_all(self->stack, version); + for (uint32_t i = 0; i < pop.size; i++) { + SubtreeArray trees = pop.contents[i].subtrees; + + Subtree root = NULL_SUBTREE; + for (uint32_t j = trees.size - 1; j + 1 > 0; j--) { + Subtree tree = trees.contents[j]; + if (!ts_subtree_extra(tree)) { + assert(!tree.data.is_inline); + uint32_t child_count = ts_subtree_child_count(tree); + const Subtree *children = ts_subtree_children(tree); + for (uint32_t k = 0; k < child_count; k++) { + ts_subtree_retain(children[k]); + } + array_splice(&trees, j, 1, child_count, children); + root = ts_subtree_from_mut(ts_subtree_new_node( + ts_subtree_symbol(tree), + &trees, + tree.ptr->production_id, + self->language + )); + ts_subtree_release(&self->tree_pool, tree); + break; + } + } + + assert(root.ptr); + self->accept_count++; + + if (self->finished_tree.ptr) { + if (ts_parser__select_tree(self, self->finished_tree, root)) { + ts_subtree_release(&self->tree_pool, self->finished_tree); + self->finished_tree = root; + } else { + ts_subtree_release(&self->tree_pool, root); + } + } else { + self->finished_tree = root; + } + } + + ts_stack_remove_version(self->stack, pop.contents[0].version); + ts_stack_halt(self->stack, version); +} + +static bool ts_parser__do_all_potential_reductions( + TSParser *self, + StackVersion starting_version, + TSSymbol lookahead_symbol +) { + uint32_t initial_version_count = ts_stack_version_count(self->stack); + + bool can_shift_lookahead_symbol = false; + StackVersion version = starting_version; + for (unsigned i = 0; true; i++) { + uint32_t version_count = ts_stack_version_count(self->stack); + if (version >= version_count) break; + + bool merged = false; + for (StackVersion i = initial_version_count; i < version; i++) { + if (ts_stack_merge(self->stack, i, version)) { + merged = true; + break; + } + } + if (merged) continue; + + TSStateId state = ts_stack_state(self->stack, version); + bool has_shift_action = false; + array_clear(&self->reduce_actions); + + TSSymbol first_symbol, end_symbol; + if (lookahead_symbol != 0) { + first_symbol = lookahead_symbol; + end_symbol = lookahead_symbol + 1; + } else { + first_symbol = 1; + end_symbol = self->language->token_count; + } + + for (TSSymbol symbol = first_symbol; symbol < end_symbol; symbol++) { + TableEntry entry; + ts_language_table_entry(self->language, state, symbol, &entry); + for (uint32_t i = 0; i < entry.action_count; i++) { + TSParseAction action = entry.actions[i]; + switch (action.type) { + case TSParseActionTypeShift: + case TSParseActionTypeRecover: + if (!action.params.shift.extra && !action.params.shift.repetition) has_shift_action = true; + break; + case TSParseActionTypeReduce: + if (action.params.reduce.child_count > 0) + ts_reduce_action_set_add(&self->reduce_actions, (ReduceAction){ + .symbol = action.params.reduce.symbol, + .count = action.params.reduce.child_count, + .dynamic_precedence = action.params.reduce.dynamic_precedence, + .production_id = action.params.reduce.production_id, + }); + break; + default: + break; + } + } + } + + StackVersion reduction_version = STACK_VERSION_NONE; + for (uint32_t i = 0; i < self->reduce_actions.size; i++) { + ReduceAction action = self->reduce_actions.contents[i]; + + reduction_version = ts_parser__reduce( + self, version, action.symbol, action.count, + action.dynamic_precedence, action.production_id, + true, false + ); + } + + if (has_shift_action) { + can_shift_lookahead_symbol = true; + } else if (reduction_version != STACK_VERSION_NONE && i < MAX_VERSION_COUNT) { + ts_stack_renumber_version(self->stack, reduction_version, version); + continue; + } else if (lookahead_symbol != 0) { + ts_stack_remove_version(self->stack, version); + } + + if (version == starting_version) { + version = version_count; + } else { + version++; + } + } + + return can_shift_lookahead_symbol; +} + +static void ts_parser__handle_error( + TSParser *self, + StackVersion version, + TSSymbol lookahead_symbol +) { + uint32_t previous_version_count = ts_stack_version_count(self->stack); + + // Perform any reductions that can happen in this state, regardless of the lookahead. After + // skipping one or more invalid tokens, the parser might find a token that would have allowed + // a reduction to take place. + ts_parser__do_all_potential_reductions(self, version, 0); + uint32_t version_count = ts_stack_version_count(self->stack); + Length position = ts_stack_position(self->stack, version); + + // Push a discontinuity onto the stack. Merge all of the stack versions that + // were created in the previous step. + bool did_insert_missing_token = false; + for (StackVersion v = version; v < version_count;) { + if (!did_insert_missing_token) { + TSStateId state = ts_stack_state(self->stack, v); + for (TSSymbol missing_symbol = 1; + missing_symbol < self->language->token_count; + missing_symbol++) { + TSStateId state_after_missing_symbol = ts_language_next_state( + self->language, state, missing_symbol + ); + if (state_after_missing_symbol == 0 || state_after_missing_symbol == state) { + continue; + } + + if (ts_language_has_reduce_action( + self->language, + state_after_missing_symbol, + lookahead_symbol + )) { + // In case the parser is currently outside of any included range, the lexer will + // snap to the beginning of the next included range. The missing token's padding + // must be assigned to position it within the next included range. + ts_lexer_reset(&self->lexer, position); + ts_lexer_mark_end(&self->lexer); + Length padding = length_sub(self->lexer.token_end_position, position); + + StackVersion version_with_missing_tree = ts_stack_copy_version(self->stack, v); + Subtree missing_tree = ts_subtree_new_missing_leaf( + &self->tree_pool, missing_symbol, padding, self->language + ); + ts_stack_push( + self->stack, version_with_missing_tree, + missing_tree, false, + state_after_missing_symbol + ); + + if (ts_parser__do_all_potential_reductions( + self, version_with_missing_tree, + lookahead_symbol + )) { + LOG( + "recover_with_missing symbol:%s, state:%u", + SYM_NAME(missing_symbol), + ts_stack_state(self->stack, version_with_missing_tree) + ); + did_insert_missing_token = true; + break; + } + } + } + } + + ts_stack_push(self->stack, v, NULL_SUBTREE, false, ERROR_STATE); + v = (v == version) ? previous_version_count : v + 1; + } + + for (unsigned i = previous_version_count; i < version_count; i++) { + bool did_merge = ts_stack_merge(self->stack, version, previous_version_count); + assert(did_merge); + } + + ts_stack_record_summary(self->stack, version, MAX_SUMMARY_DEPTH); + LOG_STACK(); +} + +static bool ts_parser__recover_to_state( + TSParser *self, + StackVersion version, + unsigned depth, + TSStateId goal_state +) { + StackSliceArray pop = ts_stack_pop_count(self->stack, version, depth); + StackVersion previous_version = STACK_VERSION_NONE; + + for (unsigned i = 0; i < pop.size; i++) { + StackSlice slice = pop.contents[i]; + + if (slice.version == previous_version) { + ts_subtree_array_delete(&self->tree_pool, &slice.subtrees); + array_erase(&pop, i--); + continue; + } + + if (ts_stack_state(self->stack, slice.version) != goal_state) { + ts_stack_halt(self->stack, slice.version); + ts_subtree_array_delete(&self->tree_pool, &slice.subtrees); + array_erase(&pop, i--); + continue; + } + + SubtreeArray error_trees = ts_stack_pop_error(self->stack, slice.version); + if (error_trees.size > 0) { + assert(error_trees.size == 1); + Subtree error_tree = error_trees.contents[0]; + uint32_t error_child_count = ts_subtree_child_count(error_tree); + if (error_child_count > 0) { + array_splice(&slice.subtrees, 0, 0, error_child_count, ts_subtree_children(error_tree)); + for (unsigned j = 0; j < error_child_count; j++) { + ts_subtree_retain(slice.subtrees.contents[j]); + } + } + ts_subtree_array_delete(&self->tree_pool, &error_trees); + } + + ts_subtree_array_remove_trailing_extras(&slice.subtrees, &self->trailing_extras); + + if (slice.subtrees.size > 0) { + Subtree error = ts_subtree_new_error_node(&slice.subtrees, true, self->language); + ts_stack_push(self->stack, slice.version, error, false, goal_state); + } else { + array_delete(&slice.subtrees); + } + + for (unsigned j = 0; j < self->trailing_extras.size; j++) { + Subtree tree = self->trailing_extras.contents[j]; + ts_stack_push(self->stack, slice.version, tree, false, goal_state); + } + + previous_version = slice.version; + } + + return previous_version != STACK_VERSION_NONE; +} + +static void ts_parser__recover( + TSParser *self, + StackVersion version, + Subtree lookahead +) { + bool did_recover = false; + unsigned previous_version_count = ts_stack_version_count(self->stack); + Length position = ts_stack_position(self->stack, version); + StackSummary *summary = ts_stack_get_summary(self->stack, version); + unsigned node_count_since_error = ts_stack_node_count_since_error(self->stack, version); + unsigned current_error_cost = ts_stack_error_cost(self->stack, version); + + // When the parser is in the error state, there are two strategies for recovering with a + // given lookahead token: + // 1. Find a previous state on the stack in which that lookahead token would be valid. Then, + // create a new stack version that is in that state again. This entails popping all of the + // subtrees that have been pushed onto the stack since that previous state, and wrapping + // them in an ERROR node. + // 2. Wrap the lookahead token in an ERROR node, push that ERROR node onto the stack, and + // move on to the next lookahead token, remaining in the error state. + // + // First, try the strategy 1. Upon entering the error state, the parser recorded a summary + // of the previous parse states and their depths. Look at each state in the summary, to see + // if the current lookahead token would be valid in that state. + if (summary && !ts_subtree_is_error(lookahead)) { + for (unsigned i = 0; i < summary->size; i++) { + StackSummaryEntry entry = summary->contents[i]; + + if (entry.state == ERROR_STATE) continue; + if (entry.position.bytes == position.bytes) continue; + unsigned depth = entry.depth; + if (node_count_since_error > 0) depth++; + + // Do not recover in ways that create redundant stack versions. + bool would_merge = false; + for (unsigned j = 0; j < previous_version_count; j++) { + if ( + ts_stack_state(self->stack, j) == entry.state && + ts_stack_position(self->stack, j).bytes == position.bytes + ) { + would_merge = true; + break; + } + } + if (would_merge) continue; + + // Do not recover if the result would clearly be worse than some existing stack version. + unsigned new_cost = + current_error_cost + + entry.depth * ERROR_COST_PER_SKIPPED_TREE + + (position.bytes - entry.position.bytes) * ERROR_COST_PER_SKIPPED_CHAR + + (position.extent.row - entry.position.extent.row) * ERROR_COST_PER_SKIPPED_LINE; + if (ts_parser__better_version_exists(self, version, false, new_cost)) break; + + // If the current lookahead token is valid in some previous state, recover to that state. + // Then stop looking for further recoveries. + if (ts_language_has_actions(self->language, entry.state, ts_subtree_symbol(lookahead))) { + if (ts_parser__recover_to_state(self, version, depth, entry.state)) { + did_recover = true; + LOG("recover_to_previous state:%u, depth:%u", entry.state, depth); + LOG_STACK(); + break; + } + } + } + } + + // In the process of attempting to recover, some stack versions may have been created + // and subsequently halted. Remove those versions. + for (unsigned i = previous_version_count; i < ts_stack_version_count(self->stack); i++) { + if (!ts_stack_is_active(self->stack, i)) { + ts_stack_remove_version(self->stack, i--); + } + } + + // If strategy 1 succeeded, a new stack version will have been created which is able to handle + // the current lookahead token. Now, in addition, try strategy 2 described above: skip the + // current lookahead token by wrapping it in an ERROR node. + + // Don't pursue this additional strategy if there are already too many stack versions. + if (did_recover && ts_stack_version_count(self->stack) > MAX_VERSION_COUNT) { + ts_stack_halt(self->stack, version); + ts_subtree_release(&self->tree_pool, lookahead); + return; + } + + // If the parser is still in the error state at the end of the file, just wrap everything + // in an ERROR node and terminate. + if (ts_subtree_is_eof(lookahead)) { + LOG("recover_eof"); + SubtreeArray children = array_new(); + Subtree parent = ts_subtree_new_error_node(&children, false, self->language); + ts_stack_push(self->stack, version, parent, false, 1); + ts_parser__accept(self, version, lookahead); + return; + } + + // Do not recover if the result would clearly be worse than some existing stack version. + unsigned new_cost = + current_error_cost + ERROR_COST_PER_SKIPPED_TREE + + ts_subtree_total_bytes(lookahead) * ERROR_COST_PER_SKIPPED_CHAR + + ts_subtree_total_size(lookahead).extent.row * ERROR_COST_PER_SKIPPED_LINE; + if (ts_parser__better_version_exists(self, version, false, new_cost)) { + ts_stack_halt(self->stack, version); + ts_subtree_release(&self->tree_pool, lookahead); + return; + } + + // If the current lookahead token is an extra token, mark it as extra. This means it won't + // be counted in error cost calculations. + unsigned n; + const TSParseAction *actions = ts_language_actions(self->language, 1, ts_subtree_symbol(lookahead), &n); + if (n > 0 && actions[n - 1].type == TSParseActionTypeShift && actions[n - 1].params.shift.extra) { + MutableSubtree mutable_lookahead = ts_subtree_make_mut(&self->tree_pool, lookahead); + ts_subtree_set_extra(&mutable_lookahead); + lookahead = ts_subtree_from_mut(mutable_lookahead); + } + + // Wrap the lookahead token in an ERROR. + LOG("skip_token symbol:%s", TREE_NAME(lookahead)); + SubtreeArray children = array_new(); + array_reserve(&children, 1); + array_push(&children, lookahead); + MutableSubtree error_repeat = ts_subtree_new_node( + ts_builtin_sym_error_repeat, + &children, + 0, + self->language + ); + + // If other tokens have already been skipped, so there is already an ERROR at the top of the + // stack, then pop that ERROR off the stack and wrap the two ERRORs together into one larger + // ERROR. + if (node_count_since_error > 0) { + StackSliceArray pop = ts_stack_pop_count(self->stack, version, 1); + + // TODO: Figure out how to make this condition occur. + // See https://github.com/atom/atom/issues/18450#issuecomment-439579778 + // If multiple stack versions have merged at this point, just pick one of the errors + // arbitrarily and discard the rest. + if (pop.size > 1) { + for (unsigned i = 1; i < pop.size; i++) { + ts_subtree_array_delete(&self->tree_pool, &pop.contents[i].subtrees); + } + while (ts_stack_version_count(self->stack) > pop.contents[0].version + 1) { + ts_stack_remove_version(self->stack, pop.contents[0].version + 1); + } + } + + ts_stack_renumber_version(self->stack, pop.contents[0].version, version); + array_push(&pop.contents[0].subtrees, ts_subtree_from_mut(error_repeat)); + error_repeat = ts_subtree_new_node( + ts_builtin_sym_error_repeat, + &pop.contents[0].subtrees, + 0, + self->language + ); + } + + // Push the new ERROR onto the stack. + ts_stack_push(self->stack, version, ts_subtree_from_mut(error_repeat), false, ERROR_STATE); + if (ts_subtree_has_external_tokens(lookahead)) { + ts_stack_set_last_external_token( + self->stack, version, ts_subtree_last_external_token(lookahead) + ); + } +} + +static bool ts_parser__advance( + TSParser *self, + StackVersion version, + bool allow_node_reuse +) { + TSStateId state = ts_stack_state(self->stack, version); + uint32_t position = ts_stack_position(self->stack, version).bytes; + Subtree last_external_token = ts_stack_last_external_token(self->stack, version); + + bool did_reuse = true; + Subtree lookahead = NULL_SUBTREE; + TableEntry table_entry = {.action_count = 0}; + + // If possible, reuse a node from the previous syntax tree. + if (allow_node_reuse) { + lookahead = ts_parser__reuse_node( + self, version, &state, position, last_external_token, &table_entry + ); + } + + // If no node from the previous syntax tree could be reused, then try to + // reuse the token previously returned by the lexer. + if (!lookahead.ptr) { + did_reuse = false; + lookahead = ts_parser__get_cached_token( + self, state, position, last_external_token, &table_entry + ); + } + + bool needs_lex = !lookahead.ptr; + for (;;) { + // Otherwise, re-run the lexer. + if (needs_lex) { + needs_lex = false; + lookahead = ts_parser__lex(self, version, state); + + if (lookahead.ptr) { + ts_parser__set_cached_token(self, position, last_external_token, lookahead); + ts_language_table_entry(self->language, state, ts_subtree_symbol(lookahead), &table_entry); + } + + // When parsing a non-terminal extra, a null lookahead indicates the + // end of the rule. The reduction is stored in the EOF table entry. + // After the reduction, the lexer needs to be run again. + else { + ts_language_table_entry(self->language, state, ts_builtin_sym_end, &table_entry); + } + } + + // If a cancellation flag or a timeout was provided, then check every + // time a fixed number of parse actions has been processed. + if (++self->operation_count == OP_COUNT_PER_TIMEOUT_CHECK) { + self->operation_count = 0; + } + if ( + self->operation_count == 0 && + ((self->cancellation_flag && atomic_load(self->cancellation_flag)) || + (!clock_is_null(self->end_clock) && clock_is_gt(clock_now(), self->end_clock))) + ) { + ts_subtree_release(&self->tree_pool, lookahead); + return false; + } + + // Process each parse action for the current lookahead token in + // the current state. If there are multiple actions, then this is + // an ambiguous state. REDUCE actions always create a new stack + // version, whereas SHIFT actions update the existing stack version + // and terminate this loop. + StackVersion last_reduction_version = STACK_VERSION_NONE; + for (uint32_t i = 0; i < table_entry.action_count; i++) { + TSParseAction action = table_entry.actions[i]; + + switch (action.type) { + case TSParseActionTypeShift: { + if (action.params.shift.repetition) break; + TSStateId next_state; + if (action.params.shift.extra) { + + // TODO: remove when TREE_SITTER_LANGUAGE_VERSION 9 is out. + if (state == ERROR_STATE) continue; + + next_state = state; + LOG("shift_extra"); + } else { + next_state = action.params.shift.state; + LOG("shift state:%u", next_state); + } + + if (ts_subtree_child_count(lookahead) > 0) { + ts_parser__breakdown_lookahead(self, &lookahead, state, &self->reusable_node); + next_state = ts_language_next_state(self->language, state, ts_subtree_symbol(lookahead)); + } + + ts_parser__shift(self, version, next_state, lookahead, action.params.shift.extra); + if (did_reuse) reusable_node_advance(&self->reusable_node); + return true; + } + + case TSParseActionTypeReduce: { + bool is_fragile = table_entry.action_count > 1; + bool end_of_non_terminal_extra = lookahead.ptr == NULL; + LOG("reduce sym:%s, child_count:%u", SYM_NAME(action.params.reduce.symbol), action.params.reduce.child_count); + StackVersion reduction_version = ts_parser__reduce( + self, version, action.params.reduce.symbol, action.params.reduce.child_count, + action.params.reduce.dynamic_precedence, action.params.reduce.production_id, + is_fragile, end_of_non_terminal_extra + ); + if (reduction_version != STACK_VERSION_NONE) { + last_reduction_version = reduction_version; + } + break; + } + + case TSParseActionTypeAccept: { + LOG("accept"); + ts_parser__accept(self, version, lookahead); + return true; + } + + case TSParseActionTypeRecover: { + if (ts_subtree_child_count(lookahead) > 0) { + ts_parser__breakdown_lookahead(self, &lookahead, ERROR_STATE, &self->reusable_node); + } + + ts_parser__recover(self, version, lookahead); + if (did_reuse) reusable_node_advance(&self->reusable_node); + return true; + } + } + } + + // If a reduction was performed, then replace the current stack version + // with one of the stack versions created by a reduction, and continue + // processing this version of the stack with the same lookahead symbol. + if (last_reduction_version != STACK_VERSION_NONE) { + ts_stack_renumber_version(self->stack, last_reduction_version, version); + LOG_STACK(); + state = ts_stack_state(self->stack, version); + + // At the end of a non-terminal extra rule, the lexer will return a + // null subtree, because the parser needs to perform a fixed reduction + // regardless of the lookahead node. After performing that reduction, + // (and completing the non-terminal extra rule) run the lexer again based + // on the current parse state. + if (!lookahead.ptr) { + needs_lex = true; + continue; + } + + ts_language_table_entry( + self->language, + state, + ts_subtree_leaf_symbol(lookahead), + &table_entry + ); + continue; + } + + if (!lookahead.ptr) { + ts_stack_pause(self->stack, version, ts_builtin_sym_end); + return true; + } + + // If there were no parse actions for the current lookahead token, then + // it is not valid in this state. If the current lookahead token is a + // keyword, then switch to treating it as the normal word token if that + // token is valid in this state. + if ( + ts_subtree_is_keyword(lookahead) && + ts_subtree_symbol(lookahead) != self->language->keyword_capture_token + ) { + ts_language_table_entry(self->language, state, self->language->keyword_capture_token, &table_entry); + if (table_entry.action_count > 0) { + LOG( + "switch from_keyword:%s, to_word_token:%s", + TREE_NAME(lookahead), + SYM_NAME(self->language->keyword_capture_token) + ); + + MutableSubtree mutable_lookahead = ts_subtree_make_mut(&self->tree_pool, lookahead); + ts_subtree_set_symbol(&mutable_lookahead, self->language->keyword_capture_token, self->language); + lookahead = ts_subtree_from_mut(mutable_lookahead); + continue; + } + } + + // If the current lookahead token is not valid and the parser is + // already in the error state, restart the error recovery process. + // TODO - can this be unified with the other `RECOVER` case above? + if (state == ERROR_STATE) { + ts_parser__recover(self, version, lookahead); + return true; + } + + // If the current lookahead token is not valid and the previous + // subtree on the stack was reused from an old tree, it isn't actually + // valid to reuse it. Remove it from the stack, and in its place, + // push each of its children. Then try again to process the current + // lookahead. + if (ts_parser__breakdown_top_of_stack(self, version)) { + state = ts_stack_state(self->stack, version); + ts_subtree_release(&self->tree_pool, lookahead); + needs_lex = true; + continue; + } + + // At this point, the current lookahead token is definitely not valid + // for this parse stack version. Mark this version as paused and continue + // processing any other stack versions that might exist. If some other + // version advances successfully, then this version can simply be removed. + // But if all versions end up paused, then error recovery is needed. + LOG("detect_error"); + ts_stack_pause(self->stack, version, ts_subtree_leaf_symbol(lookahead)); + ts_subtree_release(&self->tree_pool, lookahead); + return true; + } +} + +static unsigned ts_parser__condense_stack(TSParser *self) { + bool made_changes = false; + unsigned min_error_cost = UINT_MAX; + for (StackVersion i = 0; i < ts_stack_version_count(self->stack); i++) { + // Prune any versions that have been marked for removal. + if (ts_stack_is_halted(self->stack, i)) { + ts_stack_remove_version(self->stack, i); + i--; + continue; + } + + // Keep track of the minimum error cost of any stack version so + // that it can be returned. + ErrorStatus status_i = ts_parser__version_status(self, i); + if (!status_i.is_in_error && status_i.cost < min_error_cost) { + min_error_cost = status_i.cost; + } + + // Examine each pair of stack versions, removing any versions that + // are clearly worse than another version. Ensure that the versions + // are ordered from most promising to least promising. + for (StackVersion j = 0; j < i; j++) { + ErrorStatus status_j = ts_parser__version_status(self, j); + + switch (ts_parser__compare_versions(self, status_j, status_i)) { + case ErrorComparisonTakeLeft: + made_changes = true; + ts_stack_remove_version(self->stack, i); + i--; + j = i; + break; + + case ErrorComparisonPreferLeft: + case ErrorComparisonNone: + if (ts_stack_merge(self->stack, j, i)) { + made_changes = true; + i--; + j = i; + } + break; + + case ErrorComparisonPreferRight: + made_changes = true; + if (ts_stack_merge(self->stack, j, i)) { + i--; + j = i; + } else { + ts_stack_swap_versions(self->stack, i, j); + } + break; + + case ErrorComparisonTakeRight: + made_changes = true; + ts_stack_remove_version(self->stack, j); + i--; + j--; + break; + } + } + } + + // Enfore a hard upper bound on the number of stack versions by + // discarding the least promising versions. + while (ts_stack_version_count(self->stack) > MAX_VERSION_COUNT) { + ts_stack_remove_version(self->stack, MAX_VERSION_COUNT); + made_changes = true; + } + + // If the best-performing stack version is currently paused, or all + // versions are paused, then resume the best paused version and begin + // the error recovery process. Otherwise, remove the paused versions. + if (ts_stack_version_count(self->stack) > 0) { + bool has_unpaused_version = false; + for (StackVersion i = 0, n = ts_stack_version_count(self->stack); i < n; i++) { + if (ts_stack_is_paused(self->stack, i)) { + if (!has_unpaused_version && self->accept_count < MAX_VERSION_COUNT) { + LOG("resume version:%u", i); + min_error_cost = ts_stack_error_cost(self->stack, i); + TSSymbol lookahead_symbol = ts_stack_resume(self->stack, i); + ts_parser__handle_error(self, i, lookahead_symbol); + has_unpaused_version = true; + } else { + ts_stack_remove_version(self->stack, i); + i--; + n--; + } + } else { + has_unpaused_version = true; + } + } + } + + if (made_changes) { + LOG("condense"); + LOG_STACK(); + } + + return min_error_cost; +} + +static bool ts_parser_has_outstanding_parse(TSParser *self) { + return ( + ts_stack_state(self->stack, 0) != 1 || + ts_stack_node_count_since_error(self->stack, 0) != 0 + ); +} + +// Parser - Public + +TSParser *ts_parser_new(void) { + TSParser *self = ts_calloc(1, sizeof(TSParser)); + ts_lexer_init(&self->lexer); + array_init(&self->reduce_actions); + array_reserve(&self->reduce_actions, 4); + self->tree_pool = ts_subtree_pool_new(32); + self->stack = ts_stack_new(&self->tree_pool); + self->finished_tree = NULL_SUBTREE; + self->reusable_node = reusable_node_new(); + self->dot_graph_file = NULL; + self->cancellation_flag = NULL; + self->timeout_duration = 0; + self->end_clock = clock_null(); + self->operation_count = 0; + self->old_tree = NULL_SUBTREE; + self->included_range_differences = (TSRangeArray) array_new(); + self->included_range_difference_index = 0; + ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); + return self; +} + +void ts_parser_delete(TSParser *self) { + if (!self) return; + + ts_parser_set_language(self, NULL); + ts_stack_delete(self->stack); + if (self->reduce_actions.contents) { + array_delete(&self->reduce_actions); + } + if (self->included_range_differences.contents) { + array_delete(&self->included_range_differences); + } + if (self->old_tree.ptr) { + ts_subtree_release(&self->tree_pool, self->old_tree); + self->old_tree = NULL_SUBTREE; + } + ts_lexer_delete(&self->lexer); + ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); + ts_subtree_pool_delete(&self->tree_pool); + reusable_node_delete(&self->reusable_node); + array_delete(&self->trailing_extras); + array_delete(&self->trailing_extras2); + array_delete(&self->scratch_trees); + ts_free(self); +} + +const TSLanguage *ts_parser_language(const TSParser *self) { + return self->language; +} + +bool ts_parser_set_language(TSParser *self, const TSLanguage *language) { + if (language) { + if (language->version > TREE_SITTER_LANGUAGE_VERSION) return false; + if (language->version < TREE_SITTER_MIN_COMPATIBLE_LANGUAGE_VERSION) return false; + } + + if (self->external_scanner_payload && self->language->external_scanner.destroy) { + self->language->external_scanner.destroy(self->external_scanner_payload); + } + + if (language && language->external_scanner.create) { + self->external_scanner_payload = language->external_scanner.create(); + } else { + self->external_scanner_payload = NULL; + } + + self->language = language; + ts_parser_reset(self); + return true; +} + +TSLogger ts_parser_logger(const TSParser *self) { + return self->lexer.logger; +} + +void ts_parser_set_logger(TSParser *self, TSLogger logger) { + self->lexer.logger = logger; +} + +void ts_parser_print_dot_graphs(TSParser *self, int fd) { + if (self->dot_graph_file) { + fclose(self->dot_graph_file); + } + + if (fd >= 0) { + self->dot_graph_file = fdopen(fd, "a"); + } else { + self->dot_graph_file = NULL; + } +} + +const size_t *ts_parser_cancellation_flag(const TSParser *self) { + return (const size_t *)self->cancellation_flag; +} + +void ts_parser_set_cancellation_flag(TSParser *self, const size_t *flag) { + self->cancellation_flag = (const volatile size_t *)flag; +} + +uint64_t ts_parser_timeout_micros(const TSParser *self) { + return duration_to_micros(self->timeout_duration); +} + +void ts_parser_set_timeout_micros(TSParser *self, uint64_t timeout_micros) { + self->timeout_duration = duration_from_micros(timeout_micros); +} + +bool ts_parser_set_included_ranges( + TSParser *self, + const TSRange *ranges, + uint32_t count +) { + return ts_lexer_set_included_ranges(&self->lexer, ranges, count); +} + +const TSRange *ts_parser_included_ranges(const TSParser *self, uint32_t *count) { + return ts_lexer_included_ranges(&self->lexer, count); +} + +void ts_parser_reset(TSParser *self) { + if (self->language && self->language->external_scanner.deserialize) { + self->language->external_scanner.deserialize(self->external_scanner_payload, NULL, 0); + } + + if (self->old_tree.ptr) { + ts_subtree_release(&self->tree_pool, self->old_tree); + self->old_tree = NULL_SUBTREE; + } + + reusable_node_clear(&self->reusable_node); + ts_lexer_reset(&self->lexer, length_zero()); + ts_stack_clear(self->stack); + ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); + if (self->finished_tree.ptr) { + ts_subtree_release(&self->tree_pool, self->finished_tree); + self->finished_tree = NULL_SUBTREE; + } + self->accept_count = 0; +} + +TSTree *ts_parser_parse( + TSParser *self, + const TSTree *old_tree, + TSInput input +) { + if (!self->language || !input.read) return NULL; + + ts_lexer_set_input(&self->lexer, input); + + array_clear(&self->included_range_differences); + self->included_range_difference_index = 0; + + if (ts_parser_has_outstanding_parse(self)) { + LOG("resume_parsing"); + } else if (old_tree) { + ts_subtree_retain(old_tree->root); + self->old_tree = old_tree->root; + ts_range_array_get_changed_ranges( + old_tree->included_ranges, old_tree->included_range_count, + self->lexer.included_ranges, self->lexer.included_range_count, + &self->included_range_differences + ); + reusable_node_reset(&self->reusable_node, old_tree->root); + LOG("parse_after_edit"); + LOG_TREE(self->old_tree); + for (unsigned i = 0; i < self->included_range_differences.size; i++) { + TSRange *range = &self->included_range_differences.contents[i]; + LOG("different_included_range %u - %u", range->start_byte, range->end_byte); + } + } else { + reusable_node_clear(&self->reusable_node); + LOG("new_parse"); + } + + uint32_t position = 0, last_position = 0, version_count = 0; + self->operation_count = 0; + if (self->timeout_duration) { + self->end_clock = clock_after(clock_now(), self->timeout_duration); + } else { + self->end_clock = clock_null(); + } + + do { + for (StackVersion version = 0; + version_count = ts_stack_version_count(self->stack), version < version_count; + version++) { + bool allow_node_reuse = version_count == 1; + while (ts_stack_is_active(self->stack, version)) { + LOG("process version:%d, version_count:%u, state:%d, row:%u, col:%u", + version, ts_stack_version_count(self->stack), + ts_stack_state(self->stack, version), + ts_stack_position(self->stack, version).extent.row + 1, + ts_stack_position(self->stack, version).extent.column); + + if (!ts_parser__advance(self, version, allow_node_reuse)) return NULL; + LOG_STACK(); + + position = ts_stack_position(self->stack, version).bytes; + if (position > last_position || (version > 0 && position == last_position)) { + last_position = position; + break; + } + } + } + + unsigned min_error_cost = ts_parser__condense_stack(self); + if (self->finished_tree.ptr && ts_subtree_error_cost(self->finished_tree) < min_error_cost) { + break; + } + + while (self->included_range_difference_index < self->included_range_differences.size) { + TSRange *range = &self->included_range_differences.contents[self->included_range_difference_index]; + if (range->end_byte <= position) { + self->included_range_difference_index++; + } else { + break; + } + } + } while (version_count != 0); + + ts_subtree_balance(self->finished_tree, &self->tree_pool, self->language); + LOG("done"); + LOG_TREE(self->finished_tree); + + TSTree *result = ts_tree_new( + self->finished_tree, + self->language, + self->lexer.included_ranges, + self->lexer.included_range_count + ); + self->finished_tree = NULL_SUBTREE; + ts_parser_reset(self); + return result; +} + +TSTree *ts_parser_parse_string( + TSParser *self, + const TSTree *old_tree, + const char *string, + uint32_t length +) { + return ts_parser_parse_string_encoding(self, old_tree, string, length, TSInputEncodingUTF8); +} + +TSTree *ts_parser_parse_string_encoding(TSParser *self, const TSTree *old_tree, + const char *string, uint32_t length, TSInputEncoding encoding) { + TSStringInput input = {string, length}; + return ts_parser_parse(self, old_tree, (TSInput) { + &input, + ts_string_input_read, + encoding, + }); +} + +#undef LOG diff --git a/third-party/tree-sitter/src/point.h b/third-party/tree-sitter/src/point.h new file mode 100644 index 00000000..a50d2021 --- /dev/null +++ b/third-party/tree-sitter/src/point.h @@ -0,0 +1,54 @@ +#ifndef TREE_SITTER_POINT_H_ +#define TREE_SITTER_POINT_H_ + +#include "tree_sitter/api.h" + +#define POINT_ZERO ((TSPoint) {0, 0}) +#define POINT_MAX ((TSPoint) {UINT32_MAX, UINT32_MAX}) + +static inline TSPoint point__new(unsigned row, unsigned column) { + TSPoint result = {row, column}; + return result; +} + +static inline TSPoint point_add(TSPoint a, TSPoint b) { + if (b.row > 0) + return point__new(a.row + b.row, b.column); + else + return point__new(a.row, a.column + b.column); +} + +static inline TSPoint point_sub(TSPoint a, TSPoint b) { + if (a.row > b.row) + return point__new(a.row - b.row, a.column); + else + return point__new(0, a.column - b.column); +} + +static inline bool point_lte(TSPoint a, TSPoint b) { + return (a.row < b.row) || (a.row == b.row && a.column <= b.column); +} + +static inline bool point_lt(TSPoint a, TSPoint b) { + return (a.row < b.row) || (a.row == b.row && a.column < b.column); +} + +static inline bool point_eq(TSPoint a, TSPoint b) { + return a.row == b.row && a.column == b.column; +} + +static inline TSPoint point_min(TSPoint a, TSPoint b) { + if (a.row < b.row || (a.row == b.row && a.column < b.column)) + return a; + else + return b; +} + +static inline TSPoint point_max(TSPoint a, TSPoint b) { + if (a.row > b.row || (a.row == b.row && a.column > b.column)) + return a; + else + return b; +} + +#endif diff --git a/third-party/tree-sitter/src/query.c b/third-party/tree-sitter/src/query.c new file mode 100644 index 00000000..bf0598ce --- /dev/null +++ b/third-party/tree-sitter/src/query.c @@ -0,0 +1,3071 @@ +#include "tree_sitter/api.h" +#include "./alloc.h" +#include "./array.h" +#include "./bits.h" +#include "./language.h" +#include "./point.h" +#include "./tree_cursor.h" +#include "./unicode.h" +#include + +// #define DEBUG_ANALYZE_QUERY +// #define LOG(...) fprintf(stderr, __VA_ARGS__) +#define LOG(...) + +#define MAX_CAPTURE_LIST_COUNT 32 +#define MAX_STEP_CAPTURE_COUNT 3 +#define MAX_STATE_PREDECESSOR_COUNT 100 +#define MAX_ANALYSIS_STATE_DEPTH 12 + +/* + * Stream - A sequence of unicode characters derived from a UTF8 string. + * This struct is used in parsing queries from S-expressions. + */ +typedef struct { + const char *input; + const char *start; + const char *end; + int32_t next; + uint8_t next_size; +} Stream; + +/* + * QueryStep - A step in the process of matching a query. Each node within + * a query S-expression maps to one of these steps. An entire pattern is + * represented as a sequence of these steps. Fields: + * + * - `symbol` - The grammar symbol to match. A zero value represents the + * wildcard symbol, '_'. + * - `field` - The field name to match. A zero value means that a field name + * was not specified. + * - `capture_ids` - An array of integers representing the names of captures + * associated with this node in the pattern, terminated by a `NONE` value. + * - `depth` - The depth where this node occurs in the pattern. The root node + * of the pattern has depth zero. + * - `alternative_index` - The index of a different query step that serves as + * an alternative to this step. + */ +typedef struct { + TSSymbol symbol; + TSSymbol supertype_symbol; + TSFieldId field; + uint16_t capture_ids[MAX_STEP_CAPTURE_COUNT]; + uint16_t alternative_index; + uint16_t depth; + bool contains_captures: 1; + bool is_immediate: 1; + bool is_last_child: 1; + bool is_pass_through: 1; + bool is_dead_end: 1; + bool alternative_is_immediate: 1; + bool is_definite: 1; +} QueryStep; + +/* + * Slice - A slice of an external array. Within a query, capture names, + * literal string values, and predicate step informations are stored in three + * contiguous arrays. Individual captures, string values, and predicates are + * represented as slices of these three arrays. + */ +typedef struct { + uint32_t offset; + uint32_t length; +} Slice; + +/* + * SymbolTable - a two-way mapping of strings to ids. + */ +typedef struct { + Array(char) characters; + Array(Slice) slices; +} SymbolTable; + +/* + * PatternEntry - Information about the starting point for matching a + * particular pattern, consisting of the index of the pattern within the query, + * and the index of the patter's first step in the shared `steps` array. These + * entries are stored in a 'pattern map' - a sorted array that makes it + * possible to efficiently lookup patterns based on the symbol for their first + * step. + */ +typedef struct { + uint16_t step_index; + uint16_t pattern_index; +} PatternEntry; + +typedef struct { + Slice steps; + Slice predicate_steps; + uint32_t start_byte; +} QueryPattern; + +typedef struct { + uint32_t byte_offset; + uint16_t step_index; +} StepOffset; + +/* + * QueryState - The state of an in-progress match of a particular pattern + * in a query. While executing, a `TSQueryCursor` must keep track of a number + * of possible in-progress matches. Each of those possible matches is + * represented as one of these states. Fields: + * - `id` - A numeric id that is exposed to the public API. This allows the + * caller to remove a given match, preventing any more of its captures + * from being returned. + * - `start_depth` - The depth in the tree where the first step of the state's + * pattern was matched. + * - `pattern_index` - The pattern that the state is matching. + * - `consumed_capture_count` - The number of captures from this match that + * have already been returned. + * - `capture_list_id` - A numeric id that can be used to retrieve the state's + * list of captures from the `CaptureListPool`. + * - `seeking_immediate_match` - A flag that indicates that the state's next + * step must be matched by the very next sibling. This is used when + * processing repetitions. + * - `has_in_progress_alternatives` - A flag that indicates that there is are + * other states that have the same captures as this state, but are at + * different steps in their pattern. This means that in order to obey the + * 'longest-match' rule, this state should not be returned as a match until + * it is clear that there can be no longer match. + */ +typedef struct { + uint32_t id; + uint16_t start_depth; + uint16_t step_index; + uint16_t pattern_index; + uint16_t capture_list_id; + uint16_t consumed_capture_count: 12; + bool seeking_immediate_match: 1; + bool has_in_progress_alternatives: 1; + bool dead: 1; + bool needs_parent: 1; +} QueryState; + +typedef Array(TSQueryCapture) CaptureList; + +/* + * CaptureListPool - A collection of *lists* of captures. Each QueryState + * needs to maintain its own list of captures. To avoid repeated allocations, + * the reuses a fixed set of capture lists, and keeps track of which ones + * are currently in use. + */ +typedef struct { + CaptureList list[MAX_CAPTURE_LIST_COUNT]; + CaptureList empty_list; + uint32_t usage_map; +} CaptureListPool; + +/* + * AnalysisState - The state needed for walking the parse table when analyzing + * a query pattern, to determine at which steps the pattern might fail to match. + */ +typedef struct { + TSStateId parse_state; + TSSymbol parent_symbol; + uint16_t child_index; + TSFieldId field_id: 15; + bool done: 1; +} AnalysisStateEntry; + +typedef struct { + AnalysisStateEntry stack[MAX_ANALYSIS_STATE_DEPTH]; + uint16_t depth; + uint16_t step_index; +} AnalysisState; + +typedef Array(AnalysisState) AnalysisStateSet; + +/* + * AnalysisSubgraph - A subset of the states in the parse table that are used + * in constructing nodes with a certain symbol. Each state is accompanied by + * some information about the possible node that could be produced in + * downstream states. + */ +typedef struct { + TSStateId state; + uint8_t production_id; + uint8_t child_index: 7; + bool done: 1; +} AnalysisSubgraphNode; + +typedef struct { + TSSymbol symbol; + Array(TSStateId) start_states; + Array(AnalysisSubgraphNode) nodes; +} AnalysisSubgraph; + +/* + * StatePredecessorMap - A map that stores the predecessors of each parse state. + */ +typedef struct { + TSStateId *contents; +} StatePredecessorMap; + +/* + * TSQuery - A tree query, compiled from a string of S-expressions. The query + * itself is immutable. The mutable state used in the process of executing the + * query is stored in a `TSQueryCursor`. + */ +struct TSQuery { + SymbolTable captures; + SymbolTable predicate_values; + Array(QueryStep) steps; + Array(PatternEntry) pattern_map; + Array(TSQueryPredicateStep) predicate_steps; + Array(QueryPattern) patterns; + Array(StepOffset) step_offsets; + Array(char) string_buffer; + const TSLanguage *language; + uint16_t wildcard_root_pattern_count; + TSSymbol *symbol_map; +}; + +/* + * TSQueryCursor - A stateful struct used to execute a query on a tree. + */ +struct TSQueryCursor { + const TSQuery *query; + TSTreeCursor cursor; + Array(QueryState) states; + Array(QueryState) finished_states; + CaptureListPool capture_list_pool; + uint32_t depth; + uint32_t start_byte; + uint32_t end_byte; + uint32_t next_state_id; + TSPoint start_point; + TSPoint end_point; + bool ascending; + bool halted; +}; + +static const TSQueryError PARENT_DONE = -1; +static const uint16_t PATTERN_DONE_MARKER = UINT16_MAX; +static const uint16_t NONE = UINT16_MAX; +static const TSSymbol WILDCARD_SYMBOL = 0; +static const TSSymbol NAMED_WILDCARD_SYMBOL = UINT16_MAX - 1; + +/********** + * Stream + **********/ + +// Advance to the next unicode code point in the stream. +static bool stream_advance(Stream *self) { + self->input += self->next_size; + if (self->input < self->end) { + uint32_t size = ts_decode_utf8( + (const uint8_t *)self->input, + self->end - self->input, + &self->next + ); + if (size > 0) { + self->next_size = size; + return true; + } + } else { + self->next_size = 0; + self->next = '\0'; + } + return false; +} + +// Reset the stream to the given input position, represented as a pointer +// into the input string. +static void stream_reset(Stream *self, const char *input) { + self->input = input; + self->next_size = 0; + stream_advance(self); +} + +static Stream stream_new(const char *string, uint32_t length) { + Stream self = { + .next = 0, + .input = string, + .start = string, + .end = string + length, + }; + stream_advance(&self); + return self; +} + +static void stream_skip_whitespace(Stream *self) { + for (;;) { + if (iswspace(self->next)) { + stream_advance(self); + } else if (self->next == ';') { + // skip over comments + stream_advance(self); + while (self->next && self->next != '\n') { + if (!stream_advance(self)) break; + } + } else { + break; + } + } +} + +static bool stream_is_ident_start(Stream *self) { + return iswalnum(self->next) || self->next == '_' || self->next == '-'; +} + +static void stream_scan_identifier(Stream *stream) { + do { + stream_advance(stream); + } while ( + iswalnum(stream->next) || + stream->next == '_' || + stream->next == '-' || + stream->next == '.' || + stream->next == '?' || + stream->next == '!' + ); +} + +static uint32_t stream_offset(Stream *self) { + return self->input - self->start; +} + +/****************** + * CaptureListPool + ******************/ + +static CaptureListPool capture_list_pool_new(void) { + return (CaptureListPool) { + .empty_list = array_new(), + .usage_map = UINT32_MAX, + }; +} + +static void capture_list_pool_reset(CaptureListPool *self) { + self->usage_map = UINT32_MAX; + for (unsigned i = 0; i < MAX_CAPTURE_LIST_COUNT; i++) { + array_clear(&self->list[i]); + } +} + +static void capture_list_pool_delete(CaptureListPool *self) { + for (unsigned i = 0; i < MAX_CAPTURE_LIST_COUNT; i++) { + array_delete(&self->list[i]); + } +} + +static const CaptureList *capture_list_pool_get(const CaptureListPool *self, uint16_t id) { + if (id >= MAX_CAPTURE_LIST_COUNT) return &self->empty_list; + return &self->list[id]; +} + +static CaptureList *capture_list_pool_get_mut(CaptureListPool *self, uint16_t id) { + assert(id < MAX_CAPTURE_LIST_COUNT); + return &self->list[id]; +} + +static bool capture_list_pool_is_empty(const CaptureListPool *self) { + return self->usage_map == 0; +} + +static uint16_t capture_list_pool_acquire(CaptureListPool *self) { + // In the usage_map bitmask, ones represent free lists, and zeros represent + // lists that are in use. A free list id can quickly be found by counting + // the leading zeros in the usage map. An id of zero corresponds to the + // highest-order bit in the bitmask. + uint16_t id = count_leading_zeros(self->usage_map); + if (id >= MAX_CAPTURE_LIST_COUNT) return NONE; + self->usage_map &= ~bitmask_for_index(id); + array_clear(&self->list[id]); + return id; +} + +static void capture_list_pool_release(CaptureListPool *self, uint16_t id) { + if (id >= MAX_CAPTURE_LIST_COUNT) return; + array_clear(&self->list[id]); + self->usage_map |= bitmask_for_index(id); +} + +/************** + * SymbolTable + **************/ + +static SymbolTable symbol_table_new(void) { + return (SymbolTable) { + .characters = array_new(), + .slices = array_new(), + }; +} + +static void symbol_table_delete(SymbolTable *self) { + array_delete(&self->characters); + array_delete(&self->slices); +} + +static int symbol_table_id_for_name( + const SymbolTable *self, + const char *name, + uint32_t length +) { + for (unsigned i = 0; i < self->slices.size; i++) { + Slice slice = self->slices.contents[i]; + if ( + slice.length == length && + !strncmp(&self->characters.contents[slice.offset], name, length) + ) return i; + } + return -1; +} + +static const char *symbol_table_name_for_id( + const SymbolTable *self, + uint16_t id, + uint32_t *length +) { + Slice slice = self->slices.contents[id]; + *length = slice.length; + return &self->characters.contents[slice.offset]; +} + +static uint16_t symbol_table_insert_name( + SymbolTable *self, + const char *name, + uint32_t length +) { + int id = symbol_table_id_for_name(self, name, length); + if (id >= 0) return (uint16_t)id; + Slice slice = { + .offset = self->characters.size, + .length = length, + }; + array_grow_by(&self->characters, length + 1); + memcpy(&self->characters.contents[slice.offset], name, length); + self->characters.contents[self->characters.size - 1] = 0; + array_push(&self->slices, slice); + return self->slices.size - 1; +} + +/************ + * QueryStep + ************/ + +static QueryStep query_step__new( + TSSymbol symbol, + uint16_t depth, + bool is_immediate +) { + return (QueryStep) { + .symbol = symbol, + .depth = depth, + .field = 0, + .capture_ids = {NONE, NONE, NONE}, + .alternative_index = NONE, + .contains_captures = false, + .is_last_child = false, + .is_pass_through = false, + .is_dead_end = false, + .is_definite = false, + .is_immediate = is_immediate, + .alternative_is_immediate = false, + }; +} + +static void query_step__add_capture(QueryStep *self, uint16_t capture_id) { + for (unsigned i = 0; i < MAX_STEP_CAPTURE_COUNT; i++) { + if (self->capture_ids[i] == NONE) { + self->capture_ids[i] = capture_id; + break; + } + } +} + +static void query_step__remove_capture(QueryStep *self, uint16_t capture_id) { + for (unsigned i = 0; i < MAX_STEP_CAPTURE_COUNT; i++) { + if (self->capture_ids[i] == capture_id) { + self->capture_ids[i] = NONE; + while (i + 1 < MAX_STEP_CAPTURE_COUNT) { + if (self->capture_ids[i + 1] == NONE) break; + self->capture_ids[i] = self->capture_ids[i + 1]; + self->capture_ids[i + 1] = NONE; + i++; + } + break; + } + } +} + +/********************** + * StatePredecessorMap + **********************/ + +static inline StatePredecessorMap state_predecessor_map_new(const TSLanguage *language) { + return (StatePredecessorMap) { + .contents = ts_calloc(language->state_count * (MAX_STATE_PREDECESSOR_COUNT + 1), sizeof(TSStateId)), + }; +} + +static inline void state_predecessor_map_delete(StatePredecessorMap *self) { + ts_free(self->contents); +} + +static inline void state_predecessor_map_add( + StatePredecessorMap *self, + TSStateId state, + TSStateId predecessor +) { + unsigned index = state * (MAX_STATE_PREDECESSOR_COUNT + 1); + TSStateId *count = &self->contents[index]; + if (*count == 0 || (*count < MAX_STATE_PREDECESSOR_COUNT && self->contents[index + *count] != predecessor)) { + (*count)++; + self->contents[index + *count] = predecessor; + } +} + +static inline const TSStateId *state_predecessor_map_get( + const StatePredecessorMap *self, + TSStateId state, + unsigned *count +) { + unsigned index = state * (MAX_STATE_PREDECESSOR_COUNT + 1); + *count = self->contents[index]; + return &self->contents[index + 1]; +} + +/**************** + * AnalysisState + ****************/ + +static unsigned analysis_state__recursion_depth(const AnalysisState *self) { + unsigned result = 0; + for (unsigned i = 0; i < self->depth; i++) { + TSSymbol symbol = self->stack[i].parent_symbol; + for (unsigned j = 0; j < i; j++) { + if (self->stack[j].parent_symbol == symbol) { + result++; + break; + } + } + } + return result; +} + +static inline int analysis_state__compare_position( + const AnalysisState *self, + const AnalysisState *other +) { + for (unsigned i = 0; i < self->depth; i++) { + if (i >= other->depth) return -1; + if (self->stack[i].child_index < other->stack[i].child_index) return -1; + if (self->stack[i].child_index > other->stack[i].child_index) return 1; + } + if (self->depth < other->depth) return 1; + return 0; +} + +static inline int analysis_state__compare( + const AnalysisState *self, + const AnalysisState *other +) { + int result = analysis_state__compare_position(self, other); + if (result != 0) return result; + for (unsigned i = 0; i < self->depth; i++) { + if (self->stack[i].parent_symbol < other->stack[i].parent_symbol) return -1; + if (self->stack[i].parent_symbol > other->stack[i].parent_symbol) return 1; + if (self->stack[i].parse_state < other->stack[i].parse_state) return -1; + if (self->stack[i].parse_state > other->stack[i].parse_state) return 1; + if (self->stack[i].field_id < other->stack[i].field_id) return -1; + if (self->stack[i].field_id > other->stack[i].field_id) return 1; + } + if (self->step_index < other->step_index) return -1; + if (self->step_index > other->step_index) return 1; + return 0; +} + +static inline AnalysisStateEntry *analysis_state__top(AnalysisState *self) { + return &self->stack[self->depth - 1]; +} + +static inline bool analysis_state__has_supertype(AnalysisState *self, TSSymbol symbol) { + for (unsigned i = 0; i < self->depth; i++) { + if (self->stack[i].parent_symbol == symbol) return true; + } + return false; +} + +/*********************** + * AnalysisSubgraphNode + ***********************/ + +static inline int analysis_subgraph_node__compare(const AnalysisSubgraphNode *self, const AnalysisSubgraphNode *other) { + if (self->state < other->state) return -1; + if (self->state > other->state) return 1; + if (self->child_index < other->child_index) return -1; + if (self->child_index > other->child_index) return 1; + if (self->done < other->done) return -1; + if (self->done > other->done) return 1; + if (self->production_id < other->production_id) return -1; + if (self->production_id > other->production_id) return 1; + return 0; +} + +/********* + * Query + *********/ + +// The `pattern_map` contains a mapping from TSSymbol values to indices in the +// `steps` array. For a given syntax node, the `pattern_map` makes it possible +// to quickly find the starting steps of all of the patterns whose root matches +// that node. Each entry has two fields: a `pattern_index`, which identifies one +// of the patterns in the query, and a `step_index`, which indicates the start +// offset of that pattern's steps within the `steps` array. +// +// The entries are sorted by the patterns' root symbols, and lookups use a +// binary search. This ensures that the cost of this initial lookup step +// scales logarithmically with the number of patterns in the query. +// +// This returns `true` if the symbol is present and `false` otherwise. +// If the symbol is not present `*result` is set to the index where the +// symbol should be inserted. +static inline bool ts_query__pattern_map_search( + const TSQuery *self, + TSSymbol needle, + uint32_t *result +) { + uint32_t base_index = self->wildcard_root_pattern_count; + uint32_t size = self->pattern_map.size - base_index; + if (size == 0) { + *result = base_index; + return false; + } + while (size > 1) { + uint32_t half_size = size / 2; + uint32_t mid_index = base_index + half_size; + TSSymbol mid_symbol = self->steps.contents[ + self->pattern_map.contents[mid_index].step_index + ].symbol; + if (needle > mid_symbol) base_index = mid_index; + size -= half_size; + } + + TSSymbol symbol = self->steps.contents[ + self->pattern_map.contents[base_index].step_index + ].symbol; + + if (needle > symbol) { + base_index++; + if (base_index < self->pattern_map.size) { + symbol = self->steps.contents[ + self->pattern_map.contents[base_index].step_index + ].symbol; + } + } + + *result = base_index; + return needle == symbol; +} + +// Insert a new pattern's start index into the pattern map, maintaining +// the pattern map's ordering invariant. +static inline void ts_query__pattern_map_insert( + TSQuery *self, + TSSymbol symbol, + uint32_t start_step_index, + uint32_t pattern_index +) { + uint32_t index; + ts_query__pattern_map_search(self, symbol, &index); + + // Ensure that the entries are sorted not only by symbol, but also + // by pattern_index. This way, states for earlier patterns will be + // initiated first, which allows the ordering of the states array + // to be maintained more efficiently. + while (index < self->pattern_map.size) { + PatternEntry *entry = &self->pattern_map.contents[index]; + if ( + self->steps.contents[entry->step_index].symbol == symbol && + entry->pattern_index < pattern_index + ) { + index++; + } else { + break; + } + } + + array_insert(&self->pattern_map, index, ((PatternEntry) { + .step_index = start_step_index, + .pattern_index = pattern_index, + })); +} + +static bool ts_query__analyze_patterns(TSQuery *self, unsigned *error_offset) { + // Identify all of the patterns in the query that have child patterns, both at the + // top level and nested within other larger patterns. Record the step index where + // each pattern starts. + Array(uint32_t) parent_step_indices = array_new(); + for (unsigned i = 0; i < self->steps.size; i++) { + QueryStep *step = &self->steps.contents[i]; + if (i + 1 < self->steps.size) { + QueryStep *next_step = &self->steps.contents[i + 1]; + if ( + step->symbol != WILDCARD_SYMBOL && + step->symbol != NAMED_WILDCARD_SYMBOL && + next_step->depth > step->depth && + next_step->depth != PATTERN_DONE_MARKER + ) { + array_push(&parent_step_indices, i); + } + } + if (step->depth > 0) { + step->is_definite = true; + } + } + + // For every parent symbol in the query, initialize an 'analysis subgraph'. + // This subgraph lists all of the states in the parse table that are directly + // involved in building subtrees for this symbol. + // + // In addition to the parent symbols in the query, construct subgraphs for all + // of the hidden symbols in the grammar, because these might occur within + // one of the parent nodes, such that their children appear to belong to the + // parent. + Array(AnalysisSubgraph) subgraphs = array_new(); + for (unsigned i = 0; i < parent_step_indices.size; i++) { + uint32_t parent_step_index = parent_step_indices.contents[i]; + TSSymbol parent_symbol = self->steps.contents[parent_step_index].symbol; + AnalysisSubgraph subgraph = { .symbol = parent_symbol }; + array_insert_sorted_by(&subgraphs, .symbol, subgraph); + } + for (TSSymbol sym = self->language->token_count; sym < self->language->symbol_count; sym++) { + if (!ts_language_symbol_metadata(self->language, sym).visible) { + AnalysisSubgraph subgraph = { .symbol = sym }; + array_insert_sorted_by(&subgraphs, .symbol, subgraph); + } + } + + // Scan the parse table to find the data needed to populate these subgraphs. + // Collect three things during this scan: + // 1) All of the parse states where one of these symbols can start. + // 2) All of the parse states where one of these symbols can end, along + // with information about the node that would be created. + // 3) A list of predecessor states for each state. + StatePredecessorMap predecessor_map = state_predecessor_map_new(self->language); + for (TSStateId state = 1; state < self->language->state_count; state++) { + unsigned subgraph_index, exists; + LookaheadIterator lookahead_iterator = ts_language_lookaheads(self->language, state); + while (ts_lookahead_iterator_next(&lookahead_iterator)) { + if (lookahead_iterator.action_count) { + for (unsigned i = 0; i < lookahead_iterator.action_count; i++) { + const TSParseAction *action = &lookahead_iterator.actions[i]; + if (action->type == TSParseActionTypeReduce) { + const TSSymbol *aliases, *aliases_end; + ts_language_aliases_for_symbol( + self->language, + action->params.reduce.symbol, + &aliases, + &aliases_end + ); + for (const TSSymbol *symbol = aliases; symbol < aliases_end; symbol++) { + array_search_sorted_by( + &subgraphs, + .symbol, + *symbol, + &subgraph_index, + &exists + ); + if (exists) { + AnalysisSubgraph *subgraph = &subgraphs.contents[subgraph_index]; + if (subgraph->nodes.size == 0 || array_back(&subgraph->nodes)->state != state) { + array_push(&subgraph->nodes, ((AnalysisSubgraphNode) { + .state = state, + .production_id = action->params.reduce.production_id, + .child_index = action->params.reduce.child_count, + .done = true, + })); + } + } + } + } else if (action->type == TSParseActionTypeShift && !action->params.shift.extra) { + TSStateId next_state = action->params.shift.state; + state_predecessor_map_add(&predecessor_map, next_state, state); + } + } + } else if (lookahead_iterator.next_state != 0 && lookahead_iterator.next_state != state) { + state_predecessor_map_add(&predecessor_map, lookahead_iterator.next_state, state); + const TSSymbol *aliases, *aliases_end; + ts_language_aliases_for_symbol( + self->language, + lookahead_iterator.symbol, + &aliases, + &aliases_end + ); + for (const TSSymbol *symbol = aliases; symbol < aliases_end; symbol++) { + array_search_sorted_by( + &subgraphs, + .symbol, + *symbol, + &subgraph_index, + &exists + ); + if (exists) { + AnalysisSubgraph *subgraph = &subgraphs.contents[subgraph_index]; + if ( + subgraph->start_states.size == 0 || + *array_back(&subgraph->start_states) != state + ) + array_push(&subgraph->start_states, state); + } + } + } + } + } + + // For each subgraph, compute the preceding states by walking backward + // from the end states using the predecessor map. + Array(AnalysisSubgraphNode) next_nodes = array_new(); + for (unsigned i = 0; i < subgraphs.size; i++) { + AnalysisSubgraph *subgraph = &subgraphs.contents[i]; + if (subgraph->nodes.size == 0) { + array_delete(&subgraph->start_states); + array_erase(&subgraphs, i); + i--; + continue; + } + array_assign(&next_nodes, &subgraph->nodes); + while (next_nodes.size > 0) { + AnalysisSubgraphNode node = array_pop(&next_nodes); + if (node.child_index > 1) { + unsigned predecessor_count; + const TSStateId *predecessors = state_predecessor_map_get( + &predecessor_map, + node.state, + &predecessor_count + ); + for (unsigned j = 0; j < predecessor_count; j++) { + AnalysisSubgraphNode predecessor_node = { + .state = predecessors[j], + .child_index = node.child_index - 1, + .production_id = node.production_id, + .done = false, + }; + unsigned index, exists; + array_search_sorted_with( + &subgraph->nodes, analysis_subgraph_node__compare, &predecessor_node, + &index, &exists + ); + if (!exists) { + array_insert(&subgraph->nodes, index, predecessor_node); + array_push(&next_nodes, predecessor_node); + } + } + } + } + } + + #ifdef DEBUG_ANALYZE_QUERY + printf("\nSubgraphs:\n"); + for (unsigned i = 0; i < subgraphs.size; i++) { + AnalysisSubgraph *subgraph = &subgraphs.contents[i]; + printf(" %u, %s:\n", subgraph->symbol, ts_language_symbol_name(self->language, subgraph->symbol)); + for (unsigned j = 0; j < subgraph->start_states.size; j++) { + printf( + " {state: %u}\n", + subgraph->start_states.contents[j] + ); + } + for (unsigned j = 0; j < subgraph->nodes.size; j++) { + AnalysisSubgraphNode *node = &subgraph->nodes.contents[j]; + printf( + " {state: %u, child_index: %u, production_id: %u, done: %d}\n", + node->state, node->child_index, node->production_id, node->done + ); + } + printf("\n"); + } + #endif + + // For each non-terminal pattern, determine if the pattern can successfully match, + // and identify all of the possible children within the pattern where matching could fail. + bool result = true; + AnalysisStateSet states = array_new(); + AnalysisStateSet next_states = array_new(); + AnalysisStateSet deeper_states = array_new(); + Array(uint16_t) final_step_indices = array_new(); + for (unsigned i = 0; i < parent_step_indices.size; i++) { + uint16_t parent_step_index = parent_step_indices.contents[i]; + uint16_t parent_depth = self->steps.contents[parent_step_index].depth; + TSSymbol parent_symbol = self->steps.contents[parent_step_index].symbol; + if (parent_symbol == ts_builtin_sym_error) continue; + + // Find the subgraph that corresponds to this pattern's root symbol. If the pattern's + // root symbols is not a non-terminal, then return an error. + unsigned subgraph_index, exists; + array_search_sorted_by(&subgraphs, .symbol, parent_symbol, &subgraph_index, &exists); + if (!exists) { + unsigned first_child_step_index = parent_step_index + 1; + uint32_t i, exists; + array_search_sorted_by(&self->step_offsets, .step_index, first_child_step_index, &i, &exists); + assert(exists); + *error_offset = self->step_offsets.contents[i].byte_offset; + result = false; + break; + } + + // Initialize an analysis state at every parse state in the table where + // this parent symbol can occur. + AnalysisSubgraph *subgraph = &subgraphs.contents[subgraph_index]; + array_clear(&states); + array_clear(&deeper_states); + for (unsigned j = 0; j < subgraph->start_states.size; j++) { + TSStateId parse_state = subgraph->start_states.contents[j]; + array_push(&states, ((AnalysisState) { + .step_index = parent_step_index + 1, + .stack = { + [0] = { + .parse_state = parse_state, + .parent_symbol = parent_symbol, + .child_index = 0, + .field_id = 0, + .done = false, + }, + }, + .depth = 1, + })); + } + + // Walk the subgraph for this non-terminal, tracking all of the possible + // sequences of progress within the pattern. + bool can_finish_pattern = false; + bool did_exceed_max_depth = false; + unsigned recursion_depth_limit = 0; + unsigned prev_final_step_count = 0; + array_clear(&final_step_indices); + for (;;) { + #ifdef DEBUG_ANALYZE_QUERY + printf("Final step indices:"); + for (unsigned j = 0; j < final_step_indices.size; j++) { + printf(" %4u", final_step_indices.contents[j]); + } + printf("\nWalk states for %u %s:\n", i, ts_language_symbol_name(self->language, parent_symbol)); + for (unsigned j = 0; j < states.size; j++) { + AnalysisState *state = &states.contents[j]; + printf(" %3u: step: %u, stack: [", j, state->step_index); + for (unsigned k = 0; k < state->depth; k++) { + printf( + " {%s, child: %u, state: %4u", + self->language->symbol_names[state->stack[k].parent_symbol], + state->stack[k].child_index, + state->stack[k].parse_state + ); + if (state->stack[k].field_id) printf(", field: %s", self->language->field_names[state->stack[k].field_id]); + if (state->stack[k].done) printf(", DONE"); + printf("}"); + } + printf(" ]\n"); + } + #endif + + if (states.size == 0) { + if (deeper_states.size > 0 && final_step_indices.size > prev_final_step_count) { + #ifdef DEBUG_ANALYZE_QUERY + printf("Increase recursion depth limit to %u\n", recursion_depth_limit + 1); + #endif + + prev_final_step_count = final_step_indices.size; + recursion_depth_limit++; + AnalysisStateSet _states = states; + states = deeper_states; + deeper_states = _states; + continue; + } + + break; + } + + array_clear(&next_states); + for (unsigned j = 0; j < states.size; j++) { + AnalysisState * const state = &states.contents[j]; + + // For efficiency, it's important to avoid processing the same analysis state more + // than once. To achieve this, keep the states in order of ascending position within + // their hypothetical syntax trees. In each iteration of this loop, start by advancing + // the states that have made the least progress. Avoid advancing states that have already + // made more progress. + if (next_states.size > 0) { + int comparison = analysis_state__compare_position(state, array_back(&next_states)); + if (comparison == 0) { + array_insert_sorted_with(&next_states, analysis_state__compare, *state); + continue; + } else if (comparison > 0) { + while (j < states.size) { + array_push(&next_states, states.contents[j]); + j++; + } + break; + } + } + + const TSStateId parse_state = analysis_state__top(state)->parse_state; + const TSSymbol parent_symbol = analysis_state__top(state)->parent_symbol; + const TSFieldId parent_field_id = analysis_state__top(state)->field_id; + const unsigned child_index = analysis_state__top(state)->child_index; + const QueryStep * const step = &self->steps.contents[state->step_index]; + + unsigned subgraph_index, exists; + array_search_sorted_by(&subgraphs, .symbol, parent_symbol, &subgraph_index, &exists); + if (!exists) continue; + const AnalysisSubgraph *subgraph = &subgraphs.contents[subgraph_index]; + + // Follow every possible path in the parse table, but only visit states that + // are part of the subgraph for the current symbol. + LookaheadIterator lookahead_iterator = ts_language_lookaheads(self->language, parse_state); + while (ts_lookahead_iterator_next(&lookahead_iterator)) { + TSSymbol sym = lookahead_iterator.symbol; + + TSStateId next_parse_state; + if (lookahead_iterator.action_count) { + const TSParseAction *action = &lookahead_iterator.actions[lookahead_iterator.action_count - 1]; + if (action->type == TSParseActionTypeShift && !action->params.shift.extra) { + next_parse_state = action->params.shift.state; + } else { + continue; + } + } else if (lookahead_iterator.next_state != 0 && lookahead_iterator.next_state != parse_state) { + next_parse_state = lookahead_iterator.next_state; + } else { + continue; + } + + AnalysisSubgraphNode successor = { + .state = next_parse_state, + .child_index = child_index + 1, + }; + unsigned node_index; + array_search_sorted_with( + &subgraph->nodes, + analysis_subgraph_node__compare, &successor, + &node_index, &exists + ); + while (node_index < subgraph->nodes.size) { + AnalysisSubgraphNode *node = &subgraph->nodes.contents[node_index++]; + if (node->state != successor.state || node->child_index != successor.child_index) break; + + // Use the subgraph to determine what alias and field will eventually be applied + // to this child node. + TSSymbol alias = ts_language_alias_at(self->language, node->production_id, child_index); + TSSymbol visible_symbol = alias + ? alias + : self->language->symbol_metadata[sym].visible + ? self->language->public_symbol_map[sym] + : 0; + TSFieldId field_id = parent_field_id; + if (!field_id) { + const TSFieldMapEntry *field_map, *field_map_end; + ts_language_field_map(self->language, node->production_id, &field_map, &field_map_end); + for (; field_map != field_map_end; field_map++) { + if (!field_map->inherited && field_map->child_index == child_index) { + field_id = field_map->field_id; + break; + } + } + } + + AnalysisState next_state = *state; + analysis_state__top(&next_state)->child_index++; + analysis_state__top(&next_state)->parse_state = successor.state; + if (node->done) analysis_state__top(&next_state)->done = true; + + // Determine if this hypothetical child node would match the current step + // of the query pattern. + bool does_match = false; + if (visible_symbol) { + does_match = true; + if (step->symbol == NAMED_WILDCARD_SYMBOL) { + if (!self->language->symbol_metadata[visible_symbol].named) does_match = false; + } else if (step->symbol != WILDCARD_SYMBOL) { + if (step->symbol != visible_symbol) does_match = false; + } + if (step->field && step->field != field_id) { + does_match = false; + } + if ( + step->supertype_symbol && + !analysis_state__has_supertype(state, step->supertype_symbol) + ) does_match = false; + } + + // If this is a hidden child, then push a new entry to the stack, in order to + // walk through the children of this child. + else if (sym >= self->language->token_count) { + if (next_state.depth + 1 >= MAX_ANALYSIS_STATE_DEPTH) { + did_exceed_max_depth = true; + continue; + } + + next_state.depth++; + analysis_state__top(&next_state)->parse_state = parse_state; + analysis_state__top(&next_state)->child_index = 0; + analysis_state__top(&next_state)->parent_symbol = sym; + analysis_state__top(&next_state)->field_id = field_id; + analysis_state__top(&next_state)->done = false; + + if (analysis_state__recursion_depth(&next_state) > recursion_depth_limit) { + array_insert_sorted_with(&deeper_states, analysis_state__compare, next_state); + continue; + } + } + + // Pop from the stack when this state reached the end of its current syntax node. + while (next_state.depth > 0 && analysis_state__top(&next_state)->done) { + next_state.depth--; + } + + // If this hypothetical child did match the current step of the query pattern, + // then advance to the next step at the current depth. This involves skipping + // over any descendant steps of the current child. + const QueryStep *next_step = step; + if (does_match) { + for (;;) { + next_state.step_index++; + next_step = &self->steps.contents[next_state.step_index]; + if ( + next_step->depth == PATTERN_DONE_MARKER || + next_step->depth <= parent_depth + 1 + ) break; + } + } + + for (;;) { + // If this state can make further progress, then add it to the states for the next iteration. + // Otherwise, record the fact that matching can fail at this step of the pattern. + if (!next_step->is_dead_end) { + bool did_finish_pattern = self->steps.contents[next_state.step_index].depth != parent_depth + 1; + if (did_finish_pattern) can_finish_pattern = true; + if (did_finish_pattern || next_state.depth == 0) { + array_insert_sorted_by(&final_step_indices, , next_state.step_index); + } else { + array_insert_sorted_with(&next_states, analysis_state__compare, next_state); + } + } + + // If the state has advanced to a step with an alternative step, then add another state at + // that alternative step to the next iteration. + if ( + does_match && + next_step->alternative_index != NONE && + next_step->alternative_index > next_state.step_index + ) { + next_state.step_index = next_step->alternative_index; + next_step = &self->steps.contents[next_state.step_index]; + } else { + break; + } + } + } + } + } + + AnalysisStateSet _states = states; + states = next_states; + next_states = _states; + } + + // Mark as indefinite any step where a match terminated. + // Later, this property will be propagated to all of the step's predecessors. + for (unsigned j = 0; j < final_step_indices.size; j++) { + uint32_t final_step_index = final_step_indices.contents[j]; + QueryStep *step = &self->steps.contents[final_step_index]; + if ( + step->depth != PATTERN_DONE_MARKER && + step->depth > parent_depth && + !step->is_dead_end + ) { + step->is_definite = false; + } + } + + if (did_exceed_max_depth) { + for (unsigned j = parent_step_index + 1; j < self->steps.size; j++) { + QueryStep *step = &self->steps.contents[j]; + if ( + step->depth <= parent_depth || + step->depth == PATTERN_DONE_MARKER + ) break; + if (!step->is_dead_end) { + step->is_definite = false; + } + } + } + + // If this pattern cannot match, store the pattern index so that it can be + // returned to the caller. + if (result && !can_finish_pattern && !did_exceed_max_depth) { + assert(final_step_indices.size > 0); + uint16_t impossible_step_index = *array_back(&final_step_indices); + uint32_t i, exists; + array_search_sorted_by(&self->step_offsets, .step_index, impossible_step_index, &i, &exists); + assert(exists); + *error_offset = self->step_offsets.contents[i].byte_offset; + result = false; + break; + } + } + + // Mark as indefinite any step with captures that are used in predicates. + Array(uint16_t) predicate_capture_ids = array_new(); + for (unsigned i = 0; i < self->patterns.size; i++) { + QueryPattern *pattern = &self->patterns.contents[i]; + + // Gather all of the captures that are used in predicates for this pattern. + array_clear(&predicate_capture_ids); + for ( + unsigned start = pattern->predicate_steps.offset, + end = start + pattern->predicate_steps.length, + j = start; j < end; j++ + ) { + TSQueryPredicateStep *step = &self->predicate_steps.contents[j]; + if (step->type == TSQueryPredicateStepTypeCapture) { + array_insert_sorted_by(&predicate_capture_ids, , step->value_id); + } + } + + // Find all of the steps that have these captures. + for ( + unsigned start = pattern->steps.offset, + end = start + pattern->steps.length, + j = start; j < end; j++ + ) { + QueryStep *step = &self->steps.contents[j]; + for (unsigned k = 0; k < MAX_STEP_CAPTURE_COUNT; k++) { + uint16_t capture_id = step->capture_ids[k]; + if (capture_id == NONE) break; + unsigned index, exists; + array_search_sorted_by(&predicate_capture_ids, , capture_id, &index, &exists); + if (exists) { + step->is_definite = false; + break; + } + } + } + } + + // Propagate indefiniteness backwards. + bool done = self->steps.size == 0; + while (!done) { + done = true; + for (unsigned i = self->steps.size - 1; i > 0; i--) { + QueryStep *step = &self->steps.contents[i]; + + // Determine if this step is definite or has definite alternatives. + bool is_definite = false; + for (;;) { + if (step->is_definite) { + is_definite = true; + break; + } + if (step->alternative_index == NONE || step->alternative_index < i) { + break; + } + step = &self->steps.contents[step->alternative_index]; + } + + // If not, mark its predecessor as indefinite. + if (!is_definite) { + QueryStep *prev_step = &self->steps.contents[i - 1]; + if ( + !prev_step->is_dead_end && + prev_step->depth != PATTERN_DONE_MARKER && + prev_step->is_definite + ) { + prev_step->is_definite = false; + done = false; + } + } + } + } + + #ifdef DEBUG_ANALYZE_QUERY + printf("Steps:\n"); + for (unsigned i = 0; i < self->steps.size; i++) { + QueryStep *step = &self->steps.contents[i]; + if (step->depth == PATTERN_DONE_MARKER) { + printf(" %u: DONE\n", i); + } else { + printf( + " %u: {symbol: %s, field: %s, is_definite: %d}\n", + i, + (step->symbol == WILDCARD_SYMBOL || step->symbol == NAMED_WILDCARD_SYMBOL) + ? "ANY" + : ts_language_symbol_name(self->language, step->symbol), + (step->field ? ts_language_field_name_for_id(self->language, step->field) : "-"), + step->is_definite + ); + } + } + #endif + + // Cleanup + for (unsigned i = 0; i < subgraphs.size; i++) { + array_delete(&subgraphs.contents[i].start_states); + array_delete(&subgraphs.contents[i].nodes); + } + array_delete(&subgraphs); + array_delete(&next_nodes); + array_delete(&states); + array_delete(&next_states); + array_delete(&deeper_states); + array_delete(&final_step_indices); + array_delete(&parent_step_indices); + array_delete(&predicate_capture_ids); + state_predecessor_map_delete(&predecessor_map); + + return result; +} + +static void ts_query__finalize_steps(TSQuery *self) { + for (unsigned i = 0; i < self->steps.size; i++) { + QueryStep *step = &self->steps.contents[i]; + uint32_t depth = step->depth; + if (step->capture_ids[0] != NONE) { + step->contains_captures = true; + } else { + step->contains_captures = false; + for (unsigned j = i + 1; j < self->steps.size; j++) { + QueryStep *s = &self->steps.contents[j]; + if (s->depth == PATTERN_DONE_MARKER || s->depth <= depth) break; + if (s->capture_ids[0] != NONE) step->contains_captures = true; + } + } + } +} + +static TSQueryError ts_query__parse_string_literal( + TSQuery *self, + Stream *stream +) { + const char *string_start = stream->input; + if (stream->next != '"') return TSQueryErrorSyntax; + stream_advance(stream); + const char *prev_position = stream->input; + + bool is_escaped = false; + array_clear(&self->string_buffer); + for (;;) { + if (is_escaped) { + is_escaped = false; + switch (stream->next) { + case 'n': + array_push(&self->string_buffer, '\n'); + break; + case 'r': + array_push(&self->string_buffer, '\r'); + break; + case 't': + array_push(&self->string_buffer, '\t'); + break; + case '0': + array_push(&self->string_buffer, '\0'); + break; + default: + array_extend(&self->string_buffer, stream->next_size, stream->input); + break; + } + prev_position = stream->input + stream->next_size; + } else { + if (stream->next == '\\') { + array_extend(&self->string_buffer, (stream->input - prev_position), prev_position); + prev_position = stream->input + 1; + is_escaped = true; + } else if (stream->next == '"') { + array_extend(&self->string_buffer, (stream->input - prev_position), prev_position); + stream_advance(stream); + return TSQueryErrorNone; + } else if (stream->next == '\n') { + stream_reset(stream, string_start); + return TSQueryErrorSyntax; + } + } + if (!stream_advance(stream)) { + stream_reset(stream, string_start); + return TSQueryErrorSyntax; + } + } +} + +// Parse a single predicate associated with a pattern, adding it to the +// query's internal `predicate_steps` array. Predicates are arbitrary +// S-expressions associated with a pattern which are meant to be handled at +// a higher level of abstraction, such as the Rust/JavaScript bindings. They +// can contain '@'-prefixed capture names, double-quoted strings, and bare +// symbols, which also represent strings. +static TSQueryError ts_query__parse_predicate( + TSQuery *self, + Stream *stream +) { + if (!stream_is_ident_start(stream)) return TSQueryErrorSyntax; + const char *predicate_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - predicate_name; + uint16_t id = symbol_table_insert_name( + &self->predicate_values, + predicate_name, + length + ); + array_push(&self->predicate_steps, ((TSQueryPredicateStep) { + .type = TSQueryPredicateStepTypeString, + .value_id = id, + })); + stream_skip_whitespace(stream); + + for (;;) { + if (stream->next == ')') { + stream_advance(stream); + stream_skip_whitespace(stream); + array_push(&self->predicate_steps, ((TSQueryPredicateStep) { + .type = TSQueryPredicateStepTypeDone, + .value_id = 0, + })); + break; + } + + // Parse an '@'-prefixed capture name + else if (stream->next == '@') { + stream_advance(stream); + + // Parse the capture name + if (!stream_is_ident_start(stream)) return TSQueryErrorSyntax; + const char *capture_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - capture_name; + + // Add the capture id to the first step of the pattern + int capture_id = symbol_table_id_for_name( + &self->captures, + capture_name, + length + ); + if (capture_id == -1) { + stream_reset(stream, capture_name); + return TSQueryErrorCapture; + } + + array_push(&self->predicate_steps, ((TSQueryPredicateStep) { + .type = TSQueryPredicateStepTypeCapture, + .value_id = capture_id, + })); + } + + // Parse a string literal + else if (stream->next == '"') { + TSQueryError e = ts_query__parse_string_literal(self, stream); + if (e) return e; + uint16_t id = symbol_table_insert_name( + &self->predicate_values, + self->string_buffer.contents, + self->string_buffer.size + ); + array_push(&self->predicate_steps, ((TSQueryPredicateStep) { + .type = TSQueryPredicateStepTypeString, + .value_id = id, + })); + } + + // Parse a bare symbol + else if (stream_is_ident_start(stream)) { + const char *symbol_start = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - symbol_start; + uint16_t id = symbol_table_insert_name( + &self->predicate_values, + symbol_start, + length + ); + array_push(&self->predicate_steps, ((TSQueryPredicateStep) { + .type = TSQueryPredicateStepTypeString, + .value_id = id, + })); + } + + else { + return TSQueryErrorSyntax; + } + + stream_skip_whitespace(stream); + } + + return 0; +} + +// Read one S-expression pattern from the stream, and incorporate it into +// the query's internal state machine representation. For nested patterns, +// this function calls itself recursively. +static TSQueryError ts_query__parse_pattern( + TSQuery *self, + Stream *stream, + uint32_t depth, + bool is_immediate +) { + if (stream->next == 0) return TSQueryErrorSyntax; + if (stream->next == ')' || stream->next == ']') return PARENT_DONE; + + const uint32_t starting_step_index = self->steps.size; + + // Store the byte offset of each step in the query. + if ( + self->step_offsets.size == 0 || + array_back(&self->step_offsets)->step_index != starting_step_index + ) { + array_push(&self->step_offsets, ((StepOffset) { + .step_index = starting_step_index, + .byte_offset = stream_offset(stream), + })); + } + + // An open bracket is the start of an alternation. + if (stream->next == '[') { + stream_advance(stream); + stream_skip_whitespace(stream); + + // Parse each branch, and add a placeholder step in between the branches. + Array(uint32_t) branch_step_indices = array_new(); + for (;;) { + uint32_t start_index = self->steps.size; + TSQueryError e = ts_query__parse_pattern( + self, + stream, + depth, + is_immediate + ); + + if (e == PARENT_DONE && stream->next == ']' && branch_step_indices.size > 0) { + stream_advance(stream); + break; + } else if (e) { + array_delete(&branch_step_indices); + return e; + } + + array_push(&branch_step_indices, start_index); + array_push(&self->steps, query_step__new(0, depth, false)); + } + (void)array_pop(&self->steps); + + // For all of the branches except for the last one, add the subsequent branch as an + // alternative, and link the end of the branch to the current end of the steps. + for (unsigned i = 0; i < branch_step_indices.size - 1; i++) { + uint32_t step_index = branch_step_indices.contents[i]; + uint32_t next_step_index = branch_step_indices.contents[i + 1]; + QueryStep *start_step = &self->steps.contents[step_index]; + QueryStep *end_step = &self->steps.contents[next_step_index - 1]; + start_step->alternative_index = next_step_index; + end_step->alternative_index = self->steps.size; + end_step->is_dead_end = true; + } + + array_delete(&branch_step_indices); + } + + // An open parenthesis can be the start of three possible constructs: + // * A grouped sequence + // * A predicate + // * A named node + else if (stream->next == '(') { + stream_advance(stream); + stream_skip_whitespace(stream); + + // If this parenthesis is followed by a node, then it represents a grouped sequence. + if (stream->next == '(' || stream->next == '"' || stream->next == '[') { + bool child_is_immediate = false; + for (;;) { + if (stream->next == '.') { + child_is_immediate = true; + stream_advance(stream); + stream_skip_whitespace(stream); + } + TSQueryError e = ts_query__parse_pattern( + self, + stream, + depth, + child_is_immediate + ); + if (e == PARENT_DONE && stream->next == ')') { + stream_advance(stream); + break; + } else if (e) { + return e; + } + + child_is_immediate = false; + } + } + + // A dot/pound character indicates the start of a predicate. + else if (stream->next == '.' || stream->next == '#') { + stream_advance(stream); + return ts_query__parse_predicate(self, stream); + } + + // Otherwise, this parenthesis is the start of a named node. + else { + TSSymbol symbol; + + // TODO - remove. + // For temporary backward compatibility, handle '*' as a wildcard. + if (stream->next == '*') { + symbol = depth > 0 ? NAMED_WILDCARD_SYMBOL : WILDCARD_SYMBOL; + stream_advance(stream); + } + + // Parse a normal node name + else if (stream_is_ident_start(stream)) { + const char *node_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - node_name; + + // TODO - remove. + // For temporary backward compatibility, handle predicates without the leading '#' sign. + if (length > 0 && (node_name[length - 1] == '!' || node_name[length - 1] == '?')) { + stream_reset(stream, node_name); + return ts_query__parse_predicate(self, stream); + } + + // Parse the wildcard symbol + else if (length == 1 && node_name[0] == '_') { + symbol = depth > 0 ? NAMED_WILDCARD_SYMBOL : WILDCARD_SYMBOL; + } + + else { + symbol = ts_language_symbol_for_name( + self->language, + node_name, + length, + true + ); + if (!symbol) { + stream_reset(stream, node_name); + return TSQueryErrorNodeType; + } + } + } else { + return TSQueryErrorSyntax; + } + + // Add a step for the node. + array_push(&self->steps, query_step__new(symbol, depth, is_immediate)); + if (ts_language_symbol_metadata(self->language, symbol).supertype) { + QueryStep *step = array_back(&self->steps); + step->supertype_symbol = step->symbol; + step->symbol = NAMED_WILDCARD_SYMBOL; + } + + stream_skip_whitespace(stream); + + if (stream->next == '/') { + stream_advance(stream); + if (!stream_is_ident_start(stream)) { + return TSQueryErrorSyntax; + } + + const char *node_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - node_name; + + QueryStep *step = array_back(&self->steps); + step->symbol = ts_language_symbol_for_name( + self->language, + node_name, + length, + true + ); + if (!step->symbol) { + stream_reset(stream, node_name); + return TSQueryErrorNodeType; + } + + stream_skip_whitespace(stream); + } + + // Parse the child patterns + bool child_is_immediate = false; + uint16_t child_start_step_index = self->steps.size; + for (;;) { + if (stream->next == '.') { + child_is_immediate = true; + stream_advance(stream); + stream_skip_whitespace(stream); + } + + TSQueryError e = ts_query__parse_pattern( + self, + stream, + depth + 1, + child_is_immediate + ); + if (e == PARENT_DONE && stream->next == ')') { + if (child_is_immediate) { + self->steps.contents[child_start_step_index].is_last_child = true; + } + stream_advance(stream); + break; + } else if (e) { + return e; + } + + child_is_immediate = false; + } + } + } + + // Parse a wildcard pattern + else if ( + stream->next == '_' || + + // TODO remove. + // For temporary backward compatibility, handle '*' as a wildcard. + stream->next == '*' + ) { + stream_advance(stream); + stream_skip_whitespace(stream); + + // Add a step that matches any kind of node + array_push(&self->steps, query_step__new(WILDCARD_SYMBOL, depth, is_immediate)); + } + + // Parse a double-quoted anonymous leaf node expression + else if (stream->next == '"') { + const char *string_start = stream->input; + TSQueryError e = ts_query__parse_string_literal(self, stream); + if (e) return e; + + // Add a step for the node + TSSymbol symbol = ts_language_symbol_for_name( + self->language, + self->string_buffer.contents, + self->string_buffer.size, + false + ); + if (!symbol) { + stream_reset(stream, string_start + 1); + return TSQueryErrorNodeType; + } + array_push(&self->steps, query_step__new(symbol, depth, is_immediate)); + } + + // Parse a field-prefixed pattern + else if (stream_is_ident_start(stream)) { + // Parse the field name + const char *field_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - field_name; + stream_skip_whitespace(stream); + + if (stream->next != ':') { + stream_reset(stream, field_name); + return TSQueryErrorSyntax; + } + stream_advance(stream); + stream_skip_whitespace(stream); + + // Parse the pattern + TSQueryError e = ts_query__parse_pattern( + self, + stream, + depth, + is_immediate + ); + if (e == PARENT_DONE) return TSQueryErrorSyntax; + if (e) return e; + + // Add the field name to the first step of the pattern + TSFieldId field_id = ts_language_field_id_for_name( + self->language, + field_name, + length + ); + if (!field_id) { + stream->input = field_name; + return TSQueryErrorField; + } + + uint32_t step_index = starting_step_index; + QueryStep *step = &self->steps.contents[step_index]; + for (;;) { + step->field = field_id; + if ( + step->alternative_index != NONE && + step->alternative_index > step_index && + step->alternative_index < self->steps.size + ) { + step_index = step->alternative_index; + step = &self->steps.contents[step_index]; + } else { + break; + } + } + } + + else { + return TSQueryErrorSyntax; + } + + stream_skip_whitespace(stream); + + // Parse suffixes modifiers for this pattern + for (;;) { + QueryStep *step = &self->steps.contents[starting_step_index]; + + // Parse the one-or-more operator. + if (stream->next == '+') { + stream_advance(stream); + stream_skip_whitespace(stream); + + QueryStep repeat_step = query_step__new(WILDCARD_SYMBOL, depth, false); + repeat_step.alternative_index = starting_step_index; + repeat_step.is_pass_through = true; + repeat_step.alternative_is_immediate = true; + array_push(&self->steps, repeat_step); + } + + // Parse the zero-or-more repetition operator. + else if (stream->next == '*') { + stream_advance(stream); + stream_skip_whitespace(stream); + + QueryStep repeat_step = query_step__new(WILDCARD_SYMBOL, depth, false); + repeat_step.alternative_index = starting_step_index; + repeat_step.is_pass_through = true; + repeat_step.alternative_is_immediate = true; + array_push(&self->steps, repeat_step); + + while (step->alternative_index != NONE) { + step = &self->steps.contents[step->alternative_index]; + } + step->alternative_index = self->steps.size; + } + + // Parse the optional operator. + else if (stream->next == '?') { + stream_advance(stream); + stream_skip_whitespace(stream); + + while (step->alternative_index != NONE) { + step = &self->steps.contents[step->alternative_index]; + } + step->alternative_index = self->steps.size; + } + + // Parse an '@'-prefixed capture pattern + else if (stream->next == '@') { + stream_advance(stream); + if (!stream_is_ident_start(stream)) return TSQueryErrorSyntax; + const char *capture_name = stream->input; + stream_scan_identifier(stream); + uint32_t length = stream->input - capture_name; + stream_skip_whitespace(stream); + + // Add the capture id to the first step of the pattern + uint16_t capture_id = symbol_table_insert_name( + &self->captures, + capture_name, + length + ); + + uint32_t step_index = starting_step_index; + for (;;) { + query_step__add_capture(step, capture_id); + if ( + step->alternative_index != NONE && + step->alternative_index > step_index && + step->alternative_index < self->steps.size + ) { + step_index = step->alternative_index; + step = &self->steps.contents[step_index]; + } else { + break; + } + } + } + + // No more suffix modifiers + else { + break; + } + } + + return 0; +} + +TSQuery *ts_query_new( + const TSLanguage *language, + const char *source, + uint32_t source_len, + uint32_t *error_offset, + TSQueryError *error_type +) { + TSSymbol *symbol_map; + if (ts_language_version(language) >= TREE_SITTER_LANGUAGE_VERSION_WITH_SYMBOL_DEDUPING) { + symbol_map = NULL; + } else { + // Work around the fact that multiple symbols can currently be + // associated with the same name, due to "simple aliases". + // In the next language ABI version, this map will be contained + // in the language's `public_symbol_map` field. + uint32_t symbol_count = ts_language_symbol_count(language); + symbol_map = ts_malloc(sizeof(TSSymbol) * symbol_count); + for (unsigned i = 0; i < symbol_count; i++) { + const char *name = ts_language_symbol_name(language, i); + const TSSymbolType symbol_type = ts_language_symbol_type(language, i); + + symbol_map[i] = i; + + for (unsigned j = 0; j < i; j++) { + if (ts_language_symbol_type(language, j) == symbol_type) { + if (!strcmp(name, ts_language_symbol_name(language, j))) { + symbol_map[i] = j; + break; + } + } + } + } + } + + TSQuery *self = ts_malloc(sizeof(TSQuery)); + *self = (TSQuery) { + .steps = array_new(), + .pattern_map = array_new(), + .captures = symbol_table_new(), + .predicate_values = symbol_table_new(), + .predicate_steps = array_new(), + .patterns = array_new(), + .step_offsets = array_new(), + .string_buffer = array_new(), + .symbol_map = symbol_map, + .wildcard_root_pattern_count = 0, + .language = language, + }; + + // Parse all of the S-expressions in the given string. + Stream stream = stream_new(source, source_len); + stream_skip_whitespace(&stream); + while (stream.input < stream.end) { + uint32_t pattern_index = self->patterns.size; + uint32_t start_step_index = self->steps.size; + uint32_t start_predicate_step_index = self->predicate_steps.size; + array_push(&self->patterns, ((QueryPattern) { + .steps = (Slice) {.offset = start_step_index}, + .predicate_steps = (Slice) {.offset = start_predicate_step_index}, + .start_byte = stream_offset(&stream), + })); + *error_type = ts_query__parse_pattern(self, &stream, 0, false); + array_push(&self->steps, query_step__new(0, PATTERN_DONE_MARKER, false)); + + QueryPattern *pattern = array_back(&self->patterns); + pattern->steps.length = self->steps.size - start_step_index; + pattern->predicate_steps.length = self->predicate_steps.size - start_predicate_step_index; + + // If any pattern could not be parsed, then report the error information + // and terminate. + if (*error_type) { + if (*error_type == PARENT_DONE) *error_type = TSQueryErrorSyntax; + *error_offset = stream_offset(&stream); + ts_query_delete(self); + return NULL; + } + + // Maintain a map that can look up patterns for a given root symbol. + uint16_t wildcard_root_alternative_index = NONE; + for (;;) { + QueryStep *step = &self->steps.contents[start_step_index]; + + // If a pattern has a wildcard at its root, but it has a non-wildcard child, + // then optimize the matching process by skipping matching the wildcard. + // Later, during the matching process, the query cursor will check that + // there is a parent node, and capture it if necessary. + if (step->symbol == WILDCARD_SYMBOL && step->depth == 0) { + QueryStep *second_step = &self->steps.contents[start_step_index + 1]; + if (second_step->symbol != WILDCARD_SYMBOL && second_step->depth == 1) { + wildcard_root_alternative_index = step->alternative_index; + start_step_index += 1; + step = second_step; + } + } + + ts_query__pattern_map_insert(self, step->symbol, start_step_index, pattern_index); + if (step->symbol == WILDCARD_SYMBOL) { + self->wildcard_root_pattern_count++; + } + + // If there are alternatives or options at the root of the pattern, + // then add multiple entries to the pattern map. + if (step->alternative_index != NONE) { + start_step_index = step->alternative_index; + step->alternative_index = NONE; + } else if (wildcard_root_alternative_index != NONE) { + start_step_index = wildcard_root_alternative_index; + wildcard_root_alternative_index = NONE; + } else { + break; + } + } + } + + if (self->language->version >= TREE_SITTER_LANGUAGE_VERSION_WITH_STATE_COUNT) { + if (!ts_query__analyze_patterns(self, error_offset)) { + *error_type = TSQueryErrorStructure; + ts_query_delete(self); + return NULL; + } + } + + ts_query__finalize_steps(self); + array_delete(&self->string_buffer); + return self; +} + +void ts_query_delete(TSQuery *self) { + if (self) { + array_delete(&self->steps); + array_delete(&self->pattern_map); + array_delete(&self->predicate_steps); + array_delete(&self->patterns); + array_delete(&self->step_offsets); + array_delete(&self->string_buffer); + symbol_table_delete(&self->captures); + symbol_table_delete(&self->predicate_values); + ts_free(self->symbol_map); + ts_free(self); + } +} + +uint32_t ts_query_pattern_count(const TSQuery *self) { + return self->patterns.size; +} + +uint32_t ts_query_capture_count(const TSQuery *self) { + return self->captures.slices.size; +} + +uint32_t ts_query_string_count(const TSQuery *self) { + return self->predicate_values.slices.size; +} + +const char *ts_query_capture_name_for_id( + const TSQuery *self, + uint32_t index, + uint32_t *length +) { + return symbol_table_name_for_id(&self->captures, index, length); +} + +const char *ts_query_string_value_for_id( + const TSQuery *self, + uint32_t index, + uint32_t *length +) { + return symbol_table_name_for_id(&self->predicate_values, index, length); +} + +const TSQueryPredicateStep *ts_query_predicates_for_pattern( + const TSQuery *self, + uint32_t pattern_index, + uint32_t *step_count +) { + Slice slice = self->patterns.contents[pattern_index].predicate_steps; + *step_count = slice.length; + if (self->predicate_steps.contents == NULL) { + return NULL; + } + return &self->predicate_steps.contents[slice.offset]; +} + +uint32_t ts_query_start_byte_for_pattern( + const TSQuery *self, + uint32_t pattern_index +) { + return self->patterns.contents[pattern_index].start_byte; +} + +bool ts_query_step_is_definite( + const TSQuery *self, + uint32_t byte_offset +) { + uint32_t step_index = UINT32_MAX; + for (unsigned i = 0; i < self->step_offsets.size; i++) { + StepOffset *step_offset = &self->step_offsets.contents[i]; + if (step_offset->byte_offset > byte_offset) break; + step_index = step_offset->step_index; + } + if (step_index < self->steps.size) { + return self->steps.contents[step_index].is_definite; + } else { + return false; + } +} + +void ts_query_disable_capture( + TSQuery *self, + const char *name, + uint32_t length +) { + // Remove capture information for any pattern step that previously + // captured with the given name. + int id = symbol_table_id_for_name(&self->captures, name, length); + if (id != -1) { + for (unsigned i = 0; i < self->steps.size; i++) { + QueryStep *step = &self->steps.contents[i]; + query_step__remove_capture(step, id); + } + ts_query__finalize_steps(self); + } +} + +void ts_query_disable_pattern( + TSQuery *self, + uint32_t pattern_index +) { + // Remove the given pattern from the pattern map. Its steps will still + // be in the `steps` array, but they will never be read. + for (unsigned i = 0; i < self->pattern_map.size; i++) { + PatternEntry *pattern = &self->pattern_map.contents[i]; + if (pattern->pattern_index == pattern_index) { + array_erase(&self->pattern_map, i); + i--; + } + } +} + +/*************** + * QueryCursor + ***************/ + +TSQueryCursor *ts_query_cursor_new(void) { + TSQueryCursor *self = ts_malloc(sizeof(TSQueryCursor)); + *self = (TSQueryCursor) { + .ascending = false, + .halted = false, + .states = array_new(), + .finished_states = array_new(), + .capture_list_pool = capture_list_pool_new(), + .start_byte = 0, + .end_byte = UINT32_MAX, + .start_point = {0, 0}, + .end_point = POINT_MAX, + }; + array_reserve(&self->states, 8); + array_reserve(&self->finished_states, 8); + return self; +} + +void ts_query_cursor_delete(TSQueryCursor *self) { + array_delete(&self->states); + array_delete(&self->finished_states); + ts_tree_cursor_delete(&self->cursor); + capture_list_pool_delete(&self->capture_list_pool); + ts_free(self); +} + +void ts_query_cursor_exec( + TSQueryCursor *self, + const TSQuery *query, + TSNode node +) { + array_clear(&self->states); + array_clear(&self->finished_states); + ts_tree_cursor_reset(&self->cursor, node); + capture_list_pool_reset(&self->capture_list_pool); + self->next_state_id = 0; + self->depth = 0; + self->ascending = false; + self->halted = false; + self->query = query; +} + +void ts_query_cursor_set_byte_range( + TSQueryCursor *self, + uint32_t start_byte, + uint32_t end_byte +) { + if (end_byte == 0) { + start_byte = 0; + end_byte = UINT32_MAX; + } + self->start_byte = start_byte; + self->end_byte = end_byte; +} + +void ts_query_cursor_set_point_range( + TSQueryCursor *self, + TSPoint start_point, + TSPoint end_point +) { + if (end_point.row == 0 && end_point.column == 0) { + start_point = POINT_ZERO; + end_point = POINT_MAX; + } + self->start_point = start_point; + self->end_point = end_point; +} + +// Search through all of the in-progress states, and find the captured +// node that occurs earliest in the document. +static bool ts_query_cursor__first_in_progress_capture( + TSQueryCursor *self, + uint32_t *state_index, + uint32_t *byte_offset, + uint32_t *pattern_index, + bool *is_definite +) { + bool result = false; + *state_index = UINT32_MAX; + *byte_offset = UINT32_MAX; + *pattern_index = UINT32_MAX; + for (unsigned i = 0; i < self->states.size; i++) { + const QueryState *state = &self->states.contents[i]; + if (state->dead) continue; + const CaptureList *captures = capture_list_pool_get( + &self->capture_list_pool, + state->capture_list_id + ); + if (captures->size > state->consumed_capture_count) { + uint32_t capture_byte = ts_node_start_byte(captures->contents[state->consumed_capture_count].node); + if ( + !result || + capture_byte < *byte_offset || + (capture_byte == *byte_offset && state->pattern_index < *pattern_index) + ) { + QueryStep *step = &self->query->steps.contents[state->step_index]; + if (is_definite) { + *is_definite = step->is_definite; + } else if (step->is_definite) { + continue; + } + + result = true; + *state_index = i; + *byte_offset = capture_byte; + *pattern_index = state->pattern_index; + } + } + } + return result; +} + +// Determine which node is first in a depth-first traversal +int ts_query_cursor__compare_nodes(TSNode left, TSNode right) { + if (left.id != right.id) { + uint32_t left_start = ts_node_start_byte(left); + uint32_t right_start = ts_node_start_byte(right); + if (left_start < right_start) return -1; + if (left_start > right_start) return 1; + uint32_t left_node_count = ts_node_end_byte(left); + uint32_t right_node_count = ts_node_end_byte(right); + if (left_node_count > right_node_count) return -1; + if (left_node_count < right_node_count) return 1; + } + return 0; +} + +// Determine if either state contains a superset of the other state's captures. +void ts_query_cursor__compare_captures( + TSQueryCursor *self, + QueryState *left_state, + QueryState *right_state, + bool *left_contains_right, + bool *right_contains_left +) { + const CaptureList *left_captures = capture_list_pool_get( + &self->capture_list_pool, + left_state->capture_list_id + ); + const CaptureList *right_captures = capture_list_pool_get( + &self->capture_list_pool, + right_state->capture_list_id + ); + *left_contains_right = true; + *right_contains_left = true; + unsigned i = 0, j = 0; + for (;;) { + if (i < left_captures->size) { + if (j < right_captures->size) { + TSQueryCapture *left = &left_captures->contents[i]; + TSQueryCapture *right = &right_captures->contents[j]; + if (left->node.id == right->node.id && left->index == right->index) { + i++; + j++; + } else { + switch (ts_query_cursor__compare_nodes(left->node, right->node)) { + case -1: + *right_contains_left = false; + i++; + break; + case 1: + *left_contains_right = false; + j++; + break; + default: + *right_contains_left = false; + *left_contains_right = false; + i++; + j++; + break; + } + } + } else { + *right_contains_left = false; + break; + } + } else { + if (j < right_captures->size) { + *left_contains_right = false; + } + break; + } + } +} + +static void ts_query_cursor__add_state( + TSQueryCursor *self, + const PatternEntry *pattern +) { + QueryStep *step = &self->query->steps.contents[pattern->step_index]; + uint32_t start_depth = self->depth - step->depth; + + // Keep the states array in ascending order of start_depth and pattern_index, + // so that it can be processed more efficiently elsewhere. Usually, there is + // no work to do here because of two facts: + // * States with lower start_depth are naturally added first due to the + // order in which nodes are visited. + // * Earlier patterns are naturally added first because of the ordering of the + // pattern_map data structure that's used to initiate matches. + // + // This loop is only needed in cases where two conditions hold: + // * A pattern consists of more than one sibling node, so that its states + // remain in progress after exiting the node that started the match. + // * The first node in the pattern matches against multiple nodes at the + // same depth. + // + // An example of this is the pattern '((comment)* (function))'. If multiple + // `comment` nodes appear in a row, then we may initiate a new state for this + // pattern while another state for the same pattern is already in progress. + // If there are multiple patterns like this in a query, then this loop will + // need to execute in order to keep the states ordered by pattern_index. + uint32_t index = self->states.size; + while (index > 0) { + QueryState *prev_state = &self->states.contents[index - 1]; + if (prev_state->start_depth < start_depth) break; + if (prev_state->start_depth == start_depth) { + if (prev_state->pattern_index < pattern->pattern_index) break; + if (prev_state->pattern_index == pattern->pattern_index) { + // Avoid inserting an unnecessary duplicate state, which would be + // immediately pruned by the longest-match criteria. + if (prev_state->step_index == pattern->step_index) return; + } + } + index--; + } + + LOG( + " start state. pattern:%u, step:%u\n", + pattern->pattern_index, + pattern->step_index + ); + array_insert(&self->states, index, ((QueryState) { + .capture_list_id = NONE, + .step_index = pattern->step_index, + .pattern_index = pattern->pattern_index, + .start_depth = start_depth, + .consumed_capture_count = 0, + .seeking_immediate_match = true, + .has_in_progress_alternatives = false, + .needs_parent = step->depth == 1, + .dead = false, + })); +} + +// Acquire a capture list for this state. If there are no capture lists left in the +// pool, this will steal the capture list from another existing state, and mark that +// other state as 'dead'. +static CaptureList *ts_query_cursor__prepare_to_capture( + TSQueryCursor *self, + QueryState *state, + unsigned state_index_to_preserve +) { + if (state->capture_list_id == NONE) { + state->capture_list_id = capture_list_pool_acquire(&self->capture_list_pool); + + // If there are no capture lists left in the pool, then terminate whichever + // state has captured the earliest node in the document, and steal its + // capture list. + if (state->capture_list_id == NONE) { + uint32_t state_index, byte_offset, pattern_index; + if ( + ts_query_cursor__first_in_progress_capture( + self, + &state_index, + &byte_offset, + &pattern_index, + NULL + ) && + state_index != state_index_to_preserve + ) { + LOG( + " abandon state. index:%u, pattern:%u, offset:%u.\n", + state_index, pattern_index, byte_offset + ); + QueryState *other_state = &self->states.contents[state_index]; + state->capture_list_id = other_state->capture_list_id; + other_state->capture_list_id = NONE; + other_state->dead = true; + CaptureList *list = capture_list_pool_get_mut( + &self->capture_list_pool, + state->capture_list_id + ); + array_clear(list); + return list; + } else { + LOG(" ran out of capture lists"); + return NULL; + } + } + } + return capture_list_pool_get_mut(&self->capture_list_pool, state->capture_list_id); +} + +static void ts_query_cursor__capture( + TSQueryCursor *self, + QueryState *state, + QueryStep *step, + TSNode node +) { + if (state->dead) return; + CaptureList *capture_list = ts_query_cursor__prepare_to_capture(self, state, UINT32_MAX); + if (!capture_list) { + state->dead = true; + return; + } + + for (unsigned j = 0; j < MAX_STEP_CAPTURE_COUNT; j++) { + uint16_t capture_id = step->capture_ids[j]; + if (step->capture_ids[j] == NONE) break; + array_push(capture_list, ((TSQueryCapture) { node, capture_id })); + LOG( + " capture node. type:%s, pattern:%u, capture_id:%u, capture_count:%u\n", + ts_node_type(node), + state->pattern_index, + capture_id, + capture_list->size + ); + } +} + +// Duplicate the given state and insert the newly-created state immediately after +// the given state in the `states` array. Ensures that the given state reference is +// still valid, even if the states array is reallocated. +static QueryState *ts_query_cursor__copy_state( + TSQueryCursor *self, + QueryState **state_ref +) { + const QueryState *state = *state_ref; + uint32_t state_index = state - self->states.contents; + QueryState copy = *state; + copy.capture_list_id = NONE; + + // If the state has captures, copy its capture list. + if (state->capture_list_id != NONE) { + CaptureList *new_captures = ts_query_cursor__prepare_to_capture(self, ©, state_index); + if (!new_captures) return NULL; + const CaptureList *old_captures = capture_list_pool_get( + &self->capture_list_pool, + state->capture_list_id + ); + array_push_all(new_captures, old_captures); + } + + array_insert(&self->states, state_index + 1, copy); + *state_ref = &self->states.contents[state_index]; + return &self->states.contents[state_index + 1]; +} + +// Walk the tree, processing patterns until at least one pattern finishes, +// If one or more patterns finish, return `true` and store their states in the +// `finished_states` array. Multiple patterns can finish on the same node. If +// there are no more matches, return `false`. +static inline bool ts_query_cursor__advance( + TSQueryCursor *self, + bool stop_on_definite_step +) { + bool did_match = false; + for (;;) { + if (self->halted) { + while (self->states.size > 0) { + QueryState state = array_pop(&self->states); + capture_list_pool_release( + &self->capture_list_pool, + state.capture_list_id + ); + } + } + + if (did_match || self->halted) return did_match; + + // Exit the current node. + if (self->ascending) { + LOG("leave node. type:%s\n", ts_node_type(ts_tree_cursor_current_node(&self->cursor))); + + // Leave this node by stepping to its next sibling or to its parent. + if (ts_tree_cursor_goto_next_sibling(&self->cursor)) { + self->ascending = false; + } else if (ts_tree_cursor_goto_parent(&self->cursor)) { + self->depth--; + } else { + LOG("halt at root"); + self->halted = true; + } + + // After leaving a node, remove any states that cannot make further progress. + uint32_t deleted_count = 0; + for (unsigned i = 0, n = self->states.size; i < n; i++) { + QueryState *state = &self->states.contents[i]; + QueryStep *step = &self->query->steps.contents[state->step_index]; + + // If a state completed its pattern inside of this node, but was deferred from finishing + // in order to search for longer matches, mark it as finished. + if (step->depth == PATTERN_DONE_MARKER) { + if (state->start_depth > self->depth || self->halted) { + LOG(" finish pattern %u\n", state->pattern_index); + state->id = self->next_state_id++; + array_push(&self->finished_states, *state); + did_match = true; + deleted_count++; + continue; + } + } + + // If a state needed to match something within this node, then remove that state + // as it has failed to match. + else if ((uint32_t)state->start_depth + (uint32_t)step->depth > self->depth) { + LOG( + " failed to match. pattern:%u, step:%u\n", + state->pattern_index, + state->step_index + ); + capture_list_pool_release( + &self->capture_list_pool, + state->capture_list_id + ); + deleted_count++; + continue; + } + + if (deleted_count > 0) { + self->states.contents[i - deleted_count] = *state; + } + } + self->states.size -= deleted_count; + } + + // Enter a new node. + else { + // If this node is before the selected range, then avoid descending into it. + TSNode node = ts_tree_cursor_current_node(&self->cursor); + if ( + ts_node_end_byte(node) <= self->start_byte || + point_lte(ts_node_end_point(node), self->start_point) + ) { + if (!ts_tree_cursor_goto_next_sibling(&self->cursor)) { + self->ascending = true; + } + continue; + } + + // If this node is after the selected range, then stop walking. + if ( + self->end_byte <= ts_node_start_byte(node) || + point_lte(self->end_point, ts_node_start_point(node)) + ) { + LOG("halt at end of range"); + self->halted = true; + continue; + } + + // Get the properties of the current node. + TSSymbol symbol = ts_node_symbol(node); + bool is_named = ts_node_is_named(node); + if (symbol != ts_builtin_sym_error && self->query->symbol_map) { + symbol = self->query->symbol_map[symbol]; + } + bool has_later_siblings; + bool has_later_named_siblings; + bool can_have_later_siblings_with_this_field; + TSFieldId field_id = 0; + TSSymbol supertypes[8] = {0}; + unsigned supertype_count = 8; + ts_tree_cursor_current_status( + &self->cursor, + &field_id, + &has_later_siblings, + &has_later_named_siblings, + &can_have_later_siblings_with_this_field, + supertypes, + &supertype_count + ); + LOG( + "enter node. type:%s, field:%s, row:%u state_count:%u, finished_state_count:%u\n", + ts_node_type(node), + ts_language_field_name_for_id(self->query->language, field_id), + ts_node_start_point(node).row, + self->states.size, + self->finished_states.size + ); + + // Add new states for any patterns whose root node is a wildcard. + for (unsigned i = 0; i < self->query->wildcard_root_pattern_count; i++) { + PatternEntry *pattern = &self->query->pattern_map.contents[i]; + QueryStep *step = &self->query->steps.contents[pattern->step_index]; + + // If this node matches the first step of the pattern, then add a new + // state at the start of this pattern. + if (step->field && field_id != step->field) continue; + if (step->supertype_symbol && !supertype_count) continue; + ts_query_cursor__add_state(self, pattern); + } + + // Add new states for any patterns whose root node matches this node. + unsigned i; + if (ts_query__pattern_map_search(self->query, symbol, &i)) { + PatternEntry *pattern = &self->query->pattern_map.contents[i]; + QueryStep *step = &self->query->steps.contents[pattern->step_index]; + do { + // If this node matches the first step of the pattern, then add a new + // state at the start of this pattern. + if (step->field && field_id != step->field) continue; + ts_query_cursor__add_state(self, pattern); + + // Advance to the next pattern whose root node matches this node. + i++; + if (i == self->query->pattern_map.size) break; + pattern = &self->query->pattern_map.contents[i]; + step = &self->query->steps.contents[pattern->step_index]; + } while (step->symbol == symbol); + } + + // Update all of the in-progress states with current node. + for (unsigned i = 0, copy_count = 0; i < self->states.size; i += 1 + copy_count) { + QueryState *state = &self->states.contents[i]; + QueryStep *step = &self->query->steps.contents[state->step_index]; + state->has_in_progress_alternatives = false; + copy_count = 0; + + // Check that the node matches all of the criteria for the next + // step of the pattern. + if ((uint32_t)state->start_depth + (uint32_t)step->depth != self->depth) continue; + + // Determine if this node matches this step of the pattern, and also + // if this node can have later siblings that match this step of the + // pattern. + bool node_does_match = + step->symbol == symbol || + step->symbol == WILDCARD_SYMBOL || + (step->symbol == NAMED_WILDCARD_SYMBOL && is_named); + bool later_sibling_can_match = has_later_siblings; + if ((step->is_immediate && is_named) || state->seeking_immediate_match) { + later_sibling_can_match = false; + } + if (step->is_last_child && has_later_named_siblings) { + node_does_match = false; + } + if (step->supertype_symbol) { + bool has_supertype = false; + for (unsigned j = 0; j < supertype_count; j++) { + if (supertypes[j] == step->supertype_symbol) { + has_supertype = true; + break; + } + } + if (!has_supertype) node_does_match = false; + } + if (step->field) { + if (step->field == field_id) { + if (!can_have_later_siblings_with_this_field) { + later_sibling_can_match = false; + } + } else { + node_does_match = false; + } + } + + // Remove states immediately if it is ever clear that they cannot match. + if (!node_does_match) { + if (!later_sibling_can_match) { + LOG( + " discard state. pattern:%u, step:%u\n", + state->pattern_index, + state->step_index + ); + capture_list_pool_release( + &self->capture_list_pool, + state->capture_list_id + ); + array_erase(&self->states, i); + i--; + } + continue; + } + + // Some patterns can match their root node in multiple ways, capturing different + // children. If this pattern step could match later children within the same + // parent, then this query state cannot simply be updated in place. It must be + // split into two states: one that matches this node, and one which skips over + // this node, to preserve the possibility of matching later siblings. + if (later_sibling_can_match && step->contains_captures) { + if (ts_query_cursor__copy_state(self, &state)) { + LOG( + " split state for capture. pattern:%u, step:%u\n", + state->pattern_index, + state->step_index + ); + copy_count++; + } + } + + // If this pattern started with a wildcard, such that the pattern map + // actually points to the *second* step of the pattern, then check + // that the node has a parent, and capture the parent node if necessary. + if (state->needs_parent) { + TSNode parent = ts_tree_cursor_parent_node(&self->cursor); + if (ts_node_is_null(parent)) { + LOG(" missing parent node\n"); + state->dead = true; + } else { + state->needs_parent = false; + QueryStep *skipped_wildcard_step = step; + do { + skipped_wildcard_step--; + } while ( + skipped_wildcard_step->is_dead_end || + skipped_wildcard_step->is_pass_through || + skipped_wildcard_step->depth > 0 + ); + if (skipped_wildcard_step->capture_ids[0] != NONE) { + LOG(" capture wildcard parent\n"); + ts_query_cursor__capture( + self, + state, + skipped_wildcard_step, + parent + ); + } + } + } + + // If the current node is captured in this pattern, add it to the capture list. + if (step->capture_ids[0] != NONE) { + ts_query_cursor__capture(self, state, step, node); + } + + if (state->dead) { + array_erase(&self->states, i); + i--; + continue; + } + + // Advance this state to the next step of its pattern. + state->step_index++; + state->seeking_immediate_match = false; + LOG( + " advance state. pattern:%u, step:%u\n", + state->pattern_index, + state->step_index + ); + + QueryStep *next_step = &self->query->steps.contents[state->step_index]; + if (stop_on_definite_step && next_step->is_definite) did_match = true; + + // If this state's next step has an alternative step, then copy the state in order + // to pursue both alternatives. The alternative step itself may have an alternative, + // so this is an interative process. + unsigned end_index = i + 1; + for (unsigned j = i; j < end_index; j++) { + QueryState *state = &self->states.contents[j]; + QueryStep *next_step = &self->query->steps.contents[state->step_index]; + if (next_step->alternative_index != NONE) { + // A "dead-end" step exists only to add a non-sequential jump into the step sequence, + // via its alternative index. When a state reaches a dead-end step, it jumps straight + // to the step's alternative. + if (next_step->is_dead_end) { + state->step_index = next_step->alternative_index; + j--; + continue; + } + + // A "pass-through" step exists only to add a branch into the step sequence, + // via its alternative_index. When a state reaches a pass-through step, it splits + // in order to process the alternative step, and then it advances to the next step. + if (next_step->is_pass_through) { + state->step_index++; + j--; + } + + QueryState *copy = ts_query_cursor__copy_state(self, &state); + if (copy) { + LOG( + " split state for branch. pattern:%u, from_step:%u, to_step:%u, immediate:%d, capture_count: %u\n", + copy->pattern_index, + copy->step_index, + next_step->alternative_index, + next_step->alternative_is_immediate, + capture_list_pool_get(&self->capture_list_pool, copy->capture_list_id)->size + ); + end_index++; + copy_count++; + copy->step_index = next_step->alternative_index; + if (next_step->alternative_is_immediate) { + copy->seeking_immediate_match = true; + } + } + } + } + } + + for (unsigned i = 0; i < self->states.size; i++) { + QueryState *state = &self->states.contents[i]; + if (state->dead) { + array_erase(&self->states, i); + i--; + continue; + } + + // Enfore the longest-match criteria. When a query pattern contains optional or + // repeated nodes, this is necessary to avoid multiple redundant states, where + // one state has a strict subset of another state's captures. + bool did_remove = false; + for (unsigned j = i + 1; j < self->states.size; j++) { + QueryState *other_state = &self->states.contents[j]; + + // Query states are kept in ascending order of start_depth and pattern_index. + // Since the longest-match criteria is only used for deduping matches of the same + // pattern and root node, we only need to perform pairwise comparisons within a + // small slice of the states array. + if ( + other_state->start_depth != state->start_depth || + other_state->pattern_index != state->pattern_index + ) break; + + bool left_contains_right, right_contains_left; + ts_query_cursor__compare_captures( + self, + state, + other_state, + &left_contains_right, + &right_contains_left + ); + if (left_contains_right) { + if (state->step_index == other_state->step_index) { + LOG( + " drop shorter state. pattern: %u, step_index: %u\n", + state->pattern_index, + state->step_index + ); + capture_list_pool_release(&self->capture_list_pool, other_state->capture_list_id); + array_erase(&self->states, j); + j--; + continue; + } + other_state->has_in_progress_alternatives = true; + } + if (right_contains_left) { + if (state->step_index == other_state->step_index) { + LOG( + " drop shorter state. pattern: %u, step_index: %u\n", + state->pattern_index, + state->step_index + ); + capture_list_pool_release(&self->capture_list_pool, state->capture_list_id); + array_erase(&self->states, i); + i--; + did_remove = true; + break; + } + state->has_in_progress_alternatives = true; + } + } + + // If there the state is at the end of its pattern, remove it from the list + // of in-progress states and add it to the list of finished states. + if (!did_remove) { + LOG( + " keep state. pattern: %u, start_depth: %u, step_index: %u, capture_count: %u\n", + state->pattern_index, + state->start_depth, + state->step_index, + capture_list_pool_get(&self->capture_list_pool, state->capture_list_id)->size + ); + QueryStep *next_step = &self->query->steps.contents[state->step_index]; + if (next_step->depth == PATTERN_DONE_MARKER) { + if (state->has_in_progress_alternatives) { + LOG(" defer finishing pattern %u\n", state->pattern_index); + } else { + LOG(" finish pattern %u\n", state->pattern_index); + state->id = self->next_state_id++; + array_push(&self->finished_states, *state); + array_erase(&self->states, state - self->states.contents); + did_match = true; + i--; + } + } + } + } + + // Continue descending if possible. + if (ts_tree_cursor_goto_first_child(&self->cursor)) { + self->depth++; + } else { + self->ascending = true; + } + } + } +} + +bool ts_query_cursor_next_match( + TSQueryCursor *self, + TSQueryMatch *match +) { + if (self->finished_states.size == 0) { + if (!ts_query_cursor__advance(self, false)) { + return false; + } + } + + QueryState *state = &self->finished_states.contents[0]; + match->id = state->id; + match->pattern_index = state->pattern_index; + const CaptureList *captures = capture_list_pool_get( + &self->capture_list_pool, + state->capture_list_id + ); + match->captures = captures->contents; + match->capture_count = captures->size; + capture_list_pool_release(&self->capture_list_pool, state->capture_list_id); + array_erase(&self->finished_states, 0); + return true; +} + +void ts_query_cursor_remove_match( + TSQueryCursor *self, + uint32_t match_id +) { + for (unsigned i = 0; i < self->finished_states.size; i++) { + const QueryState *state = &self->finished_states.contents[i]; + if (state->id == match_id) { + capture_list_pool_release( + &self->capture_list_pool, + state->capture_list_id + ); + array_erase(&self->finished_states, i); + return; + } + } +} + +bool ts_query_cursor_next_capture( + TSQueryCursor *self, + TSQueryMatch *match, + uint32_t *capture_index +) { + // The goal here is to return captures in order, even though they may not + // be discovered in order, because patterns can overlap. Search for matches + // until there is a finished capture that is before any unfinished capture. + for (;;) { + // First, find the earliest capture in an unfinished match. + uint32_t first_unfinished_capture_byte; + uint32_t first_unfinished_pattern_index; + uint32_t first_unfinished_state_index; + bool first_unfinished_state_is_definite = false; + ts_query_cursor__first_in_progress_capture( + self, + &first_unfinished_state_index, + &first_unfinished_capture_byte, + &first_unfinished_pattern_index, + &first_unfinished_state_is_definite + ); + + // Then find the earliest capture in a finished match. It must occur + // before the first capture in an *unfinished* match. + QueryState *first_finished_state = NULL; + uint32_t first_finished_capture_byte = first_unfinished_capture_byte; + uint32_t first_finished_pattern_index = first_unfinished_pattern_index; + for (unsigned i = 0; i < self->finished_states.size; i++) { + QueryState *state = &self->finished_states.contents[i]; + const CaptureList *captures = capture_list_pool_get( + &self->capture_list_pool, + state->capture_list_id + ); + if (captures->size > state->consumed_capture_count) { + uint32_t capture_byte = ts_node_start_byte( + captures->contents[state->consumed_capture_count].node + ); + if ( + capture_byte < first_finished_capture_byte || + ( + capture_byte == first_finished_capture_byte && + state->pattern_index < first_finished_pattern_index + ) + ) { + first_finished_state = state; + first_finished_capture_byte = capture_byte; + first_finished_pattern_index = state->pattern_index; + } + } else { + capture_list_pool_release( + &self->capture_list_pool, + state->capture_list_id + ); + array_erase(&self->finished_states, i); + i--; + } + } + + // If there is finished capture that is clearly before any unfinished + // capture, then return its match, and its capture index. Internally + // record the fact that the capture has been 'consumed'. + QueryState *state; + if (first_finished_state) { + state = first_finished_state; + } else if (first_unfinished_state_is_definite) { + state = &self->states.contents[first_unfinished_state_index]; + } else { + state = NULL; + } + + if (state) { + match->id = state->id; + match->pattern_index = state->pattern_index; + const CaptureList *captures = capture_list_pool_get( + &self->capture_list_pool, + state->capture_list_id + ); + match->captures = captures->contents; + match->capture_count = captures->size; + *capture_index = state->consumed_capture_count; + state->consumed_capture_count++; + return true; + } + + if (capture_list_pool_is_empty(&self->capture_list_pool)) { + LOG( + " abandon state. index:%u, pattern:%u, offset:%u.\n", + first_unfinished_state_index, + first_unfinished_pattern_index, + first_unfinished_capture_byte + ); + capture_list_pool_release( + &self->capture_list_pool, + self->states.contents[first_unfinished_state_index].capture_list_id + ); + array_erase(&self->states, first_unfinished_state_index); + } + + // If there are no finished matches that are ready to be returned, then + // continue finding more matches. + if ( + !ts_query_cursor__advance(self, true) && + self->finished_states.size == 0 + ) return false; + } +} + +#undef LOG diff --git a/third-party/tree-sitter/src/reduce_action.h b/third-party/tree-sitter/src/reduce_action.h new file mode 100644 index 00000000..72aff08d --- /dev/null +++ b/third-party/tree-sitter/src/reduce_action.h @@ -0,0 +1,34 @@ +#ifndef TREE_SITTER_REDUCE_ACTION_H_ +#define TREE_SITTER_REDUCE_ACTION_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./array.h" +#include "tree_sitter/api.h" + +typedef struct { + uint32_t count; + TSSymbol symbol; + int dynamic_precedence; + unsigned short production_id; +} ReduceAction; + +typedef Array(ReduceAction) ReduceActionSet; + +static inline void ts_reduce_action_set_add(ReduceActionSet *self, + ReduceAction new_action) { + for (uint32_t i = 0; i < self->size; i++) { + ReduceAction action = self->contents[i]; + if (action.symbol == new_action.symbol && action.count == new_action.count) + return; + } + array_push(self, new_action); +} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_REDUCE_ACTION_H_ diff --git a/third-party/tree-sitter/src/reusable_node.h b/third-party/tree-sitter/src/reusable_node.h new file mode 100644 index 00000000..63fe3c1a --- /dev/null +++ b/third-party/tree-sitter/src/reusable_node.h @@ -0,0 +1,95 @@ +#include "./subtree.h" + +typedef struct { + Subtree tree; + uint32_t child_index; + uint32_t byte_offset; +} StackEntry; + +typedef struct { + Array(StackEntry) stack; + Subtree last_external_token; +} ReusableNode; + +static inline ReusableNode reusable_node_new(void) { + return (ReusableNode) {array_new(), NULL_SUBTREE}; +} + +static inline void reusable_node_clear(ReusableNode *self) { + array_clear(&self->stack); + self->last_external_token = NULL_SUBTREE; +} + +static inline Subtree reusable_node_tree(ReusableNode *self) { + return self->stack.size > 0 + ? self->stack.contents[self->stack.size - 1].tree + : NULL_SUBTREE; +} + +static inline uint32_t reusable_node_byte_offset(ReusableNode *self) { + return self->stack.size > 0 + ? self->stack.contents[self->stack.size - 1].byte_offset + : UINT32_MAX; +} + +static inline void reusable_node_delete(ReusableNode *self) { + array_delete(&self->stack); +} + +static inline void reusable_node_advance(ReusableNode *self) { + StackEntry last_entry = *array_back(&self->stack); + uint32_t byte_offset = last_entry.byte_offset + ts_subtree_total_bytes(last_entry.tree); + if (ts_subtree_has_external_tokens(last_entry.tree)) { + self->last_external_token = ts_subtree_last_external_token(last_entry.tree); + } + + Subtree tree; + uint32_t next_index; + do { + StackEntry popped_entry = array_pop(&self->stack); + next_index = popped_entry.child_index + 1; + if (self->stack.size == 0) return; + tree = array_back(&self->stack)->tree; + } while (ts_subtree_child_count(tree) <= next_index); + + array_push(&self->stack, ((StackEntry) { + .tree = ts_subtree_children(tree)[next_index], + .child_index = next_index, + .byte_offset = byte_offset, + })); +} + +static inline bool reusable_node_descend(ReusableNode *self) { + StackEntry last_entry = *array_back(&self->stack); + if (ts_subtree_child_count(last_entry.tree) > 0) { + array_push(&self->stack, ((StackEntry) { + .tree = ts_subtree_children(last_entry.tree)[0], + .child_index = 0, + .byte_offset = last_entry.byte_offset, + })); + return true; + } else { + return false; + } +} + +static inline void reusable_node_advance_past_leaf(ReusableNode *self) { + while (reusable_node_descend(self)) {} + reusable_node_advance(self); +} + +static inline void reusable_node_reset(ReusableNode *self, Subtree tree) { + reusable_node_clear(self); + array_push(&self->stack, ((StackEntry) { + .tree = tree, + .child_index = 0, + .byte_offset = 0, + })); + + // Never reuse the root node, because it has a non-standard internal structure + // due to transformations that are applied when it is accepted: adding the EOF + // child and any extra children. + if (!reusable_node_descend(self)) { + reusable_node_clear(self); + } +} diff --git a/third-party/tree-sitter/src/stack.c b/third-party/tree-sitter/src/stack.c new file mode 100644 index 00000000..cc728b05 --- /dev/null +++ b/third-party/tree-sitter/src/stack.c @@ -0,0 +1,858 @@ +#include "./alloc.h" +#include "./language.h" +#include "./subtree.h" +#include "./array.h" +#include "./stack.h" +#include "./length.h" +#include +#include + +#define MAX_LINK_COUNT 8 +#define MAX_NODE_POOL_SIZE 50 +#define MAX_ITERATOR_COUNT 64 + +#if defined _WIN32 && !defined __GNUC__ +#define inline __forceinline +#else +#define inline static inline __attribute__((always_inline)) +#endif + +typedef struct StackNode StackNode; + +typedef struct { + StackNode *node; + Subtree subtree; + bool is_pending; +} StackLink; + +struct StackNode { + TSStateId state; + Length position; + StackLink links[MAX_LINK_COUNT]; + short unsigned int link_count; + uint32_t ref_count; + unsigned error_cost; + unsigned node_count; + int dynamic_precedence; +}; + +typedef struct { + StackNode *node; + SubtreeArray subtrees; + uint32_t subtree_count; + bool is_pending; +} StackIterator; + +typedef struct { + void *payload; + StackIterateCallback callback; +} StackIterateSession; + +typedef Array(StackNode *) StackNodeArray; + +typedef enum { + StackStatusActive, + StackStatusPaused, + StackStatusHalted, +} StackStatus; + +typedef struct { + StackNode *node; + Subtree last_external_token; + StackSummary *summary; + unsigned node_count_at_last_error; + TSSymbol lookahead_when_paused; + StackStatus status; +} StackHead; + +struct Stack { + Array(StackHead) heads; + StackSliceArray slices; + Array(StackIterator) iterators; + StackNodeArray node_pool; + StackNode *base_node; + SubtreePool *subtree_pool; +}; + +typedef unsigned StackAction; +enum { + StackActionNone, + StackActionStop = 1, + StackActionPop = 2, +}; + +typedef StackAction (*StackCallback)(void *, const StackIterator *); + +static void stack_node_retain(StackNode *self) { + if (!self) + return; + assert(self->ref_count > 0); + self->ref_count++; + assert(self->ref_count != 0); +} + +static void stack_node_release(StackNode *self, StackNodeArray *pool, SubtreePool *subtree_pool) { +recur: + assert(self->ref_count != 0); + self->ref_count--; + if (self->ref_count > 0) return; + + StackNode *first_predecessor = NULL; + if (self->link_count > 0) { + for (unsigned i = self->link_count - 1; i > 0; i--) { + StackLink link = self->links[i]; + if (link.subtree.ptr) ts_subtree_release(subtree_pool, link.subtree); + stack_node_release(link.node, pool, subtree_pool); + } + StackLink link = self->links[0]; + if (link.subtree.ptr) ts_subtree_release(subtree_pool, link.subtree); + first_predecessor = self->links[0].node; + } + + if (pool->size < MAX_NODE_POOL_SIZE) { + array_push(pool, self); + } else { + ts_free(self); + } + + if (first_predecessor) { + self = first_predecessor; + goto recur; + } +} + +static StackNode *stack_node_new(StackNode *previous_node, Subtree subtree, + bool is_pending, TSStateId state, StackNodeArray *pool) { + StackNode *node = pool->size > 0 ? + array_pop(pool) : + ts_malloc(sizeof(StackNode)); + *node = (StackNode){.ref_count = 1, .link_count = 0, .state = state}; + + if (previous_node) { + node->link_count = 1; + node->links[0] = (StackLink){ + .node = previous_node, + .subtree = subtree, + .is_pending = is_pending, + }; + + node->position = previous_node->position; + node->error_cost = previous_node->error_cost; + node->dynamic_precedence = previous_node->dynamic_precedence; + node->node_count = previous_node->node_count; + + if (subtree.ptr) { + node->error_cost += ts_subtree_error_cost(subtree); + node->position = length_add(node->position, ts_subtree_total_size(subtree)); + node->node_count += ts_subtree_node_count(subtree); + node->dynamic_precedence += ts_subtree_dynamic_precedence(subtree); + } + } else { + node->position = length_zero(); + node->error_cost = 0; + } + + return node; +} + +static bool stack__subtree_is_equivalent(Subtree left, Subtree right) { + return + left.ptr == right.ptr || + (left.ptr && right.ptr && + ts_subtree_symbol(left) == ts_subtree_symbol(right) && + ((ts_subtree_error_cost(left) > 0 && ts_subtree_error_cost(right) > 0) || + (ts_subtree_padding(left).bytes == ts_subtree_padding(right).bytes && + ts_subtree_size(left).bytes == ts_subtree_size(right).bytes && + ts_subtree_child_count(left) == ts_subtree_child_count(right) && + ts_subtree_extra(left) == ts_subtree_extra(right) && + ts_subtree_external_scanner_state_eq(left, right)))); +} + +static void stack_node_add_link(StackNode *self, StackLink link, SubtreePool *subtree_pool) { + if (link.node == self) return; + + for (int i = 0; i < self->link_count; i++) { + StackLink *existing_link = &self->links[i]; + if (stack__subtree_is_equivalent(existing_link->subtree, link.subtree)) { + // In general, we preserve ambiguities until they are removed from the stack + // during a pop operation where multiple paths lead to the same node. But in + // the special case where two links directly connect the same pair of nodes, + // we can safely remove the ambiguity ahead of time without changing behavior. + if (existing_link->node == link.node) { + if ( + ts_subtree_dynamic_precedence(link.subtree) > + ts_subtree_dynamic_precedence(existing_link->subtree) + ) { + ts_subtree_retain(link.subtree); + ts_subtree_release(subtree_pool, existing_link->subtree); + existing_link->subtree = link.subtree; + self->dynamic_precedence = + link.node->dynamic_precedence + ts_subtree_dynamic_precedence(link.subtree); + } + return; + } + + // If the previous nodes are mergeable, merge them recursively. + if (existing_link->node->state == link.node->state && + existing_link->node->position.bytes == link.node->position.bytes) { + for (int j = 0; j < link.node->link_count; j++) { + stack_node_add_link(existing_link->node, link.node->links[j], subtree_pool); + } + int32_t dynamic_precedence = link.node->dynamic_precedence; + if (link.subtree.ptr) { + dynamic_precedence += ts_subtree_dynamic_precedence(link.subtree); + } + if (dynamic_precedence > self->dynamic_precedence) { + self->dynamic_precedence = dynamic_precedence; + } + return; + } + } + } + + if (self->link_count == MAX_LINK_COUNT) return; + + stack_node_retain(link.node); + unsigned node_count = link.node->node_count; + int dynamic_precedence = link.node->dynamic_precedence; + self->links[self->link_count++] = link; + + if (link.subtree.ptr) { + ts_subtree_retain(link.subtree); + node_count += ts_subtree_node_count(link.subtree); + dynamic_precedence += ts_subtree_dynamic_precedence(link.subtree); + } + + if (node_count > self->node_count) self->node_count = node_count; + if (dynamic_precedence > self->dynamic_precedence) self->dynamic_precedence = dynamic_precedence; +} + +static void stack_head_delete(StackHead *self, StackNodeArray *pool, SubtreePool *subtree_pool) { + if (self->node) { + if (self->last_external_token.ptr) { + ts_subtree_release(subtree_pool, self->last_external_token); + } + if (self->summary) { + array_delete(self->summary); + ts_free(self->summary); + } + stack_node_release(self->node, pool, subtree_pool); + } +} + +static StackVersion ts_stack__add_version(Stack *self, StackVersion original_version, + StackNode *node) { + StackHead head = { + .node = node, + .node_count_at_last_error = self->heads.contents[original_version].node_count_at_last_error, + .last_external_token = self->heads.contents[original_version].last_external_token, + .status = StackStatusActive, + .lookahead_when_paused = 0, + }; + array_push(&self->heads, head); + stack_node_retain(node); + if (head.last_external_token.ptr) ts_subtree_retain(head.last_external_token); + return (StackVersion)(self->heads.size - 1); +} + +static void ts_stack__add_slice(Stack *self, StackVersion original_version, + StackNode *node, SubtreeArray *subtrees) { + for (uint32_t i = self->slices.size - 1; i + 1 > 0; i--) { + StackVersion version = self->slices.contents[i].version; + if (self->heads.contents[version].node == node) { + StackSlice slice = {*subtrees, version}; + array_insert(&self->slices, i + 1, slice); + return; + } + } + + StackVersion version = ts_stack__add_version(self, original_version, node); + StackSlice slice = { *subtrees, version }; + array_push(&self->slices, slice); +} + +inline StackSliceArray stack__iter(Stack *self, StackVersion version, + StackCallback callback, void *payload, + int goal_subtree_count) { + array_clear(&self->slices); + array_clear(&self->iterators); + + StackHead *head = array_get(&self->heads, version); + StackIterator iterator = { + .node = head->node, + .subtrees = array_new(), + .subtree_count = 0, + .is_pending = true, + }; + + bool include_subtrees = false; + if (goal_subtree_count >= 0) { + include_subtrees = true; + array_reserve(&iterator.subtrees, ts_subtree_alloc_size(goal_subtree_count) / sizeof(Subtree)); + } + + array_push(&self->iterators, iterator); + + while (self->iterators.size > 0) { + for (uint32_t i = 0, size = self->iterators.size; i < size; i++) { + StackIterator *iterator = &self->iterators.contents[i]; + StackNode *node = iterator->node; + + StackAction action = callback(payload, iterator); + bool should_pop = action & StackActionPop; + bool should_stop = action & StackActionStop || node->link_count == 0; + + if (should_pop) { + SubtreeArray subtrees = iterator->subtrees; + if (!should_stop) { + ts_subtree_array_copy(subtrees, &subtrees); + } + ts_subtree_array_reverse(&subtrees); + ts_stack__add_slice( + self, + version, + node, + &subtrees + ); + } + + if (should_stop) { + if (!should_pop) + ts_subtree_array_delete(self->subtree_pool, &iterator->subtrees); + array_erase(&self->iterators, i); + i--, size--; + continue; + } + + for (uint32_t j = 1; j <= node->link_count; j++) { + StackIterator *next_iterator; + StackLink link; + if (j == node->link_count) { + link = node->links[0]; + next_iterator = &self->iterators.contents[i]; + } else { + if (self->iterators.size >= MAX_ITERATOR_COUNT) continue; + link = node->links[j]; + StackIterator current_iterator = self->iterators.contents[i]; + array_push(&self->iterators, current_iterator); + next_iterator = array_back(&self->iterators); + ts_subtree_array_copy(next_iterator->subtrees, &next_iterator->subtrees); + } + + next_iterator->node = link.node; + if (link.subtree.ptr) { + if (include_subtrees) { + array_push(&next_iterator->subtrees, link.subtree); + ts_subtree_retain(link.subtree); + } + + if (!ts_subtree_extra(link.subtree)) { + next_iterator->subtree_count++; + if (!link.is_pending) { + next_iterator->is_pending = false; + } + } + } else { + next_iterator->subtree_count++; + next_iterator->is_pending = false; + } + } + } + } + + return self->slices; +} + +Stack *ts_stack_new(SubtreePool *subtree_pool) { + Stack *self = ts_calloc(1, sizeof(Stack)); + + array_init(&self->heads); + array_init(&self->slices); + array_init(&self->iterators); + array_init(&self->node_pool); + array_reserve(&self->heads, 4); + array_reserve(&self->slices, 4); + array_reserve(&self->iterators, 4); + array_reserve(&self->node_pool, MAX_NODE_POOL_SIZE); + + self->subtree_pool = subtree_pool; + self->base_node = stack_node_new(NULL, NULL_SUBTREE, false, 1, &self->node_pool); + ts_stack_clear(self); + + return self; +} + +void ts_stack_delete(Stack *self) { + if (self->slices.contents) + array_delete(&self->slices); + if (self->iterators.contents) + array_delete(&self->iterators); + stack_node_release(self->base_node, &self->node_pool, self->subtree_pool); + for (uint32_t i = 0; i < self->heads.size; i++) { + stack_head_delete(&self->heads.contents[i], &self->node_pool, self->subtree_pool); + } + array_clear(&self->heads); + if (self->node_pool.contents) { + for (uint32_t i = 0; i < self->node_pool.size; i++) + ts_free(self->node_pool.contents[i]); + array_delete(&self->node_pool); + } + array_delete(&self->heads); + ts_free(self); +} + +uint32_t ts_stack_version_count(const Stack *self) { + return self->heads.size; +} + +TSStateId ts_stack_state(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->node->state; +} + +Length ts_stack_position(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->node->position; +} + +Subtree ts_stack_last_external_token(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->last_external_token; +} + +void ts_stack_set_last_external_token(Stack *self, StackVersion version, Subtree token) { + StackHead *head = array_get(&self->heads, version); + if (token.ptr) ts_subtree_retain(token); + if (head->last_external_token.ptr) ts_subtree_release(self->subtree_pool, head->last_external_token); + head->last_external_token = token; +} + +unsigned ts_stack_error_cost(const Stack *self, StackVersion version) { + StackHead *head = array_get(&self->heads, version); + unsigned result = head->node->error_cost; + if ( + head->status == StackStatusPaused || + (head->node->state == ERROR_STATE && !head->node->links[0].subtree.ptr)) { + result += ERROR_COST_PER_RECOVERY; + } + return result; +} + +unsigned ts_stack_node_count_since_error(const Stack *self, StackVersion version) { + StackHead *head = array_get(&self->heads, version); + if (head->node->node_count < head->node_count_at_last_error) { + head->node_count_at_last_error = head->node->node_count; + } + return head->node->node_count - head->node_count_at_last_error; +} + +void ts_stack_push(Stack *self, StackVersion version, Subtree subtree, + bool pending, TSStateId state) { + StackHead *head = array_get(&self->heads, version); + StackNode *new_node = stack_node_new(head->node, subtree, pending, state, &self->node_pool); + if (!subtree.ptr) head->node_count_at_last_error = new_node->node_count; + head->node = new_node; +} + +inline StackAction iterate_callback(void *payload, const StackIterator *iterator) { + StackIterateSession *session = payload; + session->callback( + session->payload, + iterator->node->state, + iterator->subtree_count + ); + return StackActionNone; +} + +void ts_stack_iterate(Stack *self, StackVersion version, + StackIterateCallback callback, void *payload) { + StackIterateSession session = {payload, callback}; + stack__iter(self, version, iterate_callback, &session, -1); +} + +inline StackAction pop_count_callback(void *payload, const StackIterator *iterator) { + unsigned *goal_subtree_count = payload; + if (iterator->subtree_count == *goal_subtree_count) { + return StackActionPop | StackActionStop; + } else { + return StackActionNone; + } +} + +StackSliceArray ts_stack_pop_count(Stack *self, StackVersion version, uint32_t count) { + return stack__iter(self, version, pop_count_callback, &count, count); +} + +inline StackAction pop_pending_callback(void *payload, const StackIterator *iterator) { + (void)payload; + if (iterator->subtree_count >= 1) { + if (iterator->is_pending) { + return StackActionPop | StackActionStop; + } else { + return StackActionStop; + } + } else { + return StackActionNone; + } +} + +StackSliceArray ts_stack_pop_pending(Stack *self, StackVersion version) { + StackSliceArray pop = stack__iter(self, version, pop_pending_callback, NULL, 0); + if (pop.size > 0) { + ts_stack_renumber_version(self, pop.contents[0].version, version); + pop.contents[0].version = version; + } + return pop; +} + +inline StackAction pop_error_callback(void *payload, const StackIterator *iterator) { + if (iterator->subtrees.size > 0) { + bool *found_error = payload; + if (!*found_error && ts_subtree_is_error(iterator->subtrees.contents[0])) { + *found_error = true; + return StackActionPop | StackActionStop; + } else { + return StackActionStop; + } + } else { + return StackActionNone; + } +} + +SubtreeArray ts_stack_pop_error(Stack *self, StackVersion version) { + StackNode *node = array_get(&self->heads, version)->node; + for (unsigned i = 0; i < node->link_count; i++) { + if (node->links[i].subtree.ptr && ts_subtree_is_error(node->links[i].subtree)) { + bool found_error = false; + StackSliceArray pop = stack__iter(self, version, pop_error_callback, &found_error, 1); + if (pop.size > 0) { + assert(pop.size == 1); + ts_stack_renumber_version(self, pop.contents[0].version, version); + return pop.contents[0].subtrees; + } + break; + } + } + return (SubtreeArray){.size = 0}; +} + +inline StackAction pop_all_callback(void *payload, const StackIterator *iterator) { + (void)payload; + return iterator->node->link_count == 0 ? StackActionPop : StackActionNone; +} + +StackSliceArray ts_stack_pop_all(Stack *self, StackVersion version) { + return stack__iter(self, version, pop_all_callback, NULL, 0); +} + +typedef struct { + StackSummary *summary; + unsigned max_depth; +} SummarizeStackSession; + +inline StackAction summarize_stack_callback(void *payload, const StackIterator *iterator) { + SummarizeStackSession *session = payload; + TSStateId state = iterator->node->state; + unsigned depth = iterator->subtree_count; + if (depth > session->max_depth) return StackActionStop; + for (unsigned i = session->summary->size - 1; i + 1 > 0; i--) { + StackSummaryEntry entry = session->summary->contents[i]; + if (entry.depth < depth) break; + if (entry.depth == depth && entry.state == state) return StackActionNone; + } + array_push(session->summary, ((StackSummaryEntry){ + .position = iterator->node->position, + .depth = depth, + .state = state, + })); + return StackActionNone; +} + +void ts_stack_record_summary(Stack *self, StackVersion version, unsigned max_depth) { + SummarizeStackSession session = { + .summary = ts_malloc(sizeof(StackSummary)), + .max_depth = max_depth + }; + array_init(session.summary); + stack__iter(self, version, summarize_stack_callback, &session, -1); + StackHead *head = &self->heads.contents[version]; + if (head->summary) { + array_delete(head->summary); + ts_free(head->summary); + } + head->summary = session.summary; +} + +StackSummary *ts_stack_get_summary(Stack *self, StackVersion version) { + return array_get(&self->heads, version)->summary; +} + +int ts_stack_dynamic_precedence(Stack *self, StackVersion version) { + return array_get(&self->heads, version)->node->dynamic_precedence; +} + +bool ts_stack_has_advanced_since_error(const Stack *self, StackVersion version) { + const StackHead *head = array_get(&self->heads, version); + const StackNode *node = head->node; + if (node->error_cost == 0) return true; + while (node) { + if (node->link_count > 0) { + Subtree subtree = node->links[0].subtree; + if (subtree.ptr) { + if (ts_subtree_total_bytes(subtree) > 0) { + return true; + } else if ( + node->node_count > head->node_count_at_last_error && + ts_subtree_error_cost(subtree) == 0 + ) { + node = node->links[0].node; + continue; + } + } + } + break; + } + return false; +} + +void ts_stack_remove_version(Stack *self, StackVersion version) { + stack_head_delete(array_get(&self->heads, version), &self->node_pool, self->subtree_pool); + array_erase(&self->heads, version); +} + +void ts_stack_renumber_version(Stack *self, StackVersion v1, StackVersion v2) { + if (v1 == v2) return; + assert(v2 < v1); + assert((uint32_t)v1 < self->heads.size); + StackHead *source_head = &self->heads.contents[v1]; + StackHead *target_head = &self->heads.contents[v2]; + if (target_head->summary && !source_head->summary) { + source_head->summary = target_head->summary; + target_head->summary = NULL; + } + stack_head_delete(target_head, &self->node_pool, self->subtree_pool); + *target_head = *source_head; + array_erase(&self->heads, v1); +} + +void ts_stack_swap_versions(Stack *self, StackVersion v1, StackVersion v2) { + StackHead temporary_head = self->heads.contents[v1]; + self->heads.contents[v1] = self->heads.contents[v2]; + self->heads.contents[v2] = temporary_head; +} + +StackVersion ts_stack_copy_version(Stack *self, StackVersion version) { + assert(version < self->heads.size); + array_push(&self->heads, self->heads.contents[version]); + StackHead *head = array_back(&self->heads); + stack_node_retain(head->node); + if (head->last_external_token.ptr) ts_subtree_retain(head->last_external_token); + head->summary = NULL; + return self->heads.size - 1; +} + +bool ts_stack_merge(Stack *self, StackVersion version1, StackVersion version2) { + if (!ts_stack_can_merge(self, version1, version2)) return false; + StackHead *head1 = &self->heads.contents[version1]; + StackHead *head2 = &self->heads.contents[version2]; + for (uint32_t i = 0; i < head2->node->link_count; i++) { + stack_node_add_link(head1->node, head2->node->links[i], self->subtree_pool); + } + if (head1->node->state == ERROR_STATE) { + head1->node_count_at_last_error = head1->node->node_count; + } + ts_stack_remove_version(self, version2); + return true; +} + +bool ts_stack_can_merge(Stack *self, StackVersion version1, StackVersion version2) { + StackHead *head1 = &self->heads.contents[version1]; + StackHead *head2 = &self->heads.contents[version2]; + return + head1->status == StackStatusActive && + head2->status == StackStatusActive && + head1->node->state == head2->node->state && + head1->node->position.bytes == head2->node->position.bytes && + head1->node->error_cost == head2->node->error_cost && + ts_subtree_external_scanner_state_eq(head1->last_external_token, head2->last_external_token); +} + +void ts_stack_halt(Stack *self, StackVersion version) { + array_get(&self->heads, version)->status = StackStatusHalted; +} + +void ts_stack_pause(Stack *self, StackVersion version, TSSymbol lookahead) { + StackHead *head = array_get(&self->heads, version); + head->status = StackStatusPaused; + head->lookahead_when_paused = lookahead; + head->node_count_at_last_error = head->node->node_count; +} + +bool ts_stack_is_active(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->status == StackStatusActive; +} + +bool ts_stack_is_halted(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->status == StackStatusHalted; +} + +bool ts_stack_is_paused(const Stack *self, StackVersion version) { + return array_get(&self->heads, version)->status == StackStatusPaused; +} + +TSSymbol ts_stack_resume(Stack *self, StackVersion version) { + StackHead *head = array_get(&self->heads, version); + assert(head->status == StackStatusPaused); + TSSymbol result = head->lookahead_when_paused; + head->status = StackStatusActive; + head->lookahead_when_paused = 0; + return result; +} + +void ts_stack_clear(Stack *self) { + stack_node_retain(self->base_node); + for (uint32_t i = 0; i < self->heads.size; i++) { + stack_head_delete(&self->heads.contents[i], &self->node_pool, self->subtree_pool); + } + array_clear(&self->heads); + array_push(&self->heads, ((StackHead){ + .node = self->base_node, + .last_external_token = NULL_SUBTREE, + .status = StackStatusActive, + .lookahead_when_paused = 0, + })); +} + +bool ts_stack_print_dot_graph(Stack *self, const TSLanguage *language, FILE *f) { + array_reserve(&self->iterators, 32); + bool was_recording_allocations = ts_toggle_allocation_recording(false); + if (!f) f = stderr; + + fprintf(f, "digraph stack {\n"); + fprintf(f, "rankdir=\"RL\";\n"); + fprintf(f, "edge [arrowhead=none]\n"); + + Array(StackNode *) visited_nodes = array_new(); + + array_clear(&self->iterators); + for (uint32_t i = 0; i < self->heads.size; i++) { + StackHead *head = &self->heads.contents[i]; + if (head->status == StackStatusHalted) continue; + + fprintf(f, "node_head_%u [shape=none, label=\"\"]\n", i); + fprintf(f, "node_head_%u -> node_%p [", i, head->node); + + if (head->status == StackStatusPaused) { + fprintf(f, "color=red "); + } + fprintf(f, + "label=%u, fontcolor=blue, weight=10000, labeltooltip=\"node_count: %u\nerror_cost: %u", + i, + ts_stack_node_count_since_error(self, i), + ts_stack_error_cost(self, i) + ); + + if (head->summary) { + fprintf(f, "\nsummary_size: %u", head->summary->size); + } + + if (head->last_external_token.ptr) { + const ExternalScannerState *state = &head->last_external_token.ptr->external_scanner_state; + const char *data = ts_external_scanner_state_data(state); + fprintf(f, "\nexternal_scanner_state:"); + for (uint32_t j = 0; j < state->length; j++) fprintf(f, " %2X", data[j]); + } + + fprintf(f, "\"]\n"); + array_push(&self->iterators, ((StackIterator){.node = head->node })); + } + + bool all_iterators_done = false; + while (!all_iterators_done) { + all_iterators_done = true; + + for (uint32_t i = 0; i < self->iterators.size; i++) { + StackIterator iterator = self->iterators.contents[i]; + StackNode *node = iterator.node; + + for (uint32_t j = 0; j < visited_nodes.size; j++) { + if (visited_nodes.contents[j] == node) { + node = NULL; + break; + } + } + + if (!node) continue; + all_iterators_done = false; + + fprintf(f, "node_%p [", node); + if (node->state == ERROR_STATE) { + fprintf(f, "label=\"?\""); + } else if ( + node->link_count == 1 && + node->links[0].subtree.ptr && + ts_subtree_extra(node->links[0].subtree) + ) { + fprintf(f, "shape=point margin=0 label=\"\""); + } else { + fprintf(f, "label=\"%d\"", node->state); + } + + fprintf( + f, + " tooltip=\"position: %u,%u\nnode_count:%u\nerror_cost: %u\ndynamic_precedence: %d\"];\n", + node->position.extent.row + 1, + node->position.extent.column, + node->node_count, + node->error_cost, + node->dynamic_precedence + ); + + for (int j = 0; j < node->link_count; j++) { + StackLink link = node->links[j]; + fprintf(f, "node_%p -> node_%p [", node, link.node); + if (link.is_pending) fprintf(f, "style=dashed "); + if (link.subtree.ptr && ts_subtree_extra(link.subtree)) fprintf(f, "fontcolor=gray "); + + if (!link.subtree.ptr) { + fprintf(f, "color=red"); + } else { + fprintf(f, "label=\""); + bool quoted = ts_subtree_visible(link.subtree) && !ts_subtree_named(link.subtree); + if (quoted) fprintf(f, "'"); + const char *name = ts_language_symbol_name(language, ts_subtree_symbol(link.subtree)); + for (const char *c = name; *c; c++) { + if (*c == '\"' || *c == '\\') fprintf(f, "\\"); + fprintf(f, "%c", *c); + } + if (quoted) fprintf(f, "'"); + fprintf(f, "\""); + fprintf( + f, + "labeltooltip=\"error_cost: %u\ndynamic_precedence: %u\"", + ts_subtree_error_cost(link.subtree), + ts_subtree_dynamic_precedence(link.subtree) + ); + } + + fprintf(f, "];\n"); + + StackIterator *next_iterator; + if (j == 0) { + next_iterator = &self->iterators.contents[i]; + } else { + array_push(&self->iterators, iterator); + next_iterator = array_back(&self->iterators); + } + next_iterator->node = link.node; + } + + array_push(&visited_nodes, node); + } + } + + fprintf(f, "}\n"); + + array_delete(&visited_nodes); + ts_toggle_allocation_recording(was_recording_allocations); + return true; +} + +#undef inline diff --git a/third-party/tree-sitter/src/stack.h b/third-party/tree-sitter/src/stack.h new file mode 100644 index 00000000..ec7a69d2 --- /dev/null +++ b/third-party/tree-sitter/src/stack.h @@ -0,0 +1,135 @@ +#ifndef TREE_SITTER_PARSE_STACK_H_ +#define TREE_SITTER_PARSE_STACK_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include "./array.h" +#include "./subtree.h" +#include "./error_costs.h" +#include + +typedef struct Stack Stack; + +typedef unsigned StackVersion; +#define STACK_VERSION_NONE ((StackVersion)-1) + +typedef struct { + SubtreeArray subtrees; + StackVersion version; +} StackSlice; +typedef Array(StackSlice) StackSliceArray; + +typedef struct { + Length position; + unsigned depth; + TSStateId state; +} StackSummaryEntry; +typedef Array(StackSummaryEntry) StackSummary; + +// Create a stack. +Stack *ts_stack_new(SubtreePool *); + +// Release the memory reserved for a given stack. +void ts_stack_delete(Stack *); + +// Get the stack's current number of versions. +uint32_t ts_stack_version_count(const Stack *); + +// Get the state at the top of the given version of the stack. If the stack is +// empty, this returns the initial state, 0. +TSStateId ts_stack_state(const Stack *, StackVersion); + +// Get the last external token associated with a given version of the stack. +Subtree ts_stack_last_external_token(const Stack *, StackVersion); + +// Set the last external token associated with a given version of the stack. +void ts_stack_set_last_external_token(Stack *, StackVersion, Subtree ); + +// Get the position of the given version of the stack within the document. +Length ts_stack_position(const Stack *, StackVersion); + +// Push a tree and state onto the given version of the stack. +// +// This transfers ownership of the tree to the Stack. Callers that +// need to retain ownership of the tree for their own purposes should +// first retain the tree. +void ts_stack_push(Stack *, StackVersion, Subtree , bool, TSStateId); + +// Pop the given number of entries from the given version of the stack. This +// operation can increase the number of stack versions by revealing multiple +// versions which had previously been merged. It returns an array that +// specifies the index of each revealed version and the trees that were +// removed from that version. +StackSliceArray ts_stack_pop_count(Stack *, StackVersion, uint32_t count); + +// Remove an error at the top of the given version of the stack. +SubtreeArray ts_stack_pop_error(Stack *, StackVersion); + +// Remove any pending trees from the top of the given version of the stack. +StackSliceArray ts_stack_pop_pending(Stack *, StackVersion); + +// Remove any all trees from the given version of the stack. +StackSliceArray ts_stack_pop_all(Stack *, StackVersion); + +// Get the maximum number of tree nodes reachable from this version of the stack +// since the last error was detected. +unsigned ts_stack_node_count_since_error(const Stack *, StackVersion); + +int ts_stack_dynamic_precedence(Stack *, StackVersion); + +bool ts_stack_has_advanced_since_error(const Stack *, StackVersion); + +// Compute a summary of all the parse states near the top of the given +// version of the stack and store the summary for later retrieval. +void ts_stack_record_summary(Stack *, StackVersion, unsigned max_depth); + +// Retrieve a summary of all the parse states near the top of the +// given version of the stack. +StackSummary *ts_stack_get_summary(Stack *, StackVersion); + +// Get the total cost of all errors on the given version of the stack. +unsigned ts_stack_error_cost(const Stack *, StackVersion version); + +// Merge the given two stack versions if possible, returning true +// if they were successfully merged and false otherwise. +bool ts_stack_merge(Stack *, StackVersion, StackVersion); + +// Determine whether the given two stack versions can be merged. +bool ts_stack_can_merge(Stack *, StackVersion, StackVersion); + +TSSymbol ts_stack_resume(Stack *, StackVersion); + +void ts_stack_pause(Stack *, StackVersion, TSSymbol); + +void ts_stack_halt(Stack *, StackVersion); + +bool ts_stack_is_active(const Stack *, StackVersion); + +bool ts_stack_is_paused(const Stack *, StackVersion); + +bool ts_stack_is_halted(const Stack *, StackVersion); + +void ts_stack_renumber_version(Stack *, StackVersion, StackVersion); + +void ts_stack_swap_versions(Stack *, StackVersion, StackVersion); + +StackVersion ts_stack_copy_version(Stack *, StackVersion); + +// Remove the given version from the stack. +void ts_stack_remove_version(Stack *, StackVersion); + +void ts_stack_clear(Stack *); + +bool ts_stack_print_dot_graph(Stack *, const TSLanguage *, FILE *); + +typedef void (*StackIterateCallback)(void *, TSStateId, uint32_t); + +void ts_stack_iterate(Stack *, StackVersion, StackIterateCallback, void *); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_PARSE_STACK_H_ diff --git a/third-party/tree-sitter/src/subtree.c b/third-party/tree-sitter/src/subtree.c new file mode 100644 index 00000000..e90dc9d7 --- /dev/null +++ b/third-party/tree-sitter/src/subtree.c @@ -0,0 +1,1034 @@ +#include +#include +#include +#include +#include +#include +#include "./alloc.h" +#include "./atomic.h" +#include "./subtree.h" +#include "./length.h" +#include "./language.h" +#include "./error_costs.h" +#include + +typedef struct { + Length start; + Length old_end; + Length new_end; +} Edit; + +#define TS_MAX_INLINE_TREE_LENGTH UINT8_MAX +#define TS_MAX_TREE_POOL_SIZE 32 + +static const ExternalScannerState empty_state = {{.short_data = {0}}, .length = 0}; + +// ExternalScannerState + +void ts_external_scanner_state_init(ExternalScannerState *self, const char *data, unsigned length) { + self->length = length; + if (length > sizeof(self->short_data)) { + self->long_data = ts_malloc(length); + memcpy(self->long_data, data, length); + } else { + memcpy(self->short_data, data, length); + } +} + +ExternalScannerState ts_external_scanner_state_copy(const ExternalScannerState *self) { + ExternalScannerState result = *self; + if (self->length > sizeof(self->short_data)) { + result.long_data = ts_malloc(self->length); + memcpy(result.long_data, self->long_data, self->length); + } + return result; +} + +void ts_external_scanner_state_delete(ExternalScannerState *self) { + if (self->length > sizeof(self->short_data)) { + ts_free(self->long_data); + } +} + +const char *ts_external_scanner_state_data(const ExternalScannerState *self) { + if (self->length > sizeof(self->short_data)) { + return self->long_data; + } else { + return self->short_data; + } +} + +bool ts_external_scanner_state_eq(const ExternalScannerState *a, const ExternalScannerState *b) { + return a == b || ( + a->length == b->length && + !memcmp(ts_external_scanner_state_data(a), ts_external_scanner_state_data(b), a->length) + ); +} + +// SubtreeArray + +void ts_subtree_array_copy(SubtreeArray self, SubtreeArray *dest) { + dest->size = self.size; + dest->capacity = self.capacity; + dest->contents = self.contents; + if (self.capacity > 0) { + dest->contents = ts_calloc(self.capacity, sizeof(Subtree)); + memcpy(dest->contents, self.contents, self.size * sizeof(Subtree)); + for (uint32_t i = 0; i < self.size; i++) { + ts_subtree_retain(dest->contents[i]); + } + } +} + +void ts_subtree_array_clear(SubtreePool *pool, SubtreeArray *self) { + for (uint32_t i = 0; i < self->size; i++) { + ts_subtree_release(pool, self->contents[i]); + } + array_clear(self); +} + +void ts_subtree_array_delete(SubtreePool *pool, SubtreeArray *self) { + ts_subtree_array_clear(pool, self); + array_delete(self); +} + +void ts_subtree_array_remove_trailing_extras( + SubtreeArray *self, + SubtreeArray *destination +) { + array_clear(destination); + while (self->size > 0) { + Subtree last = self->contents[self->size - 1]; + if (ts_subtree_extra(last)) { + self->size--; + array_push(destination, last); + } else { + break; + } + } + ts_subtree_array_reverse(destination); +} + +void ts_subtree_array_reverse(SubtreeArray *self) { + for (uint32_t i = 0, limit = self->size / 2; i < limit; i++) { + size_t reverse_index = self->size - 1 - i; + Subtree swap = self->contents[i]; + self->contents[i] = self->contents[reverse_index]; + self->contents[reverse_index] = swap; + } +} + +// SubtreePool + +SubtreePool ts_subtree_pool_new(uint32_t capacity) { + SubtreePool self = {array_new(), array_new()}; + array_reserve(&self.free_trees, capacity); + return self; +} + +void ts_subtree_pool_delete(SubtreePool *self) { + if (self->free_trees.contents) { + for (unsigned i = 0; i < self->free_trees.size; i++) { + ts_free(self->free_trees.contents[i].ptr); + } + array_delete(&self->free_trees); + } + if (self->tree_stack.contents) array_delete(&self->tree_stack); +} + +static SubtreeHeapData *ts_subtree_pool_allocate(SubtreePool *self) { + if (self->free_trees.size > 0) { + return array_pop(&self->free_trees).ptr; + } else { + return ts_malloc(sizeof(SubtreeHeapData)); + } +} + +static void ts_subtree_pool_free(SubtreePool *self, SubtreeHeapData *tree) { + if (self->free_trees.capacity > 0 && self->free_trees.size + 1 <= TS_MAX_TREE_POOL_SIZE) { + array_push(&self->free_trees, (MutableSubtree) {.ptr = tree}); + } else { + ts_free(tree); + } +} + +// Subtree + +static inline bool ts_subtree_can_inline(Length padding, Length size, uint32_t lookahead_bytes) { + return + padding.bytes < TS_MAX_INLINE_TREE_LENGTH && + padding.extent.row < 16 && + padding.extent.column < TS_MAX_INLINE_TREE_LENGTH && + size.extent.row == 0 && + size.extent.column < TS_MAX_INLINE_TREE_LENGTH && + lookahead_bytes < 16; +} + +Subtree ts_subtree_new_leaf( + SubtreePool *pool, TSSymbol symbol, Length padding, Length size, + uint32_t lookahead_bytes, TSStateId parse_state, bool has_external_tokens, + bool is_keyword, const TSLanguage *language +) { + TSSymbolMetadata metadata = ts_language_symbol_metadata(language, symbol); + bool extra = symbol == ts_builtin_sym_end; + + bool is_inline = ( + symbol <= UINT8_MAX && + !has_external_tokens && + ts_subtree_can_inline(padding, size, lookahead_bytes) + ); + + if (is_inline) { + return (Subtree) {{ + .parse_state = parse_state, + .symbol = symbol, + .padding_bytes = padding.bytes, + .padding_rows = padding.extent.row, + .padding_columns = padding.extent.column, + .size_bytes = size.bytes, + .lookahead_bytes = lookahead_bytes, + .visible = metadata.visible, + .named = metadata.named, + .extra = extra, + .has_changes = false, + .is_missing = false, + .is_keyword = is_keyword, + .is_inline = true, + }}; + } else { + SubtreeHeapData *data = ts_subtree_pool_allocate(pool); + *data = (SubtreeHeapData) { + .ref_count = 1, + .padding = padding, + .size = size, + .lookahead_bytes = lookahead_bytes, + .error_cost = 0, + .child_count = 0, + .symbol = symbol, + .parse_state = parse_state, + .visible = metadata.visible, + .named = metadata.named, + .extra = extra, + .fragile_left = false, + .fragile_right = false, + .has_changes = false, + .has_external_tokens = has_external_tokens, + .is_missing = false, + .is_keyword = is_keyword, + {{.first_leaf = {.symbol = 0, .parse_state = 0}}} + }; + return (Subtree) {.ptr = data}; + } +} + +void ts_subtree_set_symbol( + MutableSubtree *self, + TSSymbol symbol, + const TSLanguage *language +) { + TSSymbolMetadata metadata = ts_language_symbol_metadata(language, symbol); + if (self->data.is_inline) { + assert(symbol < UINT8_MAX); + self->data.symbol = symbol; + self->data.named = metadata.named; + self->data.visible = metadata.visible; + } else { + self->ptr->symbol = symbol; + self->ptr->named = metadata.named; + self->ptr->visible = metadata.visible; + } +} + +Subtree ts_subtree_new_error( + SubtreePool *pool, int32_t lookahead_char, Length padding, Length size, + uint32_t bytes_scanned, TSStateId parse_state, const TSLanguage *language +) { + Subtree result = ts_subtree_new_leaf( + pool, ts_builtin_sym_error, padding, size, bytes_scanned, + parse_state, false, false, language + ); + SubtreeHeapData *data = (SubtreeHeapData *)result.ptr; + data->fragile_left = true; + data->fragile_right = true; + data->lookahead_char = lookahead_char; + return result; +} + +// Clone a subtree. +MutableSubtree ts_subtree_clone(Subtree self) { + size_t alloc_size = ts_subtree_alloc_size(self.ptr->child_count); + Subtree *new_children = ts_malloc(alloc_size); + Subtree *old_children = ts_subtree_children(self); + memcpy(new_children, old_children, alloc_size); + SubtreeHeapData *result = (SubtreeHeapData *)&new_children[self.ptr->child_count]; + if (self.ptr->child_count > 0) { + for (uint32_t i = 0; i < self.ptr->child_count; i++) { + ts_subtree_retain(new_children[i]); + } + } else if (self.ptr->has_external_tokens) { + result->external_scanner_state = ts_external_scanner_state_copy( + &self.ptr->external_scanner_state + ); + } + result->ref_count = 1; + return (MutableSubtree) {.ptr = result}; +} + +// Get mutable version of a subtree. +// +// This takes ownership of the subtree. If the subtree has only one owner, +// this will directly convert it into a mutable version. Otherwise, it will +// perform a copy. +MutableSubtree ts_subtree_make_mut(SubtreePool *pool, Subtree self) { + if (self.data.is_inline) return (MutableSubtree) {self.data}; + if (self.ptr->ref_count == 1) return ts_subtree_to_mut_unsafe(self); + MutableSubtree result = ts_subtree_clone(self); + ts_subtree_release(pool, self); + return result; +} + +static void ts_subtree__compress( + MutableSubtree self, + unsigned count, + const TSLanguage *language, + MutableSubtreeArray *stack +) { + unsigned initial_stack_size = stack->size; + + MutableSubtree tree = self; + TSSymbol symbol = tree.ptr->symbol; + for (unsigned i = 0; i < count; i++) { + if (tree.ptr->ref_count > 1 || tree.ptr->child_count < 2) break; + + MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); + if ( + child.data.is_inline || + child.ptr->child_count < 2 || + child.ptr->ref_count > 1 || + child.ptr->symbol != symbol + ) break; + + MutableSubtree grandchild = ts_subtree_to_mut_unsafe(ts_subtree_children(child)[0]); + if ( + grandchild.data.is_inline || + grandchild.ptr->child_count < 2 || + grandchild.ptr->ref_count > 1 || + grandchild.ptr->symbol != symbol + ) break; + + ts_subtree_children(tree)[0] = ts_subtree_from_mut(grandchild); + ts_subtree_children(child)[0] = ts_subtree_children(grandchild)[grandchild.ptr->child_count - 1]; + ts_subtree_children(grandchild)[grandchild.ptr->child_count - 1] = ts_subtree_from_mut(child); + array_push(stack, tree); + tree = grandchild; + } + + while (stack->size > initial_stack_size) { + tree = array_pop(stack); + MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); + MutableSubtree grandchild = ts_subtree_to_mut_unsafe(ts_subtree_children(child)[child.ptr->child_count - 1]); + ts_subtree_summarize_children(grandchild, language); + ts_subtree_summarize_children(child, language); + ts_subtree_summarize_children(tree, language); + } +} + +void ts_subtree_balance(Subtree self, SubtreePool *pool, const TSLanguage *language) { + array_clear(&pool->tree_stack); + + if (ts_subtree_child_count(self) > 0 && self.ptr->ref_count == 1) { + array_push(&pool->tree_stack, ts_subtree_to_mut_unsafe(self)); + } + + while (pool->tree_stack.size > 0) { + MutableSubtree tree = array_pop(&pool->tree_stack); + + if (tree.ptr->repeat_depth > 0) { + Subtree child1 = ts_subtree_children(tree)[0]; + Subtree child2 = ts_subtree_children(tree)[tree.ptr->child_count - 1]; + long repeat_delta = (long)ts_subtree_repeat_depth(child1) - (long)ts_subtree_repeat_depth(child2); + if (repeat_delta > 0) { + unsigned n = repeat_delta; + for (unsigned i = n / 2; i > 0; i /= 2) { + ts_subtree__compress(tree, i, language, &pool->tree_stack); + n -= i; + } + } + } + + for (uint32_t i = 0; i < tree.ptr->child_count; i++) { + Subtree child = ts_subtree_children(tree)[i]; + if (ts_subtree_child_count(child) > 0 && child.ptr->ref_count == 1) { + array_push(&pool->tree_stack, ts_subtree_to_mut_unsafe(child)); + } + } + } +} + +// Assign all of the node's properties that depend on its children. +void ts_subtree_summarize_children( + MutableSubtree self, + const TSLanguage *language +) { + assert(!self.data.is_inline); + + self.ptr->named_child_count = 0; + self.ptr->visible_child_count = 0; + self.ptr->error_cost = 0; + self.ptr->repeat_depth = 0; + self.ptr->node_count = 1; + self.ptr->has_external_tokens = false; + self.ptr->dynamic_precedence = 0; + + uint32_t structural_index = 0; + const TSSymbol *alias_sequence = ts_language_alias_sequence(language, self.ptr->production_id); + uint32_t lookahead_end_byte = 0; + + const Subtree *children = ts_subtree_children(self); + for (uint32_t i = 0; i < self.ptr->child_count; i++) { + Subtree child = children[i]; + + if (i == 0) { + self.ptr->padding = ts_subtree_padding(child); + self.ptr->size = ts_subtree_size(child); + } else { + self.ptr->size = length_add(self.ptr->size, ts_subtree_total_size(child)); + } + + uint32_t child_lookahead_end_byte = + self.ptr->padding.bytes + + self.ptr->size.bytes + + ts_subtree_lookahead_bytes(child); + if (child_lookahead_end_byte > lookahead_end_byte) lookahead_end_byte = child_lookahead_end_byte; + + if (ts_subtree_symbol(child) != ts_builtin_sym_error_repeat) { + self.ptr->error_cost += ts_subtree_error_cost(child); + } + + uint32_t grandchild_count = ts_subtree_child_count(child); + if (self.ptr->symbol == ts_builtin_sym_error || self.ptr->symbol == ts_builtin_sym_error_repeat) { + if (!ts_subtree_extra(child) && !(ts_subtree_is_error(child) && grandchild_count == 0)) { + if (ts_subtree_visible(child)) { + self.ptr->error_cost += ERROR_COST_PER_SKIPPED_TREE; + } else if (grandchild_count > 0) { + self.ptr->error_cost += ERROR_COST_PER_SKIPPED_TREE * child.ptr->visible_child_count; + } + } + } + + self.ptr->dynamic_precedence += ts_subtree_dynamic_precedence(child); + self.ptr->node_count += ts_subtree_node_count(child); + + if (alias_sequence && alias_sequence[structural_index] != 0 && !ts_subtree_extra(child)) { + self.ptr->visible_child_count++; + if (ts_language_symbol_metadata(language, alias_sequence[structural_index]).named) { + self.ptr->named_child_count++; + } + } else if (ts_subtree_visible(child)) { + self.ptr->visible_child_count++; + if (ts_subtree_named(child)) self.ptr->named_child_count++; + } else if (grandchild_count > 0) { + self.ptr->visible_child_count += child.ptr->visible_child_count; + self.ptr->named_child_count += child.ptr->named_child_count; + } + + if (ts_subtree_has_external_tokens(child)) self.ptr->has_external_tokens = true; + + if (ts_subtree_is_error(child)) { + self.ptr->fragile_left = self.ptr->fragile_right = true; + self.ptr->parse_state = TS_TREE_STATE_NONE; + } + + if (!ts_subtree_extra(child)) structural_index++; + } + + self.ptr->lookahead_bytes = lookahead_end_byte - self.ptr->size.bytes - self.ptr->padding.bytes; + + if (self.ptr->symbol == ts_builtin_sym_error || self.ptr->symbol == ts_builtin_sym_error_repeat) { + self.ptr->error_cost += + ERROR_COST_PER_RECOVERY + + ERROR_COST_PER_SKIPPED_CHAR * self.ptr->size.bytes + + ERROR_COST_PER_SKIPPED_LINE * self.ptr->size.extent.row; + } + + if (self.ptr->child_count > 0) { + Subtree first_child = children[0]; + Subtree last_child = children[self.ptr->child_count - 1]; + + self.ptr->first_leaf.symbol = ts_subtree_leaf_symbol(first_child); + self.ptr->first_leaf.parse_state = ts_subtree_leaf_parse_state(first_child); + + if (ts_subtree_fragile_left(first_child)) self.ptr->fragile_left = true; + if (ts_subtree_fragile_right(last_child)) self.ptr->fragile_right = true; + + if ( + self.ptr->child_count >= 2 && + !self.ptr->visible && + !self.ptr->named && + ts_subtree_symbol(first_child) == self.ptr->symbol + ) { + if (ts_subtree_repeat_depth(first_child) > ts_subtree_repeat_depth(last_child)) { + self.ptr->repeat_depth = ts_subtree_repeat_depth(first_child) + 1; + } else { + self.ptr->repeat_depth = ts_subtree_repeat_depth(last_child) + 1; + } + } + } +} + +// Create a new parent node with the given children. +// +// This takes ownership of the children array. +MutableSubtree ts_subtree_new_node( + TSSymbol symbol, + SubtreeArray *children, + unsigned production_id, + const TSLanguage *language +) { + TSSymbolMetadata metadata = ts_language_symbol_metadata(language, symbol); + bool fragile = symbol == ts_builtin_sym_error || symbol == ts_builtin_sym_error_repeat; + + // Allocate the node's data at the end of the array of children. + size_t new_byte_size = ts_subtree_alloc_size(children->size); + if (children->capacity * sizeof(Subtree) < new_byte_size) { + children->contents = ts_realloc(children->contents, new_byte_size); + children->capacity = new_byte_size / sizeof(Subtree); + } + SubtreeHeapData *data = (SubtreeHeapData *)&children->contents[children->size]; + + *data = (SubtreeHeapData) { + .ref_count = 1, + .symbol = symbol, + .child_count = children->size, + .visible = metadata.visible, + .named = metadata.named, + .has_changes = false, + .fragile_left = fragile, + .fragile_right = fragile, + .is_keyword = false, + {{ + .node_count = 0, + .production_id = production_id, + .first_leaf = {.symbol = 0, .parse_state = 0}, + }} + }; + MutableSubtree result = {.ptr = data}; + ts_subtree_summarize_children(result, language); + return result; +} + +// Create a new error node contaning the given children. +// +// This node is treated as 'extra'. Its children are prevented from having +// having any effect on the parse state. +Subtree ts_subtree_new_error_node( + SubtreeArray *children, + bool extra, + const TSLanguage *language +) { + MutableSubtree result = ts_subtree_new_node( + ts_builtin_sym_error, children, 0, language + ); + result.ptr->extra = extra; + return ts_subtree_from_mut(result); +} + +// Create a new 'missing leaf' node. +// +// This node is treated as 'extra'. Its children are prevented from having +// having any effect on the parse state. +Subtree ts_subtree_new_missing_leaf( + SubtreePool *pool, + TSSymbol symbol, + Length padding, + const TSLanguage *language +) { + Subtree result = ts_subtree_new_leaf( + pool, symbol, padding, length_zero(), 0, + 0, false, false, language + ); + if (result.data.is_inline) { + result.data.is_missing = true; + } else { + ((SubtreeHeapData *)result.ptr)->is_missing = true; + } + return result; +} + +void ts_subtree_retain(Subtree self) { + if (self.data.is_inline) return; + assert(self.ptr->ref_count > 0); + atomic_inc((volatile uint32_t *)&self.ptr->ref_count); + assert(self.ptr->ref_count != 0); +} + +void ts_subtree_release(SubtreePool *pool, Subtree self) { + if (self.data.is_inline) return; + array_clear(&pool->tree_stack); + + assert(self.ptr->ref_count > 0); + if (atomic_dec((volatile uint32_t *)&self.ptr->ref_count) == 0) { + array_push(&pool->tree_stack, ts_subtree_to_mut_unsafe(self)); + } + + while (pool->tree_stack.size > 0) { + MutableSubtree tree = array_pop(&pool->tree_stack); + if (tree.ptr->child_count > 0) { + Subtree *children = ts_subtree_children(tree); + for (uint32_t i = 0; i < tree.ptr->child_count; i++) { + Subtree child = children[i]; + if (child.data.is_inline) continue; + assert(child.ptr->ref_count > 0); + if (atomic_dec((volatile uint32_t *)&child.ptr->ref_count) == 0) { + array_push(&pool->tree_stack, ts_subtree_to_mut_unsafe(child)); + } + } + ts_free(children); + } else { + if (tree.ptr->has_external_tokens) { + ts_external_scanner_state_delete(&tree.ptr->external_scanner_state); + } + ts_subtree_pool_free(pool, tree.ptr); + } + } +} + +bool ts_subtree_eq(Subtree self, Subtree other) { + if (self.data.is_inline || other.data.is_inline) { + return memcmp(&self, &other, sizeof(SubtreeInlineData)) == 0; + } + + if (self.ptr) { + if (!other.ptr) return false; + } else { + return !other.ptr; + } + + if (self.ptr->symbol != other.ptr->symbol) return false; + if (self.ptr->visible != other.ptr->visible) return false; + if (self.ptr->named != other.ptr->named) return false; + if (self.ptr->padding.bytes != other.ptr->padding.bytes) return false; + if (self.ptr->size.bytes != other.ptr->size.bytes) return false; + if (self.ptr->symbol == ts_builtin_sym_error) return self.ptr->lookahead_char == other.ptr->lookahead_char; + if (self.ptr->child_count != other.ptr->child_count) return false; + if (self.ptr->child_count > 0) { + if (self.ptr->visible_child_count != other.ptr->visible_child_count) return false; + if (self.ptr->named_child_count != other.ptr->named_child_count) return false; + + for (uint32_t i = 0; i < self.ptr->child_count; i++) { + if (!ts_subtree_eq(ts_subtree_children(self)[i], ts_subtree_children(other)[i])) { + return false; + } + } + } + return true; +} + +int ts_subtree_compare(Subtree left, Subtree right) { + if (ts_subtree_symbol(left) < ts_subtree_symbol(right)) return -1; + if (ts_subtree_symbol(right) < ts_subtree_symbol(left)) return 1; + if (ts_subtree_child_count(left) < ts_subtree_child_count(right)) return -1; + if (ts_subtree_child_count(right) < ts_subtree_child_count(left)) return 1; + for (uint32_t i = 0, n = ts_subtree_child_count(left); i < n; i++) { + Subtree left_child = ts_subtree_children(left)[i]; + Subtree right_child = ts_subtree_children(right)[i]; + switch (ts_subtree_compare(left_child, right_child)) { + case -1: return -1; + case 1: return 1; + default: break; + } + } + return 0; +} + +static inline void ts_subtree_set_has_changes(MutableSubtree *self) { + if (self->data.is_inline) { + self->data.has_changes = true; + } else { + self->ptr->has_changes = true; + } +} + +Subtree ts_subtree_edit(Subtree self, const TSInputEdit *edit, SubtreePool *pool) { + typedef struct { + Subtree *tree; + Edit edit; + } StackEntry; + + Array(StackEntry) stack = array_new(); + array_push(&stack, ((StackEntry) { + .tree = &self, + .edit = (Edit) { + .start = {edit->start_byte, edit->start_point}, + .old_end = {edit->old_end_byte, edit->old_end_point}, + .new_end = {edit->new_end_byte, edit->new_end_point}, + }, + })); + + while (stack.size) { + StackEntry entry = array_pop(&stack); + Edit edit = entry.edit; + bool is_noop = edit.old_end.bytes == edit.start.bytes && edit.new_end.bytes == edit.start.bytes; + bool is_pure_insertion = edit.old_end.bytes == edit.start.bytes; + + Length size = ts_subtree_size(*entry.tree); + Length padding = ts_subtree_padding(*entry.tree); + uint32_t lookahead_bytes = ts_subtree_lookahead_bytes(*entry.tree); + uint32_t end_byte = padding.bytes + size.bytes + lookahead_bytes; + if (edit.start.bytes > end_byte || (is_noop && edit.start.bytes == end_byte)) continue; + + // If the edit is entirely within the space before this subtree, then shift this + // subtree over according to the edit without changing its size. + if (edit.old_end.bytes <= padding.bytes) { + padding = length_add(edit.new_end, length_sub(padding, edit.old_end)); + } + + // If the edit starts in the space before this subtree and extends into this subtree, + // shrink the subtree's content to compensate for the change in the space before it. + else if (edit.start.bytes < padding.bytes) { + size = length_sub(size, length_sub(edit.old_end, padding)); + padding = edit.new_end; + } + + // If the edit is a pure insertion right at the start of the subtree, + // shift the subtree over according to the insertion. + else if (edit.start.bytes == padding.bytes && is_pure_insertion) { + padding = edit.new_end; + } + + // If the edit is within this subtree, resize the subtree to reflect the edit. + else { + uint32_t total_bytes = padding.bytes + size.bytes; + if (edit.start.bytes < total_bytes || + (edit.start.bytes == total_bytes && is_pure_insertion)) { + size = length_add( + length_sub(edit.new_end, padding), + length_sub(size, length_sub(edit.old_end, padding)) + ); + } + } + + MutableSubtree result = ts_subtree_make_mut(pool, *entry.tree); + + if (result.data.is_inline) { + if (ts_subtree_can_inline(padding, size, lookahead_bytes)) { + result.data.padding_bytes = padding.bytes; + result.data.padding_rows = padding.extent.row; + result.data.padding_columns = padding.extent.column; + result.data.size_bytes = size.bytes; + } else { + SubtreeHeapData *data = ts_subtree_pool_allocate(pool); + data->ref_count = 1; + data->padding = padding; + data->size = size; + data->lookahead_bytes = lookahead_bytes; + data->error_cost = 0; + data->child_count = 0; + data->symbol = result.data.symbol; + data->parse_state = result.data.parse_state; + data->visible = result.data.visible; + data->named = result.data.named; + data->extra = result.data.extra; + data->fragile_left = false; + data->fragile_right = false; + data->has_changes = false; + data->has_external_tokens = false; + data->is_missing = result.data.is_missing; + data->is_keyword = result.data.is_keyword; + result.ptr = data; + } + } else { + result.ptr->padding = padding; + result.ptr->size = size; + } + + ts_subtree_set_has_changes(&result); + *entry.tree = ts_subtree_from_mut(result); + + Length child_left, child_right = length_zero(); + for (uint32_t i = 0, n = ts_subtree_child_count(*entry.tree); i < n; i++) { + Subtree *child = &ts_subtree_children(*entry.tree)[i]; + Length child_size = ts_subtree_total_size(*child); + child_left = child_right; + child_right = length_add(child_left, child_size); + + // If this child ends before the edit, it is not affected. + if (child_right.bytes + ts_subtree_lookahead_bytes(*child) < edit.start.bytes) continue; + + // If this child starts after the edit, then we're done processing children. + if (child_left.bytes > edit.old_end.bytes || + (child_left.bytes == edit.old_end.bytes && child_size.bytes > 0 && i > 0)) break; + + // Transform edit into the child's coordinate space. + Edit child_edit = { + .start = length_sub(edit.start, child_left), + .old_end = length_sub(edit.old_end, child_left), + .new_end = length_sub(edit.new_end, child_left), + }; + + // Clamp child_edit to the child's bounds. + if (edit.start.bytes < child_left.bytes) child_edit.start = length_zero(); + if (edit.old_end.bytes < child_left.bytes) child_edit.old_end = length_zero(); + if (edit.new_end.bytes < child_left.bytes) child_edit.new_end = length_zero(); + if (edit.old_end.bytes > child_right.bytes) child_edit.old_end = child_size; + + // Interpret all inserted text as applying to the *first* child that touches the edit. + // Subsequent children are only never have any text inserted into them; they are only + // shrunk to compensate for the edit. + if (child_right.bytes > edit.start.bytes || + (child_right.bytes == edit.start.bytes && is_pure_insertion)) { + edit.new_end = edit.start; + } + + // Children that occur before the edit are not reshaped by the edit. + else { + child_edit.old_end = child_edit.start; + child_edit.new_end = child_edit.start; + } + + // Queue processing of this child's subtree. + array_push(&stack, ((StackEntry) { + .tree = child, + .edit = child_edit, + })); + } + } + + array_delete(&stack); + return self; +} + +Subtree ts_subtree_last_external_token(Subtree tree) { + if (!ts_subtree_has_external_tokens(tree)) return NULL_SUBTREE; + while (tree.ptr->child_count > 0) { + for (uint32_t i = tree.ptr->child_count - 1; i + 1 > 0; i--) { + Subtree child = ts_subtree_children(tree)[i]; + if (ts_subtree_has_external_tokens(child)) { + tree = child; + break; + } + } + } + return tree; +} + +static size_t ts_subtree__write_char_to_string(char *s, size_t n, int32_t c) { + if (c == -1) + return snprintf(s, n, "INVALID"); + else if (c == '\0') + return snprintf(s, n, "'\\0'"); + else if (c == '\n') + return snprintf(s, n, "'\\n'"); + else if (c == '\t') + return snprintf(s, n, "'\\t'"); + else if (c == '\r') + return snprintf(s, n, "'\\r'"); + else if (0 < c && c < 128 && isprint(c)) + return snprintf(s, n, "'%c'", c); + else + return snprintf(s, n, "%d", c); +} + +static void ts_subtree__write_dot_string(FILE *f, const char *string) { + for (const char *c = string; *c; c++) { + if (*c == '"') { + fputs("\\\"", f); + } else if (*c == '\n') { + fputs("\\n", f); + } else { + fputc(*c, f); + } + } +} + +static const char *ROOT_FIELD = "__ROOT__"; + +static size_t ts_subtree__write_to_string( + Subtree self, char *string, size_t limit, + const TSLanguage *language, bool include_all, + TSSymbol alias_symbol, bool alias_is_named, const char *field_name +) { + if (!self.ptr) return snprintf(string, limit, "(NULL)"); + + char *cursor = string; + char **writer = (limit > 0) ? &cursor : &string; + bool is_root = field_name == ROOT_FIELD; + bool is_visible = + include_all || + ts_subtree_missing(self) || + ( + alias_symbol + ? alias_is_named + : ts_subtree_visible(self) && ts_subtree_named(self) + ); + + if (is_visible) { + if (!is_root) { + cursor += snprintf(*writer, limit, " "); + if (field_name) { + cursor += snprintf(*writer, limit, "%s: ", field_name); + } + } + + if (ts_subtree_is_error(self) && ts_subtree_child_count(self) == 0 && self.ptr->size.bytes > 0) { + cursor += snprintf(*writer, limit, "(UNEXPECTED "); + cursor += ts_subtree__write_char_to_string(*writer, limit, self.ptr->lookahead_char); + } else { + TSSymbol symbol = alias_symbol ? alias_symbol : ts_subtree_symbol(self); + const char *symbol_name = ts_language_symbol_name(language, symbol); + if (ts_subtree_missing(self)) { + cursor += snprintf(*writer, limit, "(MISSING "); + if (alias_is_named || ts_subtree_named(self)) { + cursor += snprintf(*writer, limit, "%s", symbol_name); + } else { + cursor += snprintf(*writer, limit, "\"%s\"", symbol_name); + } + } else { + cursor += snprintf(*writer, limit, "(%s", symbol_name); + } + } + } else if (is_root) { + TSSymbol symbol = ts_subtree_symbol(self); + const char *symbol_name = ts_language_symbol_name(language, symbol); + cursor += snprintf(*writer, limit, "(\"%s\")", symbol_name); + } + + if (ts_subtree_child_count(self)) { + const TSSymbol *alias_sequence = ts_language_alias_sequence(language, self.ptr->production_id); + const TSFieldMapEntry *field_map, *field_map_end; + ts_language_field_map( + language, + self.ptr->production_id, + &field_map, + &field_map_end + ); + + uint32_t structural_child_index = 0; + for (uint32_t i = 0; i < self.ptr->child_count; i++) { + Subtree child = ts_subtree_children(self)[i]; + if (ts_subtree_extra(child)) { + cursor += ts_subtree__write_to_string( + child, *writer, limit, + language, include_all, + 0, false, NULL + ); + } else { + TSSymbol alias_symbol = alias_sequence + ? alias_sequence[structural_child_index] + : 0; + bool alias_is_named = alias_symbol + ? ts_language_symbol_metadata(language, alias_symbol).named + : false; + + const char *child_field_name = is_visible ? NULL : field_name; + for (const TSFieldMapEntry *i = field_map; i < field_map_end; i++) { + if (!i->inherited && i->child_index == structural_child_index) { + child_field_name = language->field_names[i->field_id]; + break; + } + } + + cursor += ts_subtree__write_to_string( + child, *writer, limit, + language, include_all, + alias_symbol, alias_is_named, child_field_name + ); + structural_child_index++; + } + } + } + + if (is_visible) cursor += snprintf(*writer, limit, ")"); + + return cursor - string; +} + +char *ts_subtree_string( + Subtree self, + const TSLanguage *language, + bool include_all +) { + char scratch_string[1]; + size_t size = ts_subtree__write_to_string( + self, scratch_string, 0, + language, include_all, + 0, false, ROOT_FIELD + ) + 1; + char *result = ts_malloc(size * sizeof(char)); + ts_subtree__write_to_string( + self, result, size, + language, include_all, + 0, false, ROOT_FIELD + ); + return result; +} + +void ts_subtree__print_dot_graph(const Subtree *self, uint32_t start_offset, + const TSLanguage *language, TSSymbol alias_symbol, + FILE *f) { + TSSymbol subtree_symbol = ts_subtree_symbol(*self); + TSSymbol symbol = alias_symbol ? alias_symbol : subtree_symbol; + uint32_t end_offset = start_offset + ts_subtree_total_bytes(*self); + fprintf(f, "tree_%p [label=\"", self); + ts_subtree__write_dot_string(f, ts_language_symbol_name(language, symbol)); + fprintf(f, "\""); + + if (ts_subtree_child_count(*self) == 0) fprintf(f, ", shape=plaintext"); + if (ts_subtree_extra(*self)) fprintf(f, ", fontcolor=gray"); + + fprintf(f, ", tooltip=\"" + "range: %u - %u\n" + "state: %d\n" + "error-cost: %u\n" + "has-changes: %u\n" + "repeat-depth: %u\n" + "lookahead-bytes: %u", + start_offset, end_offset, + ts_subtree_parse_state(*self), + ts_subtree_error_cost(*self), + ts_subtree_has_changes(*self), + ts_subtree_repeat_depth(*self), + ts_subtree_lookahead_bytes(*self) + ); + + if (ts_subtree_is_error(*self) && ts_subtree_child_count(*self) == 0) { + fprintf(f, "\ncharacter: '%c'", self->ptr->lookahead_char); + } + + fprintf(f, "\"]\n"); + + uint32_t child_start_offset = start_offset; + uint32_t child_info_offset = + language->max_alias_sequence_length * + ts_subtree_production_id(*self); + for (uint32_t i = 0, n = ts_subtree_child_count(*self); i < n; i++) { + const Subtree *child = &ts_subtree_children(*self)[i]; + TSSymbol alias_symbol = 0; + if (!ts_subtree_extra(*child) && child_info_offset) { + alias_symbol = language->alias_sequences[child_info_offset]; + child_info_offset++; + } + ts_subtree__print_dot_graph(child, child_start_offset, language, alias_symbol, f); + fprintf(f, "tree_%p -> tree_%p [tooltip=%u]\n", self, child, i); + child_start_offset += ts_subtree_total_bytes(*child); + } +} + +void ts_subtree_print_dot_graph(Subtree self, const TSLanguage *language, FILE *f) { + fprintf(f, "digraph tree {\n"); + fprintf(f, "edge [arrowhead=none]\n"); + ts_subtree__print_dot_graph(&self, 0, language, 0, f); + fprintf(f, "}\n"); +} + +bool ts_subtree_external_scanner_state_eq(Subtree self, Subtree other) { + const ExternalScannerState *state1 = &empty_state; + const ExternalScannerState *state2 = &empty_state; + if (self.ptr && ts_subtree_has_external_tokens(self) && !self.ptr->child_count) { + state1 = &self.ptr->external_scanner_state; + } + if (other.ptr && ts_subtree_has_external_tokens(other) && !other.ptr->child_count) { + state2 = &other.ptr->external_scanner_state; + } + return ts_external_scanner_state_eq(state1, state2); +} diff --git a/third-party/tree-sitter/src/subtree.h b/third-party/tree-sitter/src/subtree.h new file mode 100644 index 00000000..b020deb6 --- /dev/null +++ b/third-party/tree-sitter/src/subtree.h @@ -0,0 +1,315 @@ +#ifndef TREE_SITTER_SUBTREE_H_ +#define TREE_SITTER_SUBTREE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include +#include "./length.h" +#include "./array.h" +#include "./error_costs.h" +#include "tree_sitter/api.h" +#include "tree_sitter/parser.h" + +#define TS_TREE_STATE_NONE USHRT_MAX +#define NULL_SUBTREE ((Subtree) {.ptr = NULL}) + +// The serialized state of an external scanner. +// +// Every time an external token subtree is created after a call to an +// external scanner, the scanner's `serialize` function is called to +// retrieve a serialized copy of its state. The bytes are then copied +// onto the subtree itself so that the scanner's state can later be +// restored using its `deserialize` function. +// +// Small byte arrays are stored inline, and long ones are allocated +// separately on the heap. +typedef struct { + union { + char *long_data; + char short_data[24]; + }; + uint32_t length; +} ExternalScannerState; + +// A compact representation of a subtree. +// +// This representation is used for small leaf nodes that are not +// errors, and were not created by an external scanner. +typedef struct { + bool is_inline : 1; + bool visible : 1; + bool named : 1; + bool extra : 1; + bool has_changes : 1; + bool is_missing : 1; + bool is_keyword : 1; + uint8_t symbol; + uint8_t padding_bytes; + uint8_t size_bytes; + uint8_t padding_columns; + uint8_t padding_rows : 4; + uint8_t lookahead_bytes : 4; + uint16_t parse_state; +} SubtreeInlineData; + +// A heap-allocated representation of a subtree. +// +// This representation is used for parent nodes, external tokens, +// errors, and other leaf nodes whose data is too large to fit into +// the inlinen representation. +typedef struct { + volatile uint32_t ref_count; + Length padding; + Length size; + uint32_t lookahead_bytes; + uint32_t error_cost; + uint32_t child_count; + TSSymbol symbol; + TSStateId parse_state; + + bool visible : 1; + bool named : 1; + bool extra : 1; + bool fragile_left : 1; + bool fragile_right : 1; + bool has_changes : 1; + bool has_external_tokens : 1; + bool is_missing : 1; + bool is_keyword : 1; + + union { + // Non-terminal subtrees (`child_count > 0`) + struct { + uint32_t visible_child_count; + uint32_t named_child_count; + uint32_t node_count; + uint32_t repeat_depth; + int32_t dynamic_precedence; + uint16_t production_id; + struct { + TSSymbol symbol; + TSStateId parse_state; + } first_leaf; + }; + + // External terminal subtrees (`child_count == 0 && has_external_tokens`) + ExternalScannerState external_scanner_state; + + // Error terminal subtrees (`child_count == 0 && symbol == ts_builtin_sym_error`) + int32_t lookahead_char; + }; +} SubtreeHeapData; + +// The fundamental building block of a syntax tree. +typedef union { + SubtreeInlineData data; + const SubtreeHeapData *ptr; +} Subtree; + +// Like Subtree, but mutable. +typedef union { + SubtreeInlineData data; + SubtreeHeapData *ptr; +} MutableSubtree; + +typedef Array(Subtree) SubtreeArray; +typedef Array(MutableSubtree) MutableSubtreeArray; + +typedef struct { + MutableSubtreeArray free_trees; + MutableSubtreeArray tree_stack; +} SubtreePool; + +void ts_external_scanner_state_init(ExternalScannerState *, const char *, unsigned); +const char *ts_external_scanner_state_data(const ExternalScannerState *); + +void ts_subtree_array_copy(SubtreeArray, SubtreeArray *); +void ts_subtree_array_clear(SubtreePool *, SubtreeArray *); +void ts_subtree_array_delete(SubtreePool *, SubtreeArray *); +void ts_subtree_array_remove_trailing_extras(SubtreeArray *, SubtreeArray *); +void ts_subtree_array_reverse(SubtreeArray *); + +SubtreePool ts_subtree_pool_new(uint32_t capacity); +void ts_subtree_pool_delete(SubtreePool *); + +Subtree ts_subtree_new_leaf( + SubtreePool *, TSSymbol, Length, Length, uint32_t, + TSStateId, bool, bool, const TSLanguage * +); +Subtree ts_subtree_new_error( + SubtreePool *, int32_t, Length, Length, uint32_t, TSStateId, const TSLanguage * +); +MutableSubtree ts_subtree_new_node(TSSymbol, SubtreeArray *, unsigned, const TSLanguage *); +Subtree ts_subtree_new_error_node(SubtreeArray *, bool, const TSLanguage *); +Subtree ts_subtree_new_missing_leaf(SubtreePool *, TSSymbol, Length, const TSLanguage *); +MutableSubtree ts_subtree_make_mut(SubtreePool *, Subtree); +void ts_subtree_retain(Subtree); +void ts_subtree_release(SubtreePool *, Subtree); +bool ts_subtree_eq(Subtree, Subtree); +int ts_subtree_compare(Subtree, Subtree); +void ts_subtree_set_symbol(MutableSubtree *, TSSymbol, const TSLanguage *); +void ts_subtree_summarize(MutableSubtree, const Subtree *, uint32_t, const TSLanguage *); +void ts_subtree_summarize_children(MutableSubtree, const TSLanguage *); +void ts_subtree_balance(Subtree, SubtreePool *, const TSLanguage *); +Subtree ts_subtree_edit(Subtree, const TSInputEdit *edit, SubtreePool *); +char *ts_subtree_string(Subtree, const TSLanguage *, bool include_all); +void ts_subtree_print_dot_graph(Subtree, const TSLanguage *, FILE *); +Subtree ts_subtree_last_external_token(Subtree); +bool ts_subtree_external_scanner_state_eq(Subtree, Subtree); + +#define SUBTREE_GET(self, name) (self.data.is_inline ? self.data.name : self.ptr->name) + +static inline TSSymbol ts_subtree_symbol(Subtree self) { return SUBTREE_GET(self, symbol); } +static inline bool ts_subtree_visible(Subtree self) { return SUBTREE_GET(self, visible); } +static inline bool ts_subtree_named(Subtree self) { return SUBTREE_GET(self, named); } +static inline bool ts_subtree_extra(Subtree self) { return SUBTREE_GET(self, extra); } +static inline bool ts_subtree_has_changes(Subtree self) { return SUBTREE_GET(self, has_changes); } +static inline bool ts_subtree_missing(Subtree self) { return SUBTREE_GET(self, is_missing); } +static inline bool ts_subtree_is_keyword(Subtree self) { return SUBTREE_GET(self, is_keyword); } +static inline TSStateId ts_subtree_parse_state(Subtree self) { return SUBTREE_GET(self, parse_state); } +static inline uint32_t ts_subtree_lookahead_bytes(Subtree self) { return SUBTREE_GET(self, lookahead_bytes); } + +#undef SUBTREE_GET + +// Get the size needed to store a heap-allocated subtree with the given +// number of children. +static inline size_t ts_subtree_alloc_size(uint32_t child_count) { + return child_count * sizeof(Subtree) + sizeof(SubtreeHeapData); +} + +// Get a subtree's children, which are allocated immediately before the +// tree's own heap data. +#define ts_subtree_children(self) \ + ((self).data.is_inline ? NULL : (Subtree *)((self).ptr) - (self).ptr->child_count) + +static inline void ts_subtree_set_extra(MutableSubtree *self) { + if (self->data.is_inline) { + self->data.extra = true; + } else { + self->ptr->extra = true; + } +} + +static inline TSSymbol ts_subtree_leaf_symbol(Subtree self) { + if (self.data.is_inline) return self.data.symbol; + if (self.ptr->child_count == 0) return self.ptr->symbol; + return self.ptr->first_leaf.symbol; +} + +static inline TSStateId ts_subtree_leaf_parse_state(Subtree self) { + if (self.data.is_inline) return self.data.parse_state; + if (self.ptr->child_count == 0) return self.ptr->parse_state; + return self.ptr->first_leaf.parse_state; +} + +static inline Length ts_subtree_padding(Subtree self) { + if (self.data.is_inline) { + Length result = {self.data.padding_bytes, {self.data.padding_rows, self.data.padding_columns}}; + return result; + } else { + return self.ptr->padding; + } +} + +static inline Length ts_subtree_size(Subtree self) { + if (self.data.is_inline) { + Length result = {self.data.size_bytes, {0, self.data.size_bytes}}; + return result; + } else { + return self.ptr->size; + } +} + +static inline Length ts_subtree_total_size(Subtree self) { + return length_add(ts_subtree_padding(self), ts_subtree_size(self)); +} + +static inline uint32_t ts_subtree_total_bytes(Subtree self) { + return ts_subtree_total_size(self).bytes; +} + +static inline uint32_t ts_subtree_child_count(Subtree self) { + return self.data.is_inline ? 0 : self.ptr->child_count; +} + +static inline uint32_t ts_subtree_repeat_depth(Subtree self) { + return self.data.is_inline ? 0 : self.ptr->repeat_depth; +} + +static inline uint32_t ts_subtree_node_count(Subtree self) { + return (self.data.is_inline || self.ptr->child_count == 0) ? 1 : self.ptr->node_count; +} + +static inline uint32_t ts_subtree_visible_child_count(Subtree self) { + if (ts_subtree_child_count(self) > 0) { + return self.ptr->visible_child_count; + } else { + return 0; + } +} + +static inline uint32_t ts_subtree_error_cost(Subtree self) { + if (ts_subtree_missing(self)) { + return ERROR_COST_PER_MISSING_TREE + ERROR_COST_PER_RECOVERY; + } else { + return self.data.is_inline ? 0 : self.ptr->error_cost; + } +} + +static inline int32_t ts_subtree_dynamic_precedence(Subtree self) { + return (self.data.is_inline || self.ptr->child_count == 0) ? 0 : self.ptr->dynamic_precedence; +} + +static inline uint16_t ts_subtree_production_id(Subtree self) { + if (ts_subtree_child_count(self) > 0) { + return self.ptr->production_id; + } else { + return 0; + } +} + +static inline bool ts_subtree_fragile_left(Subtree self) { + return self.data.is_inline ? false : self.ptr->fragile_left; +} + +static inline bool ts_subtree_fragile_right(Subtree self) { + return self.data.is_inline ? false : self.ptr->fragile_right; +} + +static inline bool ts_subtree_has_external_tokens(Subtree self) { + return self.data.is_inline ? false : self.ptr->has_external_tokens; +} + +static inline bool ts_subtree_is_fragile(Subtree self) { + return self.data.is_inline ? false : (self.ptr->fragile_left || self.ptr->fragile_right); +} + +static inline bool ts_subtree_is_error(Subtree self) { + return ts_subtree_symbol(self) == ts_builtin_sym_error; +} + +static inline bool ts_subtree_is_eof(Subtree self) { + return ts_subtree_symbol(self) == ts_builtin_sym_end; +} + +static inline Subtree ts_subtree_from_mut(MutableSubtree self) { + Subtree result; + result.data = self.data; + return result; +} + +static inline MutableSubtree ts_subtree_to_mut_unsafe(Subtree self) { + MutableSubtree result; + result.data = self.data; + return result; +} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_SUBTREE_H_ diff --git a/third-party/tree-sitter/src/tree.c b/third-party/tree-sitter/src/tree.c new file mode 100644 index 00000000..391fa7f5 --- /dev/null +++ b/third-party/tree-sitter/src/tree.c @@ -0,0 +1,148 @@ +#include "tree_sitter/api.h" +#include "./array.h" +#include "./get_changed_ranges.h" +#include "./subtree.h" +#include "./tree_cursor.h" +#include "./tree.h" + +static const unsigned PARENT_CACHE_CAPACITY = 32; + +TSTree *ts_tree_new( + Subtree root, const TSLanguage *language, + const TSRange *included_ranges, unsigned included_range_count +) { + TSTree *result = ts_malloc(sizeof(TSTree)); + result->root = root; + result->language = language; + result->parent_cache = NULL; + result->parent_cache_start = 0; + result->parent_cache_size = 0; + result->included_ranges = ts_calloc(included_range_count, sizeof(TSRange)); + memcpy(result->included_ranges, included_ranges, included_range_count * sizeof(TSRange)); + result->included_range_count = included_range_count; + return result; +} + +TSTree *ts_tree_copy(const TSTree *self) { + ts_subtree_retain(self->root); + return ts_tree_new(self->root, self->language, self->included_ranges, self->included_range_count); +} + +void ts_tree_delete(TSTree *self) { + if (!self) return; + + SubtreePool pool = ts_subtree_pool_new(0); + ts_subtree_release(&pool, self->root); + ts_subtree_pool_delete(&pool); + ts_free(self->included_ranges); + if (self->parent_cache) ts_free(self->parent_cache); + ts_free(self); +} + +TSNode ts_tree_root_node(const TSTree *self) { + return ts_node_new(self, &self->root, ts_subtree_padding(self->root), 0); +} + +const TSLanguage *ts_tree_language(const TSTree *self) { + return self->language; +} + +void ts_tree_edit(TSTree *self, const TSInputEdit *edit) { + for (unsigned i = 0; i < self->included_range_count; i++) { + TSRange *range = &self->included_ranges[i]; + if (range->end_byte >= edit->old_end_byte) { + if (range->end_byte != UINT32_MAX) { + range->end_byte = edit->new_end_byte + (range->end_byte - edit->old_end_byte); + range->end_point = point_add( + edit->new_end_point, + point_sub(range->end_point, edit->old_end_point) + ); + if (range->end_byte < edit->new_end_byte) { + range->end_byte = UINT32_MAX; + range->end_point = POINT_MAX; + } + } + if (range->start_byte >= edit->old_end_byte) { + range->start_byte = edit->new_end_byte + (range->start_byte - edit->old_end_byte); + range->start_point = point_add( + edit->new_end_point, + point_sub(range->start_point, edit->old_end_point) + ); + if (range->start_byte < edit->new_end_byte) { + range->start_byte = UINT32_MAX; + range->start_point = POINT_MAX; + } + } + } + } + + SubtreePool pool = ts_subtree_pool_new(0); + self->root = ts_subtree_edit(self->root, edit, &pool); + self->parent_cache_start = 0; + self->parent_cache_size = 0; + ts_subtree_pool_delete(&pool); +} + +TSRange *ts_tree_get_changed_ranges(const TSTree *self, const TSTree *other, uint32_t *count) { + TreeCursor cursor1 = {NULL, array_new()}; + TreeCursor cursor2 = {NULL, array_new()}; + ts_tree_cursor_init(&cursor1, ts_tree_root_node(self)); + ts_tree_cursor_init(&cursor2, ts_tree_root_node(other)); + + TSRangeArray included_range_differences = array_new(); + ts_range_array_get_changed_ranges( + self->included_ranges, self->included_range_count, + other->included_ranges, other->included_range_count, + &included_range_differences + ); + + TSRange *result; + *count = ts_subtree_get_changed_ranges( + &self->root, &other->root, &cursor1, &cursor2, + self->language, &included_range_differences, &result + ); + + array_delete(&included_range_differences); + array_delete(&cursor1.stack); + array_delete(&cursor2.stack); + return result; +} + +void ts_tree_print_dot_graph(const TSTree *self, FILE *file) { + ts_subtree_print_dot_graph(self->root, self->language, file); +} + +TSNode ts_tree_get_cached_parent(const TSTree *self, const TSNode *node) { + for (uint32_t i = 0; i < self->parent_cache_size; i++) { + uint32_t index = (self->parent_cache_start + i) % PARENT_CACHE_CAPACITY; + ParentCacheEntry *entry = &self->parent_cache[index]; + if (entry->child == node->id) { + return ts_node_new(self, entry->parent, entry->position, entry->alias_symbol); + } + } + return ts_node_new(NULL, NULL, length_zero(), 0); +} + +void ts_tree_set_cached_parent(const TSTree *_self, const TSNode *node, const TSNode *parent) { + TSTree *self = (TSTree *)_self; + if (!self->parent_cache) { + self->parent_cache = ts_calloc(PARENT_CACHE_CAPACITY, sizeof(ParentCacheEntry)); + } + + uint32_t index = (self->parent_cache_start + self->parent_cache_size) % PARENT_CACHE_CAPACITY; + self->parent_cache[index] = (ParentCacheEntry) { + .child = node->id, + .parent = (const Subtree *)parent->id, + .position = { + parent->context[0], + {parent->context[1], parent->context[2]} + }, + .alias_symbol = parent->context[3], + }; + + if (self->parent_cache_size == PARENT_CACHE_CAPACITY) { + self->parent_cache_start++; + } else { + self->parent_cache_size++; + } +} diff --git a/third-party/tree-sitter/src/tree.h b/third-party/tree-sitter/src/tree.h new file mode 100644 index 00000000..92a7e641 --- /dev/null +++ b/third-party/tree-sitter/src/tree.h @@ -0,0 +1,34 @@ +#ifndef TREE_SITTER_TREE_H_ +#define TREE_SITTER_TREE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct { + const Subtree *child; + const Subtree *parent; + Length position; + TSSymbol alias_symbol; +} ParentCacheEntry; + +struct TSTree { + Subtree root; + const TSLanguage *language; + ParentCacheEntry *parent_cache; + uint32_t parent_cache_start; + uint32_t parent_cache_size; + TSRange *included_ranges; + unsigned included_range_count; +}; + +TSTree *ts_tree_new(Subtree root, const TSLanguage *language, const TSRange *, unsigned); +TSNode ts_node_new(const TSTree *, const Subtree *, Length, TSSymbol); +TSNode ts_tree_get_cached_parent(const TSTree *, const TSNode *); +void ts_tree_set_cached_parent(const TSTree *, const TSNode *, const TSNode *); + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_TREE_H_ diff --git a/third-party/tree-sitter/src/tree_cursor.c b/third-party/tree-sitter/src/tree_cursor.c new file mode 100644 index 00000000..4c6f1b82 --- /dev/null +++ b/third-party/tree-sitter/src/tree_cursor.c @@ -0,0 +1,454 @@ +#include "tree_sitter/api.h" +#include "./alloc.h" +#include "./tree_cursor.h" +#include "./language.h" +#include "./tree.h" + +typedef struct { + Subtree parent; + const TSTree *tree; + Length position; + uint32_t child_index; + uint32_t structural_child_index; + const TSSymbol *alias_sequence; +} CursorChildIterator; + +// CursorChildIterator + +static inline CursorChildIterator ts_tree_cursor_iterate_children(const TreeCursor *self) { + TreeCursorEntry *last_entry = array_back(&self->stack); + if (ts_subtree_child_count(*last_entry->subtree) == 0) { + return (CursorChildIterator) {NULL_SUBTREE, self->tree, length_zero(), 0, 0, NULL}; + } + const TSSymbol *alias_sequence = ts_language_alias_sequence( + self->tree->language, + last_entry->subtree->ptr->production_id + ); + return (CursorChildIterator) { + .tree = self->tree, + .parent = *last_entry->subtree, + .position = last_entry->position, + .child_index = 0, + .structural_child_index = 0, + .alias_sequence = alias_sequence, + }; +} + +static inline bool ts_tree_cursor_child_iterator_next(CursorChildIterator *self, + TreeCursorEntry *result, + bool *visible) { + if (!self->parent.ptr || self->child_index == self->parent.ptr->child_count) return false; + const Subtree *child = &ts_subtree_children(self->parent)[self->child_index]; + *result = (TreeCursorEntry) { + .subtree = child, + .position = self->position, + .child_index = self->child_index, + .structural_child_index = self->structural_child_index, + }; + *visible = ts_subtree_visible(*child); + bool extra = ts_subtree_extra(*child); + if (!extra && self->alias_sequence) { + *visible |= self->alias_sequence[self->structural_child_index]; + self->structural_child_index++; + } + + self->position = length_add(self->position, ts_subtree_size(*child)); + self->child_index++; + + if (self->child_index < self->parent.ptr->child_count) { + Subtree next_child = ts_subtree_children(self->parent)[self->child_index]; + self->position = length_add(self->position, ts_subtree_padding(next_child)); + } + + return true; +} + +// TSTreeCursor - lifecycle + +TSTreeCursor ts_tree_cursor_new(TSNode node) { + TSTreeCursor self = {NULL, NULL, {0, 0}}; + ts_tree_cursor_init((TreeCursor *)&self, node); + return self; +} + +void ts_tree_cursor_reset(TSTreeCursor *_self, TSNode node) { + ts_tree_cursor_init((TreeCursor *)_self, node); +} + +void ts_tree_cursor_init(TreeCursor *self, TSNode node) { + self->tree = node.tree; + array_clear(&self->stack); + array_push(&self->stack, ((TreeCursorEntry) { + .subtree = (const Subtree *)node.id, + .position = { + ts_node_start_byte(node), + ts_node_start_point(node) + }, + .child_index = 0, + .structural_child_index = 0, + })); +} + +void ts_tree_cursor_delete(TSTreeCursor *_self) { + TreeCursor *self = (TreeCursor *)_self; + array_delete(&self->stack); +} + +// TSTreeCursor - walking the tree + +bool ts_tree_cursor_goto_first_child(TSTreeCursor *_self) { + TreeCursor *self = (TreeCursor *)_self; + + bool did_descend; + do { + did_descend = false; + + bool visible; + TreeCursorEntry entry; + CursorChildIterator iterator = ts_tree_cursor_iterate_children(self); + while (ts_tree_cursor_child_iterator_next(&iterator, &entry, &visible)) { + if (visible) { + array_push(&self->stack, entry); + return true; + } + + if (ts_subtree_visible_child_count(*entry.subtree) > 0) { + array_push(&self->stack, entry); + did_descend = true; + break; + } + } + } while (did_descend); + + return false; +} + +int64_t ts_tree_cursor_goto_first_child_for_byte(TSTreeCursor *_self, uint32_t goal_byte) { + TreeCursor *self = (TreeCursor *)_self; + uint32_t initial_size = self->stack.size; + uint32_t visible_child_index = 0; + + bool did_descend; + do { + did_descend = false; + + bool visible; + TreeCursorEntry entry; + CursorChildIterator iterator = ts_tree_cursor_iterate_children(self); + while (ts_tree_cursor_child_iterator_next(&iterator, &entry, &visible)) { + uint32_t end_byte = entry.position.bytes + ts_subtree_size(*entry.subtree).bytes; + bool at_goal = end_byte > goal_byte; + uint32_t visible_child_count = ts_subtree_visible_child_count(*entry.subtree); + + if (at_goal) { + if (visible) { + array_push(&self->stack, entry); + return visible_child_index; + } + + if (visible_child_count > 0) { + array_push(&self->stack, entry); + did_descend = true; + break; + } + } else if (visible) { + visible_child_index++; + } else { + visible_child_index += visible_child_count; + } + } + } while (did_descend); + + if (self->stack.size > initial_size && + ts_tree_cursor_goto_next_sibling((TSTreeCursor *)self)) { + return visible_child_index; + } + + self->stack.size = initial_size; + return -1; +} + +bool ts_tree_cursor_goto_next_sibling(TSTreeCursor *_self) { + TreeCursor *self = (TreeCursor *)_self; + uint32_t initial_size = self->stack.size; + + while (self->stack.size > 1) { + TreeCursorEntry entry = array_pop(&self->stack); + CursorChildIterator iterator = ts_tree_cursor_iterate_children(self); + iterator.child_index = entry.child_index; + iterator.structural_child_index = entry.structural_child_index; + iterator.position = entry.position; + + bool visible = false; + ts_tree_cursor_child_iterator_next(&iterator, &entry, &visible); + if (visible && self->stack.size + 1 < initial_size) break; + + while (ts_tree_cursor_child_iterator_next(&iterator, &entry, &visible)) { + if (visible) { + array_push(&self->stack, entry); + return true; + } + + if (ts_subtree_visible_child_count(*entry.subtree)) { + array_push(&self->stack, entry); + ts_tree_cursor_goto_first_child(_self); + return true; + } + } + } + + self->stack.size = initial_size; + return false; +} + +bool ts_tree_cursor_goto_parent(TSTreeCursor *_self) { + TreeCursor *self = (TreeCursor *)_self; + for (unsigned i = self->stack.size - 2; i + 1 > 0; i--) { + TreeCursorEntry *entry = &self->stack.contents[i]; + if (ts_subtree_visible(*entry->subtree)) { + self->stack.size = i + 1; + return true; + } + if (i > 0 && !ts_subtree_extra(*entry->subtree)) { + TreeCursorEntry *parent_entry = &self->stack.contents[i - 1]; + if (ts_language_alias_at( + self->tree->language, + parent_entry->subtree->ptr->production_id, + entry->structural_child_index + )) { + self->stack.size = i + 1; + return true; + } + } + } + return false; +} + +TSNode ts_tree_cursor_current_node(const TSTreeCursor *_self) { + const TreeCursor *self = (const TreeCursor *)_self; + TreeCursorEntry *last_entry = array_back(&self->stack); + TSSymbol alias_symbol = 0; + if (self->stack.size > 1 && !ts_subtree_extra(*last_entry->subtree)) { + TreeCursorEntry *parent_entry = &self->stack.contents[self->stack.size - 2]; + alias_symbol = ts_language_alias_at( + self->tree->language, + parent_entry->subtree->ptr->production_id, + last_entry->structural_child_index + ); + } + return ts_node_new( + self->tree, + last_entry->subtree, + last_entry->position, + alias_symbol + ); +} + +// Private - Get various facts about the current node that are needed +// when executing tree queries. +void ts_tree_cursor_current_status( + const TSTreeCursor *_self, + TSFieldId *field_id, + bool *has_later_siblings, + bool *has_later_named_siblings, + bool *can_have_later_siblings_with_this_field, + TSSymbol *supertypes, + unsigned *supertype_count +) { + const TreeCursor *self = (const TreeCursor *)_self; + unsigned max_supertypes = *supertype_count; + *field_id = 0; + *supertype_count = 0; + *has_later_siblings = false; + *has_later_named_siblings = false; + *can_have_later_siblings_with_this_field = false; + + // Walk up the tree, visiting the current node and its invisible ancestors, + // because fields can refer to nodes through invisible *wrapper* nodes, + for (unsigned i = self->stack.size - 1; i > 0; i--) { + TreeCursorEntry *entry = &self->stack.contents[i]; + TreeCursorEntry *parent_entry = &self->stack.contents[i - 1]; + + const TSSymbol *alias_sequence = ts_language_alias_sequence( + self->tree->language, + parent_entry->subtree->ptr->production_id + ); + + #define subtree_symbol(subtree, structural_child_index) \ + (( \ + !ts_subtree_extra(subtree) && \ + alias_sequence && \ + alias_sequence[structural_child_index] \ + ) ? \ + alias_sequence[structural_child_index] : \ + ts_subtree_symbol(subtree)) + + // Stop walking up when a visible ancestor is found. + TSSymbol entry_symbol = subtree_symbol( + *entry->subtree, + entry->structural_child_index + ); + TSSymbolMetadata entry_metadata = ts_language_symbol_metadata( + self->tree->language, + entry_symbol + ); + if (i != self->stack.size - 1 && entry_metadata.visible) break; + + // Record any supertypes + if (entry_metadata.supertype && *supertype_count < max_supertypes) { + supertypes[*supertype_count] = entry_symbol; + (*supertype_count)++; + } + + // Determine if the current node has later siblings. + if (!*has_later_siblings) { + unsigned sibling_count = parent_entry->subtree->ptr->child_count; + unsigned structural_child_index = entry->structural_child_index; + if (!ts_subtree_extra(*entry->subtree)) structural_child_index++; + for (unsigned j = entry->child_index + 1; j < sibling_count; j++) { + Subtree sibling = ts_subtree_children(*parent_entry->subtree)[j]; + TSSymbolMetadata sibling_metadata = ts_language_symbol_metadata( + self->tree->language, + subtree_symbol(sibling, structural_child_index) + ); + if (sibling_metadata.visible) { + *has_later_siblings = true; + if (*has_later_named_siblings) break; + if (sibling_metadata.named) { + *has_later_named_siblings = true; + break; + } + } else if (ts_subtree_visible_child_count(sibling) > 0) { + *has_later_siblings = true; + if (*has_later_named_siblings) break; + if (sibling.ptr->named_child_count > 0) { + *has_later_named_siblings = true; + break; + } + } + if (!ts_subtree_extra(sibling)) structural_child_index++; + } + } + + #undef subtree_symbol + + if (!ts_subtree_extra(*entry->subtree)) { + const TSFieldMapEntry *field_map, *field_map_end; + ts_language_field_map( + self->tree->language, + parent_entry->subtree->ptr->production_id, + &field_map, &field_map_end + ); + + // Look for a field name associated with the current node. + if (!*field_id) { + for (const TSFieldMapEntry *i = field_map; i < field_map_end; i++) { + if (!i->inherited && i->child_index == entry->structural_child_index) { + *field_id = i->field_id; + break; + } + } + } + + // Determine if the current node can have later siblings with the same field name. + if (*field_id) { + for (const TSFieldMapEntry *i = field_map; i < field_map_end; i++) { + if (i->field_id == *field_id) { + if ( + i->child_index > entry->structural_child_index || + (i->child_index == entry->structural_child_index && *has_later_named_siblings) + ) { + *can_have_later_siblings_with_this_field = true; + break; + } + } + } + } + } + } +} + +TSNode ts_tree_cursor_parent_node(const TSTreeCursor *_self) { + const TreeCursor *self = (const TreeCursor *)_self; + for (int i = (int)self->stack.size - 2; i >= 0; i--) { + TreeCursorEntry *entry = &self->stack.contents[i]; + bool is_visible = true; + TSSymbol alias_symbol = 0; + if (i > 0) { + TreeCursorEntry *parent_entry = &self->stack.contents[i - 1]; + alias_symbol = ts_language_alias_at( + self->tree->language, + parent_entry->subtree->ptr->production_id, + entry->structural_child_index + ); + is_visible = (alias_symbol != 0) || ts_subtree_visible(*entry->subtree); + } + if (is_visible) { + return ts_node_new( + self->tree, + entry->subtree, + entry->position, + alias_symbol + ); + } + } + return ts_node_new(NULL, NULL, length_zero(), 0); +} + +TSFieldId ts_tree_cursor_current_field_id(const TSTreeCursor *_self) { + const TreeCursor *self = (const TreeCursor *)_self; + + // Walk up the tree, visiting the current node and its invisible ancestors. + for (unsigned i = self->stack.size - 1; i > 0; i--) { + TreeCursorEntry *entry = &self->stack.contents[i]; + TreeCursorEntry *parent_entry = &self->stack.contents[i - 1]; + + // Stop walking up when another visible node is found. + if (i != self->stack.size - 1) { + if (ts_subtree_visible(*entry->subtree)) break; + if ( + !ts_subtree_extra(*entry->subtree) && + ts_language_alias_at( + self->tree->language, + parent_entry->subtree->ptr->production_id, + entry->structural_child_index + ) + ) break; + } + + if (ts_subtree_extra(*entry->subtree)) break; + + const TSFieldMapEntry *field_map, *field_map_end; + ts_language_field_map( + self->tree->language, + parent_entry->subtree->ptr->production_id, + &field_map, &field_map_end + ); + for (const TSFieldMapEntry *i = field_map; i < field_map_end; i++) { + if (!i->inherited && i->child_index == entry->structural_child_index) { + return i->field_id; + } + } + } + return 0; +} + +const char *ts_tree_cursor_current_field_name(const TSTreeCursor *_self) { + TSFieldId id = ts_tree_cursor_current_field_id(_self); + if (id) { + const TreeCursor *self = (const TreeCursor *)_self; + return self->tree->language->field_names[id]; + } else { + return NULL; + } +} + +TSTreeCursor ts_tree_cursor_copy(const TSTreeCursor *_cursor) { + const TreeCursor *cursor = (const TreeCursor *)_cursor; + TSTreeCursor res = {NULL, NULL, {0, 0}}; + TreeCursor *copy = (TreeCursor *)&res; + copy->tree = cursor->tree; + array_init(©->stack); + array_push_all(©->stack, &cursor->stack); + return res; +} diff --git a/third-party/tree-sitter/src/tree_cursor.h b/third-party/tree-sitter/src/tree_cursor.h new file mode 100644 index 00000000..69647d1d --- /dev/null +++ b/third-party/tree-sitter/src/tree_cursor.h @@ -0,0 +1,31 @@ +#ifndef TREE_SITTER_TREE_CURSOR_H_ +#define TREE_SITTER_TREE_CURSOR_H_ + +#include "./subtree.h" + +typedef struct { + const Subtree *subtree; + Length position; + uint32_t child_index; + uint32_t structural_child_index; +} TreeCursorEntry; + +typedef struct { + const TSTree *tree; + Array(TreeCursorEntry) stack; +} TreeCursor; + +void ts_tree_cursor_init(TreeCursor *, TSNode); +void ts_tree_cursor_current_status( + const TSTreeCursor *, + TSFieldId *, + bool *, + bool *, + bool *, + TSSymbol *, + unsigned * +); + +TSNode ts_tree_cursor_parent_node(const TSTreeCursor *); + +#endif // TREE_SITTER_TREE_CURSOR_H_ diff --git a/third-party/tree-sitter/src/unicode.h b/third-party/tree-sitter/src/unicode.h new file mode 100644 index 00000000..0fba56a6 --- /dev/null +++ b/third-party/tree-sitter/src/unicode.h @@ -0,0 +1,50 @@ +#ifndef TREE_SITTER_UNICODE_H_ +#define TREE_SITTER_UNICODE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#define U_EXPORT +#define U_EXPORT2 +#include "unicode/utf8.h" +#include "unicode/utf16.h" + +static const int32_t TS_DECODE_ERROR = U_SENTINEL; + +// These functions read one unicode code point from the given string, +// returning the number of bytes consumed. +typedef uint32_t (*UnicodeDecodeFunction)( + const uint8_t *string, + uint32_t length, + int32_t *code_point +); + +static inline uint32_t ts_decode_utf8( + const uint8_t *string, + uint32_t length, + int32_t *code_point +) { + uint32_t i = 0; + U8_NEXT(string, i, length, *code_point); + return i; +} + +static inline uint32_t ts_decode_utf16( + const uint8_t *string, + uint32_t length, + int32_t *code_point +) { + uint32_t i = 0; + U16_NEXT(((uint16_t *)string), i, length, *code_point); + return i * 2; +} + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_UNICODE_H_ diff --git a/third-party/tree-sitter/src/unicode/ICU_SHA b/third-party/tree-sitter/src/unicode/ICU_SHA new file mode 100644 index 00000000..3622283b --- /dev/null +++ b/third-party/tree-sitter/src/unicode/ICU_SHA @@ -0,0 +1 @@ +552b01f61127d30d6589aa4bf99468224979b661 diff --git a/third-party/tree-sitter/src/unicode/LICENSE b/third-party/tree-sitter/src/unicode/LICENSE new file mode 100644 index 00000000..2e01e368 --- /dev/null +++ b/third-party/tree-sitter/src/unicode/LICENSE @@ -0,0 +1,414 @@ +COPYRIGHT AND PERMISSION NOTICE (ICU 58 and later) + +Copyright © 1991-2019 Unicode, Inc. All rights reserved. +Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of the Unicode data files and any associated documentation +(the "Data Files") or Unicode software and any associated documentation +(the "Software") to deal in the Data Files or Software +without restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files +or Software are furnished to do so, provided that either +(a) this copyright and permission notice appear with all copies +of the Data Files or Software, or +(b) this copyright and permission notice appear in associated +Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF +ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT OF THIRD PARTY RIGHTS. +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, +DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER +TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THE DATA FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, +use or other dealings in these Data Files or Software without prior +written authorization of the copyright holder. + +--------------------- + +Third-Party Software Licenses + +This section contains third-party software notices and/or additional +terms for licensed third-party software components included within ICU +libraries. + +1. ICU License - ICU 1.8.1 to ICU 57.1 + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1995-2016 International Business Machines Corporation and others +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, and/or sell copies of the Software, and to permit persons +to whom the Software is furnished to do so, provided that the above +copyright notice(s) and this permission notice appear in all copies of +the Software and that both the above copyright notice(s) and this +permission notice appear in supporting documentation. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT +OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY +SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER +RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN +CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Except as contained in this notice, the name of a copyright holder +shall not be used in advertising or otherwise to promote the sale, use +or other dealings in this Software without prior written authorization +of the copyright holder. + +All trademarks and registered trademarks mentioned herein are the +property of their respective owners. + +2. Chinese/Japanese Word Break Dictionary Data (cjdict.txt) + + # The Google Chrome software developed by Google is licensed under + # the BSD license. Other software included in this distribution is + # provided under other licenses, as set forth below. + # + # The BSD License + # http://opensource.org/licenses/bsd-license.php + # Copyright (C) 2006-2008, Google Inc. + # + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are met: + # + # Redistributions of source code must retain the above copyright notice, + # this list of conditions and the following disclaimer. + # Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided with + # the distribution. + # Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + # LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + # NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + # SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + # + # + # The word list in cjdict.txt are generated by combining three word lists + # listed below with further processing for compound word breaking. The + # frequency is generated with an iterative training against Google web + # corpora. + # + # * Libtabe (Chinese) + # - https://sourceforge.net/project/?group_id=1519 + # - Its license terms and conditions are shown below. + # + # * IPADIC (Japanese) + # - http://chasen.aist-nara.ac.jp/chasen/distribution.html + # - Its license terms and conditions are shown below. + # + # ---------COPYING.libtabe ---- BEGIN-------------------- + # + # /* + # * Copyright (c) 1999 TaBE Project. + # * Copyright (c) 1999 Pai-Hsiang Hsiao. + # * All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the TaBE Project nor the names of its + # * contributors may be used to endorse or promote products derived + # * from this software without specific prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # /* + # * Copyright (c) 1999 Computer Systems and Communication Lab, + # * Institute of Information Science, Academia + # * Sinica. All rights reserved. + # * + # * Redistribution and use in source and binary forms, with or without + # * modification, are permitted provided that the following conditions + # * are met: + # * + # * . Redistributions of source code must retain the above copyright + # * notice, this list of conditions and the following disclaimer. + # * . Redistributions in binary form must reproduce the above copyright + # * notice, this list of conditions and the following disclaimer in + # * the documentation and/or other materials provided with the + # * distribution. + # * . Neither the name of the Computer Systems and Communication Lab + # * nor the names of its contributors may be used to endorse or + # * promote products derived from this software without specific + # * prior written permission. + # * + # * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # * REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, + # * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # * OF THE POSSIBILITY OF SUCH DAMAGE. + # */ + # + # Copyright 1996 Chih-Hao Tsai @ Beckman Institute, + # University of Illinois + # c-tsai4@uiuc.edu http://casper.beckman.uiuc.edu/~c-tsai4 + # + # ---------------COPYING.libtabe-----END-------------------------------- + # + # + # ---------------COPYING.ipadic-----BEGIN------------------------------- + # + # Copyright 2000, 2001, 2002, 2003 Nara Institute of Science + # and Technology. All Rights Reserved. + # + # Use, reproduction, and distribution of this software is permitted. + # Any copy of this software, whether in its original form or modified, + # must include both the above copyright notice and the following + # paragraphs. + # + # Nara Institute of Science and Technology (NAIST), + # the copyright holders, disclaims all warranties with regard to this + # software, including all implied warranties of merchantability and + # fitness, in no event shall NAIST be liable for + # any special, indirect or consequential damages or any damages + # whatsoever resulting from loss of use, data or profits, whether in an + # action of contract, negligence or other tortuous action, arising out + # of or in connection with the use or performance of this software. + # + # A large portion of the dictionary entries + # originate from ICOT Free Software. The following conditions for ICOT + # Free Software applies to the current dictionary as well. + # + # Each User may also freely distribute the Program, whether in its + # original form or modified, to any third party or parties, PROVIDED + # that the provisions of Section 3 ("NO WARRANTY") will ALWAYS appear + # on, or be attached to, the Program, which is distributed substantially + # in the same form as set out herein and that such intended + # distribution, if actually made, will neither violate or otherwise + # contravene any of the laws and regulations of the countries having + # jurisdiction over the User or the intended distribution itself. + # + # NO WARRANTY + # + # The program was produced on an experimental basis in the course of the + # research and development conducted during the project and is provided + # to users as so produced on an experimental basis. Accordingly, the + # program is provided without any warranty whatsoever, whether express, + # implied, statutory or otherwise. The term "warranty" used herein + # includes, but is not limited to, any warranty of the quality, + # performance, merchantability and fitness for a particular purpose of + # the program and the nonexistence of any infringement or violation of + # any right of any third party. + # + # Each user of the program will agree and understand, and be deemed to + # have agreed and understood, that there is no warranty whatsoever for + # the program and, accordingly, the entire risk arising from or + # otherwise connected with the program is assumed by the user. + # + # Therefore, neither ICOT, the copyright holder, or any other + # organization that participated in or was otherwise related to the + # development of the program and their respective officials, directors, + # officers and other employees shall be held liable for any and all + # damages, including, without limitation, general, special, incidental + # and consequential damages, arising out of or otherwise in connection + # with the use or inability to use the program or any product, material + # or result produced or otherwise obtained by using the program, + # regardless of whether they have been advised of, or otherwise had + # knowledge of, the possibility of such damages at any time during the + # project or thereafter. Each user will be deemed to have agreed to the + # foregoing by his or her commencement of use of the program. The term + # "use" as used herein includes, but is not limited to, the use, + # modification, copying and distribution of the program and the + # production of secondary products from the program. + # + # In the case where the program, whether in its original form or + # modified, was distributed or delivered to or received by a user from + # any person, organization or entity other than ICOT, unless it makes or + # grants independently of ICOT any specific warranty to the user in + # writing, such person, organization or entity, will also be exempted + # from and not be held liable to the user for any such damages as noted + # above as far as the program is concerned. + # + # ---------------COPYING.ipadic-----END---------------------------------- + +3. Lao Word Break Dictionary Data (laodict.txt) + + # Copyright (c) 2013 International Business Machines Corporation + # and others. All Rights Reserved. + # + # Project: http://code.google.com/p/lao-dictionary/ + # Dictionary: http://lao-dictionary.googlecode.com/git/Lao-Dictionary.txt + # License: http://lao-dictionary.googlecode.com/git/Lao-Dictionary-LICENSE.txt + # (copied below) + # + # This file is derived from the above dictionary, with slight + # modifications. + # ---------------------------------------------------------------------- + # Copyright (C) 2013 Brian Eugene Wilson, Robert Martin Campbell. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, + # are permitted provided that the following conditions are met: + # + # + # Redistributions of source code must retain the above copyright notice, this + # list of conditions and the following disclaimer. Redistributions in + # binary form must reproduce the above copyright notice, this list of + # conditions and the following disclaimer in the documentation and/or + # other materials provided with the distribution. + # + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS + # FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + # COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + # (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + # OF THE POSSIBILITY OF SUCH DAMAGE. + # -------------------------------------------------------------------------- + +4. Burmese Word Break Dictionary Data (burmesedict.txt) + + # Copyright (c) 2014 International Business Machines Corporation + # and others. All Rights Reserved. + # + # This list is part of a project hosted at: + # github.com/kanyawtech/myanmar-karen-word-lists + # + # -------------------------------------------------------------------------- + # Copyright (c) 2013, LeRoy Benjamin Sharon + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions + # are met: Redistributions of source code must retain the above + # copyright notice, this list of conditions and the following + # disclaimer. Redistributions in binary form must reproduce the + # above copyright notice, this list of conditions and the following + # disclaimer in the documentation and/or other materials provided + # with the distribution. + # + # Neither the name Myanmar Karen Word Lists, nor the names of its + # contributors may be used to endorse or promote products derived + # from this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND + # CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, + # INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS + # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED + # TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + # ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + # TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + # THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + # SUCH DAMAGE. + # -------------------------------------------------------------------------- + +5. Time Zone Database + + ICU uses the public domain data and code derived from Time Zone +Database for its time zone support. The ownership of the TZ database +is explained in BCP 175: Procedure for Maintaining the Time Zone +Database section 7. + + # 7. Database Ownership + # + # The TZ database itself is not an IETF Contribution or an IETF + # document. Rather it is a pre-existing and regularly updated work + # that is in the public domain, and is intended to remain in the + # public domain. Therefore, BCPs 78 [RFC5378] and 79 [RFC3979] do + # not apply to the TZ Database or contributions that individuals make + # to it. Should any claims be made and substantiated against the TZ + # Database, the organization that is providing the IANA + # Considerations defined in this RFC, under the memorandum of + # understanding with the IETF, currently ICANN, may act in accordance + # with all competent court orders. No ownership claims will be made + # by ICANN or the IETF Trust on the database or the code. Any person + # making a contribution to the database or code waives all rights to + # future claims in that contribution or in the TZ Database. + +6. Google double-conversion + +Copyright 2006-2011, the V8 project authors. All rights reserved. +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + * Neither the name of Google Inc. nor the names of its + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/third-party/tree-sitter/src/unicode/README.md b/third-party/tree-sitter/src/unicode/README.md new file mode 100644 index 00000000..623b8e38 --- /dev/null +++ b/third-party/tree-sitter/src/unicode/README.md @@ -0,0 +1,29 @@ +# ICU Parts + +This directory contains a small subset of files from the Unicode organization's [ICU repository](https://github.com/unicode-org/icu). + +### License + +The license for these files is contained in the `LICENSE` file within this directory. + +### Contents + +* Source files taken from the [`icu4c/source/common/unicode`](https://github.com/unicode-org/icu/tree/552b01f61127d30d6589aa4bf99468224979b661/icu4c/source/common/unicode) directory: + * `utf8.h` + * `utf16.h` + * `umachine.h` +* Empty source files that are referenced by the above source files, but whose original contents in `libicu` are not needed: + * `ptypes.h` + * `urename.h` + * `utf.h` +* `ICU_SHA` - File containing the Git SHA of the commit in the `icu` repository from which the files were obtained. +* `LICENSE` - The license file from the [`icu4c`](https://github.com/unicode-org/icu/tree/552b01f61127d30d6589aa4bf99468224979b661/icu4c) directory of the `icu` repository. +* `README.md` - This text file. + +### Updating ICU + +To incorporate changes from the upstream `icu` repository: + +* Update `ICU_SHA` with the new Git SHA. +* Update `LICENSE` with the license text from the directory mentioned above. +* Update `utf8.h`, `utf16.h`, and `umachine.h` with their new contents in the `icu` repository. diff --git a/third-party/tree-sitter/src/unicode/ptypes.h b/third-party/tree-sitter/src/unicode/ptypes.h new file mode 100644 index 00000000..ac79ad0f --- /dev/null +++ b/third-party/tree-sitter/src/unicode/ptypes.h @@ -0,0 +1 @@ +// This file must exist in order for `utf8.h` and `utf16.h` to be used. diff --git a/third-party/tree-sitter/src/unicode/umachine.h b/third-party/tree-sitter/src/unicode/umachine.h new file mode 100644 index 00000000..9195824d --- /dev/null +++ b/third-party/tree-sitter/src/unicode/umachine.h @@ -0,0 +1,448 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +****************************************************************************** +* +* Copyright (C) 1999-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +****************************************************************************** +* file name: umachine.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep13 +* created by: Markus W. Scherer +* +* This file defines basic types and constants for ICU to be +* platform-independent. umachine.h and utf.h are included into +* utypes.h to provide all the general definitions for ICU. +* All of these definitions used to be in utypes.h before +* the UTF-handling macros made this unmaintainable. +*/ + +#ifndef __UMACHINE_H__ +#define __UMACHINE_H__ + + +/** + * \file + * \brief Basic types and constants for UTF + * + *

Basic types and constants for UTF

+ * This file defines basic types and constants for utf.h to be + * platform-independent. umachine.h and utf.h are included into + * utypes.h to provide all the general definitions for ICU. + * All of these definitions used to be in utypes.h before + * the UTF-handling macros made this unmaintainable. + * + */ +/*==========================================================================*/ +/* Include platform-dependent definitions */ +/* which are contained in the platform-specific file platform.h */ +/*==========================================================================*/ + +#include "unicode/ptypes.h" /* platform.h is included in ptypes.h */ + +/* + * ANSI C headers: + * stddef.h defines wchar_t + */ +#include + +/*==========================================================================*/ +/* For C wrappers, we use the symbol U_STABLE. */ +/* This works properly if the includer is C or C++. */ +/* Functions are declared U_STABLE return-type U_EXPORT2 function-name()... */ +/*==========================================================================*/ + +/** + * \def U_CFUNC + * This is used in a declaration of a library private ICU C function. + * @stable ICU 2.4 + */ + +/** + * \def U_CDECL_BEGIN + * This is used to begin a declaration of a library private ICU C API. + * @stable ICU 2.4 + */ + +/** + * \def U_CDECL_END + * This is used to end a declaration of a library private ICU C API + * @stable ICU 2.4 + */ + +#ifdef __cplusplus +# define U_CFUNC extern "C" +# define U_CDECL_BEGIN extern "C" { +# define U_CDECL_END } +#else +# define U_CFUNC extern +# define U_CDECL_BEGIN +# define U_CDECL_END +#endif + +#ifndef U_ATTRIBUTE_DEPRECATED +/** + * \def U_ATTRIBUTE_DEPRECATED + * This is used for GCC specific attributes + * @internal + */ +#if U_GCC_MAJOR_MINOR >= 302 +# define U_ATTRIBUTE_DEPRECATED __attribute__ ((deprecated)) +/** + * \def U_ATTRIBUTE_DEPRECATED + * This is used for Visual C++ specific attributes + * @internal + */ +#elif defined(_MSC_VER) && (_MSC_VER >= 1400) +# define U_ATTRIBUTE_DEPRECATED __declspec(deprecated) +#else +# define U_ATTRIBUTE_DEPRECATED +#endif +#endif + +/** This is used to declare a function as a public ICU C API @stable ICU 2.0*/ +#define U_CAPI U_CFUNC U_EXPORT +/** This is used to declare a function as a stable public ICU C API*/ +#define U_STABLE U_CAPI +/** This is used to declare a function as a draft public ICU C API */ +#define U_DRAFT U_CAPI +/** This is used to declare a function as a deprecated public ICU C API */ +#define U_DEPRECATED U_CAPI U_ATTRIBUTE_DEPRECATED +/** This is used to declare a function as an obsolete public ICU C API */ +#define U_OBSOLETE U_CAPI +/** This is used to declare a function as an internal ICU C API */ +#define U_INTERNAL U_CAPI + +/** + * \def U_OVERRIDE + * Defined to the C++11 "override" keyword if available. + * Denotes a class or member which is an override of the base class. + * May result in an error if it applied to something not an override. + * @internal + */ +#ifndef U_OVERRIDE +#define U_OVERRIDE override +#endif + +/** + * \def U_FINAL + * Defined to the C++11 "final" keyword if available. + * Denotes a class or member which may not be overridden in subclasses. + * May result in an error if subclasses attempt to override. + * @internal + */ +#if !defined(U_FINAL) || defined(U_IN_DOXYGEN) +#define U_FINAL final +#endif + +// Before ICU 65, function-like, multi-statement ICU macros were just defined as +// series of statements wrapped in { } blocks and the caller could choose to +// either treat them as if they were actual functions and end the invocation +// with a trailing ; creating an empty statement after the block or else omit +// this trailing ; using the knowledge that the macro would expand to { }. +// +// But doing so doesn't work well with macros that look like functions and +// compiler warnings about empty statements (ICU-20601) and ICU 65 therefore +// switches to the standard solution of wrapping such macros in do { } while. +// +// This will however break existing code that depends on being able to invoke +// these macros without a trailing ; so to be able to remain compatible with +// such code the wrapper is itself defined as macros so that it's possible to +// build ICU 65 and later with the old macro behaviour, like this: +// +// CPPFLAGS='-DUPRV_BLOCK_MACRO_BEGIN="" -DUPRV_BLOCK_MACRO_END=""' +// runConfigureICU ... + +/** + * \def UPRV_BLOCK_MACRO_BEGIN + * Defined as the "do" keyword by default. + * @internal + */ +#ifndef UPRV_BLOCK_MACRO_BEGIN +#define UPRV_BLOCK_MACRO_BEGIN do +#endif + +/** + * \def UPRV_BLOCK_MACRO_END + * Defined as "while (FALSE)" by default. + * @internal + */ +#ifndef UPRV_BLOCK_MACRO_END +#define UPRV_BLOCK_MACRO_END while (FALSE) +#endif + +/*==========================================================================*/ +/* limits for int32_t etc., like in POSIX inttypes.h */ +/*==========================================================================*/ + +#ifndef INT8_MIN +/** The smallest value an 8 bit signed integer can hold @stable ICU 2.0 */ +# define INT8_MIN ((int8_t)(-128)) +#endif +#ifndef INT16_MIN +/** The smallest value a 16 bit signed integer can hold @stable ICU 2.0 */ +# define INT16_MIN ((int16_t)(-32767-1)) +#endif +#ifndef INT32_MIN +/** The smallest value a 32 bit signed integer can hold @stable ICU 2.0 */ +# define INT32_MIN ((int32_t)(-2147483647-1)) +#endif + +#ifndef INT8_MAX +/** The largest value an 8 bit signed integer can hold @stable ICU 2.0 */ +# define INT8_MAX ((int8_t)(127)) +#endif +#ifndef INT16_MAX +/** The largest value a 16 bit signed integer can hold @stable ICU 2.0 */ +# define INT16_MAX ((int16_t)(32767)) +#endif +#ifndef INT32_MAX +/** The largest value a 32 bit signed integer can hold @stable ICU 2.0 */ +# define INT32_MAX ((int32_t)(2147483647)) +#endif + +#ifndef UINT8_MAX +/** The largest value an 8 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT8_MAX ((uint8_t)(255U)) +#endif +#ifndef UINT16_MAX +/** The largest value a 16 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT16_MAX ((uint16_t)(65535U)) +#endif +#ifndef UINT32_MAX +/** The largest value a 32 bit unsigned integer can hold @stable ICU 2.0 */ +# define UINT32_MAX ((uint32_t)(4294967295U)) +#endif + +#if defined(U_INT64_T_UNAVAILABLE) +# error int64_t is required for decimal format and rule-based number format. +#else +# ifndef INT64_C +/** + * Provides a platform independent way to specify a signed 64-bit integer constant. + * note: may be wrong for some 64 bit platforms - ensure your compiler provides INT64_C + * @stable ICU 2.8 + */ +# define INT64_C(c) c ## LL +# endif +# ifndef UINT64_C +/** + * Provides a platform independent way to specify an unsigned 64-bit integer constant. + * note: may be wrong for some 64 bit platforms - ensure your compiler provides UINT64_C + * @stable ICU 2.8 + */ +# define UINT64_C(c) c ## ULL +# endif +# ifndef U_INT64_MIN +/** The smallest value a 64 bit signed integer can hold @stable ICU 2.8 */ +# define U_INT64_MIN ((int64_t)(INT64_C(-9223372036854775807)-1)) +# endif +# ifndef U_INT64_MAX +/** The largest value a 64 bit signed integer can hold @stable ICU 2.8 */ +# define U_INT64_MAX ((int64_t)(INT64_C(9223372036854775807))) +# endif +# ifndef U_UINT64_MAX +/** The largest value a 64 bit unsigned integer can hold @stable ICU 2.8 */ +# define U_UINT64_MAX ((uint64_t)(UINT64_C(18446744073709551615))) +# endif +#endif + +/*==========================================================================*/ +/* Boolean data type */ +/*==========================================================================*/ + +/** The ICU boolean type @stable ICU 2.0 */ +typedef int8_t UBool; + +#ifndef TRUE +/** The TRUE value of a UBool @stable ICU 2.0 */ +# define TRUE 1 +#endif +#ifndef FALSE +/** The FALSE value of a UBool @stable ICU 2.0 */ +# define FALSE 0 +#endif + + +/*==========================================================================*/ +/* Unicode data types */ +/*==========================================================================*/ + +/* wchar_t-related definitions -------------------------------------------- */ + +/* + * \def U_WCHAR_IS_UTF16 + * Defined if wchar_t uses UTF-16. + * + * @stable ICU 2.0 + */ +/* + * \def U_WCHAR_IS_UTF32 + * Defined if wchar_t uses UTF-32. + * + * @stable ICU 2.0 + */ +#if !defined(U_WCHAR_IS_UTF16) && !defined(U_WCHAR_IS_UTF32) +# ifdef __STDC_ISO_10646__ +# if (U_SIZEOF_WCHAR_T==2) +# define U_WCHAR_IS_UTF16 +# elif (U_SIZEOF_WCHAR_T==4) +# define U_WCHAR_IS_UTF32 +# endif +# elif defined __UCS2__ +# if (U_PF_OS390 <= U_PLATFORM && U_PLATFORM <= U_PF_OS400) && (U_SIZEOF_WCHAR_T==2) +# define U_WCHAR_IS_UTF16 +# endif +# elif defined(__UCS4__) || (U_PLATFORM == U_PF_OS400 && defined(__UTF32__)) +# if (U_SIZEOF_WCHAR_T==4) +# define U_WCHAR_IS_UTF32 +# endif +# elif U_PLATFORM_IS_DARWIN_BASED || (U_SIZEOF_WCHAR_T==4 && U_PLATFORM_IS_LINUX_BASED) +# define U_WCHAR_IS_UTF32 +# elif U_PLATFORM_HAS_WIN32_API +# define U_WCHAR_IS_UTF16 +# endif +#endif + +/* UChar and UChar32 definitions -------------------------------------------- */ + +/** Number of bytes in a UChar. @stable ICU 2.0 */ +#define U_SIZEOF_UCHAR 2 + +/** + * \def U_CHAR16_IS_TYPEDEF + * If 1, then char16_t is a typedef and not a real type (yet) + * @internal + */ +#if (U_PLATFORM == U_PF_AIX) && defined(__cplusplus) &&(U_CPLUSPLUS_VERSION < 11) +// for AIX, uchar.h needs to be included +# include +# define U_CHAR16_IS_TYPEDEF 1 +#elif defined(_MSC_VER) && (_MSC_VER < 1900) +// Versions of Visual Studio/MSVC below 2015 do not support char16_t as a real type, +// and instead use a typedef. https://msdn.microsoft.com/library/bb531344.aspx +# define U_CHAR16_IS_TYPEDEF 1 +#else +# define U_CHAR16_IS_TYPEDEF 0 +#endif + + +/** + * \var UChar + * + * The base type for UTF-16 code units and pointers. + * Unsigned 16-bit integer. + * Starting with ICU 59, C++ API uses char16_t directly, while C API continues to use UChar. + * + * UChar is configurable by defining the macro UCHAR_TYPE + * on the preprocessor or compiler command line: + * -DUCHAR_TYPE=uint16_t or -DUCHAR_TYPE=wchar_t (if U_SIZEOF_WCHAR_T==2) etc. + * (The UCHAR_TYPE can also be \#defined earlier in this file, for outside the ICU library code.) + * This is for transitional use from application code that uses uint16_t or wchar_t for UTF-16. + * + * The default is UChar=char16_t. + * + * C++11 defines char16_t as bit-compatible with uint16_t, but as a distinct type. + * + * In C, char16_t is a simple typedef of uint_least16_t. + * ICU requires uint_least16_t=uint16_t for data memory mapping. + * On macOS, char16_t is not available because the uchar.h standard header is missing. + * + * @stable ICU 4.4 + */ + +#if 1 + // #if 1 is normal. UChar defaults to char16_t in C++. + // For configuration testing of UChar=uint16_t temporarily change this to #if 0. + // The intltest Makefile #defines UCHAR_TYPE=char16_t, + // so we only #define it to uint16_t if it is undefined so far. +#elif !defined(UCHAR_TYPE) +# define UCHAR_TYPE uint16_t +#endif + +#if defined(U_COMBINED_IMPLEMENTATION) || defined(U_COMMON_IMPLEMENTATION) || \ + defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) + // Inside the ICU library code, never configurable. + typedef char16_t UChar; +#elif defined(UCHAR_TYPE) + typedef UCHAR_TYPE UChar; +#elif defined(__cplusplus) + typedef char16_t UChar; +#else + typedef uint16_t UChar; +#endif + +/** + * \var OldUChar + * Default ICU 58 definition of UChar. + * A base type for UTF-16 code units and pointers. + * Unsigned 16-bit integer. + * + * Define OldUChar to be wchar_t if that is 16 bits wide. + * If wchar_t is not 16 bits wide, then define UChar to be uint16_t. + * + * This makes the definition of OldUChar platform-dependent + * but allows direct string type compatibility with platforms with + * 16-bit wchar_t types. + * + * This is how UChar was defined in ICU 58, for transition convenience. + * Exception: ICU 58 UChar was defined to UCHAR_TYPE if that macro was defined. + * The current UChar responds to UCHAR_TYPE but OldUChar does not. + * + * @stable ICU 59 + */ +#if U_SIZEOF_WCHAR_T==2 + typedef wchar_t OldUChar; +#elif defined(__CHAR16_TYPE__) + typedef __CHAR16_TYPE__ OldUChar; +#else + typedef uint16_t OldUChar; +#endif + +/** + * Define UChar32 as a type for single Unicode code points. + * UChar32 is a signed 32-bit integer (same as int32_t). + * + * The Unicode code point range is 0..0x10ffff. + * All other values (negative or >=0x110000) are illegal as Unicode code points. + * They may be used as sentinel values to indicate "done", "error" + * or similar non-code point conditions. + * + * Before ICU 2.4 (Jitterbug 2146), UChar32 was defined + * to be wchar_t if that is 32 bits wide (wchar_t may be signed or unsigned) + * or else to be uint32_t. + * That is, the definition of UChar32 was platform-dependent. + * + * @see U_SENTINEL + * @stable ICU 2.4 + */ +typedef int32_t UChar32; + +/** + * This value is intended for sentinel values for APIs that + * (take or) return single code points (UChar32). + * It is outside of the Unicode code point range 0..0x10ffff. + * + * For example, a "done" or "error" value in a new API + * could be indicated with U_SENTINEL. + * + * ICU APIs designed before ICU 2.4 usually define service-specific "done" + * values, mostly 0xffff. + * Those may need to be distinguished from + * actual U+ffff text contents by calling functions like + * CharacterIterator::hasNext() or UnicodeString::length(). + * + * @return -1 + * @see UChar32 + * @stable ICU 2.4 + */ +#define U_SENTINEL (-1) + +#include "unicode/urename.h" + +#endif diff --git a/third-party/tree-sitter/src/unicode/urename.h b/third-party/tree-sitter/src/unicode/urename.h new file mode 100644 index 00000000..ac79ad0f --- /dev/null +++ b/third-party/tree-sitter/src/unicode/urename.h @@ -0,0 +1 @@ +// This file must exist in order for `utf8.h` and `utf16.h` to be used. diff --git a/third-party/tree-sitter/src/unicode/utf.h b/third-party/tree-sitter/src/unicode/utf.h new file mode 100644 index 00000000..ac79ad0f --- /dev/null +++ b/third-party/tree-sitter/src/unicode/utf.h @@ -0,0 +1 @@ +// This file must exist in order for `utf8.h` and `utf16.h` to be used. diff --git a/third-party/tree-sitter/src/unicode/utf16.h b/third-party/tree-sitter/src/unicode/utf16.h new file mode 100644 index 00000000..3315214a --- /dev/null +++ b/third-party/tree-sitter/src/unicode/utf16.h @@ -0,0 +1,733 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2012, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf16.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep09 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: 16-bit Unicode handling macros + * + * This file defines macros to deal with 16-bit Unicode (UTF-16) code units and strings. + * + * For more information see utf.h and the ICU User Guide Strings chapter + * (http://userguide.icu-project.org/strings). + * + * Usage: + * ICU coding guidelines for if() statements should be followed when using these macros. + * Compound statements (curly braces {}) must be used for if-else-while... + * bodies and all macro statements should be terminated with semicolon. + */ + +#ifndef __UTF16_H__ +#define __UTF16_H__ + +#include "unicode/umachine.h" +#ifndef __UTF_H__ +# include "unicode/utf.h" +#endif + +/* single-code point definitions -------------------------------------------- */ + +/** + * Does this code unit alone encode a code point (BMP, not a surrogate)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SINGLE(c) !U_IS_SURROGATE(c) + +/** + * Is this code unit a lead surrogate (U+d800..U+dbff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_LEAD(c) (((c)&0xfffffc00)==0xd800) + +/** + * Is this code unit a trail surrogate (U+dc00..U+dfff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_TRAIL(c) (((c)&0xfffffc00)==0xdc00) + +/** + * Is this code unit a surrogate (U+d800..U+dfff)? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SURROGATE(c) U_IS_SURROGATE(c) + +/** + * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)), + * is it a lead surrogate? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U16_IS_SURROGATE_LEAD(c) (((c)&0x400)==0) + +/** + * Assuming c is a surrogate code point (U16_IS_SURROGATE(c)), + * is it a trail surrogate? + * @param c 16-bit code unit + * @return TRUE or FALSE + * @stable ICU 4.2 + */ +#define U16_IS_SURROGATE_TRAIL(c) (((c)&0x400)!=0) + +/** + * Helper constant for U16_GET_SUPPLEMENTARY. + * @internal + */ +#define U16_SURROGATE_OFFSET ((0xd800<<10UL)+0xdc00-0x10000) + +/** + * Get a supplementary code point value (U+10000..U+10ffff) + * from its lead and trail surrogates. + * The result is undefined if the input values are not + * lead and trail surrogates. + * + * @param lead lead surrogate (U+d800..U+dbff) + * @param trail trail surrogate (U+dc00..U+dfff) + * @return supplementary code point (U+10000..U+10ffff) + * @stable ICU 2.4 + */ +#define U16_GET_SUPPLEMENTARY(lead, trail) \ + (((UChar32)(lead)<<10UL)+(UChar32)(trail)-U16_SURROGATE_OFFSET) + + +/** + * Get the lead surrogate (0xd800..0xdbff) for a + * supplementary code point (0x10000..0x10ffff). + * @param supplementary 32-bit code point (U+10000..U+10ffff) + * @return lead surrogate (U+d800..U+dbff) for supplementary + * @stable ICU 2.4 + */ +#define U16_LEAD(supplementary) (UChar)(((supplementary)>>10)+0xd7c0) + +/** + * Get the trail surrogate (0xdc00..0xdfff) for a + * supplementary code point (0x10000..0x10ffff). + * @param supplementary 32-bit code point (U+10000..U+10ffff) + * @return trail surrogate (U+dc00..U+dfff) for supplementary + * @stable ICU 2.4 + */ +#define U16_TRAIL(supplementary) (UChar)(((supplementary)&0x3ff)|0xdc00) + +/** + * How many 16-bit code units are used to encode this Unicode code point? (1 or 2) + * The result is not defined if c is not a Unicode code point (U+0000..U+10ffff). + * @param c 32-bit code point + * @return 1 or 2 + * @stable ICU 2.4 + */ +#define U16_LENGTH(c) ((uint32_t)(c)<=0xffff ? 1 : 2) + +/** + * The maximum number of 16-bit code units per Unicode code point (U+0000..U+10ffff). + * @return 2 + * @stable ICU 2.4 + */ +#define U16_MAX_LENGTH 2 + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * The result is undefined if the offset points to a single, unpaired surrogate. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_GET + * @stable ICU 2.4 + */ +#define U16_GET_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + (c)=(s)[i]; \ + if(U16_IS_SURROGATE(c)) { \ + if(U16_IS_SURROGATE_LEAD(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)+1]); \ + } else { \ + (c)=U16_GET_SUPPLEMENTARY((s)[(i)-1], (c)); \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to a single, unpaired surrogate, then + * c is set to that unpaired surrogate. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The offset may point to either the lead or trail surrogate unit + * for a supplementary code point, in which case the macro will read + * the adjacent matching surrogate as well. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to a single, unpaired surrogate, then + * c is set to U+FFFD. + * Iteration through a string is more efficient with U16_NEXT_UNSAFE or U16_NEXT_OR_FFFD. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } else { \ + (c)=0xfffd; \ + } \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/* definitions with forward iteration --------------------------------------- */ + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The offset may point to the lead surrogate unit + * for a supplementary code point, in which case the macro will read + * the following trail surrogate as well. + * If the offset points to a trail surrogate, then that itself + * will be returned as the code point. + * The result is undefined if the offset points to a single, unpaired lead surrogate. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_NEXT + * @stable ICU 2.4 + */ +#define U16_NEXT_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + (c)=(s)[(i)++]; \ + if(U16_IS_LEAD(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((c), (s)[(i)++]); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Get a code point from a string at a code point boundary offset, + * and advance the offset to the next code point boundary. + * (Post-incrementing forward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * The offset may point to the lead surrogate unit + * for a supplementary code point, in which case the macro will read + * the following trail surrogate as well. + * If the offset points to a trail surrogate or + * to a single, unpaired lead surrogate, then c is set to that unpaired surrogate. + * + * @param s const UChar * string + * @param i string offset, must be i>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Append a code point to a string, overwriting 1 or 2 code units. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Safe" macro, checks for a valid code point. + * If a surrogate pair is written, checks for sufficient space in the string. + * If the code point is not valid or a trail surrogate does not fit, + * then isError is set to TRUE. + * + * @param s const UChar * string buffer + * @param i string offset, must be i>10)+0xd7c0); \ + (s)[(i)++]=(uint16_t)(((c)&0x3ff)|0xdc00); \ + } else /* c>0x10ffff or not enough space */ { \ + (isError)=TRUE; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_FWD_1 + * @stable ICU 2.4 + */ +#define U16_FWD_1_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U16_IS_LEAD((s)[(i)++])) { \ + ++(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param i string offset, must be i0) { \ + U16_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param i int32_t string offset, must be i0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \ + U16_FWD_1(s, i, length); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to the trail surrogate of a surrogate pair, + * then the offset is decremented. + * Otherwise, it is not modified. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_SET_CP_START + * @stable ICU 2.4 + */ +#define U16_SET_CP_START_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U16_IS_TRAIL((s)[i])) { \ + --(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to the trail surrogate of a surrogate pair, + * then the offset is decremented. + * Otherwise, it is not modified. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start<=i + * @see U16_SET_CP_START_UNSAFE + * @stable ICU 2.4 + */ +#define U16_SET_CP_START(s, start, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U16_IS_TRAIL((s)[i]) && (i)>(start) && U16_IS_LEAD((s)[(i)-1])) { \ + --(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/* definitions with backward iteration -------------------------------------- */ + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Unsafe" macro, assumes well-formed UTF-16. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate, then that itself + * will be returned as the code point. + * The result is undefined if the offset is behind a single, unpaired trail surrogate. + * + * @param s const UChar * string + * @param i string offset + * @param c output UChar32 variable + * @see U16_PREV + * @stable ICU 2.4 + */ +#define U16_PREV_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + (c)=(s)[--(i)]; \ + if(U16_IS_TRAIL(c)) { \ + (c)=U16_GET_SUPPLEMENTARY((s)[--(i)], (c)); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate or behind a single, unpaired + * trail surrogate, then c is set to that unpaired surrogate. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + --(i); \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a trail surrogate unit + * for a supplementary code point, then the macro will read + * the preceding lead surrogate as well. + * If the offset is behind a lead surrogate or behind a single, unpaired + * trail surrogate, then c is set to U+FFFD. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start(start) && U16_IS_LEAD(__c2=(s)[(i)-1])) { \ + --(i); \ + (c)=U16_GET_SUPPLEMENTARY(__c2, (c)); \ + } else { \ + (c)=0xfffd; \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_BACK_1 + * @stable ICU 2.4 + */ +#define U16_BACK_1_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U16_IS_TRAIL((s)[--(i)])) { \ + --(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the previous one. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start starting string offset (usually 0) + * @param i string offset, must be start(start) && U16_IS_LEAD((s)[(i)-1])) { \ + --(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @param n number of code points to skip + * @see U16_BACK_N + * @stable ICU 2.4 + */ +#define U16_BACK_N_UNSAFE(s, i, n) UPRV_BLOCK_MACRO_BEGIN { \ + int32_t __N=(n); \ + while(__N>0) { \ + U16_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * @param s const UChar * string + * @param start start of string + * @param i string offset, must be start0 && (i)>(start)) { \ + U16_BACK_1(s, start, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind the lead surrogate of a surrogate pair, + * then the offset is incremented. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-16. + * + * @param s const UChar * string + * @param i string offset + * @see U16_SET_CP_LIMIT + * @stable ICU 2.4 + */ +#define U16_SET_CP_LIMIT_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U16_IS_LEAD((s)[(i)-1])) { \ + ++(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind the lead surrogate of a surrogate pair, + * then the offset is incremented. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Safe" macro, handles unpaired surrogates and checks for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const UChar * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, start<=i<=length + * @param length int32_t string length + * @see U16_SET_CP_LIMIT_UNSAFE + * @stable ICU 2.4 + */ +#define U16_SET_CP_LIMIT(s, start, i, length) UPRV_BLOCK_MACRO_BEGIN { \ + if((start)<(i) && ((i)<(length) || (length)<0) && U16_IS_LEAD((s)[(i)-1]) && U16_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ +} UPRV_BLOCK_MACRO_END + +#endif diff --git a/third-party/tree-sitter/src/unicode/utf8.h b/third-party/tree-sitter/src/unicode/utf8.h new file mode 100644 index 00000000..bb001303 --- /dev/null +++ b/third-party/tree-sitter/src/unicode/utf8.h @@ -0,0 +1,881 @@ +// © 2016 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +/* +******************************************************************************* +* +* Copyright (C) 1999-2015, International Business Machines +* Corporation and others. All Rights Reserved. +* +******************************************************************************* +* file name: utf8.h +* encoding: UTF-8 +* tab size: 8 (not used) +* indentation:4 +* +* created on: 1999sep13 +* created by: Markus W. Scherer +*/ + +/** + * \file + * \brief C API: 8-bit Unicode handling macros + * + * This file defines macros to deal with 8-bit Unicode (UTF-8) code units (bytes) and strings. + * + * For more information see utf.h and the ICU User Guide Strings chapter + * (http://userguide.icu-project.org/strings). + * + * Usage: + * ICU coding guidelines for if() statements should be followed when using these macros. + * Compound statements (curly braces {}) must be used for if-else-while... + * bodies and all macro statements should be terminated with semicolon. + */ + +#ifndef __UTF8_H__ +#define __UTF8_H__ + +#include "unicode/umachine.h" +#ifndef __UTF_H__ +# include "unicode/utf.h" +#endif + +/* internal definitions ----------------------------------------------------- */ + +/** + * Counts the trail bytes for a UTF-8 lead byte. + * Returns 0 for 0..0xc1 as well as for 0xf5..0xff. + * leadByte might be evaluated multiple times. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * + * @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff. + * @internal + */ +#define U8_COUNT_TRAIL_BYTES(leadByte) \ + (U8_IS_LEAD(leadByte) ? \ + ((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)+1 : 0) + +/** + * Counts the trail bytes for a UTF-8 lead byte of a valid UTF-8 sequence. + * Returns 0 for 0..0xc1. Undefined for 0xf5..0xff. + * leadByte might be evaluated multiple times. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * + * @param leadByte The first byte of a UTF-8 sequence. Must be 0..0xff. + * @internal + */ +#define U8_COUNT_TRAIL_BYTES_UNSAFE(leadByte) \ + (((uint8_t)(leadByte)>=0xc2)+((uint8_t)(leadByte)>=0xe0)+((uint8_t)(leadByte)>=0xf0)) + +/** + * Mask a UTF-8 lead byte, leave only the lower bits that form part of the code point value. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is called by public macros in this file and thus must remain stable. + * @internal + */ +#define U8_MASK_LEAD_BYTE(leadByte, countTrailBytes) ((leadByte)&=(1<<(6-(countTrailBytes)))-1) + +/** + * Internal bit vector for 3-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD3_AND_T1. + * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence. + * Lead byte E0..EF bits 3..0 are used as byte index, + * first trail byte bits 7..5 are used as bit index into that byte. + * @see U8_IS_VALID_LEAD3_AND_T1 + * @internal + */ +#define U8_LEAD3_T1_BITS "\x20\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x30\x10\x30\x30" + +/** + * Internal 3-byte UTF-8 validity check. + * Non-zero if lead byte E0..EF and first trail byte 00..FF start a valid sequence. + * @internal + */ +#define U8_IS_VALID_LEAD3_AND_T1(lead, t1) (U8_LEAD3_T1_BITS[(lead)&0xf]&(1<<((uint8_t)(t1)>>5))) + +/** + * Internal bit vector for 4-byte UTF-8 validity check, for use in U8_IS_VALID_LEAD4_AND_T1. + * Each bit indicates whether one lead byte + first trail byte pair starts a valid sequence. + * First trail byte bits 7..4 are used as byte index, + * lead byte F0..F4 bits 2..0 are used as bit index into that byte. + * @see U8_IS_VALID_LEAD4_AND_T1 + * @internal + */ +#define U8_LEAD4_T1_BITS "\x00\x00\x00\x00\x00\x00\x00\x00\x1E\x0F\x0F\x0F\x00\x00\x00\x00" + +/** + * Internal 4-byte UTF-8 validity check. + * Non-zero if lead byte F0..F4 and first trail byte 00..FF start a valid sequence. + * @internal + */ +#define U8_IS_VALID_LEAD4_AND_T1(lead, t1) (U8_LEAD4_T1_BITS[(uint8_t)(t1)>>4]&(1<<((lead)&7))) + +/** + * Function for handling "next code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE UChar32 U_EXPORT2 +utf8_nextCharSafeBody(const uint8_t *s, int32_t *pi, int32_t length, UChar32 c, UBool strict); + +/** + * Function for handling "append code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE int32_t U_EXPORT2 +utf8_appendCharSafeBody(uint8_t *s, int32_t i, int32_t length, UChar32 c, UBool *pIsError); + +/** + * Function for handling "previous code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE UChar32 U_EXPORT2 +utf8_prevCharSafeBody(const uint8_t *s, int32_t start, int32_t *pi, UChar32 c, UBool strict); + +/** + * Function for handling "skip backward one code point" with error-checking. + * + * This is internal since it is not meant to be called directly by external clients; + * however it is U_STABLE (not U_INTERNAL) since it is called by public macros in this + * file and thus must remain stable, and should not be hidden when other internal + * functions are hidden (otherwise public macros would fail to compile). + * @internal + */ +U_STABLE int32_t U_EXPORT2 +utf8_back1SafeBody(const uint8_t *s, int32_t start, int32_t i); + +/* single-code point definitions -------------------------------------------- */ + +/** + * Does this code unit (byte) encode a code point by itself (US-ASCII 0..0x7f)? + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_SINGLE(c) (((c)&0x80)==0) + +/** + * Is this code unit (byte) a UTF-8 lead byte? (0xC2..0xF4) + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_LEAD(c) ((uint8_t)((c)-0xc2)<=0x32) +// 0x32=0xf4-0xc2 + +/** + * Is this code unit (byte) a UTF-8 trail byte? (0x80..0xBF) + * @param c 8-bit code unit (byte) + * @return TRUE or FALSE + * @stable ICU 2.4 + */ +#define U8_IS_TRAIL(c) ((int8_t)(c)<-0x40) + +/** + * How many code units (bytes) are used for the UTF-8 encoding + * of this Unicode code point? + * @param c 32-bit code point + * @return 1..4, or 0 if c is a surrogate or not a Unicode code point + * @stable ICU 2.4 + */ +#define U8_LENGTH(c) \ + ((uint32_t)(c)<=0x7f ? 1 : \ + ((uint32_t)(c)<=0x7ff ? 2 : \ + ((uint32_t)(c)<=0xd7ff ? 3 : \ + ((uint32_t)(c)<=0xdfff || (uint32_t)(c)>0x10ffff ? 0 : \ + ((uint32_t)(c)<=0xffff ? 3 : 4)\ + ) \ + ) \ + ) \ + ) + +/** + * The maximum number of UTF-8 code units (bytes) per Unicode code point (U+0000..U+10ffff). + * @return 4 + * @stable ICU 2.4 + */ +#define U8_MAX_LENGTH 4 + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * The offset may point to either the lead byte or one of the trail bytes + * for a code point, in which case the macro will read all of the bytes + * for the code point. + * The result is undefined if the offset points to an illegal UTF-8 + * byte sequence. + * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT. + * + * @param s const uint8_t * string + * @param i string offset + * @param c output UChar32 variable + * @see U8_GET + * @stable ICU 2.4 + */ +#define U8_GET_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + int32_t _u8_get_unsafe_index=(int32_t)(i); \ + U8_SET_CP_START_UNSAFE(s, _u8_get_unsafe_index); \ + U8_NEXT_UNSAFE(s, _u8_get_unsafe_index, c); \ +} UPRV_BLOCK_MACRO_END + +/** + * Get a code point from a string at a random-access offset, + * without changing the offset. + * The offset may point to either the lead byte or one of the trail bytes + * for a code point, in which case the macro will read all of the bytes + * for the code point. + * + * The length can be negative for a NUL-terminated string. + * + * If the offset points to an illegal UTF-8 byte sequence, then + * c is set to a negative value. + * Iteration through a string is more efficient with U8_NEXT_UNSAFE or U8_NEXT. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset + * @param i int32_t string offset, must be start<=i=0xe0 ? \ + ((c)<0xf0 ? /* U+0800..U+FFFF except surrogates */ \ + U8_LEAD3_T1_BITS[(c)&=0xf]&(1<<((__t=(s)[i])>>5)) && \ + (__t&=0x3f, 1) \ + : /* U+10000..U+10FFFF */ \ + ((c)-=0xf0)<=4 && \ + U8_LEAD4_T1_BITS[(__t=(s)[i])>>4]&(1<<(c)) && \ + ((c)=((c)<<6)|(__t&0x3f), ++(i)!=(length)) && \ + (__t=(s)[i]-0x80)<=0x3f) && \ + /* valid second-to-last trail byte */ \ + ((c)=((c)<<6)|__t, ++(i)!=(length)) \ + : /* U+0080..U+07FF */ \ + (c)>=0xc2 && ((c)&=0x1f, 1)) && \ + /* last trail byte */ \ + (__t=(s)[i]-0x80)<=0x3f && \ + ((c)=((c)<<6)|__t, ++(i), 1)) { \ + } else { \ + (c)=(sub); /* ill-formed*/ \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Append a code point to a string, overwriting 1 to 4 bytes. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Unsafe" macro, assumes a valid code point and sufficient space in the string. + * Otherwise, the result is undefined. + * + * @param s const uint8_t * string buffer + * @param i string offset + * @param c code point to append + * @see U8_APPEND + * @stable ICU 2.4 + */ +#define U8_APPEND_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + uint32_t __uc=(c); \ + if(__uc<=0x7f) { \ + (s)[(i)++]=(uint8_t)__uc; \ + } else { \ + if(__uc<=0x7ff) { \ + (s)[(i)++]=(uint8_t)((__uc>>6)|0xc0); \ + } else { \ + if(__uc<=0xffff) { \ + (s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \ + } else { \ + (s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \ + (s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + } \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Append a code point to a string, overwriting 1 to 4 bytes. + * The offset points to the current end of the string contents + * and is advanced (post-increment). + * "Safe" macro, checks for a valid code point. + * If a non-ASCII code point is written, checks for sufficient space in the string. + * If the code point is not valid or trail bytes do not fit, + * then isError is set to TRUE. + * + * @param s const uint8_t * string buffer + * @param i int32_t string offset, must be i>6)|0xc0); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else if((__uc<=0xd7ff || (0xe000<=__uc && __uc<=0xffff)) && (i)+2<(capacity)) { \ + (s)[(i)++]=(uint8_t)((__uc>>12)|0xe0); \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else if(0xffff<__uc && __uc<=0x10ffff && (i)+3<(capacity)) { \ + (s)[(i)++]=(uint8_t)((__uc>>18)|0xf0); \ + (s)[(i)++]=(uint8_t)(((__uc>>12)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)(((__uc>>6)&0x3f)|0x80); \ + (s)[(i)++]=(uint8_t)((__uc&0x3f)|0x80); \ + } else { \ + (isError)=TRUE; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_FWD_1 + * @stable ICU 2.4 + */ +#define U8_FWD_1_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + (i)+=1+U8_COUNT_TRAIL_BYTES_UNSAFE((s)[i]); \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the next. + * (Post-incrementing iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i=0xf0 */ { \ + if(U8_IS_VALID_LEAD4_AND_T1(__b, __t1) && \ + ++(i)!=(length) && U8_IS_TRAIL((s)[i]) && \ + ++(i)!=(length) && U8_IS_TRAIL((s)[i])) { \ + ++(i); \ + } \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @param n number of code points to skip + * @see U8_FWD_N + * @stable ICU 2.4 + */ +#define U8_FWD_N_UNSAFE(s, i, n) UPRV_BLOCK_MACRO_BEGIN { \ + int32_t __N=(n); \ + while(__N>0) { \ + U8_FWD_1_UNSAFE(s, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Advance the string offset from one code point boundary to the n-th next one, + * i.e., move forward by n code points. + * (Post-incrementing iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param i int32_t string offset, must be i0 && ((i)<(length) || ((length)<0 && (s)[i]!=0))) { \ + U8_FWD_1(s, i, length); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to a UTF-8 trail byte, + * then the offset is moved backward to the corresponding lead byte. + * Otherwise, it is not modified. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_SET_CP_START + * @stable ICU 2.4 + */ +#define U8_SET_CP_START_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + while(U8_IS_TRAIL((s)[i])) { --(i); } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary + * at the start of a code point. + * If the offset points to a UTF-8 trail byte, + * then the offset is moved backward to the corresponding lead byte. + * Otherwise, it is not modified. + * + * "Safe" macro, checks for illegal sequences and for string boundaries. + * Unlike U8_TRUNCATE_IF_INCOMPLETE(), this macro always reads s[i]. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<=i + * @see U8_SET_CP_START_UNSAFE + * @see U8_TRUNCATE_IF_INCOMPLETE + * @stable ICU 2.4 + */ +#define U8_SET_CP_START(s, start, i) UPRV_BLOCK_MACRO_BEGIN { \ + if(U8_IS_TRAIL((s)[(i)])) { \ + (i)=utf8_back1SafeBody(s, start, (i)); \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * If the string ends with a UTF-8 byte sequence that is valid so far + * but incomplete, then reduce the length of the string to end before + * the lead byte of that incomplete sequence. + * For example, if the string ends with E1 80, the length is reduced by 2. + * + * In all other cases (the string ends with a complete sequence, or it is not + * possible for any further trail byte to extend the trailing sequence) + * the length remains unchanged. + * + * Useful for processing text split across multiple buffers + * (save the incomplete sequence for later) + * and for optimizing iteration + * (check for string length only once per character). + * + * "Safe" macro, checks for illegal sequences and for string boundaries. + * Unlike U8_SET_CP_START(), this macro never reads s[length]. + * + * (In UTF-16, simply check for U16_IS_LEAD(last code unit).) + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param length int32_t string length (usually start<=length) + * @see U8_SET_CP_START + * @stable ICU 61 + */ +#define U8_TRUNCATE_IF_INCOMPLETE(s, start, length) UPRV_BLOCK_MACRO_BEGIN { \ + if((length)>(start)) { \ + uint8_t __b1=s[(length)-1]; \ + if(U8_IS_SINGLE(__b1)) { \ + /* common ASCII character */ \ + } else if(U8_IS_LEAD(__b1)) { \ + --(length); \ + } else if(U8_IS_TRAIL(__b1) && ((length)-2)>=(start)) { \ + uint8_t __b2=s[(length)-2]; \ + if(0xe0<=__b2 && __b2<=0xf4) { \ + if(__b2<0xf0 ? U8_IS_VALID_LEAD3_AND_T1(__b2, __b1) : \ + U8_IS_VALID_LEAD4_AND_T1(__b2, __b1)) { \ + (length)-=2; \ + } \ + } else if(U8_IS_TRAIL(__b2) && ((length)-3)>=(start)) { \ + uint8_t __b3=s[(length)-3]; \ + if(0xf0<=__b3 && __b3<=0xf4 && U8_IS_VALID_LEAD4_AND_T1(__b3, __b2)) { \ + (length)-=3; \ + } \ + } \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/* definitions with backward iteration -------------------------------------- */ + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Unsafe" macro, assumes well-formed UTF-8. + * + * The input offset may be the same as the string length. + * If the offset is behind a multi-byte sequence, then the macro will read + * the whole sequence. + * If the offset is behind a lead byte, then that itself + * will be returned as the code point. + * The result is undefined if the offset is behind an illegal UTF-8 sequence. + * + * @param s const uint8_t * string + * @param i string offset + * @param c output UChar32 variable + * @see U8_PREV + * @stable ICU 2.4 + */ +#define U8_PREV_UNSAFE(s, i, c) UPRV_BLOCK_MACRO_BEGIN { \ + (c)=(uint8_t)(s)[--(i)]; \ + if(U8_IS_TRAIL(c)) { \ + uint8_t __b, __count=1, __shift=6; \ +\ + /* c is a trail byte */ \ + (c)&=0x3f; \ + for(;;) { \ + __b=(s)[--(i)]; \ + if(__b>=0xc0) { \ + U8_MASK_LEAD_BYTE(__b, __count); \ + (c)|=(UChar32)__b<<__shift; \ + break; \ + } else { \ + (c)|=(UChar32)(__b&0x3f)<<__shift; \ + ++__count; \ + __shift+=6; \ + } \ + } \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the previous one + * and get the code point between them. + * (Pre-decrementing backward iteration.) + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The input offset may be the same as the string length. + * If the offset is behind a multi-byte sequence, then the macro will read + * the whole sequence. + * If the offset is behind a lead byte, then that itself + * will be returned as the code point. + * If the offset is behind an illegal UTF-8 sequence, then c is set to a negative value. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start0) { \ + U8_BACK_1_UNSAFE(s, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Move the string offset from one code point boundary to the n-th one before it, + * i.e., move backward by n code points. + * (Pre-decrementing backward iteration.) + * The input offset may be the same as the string length. + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * @param s const uint8_t * string + * @param start int32_t index of the start of the string + * @param i int32_t string offset, must be start0 && (i)>(start)) { \ + U8_BACK_1(s, start, i); \ + --__N; \ + } \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind a partial multi-byte sequence, + * then the offset is incremented to behind the whole sequence. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Unsafe" macro, assumes well-formed UTF-8. + * + * @param s const uint8_t * string + * @param i string offset + * @see U8_SET_CP_LIMIT + * @stable ICU 2.4 + */ +#define U8_SET_CP_LIMIT_UNSAFE(s, i) UPRV_BLOCK_MACRO_BEGIN { \ + U8_BACK_1_UNSAFE(s, i); \ + U8_FWD_1_UNSAFE(s, i); \ +} UPRV_BLOCK_MACRO_END + +/** + * Adjust a random-access offset to a code point boundary after a code point. + * If the offset is behind a partial multi-byte sequence, + * then the offset is incremented to behind the whole sequence. + * Otherwise, it is not modified. + * The input offset may be the same as the string length. + * "Safe" macro, checks for illegal sequences and for string boundaries. + * + * The length can be negative for a NUL-terminated string. + * + * @param s const uint8_t * string + * @param start int32_t starting string offset (usually 0) + * @param i int32_t string offset, must be start<=i<=length + * @param length int32_t string length + * @see U8_SET_CP_LIMIT_UNSAFE + * @stable ICU 2.4 + */ +#define U8_SET_CP_LIMIT(s, start, i, length) UPRV_BLOCK_MACRO_BEGIN { \ + if((start)<(i) && ((i)<(length) || (length)<0)) { \ + U8_BACK_1(s, start, i); \ + U8_FWD_1(s, i, length); \ + } \ +} UPRV_BLOCK_MACRO_END + +#endif diff --git a/tools/diff/README.md b/tools/diff/README.md index 178fe618..e325ce35 100644 --- a/tools/diff/README.md +++ b/tools/diff/README.md @@ -126,6 +126,8 @@ Then configure which files it should be used for (`.git/info/attributes`): Makefile diff=zs-diff Makefile.am diff=zs-diff Makefile.win diff=zs-diff + +*.lua diff=zs-diff ``` This will make it work for `git diff`, but `git show`, `git log` or other