Mainly I noted the following syntax errors. You need to remove the symbol backslash that appears at each line of your mod-file. Each equation inside the block model should end by a semicolon. Try to check the definition of the variable k; basically it can’t be declared both as exogenous and endogenous variable.
Thanks a lot for your reply, I realized that my problem is with the TextEdit in Mac.
May I know which editor should I use if I try to create a mod file in mac?