Disallow variable definition in global scope
Refactored/fixed TestErrorListener: now storing exceptions and throw them after parsing
Added pattern scopes