From: Luke Kenneth Casson Leighton Date: Sat, 6 May 2023 09:07:28 +0000 (+0100) Subject: add comment about why the new check has been added X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dca696396f797780a9d67afb25c0586039a2998d;p=openpower-isa.git add comment about why the new check has been added --- diff --git a/src/openpower/decoder/power_fields.py b/src/openpower/decoder/power_fields.py index 892af1d8..bb6a8efb 100644 --- a/src/openpower/decoder/power_fields.py +++ b/src/openpower/decoder/power_fields.py @@ -501,16 +501,16 @@ class DecodeFields: form.append(l) if len(form) <= 1: continue + # check separators line up with header for i, ch in enumerate(l): if ch != '|': continue if i >= len(form[0]) or form[0][i] != '|': col = len(txt[lineno]) - len(txt[lineno].lstrip()) col += i + 1 - raise SyntaxError( - "form line field separator ('|') " - "with no corresponding separator in header", - (self.fname, lineno + 1, col, txt[lineno])) + raise SyntaxError("form line field separator ('|') " + "with no corresponding separator in header", + (self.fname, lineno + 1, col, txt[lineno])) if not reading_data: assert l[0] == '#' heading = l[1:].strip()