3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-06 14:13:23 +00:00

Changed frontend-api from FILE to std::istream

This commit is contained in:
Clifford Wolf 2014-08-23 15:03:55 +02:00
parent 5dce303a2a
commit 19cff41eb4
22 changed files with 116 additions and 89 deletions

View file

@ -41,10 +41,10 @@ namespace PASS_DFFLIBMAP
struct LibertyParser
{
FILE *f;
std::istream &f;
int line;
LibertyAst *ast;
LibertyParser(FILE *f) : f(f), line(1), ast(parse()) {}
LibertyParser(std::istream &f) : f(f), line(1), ast(parse()) {}
~LibertyParser() { if (ast) delete ast; }
int lexer(std::string &str);
LibertyAst *parse();