Change the Antlr grammar so that the parser code is more explicit and does not need to check the context.getParent()