nearley
nearley copied to clipboard
Automatic conversion to textmate grammar
Hi @kach - thanks for this incredible work!
I was wondering if there are any guides & tools available to convert a nearley grammar into a textmate syntax highlighter? I'm doing the work manually right now, the biggest incompatibility is how textmate only works line-by-line, and it can be tricky to get multiline recognition working by using the begin
/end
pattern (versus the single line match
rule)
Related: https://github.com/no-context/moo/issues/94
Hi Matt - I don't know of any such guides or tools but I do think it would be super cool to have an automated tool that cross-compiled grammars in a standard format (e.g. nearley/moo) to syntax files for not just textmate, but other editors too (e.g. vim or emacs). I imagine this tool being especially helpful for people designing DSLs, because they can instantly get editor tooling for their DSL "for free." If you want to take up this project, I would be really excited to see what you come up with, and maybe even discuss integrating with nearley (the way nearley-railroad is). Good luck!