From: Jacob Lifshay Date: Sat, 6 May 2023 03:38:22 +0000 (-0700) Subject: fix fpscr table parser error reporting X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bb7069cee706f7fbc75dc7cafec3afe19cd87e02;p=openpower-isa.git fix fpscr table parser error reporting --- diff --git a/src/openpower/fpscr.py b/src/openpower/fpscr.py index 98e5ed9e..3da88f16 100644 --- a/src/openpower/fpscr.py +++ b/src/openpower/fpscr.py @@ -129,12 +129,12 @@ def _parse_fields(): nonlocal lineno if err_lineno is None: err_lineno = lineno + line = lines[err_lineno] for i in range(10000): # 10000 is random limit if we can't read if linecache.getline(__file__, i).strip().startswith('"'): break err_lineno += 1 # lines before doc comment start - raise SyntaxError(msg, ( - __file__, err_lineno + 3, col, lines[err_lineno])) + raise SyntaxError(msg, (__file__, err_lineno, col, line)) for lineno, line in enumerate(lines): line_fields = _parse_line_fields(line)