Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 375 Bytes

readme.md

File metadata and controls

27 lines (19 loc) · 375 Bytes

Calculate The Hard Way

a simple arithmetic calculator, written in c++, implementing a lexer, a recursive decent ll(2) parser, and a visitor for compiling ast.

Usage

./PROG_NAME input.txt

example

input.txt:

pi = 3.1416
r = 123
area = pi * ( r * r )
area

(assuming that the excutable is named calc.exe)

> calc.exe input.txt
> 47529.264790