Removed unneeded stuff from grammar

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Avoid holding buffer lock while drawing

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Integrated expression evaluator

Whenever there's a valid expression leading up to the cursor, it's evaluated
and displayed at the end of the line.

If the user presses the Menu key, the terminal will send as many backspaces is
required to erase the expression, followed by the result of the expression.
This means you can now look at the result of an expression with zero key
presses instead of 3, and you can substitute it with 1 key press instead of 5.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>
Make calculator more useful

Add cos(), sin(), log(), and hex().  Support fractional input values, and use
160 bits precision.

Signed-off-by: Morten Hustveit <morten.hustveit@gmail.com>