def p_simple_function(p):
    """simple_function : ONEWAY function_type IDENTIFIER '(' field_seq ')'
    | ONEWAY function_type IDENTIFIER '(' field_seq ')' throws
    | function_type IDENTIFIER '(' field_seq ')' throws
    | function_type IDENTIFIER '(' field_seq ')' """
    if p[1] == 'oneway':
        oneway = True
        base = 1
    else:
        oneway = False
        base = 0
    if p[len(p) - 1] == ')':
        throws = []
    else:
        throws = p[len(p) - 1]
    p[0] = [oneway, p[base + 1], p[base + 2], p[base + 4], throws]
