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]

Example 1: Defining functions.

Back to Article