private Statement parseStatement() throws IOException {
        Statement stmtAST = null;
        Expression eAST;
        Vname vAST;
        switch(currentToken.kind){
            case Token.IF:
                acceptIt();
                eAST = parseExpression();
                accept(Token.THEN);
                Statement stmt1AST = parseStatementSeq();
                stmtAST = new IfStmt(eAST,stmt1AST);
                if(currentToken.kind==Token.ELSE){
                    acceptIt();
                    Statement stmt2AST = parseStatementSeq();
                    stmtAST = new IfElseStmt(eAST,stmt1AST,stmt2AST);
                }
                accept(Token.END);
                break;
            case Token.REPEAT:
                acceptIt();
                Statement sAST = parseStatementSeq();
                accept(Token.UNTIL);
                eAST = parseExpression();
                stmtAST = new RepeatStmt(sAST,eAST);
                break;
            case Token.IDENTIFIER:
                vAST = parseVname();
                accept(Token.BECOME);
                eAST = parseExpression();
                stmtAST = new AssignStmt(vAST,eAST);
                break;
            case Token.READ:
                acceptIt();
                vAST = parseVname();
                stmtAST = new ReadStmt(vAST);
                break;
            case Token.WRITE:
                acceptIt();
                eAST = parseExpression();
                stmtAST = new WriteStmt(eAST);
                break;
            default:
                //System.out.println(filePath+":"+scanner.line+"error: Unexpected "+Token.token[currentToken.kind]+" \'"+currentToken.spelling+"\'");
                System.exit(0);
            }
            return stmtAST;
        
    }