utils: sp6_bitstream_analyzer: Fix formatting

Signed-off-by: Tomasz Michalak <tmichalak@antmicro.com>
This commit is contained in:
Tomasz Michalak 2019-09-25 07:39:27 +02:00
parent 8054f88d40
commit a9f4399591
2 changed files with 9 additions and 7 deletions

2
third_party/fasm vendored

@ -1 +1 @@
Subproject commit b8db36518534a7c204f80d785a893055258205cb
Subproject commit ddc281a41662bff3efb4a66c5b22307e31e5df44

View File

@ -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)