Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the best tool for generating a parser in Java for my own language grammar?

I'm developing a small programming language based mostly of the C99 standard and I've already written a fairly decent lexer in java and now I'm looking to generate a Java Parser from the grammar. I know there's Bison, but that seems to only generate C code. I'm looking for a application that will allow me to input my grammar and create a full parser class in java code. Reading other SO posts on related topics, I've found ANTLR, but I'm wondering if anyone in the SO knows about a better tool?

thanks!

like image 211
HipsterZipster Avatar asked Dec 06 '25 06:12

HipsterZipster


1 Answers

Another couple to look at are JavaCC and SableCC (it has been a long time since I looked at SableCC).

like image 67
TofuBeer Avatar answered Dec 08 '25 19:12

TofuBeer