A simple calc grammar compiler using ANTLR Implemented using the VisitorPattern approach See the Calc grammar here See the Calc visitor here ANTLR IntelliJ Plugin If you use the great ANTLR IntelliJ Plugin, you should configure it like shown in the image below (under Tools -> Configure ANTLR...).