Skip to content

epics-extensions/tree-sitter-epics

Repository files navigation

tree-sitter-epics

This repository contains parsers for various EPICS-related domain-specific languages.

Currently, it contains parsers for:

Using these parsers for syntax validation

You can use these parsers to validate the syntax of your files. This may be useful for example to validate .db files during the compilation of an IOC.

The quickest way to do this is by installing the tree-sitter command-line tool.

Then, clone this repository somewhere, and add it to the global tree-sitter config by running tree-sitter init-config and adding the path under "parser-directories" in ~/.config/tree-sitter/config.json. (Source)

You can now use tree-sitter parse /path/to/file.db to validate an EPICS database file.

Using these parsers for more complex tools

Each of these parsers comes with bindings in various languages. Here are the links to the documentation of tree-sitter for those various languages: