Completed first, very very bad, version of the parser.