using "foreign" as a terminal in a grammar extension registers "foreign" as a keyword, and prevents other uses of it (like naming a variable or name "foreign") ; using LIDENT "foreign" instead fixes that problem