def token(regexp, tag, right_context='', left_context=''):
    """ Make token definition (regexp with optional left or right context) """
    return r'' + left_context + '(' + regexp + ')' + right_context + '', tag