Skip to main content

Close
Get the best research tool on the web today,and free!
Connect with people with common interests!

saved byYork on 2007-05-25

  • Here each function accepts a single argument, t,
    which is a tuple. The values of t[i] are mapped to grammar symbols as
    shown here:



    def p_statement_plus(t):
    'statement : statement ADDOP term'
    # ^ ^ ^ ^
    # t[0] t[1] t[2] t[3]

    t[0] = t[1] + t[3]