Ask HN: Writing parsers that run in multiple languages

https://news.ycombinator.com/item?id=16041192
by kasbah • 9 years ago
2 2 9 years ago

I wrote a sort of natural language parser for electronic component descriptions [1] and am interested in porting it to multiple languages. I have a way to port it to Python but the solution involves translating JS to Python using Js2Py which is quite ugly and probably a bit brittle.

I want to re-implement it, and define the grammar in EBNF (or similar) but have it run in multiple languages. I am especially interested in JS, Python, Go and Java but as many languages as possible would be good. Is there a parser generator that can do that?

[1]: https://monostable.github.io/electro-grammar

Related Stories

Loading related stories...

Source preview

news.ycombinator.com