* Term ::= Number | Name | '_'
* @return {@link Argument}
* @throws Exception
*/
private static Argument parseTerm() throws Exception {
Argument answer;
int cur = currentSymbol;
try {
answer = new Argument(parseNumber());
} catch(Exception e) {
currentSymbol = cur;
if (curSymbol() == '_') {
answer = new Argument("_", -1);
next();
} else {
boolean isConstant = Character.isLowerCase(curSymbol());
if (isConstant) {
answer = new Argument(parseName());
} else {
answer = new Argument(parseName(), -1);
}
}
}
return answer;