pax_global_header00006660000000000000000000000064147512120600014510gustar00rootroot0000000000000052 comment=5bb5b03e3c1ce5853b5282b9fba060f7c7bbf11e tree-sitter-asm-0.24.0/000077500000000000000000000000001475121206000146205ustar00rootroot00000000000000tree-sitter-asm-0.24.0/.editorconfig000066400000000000000000000011521475121206000172740ustar00rootroot00000000000000root = true [*] charset = utf-8 end_of_line = lf insert_final_newline = true trim_trailing_whitespace = true [*.{json,toml,yml,gyp}] indent_style = space indent_size = 2 [*.js] indent_style = space indent_size = 2 [*.scm] indent_style = space indent_size = 2 [*.{c,cc,h}] indent_style = space indent_size = 4 [*.rs] indent_style = space indent_size = 4 [*.{py,pyi}] indent_style = space indent_size = 4 [*.swift] indent_style = space indent_size = 4 [*.go] indent_style = tab indent_size = 8 [Makefile] indent_style = tab indent_size = 8 [parser.c] indent_size = 2 [{alloc,array,parser}.h] indent_size = 2 tree-sitter-asm-0.24.0/.gitattributes000066400000000000000000000015361475121206000175200ustar00rootroot00000000000000* text=auto eol=lf # Generated source files src/*.json linguist-generated src/parser.c linguist-generated src/tree_sitter/* linguist-generated # C bindings bindings/c/* linguist-generated CMakeLists.txt linguist-generated Makefile linguist-generated # Rust bindings bindings/rust/* linguist-generated Cargo.toml linguist-generated Cargo.lock linguist-generated # Node.js bindings bindings/node/* linguist-generated binding.gyp linguist-generated package.json linguist-generated package-lock.json linguist-generated # Python bindings bindings/python/** linguist-generated setup.py linguist-generated pyproject.toml linguist-generated # Go bindings bindings/go/* linguist-generated go.mod linguist-generated go.sum linguist-generated # Swift bindings bindings/swift/** linguist-generated Package.swift linguist-generated Package.resolved linguist-generated tree-sitter-asm-0.24.0/.github/000077500000000000000000000000001475121206000161605ustar00rootroot00000000000000tree-sitter-asm-0.24.0/.github/FUNDING.yml000066400000000000000000000000201475121206000177650ustar00rootroot00000000000000ko_fi: rubixdev tree-sitter-asm-0.24.0/.github/workflows/000077500000000000000000000000001475121206000202155ustar00rootroot00000000000000tree-sitter-asm-0.24.0/.github/workflows/ts_tests.yml000066400000000000000000000010441475121206000226070ustar00rootroot00000000000000name: Tree-sitter test on: push: branches: [ main ] pull_request: branches: [ main ] jobs: test: name: Tree-sitter grammar tests runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install Rust Toolchain uses: dtolnay/rust-toolchain@stable - name: Install tree-sitter cli uses: taiki-e/install-action@v2 with: tool: tree-sitter-cli - name: Run tree-sitter tests run: tree-sitter test tree-sitter-asm-0.24.0/.github/workflows/typos.yml000066400000000000000000000005011475121206000221120ustar00rootroot00000000000000name: Typo Check on: push: branches: [ main ] pull_request: branches: [ main ] jobs: run: name: Spell Check with Typos runs-on: ubuntu-latest steps: - name: Checkout Actions Repository uses: actions/checkout@v2 - name: Check spelling of file.txt uses: crate-ci/typos@master tree-sitter-asm-0.24.0/.gitignore000066400000000000000000000005041475121206000166070ustar00rootroot00000000000000# Rust artifacts target/ # Node artifacts build/ prebuilds/ node_modules/ # Swift artifacts .build/ # Go artifacts _obj/ # Python artifacts .venv/ dist/ *.egg-info *.whl # C artifacts *.a *.so *.so.* *.dylib *.dll *.pc # Example dirs /examples/*/ # Grammar volatiles *.wasm *.obj *.o # Archives *.tar.gz *.tgz *.zip tree-sitter-asm-0.24.0/CMakeLists.txt000066400000000000000000000045521475121206000173660ustar00rootroot00000000000000cmake_minimum_required(VERSION 3.13) project(tree-sitter-asm VERSION "0.1.0" DESCRIPTION "assembly grammar for tree-sitter" HOMEPAGE_URL "https://github.com/RubixDev/tree-sitter-asm" LANGUAGES C) option(BUILD_SHARED_LIBS "Build using shared libraries" ON) option(TREE_SITTER_REUSE_ALLOCATOR "Reuse the library allocator" OFF) set(TREE_SITTER_ABI_VERSION 14 CACHE STRING "Tree-sitter ABI version") if(NOT ${TREE_SITTER_ABI_VERSION} MATCHES "^[0-9]+$") unset(TREE_SITTER_ABI_VERSION CACHE) message(FATAL_ERROR "TREE_SITTER_ABI_VERSION must be an integer") endif() find_program(TREE_SITTER_CLI tree-sitter DOC "Tree-sitter CLI") add_custom_command(OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/src/parser.c" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/grammar.json" COMMAND "${TREE_SITTER_CLI}" generate src/grammar.json --abi=${TREE_SITTER_ABI_VERSION} WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "Generating parser.c") add_library(tree-sitter-asm src/parser.c) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/src/scanner.c) target_sources(tree-sitter-asm PRIVATE src/scanner.c) endif() target_include_directories(tree-sitter-asm PRIVATE src) target_compile_definitions(tree-sitter-asm PRIVATE $<$:TREE_SITTER_REUSE_ALLOCATOR> $<$:TREE_SITTER_DEBUG>) set_target_properties(tree-sitter-asm PROPERTIES C_STANDARD 11 POSITION_INDEPENDENT_CODE ON SOVERSION "${TREE_SITTER_ABI_VERSION}.${PROJECT_VERSION_MAJOR}" DEFINE_SYMBOL "") configure_file(bindings/c/tree-sitter-asm.pc.in "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-asm.pc" @ONLY) include(GNUInstallDirs) install(FILES bindings/c/tree-sitter-asm.h DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/tree_sitter") install(FILES "${CMAKE_CURRENT_BINARY_DIR}/tree-sitter-asm.pc" DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig") install(TARGETS tree-sitter-asm LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}") add_custom_target(ts-test "${TREE_SITTER_CLI}" test WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" COMMENT "tree-sitter test") tree-sitter-asm-0.24.0/Cargo.lock000066400000000000000000000124561475121206000165350ustar00rootroot00000000000000# This file is automatically @generated by Cargo. # It is not intended for manual editing. version = 4 [[package]] name = "aho-corasick" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "cc" version = "1.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "755717a7de9ec452bf7f3f1a3099085deabd7f2962b861dae91ecd7a365903d2" dependencies = [ "shlex", ] [[package]] name = "equivalent" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "hashbrown" version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "indexmap" version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" dependencies = [ "equivalent", "hashbrown", ] [[package]] name = "itoa" version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "memchr" version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "proc-macro2" version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] [[package]] name = "quote" version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] [[package]] name = "regex" version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", "regex-automata", "regex-syntax", ] [[package]] name = "regex-automata" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", "regex-syntax", ] [[package]] name = "regex-syntax" version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "ryu" version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "serde" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", "syn", ] [[package]] name = "serde_json" version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "indexmap", "itoa", "memchr", "ryu", "serde", ] [[package]] name = "shlex" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "streaming-iterator" version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" [[package]] name = "syn" version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] [[package]] name = "tree-sitter" version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a802c93485fb6781d27e27cb5927f6b00ff8d26b56c70af87267be7e99def97" dependencies = [ "cc", "regex", "regex-syntax", "serde_json", "streaming-iterator", "tree-sitter-language", ] [[package]] name = "tree-sitter-asm" version = "0.24.0" dependencies = [ "cc", "tree-sitter", "tree-sitter-language", "tree-sitter-wasm-build-tool", ] [[package]] name = "tree-sitter-language" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38eee4db33814de3d004de9d8d825627ed3320d0989cce0dea30efaf5be4736c" [[package]] name = "tree-sitter-wasm-build-tool" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a6958cb1005ebc9a14a9860799f634dc881bcc4d9a58e55834776a6d58891a11" dependencies = [ "cc", ] [[package]] name = "unicode-ident" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" tree-sitter-asm-0.24.0/Cargo.toml000066400000000000000000000014221475121206000165470ustar00rootroot00000000000000[package] name = "tree-sitter-asm" description = "assembly grammar for the tree-sitter parsing library" authors = ["RubixDev"] version = "0.24.0" keywords = ["incremental", "parsing", "tree-sitter", "asm"] categories = ["parsing", "text-editors"] repository = "https://github.com/RubixDev/tree-sitter-asm" edition = "2021" license = "MIT" readme = "README.md" autoexamples = false build = "bindings/rust/build.rs" include = ["bindings/rust/*", "grammar.js", "queries/*", "src/*", "tree-sitter.json"] [features] wasm = ["dep:tree-sitter-wasm-build-tool"] [lib] path = "bindings/rust/lib.rs" [dependencies] tree-sitter-language = "0.1" [build-dependencies] cc = "1.1.22" tree-sitter-wasm-build-tool = { version = "0.2.2", optional = true } [dev-dependencies] tree-sitter = "0.25.1" tree-sitter-asm-0.24.0/LICENSE000066400000000000000000000020341475121206000156240ustar00rootroot00000000000000Copyright (c) 2023 RubixDev 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, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 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. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. tree-sitter-asm-0.24.0/Makefile000066400000000000000000000061451475121206000162660ustar00rootroot00000000000000ifeq ($(OS),Windows_NT) $(error Windows is not supported) endif LANGUAGE_NAME := tree-sitter-asm HOMEPAGE_URL := https://github.com/RubixDev/tree-sitter-asm VERSION := 0.1.0 # repository SRC_DIR := src TS ?= tree-sitter # install directory layout PREFIX ?= /usr/local INCLUDEDIR ?= $(PREFIX)/include LIBDIR ?= $(PREFIX)/lib PCLIBDIR ?= $(LIBDIR)/pkgconfig # source/object files PARSER := $(SRC_DIR)/parser.c EXTRAS := $(filter-out $(PARSER),$(wildcard $(SRC_DIR)/*.c)) OBJS := $(patsubst %.c,%.o,$(PARSER) $(EXTRAS)) # flags ARFLAGS ?= rcs override CFLAGS += -I$(SRC_DIR) -std=c11 -fPIC # ABI versioning SONAME_MAJOR = $(shell sed -n 's/\#define LANGUAGE_VERSION //p' $(PARSER)) SONAME_MINOR = $(word 1,$(subst ., ,$(VERSION))) # OS-specific bits ifeq ($(shell uname),Darwin) SOEXT = dylib SOEXTVER_MAJOR = $(SONAME_MAJOR).$(SOEXT) SOEXTVER = $(SONAME_MAJOR).$(SONAME_MINOR).$(SOEXT) LINKSHARED = -dynamiclib -Wl,-install_name,$(LIBDIR)/lib$(LANGUAGE_NAME).$(SOEXTVER),-rpath,@executable_path/../Frameworks else SOEXT = so SOEXTVER_MAJOR = $(SOEXT).$(SONAME_MAJOR) SOEXTVER = $(SOEXT).$(SONAME_MAJOR).$(SONAME_MINOR) LINKSHARED = -shared -Wl,-soname,lib$(LANGUAGE_NAME).$(SOEXTVER) endif ifneq ($(filter $(shell uname),FreeBSD NetBSD DragonFly),) PCLIBDIR := $(PREFIX)/libdata/pkgconfig endif all: lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a: $(OBJS) $(AR) $(ARFLAGS) $@ $^ lib$(LANGUAGE_NAME).$(SOEXT): $(OBJS) $(CC) $(LDFLAGS) $(LINKSHARED) $^ $(LDLIBS) -o $@ ifneq ($(STRIP),) $(STRIP) $@ endif $(LANGUAGE_NAME).pc: bindings/c/$(LANGUAGE_NAME).pc.in sed -e 's|@PROJECT_VERSION@|$(VERSION)|' \ -e 's|@CMAKE_INSTALL_LIBDIR@|$(LIBDIR:$(PREFIX)/%=%)|' \ -e 's|@CMAKE_INSTALL_INCLUDEDIR@|$(INCLUDEDIR:$(PREFIX)/%=%)|' \ -e 's|@PROJECT_DESCRIPTION@|$(DESCRIPTION)|' \ -e 's|@PROJECT_HOMEPAGE_URL@|$(HOMEPAGE_URL)|' \ -e 's|@CMAKE_INSTALL_PREFIX@|$(PREFIX)|' $< > $@ $(PARSER): $(SRC_DIR)/grammar.json $(TS) generate $^ install: all install -d '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter '$(DESTDIR)$(PCLIBDIR)' '$(DESTDIR)$(LIBDIR)' install -m644 bindings/c/$(LANGUAGE_NAME).h '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h install -m644 $(LANGUAGE_NAME).pc '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc install -m644 lib$(LANGUAGE_NAME).a '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a install -m755 lib$(LANGUAGE_NAME).$(SOEXT) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) ln -sf lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) uninstall: $(RM) '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).a \ '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER) \ '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXTVER_MAJOR) \ '$(DESTDIR)$(LIBDIR)'/lib$(LANGUAGE_NAME).$(SOEXT) \ '$(DESTDIR)$(INCLUDEDIR)'/tree_sitter/$(LANGUAGE_NAME).h \ '$(DESTDIR)$(PCLIBDIR)'/$(LANGUAGE_NAME).pc clean: $(RM) $(OBJS) $(LANGUAGE_NAME).pc lib$(LANGUAGE_NAME).a lib$(LANGUAGE_NAME).$(SOEXT) test: $(TS) test .PHONY: all install uninstall clean test tree-sitter-asm-0.24.0/Package.swift000066400000000000000000000020111475121206000172230ustar00rootroot00000000000000// swift-tools-version:5.3 import PackageDescription let package = Package( name: "TreeSitterAsm", products: [ .library(name: "TreeSitterAsm", targets: ["TreeSitterAsm"]), ], dependencies: [ .package(url: "https://github.com/ChimeHQ/SwiftTreeSitter", from: "0.8.0"), ], targets: [ .target( name: "TreeSitterAsm", dependencies: [], path: ".", sources: [ "src/parser.c", // NOTE: if your language has an external scanner, add it here. ], resources: [ .copy("queries") ], publicHeadersPath: "bindings/swift", cSettings: [.headerSearchPath("src")] ), .testTarget( name: "TreeSitterAsmTests", dependencies: [ "SwiftTreeSitter", "TreeSitterAsm", ], path: "bindings/swift/TreeSitterAsmTests" ) ], cLanguageStandard: .c11 ) tree-sitter-asm-0.24.0/README.md000066400000000000000000000005501475121206000160770ustar00rootroot00000000000000# tree-sitter-asm Generic assembly grammar for [tree-sitter](https://github.com/tree-sitter/tree-sitter) ## Usage in Neovim ### Parser Installation The parser is included in the [nvim-treesitter plugin](https://github.com/nvim-treesitter/nvim-treesitter). To use it, simply install it with `:TSInstall asm` or by adding it to your `ensure_installed` list. tree-sitter-asm-0.24.0/binding.gyp000066400000000000000000000012041475121206000167500ustar00rootroot00000000000000{ "targets": [ { "target_name": "tree_sitter_asm_binding", "dependencies": [ " typedef struct TSLanguage TSLanguage; extern "C" TSLanguage *tree_sitter_asm(); // "tree-sitter", "language" hashed with BLAKE2 const napi_type_tag LANGUAGE_TYPE_TAG = { 0x8AF2E5212AD58ABF, 0xD5006CAD83ABBA16 }; Napi::Object Init(Napi::Env env, Napi::Object exports) { exports["name"] = Napi::String::New(env, "asm"); auto language = Napi::External::New(env, tree_sitter_asm()); language.TypeTag(&LANGUAGE_TYPE_TAG); exports["language"] = language; return exports; } NODE_API_MODULE(tree_sitter_asm_binding, Init) tree-sitter-asm-0.24.0/bindings/node/binding_test.js000066400000000000000000000003721475121206000223530ustar00rootroot00000000000000const assert = require("node:assert"); const { test } = require("node:test"); const Parser = require("tree-sitter"); test("can load grammar", () => { const parser = new Parser(); assert.doesNotThrow(() => parser.setLanguage(require("."))); }); tree-sitter-asm-0.24.0/bindings/node/index.d.ts000066400000000000000000000007041475121206000212440ustar00rootroot00000000000000type BaseNode = { type: string; named: boolean; }; type ChildNode = { multiple: boolean; required: boolean; types: BaseNode[]; }; type NodeInfo = | (BaseNode & { subtypes: BaseNode[]; }) | (BaseNode & { fields: { [name: string]: ChildNode }; children: ChildNode[]; }); type Language = { name: string; language: unknown; nodeTypeInfo: NodeInfo[]; }; declare const language: Language; export = language; tree-sitter-asm-0.24.0/bindings/node/index.js000066400000000000000000000007041475121206000210100ustar00rootroot00000000000000const root = require("path").join(__dirname, "..", ".."); module.exports = typeof process.versions.bun === "string" // Support `bun build --compile` by being statically analyzable enough to find the .node file at build-time ? require(`../../prebuilds/${process.platform}-${process.arch}/tree-sitter-asm.node`) : require("node-gyp-build")(root); try { module.exports.nodeTypeInfo = require("../../src/node-types.json"); } catch (_) {} tree-sitter-asm-0.24.0/bindings/python/000077500000000000000000000000001475121206000177365ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/python/tests/000077500000000000000000000000001475121206000211005ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/python/tests/test_binding.py000066400000000000000000000004371475121206000241270ustar00rootroot00000000000000from unittest import TestCase import tree_sitter, tree_sitter_asm class TestLanguage(TestCase): def test_can_load_grammar(self): try: tree_sitter.Language(tree_sitter_asm.language()) except Exception: self.fail("Error loading Asm grammar") tree-sitter-asm-0.24.0/bindings/python/tree_sitter_asm/000077500000000000000000000000001475121206000231275ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/python/tree_sitter_asm/__init__.py000066400000000000000000000022051475121206000252370ustar00rootroot00000000000000"""assembly grammar for tree-sitter""" from importlib.resources import files as _files from ._binding import language def _get_query(name, file): query = _files(f"{__package__}.queries") / file globals()[name] = query.read_text() return globals()[name] def __getattr__(name): # NOTE: uncomment these to include any queries that this grammar contains: # if name == "HIGHLIGHTS_QUERY": # return _get_query("HIGHLIGHTS_QUERY", "highlights.scm") # if name == "INJECTIONS_QUERY": # return _get_query("INJECTIONS_QUERY", "injections.scm") # if name == "LOCALS_QUERY": # return _get_query("LOCALS_QUERY", "locals.scm") # if name == "TAGS_QUERY": # return _get_query("TAGS_QUERY", "tags.scm") raise AttributeError(f"module {__name__!r} has no attribute {name!r}") __all__ = [ "language", # "HIGHLIGHTS_QUERY", # "INJECTIONS_QUERY", # "LOCALS_QUERY", # "TAGS_QUERY", ] def __dir__(): return sorted(__all__ + [ "__all__", "__builtins__", "__cached__", "__doc__", "__file__", "__loader__", "__name__", "__package__", "__path__", "__spec__", ]) tree-sitter-asm-0.24.0/bindings/python/tree_sitter_asm/__init__.pyi000066400000000000000000000003671475121206000254170ustar00rootroot00000000000000from typing import Final # NOTE: uncomment these to include any queries that this grammar contains: # HIGHLIGHTS_QUERY: Final[str] # INJECTIONS_QUERY: Final[str] # LOCALS_QUERY: Final[str] # TAGS_QUERY: Final[str] def language() -> object: ... tree-sitter-asm-0.24.0/bindings/python/tree_sitter_asm/binding.c000066400000000000000000000012451475121206000247070ustar00rootroot00000000000000#include typedef struct TSLanguage TSLanguage; TSLanguage *tree_sitter_asm(void); static PyObject* _binding_language(PyObject *Py_UNUSED(self), PyObject *Py_UNUSED(args)) { return PyCapsule_New(tree_sitter_asm(), "tree_sitter.Language", NULL); } static PyMethodDef methods[] = { {"language", _binding_language, METH_NOARGS, "Get the tree-sitter language for this grammar."}, {NULL, NULL, 0, NULL} }; static struct PyModuleDef module = { .m_base = PyModuleDef_HEAD_INIT, .m_name = "_binding", .m_doc = NULL, .m_size = -1, .m_methods = methods }; PyMODINIT_FUNC PyInit__binding(void) { return PyModule_Create(&module); } tree-sitter-asm-0.24.0/bindings/python/tree_sitter_asm/py.typed000066400000000000000000000000001475121206000246140ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/rust/000077500000000000000000000000001475121206000174125ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/rust/build.rs000066400000000000000000000007761475121206000210710ustar00rootroot00000000000000fn main() { let src_dir = std::path::Path::new("src"); let mut c_config = cc::Build::new(); c_config.std("c11").include(src_dir); #[cfg(target_env = "msvc")] c_config.flag("-utf-8"); let parser_path = src_dir.join("parser.c"); c_config.file(&parser_path); println!("cargo:rerun-if-changed={}", parser_path.to_str().unwrap()); #[cfg(feature = "wasm")] tree_sitter_wasm_build_tool::add_wasm_headers(&mut c_config).unwrap(); c_config.compile("tree-sitter-asm"); } tree-sitter-asm-0.24.0/bindings/rust/lib.rs000066400000000000000000000035141475121206000205310ustar00rootroot00000000000000//! This crate provides asm language support for the [tree-sitter][] parsing library. //! //! Typically, you will use the [LANGUAGE][] constant to add this language to a //! tree-sitter [Parser][], and then use the parser to parse some code: //! //! ``` //! let code = "pushq %rbp, %rbp"; //! let mut parser = tree_sitter::Parser::new(); //! let language = tree_sitter_asm::LANGUAGE; //! parser //! .set_language(&language.into()) //! .expect("Error loading asm parser"); //! let tree = parser.parse(code, None).unwrap(); //! assert!(!tree.root_node().has_error()); //! ``` //! //! [Parser]: https://docs.rs/tree-sitter/*/tree_sitter/struct.Parser.html //! [tree-sitter]: https://tree-sitter.github.io/ use tree_sitter_language::LanguageFn; extern "C" { fn tree_sitter_asm() -> *const (); } /// The tree-sitter [`LanguageFn`][LanguageFn] for this grammar. /// /// [LanguageFn]: https://docs.rs/tree-sitter-language/*/tree_sitter_language/struct.LanguageFn.html pub const LANGUAGE: LanguageFn = unsafe { LanguageFn::from_raw(tree_sitter_asm) }; /// The content of the [`node-types.json`][] file for this grammar. /// /// [`node-types.json`]: https://tree-sitter.github.io/tree-sitter/using-parsers#static-node-types pub const NODE_TYPES: &str = include_str!("../../src/node-types.json"); pub const HIGHLIGHTS_QUERY: &str = include_str!("../../queries/asm/highlights.scm"); // pub const INJECTIONS_QUERY: &str = include_str!("../../queries/injections.scm"); // pub const LOCALS_QUERY: &str = include_str!("../../queries/locals.scm"); // pub const TAGS_QUERY: &str = include_str!("../../queries/tags.scm"); #[cfg(test)] mod tests { #[test] fn test_can_load_grammar() { let mut parser = tree_sitter::Parser::new(); parser .set_language(&super::LANGUAGE.into()) .expect("Error loading asm parser"); } } tree-sitter-asm-0.24.0/bindings/swift/000077500000000000000000000000001475121206000175515ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/swift/TreeSitterAsm/000077500000000000000000000000001475121206000223045ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/swift/TreeSitterAsm/asm.h000066400000000000000000000003521475121206000232350ustar00rootroot00000000000000#ifndef TREE_SITTER_ASM_H_ #define TREE_SITTER_ASM_H_ typedef struct TSLanguage TSLanguage; #ifdef __cplusplus extern "C" { #endif const TSLanguage *tree_sitter_asm(void); #ifdef __cplusplus } #endif #endif // TREE_SITTER_ASM_H_ tree-sitter-asm-0.24.0/bindings/swift/TreeSitterAsmTests/000077500000000000000000000000001475121206000233275ustar00rootroot00000000000000tree-sitter-asm-0.24.0/bindings/swift/TreeSitterAsmTests/TreeSitterAsmTests.swift000066400000000000000000000005431475121206000301650ustar00rootroot00000000000000import XCTest import SwiftTreeSitter import TreeSitterAsm final class TreeSitterAsmTests: XCTestCase { func testCanLoadGrammar() throws { let parser = Parser() let language = Language(language: tree_sitter_asm()) XCTAssertNoThrow(try parser.setLanguage(language), "Error loading Asm grammar") } } tree-sitter-asm-0.24.0/dprint.json000066400000000000000000000014101475121206000170070ustar00rootroot00000000000000{ "lineWidth": 100, "indentWidth": 4, "useTabs": false, "typescript": { "semiColons": "asi", "quoteStyle": "preferSingle", "quoteProps": "asNeeded", "singleBodyPosition": "sameLine", "nextControlFlowPosition": "sameLine", "arrowFunction.useParentheses": "preferNone", "enumDeclaration.memberSpacing": "newLine" }, "json": { "indentWidth": 2, "array.preferSingleLine": true }, "markdown": { "lineWidth": 80, "textWrap": "always" }, "includes": ["**/*"], "excludes": ["src", "bindings", "**/node_modules", "**/*-lock.json"], "plugins": [ "https://plugins.dprint.dev/typescript-0.80.2.wasm", "https://plugins.dprint.dev/json-0.17.0.wasm", "https://plugins.dprint.dev/markdown-0.15.2.wasm" ] } tree-sitter-asm-0.24.0/go.mod000066400000000000000000000001531475121206000157250ustar00rootroot00000000000000module github.com/RubixDev/tree-sitter-asm go 1.22 require github.com/tree-sitter/go-tree-sitter v0.24.0 tree-sitter-asm-0.24.0/grammar.js000066400000000000000000000100461475121206000166050ustar00rootroot00000000000000module.exports = grammar({ name: 'asm', extras: $ => [ / |\t|\r/, $.line_comment, $.block_comment, ], conflicts: $ => [ [ $._expr, $._tc_expr, ], ], rules: { program: $ => sep(repeat1('\n'), $._item), _item: $ => choice( $.meta, $.label, $.const, $.instruction, ), meta: $ => seq( field('kind', $.meta_ident), optional(choice( $.ident, seq($.int, repeat(seq(',', $.int))), seq($.float, repeat(seq(',', $.float))), seq($.string, repeat(seq(',', $.string))), )), ), label: $ => choice( seq( choice($.meta_ident, alias($.word, $.ident), alias($._ident, $.ident)), ':', optional(seq('(', $.ident, ')')), ), seq( 'label', field('name', $.word), ), ), const: $ => seq('const', field('name', $.word), field('value', $._tc_expr)), instruction: $ => seq(field('kind', $.word), choice(sep(',', $._expr), repeat($._tc_expr))), _expr: $ => choice($.ptr, $.ident, $.int, $.string, $.float), ptr: $ => choice( seq( optional(seq(choice('byte', 'word', 'dword', 'qword'), 'ptr')), '[', $.reg, optional(seq(choice('+', '-'), choice($.int, $.ident))), ']', ), seq( optional($.int), '(', $.reg, ')', ), seq( '*', 'rel', '[', $.int, ']', ), // Aarch64 seq( '[', $.reg, optional(seq(',', $.int)), ']', optional('!'), ), ), // Turing Complete _tc_expr: $ => choice( $.ident, $.int, $.string, $.tc_infix, ), tc_infix: $ => choice( ...[ ['+', 0], ['-', 0], ['*', 1], ['/', 1], ['%', 1], ['|', 2], ['^', 3], ['&', 4], ].map(([op, p]) => prec.left( p, seq(field('lhs', $._tc_expr), field('op', op), field('rhs', $._tc_expr)), ) ), ), int: $ => { const _int = /-?([0-9][0-9_]*|(0x|\$)[0-9A-Fa-f][0-9A-Fa-f_]*|0b[01][01_]*)/ return choice( seq('#', token.immediate(_int)), _int, ) }, float: $ => /-?[0-9][0-9_]*\.([0-9][0-9_]*)?/, string: $ => /"[^"]*"/, word: $ => /[a-zA-Z0-9_]+/, _reg: $ => /%?[a-z0-9]+/, address: $ => /\$[a-zA-Z0-9_]+/, // GAS x86 address reg: $ => choice($._reg, $.word, $.address), meta_ident: $ => /\.[a-z_]+/, _ident: $ => /[a-zA-Z_0-9.]+/, ident: $ => choice($._ident, $.meta_ident, $.reg), line_comment: $ => choice( seq('#', token.immediate(/.*/)), /(\/\/|;).*/, ), block_comment: $ => token(seq( '/*', /[^*]*\*+([^/*][^*]*\*+)*/, '/', )), }, }) function sep(separator, rule) { return optional(seq(rule, repeat(seq(separator, rule)), optional(separator))) } tree-sitter-asm-0.24.0/package.json000066400000000000000000000017331475121206000171120ustar00rootroot00000000000000{ "name": "tree-sitter-asm", "version": "0.1.0", "description": "assembly grammar for tree-sitter", "main": "bindings/node", "types": "bindings/node", "scripts": { "build": "tree-sitter generate && node-gyp build", "test": "tree-sitter test", "install": "node-gyp-build", "prebuildify": "prebuildify --napi --strip" }, "repository": { "type": "git", "url": "https://github.com/RubixDev/tree-sitter-asm" }, "keywords": [ "parser", "lexer" ], "files": [ "grammar.js", "binding.gyp", "prebuilds/**", "bindings/node/*", "queries/*", "src/**" ], "author": "RubixDev", "license": "MIT", "dependencies": { "node-addon-api": "^7.1.0", "node-gyp-build": "^4.8.0" }, "peerDependencies": { "tree-sitter": "^0.22.6" }, "peerDependenciesMeta": { "tree_sitter": { "optional": true } }, "devDependencies": { "prebuildify": "^6.0.1", "tree-sitter-cli": "^0.22.6" } } tree-sitter-asm-0.24.0/pyproject.toml000066400000000000000000000013251475121206000175350ustar00rootroot00000000000000[build-system] requires = ["setuptools>=42", "wheel"] build-backend = "setuptools.build_meta" [project] name = "tree-sitter-asm" description = "assembly grammar for tree-sitter" version = "0.1.0" keywords = ["incremental", "parsing", "tree-sitter", "asm"] classifiers = [ "Intended Audience :: Developers", "Topic :: Software Development :: Compilers", "Topic :: Text Processing :: Linguistic", "Typing :: Typed", ] authors = [{ name = "RubixDev" }] requires-python = ">=3.9" license.text = "MIT" readme = "README.md" [project.urls] Homepage = "https://github.com/RubixDev/tree-sitter-asm" [project.optional-dependencies] core = ["tree-sitter~=0.22"] [tool.cibuildwheel] build = "cp39-*" build-frontend = "build" tree-sitter-asm-0.24.0/queries/000077500000000000000000000000001475121206000162755ustar00rootroot00000000000000tree-sitter-asm-0.24.0/queries/asm/000077500000000000000000000000001475121206000170555ustar00rootroot00000000000000tree-sitter-asm-0.24.0/queries/asm/highlights.scm000066400000000000000000000011261475121206000217130ustar00rootroot00000000000000; General (label [(ident) (word)] @label) (reg) @variable.builtin (meta kind: (_) @function.builtin) (instruction kind: (_) @function.builtin) (const name: (word) @constant) ; Comments [ (line_comment) (block_comment) ] @comment @spell ; Literals (int) @number (float) @number.float (string) @string ; Keywords [ "byte" "word" "dword" "qword" "ptr" "rel" "label" "const" ] @keyword ; Operators & Punctuation [ "+" "-" "*" "/" "%" "|" "^" "&" ] @operator [ "(" ")" "[" "]" ] @punctuation.bracket [ "," ":" ] @punctuation.delimiter tree-sitter-asm-0.24.0/queries/asm/injections.scm000066400000000000000000000001431475121206000217240ustar00rootroot00000000000000([ (line_comment) (block_comment) ] @injection.content (#set! injection.language "comment")) tree-sitter-asm-0.24.0/setup.py000066400000000000000000000033221475121206000163320ustar00rootroot00000000000000from os.path import isdir, join from platform import system from setuptools import Extension, find_packages, setup from setuptools.command.build import build from wheel.bdist_wheel import bdist_wheel class Build(build): def run(self): if isdir("queries"): dest = join(self.build_lib, "tree_sitter_asm", "queries") self.copy_tree("queries", dest) super().run() class BdistWheel(bdist_wheel): def get_tag(self): python, abi, platform = super().get_tag() if python.startswith("cp"): python, abi = "cp39", "abi3" return python, abi, platform setup( packages=find_packages("bindings/python"), package_dir={"": "bindings/python"}, package_data={ "tree_sitter_asm": ["*.pyi", "py.typed"], "tree_sitter_asm.queries": ["*.scm"], }, ext_package="tree_sitter_asm", ext_modules=[ Extension( name="_binding", sources=[ "bindings/python/tree_sitter_asm/binding.c", "src/parser.c", # NOTE: if your language uses an external scanner, add it here. ], extra_compile_args=[ "-std=c11", "-fvisibility=hidden", ] if system() != "Windows" else [ "/std:c11", "/utf-8", ], define_macros=[ ("Py_LIMITED_API", "0x03090000"), ("PY_SSIZE_T_CLEAN", None), ("TREE_SITTER_HIDE_SYMBOLS", None), ], include_dirs=["src"], py_limited_api=True, ) ], cmdclass={ "build": Build, "bdist_wheel": BdistWheel }, zip_safe=False ) tree-sitter-asm-0.24.0/src/000077500000000000000000000000001475121206000154075ustar00rootroot00000000000000tree-sitter-asm-0.24.0/src/grammar.json000066400000000000000000000574621475121206000177460ustar00rootroot00000000000000{ "$schema": "https://tree-sitter.github.io/tree-sitter/assets/schemas/grammar.schema.json", "name": "asm", "rules": { "program": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_item" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "REPEAT1", "content": { "type": "STRING", "value": "\n" } }, { "type": "SYMBOL", "name": "_item" } ] } }, { "type": "CHOICE", "members": [ { "type": "REPEAT1", "content": { "type": "STRING", "value": "\n" } }, { "type": "BLANK" } ] } ] }, { "type": "BLANK" } ] }, "_item": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "meta" }, { "type": "SYMBOL", "name": "label" }, { "type": "SYMBOL", "name": "const" }, { "type": "SYMBOL", "name": "instruction" } ] }, "meta": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "kind", "content": { "type": "SYMBOL", "name": "meta_ident" } }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ident" }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "int" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "int" } ] } } ] }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "float" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "float" } ] } } ] }, { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "string" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "string" } ] } } ] } ] }, { "type": "BLANK" } ] } ] }, "label": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "meta_ident" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "word" }, "named": true, "value": "ident" }, { "type": "ALIAS", "content": { "type": "SYMBOL", "name": "_ident" }, "named": true, "value": "ident" } ] }, { "type": "STRING", "value": ":" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "ident" }, { "type": "STRING", "value": ")" } ] }, { "type": "BLANK" } ] } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "label" }, { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "word" } } ] } ] }, "const": { "type": "SEQ", "members": [ { "type": "STRING", "value": "const" }, { "type": "FIELD", "name": "name", "content": { "type": "SYMBOL", "name": "word" } }, { "type": "FIELD", "name": "value", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] }, "instruction": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "kind", "content": { "type": "SYMBOL", "name": "word" } }, { "type": "CHOICE", "members": [ { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "SYMBOL", "name": "_expr" }, { "type": "REPEAT", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "_expr" } ] } }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "," }, { "type": "BLANK" } ] } ] }, { "type": "BLANK" } ] }, { "type": "REPEAT", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } ] }, "_expr": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ptr" }, { "type": "SYMBOL", "name": "ident" }, { "type": "SYMBOL", "name": "int" }, { "type": "SYMBOL", "name": "string" }, { "type": "SYMBOL", "name": "float" } ] }, "ptr": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "byte" }, { "type": "STRING", "value": "word" }, { "type": "STRING", "value": "dword" }, { "type": "STRING", "value": "qword" } ] }, { "type": "STRING", "value": "ptr" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "[" }, { "type": "SYMBOL", "name": "reg" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "STRING", "value": "+" }, { "type": "STRING", "value": "-" } ] }, { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "int" }, { "type": "SYMBOL", "name": "ident" } ] } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "]" } ] }, { "type": "SEQ", "members": [ { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "int" }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "(" }, { "type": "SYMBOL", "name": "reg" }, { "type": "STRING", "value": ")" } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "*" }, { "type": "STRING", "value": "rel" }, { "type": "STRING", "value": "[" }, { "type": "SYMBOL", "name": "int" }, { "type": "STRING", "value": "]" } ] }, { "type": "SEQ", "members": [ { "type": "STRING", "value": "[" }, { "type": "SYMBOL", "name": "reg" }, { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "," }, { "type": "SYMBOL", "name": "int" } ] }, { "type": "BLANK" } ] }, { "type": "STRING", "value": "]" }, { "type": "CHOICE", "members": [ { "type": "STRING", "value": "!" }, { "type": "BLANK" } ] } ] } ] }, "_tc_expr": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "ident" }, { "type": "SYMBOL", "name": "int" }, { "type": "SYMBOL", "name": "string" }, { "type": "SYMBOL", "name": "tc_infix" } ] }, "tc_infix": { "type": "CHOICE", "members": [ { "type": "PREC_LEFT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "+" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 0, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "-" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "*" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "/" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 1, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "%" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 2, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "|" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 3, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "^" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } }, { "type": "PREC_LEFT", "value": 4, "content": { "type": "SEQ", "members": [ { "type": "FIELD", "name": "lhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } }, { "type": "FIELD", "name": "op", "content": { "type": "STRING", "value": "&" } }, { "type": "FIELD", "name": "rhs", "content": { "type": "SYMBOL", "name": "_tc_expr" } } ] } } ] }, "int": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "#" }, { "type": "IMMEDIATE_TOKEN", "content": { "type": "PATTERN", "value": "-?([0-9][0-9_]*|(0x|\\$)[0-9A-Fa-f][0-9A-Fa-f_]*|0b[01][01_]*)" } } ] }, { "type": "PATTERN", "value": "-?([0-9][0-9_]*|(0x|\\$)[0-9A-Fa-f][0-9A-Fa-f_]*|0b[01][01_]*)" } ] }, "float": { "type": "PATTERN", "value": "-?[0-9][0-9_]*\\.([0-9][0-9_]*)?" }, "string": { "type": "PATTERN", "value": "\"[^\"]*\"" }, "word": { "type": "PATTERN", "value": "[a-zA-Z0-9_]+" }, "_reg": { "type": "PATTERN", "value": "%?[a-z0-9]+" }, "address": { "type": "PATTERN", "value": "\\$[a-zA-Z0-9_]+" }, "reg": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_reg" }, { "type": "SYMBOL", "name": "word" }, { "type": "SYMBOL", "name": "address" } ] }, "meta_ident": { "type": "PATTERN", "value": "\\.[a-z_]+" }, "_ident": { "type": "PATTERN", "value": "[a-zA-Z_0-9.]+" }, "ident": { "type": "CHOICE", "members": [ { "type": "SYMBOL", "name": "_ident" }, { "type": "SYMBOL", "name": "meta_ident" }, { "type": "SYMBOL", "name": "reg" } ] }, "line_comment": { "type": "CHOICE", "members": [ { "type": "SEQ", "members": [ { "type": "STRING", "value": "#" }, { "type": "IMMEDIATE_TOKEN", "content": { "type": "PATTERN", "value": ".*" } } ] }, { "type": "PATTERN", "value": "(\\/\\/|;).*" } ] }, "block_comment": { "type": "TOKEN", "content": { "type": "SEQ", "members": [ { "type": "STRING", "value": "/*" }, { "type": "PATTERN", "value": "[^*]*\\*+([^/*][^*]*\\*+)*" }, { "type": "STRING", "value": "/" } ] } } }, "extras": [ { "type": "PATTERN", "value": " |\\t|\\r" }, { "type": "SYMBOL", "name": "line_comment" }, { "type": "SYMBOL", "name": "block_comment" } ], "conflicts": [ [ "_expr", "_tc_expr" ] ], "precedences": [], "externals": [], "inline": [], "supertypes": [] } tree-sitter-asm-0.24.0/src/node-types.json000066400000000000000000000162461475121206000204020ustar00rootroot00000000000000[ { "type": "const", "named": true, "fields": { "name": { "multiple": false, "required": true, "types": [ { "type": "word", "named": true } ] }, "value": { "multiple": false, "required": true, "types": [ { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "string", "named": true }, { "type": "tc_infix", "named": true } ] } } }, { "type": "ident", "named": true, "fields": {}, "children": { "multiple": false, "required": false, "types": [ { "type": "meta_ident", "named": true }, { "type": "reg", "named": true } ] } }, { "type": "instruction", "named": true, "fields": { "kind": { "multiple": false, "required": true, "types": [ { "type": "word", "named": true } ] } }, "children": { "multiple": true, "required": false, "types": [ { "type": "float", "named": true }, { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "ptr", "named": true }, { "type": "string", "named": true }, { "type": "tc_infix", "named": true } ] } }, { "type": "int", "named": true, "fields": {} }, { "type": "label", "named": true, "fields": { "name": { "multiple": false, "required": false, "types": [ { "type": "word", "named": true } ] } }, "children": { "multiple": true, "required": false, "types": [ { "type": "ident", "named": true }, { "type": "meta_ident", "named": true } ] } }, { "type": "line_comment", "named": true, "fields": {} }, { "type": "meta", "named": true, "fields": { "kind": { "multiple": false, "required": true, "types": [ { "type": "meta_ident", "named": true } ] } }, "children": { "multiple": true, "required": false, "types": [ { "type": "float", "named": true }, { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "string", "named": true } ] } }, { "type": "program", "named": true, "root": true, "fields": {}, "children": { "multiple": true, "required": false, "types": [ { "type": "const", "named": true }, { "type": "instruction", "named": true }, { "type": "label", "named": true }, { "type": "meta", "named": true } ] } }, { "type": "ptr", "named": true, "fields": {}, "children": { "multiple": true, "required": true, "types": [ { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "reg", "named": true } ] } }, { "type": "reg", "named": true, "fields": {}, "children": { "multiple": false, "required": false, "types": [ { "type": "address", "named": true }, { "type": "word", "named": true } ] } }, { "type": "tc_infix", "named": true, "fields": { "lhs": { "multiple": false, "required": true, "types": [ { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "string", "named": true }, { "type": "tc_infix", "named": true } ] }, "op": { "multiple": false, "required": true, "types": [ { "type": "%", "named": false }, { "type": "&", "named": false }, { "type": "*", "named": false }, { "type": "+", "named": false }, { "type": "-", "named": false }, { "type": "/", "named": false }, { "type": "^", "named": false }, { "type": "|", "named": false } ] }, "rhs": { "multiple": false, "required": true, "types": [ { "type": "ident", "named": true }, { "type": "int", "named": true }, { "type": "string", "named": true }, { "type": "tc_infix", "named": true } ] } } }, { "type": "\n", "named": false }, { "type": "!", "named": false }, { "type": "#", "named": false }, { "type": "%", "named": false }, { "type": "&", "named": false }, { "type": "(", "named": false }, { "type": ")", "named": false }, { "type": "*", "named": false }, { "type": "+", "named": false }, { "type": ",", "named": false }, { "type": "-", "named": false }, { "type": "/", "named": false }, { "type": ":", "named": false }, { "type": "[", "named": false }, { "type": "]", "named": false }, { "type": "^", "named": false }, { "type": "address", "named": true }, { "type": "block_comment", "named": true }, { "type": "byte", "named": false }, { "type": "const", "named": false }, { "type": "dword", "named": false }, { "type": "float", "named": true }, { "type": "label", "named": false }, { "type": "meta_ident", "named": true }, { "type": "ptr", "named": false }, { "type": "qword", "named": false }, { "type": "rel", "named": false }, { "type": "string", "named": true }, { "type": "word", "named": false }, { "type": "word", "named": true }, { "type": "|", "named": false } ]tree-sitter-asm-0.24.0/src/parser.c000066400000000000000000003622511475121206000170600ustar00rootroot00000000000000#include "tree_sitter/parser.h" #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic ignored "-Wmissing-field-initializers" #endif #define LANGUAGE_VERSION 14 #define STATE_COUNT 120 #define LARGE_STATE_COUNT 3 #define SYMBOL_COUNT 59 #define ALIAS_COUNT 0 #define TOKEN_COUNT 38 #define EXTERNAL_TOKEN_COUNT 0 #define FIELD_COUNT 6 #define MAX_ALIAS_SEQUENCE_LENGTH 7 #define PRODUCTION_ID_COUNT 6 enum ts_symbol_identifiers { anon_sym_LF = 1, anon_sym_COMMA = 2, anon_sym_COLON = 3, anon_sym_LPAREN = 4, anon_sym_RPAREN = 5, anon_sym_label = 6, anon_sym_const = 7, anon_sym_byte = 8, anon_sym_word = 9, anon_sym_dword = 10, anon_sym_qword = 11, anon_sym_ptr = 12, anon_sym_LBRACK = 13, anon_sym_PLUS = 14, anon_sym_DASH = 15, anon_sym_RBRACK = 16, anon_sym_STAR = 17, anon_sym_rel = 18, anon_sym_BANG = 19, anon_sym_SLASH = 20, anon_sym_PERCENT = 21, anon_sym_PIPE = 22, anon_sym_CARET = 23, anon_sym_AMP = 24, anon_sym_POUND = 25, aux_sym_int_token1 = 26, aux_sym_int_token2 = 27, sym_float = 28, sym_string = 29, sym_word = 30, sym__reg = 31, sym_address = 32, sym_meta_ident = 33, sym__ident = 34, aux_sym_line_comment_token1 = 35, aux_sym_line_comment_token2 = 36, sym_block_comment = 37, sym_program = 38, sym__item = 39, sym_meta = 40, sym_label = 41, sym_const = 42, sym_instruction = 43, sym__expr = 44, sym_ptr = 45, sym__tc_expr = 46, sym_tc_infix = 47, sym_int = 48, sym_reg = 49, sym_ident = 50, sym_line_comment = 51, aux_sym_program_repeat1 = 52, aux_sym_program_repeat2 = 53, aux_sym_meta_repeat1 = 54, aux_sym_meta_repeat2 = 55, aux_sym_meta_repeat3 = 56, aux_sym_instruction_repeat1 = 57, aux_sym_instruction_repeat2 = 58, }; static const char * const ts_symbol_names[] = { [ts_builtin_sym_end] = "end", [anon_sym_LF] = "\n", [anon_sym_COMMA] = ",", [anon_sym_COLON] = ":", [anon_sym_LPAREN] = "(", [anon_sym_RPAREN] = ")", [anon_sym_label] = "label", [anon_sym_const] = "const", [anon_sym_byte] = "byte", [anon_sym_word] = "word", [anon_sym_dword] = "dword", [anon_sym_qword] = "qword", [anon_sym_ptr] = "ptr", [anon_sym_LBRACK] = "[", [anon_sym_PLUS] = "+", [anon_sym_DASH] = "-", [anon_sym_RBRACK] = "]", [anon_sym_STAR] = "*", [anon_sym_rel] = "rel", [anon_sym_BANG] = "!", [anon_sym_SLASH] = "/", [anon_sym_PERCENT] = "%", [anon_sym_PIPE] = "|", [anon_sym_CARET] = "^", [anon_sym_AMP] = "&", [anon_sym_POUND] = "#", [aux_sym_int_token1] = "int_token1", [aux_sym_int_token2] = "int_token2", [sym_float] = "float", [sym_string] = "string", [sym_word] = "word", [sym__reg] = "_reg", [sym_address] = "address", [sym_meta_ident] = "meta_ident", [sym__ident] = "_ident", [aux_sym_line_comment_token1] = "line_comment_token1", [aux_sym_line_comment_token2] = "line_comment_token2", [sym_block_comment] = "block_comment", [sym_program] = "program", [sym__item] = "_item", [sym_meta] = "meta", [sym_label] = "label", [sym_const] = "const", [sym_instruction] = "instruction", [sym__expr] = "_expr", [sym_ptr] = "ptr", [sym__tc_expr] = "_tc_expr", [sym_tc_infix] = "tc_infix", [sym_int] = "int", [sym_reg] = "reg", [sym_ident] = "ident", [sym_line_comment] = "line_comment", [aux_sym_program_repeat1] = "program_repeat1", [aux_sym_program_repeat2] = "program_repeat2", [aux_sym_meta_repeat1] = "meta_repeat1", [aux_sym_meta_repeat2] = "meta_repeat2", [aux_sym_meta_repeat3] = "meta_repeat3", [aux_sym_instruction_repeat1] = "instruction_repeat1", [aux_sym_instruction_repeat2] = "instruction_repeat2", }; static const TSSymbol ts_symbol_map[] = { [ts_builtin_sym_end] = ts_builtin_sym_end, [anon_sym_LF] = anon_sym_LF, [anon_sym_COMMA] = anon_sym_COMMA, [anon_sym_COLON] = anon_sym_COLON, [anon_sym_LPAREN] = anon_sym_LPAREN, [anon_sym_RPAREN] = anon_sym_RPAREN, [anon_sym_label] = anon_sym_label, [anon_sym_const] = anon_sym_const, [anon_sym_byte] = anon_sym_byte, [anon_sym_word] = anon_sym_word, [anon_sym_dword] = anon_sym_dword, [anon_sym_qword] = anon_sym_qword, [anon_sym_ptr] = anon_sym_ptr, [anon_sym_LBRACK] = anon_sym_LBRACK, [anon_sym_PLUS] = anon_sym_PLUS, [anon_sym_DASH] = anon_sym_DASH, [anon_sym_RBRACK] = anon_sym_RBRACK, [anon_sym_STAR] = anon_sym_STAR, [anon_sym_rel] = anon_sym_rel, [anon_sym_BANG] = anon_sym_BANG, [anon_sym_SLASH] = anon_sym_SLASH, [anon_sym_PERCENT] = anon_sym_PERCENT, [anon_sym_PIPE] = anon_sym_PIPE, [anon_sym_CARET] = anon_sym_CARET, [anon_sym_AMP] = anon_sym_AMP, [anon_sym_POUND] = anon_sym_POUND, [aux_sym_int_token1] = aux_sym_int_token1, [aux_sym_int_token2] = aux_sym_int_token2, [sym_float] = sym_float, [sym_string] = sym_string, [sym_word] = sym_word, [sym__reg] = sym__reg, [sym_address] = sym_address, [sym_meta_ident] = sym_meta_ident, [sym__ident] = sym__ident, [aux_sym_line_comment_token1] = aux_sym_line_comment_token1, [aux_sym_line_comment_token2] = aux_sym_line_comment_token2, [sym_block_comment] = sym_block_comment, [sym_program] = sym_program, [sym__item] = sym__item, [sym_meta] = sym_meta, [sym_label] = sym_label, [sym_const] = sym_const, [sym_instruction] = sym_instruction, [sym__expr] = sym__expr, [sym_ptr] = sym_ptr, [sym__tc_expr] = sym__tc_expr, [sym_tc_infix] = sym_tc_infix, [sym_int] = sym_int, [sym_reg] = sym_reg, [sym_ident] = sym_ident, [sym_line_comment] = sym_line_comment, [aux_sym_program_repeat1] = aux_sym_program_repeat1, [aux_sym_program_repeat2] = aux_sym_program_repeat2, [aux_sym_meta_repeat1] = aux_sym_meta_repeat1, [aux_sym_meta_repeat2] = aux_sym_meta_repeat2, [aux_sym_meta_repeat3] = aux_sym_meta_repeat3, [aux_sym_instruction_repeat1] = aux_sym_instruction_repeat1, [aux_sym_instruction_repeat2] = aux_sym_instruction_repeat2, }; static const TSSymbolMetadata ts_symbol_metadata[] = { [ts_builtin_sym_end] = { .visible = false, .named = true, }, [anon_sym_LF] = { .visible = true, .named = false, }, [anon_sym_COMMA] = { .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, }, [anon_sym_label] = { .visible = true, .named = false, }, [anon_sym_const] = { .visible = true, .named = false, }, [anon_sym_byte] = { .visible = true, .named = false, }, [anon_sym_word] = { .visible = true, .named = false, }, [anon_sym_dword] = { .visible = true, .named = false, }, [anon_sym_qword] = { .visible = true, .named = false, }, [anon_sym_ptr] = { .visible = true, .named = false, }, [anon_sym_LBRACK] = { .visible = true, .named = false, }, [anon_sym_PLUS] = { .visible = true, .named = false, }, [anon_sym_DASH] = { .visible = true, .named = false, }, [anon_sym_RBRACK] = { .visible = true, .named = false, }, [anon_sym_STAR] = { .visible = true, .named = false, }, [anon_sym_rel] = { .visible = true, .named = false, }, [anon_sym_BANG] = { .visible = true, .named = false, }, [anon_sym_SLASH] = { .visible = true, .named = false, }, [anon_sym_PERCENT] = { .visible = true, .named = false, }, [anon_sym_PIPE] = { .visible = true, .named = false, }, [anon_sym_CARET] = { .visible = true, .named = false, }, [anon_sym_AMP] = { .visible = true, .named = false, }, [anon_sym_POUND] = { .visible = true, .named = false, }, [aux_sym_int_token1] = { .visible = false, .named = false, }, [aux_sym_int_token2] = { .visible = false, .named = false, }, [sym_float] = { .visible = true, .named = true, }, [sym_string] = { .visible = true, .named = true, }, [sym_word] = { .visible = true, .named = true, }, [sym__reg] = { .visible = false, .named = true, }, [sym_address] = { .visible = true, .named = true, }, [sym_meta_ident] = { .visible = true, .named = true, }, [sym__ident] = { .visible = false, .named = true, }, [aux_sym_line_comment_token1] = { .visible = false, .named = false, }, [aux_sym_line_comment_token2] = { .visible = false, .named = false, }, [sym_block_comment] = { .visible = true, .named = true, }, [sym_program] = { .visible = true, .named = true, }, [sym__item] = { .visible = false, .named = true, }, [sym_meta] = { .visible = true, .named = true, }, [sym_label] = { .visible = true, .named = true, }, [sym_const] = { .visible = true, .named = true, }, [sym_instruction] = { .visible = true, .named = true, }, [sym__expr] = { .visible = false, .named = true, }, [sym_ptr] = { .visible = true, .named = true, }, [sym__tc_expr] = { .visible = false, .named = true, }, [sym_tc_infix] = { .visible = true, .named = true, }, [sym_int] = { .visible = true, .named = true, }, [sym_reg] = { .visible = true, .named = true, }, [sym_ident] = { .visible = true, .named = true, }, [sym_line_comment] = { .visible = true, .named = true, }, [aux_sym_program_repeat1] = { .visible = false, .named = false, }, [aux_sym_program_repeat2] = { .visible = false, .named = false, }, [aux_sym_meta_repeat1] = { .visible = false, .named = false, }, [aux_sym_meta_repeat2] = { .visible = false, .named = false, }, [aux_sym_meta_repeat3] = { .visible = false, .named = false, }, [aux_sym_instruction_repeat1] = { .visible = false, .named = false, }, [aux_sym_instruction_repeat2] = { .visible = false, .named = false, }, }; enum ts_field_identifiers { field_kind = 1, field_lhs = 2, field_name = 3, field_op = 4, field_rhs = 5, field_value = 6, }; static const char * const ts_field_names[] = { [0] = NULL, [field_kind] = "kind", [field_lhs] = "lhs", [field_name] = "name", [field_op] = "op", [field_rhs] = "rhs", [field_value] = "value", }; static const TSFieldMapSlice ts_field_map_slices[PRODUCTION_ID_COUNT] = { [1] = {.index = 0, .length = 1}, [2] = {.index = 1, .length = 1}, [4] = {.index = 2, .length = 2}, [5] = {.index = 4, .length = 3}, }; static const TSFieldMapEntry ts_field_map_entries[] = { [0] = {field_kind, 0}, [1] = {field_name, 1}, [2] = {field_name, 1}, {field_value, 2}, [4] = {field_lhs, 0}, {field_op, 1}, {field_rhs, 2}, }; static const TSSymbol ts_alias_sequences[PRODUCTION_ID_COUNT][MAX_ALIAS_SEQUENCE_LENGTH] = { [0] = {0}, [3] = { [0] = sym_ident, }, }; static const uint16_t ts_non_terminal_alias_map[] = { 0, }; static const TSStateId ts_primary_state_ids[STATE_COUNT] = { [0] = 0, [1] = 1, [2] = 2, [3] = 3, [4] = 4, [5] = 5, [6] = 6, [7] = 7, [8] = 8, [9] = 9, [10] = 10, [11] = 11, [12] = 12, [13] = 13, [14] = 14, [15] = 15, [16] = 16, [17] = 17, [18] = 18, [19] = 19, [20] = 20, [21] = 21, [22] = 22, [23] = 23, [24] = 7, [25] = 11, [26] = 10, [27] = 8, [28] = 28, [29] = 29, [30] = 30, [31] = 31, [32] = 28, [33] = 33, [34] = 34, [35] = 34, [36] = 36, [37] = 33, [38] = 30, [39] = 29, [40] = 16, [41] = 41, [42] = 15, [43] = 13, [44] = 14, [45] = 17, [46] = 18, [47] = 47, [48] = 48, [49] = 49, [50] = 50, [51] = 51, [52] = 52, [53] = 53, [54] = 54, [55] = 55, [56] = 56, [57] = 57, [58] = 58, [59] = 59, [60] = 60, [61] = 61, [62] = 62, [63] = 63, [64] = 64, [65] = 65, [66] = 66, [67] = 67, [68] = 68, [69] = 69, [70] = 70, [71] = 71, [72] = 72, [73] = 73, [74] = 74, [75] = 75, [76] = 76, [77] = 77, [78] = 78, [79] = 79, [80] = 80, [81] = 81, [82] = 82, [83] = 83, [84] = 84, [85] = 85, [86] = 86, [87] = 87, [88] = 88, [89] = 89, [90] = 90, [91] = 91, [92] = 92, [93] = 93, [94] = 94, [95] = 95, [96] = 96, [97] = 97, [98] = 98, [99] = 99, [100] = 100, [101] = 101, [102] = 102, [103] = 103, [104] = 104, [105] = 105, [106] = 106, [107] = 107, [108] = 108, [109] = 109, [110] = 110, [111] = 111, [112] = 112, [113] = 113, [114] = 114, [115] = 115, [116] = 116, [117] = 108, [118] = 118, [119] = 119, }; static bool ts_lex(TSLexer *lexer, TSStateId state) { START_LEXER(); eof = lexer->eof(lexer); switch (state) { case 0: if (eof) ADVANCE(28); ADVANCE_MAP( '\n', 29, '!', 54, '"', 1, '#', 61, '$', 19, '%', 56, '&', 60, '(', 32, ')', 33, '*', 51, '+', 47, ',', 30, '-', 49, '.', 141, '/', 55, '0', 70, ':', 31, ';', 148, '[', 46, ']', 50, '^', 59, 'b', 129, 'c', 105, 'd', 124, 'l', 90, 'p', 120, 'q', 125, 'r', 98, 'w', 107, '|', 58, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(0); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(73); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 1: if (lookahead == '"') ADVANCE(89); if (lookahead != 0) ADVANCE(1); END_STATE(); case 2: ADVANCE_MAP( '#', 61, '$', 20, '-', 7, '/', 10, '0', 80, ';', 148, 'p', 16, 'r', 13, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(2); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(82); END_STATE(); case 3: if (lookahead == '#') ADVANCE(61); if (lookahead == '$') ADVANCE(23); if (lookahead == '%') ADVANCE(22); if (lookahead == '.') ADVANCE(141); if (lookahead == '/') ADVANCE(10); if (lookahead == ';') ADVANCE(148); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(3); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 4: if (lookahead == '#') ADVANCE(61); if (lookahead == '$') ADVANCE(23); if (lookahead == '%') ADVANCE(22); if (lookahead == '/') ADVANCE(10); if (lookahead == ';') ADVANCE(148); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(4); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(137); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(136); END_STATE(); case 5: if (lookahead == '#') ADVANCE(61); if (lookahead == '$') ADVANCE(21); if (lookahead == '-') ADVANCE(9); if (lookahead == '/') ADVANCE(10); if (lookahead == '0') ADVANCE(63); if (lookahead == ';') ADVANCE(148); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(6); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(65); END_STATE(); case 6: if (lookahead == '#') ADVANCE(61); if (lookahead == '/') ADVANCE(10); if (lookahead == ';') ADVANCE(148); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(6); END_STATE(); case 7: if (lookahead == '$') ADVANCE(20); if (lookahead == '0') ADVANCE(80); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(82); END_STATE(); case 8: if (lookahead == '$') ADVANCE(20); if (lookahead == '0') ADVANCE(78); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(79); END_STATE(); case 9: if (lookahead == '$') ADVANCE(21); if (lookahead == '0') ADVANCE(63); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(65); END_STATE(); case 10: if (lookahead == '*') ADVANCE(12); if (lookahead == '/') ADVANCE(148); END_STATE(); case 11: if (lookahead == '*') ADVANCE(11); if (lookahead == '/') ADVANCE(149); if (lookahead != 0) ADVANCE(12); END_STATE(); case 12: if (lookahead == '*') ADVANCE(11); if (lookahead != 0) ADVANCE(12); END_STATE(); case 13: if (lookahead == 'e') ADVANCE(14); END_STATE(); case 14: if (lookahead == 'l') ADVANCE(52); END_STATE(); case 15: if (lookahead == 'r') ADVANCE(44); END_STATE(); case 16: if (lookahead == 't') ADVANCE(15); END_STATE(); case 17: if (lookahead == '0' || lookahead == '1') ADVANCE(81); END_STATE(); case 18: if (lookahead == '0' || lookahead == '1') ADVANCE(64); END_STATE(); case 19: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(83); if (('G' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('g' <= lookahead && lookahead <= 'z')) ADVANCE(139); END_STATE(); case 20: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(84); END_STATE(); case 21: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(66); END_STATE(); case 22: if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(138); END_STATE(); case 23: if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(139); END_STATE(); case 24: if (eof) ADVANCE(28); ADVANCE_MAP( '\n', 29, '"', 1, '#', 61, '$', 19, '%', 22, '(', 32, '*', 51, '-', 8, '.', 141, '/', 10, '0', 75, ':', 31, ';', 148, '[', 46, 'b', 128, 'd', 126, 'q', 127, 'w', 106, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(24); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(76); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); END_STATE(); case 25: if (eof) ADVANCE(28); ADVANCE_MAP( '\n', 29, '"', 1, '#', 61, '$', 19, '%', 22, '-', 8, '.', 141, '/', 10, '0', 75, ':', 31, ';', 148, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(25); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(76); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); END_STATE(); case 26: if (eof) ADVANCE(28); ADVANCE_MAP( '\n', 29, '"', 1, '#', 61, '$', 19, '%', 57, '&', 60, '(', 32, '*', 51, '+', 47, ',', 30, '-', 49, '.', 141, '/', 55, '0', 67, ';', 148, '^', 59, '|', 58, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(26); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(68); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); END_STATE(); case 27: if (eof) ADVANCE(28); ADVANCE_MAP( '\n', 29, '#', 61, '%', 56, '&', 60, '(', 32, ')', 33, '*', 51, '+', 47, ',', 30, '-', 48, '.', 141, '/', 55, ';', 148, ']', 50, '^', 59, 'c', 105, 'l', 90, '|', 58, ); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') SKIP(27); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 28: ACCEPT_TOKEN(ts_builtin_sym_end); END_STATE(); case 29: ACCEPT_TOKEN(anon_sym_LF); END_STATE(); case 30: ACCEPT_TOKEN(anon_sym_COMMA); END_STATE(); case 31: ACCEPT_TOKEN(anon_sym_COLON); END_STATE(); case 32: ACCEPT_TOKEN(anon_sym_LPAREN); END_STATE(); case 33: ACCEPT_TOKEN(anon_sym_RPAREN); END_STATE(); case 34: ACCEPT_TOKEN(anon_sym_label); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 35: ACCEPT_TOKEN(anon_sym_const); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 36: ACCEPT_TOKEN(anon_sym_byte); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 37: ACCEPT_TOKEN(anon_sym_byte); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 38: ACCEPT_TOKEN(anon_sym_word); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 39: ACCEPT_TOKEN(anon_sym_word); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 40: ACCEPT_TOKEN(anon_sym_dword); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 41: ACCEPT_TOKEN(anon_sym_dword); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 42: ACCEPT_TOKEN(anon_sym_qword); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 43: ACCEPT_TOKEN(anon_sym_qword); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 44: ACCEPT_TOKEN(anon_sym_ptr); END_STATE(); case 45: ACCEPT_TOKEN(anon_sym_ptr); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 46: ACCEPT_TOKEN(anon_sym_LBRACK); END_STATE(); case 47: ACCEPT_TOKEN(anon_sym_PLUS); END_STATE(); case 48: ACCEPT_TOKEN(anon_sym_DASH); END_STATE(); case 49: ACCEPT_TOKEN(anon_sym_DASH); if (lookahead == '$') ADVANCE(20); if (lookahead == '0') ADVANCE(80); if (('1' <= lookahead && lookahead <= '9')) ADVANCE(82); END_STATE(); case 50: ACCEPT_TOKEN(anon_sym_RBRACK); END_STATE(); case 51: ACCEPT_TOKEN(anon_sym_STAR); END_STATE(); case 52: ACCEPT_TOKEN(anon_sym_rel); END_STATE(); case 53: ACCEPT_TOKEN(anon_sym_rel); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 54: ACCEPT_TOKEN(anon_sym_BANG); END_STATE(); case 55: ACCEPT_TOKEN(anon_sym_SLASH); if (lookahead == '*') ADVANCE(12); if (lookahead == '/') ADVANCE(148); END_STATE(); case 56: ACCEPT_TOKEN(anon_sym_PERCENT); END_STATE(); case 57: ACCEPT_TOKEN(anon_sym_PERCENT); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(138); END_STATE(); case 58: ACCEPT_TOKEN(anon_sym_PIPE); END_STATE(); case 59: ACCEPT_TOKEN(anon_sym_CARET); END_STATE(); case 60: ACCEPT_TOKEN(anon_sym_AMP); END_STATE(); case 61: ACCEPT_TOKEN(anon_sym_POUND); END_STATE(); case 62: ACCEPT_TOKEN(anon_sym_POUND); if (lookahead != 0 && lookahead != '\n') ADVANCE(147); END_STATE(); case 63: ACCEPT_TOKEN(aux_sym_int_token1); if (lookahead == 'b') ADVANCE(18); if (lookahead == 'x') ADVANCE(21); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(65); END_STATE(); case 64: ACCEPT_TOKEN(aux_sym_int_token1); if (lookahead == '0' || lookahead == '1' || lookahead == '_') ADVANCE(64); END_STATE(); case 65: ACCEPT_TOKEN(aux_sym_int_token1); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(65); END_STATE(); case 66: ACCEPT_TOKEN(aux_sym_int_token1); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(66); END_STATE(); case 67: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (lookahead == '_') ADVANCE(73); if (lookahead == 'b') ADVANCE(131); if (lookahead == 'x') ADVANCE(132); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(68); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(135); END_STATE(); case 68: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (lookahead == '_') ADVANCE(73); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(68); if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(135); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 69: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (lookahead == '_') ADVANCE(71); if (lookahead == '0' || lookahead == '1') ADVANCE(69); if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(135); if (('2' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 70: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (lookahead == 'b') ADVANCE(130); if (lookahead == 'x') ADVANCE(133); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(73); if (('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 71: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (lookahead == '0' || lookahead == '1' || lookahead == '_') ADVANCE(71); if (('2' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 72: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'F') || lookahead == '_') ADVANCE(74); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(72); if (('G' <= lookahead && lookahead <= 'Z')) ADVANCE(135); if (('g' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 73: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(73); if (('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 74: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(74); if (('G' <= lookahead && lookahead <= 'Z') || ('g' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 75: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(85); if (lookahead == '_') ADVANCE(77); if (lookahead == 'b') ADVANCE(131); if (lookahead == 'x') ADVANCE(132); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(76); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(135); END_STATE(); case 76: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(85); if (lookahead == '_') ADVANCE(77); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(76); if (('A' <= lookahead && lookahead <= 'Z')) ADVANCE(135); if (('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 77: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(85); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(77); if (('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 78: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(86); if (lookahead == 'b') ADVANCE(17); if (lookahead == 'x') ADVANCE(20); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(79); END_STATE(); case 79: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '.') ADVANCE(86); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(79); END_STATE(); case 80: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == 'b') ADVANCE(17); if (lookahead == 'x') ADVANCE(20); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(82); END_STATE(); case 81: ACCEPT_TOKEN(aux_sym_int_token2); if (lookahead == '0' || lookahead == '1' || lookahead == '_') ADVANCE(81); END_STATE(); case 82: ACCEPT_TOKEN(aux_sym_int_token2); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(82); END_STATE(); case 83: ACCEPT_TOKEN(aux_sym_int_token2); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(83); if (('G' <= lookahead && lookahead <= 'Z') || ('g' <= lookahead && lookahead <= 'z')) ADVANCE(139); END_STATE(); case 84: ACCEPT_TOKEN(aux_sym_int_token2); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(84); END_STATE(); case 85: ACCEPT_TOKEN(sym_float); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(87); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(142); END_STATE(); case 86: ACCEPT_TOKEN(sym_float); if (('0' <= lookahead && lookahead <= '9')) ADVANCE(88); END_STATE(); case 87: ACCEPT_TOKEN(sym_float); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(87); if (lookahead == '.' || ('A' <= lookahead && lookahead <= 'Z') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(142); END_STATE(); case 88: ACCEPT_TOKEN(sym_float); if (('0' <= lookahead && lookahead <= '9') || lookahead == '_') ADVANCE(88); END_STATE(); case 89: ACCEPT_TOKEN(sym_string); END_STATE(); case 90: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'a') ADVANCE(91); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('b' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 91: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'b') ADVANCE(101); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 92: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(39); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 93: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(41); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 94: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(43); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 95: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(38); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 96: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(40); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 97: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'd') ADVANCE(42); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 98: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'e') ADVANCE(102); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 99: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'e') ADVANCE(37); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 100: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'e') ADVANCE(36); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 101: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'e') ADVANCE(103); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 102: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'l') ADVANCE(53); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 103: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'l') ADVANCE(34); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 104: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'n') ADVANCE(119); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 105: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(104); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 106: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(114); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 107: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(113); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 108: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(115); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 109: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(117); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 110: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(116); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 111: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'o') ADVANCE(118); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 112: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(45); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 113: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(92); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 114: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(95); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 115: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(93); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 116: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(96); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 117: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(94); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 118: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'r') ADVANCE(97); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 119: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 's') ADVANCE(121); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 120: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 't') ADVANCE(112); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 121: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 't') ADVANCE(35); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 122: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 't') ADVANCE(100); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 123: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 't') ADVANCE(99); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 124: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'w') ADVANCE(108); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 125: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'w') ADVANCE(109); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 126: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'w') ADVANCE(110); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 127: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'w') ADVANCE(111); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 128: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'y') ADVANCE(122); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 129: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == 'y') ADVANCE(123); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 130: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == '0' || lookahead == '1') ADVANCE(71); if (('2' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 131: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (lookahead == '0' || lookahead == '1') ADVANCE(69); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('2' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 132: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'F')) ADVANCE(74); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(72); if (('g' <= lookahead && lookahead <= 'z')) ADVANCE(134); if (('G' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); END_STATE(); case 133: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'F') || ('a' <= lookahead && lookahead <= 'f')) ADVANCE(74); if (('G' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('g' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 134: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(135); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(134); END_STATE(); case 135: ACCEPT_TOKEN(sym_word); if (lookahead == '.') ADVANCE(142); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(135); END_STATE(); case 136: ACCEPT_TOKEN(sym_word); if (('A' <= lookahead && lookahead <= 'Z') || lookahead == '_') ADVANCE(137); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(136); END_STATE(); case 137: ACCEPT_TOKEN(sym_word); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(137); END_STATE(); case 138: ACCEPT_TOKEN(sym__reg); if (('0' <= lookahead && lookahead <= '9') || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(138); END_STATE(); case 139: ACCEPT_TOKEN(sym_address); if (('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(139); END_STATE(); case 140: ACCEPT_TOKEN(sym_meta_ident); if (lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(140); if (lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(142); END_STATE(); case 141: ACCEPT_TOKEN(sym__ident); if (lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(140); if (lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z')) ADVANCE(142); END_STATE(); case 142: ACCEPT_TOKEN(sym__ident); if (lookahead == '.' || ('0' <= lookahead && lookahead <= '9') || ('A' <= lookahead && lookahead <= 'Z') || lookahead == '_' || ('a' <= lookahead && lookahead <= 'z')) ADVANCE(142); END_STATE(); case 143: ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead == '\n') ADVANCE(12); if (lookahead == '*') ADVANCE(143); if (lookahead == '/') ADVANCE(147); if (lookahead != 0) ADVANCE(144); END_STATE(); case 144: ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead == '\n') ADVANCE(12); if (lookahead == '*') ADVANCE(143); if (lookahead != 0) ADVANCE(144); END_STATE(); case 145: ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead == '#') ADVANCE(62); if (lookahead == '/') ADVANCE(146); if (lookahead == ';') ADVANCE(147); if (lookahead == '\t' || lookahead == '\r' || lookahead == ' ') ADVANCE(145); if (lookahead != 0 && lookahead != '\t' && lookahead != '\n') ADVANCE(147); END_STATE(); case 146: ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead == '*') ADVANCE(144); if (lookahead == '/') ADVANCE(147); if (lookahead != 0 && lookahead != '\n') ADVANCE(147); END_STATE(); case 147: ACCEPT_TOKEN(aux_sym_line_comment_token1); if (lookahead != 0 && lookahead != '\n') ADVANCE(147); END_STATE(); case 148: ACCEPT_TOKEN(aux_sym_line_comment_token2); if (lookahead != 0 && lookahead != '\n') ADVANCE(148); END_STATE(); case 149: ACCEPT_TOKEN(sym_block_comment); END_STATE(); default: return false; } } static const TSLexMode ts_lex_modes[STATE_COUNT] = { [0] = {.lex_state = 0}, [1] = {.lex_state = 27}, [2] = {.lex_state = 24}, [3] = {.lex_state = 24}, [4] = {.lex_state = 24}, [5] = {.lex_state = 24}, [6] = {.lex_state = 26}, [7] = {.lex_state = 26}, [8] = {.lex_state = 26}, [9] = {.lex_state = 26}, [10] = {.lex_state = 26}, [11] = {.lex_state = 26}, [12] = {.lex_state = 26}, [13] = {.lex_state = 26}, [14] = {.lex_state = 26}, [15] = {.lex_state = 26}, [16] = {.lex_state = 26}, [17] = {.lex_state = 26}, [18] = {.lex_state = 26}, [19] = {.lex_state = 26}, [20] = {.lex_state = 26}, [21] = {.lex_state = 25}, [22] = {.lex_state = 27}, [23] = {.lex_state = 27}, [24] = {.lex_state = 27}, [25] = {.lex_state = 27}, [26] = {.lex_state = 27}, [27] = {.lex_state = 27}, [28] = {.lex_state = 26}, [29] = {.lex_state = 26}, [30] = {.lex_state = 26}, [31] = {.lex_state = 26}, [32] = {.lex_state = 26}, [33] = {.lex_state = 26}, [34] = {.lex_state = 26}, [35] = {.lex_state = 26}, [36] = {.lex_state = 27}, [37] = {.lex_state = 26}, [38] = {.lex_state = 26}, [39] = {.lex_state = 26}, [40] = {.lex_state = 27}, [41] = {.lex_state = 27}, [42] = {.lex_state = 27}, [43] = {.lex_state = 27}, [44] = {.lex_state = 27}, [45] = {.lex_state = 27}, [46] = {.lex_state = 27}, [47] = {.lex_state = 26}, [48] = {.lex_state = 26}, [49] = {.lex_state = 27}, [50] = {.lex_state = 27}, [51] = {.lex_state = 3}, [52] = {.lex_state = 3}, [53] = {.lex_state = 0}, [54] = {.lex_state = 0}, [55] = {.lex_state = 0}, [56] = {.lex_state = 0}, [57] = {.lex_state = 0}, [58] = {.lex_state = 4}, [59] = {.lex_state = 0}, [60] = {.lex_state = 4}, [61] = {.lex_state = 0}, [62] = {.lex_state = 0}, [63] = {.lex_state = 0}, [64] = {.lex_state = 4}, [65] = {.lex_state = 0}, [66] = {.lex_state = 0}, [67] = {.lex_state = 0}, [68] = {.lex_state = 27}, [69] = {.lex_state = 0}, [70] = {.lex_state = 0}, [71] = {.lex_state = 0}, [72] = {.lex_state = 0}, [73] = {.lex_state = 0}, [74] = {.lex_state = 0}, [75] = {.lex_state = 4}, [76] = {.lex_state = 0}, [77] = {.lex_state = 0}, [78] = {.lex_state = 0}, [79] = {.lex_state = 0}, [80] = {.lex_state = 0}, [81] = {.lex_state = 0}, [82] = {.lex_state = 27}, [83] = {.lex_state = 0}, [84] = {.lex_state = 0}, [85] = {.lex_state = 0}, [86] = {.lex_state = 0}, [87] = {.lex_state = 0}, [88] = {.lex_state = 0}, [89] = {.lex_state = 2}, [90] = {.lex_state = 0}, [91] = {.lex_state = 0}, [92] = {.lex_state = 0}, [93] = {.lex_state = 2}, [94] = {.lex_state = 0}, [95] = {.lex_state = 0}, [96] = {.lex_state = 0}, [97] = {.lex_state = 2}, [98] = {.lex_state = 0}, [99] = {.lex_state = 0}, [100] = {.lex_state = 4}, [101] = {.lex_state = 4}, [102] = {.lex_state = 0}, [103] = {.lex_state = 0}, [104] = {.lex_state = 0}, [105] = {.lex_state = 0}, [106] = {.lex_state = 0}, [107] = {.lex_state = 2}, [108] = {.lex_state = 5}, [109] = {.lex_state = 145}, [110] = {.lex_state = 24}, [111] = {.lex_state = 0}, [112] = {.lex_state = 0}, [113] = {.lex_state = 0}, [114] = {.lex_state = 0}, [115] = {.lex_state = 0}, [116] = {.lex_state = 2}, [117] = {.lex_state = 5}, [118] = {(TSStateId)(-1)}, [119] = {(TSStateId)(-1)}, }; static const uint16_t ts_parse_table[LARGE_STATE_COUNT][SYMBOL_COUNT] = { [0] = { [sym_line_comment] = STATE(0), [ts_builtin_sym_end] = ACTIONS(1), [anon_sym_LF] = ACTIONS(1), [anon_sym_COMMA] = ACTIONS(1), [anon_sym_COLON] = ACTIONS(1), [anon_sym_LPAREN] = ACTIONS(1), [anon_sym_RPAREN] = ACTIONS(1), [anon_sym_label] = ACTIONS(1), [anon_sym_const] = ACTIONS(1), [anon_sym_byte] = ACTIONS(1), [anon_sym_word] = ACTIONS(1), [anon_sym_dword] = ACTIONS(1), [anon_sym_qword] = ACTIONS(1), [anon_sym_ptr] = ACTIONS(1), [anon_sym_LBRACK] = ACTIONS(1), [anon_sym_PLUS] = ACTIONS(1), [anon_sym_DASH] = ACTIONS(1), [anon_sym_RBRACK] = ACTIONS(1), [anon_sym_STAR] = ACTIONS(1), [anon_sym_rel] = ACTIONS(1), [anon_sym_BANG] = ACTIONS(1), [anon_sym_SLASH] = ACTIONS(1), [anon_sym_PERCENT] = ACTIONS(1), [anon_sym_PIPE] = ACTIONS(1), [anon_sym_CARET] = ACTIONS(1), [anon_sym_AMP] = ACTIONS(1), [anon_sym_POUND] = ACTIONS(3), [aux_sym_int_token2] = ACTIONS(1), [sym_string] = ACTIONS(1), [sym_word] = ACTIONS(1), [sym_address] = ACTIONS(1), [sym_meta_ident] = ACTIONS(1), [sym__ident] = ACTIONS(1), [aux_sym_line_comment_token2] = ACTIONS(5), [sym_block_comment] = ACTIONS(7), }, [1] = { [sym_program] = STATE(113), [sym__item] = STATE(54), [sym_meta] = STATE(90), [sym_label] = STATE(90), [sym_const] = STATE(90), [sym_instruction] = STATE(90), [sym_line_comment] = STATE(1), [ts_builtin_sym_end] = ACTIONS(9), [anon_sym_label] = ACTIONS(11), [anon_sym_const] = ACTIONS(13), [anon_sym_POUND] = ACTIONS(3), [sym_word] = ACTIONS(15), [sym_meta_ident] = ACTIONS(17), [sym__ident] = ACTIONS(19), [aux_sym_line_comment_token2] = ACTIONS(5), [sym_block_comment] = ACTIONS(7), }, [2] = { [sym__expr] = STATE(70), [sym_ptr] = STATE(78), [sym__tc_expr] = STATE(12), [sym_tc_infix] = STATE(13), [sym_int] = STATE(6), [sym_reg] = STATE(10), [sym_ident] = STATE(9), [sym_line_comment] = STATE(2), [aux_sym_instruction_repeat2] = STATE(19), [ts_builtin_sym_end] = ACTIONS(21), [anon_sym_LF] = ACTIONS(21), [anon_sym_COLON] = ACTIONS(23), [anon_sym_LPAREN] = ACTIONS(25), [anon_sym_byte] = ACTIONS(27), [anon_sym_word] = ACTIONS(27), [anon_sym_dword] = ACTIONS(27), [anon_sym_qword] = ACTIONS(27), [anon_sym_LBRACK] = ACTIONS(29), [anon_sym_STAR] = ACTIONS(31), [anon_sym_POUND] = ACTIONS(33), [aux_sym_int_token2] = ACTIONS(35), [sym_float] = ACTIONS(37), [sym_string] = ACTIONS(39), [sym_word] = ACTIONS(41), [sym__reg] = ACTIONS(41), [sym_address] = ACTIONS(41), [sym_meta_ident] = ACTIONS(43), [sym__ident] = ACTIONS(43), [aux_sym_line_comment_token2] = ACTIONS(5), [sym_block_comment] = ACTIONS(7), }, }; static const uint16_t ts_small_parse_table[] = { [0] = 18, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(25), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_STAR, ACTIONS(37), 1, sym_float, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(51), 1, sym_string, STATE(3), 1, sym_line_comment, STATE(26), 1, sym_reg, STATE(62), 1, sym_int, STATE(87), 1, sym__expr, ACTIONS(45), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(55), 2, sym_meta_ident, sym__ident, STATE(78), 2, sym_ptr, sym_ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, ACTIONS(27), 4, anon_sym_byte, anon_sym_word, anon_sym_dword, anon_sym_qword, [63] = 18, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(25), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_STAR, ACTIONS(37), 1, sym_float, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(51), 1, sym_string, STATE(4), 1, sym_line_comment, STATE(26), 1, sym_reg, STATE(62), 1, sym_int, STATE(87), 1, sym__expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(57), 2, ts_builtin_sym_end, anon_sym_LF, STATE(78), 2, sym_ptr, sym_ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, ACTIONS(27), 4, anon_sym_byte, anon_sym_word, anon_sym_dword, anon_sym_qword, [126] = 17, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(25), 1, anon_sym_LPAREN, ACTIONS(29), 1, anon_sym_LBRACK, ACTIONS(31), 1, anon_sym_STAR, ACTIONS(37), 1, sym_float, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(51), 1, sym_string, STATE(5), 1, sym_line_comment, STATE(26), 1, sym_reg, STATE(62), 1, sym_int, STATE(87), 1, sym__expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, STATE(78), 2, sym_ptr, sym_ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, ACTIONS(27), 4, anon_sym_byte, anon_sym_word, anon_sym_dword, anon_sym_qword, [185] = 8, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(62), 1, anon_sym_COMMA, ACTIONS(64), 1, anon_sym_LPAREN, STATE(6), 1, sym_line_comment, ACTIONS(59), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(66), 7, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, ACTIONS(68), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [225] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(7), 1, sym_line_comment, ACTIONS(72), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, ACTIONS(70), 11, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_LPAREN, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, [259] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(8), 1, sym_line_comment, ACTIONS(76), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, ACTIONS(74), 11, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_LPAREN, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, [293] = 7, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(62), 1, anon_sym_COMMA, STATE(9), 1, sym_line_comment, ACTIONS(59), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(66), 7, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, ACTIONS(68), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [330] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(10), 1, sym_line_comment, ACTIONS(80), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, ACTIONS(78), 10, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, [363] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(11), 1, sym_line_comment, ACTIONS(84), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, ACTIONS(82), 10, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, [396] = 12, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(88), 1, anon_sym_PLUS, ACTIONS(90), 1, anon_sym_DASH, ACTIONS(92), 1, anon_sym_STAR, ACTIONS(96), 1, anon_sym_PIPE, ACTIONS(98), 1, anon_sym_CARET, ACTIONS(100), 1, anon_sym_AMP, STATE(12), 1, sym_line_comment, ACTIONS(94), 2, anon_sym_SLASH, anon_sym_PERCENT, ACTIONS(86), 4, ts_builtin_sym_end, anon_sym_LF, anon_sym_POUND, sym_string, ACTIONS(102), 6, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [442] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(13), 1, sym_line_comment, ACTIONS(66), 9, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, ACTIONS(68), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [474] = 8, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(96), 1, anon_sym_PIPE, ACTIONS(98), 1, anon_sym_CARET, ACTIONS(100), 1, anon_sym_AMP, STATE(14), 1, sym_line_comment, ACTIONS(104), 6, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_STAR, anon_sym_POUND, sym_string, ACTIONS(106), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [512] = 10, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(92), 1, anon_sym_STAR, ACTIONS(96), 1, anon_sym_PIPE, ACTIONS(98), 1, anon_sym_CARET, ACTIONS(100), 1, anon_sym_AMP, STATE(15), 1, sym_line_comment, ACTIONS(94), 2, anon_sym_SLASH, anon_sym_PERCENT, ACTIONS(104), 5, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_POUND, sym_string, ACTIONS(106), 7, anon_sym_DASH, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [554] = 5, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(16), 1, sym_line_comment, ACTIONS(104), 9, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, anon_sym_POUND, sym_string, ACTIONS(106), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [586] = 7, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(98), 1, anon_sym_CARET, ACTIONS(100), 1, anon_sym_AMP, STATE(17), 1, sym_line_comment, ACTIONS(104), 7, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_POUND, sym_string, ACTIONS(106), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [622] = 6, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(100), 1, anon_sym_AMP, STATE(18), 1, sym_line_comment, ACTIONS(104), 8, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_STAR, anon_sym_PIPE, anon_sym_CARET, anon_sym_POUND, sym_string, ACTIONS(106), 9, anon_sym_DASH, anon_sym_SLASH, anon_sym_PERCENT, aux_sym_int_token2, sym_word, sym__reg, sym_address, sym_meta_ident, sym__ident, [656] = 13, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(12), 1, sym__tc_expr, STATE(19), 1, sym_line_comment, STATE(20), 1, aux_sym_instruction_repeat2, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(108), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [702] = 12, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(114), 1, anon_sym_POUND, ACTIONS(117), 1, aux_sym_int_token2, ACTIONS(120), 1, sym_string, STATE(10), 1, sym_reg, STATE(12), 1, sym__tc_expr, ACTIONS(112), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(126), 2, sym_meta_ident, sym__ident, STATE(20), 2, sym_line_comment, aux_sym_instruction_repeat2, ACTIONS(123), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [746] = 14, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(131), 1, anon_sym_COLON, ACTIONS(133), 1, sym_float, ACTIONS(135), 1, sym_string, STATE(21), 1, sym_line_comment, STATE(26), 1, sym_reg, STATE(71), 1, sym_int, STATE(96), 1, sym_ident, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(129), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(53), 3, sym_word, sym__reg, sym_address, [793] = 14, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(11), 1, anon_sym_label, ACTIONS(13), 1, anon_sym_const, ACTIONS(15), 1, sym_word, ACTIONS(17), 1, sym_meta_ident, ACTIONS(19), 1, sym__ident, ACTIONS(137), 1, ts_builtin_sym_end, ACTIONS(139), 1, anon_sym_LF, STATE(22), 1, sym_line_comment, STATE(49), 1, aux_sym_program_repeat1, STATE(94), 1, sym__item, STATE(90), 4, sym_meta, sym_label, sym_const, sym_instruction, [839] = 14, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(11), 1, anon_sym_label, ACTIONS(13), 1, anon_sym_const, ACTIONS(15), 1, sym_word, ACTIONS(17), 1, sym_meta_ident, ACTIONS(19), 1, sym__ident, ACTIONS(139), 1, anon_sym_LF, ACTIONS(141), 1, ts_builtin_sym_end, STATE(23), 1, sym_line_comment, STATE(49), 1, aux_sym_program_repeat1, STATE(94), 1, sym__item, STATE(90), 4, sym_meta, sym_label, sym_const, sym_instruction, [885] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(72), 1, anon_sym_SLASH, STATE(24), 1, sym_line_comment, ACTIONS(70), 12, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_LPAREN, anon_sym_PLUS, anon_sym_DASH, anon_sym_RBRACK, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [915] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(84), 1, anon_sym_SLASH, STATE(25), 1, sym_line_comment, ACTIONS(82), 12, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_RPAREN, anon_sym_PLUS, anon_sym_DASH, anon_sym_RBRACK, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [945] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(80), 1, anon_sym_SLASH, STATE(26), 1, sym_line_comment, ACTIONS(78), 12, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_RPAREN, anon_sym_PLUS, anon_sym_DASH, anon_sym_RBRACK, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [975] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(76), 1, anon_sym_SLASH, STATE(27), 1, sym_line_comment, ACTIONS(74), 12, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, anon_sym_LPAREN, anon_sym_PLUS, anon_sym_DASH, anon_sym_RBRACK, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [1005] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(28), 1, sym_line_comment, STATE(46), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1044] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(15), 1, sym__tc_expr, STATE(29), 1, sym_line_comment, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [1083] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(17), 1, sym__tc_expr, STATE(30), 1, sym_line_comment, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [1122] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(31), 1, sym_line_comment, STATE(41), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1161] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(18), 1, sym__tc_expr, STATE(32), 1, sym_line_comment, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [1200] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(14), 1, sym__tc_expr, STATE(33), 1, sym_line_comment, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [1239] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(33), 1, anon_sym_POUND, ACTIONS(35), 1, aux_sym_int_token2, ACTIONS(110), 1, sym_string, STATE(10), 1, sym_reg, STATE(16), 1, sym__tc_expr, STATE(34), 1, sym_line_comment, ACTIONS(43), 2, sym_meta_ident, sym__ident, ACTIONS(41), 3, sym_word, sym__reg, sym_address, STATE(13), 3, sym_tc_infix, sym_int, sym_ident, [1278] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(35), 1, sym_line_comment, STATE(40), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1317] = 13, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(11), 1, anon_sym_label, ACTIONS(13), 1, anon_sym_const, ACTIONS(15), 1, sym_word, ACTIONS(17), 1, sym_meta_ident, ACTIONS(19), 1, sym__ident, ACTIONS(139), 1, anon_sym_LF, STATE(36), 1, sym_line_comment, STATE(49), 1, aux_sym_program_repeat1, STATE(94), 1, sym__item, STATE(90), 4, sym_meta, sym_label, sym_const, sym_instruction, [1360] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(37), 1, sym_line_comment, STATE(44), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1399] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(38), 1, sym_line_comment, STATE(45), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1438] = 11, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, ACTIONS(143), 1, sym_string, STATE(26), 1, sym_reg, STATE(39), 1, sym_line_comment, STATE(42), 1, sym__tc_expr, ACTIONS(55), 2, sym_meta_ident, sym__ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, STATE(43), 3, sym_tc_infix, sym_int, sym_ident, [1477] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(106), 1, anon_sym_SLASH, STATE(40), 1, sym_line_comment, ACTIONS(104), 9, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [1504] = 11, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(151), 1, anon_sym_SLASH, ACTIONS(153), 1, anon_sym_PIPE, ACTIONS(155), 1, anon_sym_CARET, ACTIONS(157), 1, anon_sym_AMP, STATE(41), 1, sym_line_comment, ACTIONS(145), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(147), 2, anon_sym_PLUS, anon_sym_DASH, ACTIONS(149), 2, anon_sym_STAR, anon_sym_PERCENT, [1541] = 10, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(151), 1, anon_sym_SLASH, ACTIONS(153), 1, anon_sym_PIPE, ACTIONS(155), 1, anon_sym_CARET, ACTIONS(157), 1, anon_sym_AMP, STATE(42), 1, sym_line_comment, ACTIONS(149), 2, anon_sym_STAR, anon_sym_PERCENT, ACTIONS(104), 4, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, [1576] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(68), 1, anon_sym_SLASH, STATE(43), 1, sym_line_comment, ACTIONS(66), 9, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, anon_sym_AMP, [1603] = 9, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(106), 1, anon_sym_SLASH, ACTIONS(153), 1, anon_sym_PIPE, ACTIONS(155), 1, anon_sym_CARET, ACTIONS(157), 1, anon_sym_AMP, STATE(44), 1, sym_line_comment, ACTIONS(104), 6, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_PERCENT, [1636] = 8, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(106), 1, anon_sym_SLASH, ACTIONS(155), 1, anon_sym_CARET, ACTIONS(157), 1, anon_sym_AMP, STATE(45), 1, sym_line_comment, ACTIONS(104), 7, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, [1667] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(106), 1, anon_sym_SLASH, ACTIONS(157), 1, anon_sym_AMP, STATE(46), 1, sym_line_comment, ACTIONS(104), 8, ts_builtin_sym_end, anon_sym_LF, anon_sym_PLUS, anon_sym_DASH, anon_sym_STAR, anon_sym_PERCENT, anon_sym_PIPE, anon_sym_CARET, [1696] = 9, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, STATE(26), 1, sym_reg, STATE(47), 1, sym_line_comment, ACTIONS(55), 2, sym_meta_ident, sym__ident, STATE(106), 2, sym_int, sym_ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, [1728] = 9, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(49), 1, aux_sym_int_token2, STATE(26), 1, sym_reg, STATE(48), 1, sym_line_comment, ACTIONS(55), 2, sym_meta_ident, sym__ident, STATE(99), 2, sym_int, sym_ident, ACTIONS(53), 3, sym_word, sym__reg, sym_address, [1760] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(159), 1, ts_builtin_sym_end, ACTIONS(161), 1, anon_sym_LF, STATE(49), 2, sym_line_comment, aux_sym_program_repeat1, ACTIONS(164), 5, anon_sym_label, anon_sym_const, sym_word, sym_meta_ident, sym__ident, [1787] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(50), 1, sym_line_comment, ACTIONS(166), 2, ts_builtin_sym_end, anon_sym_LF, ACTIONS(168), 5, anon_sym_label, anon_sym_const, sym_word, sym_meta_ident, sym__ident, [1811] = 9, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(170), 1, sym_address, STATE(26), 1, sym_reg, STATE(51), 1, sym_line_comment, STATE(104), 1, sym_ident, ACTIONS(53), 2, sym_word, sym__reg, ACTIONS(55), 2, sym_meta_ident, sym__ident, [1841] = 9, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(170), 1, sym_address, STATE(26), 1, sym_reg, STATE(52), 1, sym_line_comment, STATE(98), 1, sym_ident, ACTIONS(53), 2, sym_word, sym__reg, ACTIONS(55), 2, sym_meta_ident, sym__ident, [1871] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(174), 1, anon_sym_COMMA, STATE(53), 1, sym_line_comment, STATE(56), 1, aux_sym_meta_repeat3, ACTIONS(172), 2, ts_builtin_sym_end, anon_sym_LF, [1894] = 8, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(139), 1, anon_sym_LF, ACTIONS(176), 1, ts_builtin_sym_end, STATE(22), 1, aux_sym_program_repeat1, STATE(54), 1, sym_line_comment, STATE(73), 1, aux_sym_program_repeat2, [1919] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(180), 1, anon_sym_COMMA, STATE(55), 1, sym_line_comment, STATE(65), 1, aux_sym_meta_repeat2, ACTIONS(178), 2, ts_builtin_sym_end, anon_sym_LF, [1942] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(174), 1, anon_sym_COMMA, STATE(56), 1, sym_line_comment, STATE(66), 1, aux_sym_meta_repeat3, ACTIONS(178), 2, ts_builtin_sym_end, anon_sym_LF, [1965] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(182), 1, anon_sym_COMMA, STATE(57), 1, sym_line_comment, STATE(67), 1, aux_sym_meta_repeat1, ACTIONS(178), 2, ts_builtin_sym_end, anon_sym_LF, [1988] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(53), 1, sym__reg, STATE(58), 1, sym_line_comment, STATE(115), 1, sym_reg, ACTIONS(170), 2, sym_word, sym_address, [2011] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(184), 1, ts_builtin_sym_end, ACTIONS(186), 1, anon_sym_LF, STATE(36), 1, aux_sym_program_repeat1, STATE(59), 2, sym_line_comment, aux_sym_program_repeat2, [2034] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(53), 1, sym__reg, STATE(60), 1, sym_line_comment, STATE(82), 1, sym_reg, ACTIONS(170), 2, sym_word, sym_address, [2057] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(191), 1, anon_sym_BANG, STATE(61), 1, sym_line_comment, ACTIONS(189), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2078] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(64), 1, anon_sym_LPAREN, STATE(62), 1, sym_line_comment, ACTIONS(62), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2099] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(195), 1, anon_sym_COMMA, ACTIONS(193), 2, ts_builtin_sym_end, anon_sym_LF, STATE(63), 2, sym_line_comment, aux_sym_instruction_repeat1, [2120] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(53), 1, sym__reg, STATE(64), 1, sym_line_comment, STATE(68), 1, sym_reg, ACTIONS(170), 2, sym_word, sym_address, [2143] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(200), 1, anon_sym_COMMA, ACTIONS(198), 2, ts_builtin_sym_end, anon_sym_LF, STATE(65), 2, sym_line_comment, aux_sym_meta_repeat2, [2164] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(205), 1, anon_sym_COMMA, ACTIONS(203), 2, ts_builtin_sym_end, anon_sym_LF, STATE(66), 2, sym_line_comment, aux_sym_meta_repeat3, [2185] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(210), 1, anon_sym_COMMA, ACTIONS(208), 2, ts_builtin_sym_end, anon_sym_LF, STATE(67), 2, sym_line_comment, aux_sym_meta_repeat1, [2206] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(213), 1, anon_sym_COMMA, ACTIONS(217), 1, anon_sym_RBRACK, STATE(68), 1, sym_line_comment, ACTIONS(215), 2, anon_sym_PLUS, anon_sym_DASH, [2229] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(221), 1, anon_sym_BANG, STATE(69), 1, sym_line_comment, ACTIONS(219), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2250] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(223), 1, anon_sym_COMMA, STATE(70), 1, sym_line_comment, STATE(72), 1, aux_sym_instruction_repeat1, ACTIONS(108), 2, ts_builtin_sym_end, anon_sym_LF, [2273] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(182), 1, anon_sym_COMMA, STATE(57), 1, aux_sym_meta_repeat1, STATE(71), 1, sym_line_comment, ACTIONS(172), 2, ts_builtin_sym_end, anon_sym_LF, [2296] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(225), 1, anon_sym_COMMA, STATE(63), 1, aux_sym_instruction_repeat1, STATE(72), 1, sym_line_comment, ACTIONS(45), 2, ts_builtin_sym_end, anon_sym_LF, [2319] = 8, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(137), 1, ts_builtin_sym_end, ACTIONS(139), 1, anon_sym_LF, STATE(23), 1, aux_sym_program_repeat1, STATE(59), 1, aux_sym_program_repeat2, STATE(73), 1, sym_line_comment, [2344] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(180), 1, anon_sym_COMMA, STATE(55), 1, aux_sym_meta_repeat2, STATE(74), 1, sym_line_comment, ACTIONS(172), 2, ts_builtin_sym_end, anon_sym_LF, [2367] = 7, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(53), 1, sym__reg, STATE(75), 1, sym_line_comment, STATE(111), 1, sym_reg, ACTIONS(170), 2, sym_word, sym_address, [2390] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(76), 1, sym_line_comment, ACTIONS(203), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2408] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(229), 1, anon_sym_LPAREN, STATE(77), 1, sym_line_comment, ACTIONS(227), 2, ts_builtin_sym_end, anon_sym_LF, [2428] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(78), 1, sym_line_comment, ACTIONS(62), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2446] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(79), 1, sym_line_comment, ACTIONS(198), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2464] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(80), 1, sym_line_comment, ACTIONS(189), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2482] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(81), 1, sym_line_comment, ACTIONS(208), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2500] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(233), 1, anon_sym_RBRACK, STATE(82), 1, sym_line_comment, ACTIONS(231), 2, anon_sym_PLUS, anon_sym_DASH, [2520] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(83), 1, sym_line_comment, ACTIONS(235), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2538] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(84), 1, sym_line_comment, ACTIONS(219), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2556] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(85), 1, sym_line_comment, ACTIONS(237), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2574] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(86), 1, sym_line_comment, ACTIONS(239), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2592] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(87), 1, sym_line_comment, ACTIONS(193), 3, ts_builtin_sym_end, anon_sym_LF, anon_sym_COMMA, [2610] = 6, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(243), 1, anon_sym_LPAREN, STATE(88), 1, sym_line_comment, ACTIONS(241), 2, ts_builtin_sym_end, anon_sym_LF, [2630] = 6, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(245), 1, aux_sym_int_token2, STATE(81), 1, sym_int, STATE(89), 1, sym_line_comment, [2649] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(90), 1, sym_line_comment, ACTIONS(247), 2, ts_builtin_sym_end, anon_sym_LF, [2666] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(91), 1, sym_line_comment, ACTIONS(249), 2, ts_builtin_sym_end, anon_sym_LF, [2683] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(92), 1, sym_line_comment, ACTIONS(251), 2, ts_builtin_sym_end, anon_sym_LF, [2700] = 6, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(245), 1, aux_sym_int_token2, STATE(93), 1, sym_line_comment, STATE(99), 1, sym_int, [2719] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(94), 1, sym_line_comment, ACTIONS(184), 2, ts_builtin_sym_end, anon_sym_LF, [2736] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(95), 1, sym_line_comment, ACTIONS(253), 2, ts_builtin_sym_end, anon_sym_LF, [2753] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, STATE(96), 1, sym_line_comment, ACTIONS(172), 2, ts_builtin_sym_end, anon_sym_LF, [2770] = 6, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(47), 1, anon_sym_POUND, ACTIONS(245), 1, aux_sym_int_token2, STATE(97), 1, sym_line_comment, STATE(102), 1, sym_int, [2789] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(255), 1, anon_sym_RPAREN, STATE(98), 1, sym_line_comment, [2805] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(233), 1, anon_sym_RBRACK, STATE(99), 1, sym_line_comment, [2821] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(257), 1, sym_word, STATE(100), 1, sym_line_comment, [2837] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(259), 1, sym_word, STATE(101), 1, sym_line_comment, [2853] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(261), 1, anon_sym_RBRACK, STATE(102), 1, sym_line_comment, [2869] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(263), 1, anon_sym_LBRACK, STATE(103), 1, sym_line_comment, [2885] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(265), 1, anon_sym_RPAREN, STATE(104), 1, sym_line_comment, [2901] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(267), 1, anon_sym_LBRACK, STATE(105), 1, sym_line_comment, [2917] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(269), 1, anon_sym_RBRACK, STATE(106), 1, sym_line_comment, [2933] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(271), 1, anon_sym_rel, STATE(107), 1, sym_line_comment, [2949] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(273), 1, aux_sym_int_token1, STATE(108), 1, sym_line_comment, [2965] = 5, ACTIONS(275), 1, anon_sym_POUND, ACTIONS(277), 1, aux_sym_line_comment_token1, ACTIONS(279), 1, aux_sym_line_comment_token2, ACTIONS(281), 1, sym_block_comment, STATE(109), 1, sym_line_comment, [2981] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(283), 1, sym_float, STATE(110), 1, sym_line_comment, [2997] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(191), 1, anon_sym_RPAREN, STATE(111), 1, sym_line_comment, [3013] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(23), 1, anon_sym_COLON, STATE(112), 1, sym_line_comment, [3029] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(285), 1, ts_builtin_sym_end, STATE(113), 1, sym_line_comment, [3045] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(287), 1, sym_string, STATE(114), 1, sym_line_comment, [3061] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(289), 1, anon_sym_RPAREN, STATE(115), 1, sym_line_comment, [3077] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(291), 1, anon_sym_ptr, STATE(116), 1, sym_line_comment, [3093] = 5, ACTIONS(3), 1, anon_sym_POUND, ACTIONS(5), 1, aux_sym_line_comment_token2, ACTIONS(7), 1, sym_block_comment, ACTIONS(293), 1, aux_sym_int_token1, STATE(117), 1, sym_line_comment, [3109] = 1, ACTIONS(295), 1, ts_builtin_sym_end, [3113] = 1, ACTIONS(297), 1, ts_builtin_sym_end, }; static const uint32_t ts_small_parse_table_map[] = { [SMALL_STATE(3)] = 0, [SMALL_STATE(4)] = 63, [SMALL_STATE(5)] = 126, [SMALL_STATE(6)] = 185, [SMALL_STATE(7)] = 225, [SMALL_STATE(8)] = 259, [SMALL_STATE(9)] = 293, [SMALL_STATE(10)] = 330, [SMALL_STATE(11)] = 363, [SMALL_STATE(12)] = 396, [SMALL_STATE(13)] = 442, [SMALL_STATE(14)] = 474, [SMALL_STATE(15)] = 512, [SMALL_STATE(16)] = 554, [SMALL_STATE(17)] = 586, [SMALL_STATE(18)] = 622, [SMALL_STATE(19)] = 656, [SMALL_STATE(20)] = 702, [SMALL_STATE(21)] = 746, [SMALL_STATE(22)] = 793, [SMALL_STATE(23)] = 839, [SMALL_STATE(24)] = 885, [SMALL_STATE(25)] = 915, [SMALL_STATE(26)] = 945, [SMALL_STATE(27)] = 975, [SMALL_STATE(28)] = 1005, [SMALL_STATE(29)] = 1044, [SMALL_STATE(30)] = 1083, [SMALL_STATE(31)] = 1122, [SMALL_STATE(32)] = 1161, [SMALL_STATE(33)] = 1200, [SMALL_STATE(34)] = 1239, [SMALL_STATE(35)] = 1278, [SMALL_STATE(36)] = 1317, [SMALL_STATE(37)] = 1360, [SMALL_STATE(38)] = 1399, [SMALL_STATE(39)] = 1438, [SMALL_STATE(40)] = 1477, [SMALL_STATE(41)] = 1504, [SMALL_STATE(42)] = 1541, [SMALL_STATE(43)] = 1576, [SMALL_STATE(44)] = 1603, [SMALL_STATE(45)] = 1636, [SMALL_STATE(46)] = 1667, [SMALL_STATE(47)] = 1696, [SMALL_STATE(48)] = 1728, [SMALL_STATE(49)] = 1760, [SMALL_STATE(50)] = 1787, [SMALL_STATE(51)] = 1811, [SMALL_STATE(52)] = 1841, [SMALL_STATE(53)] = 1871, [SMALL_STATE(54)] = 1894, [SMALL_STATE(55)] = 1919, [SMALL_STATE(56)] = 1942, [SMALL_STATE(57)] = 1965, [SMALL_STATE(58)] = 1988, [SMALL_STATE(59)] = 2011, [SMALL_STATE(60)] = 2034, [SMALL_STATE(61)] = 2057, [SMALL_STATE(62)] = 2078, [SMALL_STATE(63)] = 2099, [SMALL_STATE(64)] = 2120, [SMALL_STATE(65)] = 2143, [SMALL_STATE(66)] = 2164, [SMALL_STATE(67)] = 2185, [SMALL_STATE(68)] = 2206, [SMALL_STATE(69)] = 2229, [SMALL_STATE(70)] = 2250, [SMALL_STATE(71)] = 2273, [SMALL_STATE(72)] = 2296, [SMALL_STATE(73)] = 2319, [SMALL_STATE(74)] = 2344, [SMALL_STATE(75)] = 2367, [SMALL_STATE(76)] = 2390, [SMALL_STATE(77)] = 2408, [SMALL_STATE(78)] = 2428, [SMALL_STATE(79)] = 2446, [SMALL_STATE(80)] = 2464, [SMALL_STATE(81)] = 2482, [SMALL_STATE(82)] = 2500, [SMALL_STATE(83)] = 2520, [SMALL_STATE(84)] = 2538, [SMALL_STATE(85)] = 2556, [SMALL_STATE(86)] = 2574, [SMALL_STATE(87)] = 2592, [SMALL_STATE(88)] = 2610, [SMALL_STATE(89)] = 2630, [SMALL_STATE(90)] = 2649, [SMALL_STATE(91)] = 2666, [SMALL_STATE(92)] = 2683, [SMALL_STATE(93)] = 2700, [SMALL_STATE(94)] = 2719, [SMALL_STATE(95)] = 2736, [SMALL_STATE(96)] = 2753, [SMALL_STATE(97)] = 2770, [SMALL_STATE(98)] = 2789, [SMALL_STATE(99)] = 2805, [SMALL_STATE(100)] = 2821, [SMALL_STATE(101)] = 2837, [SMALL_STATE(102)] = 2853, [SMALL_STATE(103)] = 2869, [SMALL_STATE(104)] = 2885, [SMALL_STATE(105)] = 2901, [SMALL_STATE(106)] = 2917, [SMALL_STATE(107)] = 2933, [SMALL_STATE(108)] = 2949, [SMALL_STATE(109)] = 2965, [SMALL_STATE(110)] = 2981, [SMALL_STATE(111)] = 2997, [SMALL_STATE(112)] = 3013, [SMALL_STATE(113)] = 3029, [SMALL_STATE(114)] = 3045, [SMALL_STATE(115)] = 3061, [SMALL_STATE(116)] = 3077, [SMALL_STATE(117)] = 3093, [SMALL_STATE(118)] = 3109, [SMALL_STATE(119)] = 3113, }; static const TSParseActionEntry ts_parse_actions[] = { [0] = {.entry = {.count = 0, .reusable = false}}, [1] = {.entry = {.count = 1, .reusable = false}}, RECOVER(), [3] = {.entry = {.count = 1, .reusable = true}}, SHIFT(109), [5] = {.entry = {.count = 1, .reusable = true}}, SHIFT(119), [7] = {.entry = {.count = 1, .reusable = true}}, SHIFT_EXTRA(), [9] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 0, 0, 0), [11] = {.entry = {.count = 1, .reusable = false}}, SHIFT(100), [13] = {.entry = {.count = 1, .reusable = false}}, SHIFT(101), [15] = {.entry = {.count = 1, .reusable = false}}, SHIFT(2), [17] = {.entry = {.count = 1, .reusable = false}}, SHIFT(21), [19] = {.entry = {.count = 1, .reusable = false}}, SHIFT(112), [21] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_instruction, 1, 0, 1), [23] = {.entry = {.count = 1, .reusable = true}}, SHIFT(77), [25] = {.entry = {.count = 1, .reusable = true}}, SHIFT(58), [27] = {.entry = {.count = 1, .reusable = false}}, SHIFT(116), [29] = {.entry = {.count = 1, .reusable = true}}, SHIFT(64), [31] = {.entry = {.count = 1, .reusable = true}}, SHIFT(107), [33] = {.entry = {.count = 1, .reusable = true}}, SHIFT(108), [35] = {.entry = {.count = 1, .reusable = false}}, SHIFT(7), [37] = {.entry = {.count = 1, .reusable = false}}, SHIFT(78), [39] = {.entry = {.count = 1, .reusable = true}}, SHIFT(9), [41] = {.entry = {.count = 1, .reusable = false}}, SHIFT(11), [43] = {.entry = {.count = 1, .reusable = false}}, SHIFT(10), [45] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_instruction, 3, 0, 1), [47] = {.entry = {.count = 1, .reusable = true}}, SHIFT(117), [49] = {.entry = {.count = 1, .reusable = false}}, SHIFT(24), [51] = {.entry = {.count = 1, .reusable = true}}, SHIFT(78), [53] = {.entry = {.count = 1, .reusable = false}}, SHIFT(25), [55] = {.entry = {.count = 1, .reusable = false}}, SHIFT(26), [57] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_instruction, 4, 0, 1), [59] = {.entry = {.count = 2, .reusable = true}}, REDUCE(sym__expr, 1, 0, 0), REDUCE(sym__tc_expr, 1, 0, 0), [62] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__expr, 1, 0, 0), [64] = {.entry = {.count = 1, .reusable = true}}, SHIFT(75), [66] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__tc_expr, 1, 0, 0), [68] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym__tc_expr, 1, 0, 0), [70] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_int, 1, 0, 0), [72] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_int, 1, 0, 0), [74] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_int, 2, 0, 0), [76] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_int, 2, 0, 0), [78] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ident, 1, 0, 0), [80] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_ident, 1, 0, 0), [82] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_reg, 1, 0, 0), [84] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_reg, 1, 0, 0), [86] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_instruction_repeat2, 1, 0, 0), [88] = {.entry = {.count = 1, .reusable = true}}, SHIFT(29), [90] = {.entry = {.count = 1, .reusable = false}}, SHIFT(29), [92] = {.entry = {.count = 1, .reusable = true}}, SHIFT(33), [94] = {.entry = {.count = 1, .reusable = false}}, SHIFT(33), [96] = {.entry = {.count = 1, .reusable = true}}, SHIFT(30), [98] = {.entry = {.count = 1, .reusable = true}}, SHIFT(32), [100] = {.entry = {.count = 1, .reusable = true}}, SHIFT(34), [102] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_instruction_repeat2, 1, 0, 0), [104] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_tc_infix, 3, 0, 5), [106] = {.entry = {.count = 1, .reusable = false}}, REDUCE(sym_tc_infix, 3, 0, 5), [108] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_instruction, 2, 0, 1), [110] = {.entry = {.count = 1, .reusable = true}}, SHIFT(13), [112] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), [114] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), SHIFT_REPEAT(108), [117] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), SHIFT_REPEAT(7), [120] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), SHIFT_REPEAT(13), [123] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), SHIFT_REPEAT(11), [126] = {.entry = {.count = 2, .reusable = false}}, REDUCE(aux_sym_instruction_repeat2, 2, 0, 0), SHIFT_REPEAT(10), [129] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 1, 0, 1), [131] = {.entry = {.count = 1, .reusable = true}}, SHIFT(88), [133] = {.entry = {.count = 1, .reusable = false}}, SHIFT(74), [135] = {.entry = {.count = 1, .reusable = true}}, SHIFT(53), [137] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 2, 0, 0), [139] = {.entry = {.count = 1, .reusable = true}}, SHIFT(50), [141] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 3, 0, 0), [143] = {.entry = {.count = 1, .reusable = true}}, SHIFT(43), [145] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_const, 3, 0, 4), [147] = {.entry = {.count = 1, .reusable = true}}, SHIFT(39), [149] = {.entry = {.count = 1, .reusable = true}}, SHIFT(37), [151] = {.entry = {.count = 1, .reusable = false}}, SHIFT(37), [153] = {.entry = {.count = 1, .reusable = true}}, SHIFT(38), [155] = {.entry = {.count = 1, .reusable = true}}, SHIFT(28), [157] = {.entry = {.count = 1, .reusable = true}}, SHIFT(35), [159] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), [161] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), SHIFT_REPEAT(50), [164] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 2, 0, 0), [166] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat1, 1, 0, 0), [168] = {.entry = {.count = 1, .reusable = false}}, REDUCE(aux_sym_program_repeat1, 1, 0, 0), [170] = {.entry = {.count = 1, .reusable = true}}, SHIFT(25), [172] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 2, 0, 1), [174] = {.entry = {.count = 1, .reusable = true}}, SHIFT(114), [176] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_program, 1, 0, 0), [178] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_meta, 3, 0, 1), [180] = {.entry = {.count = 1, .reusable = true}}, SHIFT(110), [182] = {.entry = {.count = 1, .reusable = true}}, SHIFT(89), [184] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_program_repeat2, 2, 0, 0), [186] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_program_repeat2, 2, 0, 0), SHIFT_REPEAT(50), [189] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ptr, 3, 0, 0), [191] = {.entry = {.count = 1, .reusable = true}}, SHIFT(83), [193] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_instruction_repeat1, 2, 0, 0), [195] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_instruction_repeat1, 2, 0, 0), SHIFT_REPEAT(5), [198] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_meta_repeat2, 2, 0, 0), [200] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_meta_repeat2, 2, 0, 0), SHIFT_REPEAT(110), [203] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_meta_repeat3, 2, 0, 0), [205] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_meta_repeat3, 2, 0, 0), SHIFT_REPEAT(114), [208] = {.entry = {.count = 1, .reusable = true}}, REDUCE(aux_sym_meta_repeat1, 2, 0, 0), [210] = {.entry = {.count = 2, .reusable = true}}, REDUCE(aux_sym_meta_repeat1, 2, 0, 0), SHIFT_REPEAT(89), [213] = {.entry = {.count = 1, .reusable = true}}, SHIFT(97), [215] = {.entry = {.count = 1, .reusable = true}}, SHIFT(48), [217] = {.entry = {.count = 1, .reusable = true}}, SHIFT(61), [219] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ptr, 5, 0, 0), [221] = {.entry = {.count = 1, .reusable = true}}, SHIFT(85), [223] = {.entry = {.count = 1, .reusable = true}}, SHIFT(3), [225] = {.entry = {.count = 1, .reusable = true}}, SHIFT(4), [227] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 2, 0, 3), [229] = {.entry = {.count = 1, .reusable = true}}, SHIFT(51), [231] = {.entry = {.count = 1, .reusable = true}}, SHIFT(47), [233] = {.entry = {.count = 1, .reusable = true}}, SHIFT(84), [235] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ptr, 4, 0, 0), [237] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ptr, 6, 0, 0), [239] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_ptr, 7, 0, 0), [241] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 2, 0, 0), [243] = {.entry = {.count = 1, .reusable = true}}, SHIFT(52), [245] = {.entry = {.count = 1, .reusable = true}}, SHIFT(24), [247] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym__item, 1, 0, 0), [249] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 5, 0, 3), [251] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 5, 0, 0), [253] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_label, 2, 0, 2), [255] = {.entry = {.count = 1, .reusable = true}}, SHIFT(92), [257] = {.entry = {.count = 1, .reusable = true}}, SHIFT(95), [259] = {.entry = {.count = 1, .reusable = true}}, SHIFT(31), [261] = {.entry = {.count = 1, .reusable = true}}, SHIFT(69), [263] = {.entry = {.count = 1, .reusable = true}}, SHIFT(93), [265] = {.entry = {.count = 1, .reusable = true}}, SHIFT(91), [267] = {.entry = {.count = 1, .reusable = true}}, SHIFT(60), [269] = {.entry = {.count = 1, .reusable = true}}, SHIFT(86), [271] = {.entry = {.count = 1, .reusable = true}}, SHIFT(103), [273] = {.entry = {.count = 1, .reusable = true}}, SHIFT(8), [275] = {.entry = {.count = 1, .reusable = false}}, SHIFT(109), [277] = {.entry = {.count = 1, .reusable = false}}, SHIFT(118), [279] = {.entry = {.count = 1, .reusable = false}}, SHIFT(119), [281] = {.entry = {.count = 1, .reusable = false}}, SHIFT_EXTRA(), [283] = {.entry = {.count = 1, .reusable = true}}, SHIFT(79), [285] = {.entry = {.count = 1, .reusable = true}}, ACCEPT_INPUT(), [287] = {.entry = {.count = 1, .reusable = true}}, SHIFT(76), [289] = {.entry = {.count = 1, .reusable = true}}, SHIFT(80), [291] = {.entry = {.count = 1, .reusable = true}}, SHIFT(105), [293] = {.entry = {.count = 1, .reusable = true}}, SHIFT(27), [295] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_comment, 2, 0, 0), [297] = {.entry = {.count = 1, .reusable = true}}, REDUCE(sym_line_comment, 1, 0, 0), }; #ifdef __cplusplus extern "C" { #endif #ifdef TREE_SITTER_HIDE_SYMBOLS #define TS_PUBLIC #elif defined(_WIN32) #define TS_PUBLIC __declspec(dllexport) #else #define TS_PUBLIC __attribute__((visibility("default"))) #endif TS_PUBLIC const TSLanguage *tree_sitter_asm(void) { static const TSLanguage language = { .version = LANGUAGE_VERSION, .symbol_count = SYMBOL_COUNT, .alias_count = ALIAS_COUNT, .token_count = TOKEN_COUNT, .external_token_count = EXTERNAL_TOKEN_COUNT, .state_count = STATE_COUNT, .large_state_count = LARGE_STATE_COUNT, .production_id_count = PRODUCTION_ID_COUNT, .field_count = FIELD_COUNT, .max_alias_sequence_length = MAX_ALIAS_SEQUENCE_LENGTH, .parse_table = &ts_parse_table[0][0], .small_parse_table = ts_small_parse_table, .small_parse_table_map = ts_small_parse_table_map, .parse_actions = ts_parse_actions, .symbol_names = ts_symbol_names, .field_names = ts_field_names, .field_map_slices = ts_field_map_slices, .field_map_entries = ts_field_map_entries, .symbol_metadata = ts_symbol_metadata, .public_symbol_map = ts_symbol_map, .alias_map = ts_non_terminal_alias_map, .alias_sequences = &ts_alias_sequences[0][0], .lex_modes = ts_lex_modes, .lex_fn = ts_lex, .primary_state_ids = ts_primary_state_ids, }; return &language; } #ifdef __cplusplus } #endif tree-sitter-asm-0.24.0/src/tree_sitter/000077500000000000000000000000001475121206000177405ustar00rootroot00000000000000tree-sitter-asm-0.24.0/src/tree_sitter/alloc.h000066400000000000000000000017311475121206000212050ustar00rootroot00000000000000#ifndef TREE_SITTER_ALLOC_H_ #define TREE_SITTER_ALLOC_H_ #ifdef __cplusplus extern "C" { #endif #include #include #include // Allow clients to override allocation functions #ifdef TREE_SITTER_REUSE_ALLOCATOR extern void *(*ts_current_malloc)(size_t size); extern void *(*ts_current_calloc)(size_t count, size_t size); extern void *(*ts_current_realloc)(void *ptr, size_t size); extern void (*ts_current_free)(void *ptr); #ifndef ts_malloc #define ts_malloc ts_current_malloc #endif #ifndef ts_calloc #define ts_calloc ts_current_calloc #endif #ifndef ts_realloc #define ts_realloc ts_current_realloc #endif #ifndef ts_free #define ts_free ts_current_free #endif #else #ifndef ts_malloc #define ts_malloc malloc #endif #ifndef ts_calloc #define ts_calloc calloc #endif #ifndef ts_realloc #define ts_realloc realloc #endif #ifndef ts_free #define ts_free free #endif #endif #ifdef __cplusplus } #endif #endif // TREE_SITTER_ALLOC_H_ tree-sitter-asm-0.24.0/src/tree_sitter/array.h000066400000000000000000000242771475121206000212430ustar00rootroot00000000000000#ifndef TREE_SITTER_ARRAY_H_ #define TREE_SITTER_ARRAY_H_ #ifdef __cplusplus extern "C" { #endif #include "./alloc.h" #include #include #include #include #include #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable : 4101) #elif defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-variable" #endif #define Array(T) \ struct { \ T *contents; \ uint32_t size; \ uint32_t capacity; \ } /// Initialize an array. #define array_init(self) \ ((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL) /// Create an empty array. #define array_new() \ { NULL, 0, 0 } /// Get a pointer to the element at a given `index` in the array. #define array_get(self, _index) \ (assert((uint32_t)(_index) < (self)->size), &(self)->contents[_index]) /// Get a pointer to the first element in the array. #define array_front(self) array_get(self, 0) /// Get a pointer to the last element in the array. #define array_back(self) array_get(self, (self)->size - 1) /// Clear the array, setting its size to zero. Note that this does not free any /// memory allocated for the array's contents. #define array_clear(self) ((self)->size = 0) /// Reserve `new_capacity` elements of space in the array. If `new_capacity` is /// less than the array's current capacity, this function has no effect. #define array_reserve(self, new_capacity) \ _array__reserve((Array *)(self), array_elem_size(self), new_capacity) /// Free any memory allocated for this array. Note that this does not free any /// memory allocated for the array's contents. #define array_delete(self) _array__delete((Array *)(self)) /// Push a new `element` onto the end of the array. #define array_push(self, element) \ (_array__grow((Array *)(self), 1, array_elem_size(self)), \ (self)->contents[(self)->size++] = (element)) /// Increase the array's size by `count` elements. /// New elements are zero-initialized. #define array_grow_by(self, count) \ do { \ if ((count) == 0) break; \ _array__grow((Array *)(self), count, array_elem_size(self)); \ memset((self)->contents + (self)->size, 0, (count) * array_elem_size(self)); \ (self)->size += (count); \ } while (0) /// Append all elements from one array to the end of another. #define array_push_all(self, other) \ array_extend((self), (other)->size, (other)->contents) /// Append `count` elements to the end of the array, reading their values from the /// `contents` pointer. #define array_extend(self, count, contents) \ _array__splice( \ (Array *)(self), array_elem_size(self), (self)->size, \ 0, count, contents \ ) /// Remove `old_count` elements from the array starting at the given `index`. At /// the same index, insert `new_count` new elements, reading their values from the /// `new_contents` pointer. #define array_splice(self, _index, old_count, new_count, new_contents) \ _array__splice( \ (Array *)(self), array_elem_size(self), _index, \ old_count, new_count, new_contents \ ) /// Insert one `element` into the array at the given `index`. #define array_insert(self, _index, element) \ _array__splice((Array *)(self), array_elem_size(self), _index, 0, 1, &(element)) /// Remove one element from the array at the given `index`. #define array_erase(self, _index) \ _array__erase((Array *)(self), array_elem_size(self), _index) /// Pop the last element off the array, returning the element by value. #define array_pop(self) ((self)->contents[--(self)->size]) /// Assign the contents of one array to another, reallocating if necessary. #define array_assign(self, other) \ _array__assign((Array *)(self), (const Array *)(other), array_elem_size(self)) /// Swap one array with another #define array_swap(self, other) \ _array__swap((Array *)(self), (Array *)(other)) /// Get the size of the array contents #define array_elem_size(self) (sizeof *(self)->contents) /// Search a sorted array for a given `needle` value, using the given `compare` /// callback to determine the order. /// /// If an existing element is found to be equal to `needle`, then the `index` /// out-parameter is set to the existing value's index, and the `exists` /// out-parameter is set to true. Otherwise, `index` is set to an index where /// `needle` should be inserted in order to preserve the sorting, and `exists` /// is set to false. #define array_search_sorted_with(self, compare, needle, _index, _exists) \ _array__search_sorted(self, 0, compare, , needle, _index, _exists) /// Search a sorted array for a given `needle` value, using integer comparisons /// of a given struct field (specified with a leading dot) to determine the order. /// /// See also `array_search_sorted_with`. #define array_search_sorted_by(self, field, needle, _index, _exists) \ _array__search_sorted(self, 0, _compare_int, field, needle, _index, _exists) /// Insert a given `value` into a sorted array, using the given `compare` /// callback to determine the order. #define array_insert_sorted_with(self, compare, value) \ do { \ unsigned _index, _exists; \ array_search_sorted_with(self, compare, &(value), &_index, &_exists); \ if (!_exists) array_insert(self, _index, value); \ } while (0) /// Insert a given `value` into a sorted array, using integer comparisons of /// a given struct field (specified with a leading dot) to determine the order. /// /// See also `array_search_sorted_by`. #define array_insert_sorted_by(self, field, value) \ do { \ unsigned _index, _exists; \ array_search_sorted_by(self, field, (value) field, &_index, &_exists); \ if (!_exists) array_insert(self, _index, value); \ } while (0) // Private typedef Array(void) Array; /// This is not what you're looking for, see `array_delete`. static inline void _array__delete(Array *self) { if (self->contents) { ts_free(self->contents); self->contents = NULL; self->size = 0; self->capacity = 0; } } /// This is not what you're looking for, see `array_erase`. static inline void _array__erase(Array *self, size_t element_size, uint32_t index) { assert(index < self->size); char *contents = (char *)self->contents; memmove(contents + index * element_size, contents + (index + 1) * element_size, (self->size - index - 1) * element_size); self->size--; } /// This is not what you're looking for, see `array_reserve`. static inline void _array__reserve(Array *self, size_t element_size, uint32_t new_capacity) { if (new_capacity > self->capacity) { if (self->contents) { self->contents = ts_realloc(self->contents, new_capacity * element_size); } else { self->contents = ts_malloc(new_capacity * element_size); } self->capacity = new_capacity; } } /// This is not what you're looking for, see `array_assign`. static inline void _array__assign(Array *self, const Array *other, size_t element_size) { _array__reserve(self, element_size, other->size); self->size = other->size; memcpy(self->contents, other->contents, self->size * element_size); } /// This is not what you're looking for, see `array_swap`. static inline void _array__swap(Array *self, Array *other) { Array swap = *other; *other = *self; *self = swap; } /// This is not what you're looking for, see `array_push` or `array_grow_by`. static inline void _array__grow(Array *self, uint32_t count, size_t element_size) { uint32_t new_size = self->size + count; if (new_size > self->capacity) { uint32_t new_capacity = self->capacity * 2; if (new_capacity < 8) new_capacity = 8; if (new_capacity < new_size) new_capacity = new_size; _array__reserve(self, element_size, new_capacity); } } /// This is not what you're looking for, see `array_splice`. static inline void _array__splice(Array *self, size_t element_size, uint32_t index, uint32_t old_count, uint32_t new_count, const void *elements) { uint32_t new_size = self->size + new_count - old_count; uint32_t old_end = index + old_count; uint32_t new_end = index + new_count; assert(old_end <= self->size); _array__reserve(self, element_size, new_size); char *contents = (char *)self->contents; if (self->size > old_end) { memmove( contents + new_end * element_size, contents + old_end * element_size, (self->size - old_end) * element_size ); } if (new_count > 0) { if (elements) { memcpy( (contents + index * element_size), elements, new_count * element_size ); } else { memset( (contents + index * element_size), 0, new_count * element_size ); } } self->size += new_count - old_count; } /// A binary search routine, based on Rust's `std::slice::binary_search_by`. /// This is not what you're looking for, see `array_search_sorted_with` or `array_search_sorted_by`. #define _array__search_sorted(self, start, compare, suffix, needle, _index, _exists) \ do { \ *(_index) = start; \ *(_exists) = false; \ uint32_t size = (self)->size - *(_index); \ if (size == 0) break; \ int comparison; \ while (size > 1) { \ uint32_t half_size = size / 2; \ uint32_t mid_index = *(_index) + half_size; \ comparison = compare(&((self)->contents[mid_index] suffix), (needle)); \ if (comparison <= 0) *(_index) = mid_index; \ size -= half_size; \ } \ comparison = compare(&((self)->contents[*(_index)] suffix), (needle)); \ if (comparison == 0) *(_exists) = true; \ else if (comparison < 0) *(_index) += 1; \ } while (0) /// Helper macro for the `_sorted_by` routines below. This takes the left (existing) /// parameter by reference in order to work with the generic sorting function above. #define _compare_int(a, b) ((int)*(a) - (int)(b)) #ifdef _MSC_VER #pragma warning(pop) #elif defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic pop #endif #ifdef __cplusplus } #endif #endif // TREE_SITTER_ARRAY_H_ tree-sitter-asm-0.24.0/src/tree_sitter/parser.h000066400000000000000000000155771475121206000214240ustar00rootroot00000000000000#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 TSStateId; 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 struct { bool visible; bool named; bool supertype; } 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 *); void (*log)(const TSLexer *, const char *, ...); }; typedef enum { TSParseActionTypeShift, TSParseActionTypeReduce, TSParseActionTypeAccept, TSParseActionTypeRecover, } TSParseActionType; typedef union { struct { uint8_t type; TSStateId state; bool extra; bool repetition; } shift; struct { uint8_t type; uint8_t child_count; TSSymbol symbol; int16_t dynamic_precedence; uint16_t production_id; } reduce; uint8_t type; } TSParseAction; typedef struct { uint16_t lex_state; uint16_t external_lex_state; } TSLexMode; typedef union { TSParseAction action; struct { uint8_t count; bool reusable; } entry; } TSParseActionEntry; typedef struct { int32_t start; int32_t end; } TSCharacterRange; struct TSLanguage { uint32_t version; uint32_t symbol_count; uint32_t alias_count; uint32_t token_count; uint32_t external_token_count; uint32_t state_count; uint32_t large_state_count; uint32_t production_id_count; uint32_t field_count; uint16_t max_alias_sequence_length; const uint16_t *parse_table; const uint16_t *small_parse_table; const uint32_t *small_parse_table_map; const TSParseActionEntry *parse_actions; const char * const *symbol_names; const char * const *field_names; const TSFieldMapSlice *field_map_slices; const TSFieldMapEntry *field_map_entries; const TSSymbolMetadata *symbol_metadata; const TSSymbol *public_symbol_map; const uint16_t *alias_map; const TSSymbol *alias_sequences; const TSLexMode *lex_modes; 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; const TSStateId *primary_state_ids; }; static inline bool set_contains(TSCharacterRange *ranges, uint32_t len, int32_t lookahead) { uint32_t index = 0; uint32_t size = len - index; while (size > 1) { uint32_t half_size = size / 2; uint32_t mid_index = index + half_size; TSCharacterRange *range = &ranges[mid_index]; if (lookahead >= range->start && lookahead <= range->end) { return true; } else if (lookahead > range->end) { index = mid_index; } size -= half_size; } TSCharacterRange *range = &ranges[index]; return (lookahead >= range->start && lookahead <= range->end); } /* * Lexer Macros */ #ifdef _MSC_VER #define UNUSED __pragma(warning(suppress : 4101)) #else #define UNUSED __attribute__((unused)) #endif #define START_LEXER() \ bool result = false; \ bool skip = false; \ UNUSED \ bool eof = false; \ int32_t lookahead; \ goto start; \ next_state: \ lexer->advance(lexer, skip); \ start: \ skip = false; \ lookahead = lexer->lookahead; #define ADVANCE(state_value) \ { \ state = state_value; \ goto next_state; \ } #define ADVANCE_MAP(...) \ { \ static const uint16_t map[] = { __VA_ARGS__ }; \ for (uint32_t i = 0; i < sizeof(map) / sizeof(map[0]); i += 2) { \ if (map[i] == lookahead) { \ state = map[i + 1]; \ goto next_state; \ } \ } \ } #define SKIP(state_value) \ { \ skip = true; \ 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) \ {{ \ .shift = { \ .type = TSParseActionTypeShift, \ .state = (state_value) \ } \ }} #define SHIFT_REPEAT(state_value) \ {{ \ .shift = { \ .type = TSParseActionTypeShift, \ .state = (state_value), \ .repetition = true \ } \ }} #define SHIFT_EXTRA() \ {{ \ .shift = { \ .type = TSParseActionTypeShift, \ .extra = true \ } \ }} #define REDUCE(symbol_name, children, precedence, prod_id) \ {{ \ .reduce = { \ .type = TSParseActionTypeReduce, \ .symbol = symbol_name, \ .child_count = children, \ .dynamic_precedence = precedence, \ .production_id = prod_id \ }, \ }} #define RECOVER() \ {{ \ .type = TSParseActionTypeRecover \ }} #define ACCEPT_INPUT() \ {{ \ .type = TSParseActionTypeAccept \ }} #ifdef __cplusplus } #endif #endif // TREE_SITTER_PARSER_H_ tree-sitter-asm-0.24.0/test/000077500000000000000000000000001475121206000155775ustar00rootroot00000000000000tree-sitter-asm-0.24.0/test/corpus/000077500000000000000000000000001475121206000171125ustar00rootroot00000000000000tree-sitter-asm-0.24.0/test/corpus/comment.test000066400000000000000000000014701475121206000214570ustar00rootroot00000000000000========== Line comment ========== ; This is a comment --- (program (line_comment)) ========== Inline comment with instr no args ========== MOVLPS ; This is an in-line comment --- (program (instruction kind: (word)) (line_comment)) ========== Inline comment with instr one reg arg, no space between ========== pushq %rbp; This is an in-line comment --- (program (instruction kind: (word) (ident (reg))) (line_comment)) ========== Inline comment with instr one reg arg, space between ========== pushq %rbp ; This is an in-line comment --- (program (instruction kind: (word) (ident (reg))) (line_comment)) ========== Block comment ========== /* * * This is a C-style block comment... * ...spanning multiple lines */ --- (program (block_comment)) tree-sitter-asm-0.24.0/test/corpus/instr_and_reg.test000066400000000000000000000046701475121206000226400ustar00rootroot00000000000000========== Instruction -- No args ========== MOVLPS --- (program (instruction kind: (word))) ========== Instruction -- One reg arg ========== pushq %rbp --- (program (instruction kind: (word) (ident (reg)))) ========== Instruction -- Two reg args ========== pushq %rbp, %rbp --- (program (instruction kind: (word) (ident (reg)) (ident (reg)))) ========== Instruction -- Pointer offset arg, reg arg ========== movzbl -1(%rbp), %eax --- (program (instruction kind: (word) (ptr (int) (reg)) (ident (reg)))) ========== Instruction -- Integer immediate arg, reg arg (GAS x86) ========== andl $15, %eax --- (program (instruction kind: (word) (int) (ident (reg)))) ========== Instruction -- Reg arg, Integer immediate arg (ARM A64) ========== mov X10, #1 --- (program (instruction (word) (ident (reg (word))) (int))) ========== Instruction -- Reg arg, reg arg, address pointer with register and negative integer immediate arg, followed by exclmation mark (ARM A64) ========== stp w0, w1, [sp, #-16]! --- (program (instruction (word) (ident (reg (word))) (ident (reg (word))) (ptr (reg (word)) (int)))) ========== Instruction -- Reg arg, address pointer with register and integer immediate arg (ARM A64) ========== ldr x8, [sp, #8] --- (program (instruction (word) (ident (reg (word))) (ptr (reg (word)) (int)))) ========== Instruction -- Reg arg, address pointer with register only (ARM A64) ========== ldr x8, [sp] --- (program (instruction (word) (ident (reg (word))) (ptr (reg (word))))) ========== Instruction -- Reg arg, section address arg (ARM A64) ========== adr X1, helloworld --- (program (instruction (word) (ident (reg (word))) (ident (reg (word))))) ========== Instruction -- Section address arg, reg arg (GAS x86) ========== mov $msg, %ecx --- (program (instruction (word) (ident (reg (address))) (ident (reg)))) ========== Instruction -- Dotted label arg ========== jne .L5 --- (program (instruction kind: (word) (ident))) tree-sitter-asm-0.24.0/test/corpus/labels_directives.test000066400000000000000000000020651475121206000235010ustar00rootroot00000000000000========== Basic label ========== main: --- (program (label (ident))) ========== Local label ========== .label: --- (program (label (meta_ident))) ========== Directive -- Single string arg ========== .asciz "Hello, world!" --- (program (meta (meta_ident) (string))) ========== Directive -- Multiple string args ========== .asciz "Hello", ", ", "world!" --- (program (meta (meta_ident) (string) (string) (string))) ========== Directive -- Single integer arg ========== .line 42 --- (program (meta (meta_ident) (int))) ========== Directive -- Multiple integer args ========== .fill 0, 1, 2 --- (program (meta (meta_ident) (int) (int) (int))) ========== Directive -- Single floating point arg ========== .float 3.14 --- (program (meta (meta_ident) (float))) ========== Directive -- Multiple floating point args ========== .float 3.14, 2.72 --- (program (meta (meta_ident) (float) (float))) tree-sitter-asm-0.24.0/test/corpus/literal.test000066400000000000000000000020011475121206000214400ustar00rootroot00000000000000========== Integer literal base 10 ========== .int 123 --- (program (meta (meta_ident) (int))) ========== Integer literal hex ========== .int 0xFFF --- (program (meta (meta_ident) (int))) ========== Float literal ========== .float 3.14 --- (program (meta (meta_ident) (float))) ========== String literal ========== .asciz "Hello, World!" --- (program (meta (meta_ident) (string))) ========== Comma separated list of integer literals base 10 ========== .int 123, 456, 789 --- (program (meta (meta_ident) (int) (int) (int))) ========== Comma separated list of integer literals hex ========== .int 0x0FF1CE, 0x8BADF00D, 0xDEADBEAF --- (program (meta (meta_ident) (int) (int) (int))) ========== Comma separated list of string literals ========== .int "A", "passing", "test" --- (program (meta (meta_ident) (string) (string) (string))) tree-sitter-asm-0.24.0/tree-sitter.json000066400000000000000000000011421475121206000177600ustar00rootroot00000000000000{ "grammars": [ { "name": "asm", "camelcase": "Asm", "scope": "source.asm", "path": ".", "file-types": [ "s", "asm", "assembly" ] } ], "metadata": { "version": "0.1.0", "license": "MIT", "description": "assembly grammar for tree-sitter", "authors": [ { "name": "RubixDev" } ], "links": { "repository": "https://github.com/RubixDev/tree-sitter-asm" } }, "bindings": { "c": true, "go": true, "node": true, "python": true, "rust": true, "swift": true } }