A syntax error simply means that something that doesn't make sense within a program's coding has occurred. Without knowing which program is generating the message, it's impossible to give you a definite way of fixing it.
However syntax errors are particularly likely to occur within Java (which is widely used across many programs). It won't do any harm to uninstall Java
http://www.java.com/en/download/uninstall.jsp
restart your laptop and then reinstall it:
http://www.java.com/en/download/index.jsp
That may well fix your problem.
Chris