def p_colspec(p):
rest = p[<NUM_LIT:3>] if len(p) > <NUM_LIT:3> else []<EOL>if p[<NUM_LIT:1>] == "<STR_LIT:*>":<EOL><INDENT>p[<NUM_LIT:0>] = [{"<STR_LIT:type>": "<STR_LIT>"}]<EOL><DEDENT>elif isinstance(p[<NUM_LIT:1>], dict) and p[<NUM_LIT:1>].get("<STR_LIT:type>") == "<STR_LIT>":<EOL><INDENT>p[<NUM_LIT:0>] = [p[<NUM_LIT:1>], *rest]<EOL><DEDENT>elif p[<NUM_LIT:1>]:<EOL><INDENT>p[<NUM_LIT:0>] = [<EOL>{<EOL>"<STR_LIT:type>": "<STR_LIT:name>",<EOL>"<STR_LIT:value>": p[<NUM_LIT:1>],<EOL>},<EOL>*rest,<EOL>]<EOL><DEDENT>else:<EOL><INDENT>p[<NUM_LIT:0>] = []<EOL><DEDENT>
colspec : STAR
        | NAME
        | function
        | NAME COMMA colspec
        | function COMMA colspec