Improvement/parser

Rewrite the parsing of function application and other expressions for less lookahead/better errors. 
This improves/fixes #1048.