a calculator implemented with PLY