Parsing qualified identifiers and extends clause