예제 #1
0
 def VisitMulOp(self, o, **kwargs):
     new = ast.MulOp(
         lhs=o.lhs,
         rhs=o.rhs,
     )
     return copy_std(
         o,
         new,
     )
예제 #2
0
 def VisitMulOp(self, o):
     return ast.MulOp(self.visit(o.lhs), self.visit(o.rhs))
예제 #3
0
 def VisitMulOp(self, o, **kwargs):
     return ast.MulOp(self.visit(o.lhs), self.visit(o.rhs))
예제 #4
0
def p_rhs_term_mul(p):
    """rhs_term : rhs_term TIMES rhs_term"""
    p[0] = ast.MulOp(p[1], p[3])
예제 #5
0
def p_rhs_term4(p):
    """ rhs_term : MINUSMINUS rhs_term """
    backend = p.parser.library_manager.backend
    neg_one = ast.ConstValue( backend.Quantity( -1.0, backend.Unit() ) )
    p[0] = ast.MulOp(neg_one, p[2] )