Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix calculator exponent associative order

  • Loading branch information...
commit bd42f5696eaeb5becf81e73faabf0d8686ff4c7e 1 parent 8ba5ce5
@xymostech xymostech authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  build/calculator/calculator.jison
  2. +1 −1  utils/calculator.js
View
2  build/calculator/calculator.jison
@@ -27,7 +27,7 @@
%right UMINUS
%left '+' '-'
%left '*' '/'
-%left '^'
+%right '^'
%right '!'
%start expressions
View
2  utils/calculator.js
@@ -35,7 +35,7 @@ case 12:this.$ = Number(yytext);
break;
}
},
-table: [{3:1,4:2,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{1:[3]},{5:[1,8],6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14]},{4:15,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{13:[1,16]},{4:17,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],14:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],14:[2,12]},{1:[2,1]},{4:18,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:19,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:20,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:21,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:22,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],14:[2,7]},{5:[2,8],6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,8]},{4:23,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[1,24]},{5:[2,2],6:[2,2],7:[2,2],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,2]},{5:[2,3],6:[2,3],7:[2,3],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,13],11:[1,14],14:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[1,13],11:[1,14],14:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[2,6],11:[1,14],14:[2,6]},{6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[1,25]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],14:[2,10]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],14:[2,9]}],
+table: [{3:1,4:2,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{1:[3]},{5:[1,8],6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14]},{4:15,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{13:[1,16]},{4:17,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{5:[2,11],6:[2,11],7:[2,11],8:[2,11],9:[2,11],10:[2,11],11:[2,11],14:[2,11]},{5:[2,12],6:[2,12],7:[2,12],8:[2,12],9:[2,12],10:[2,12],11:[2,12],14:[2,12]},{1:[2,1]},{4:18,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:19,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:20,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:21,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{4:22,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{5:[2,7],6:[2,7],7:[2,7],8:[2,7],9:[2,7],10:[2,7],11:[2,7],14:[2,7]},{5:[2,8],6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,8]},{4:23,7:[1,3],12:[1,4],13:[1,5],15:[1,6],16:[1,7]},{6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[1,24]},{5:[2,2],6:[2,2],7:[2,2],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,2]},{5:[2,3],6:[2,3],7:[2,3],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[2,3]},{5:[2,4],6:[2,4],7:[2,4],8:[2,4],9:[2,4],10:[1,13],11:[1,14],14:[2,4]},{5:[2,5],6:[2,5],7:[2,5],8:[2,5],9:[2,5],10:[1,13],11:[1,14],14:[2,5]},{5:[2,6],6:[2,6],7:[2,6],8:[2,6],9:[2,6],10:[1,13],11:[1,14],14:[2,6]},{6:[1,9],7:[1,10],8:[1,11],9:[1,12],10:[1,13],11:[1,14],14:[1,25]},{5:[2,10],6:[2,10],7:[2,10],8:[2,10],9:[2,10],10:[2,10],11:[2,10],14:[2,10]},{5:[2,9],6:[2,9],7:[2,9],8:[2,9],9:[2,9],10:[2,9],11:[2,9],14:[2,9]}],
defaultActions: {8:[2,1]},
parseError: function parseError(str, hash) {
throw new Error(str);
Please sign in to comment.
Something went wrong with that request. Please try again.