This PR was squashed before being merged into the master branch (closes #1231).
Discussion
----------
fix phpdoc for environment, lexer and parser
First commit fixes several phpdocs <del>and also an instanceof check</del>.
The second commit changes an exception from Runtime to Syntax because it doesn't make sense to throw runtime exception during compilation. It also makes it consistent with all the rest (lexer, parser, compiler classes).
Commits
-------
cc5f3c4 fix phpdoc for environment, lexer and parser