pigeon: github.com/mna/pigeon/examples/calculator Files

Command calculator

Command calculator is a small PEG-generated parser that computes simple math using integers.

Example usage: $ calculator "3 + (2 - 5 * 12)"

Inspired by pegjs arithmetic example: https://github.com/pegjs/pegjs/blob/master/examples/arithmetics.pegjs

Package Files

calculator.go

Package main imports 14 packages (graph). Updated 2019-08-14. Refresh now. Tools for package owners.