mirror of https://github.com/openXC7/prjxray.git
utils: sp6_bitstream_analyzer: Fix formatting
Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
This commit is contained in:
parent
8054f88d40
commit
a9f4399591
|
|
@ -1 +1 @@
|
|||
Subproject commit b8db36518534a7c204f80d785a893055258205cb
|
||||
Subproject commit ddc281a41662bff3efb4a66c5b22307e31e5df44
|
||||
|
|
@ -72,12 +72,14 @@ opcodes = ("NOP", "READ", "WRITE", "UNKNOWN")
|
|||
|
||||
|
||||
def KnuthMorrisPratt(text, pattern):
|
||||
'''Yields all starting positions of copies of the pattern in the text.
|
||||
Calling conventions are similar to string.find, but its arguments can be
|
||||
lists or iterators, not just strings, it returns all matches, not just
|
||||
the first one, and it does not need the whole text in memory at once.
|
||||
Whenever it yields, it will have read the text exactly up to and including
|
||||
the match that caused the yield.'''
|
||||
'''
|
||||
Yields all starting positions of copies of the pattern in the text.
|
||||
Calling conventions are similar to string.find, but its arguments can be
|
||||
lists or iterators, not just strings, it returns all matches, not just
|
||||
the first one, and it does not need the whole text in memory at once.
|
||||
Whenever it yields, it will have read the text exactly up to and including
|
||||
the match that caused the yield.
|
||||
'''
|
||||
|
||||
# allow indexing into pattern and protect against change during yield
|
||||
pattern = list(pattern)
|
||||
|
|
|
|||
Loading…
Reference in New Issue