diff options
author | Clifford Wolf <clifford@clifford.at> | 2014-07-02 06:27:04 +0200 |
---|---|---|
committer | Clifford Wolf <clifford@clifford.at> | 2014-07-02 06:27:04 +0200 |
commit | ee8ad72fd950e1ee204e5c97155a50b8b1445dec (patch) | |
tree | 2469216ebc696f877aa43a5e1297af8d420c5024 /frontends | |
parent | 1c81ab49e7b57f4c64e533a3617fe8bbe257cdb5 (diff) | |
download | yosys-ee8ad72fd950e1ee204e5c97155a50b8b1445dec.tar.gz yosys-ee8ad72fd950e1ee204e5c97155a50b8b1445dec.tar.bz2 yosys-ee8ad72fd950e1ee204e5c97155a50b8b1445dec.zip |
fixed parsing of constant with comment between size and value
Diffstat (limited to 'frontends')
-rw-r--r-- | frontends/verilog/parser.y | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/frontends/verilog/parser.y b/frontends/verilog/parser.y index 37c3232aa..ce7b99272 100644 --- a/frontends/verilog/parser.y +++ b/frontends/verilog/parser.y @@ -1140,6 +1140,13 @@ basic_expr: delete $1; delete $2; } | + TOK_CONST TOK_CONST { + $$ = const2ast(*$1 + *$2, case_type_stack.size() == 0 ? 0 : case_type_stack.back()); + if ($$ == NULL || (*$2)[0] != '\'') + log_error("Value conversion failed: `%s%s'\n", $1->c_str(), $2->c_str()); + delete $1; + delete $2; + } | TOK_CONST { $$ = const2ast(*$1, case_type_stack.size() == 0 ? 0 : case_type_stack.back()); if ($$ == NULL) |