This is a Tree-sitter grammar implementing the OpenSmarts specification
The provided grammar includes this bugfix, and a bugfix for "@@" clockwise chirality, so it deviates from the specification.
git clone https://github.com/0x1d1z3r/tree-sitter-opensmarts
cd tree-sitter-opensmarts
npm install --save-dev tree-sitter-cli # install Tree-sitter
export PATH=$PATH:./node_modules/.bin # set $PATH
treesitter generate # generate parser
tree-sitter build --wasm # only needed for playground
treesitter playground # interactive example
A pure BNF (non LL) grammar for OpenSmarts is included in grammar.bnf
It is modified for use in BNFPlayground without EBNF syntax