private void termp1() throws IOException { if (sta.lastToken() == TOKEN_POW) { sta.nextTokenType(); builder.buildOperator(OP_POW); fact(); builder.endOperator(); termp1(); } }
private void termp() throws IOException { switch (sta.lastToken()) { case TOKEN_ID: case TOKEN_NUM: case TOKEN_OSB: fact(); termp1(); break; default: throw new InvalidExpressionError( "Expected [, a number or an identifier. Got '" + sta.lastToken() + "' instead."); } }