This is a Tree-sitter grammar implementing the OpenSmiles specification
git clone https://github.com/0x1d1z3r/tree-sitter-opensmiles
cd tree-sitter-opensmiles
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 OpenSmiles is included in grammar.bnf
It is modified for use in BNFPlayground without EBNF syntax