Use class-instance variables to keep handlers and terminals (@terminal_handlers rather than @@terminal_handlers). This helps keep multiple parser instances from becoming confused.
Rescue from callbacks to not terminate on errrors.
Added #warn, and made #error, #progress and #debug protected methods instead of private.
#debug no longer prints to standard error, but calls processor callback with :trace and associated information, based on :debug option.
If :debug option is an integer, tracing is restricted to levels at or below that integer.
Remove some unnecessary @!attribute declarations.