Hacker News new | ask | show | jobs
by electrum 3385 days ago
ANTLR4 automatically generates a visitor for your grammar that you can use to translate into your own idiomatic objects: http://jakubdziworski.github.io/java/2016/04/01/antlr_visito...

We use this in Presto for parsing SQL and generating an immutable AST:

https://github.com/prestodb/presto/blob/master/presto-parser...

https://github.com/prestodb/presto/blob/master/presto-parser...