Exemplo n.º 1
0
 def p_min_weighted_body_1(self, p):
     """ min_weighted_body : min_weight min_tuple COLON bfvec_x
                           | min_weight min_tuple COLON
                           | min_weight min_tuple
     """
     if len(p) == 5:
         p[0] = ast.WBody(p[1] + p[2], p[4])
     else:
         p[0] = ast.WBody(p[1] + p[2], [["ext_atom", ["true", ["#true"]]]])
Exemplo n.º 2
0
 def p_weighted_body_7(self, p):
     """ weighted_body : ntermvec_x TWO_COLON POW_NO_WS term
     """
     p[0] = ast.WBody(p[1], p[4], True)
Exemplo n.º 3
0
 def p_weighted_body_6(self, p):
     """ weighted_body :                      POW_NO_WS term
     """
     p[0] = ast.WBody(None, p[2], True)
Exemplo n.º 4
0
 def p_weighted_body_5(self, p):
     """ weighted_body : ntermvec_x TWO_COLON
     """
     p[0] = ast.WBody(p[1], [["ext_atom", ["true", ["#true"]]]])
Exemplo n.º 5
0
 def p_weighted_body_3(self, p):
     """ weighted_body : ntermvec_x TWO_COLON bfvec_x
     """
     p[0] = ast.WBody(p[1], p[3])
Exemplo n.º 6
0
 def p_weighted_body_1(self, p):
     """ weighted_body :                      bfvec_x
     """
     p[0] = ast.WBody(None, p[1])