Exemplo 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
Exemplo 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
Exemplo 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
Exemplo 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
Exemplo n.º 5
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Exemplo 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])
Exemplo n.º 7
0
 def testMSortEmptyList(self):
     self.assertEqual(msort.msort([]), [])
Exemplo 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])
Exemplo n.º 9
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap
Exemplo n.º 10
0
def Action_sort(ap):
    '''Sort parser actions.'''
    from msort import msort
    ap = msort(ap, 'next', actioncmp)
    return ap