Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is a parser generator that I'm working on:

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



That looks extremely interesting!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: