pin7prevState = readState );
That extra ) at the end should not be there. I can't post and have quick access to the compiler or I'd have gotten things like that out.
Sometimes that error will happen because a line above the one reported will have the problem to fix.