Implement the AST parser and test it

Implement the BasicParser class and test it with lot's of unit tests.