def _defn(self): s = '' if self.keyword: s += self.keyword + ' ' s += '{} = {};'.format(sasoptpy.to_expression(self.identifier), sasoptpy.to_expression(self.expression)) return s
def _defn(self): elems = [] for i in self.elements: elems.append('{}={}'.format(sasoptpy.to_expression(i[0]), sasoptpy.to_expression(i[1]))) s = self.keyword + ' ' + ' '.join(elems) + ';' return s
def _expr(self): left = self._left._cond_expr() if hasattr(self._left, '_cond_expr') \ else sasoptpy.to_expression(self._left) right = self._right._cond_expr() if hasattr(self._right, '_cond_expr') \ else sasoptpy.to_expression(self._right) if self._type in ['and', 'or', 'AND', 'OR']: left = '({})'.format(left) right = '({})'.format(right) return '{} {} {}'.format(left, self._type, right)
def get_iterator_str(self): key_defs = [] for k in self._key: if sasoptpy.abstract.is_key_abstract(k): key_defs.append(k._defn()) else: key_defs.append(sasoptpy.to_expression(k)) return ' {{{}}}'.format(', '.join(key_defs))
def _defn(self): keyword = f'{self._print_type}' items = [] for i in self.elements: word = sasoptpy.to_expression(i) if self._print_names: word += '=' items.append(word) return keyword + ' ' + ' '.join(items) + ';'
def _get_for_expr(self): return '{} in {}'.format(self._expr(), sasoptpy.to_expression(self._set))
def _get_for_expr(self): #return '<{}> in {}'.format(self._expr(), self._set._name) comb = '<' + ', '.join(str(i) for i in self.values()) + '>' s = '{} in {}'.format(comb, sasoptpy.to_expression(self._set)) return s
def get_base_str(self): if self._base is None: return '' return sasoptpy.to_expression(self._base)
def _expr(self): if self.get_name() is not None: return self.get_name() else: return sasoptpy.to_expression(self._value)
def get_target_expr(cls, target): return sasoptpy.to_expression(target)