It produces concrete syntax trees that can be queried by line or character index. The library is specifically focused on incremental parsing, for use in a text editor, but it also works fine for normal 'batch' parsing workloads. It has a simple C API that you should be able to use from any language. Currently, there are bindings to JavaScript and Haskell. Here are some example grammars:
https://github.com/tree-sitter/tree-sitter
It produces concrete syntax trees that can be queried by line or character index. The library is specifically focused on incremental parsing, for use in a text editor, but it also works fine for normal 'batch' parsing workloads. It has a simple C API that you should be able to use from any language. Currently, there are bindings to JavaScript and Haskell. Here are some example grammars:
* C - https://github.com/tree-sitter/tree-sitter-c
* JavaScript - https://github.com/tree-sitter/tree-sitter-javascript
* Go - https://github.com/tree-sitter/tree-sitter-go
* Ruby - https://github.com/tree-sitter/tree-sitter-ruby
* Python - https://github.com/tree-sitter/tree-sitter-python