def __unicode__ ( self ): """ string representation of link arguments: self returns: string for printing out """ if self.patn == None: return u'None' else: if self.patn == u'\x00': p = '\\0 ' else: p = u'{0:<24}'.format(ellyWildcard.deconvert(self.patn)) c = unicode(self.catg) x = u'' if self.synf == None else self.synf.hexadecimal(False) m = u'' if self.semf == None else self.semf.hexadecimal(False) b = str(self.bias) n = ' next=' + unicode(self.nxts) if self.nxts >= 0 else ' stop' return p + ' ' + ' ' + c + ' ' + x + ' ' + m + ' ' + b + n
def _dmpall ( slot ): """ show all rules for one index slot arguments: slot - index slot """ for r in slot: print ' {:16s}'.format(ellyWildcard.deconvert(r[0])) + ' -> ' + r[1]
def _dmpall(slot): """ show all rules for one index slot arguments: slot - index slot """ for r in slot: print(' {:16s}'.format(ellyWildcard.deconvert(r.patn)), end=' ') print(' ({:2d} spWC)'.format(r.nspm), end=' ') print('->', list(r.subs))
def shortcode(self): """ short description of FSA link arguments: self returns: state and link pattern as a string """ return str(self.nxts) + ': ' + ellyWildcard.deconvert(self.patn)
def _dmpall ( slot ): """ show all rules for one index slot arguments: slot - index slot """ for r in slot: print u' {:16s}'.format(ellyWildcard.deconvert(r.patn)) , print u' ({:2d} spWC)'.format(r.nspm) , print '->' , list(r.subs)
def __unicode__ ( self ): """ string representation of link arguments: self returns: string for printing out """ if self.patn == None: return u'None' else: pat = '{0:<16}'.format(ellyWildcard.deconvert(self.patn)) cat = unicode(self.catg) fet = u'None' if self.synf == None else self.synf.hexadecimal(False) return pat + ' ' + cat + ' ' + fet + ' next=' + unicode(self.nxts)
def __unicode__(self): """ string representation of link arguments: self returns: string for printing out """ if self.patn == None: return u'None' else: p = u'{0:<24}'.format(ellyWildcard.deconvert(self.patn)) c = unicode(self.catg) x = u'' if self.synf == None else self.synf.hexadecimal(False) m = u'' if self.semf == None else self.semf.hexadecimal(False) b = str(self.bias) n = ' next=' + unicode(self.nxts) if self.nxts >= 0 else ' stop' if self.nxts == -2: n += '+breaking' return p + ' ' + ' ' + c + ' ' + x + ' ' + m + ' ' + b + n
def __unicode__ ( self ): """ representation """ return ( ellyWildcard.deconvert(self.left) + ' | ' + ellyWildcard.deconvert(self.right) )
def __unicode__ ( self ): return ( ellyWildcard.deconvert(self.left) + ' | ' + ellyWildcard.deconvert(self.right) )
def __str__(self): """ representation """ return (ellyWildcard.deconvert(self.left) + ' | ' + ellyWildcard.deconvert(self.right))