Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //var isVar = vars[x[i]];
- //if (isVar != undefined) {
- // temp.push(variable(x[i]));
- //}
- //else if (x[i] >= '0' && x[i] <= '9') {
- // temp.push(cnst(parseInt(x.substr(i))));
- // while (x[i] != ' ' && i != x.length) {
- // i++;
- // }
- //}
- //else if (x[i] == '*') {
- // if (i != x.length - 1 && x[i + 1] == '*') {
- // pushBi(power);
- // i += 1;
- // continue;
- // }
- // pushBi(multiply);
- //}
- //else if (x[i] == '/') {
- // pushBi(divide);
- //}
- //else if (x[i] == '+') {
- // pushBi(add);
- //}
- //else if (x[i] == '-') {
- // if (i != x.length - 1 && x[i + 1] >= '0' && x[i + 1] <= '9') {
- // temp.push(cnst(parseInt(x.substr(i))));
- // while (x[i] != ' ' && i != x.length) {
- // i++;
- // }
- // continue;
- // }
- // pushBi(subtract);
- //}
- //else if (x[i] == 'a') {
- // pushUn(abs);
- // i += 3;
- //}
- //else if (x[i] == 'l') {
- // pushUn(log);
- // i += 3;
- //}
- //else if (x[i] == '%') {
- // pushBi(mod);
- //}
- //else if (x[i] == 'n') {
- // pushUn(negate);
- // i += 6;
- //}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement