Parser

Write version of parser and some related functions.