mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-13 04:28:18 +00:00
Merge pull request #1910 from boqwxp/cleanup_ilang_parser
Clean up pseudo-private member usage in `frontends/ilang/ilang_parser.y`.
This commit is contained in:
commit
5448f9c85d
|
@ -169,7 +169,7 @@ wire_stmt:
|
||||||
current_wire->attributes = attrbuf;
|
current_wire->attributes = attrbuf;
|
||||||
attrbuf.clear();
|
attrbuf.clear();
|
||||||
} wire_options TOK_ID EOL {
|
} wire_options TOK_ID EOL {
|
||||||
if (current_module->wires_.count($4) != 0)
|
if (current_module->wire($4) != nullptr)
|
||||||
rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of wire %s.", $4).c_str());
|
rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of wire %s.", $4).c_str());
|
||||||
current_module->rename(current_wire, $4);
|
current_module->rename(current_wire, $4);
|
||||||
free($4);
|
free($4);
|
||||||
|
@ -232,7 +232,7 @@ memory_options:
|
||||||
|
|
||||||
cell_stmt:
|
cell_stmt:
|
||||||
TOK_CELL TOK_ID TOK_ID EOL {
|
TOK_CELL TOK_ID TOK_ID EOL {
|
||||||
if (current_module->cells_.count($3) != 0)
|
if (current_module->cell($3) != nullptr)
|
||||||
rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of cell %s.", $3).c_str());
|
rtlil_frontend_ilang_yyerror(stringf("ilang error: redefinition of cell %s.", $3).c_str());
|
||||||
current_cell = current_module->addCell($3, $2);
|
current_cell = current_module->addCell($3, $2);
|
||||||
current_cell->attributes = attrbuf;
|
current_cell->attributes = attrbuf;
|
||||||
|
@ -427,9 +427,9 @@ sigspec:
|
||||||
delete $1;
|
delete $1;
|
||||||
} |
|
} |
|
||||||
TOK_ID {
|
TOK_ID {
|
||||||
if (current_module->wires_.count($1) == 0)
|
if (current_module->wire($1) == nullptr)
|
||||||
rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", $1).c_str());
|
rtlil_frontend_ilang_yyerror(stringf("ilang error: wire %s not found", $1).c_str());
|
||||||
$$ = new RTLIL::SigSpec(current_module->wires_[$1]);
|
$$ = new RTLIL::SigSpec(current_module->wire($1));
|
||||||
free($1);
|
free($1);
|
||||||
} |
|
} |
|
||||||
sigspec '[' TOK_INT ']' {
|
sigspec '[' TOK_INT ']' {
|
||||||
|
|
Loading…
Reference in a new issue