Rewritten parser to address some problems with tags.
Introduced heredoc in php-style syntax.