Skip to content

Instantly share code, notes, and snippets.

View BiaChaudhry's full-sized avatar
💡
in making

Bia Chaudhry BiaChaudhry

💡
in making
View GitHub Profile
@BiaChaudhry
BiaChaudhry / Calc.java
Created April 15, 2019 07:10 — forked from yydai/Calc.java
chapter4 of antlr4---Building a Calculator Using a Visitor
/***
* Excerpted from "The Definitive ANTLR 4 Reference",
* published by The Pragmatic Bookshelf.
* Copyrights apply to this code. It may not be used to create training material,
* courses, books, articles, and the like. Contact us if you are in doubt.
* We make no guarantees that this code is fit for any purpose.
* Visit http://www.pragmaticprogrammer.com/titles/tpantlr2 for more book information.
***/
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.tree.ParseTree;