3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-17 19:36:18 +00:00

More fixes for bugs found using xsthammer

This commit is contained in:
Clifford Wolf 2013-06-13 11:18:45 +02:00
parent b1d39aa865
commit 0c6ffc4c65
5 changed files with 24 additions and 16 deletions

View file

@ -113,9 +113,9 @@ static void free_attr(std::map<std::string, AstNode*> *al)
// operator precedence from low to high
%left OP_LOR
%left OP_LAND
%left '|'
%left '|' OP_NOR
%left '^' OP_XNOR
%left '&'
%left '&' OP_NAND
%left OP_EQ OP_NE
%left '<' OP_LE OP_GE '>'
%left OP_SHL OP_SHR OP_SSHL OP_SSHR
@ -982,10 +982,20 @@ basic_expr:
$$ = new AstNode(AST_REDUCE_AND, $3);
append_attr($$, $2);
} |
OP_NAND attr basic_expr %prec UNARY_OPS {
$$ = new AstNode(AST_REDUCE_AND, $3);
append_attr($$, $2);
$$ = new AstNode(AST_LOGIC_NOT, $$);
} |
'|' attr basic_expr %prec UNARY_OPS {
$$ = new AstNode(AST_REDUCE_OR, $3);
append_attr($$, $2);
} |
OP_NOR attr basic_expr %prec UNARY_OPS {
$$ = new AstNode(AST_REDUCE_OR, $3);
append_attr($$, $2);
$$ = new AstNode(AST_LOGIC_NOT, $$);
} |
'^' attr basic_expr %prec UNARY_OPS {
$$ = new AstNode(AST_REDUCE_XOR, $3);
append_attr($$, $2);