From a9f4399591568cead3e829e87b1ea371b591ca5a Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Wed, 25 Sep 2019 07:39:27 +0200 Subject: [PATCH] utils: sp6_bitstream_analyzer: Fix formatting Signed-off-by: Tomasz Michalak --- third_party/fasm | 2 +- utils/sp6_bitstream_analyzer.py | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/third_party/fasm b/third_party/fasm index b8db3651..ddc281a4 160000 --- a/third_party/fasm +++ b/third_party/fasm @@ -1 +1 @@ -Subproject commit b8db36518534a7c204f80d785a893055258205cb +Subproject commit ddc281a41662bff3efb4a66c5b22307e31e5df44 diff --git a/utils/sp6_bitstream_analyzer.py b/utils/sp6_bitstream_analyzer.py index 2f273e1e..382aa674 100755 --- a/utils/sp6_bitstream_analyzer.py +++ b/utils/sp6_bitstream_analyzer.py @@ -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)