Adding the unary operator ~. The only other unary operator is !. Going to handle them as a special case of a binary operator.
Note that the precedence of ! should be changed to %nonaccoc (like ~) to avoid the shift/reduce conflicts in valve.output.
These changes have not been tested.
Moved the unary operator ! from %left to %nonassoc . This results in most of the other operators changing their values. I believe this is the right thing to do.
Modified the valve definition file (the motor was originally designed to turn a valve) to use the unary ! operator. That works. Also, adjusted the timings to allow the motor to return in one big step after all the little increments.