Improve parser's API and add demo code.