private void termb1() throws IOException { if (sta.lastToken() == TOKEN_AND) { builder.buildOperator(OP_AND); sta.nextTokenType(); factb(); builder.endOperator(); termb1(); } }
private void termb() throws IOException { switch (sta.lastToken()) { case TOKEN_NOT: case TOKEN_OPAR: case TOKEN_ADD: case TOKEN_SUB: case TOKEN_ID: case TOKEN_NUM: case TOKEN_OSB: factb(); termb1(); break; default: throw new InvalidExpressionError( "Expected not (!), (, [ +, -, a number or an identifier. Got '" + sta.lastToken() + "' instead."); } }