Java lib for parsing and evaluating simple math expressions, using fractions. This was a seminar project in a Programming class. It is not very useful, but works
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
rcalc/src/net/mightypork/rcalc/tokens/TokenParenthesisRight.java

25 lines
423 B

package net.mightypork.rcalc.tokens;
import net.mightypork.rcalc.IToken;
import net.mightypork.rcalc.TokenList;
/**
* Right parenthesis token
*
* @author Ondrej Hruska
*/
public class TokenParenthesisRight implements IToken {
@Override
public String toString() {
return ")";
}
@Override
public TokenList wrapInTokenList() {
throw new RuntimeException("Cannot wrap a parenthesis in a TokenList!");
}
}