A calculator powered by lexical analysis
The Go Programming Language textbook offers a study of an expression evaluator. Using lexical analysis, we expose a simple web server that evaluates mathematical expressions. A web-based calculator is provided as an interface to the expression evaluator.
You will need the latest stable version of go installed on your machine:
Run the following commands to download and build for execution:
git clone https://github.com/justinpage/go-web-calculator.git
cd go-web-calculator
go build -o calculator main.go
- Launch web-based calculator:
./calcuator
or./calculator --port <number>
- Visit
localhost:<port-number>
- By default, port number is
8080
.
- By default, port number is
- Original design by Sarah Frisk
- Lexical analysis was studied under Donovan and Kernighan via GOPL