def p_arg1(p): """ arg1 : STRING | NUMBER | IDENT | GLOBAL """ # a hack to support "clear global" p[0] = node.string(value=str(p[1]), lineno=p.lineno(1), lexpos=p.lexpos(1))
def p_transpose_expr(p): # p[2] contains the exact combination of plain and conjugate # transpose operators, such as "'.''.''''". "expr : expr TRANSPOSE" p[0] = node.transpose(p[1],node.string(p[2]))
def p_expr_string(p): "string : STRING" p[0] = node.string(p[1],lineno=p.lineno(1),lexpos=p.lexpos(1))
def p_transpose_expr(p): # p[2] contains the exact combination of plain and conjugate # transpose operators, such as "'.''.''''". "expr : expr TRANSPOSE" p[0] = node.transpose(p[1], node.string(p[2]))
def p_expr_string(p): "string : STRING" p[0] = node.string(p[1], lineno=p.lineno(1), lexpos=p.lexpos(1))