Esempio n. 1
0
def Configlist_sortbasis():
    '''Sort the basis configuration list.'''
    from msort import msort
    global basis, basisend
    basis = msort(current, 'bp', Configcmp)
    basisend = None
    return
Esempio n. 2
0
def Configlist_sort():
    '''Sort the configuration list.'''
    from msort import msort
    global current, currentend
    current = msort(current, 'next', Configcmp)
    currentend = None
    return
Esempio n. 3
0
def Configlist_sortbasis():
    '''Sort the basis configuration list.'''
    from msort import msort
    global basis, basisend
    basis = msort(current, 'bp', Configcmp)
    basisend = None
    return
Esempio n. 4
0
def Configlist_sort():
    '''Sort the configuration list.'''
    from msort import msort
    global current, currentend
    current = msort(current, 'next', Configcmp)
    currentend = None
    return
Esempio n. 5
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Esempio n. 6
0
 def testMSortNormalList(self):
     A = [3,5,7,1,3,6,7]
     self.assertEqual(msort.msort(A),
                      [1,3,3,5,6,7,7])
Esempio n. 7
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Esempio n. 8
0
 def testMSortNormalList(self):
     A = [3, 5, 7, 1, 3, 6, 7]
     self.assertEqual(msort.msort(A), [1, 3, 3, 5, 6, 7, 7])
Esempio n. 9
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap
Esempio n. 10
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap