Improve ScriptParser

Now it checks if all end operators (brb) are matched.