def p_package_options(t):
    """package_options : empty
                       | PIPE ATOM EQUALS QUOTEDSTRING package_options
                       | PIPE ATOM ATOM EQUALS QUOTEDSTRING package_options"""
    if len(t) == 2:
        t[0] = {}
    elif len(t) == 6:
        x = t[5].copy()
        if t[2] not in x:
            x[t[2]] = t[4]
        t[0] = x
    elif len(t) == 7:
        x = t[6].copy()
        if t[3] not in x and t[2] in t.parser.tags:
            x[t[3]] = t[5]
        t[0] = x
    else:
        assert False
