Updated hack to adapt for custom connective behavior

This commit is contained in:
Brandon Rozek 2024-10-24 21:21:39 -04:00
parent 646202cb50
commit 312e1aeda5

View file

@ -229,9 +229,12 @@ def parse_size(infile: SourceFile, first_run: bool) -> Optional[int]:
""" """
Parse the line representing the matrix size. Parse the line representing the matrix size.
""" """
size = int(next(infile)) size = int(next(infile))
# HACK: The first size line may be -1 due to a bug. Skip it # HACK: When necessitation and custom connectives are enabled
if size == -1 and first_run: # MaGIC may produce -1s at the beginning of the file
if first_run:
while size == -1:
size = int(next(infile)) size = int(next(infile))
if size == -1: if size == -1: