'Given a SyntaxError from a marker evaluation, normalize the error
message:
- Remove indications of filename and line number.
- Replace platform-specific error messages with standard error
messages.'

@staticmethod
def normalize_exception(exc):

    subs = {'unexpected    EOF    while    parsing': 'invalid    syntax', 'parenthesis    is    never    closed': 'invalid    syntax'}
    exc.filename = None
    exc.lineno = None
    exc.msg = subs.get(exc.msg, exc.msg)
    return exc
