def p_activity_4(self, p): """activity : action subject IF condition END | action subject WITH condition END""" p[0] = Activity() p[0].action = p[1] p[0].subjects = p[2] p[0].condition = p[4]
def p_activity_7(self, p): """activity : VARIABLE "=" action subject IF condition END | VARIABLE "=" action subject WITH condition END""" p[0] = Activity() p[0].variable = p[1] p[0].action = p[3] p[0].subjects = p[4] p[0].condition = p[6]
def p_activity_6(self, p): 'activity : VARIABLE "=" action subject END' p[0] = Activity() p[0].variable = p[1] p[0].action = p[3] p[0].subjects = p[4]
def p_activity_5(self, p): 'activity : VARIABLE "=" action END' p[0] = Activity() p[0].variable = p[1] p[0].action = p[3]
def p_activity_3(self, p): """activity : action IF condition END | action WITH condition END""" p[0] = Activity() p[0].action = p[1] p[0].condition = p[3]
def p_activity_2(self, p): "activity : action subject END" p[0] = Activity() p[0].action = p[1] p[0].subjects = p[2]
def p_activity_1(self, p): "activity : action END" p[0] = Activity() p[0].action = p[1]