def error_in_specification(self, ex): if ex.token.isEOF(): # Unexpected end of file raise error.from_antlr_token(ex.token, filename = self.getFilename(), text = "Unexpected end of file") else: raise
def error_in_definition(self, ex): if ex.token.getText() == 'interface': # Parsed "interface" but couldn't get beyond it. # Complain about the token. raise error.from_antlr_token(self.LT(2), self.getFilename()) else: raise
def error_in_specification(self, ex): if ex.token.isEOF(): # Unexpected end of file raise error.from_antlr_token(ex.token, filename=self.getFilename(), text="Unexpected end of file") else: raise