grimme-lab / mctc-lib

Modular computation tool chain library
https://grimme-lab.github.io/mctc-lib
Apache License 2.0
15 stars 17 forks source link

Support more general reader #36

Open awvwgk opened 2 years ago

awvwgk commented 2 years ago

Currently reading an input file requires providing a formatted unit. However, non of the readers does directly read from the unit, rather they fetch a new line, tokenize and parse it. A general reader which can provide a line from any input source (formatted unit, unformatted stream, string, ...) would provide more flexibility.

The possibility to read from a file or formatted unit via the generic interface should be retained (preferably under the same symbol), however they would generate a temporary reader internally and pass it to the actual reader implementation.