[antlr-interest] scala support for ANTLR

Peter C. Chapin pchapin at cems.uvm.edu
Wed May 12 09:07:51 PDT 2010


On Wed, 2010-05-12 at 14:00 +0530, Bujji wrote:

> Hi all,
> Is there any support for scala in ANTLR..
> 
> i want to use scala as target language

I'm working on a language translation project using Scala. I use the
Java target of ANTLR and call into it from Scala code. It seems to work
fine.

In my case I run the AST produced by ANTLR through a method of my own
construction that converts it into an instance of a suitable case class.
I do this so I can use Scala pattern matching on the abstract syntax
tree. It's a bit of a pain and it would be nice if there was a real
Scala target for ANTLR, but what I'm doing is workable for me (so far
anyway!).

Peter




More information about the antlr-interest mailing list