What is the best Java parser tool for my own language grammar?

I am developing a small programming language based mainly on the C99 standard, and I have already written a pretty decent lexer in java, and now I'm looking to create a Java Parser from grammar. I know Bison there , but it seems that it only generates C code. I'm looking for an application that will allow me to enter my grammar and create a complete parser class in Java code. Reading other SO posts on related topics, I found ANTLR, but I wonder if anyone in SO knows about a better tool?

thanks!

+3
source share
3 answers

, , - JavaCC SableCC ( SableCC).

+3

BNFC, Java, C, ++, #, F #, Haskell OCaml.

+2

The JFlex homepage at http://jflex.de indicates where to find Bison-like tools that can target Java:

http://byaccj.sourceforge.net/ http://www2.cs.tum.edu/projects/cup/ http://www.antlr.org/

0
source

Source: https://habr.com/ru/post/1705548/


All Articles