def p_list(t): 'list : LPAREN nodes RPAREN' #^ ^ ^ ^ This comment is for illustration only. #t[0] t[1] t[2] t[3] t[0] = t[2]