Skip to content

Commit 241a600

Browse files
committed
fix(parser): Allow empty comments and symbol table.
1 parent 0c6264b commit 241a600

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

aiger/parser.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,10 @@ def parse(stream):
341341
if parser is None:
342342
raise ValueError(NOT_DONE_PARSING_ERROR.format(i, state))
343343

344-
if parser not in (parse_header, parse_output, parse_comment, parse_symbol):
344+
done = state.remaining_ands == 0
345+
done |= parser in (parse_header, parse_output, parse_comment, parse_symbol)
346+
347+
if not done:
345348
raise ValueError(DONE_PARSING_ERROR.format(state))
346349

347350
assert state.remaining_ands == 0

0 commit comments

Comments
 (0)