If you are sure that the syntax is correct, you may check for correct new line endings. How did you bring your code from windows to mac ?

PS:dos2unix