FILE *f = fopen(liberty_file.c_str(), "r");
if (f == NULL)
log_cmd_error("Can't open liberty file `%s': %s\n", liberty_file.c_str(), strerror(errno));
- LibertyParer libparser(f);
+ LibertyParser libparser(f);
fclose(f);
find_cell(libparser.ast, "$_DFF_N_", false, false, false, false);
fprintf(f, " ;\n");
}
-int LibertyParer::lexer(std::string &str)
+int LibertyParser::lexer(std::string &str)
{
int c;
return c;
}
-LibertyAst *LibertyParer::parse()
+LibertyAst *LibertyParser::parse()
{
std::string str;
#ifndef FILTERLIB
-void LibertyParer::error()
+void LibertyParser::error()
{
log_error("Syntax error in line %d.\n", line);
}
#else
-void LibertyParer::error()
+void LibertyParser::error()
{
fprintf(stderr, "Syntax error in line %d.\n", line);
exit(1);
}
}
- LibertyParer parser(f);
+ LibertyParser parser(f);
if (parser.ast) {
if (flag_verilogsim)
gen_verilogsim(parser.ast);
static std::set<std::string> whitelist;
};
- struct LibertyParer
+ struct LibertyParser
{
FILE *f;
int line;
LibertyAst *ast;
- LibertyParer(FILE *f) : f(f), line(1), ast(parse()) {}
- ~LibertyParer() { if (ast) delete ast; }
+ LibertyParser(FILE *f) : f(f), line(1), ast(parse()) {}
+ ~LibertyParser() { if (ast) delete ast; }
int lexer(std::string &str);
LibertyAst *parse();
void error();