Example #1
0
    def __init__(self):
        nr = number >> Number

        # TODO: Make your changes in this section #############################

        additive_operator = (op('+') | op('-')) >> Operator
        calculation = nr + additive_operator + nr >> unarg(Calculation)

        #######################################################################

        self.toplevel = calculation + end
Example #2
0
    def __init__(self):
        nr = number >> Number

        # TODO: Make your changes in this section #############################

        plus_operator = op('+') >> Operator
        calculation = nr + plus_operator + nr >> unarg(Calculation)

        #######################################################################

        self.toplevel = calculation + end