mirror of
https://github.com/YosysHQ/yosys
synced 2025-06-08 15:13:24 +00:00
liberty: Error on unclosed curly braces
This is an indication that the liberty file was truncated, which shouldn't be silently ignored.
This commit is contained in:
parent
418e795235
commit
ce74404890
2 changed files with 22 additions and 7 deletions
|
@ -165,7 +165,7 @@ namespace Yosys
|
|||
|
||||
void report_unexpected_token(int tok);
|
||||
void parse_vector_range(int tok);
|
||||
LibertyAst *parse();
|
||||
LibertyAst *parse(bool top_level);
|
||||
void error() const;
|
||||
void error(const std::string &str) const;
|
||||
|
||||
|
@ -174,7 +174,7 @@ namespace Yosys
|
|||
const LibertyAst *ast = nullptr;
|
||||
|
||||
LibertyParser(std::istream &f) : f(f), line(1) {
|
||||
shared_ast.reset(parse());
|
||||
shared_ast.reset(parse(true));
|
||||
ast = shared_ast.get();
|
||||
if (!ast) {
|
||||
#ifdef FILTERLIB
|
||||
|
@ -190,7 +190,7 @@ namespace Yosys
|
|||
LibertyParser(std::istream &f, const std::string &fname) : f(f), line(1) {
|
||||
shared_ast = LibertyAstCache::instance.cached_ast(fname);
|
||||
if (!shared_ast) {
|
||||
shared_ast.reset(parse());
|
||||
shared_ast.reset(parse(true));
|
||||
LibertyAstCache::instance.parsed_ast(fname, shared_ast);
|
||||
}
|
||||
ast = shared_ast.get();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue