add functionality to get region of grammar from atn state. allow null token type sets in getallnodeswithtype