mna / pigeon

Command pigeon generates parsers in Go from a PEG grammar.
BSD 3-Clause "New" or "Revised" License
835 stars 66 forks source link

Generating a Treesitter grammar #132

Open vito opened 1 year ago

vito commented 1 year ago

Hiya! First some maybe unnecessary context: I'm working on a language as a side project, and I need to aggressively limit scope. I already need a Treesitter grammar for editor support, so I aimed to codegen the tedious parts of parsing from it, thinking that'd be a nifty/useful tool for others. It quickly turned into a quagmire. At this point it seems easier to just maintain the Treesitter grammar alongside a PEG. Maybe I'll just nail the syntax the first time!

And then it occurred to me that it should be much easier going the other way around (generating a TS grammar from a PEG). I might take a swing at this myself, but I wanted to log an issue to gauge interest/concerns.

Thanks for maintaining Pigeon - I've been happily using it for years. Cool to see #123 land too!