tools: changed parser/builder auto_ptr to shared_ptr