.control and `B' parser, fix precedence of '-' versus '^'

-2^2 shall be -(2^2) instead of (-2)^2
This commit is contained in:
rlar 2013-11-20 22:04:11 +01:00
parent ad5c09a865
commit b32ae9f79b
2 changed files with 2 additions and 2 deletions

View File

@ -96,8 +96,8 @@
%right ','
%left '-' '+'
%left '*' '/' '%'
%right '^' /* exponentiation */
%left NEG /* negation--unary minus */
%right '^' /* exponentiation */
%left '[' ']'
%left TOK_LRANGE TOK_RRANGE

View File

@ -73,8 +73,8 @@
%left TOK_LE TOK_LT TOK_GE TOK_GT
%left '-' '+'
%left '*' '/'
%left '^' /* exponentiation */
%left NEG '!' /* negation--unary minus, and boolean not */
%left '^' /* exponentiation */
%initial-action /* initialize yylval */
{