added context information to the parser

fixes #47, fixes #48