Rewritten parser, more complex source2.txt

The parser has been rewritten to work with a more complex source. The
parser seems to work now properly with more levels of nesting and
recovers more properly. There might be still some issue with nesting and
recovery, but so far it is working as expected wth the newer source2.txt
file.

Also the rewriting of existing has been removed as it would have led to
more errors, this kind of optimization might be readded later, if
required.

Added setStyle and resetStyle functions to set or reset styling of
elements on demand, those will be used later by the formatter.