Example #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
Example #2
0
def Configlist_sort():
    '''Sort the configuration list.'''
    from msort import msort
    global current, currentend
    current = msort(current, 'next', Configcmp)
    currentend = None
    return
Example #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
Example #4
0
def Configlist_sort():
    '''Sort the configuration list.'''
    from msort import msort
    global current, currentend
    current = msort(current, 'next', Configcmp)
    currentend = None
    return
Example #5
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Example #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])
Example #7
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Example #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])
Example #9
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap
Example #10
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap