← Back to context

Comment by xvilka

2 days ago

We use the tree-sitter[1] for parsing C declarations in Rizin[2] (see the "td" command, for example). See our custom grammar[3] (modified mainstream tree-sitter-c). The custom grammar was sadly necessary, due to the inability of Tree-Sitter to have the alternate roots[4].

P.S. Please add a license for your code.

[1] https://tree-sitter.github.io/

[2] https://github.com/rizinorg/rizin/tree/dev/librz/type/parser

[3] https://github.com/rizinorg/rizin-grammar-c/

[4] https://github.com/tree-sitter/tree-sitter/issues/711