Currently, read_key_value_pairs assumes that all valid keys contain their values on the same line. However, the CIF spec allows for data like the following:
_some_key\n
;
data_for_that_key
;
This is nontrivial to implement in a line-by-line file reader, but could be easily implemented either by reading multiple of lines at a time, or maintaining some state of the previous few lines.