Calculate is a Mac OS X dashboard widget for evaluating math expressions.
How it works
**are power operators.
><is the xor operator.
- Binary literals:
- Octal literals:
- Numbers with leading zeros are treated as decimal literals, not octal.
- After parsing the input to a grammar tree, it emits the tree to standard
Building from source
The source is organized as an Ant-based NetBeans project. (NetBeans isn't required - you just need Apache Ant.) Requires Mac OS X, of course.
- ANTLR by Terence Parr.
- EMCAScript grammar by Patrick Hulsmeijer.
- Emitter code based on JavaEmitter by Andy Tripp.