Search code examples
spinpromela

Promela Syntax error


I am receiving a syntax error when I attempt to run my promela code, the error says Error: syntax error saw 'token: ::'

which is referring to this line of code (lines 10-13):

#define IniRunning(x,y) if
                    :: ((x==A) && (y==B)) -> IniRunningAB = 1
                    :: else skip
                    fi

I have tried to add a semi colon after the if and also after the fi but the error doesn't seem to go away.

Anyone have any ideas?


Solution

  • Put \ before each line break in the macro definition.

    You can check the intermediate text (after macro expansion) with spin -I check.pml