Enable binary NAND and NOR operators with -gicarus-misc (issue #552).
These operators are an Icarus Verilog extension. Currently -gicarus-misc is enabled by default, so most users won't see a difference.
This commit is contained in:
parent
6826dbb9cb
commit
2a2fa059e2
28
parse.y
28
parse.y
|
|
@ -1,7 +1,7 @@
|
|||
|
||||
%{
|
||||
/*
|
||||
* Copyright (c) 1998-2023 Stephen Williams (steve@icarus.com)
|
||||
* Copyright (c) 1998-2024 Stephen Williams (steve@icarus.com)
|
||||
* Copyright CERN 2012-2013 / Stephen Williams (steve@icarus.com)
|
||||
*
|
||||
* This source code is free software; you can redistribute it
|
||||
|
|
@ -3548,14 +3548,28 @@ expression
|
|||
$$ = tmp;
|
||||
}
|
||||
| expression K_NAND attribute_list_opt expression
|
||||
{ PEBinary*tmp = new PEBinary('A', $1, $4);
|
||||
FILE_NAME(tmp, @2);
|
||||
$$ = tmp;
|
||||
{ if (gn_icarus_misc_flag) {
|
||||
PEBinary*tmp = new PEBinary('A', $1, $4);
|
||||
FILE_NAME(tmp, @2);
|
||||
$$ = tmp;
|
||||
} else {
|
||||
yyerror(@2, "error: The binary NAND operator "
|
||||
"is an Icarus Verilog extension. "
|
||||
"Use -gicarus-misc to enable it.");
|
||||
$$ = 0;
|
||||
}
|
||||
}
|
||||
| expression K_NOR attribute_list_opt expression
|
||||
{ PEBinary*tmp = new PEBinary('O', $1, $4);
|
||||
FILE_NAME(tmp, @2);
|
||||
$$ = tmp;
|
||||
{ if (gn_icarus_misc_flag) {
|
||||
PEBinary*tmp = new PEBinary('O', $1, $4);
|
||||
FILE_NAME(tmp, @2);
|
||||
$$ = tmp;
|
||||
} else {
|
||||
yyerror(@2, "error: The binary NOR operator "
|
||||
"is an Icarus Verilog extension. "
|
||||
"Use -gicarus-misc to enable it.");
|
||||
$$ = 0;
|
||||
}
|
||||
}
|
||||
| expression K_NXOR attribute_list_opt expression
|
||||
{ PEBinary*tmp = new PEBinary('X', $1, $4);
|
||||
|
|
|
|||
Loading…
Reference in New Issue