BLIF parser¶
The header <lorina/blif.hpp>
implements methods to parse the BLIF format.
The class lorina::blif_reader
provides the following public
member functions.
Function |
Description |
---|---|
|
Callback method for parsed model |
|
Callback method for parsed input |
|
Callback method for parsed gate |
|
Callback method for parsed end |
|
Callback method for parsed comment |
The following reader functions are available.
Function
|
Description
|
---|---|
Reader function for the BLIF format.
|
|
Reader function for BLIF format.
|
-
inline return_code lorina::read_blif(std::istream &in, const blif_reader &reader, diagnostic_engine *diag = nullptr)¶
Reader function for the BLIF format.
Reads BLIF format from a stream and invokes a callback method for each parsed primitive and each detected parse error.
- Parameters
in – Input stream
reader – A BLIF reader with callback methods invoked for parsed primitives
diag – An optional diagnostic engine with callback methods for parse errors
- Returns
Success if parsing has been successful, or parse error if parsing has failed
-
inline return_code lorina::read_blif(const std::string &filename, const blif_reader &reader, diagnostic_engine *diag = nullptr)¶
Reader function for BLIF format.
Reads binary BLIF format from a file and invokes a callback method for each parsed primitive and each detected parse error.
- Parameters
filename – Name of the file
reader – A BLIF reader with callback methods invoked for parsed primitives
diag – An optional diagnostic engine with callback methods for parse errors
- Returns
Success if parsing has been successful, or parse error if parsing has failed