Token parseTerm() throws ParseException {
		int ch = this.read();
		Token tok = null;
		if (ch == T_OR || ch == T_RPAREN || ch == T_EOF) {
			tok = Token.createEmpty();
		} else {
			tok = this.parseFactor();
			Token concat = null;
			while ((ch = this.read()) != T_OR && ch != T_RPAREN && ch != T_EOF) {
				if (concat == null) {
					concat = Token.createConcat();
					concat.addChild(tok);
					tok = concat;
				}
				concat.addChild(this.parseFactor());
				// tok = Token.createConcat(tok, this.parseFactor());
			}
		}
		if (ch == T_RPAREN) {
			parenCount--;
		}
		return tok;
	}
Token parseTerm ( ) throws ParseException { int ch = this . read ( ) ; Token tok = null ; if ( ch == T_OR || ch == T_RPAREN || ch == T_EOF ) { tok = Token . createEmpty ( ) ; } else { tok = this . parseFactor ( ) ; Token concat = null ; while ( ( ch = this . read ( ) ) != T_OR && ch != T_RPAREN && ch != T_EOF ) { if ( concat == null ) { concat = Token . createConcat ( ) ; concat . addChild ( tok ) ; tok = concat ; } concat . addChild ( this . parseFactor ( ) ) ; } } if ( ch == T_RPAREN ) { parenCount -- ; } return tok ; }
term ::= factor+