refactored operator generating script
some more precedence tests