mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 13:18:56 +00:00
Rename the generic "Syntax error" message from the Verilog/SystemVerilog parser into unique,
meaningful info on the error. Also add 13 compilation examples that triggers each of these messages.
This commit is contained in:
parent
11c8a9eb96
commit
536ae16c3a
14 changed files with 78 additions and 14 deletions
4
tests/errors/syntax_err01.v
Normal file
4
tests/errors/syntax_err01.v
Normal file
|
@ -0,0 +1,4 @@
|
|||
module a;
|
||||
integer [31:0]w;
|
||||
endmodule
|
||||
|
7
tests/errors/syntax_err02.v
Normal file
7
tests/errors/syntax_err02.v
Normal file
|
@ -0,0 +1,7 @@
|
|||
module a;
|
||||
task to (
|
||||
input integer [3:0]x
|
||||
);
|
||||
endtask
|
||||
endmodule
|
||||
|
7
tests/errors/syntax_err03.v
Normal file
7
tests/errors/syntax_err03.v
Normal file
|
@ -0,0 +1,7 @@
|
|||
module a;
|
||||
task to (
|
||||
input [3]x
|
||||
);
|
||||
endtask
|
||||
endmodule
|
||||
|
4
tests/errors/syntax_err04.v
Normal file
4
tests/errors/syntax_err04.v
Normal file
|
@ -0,0 +1,4 @@
|
|||
module a;
|
||||
wire [3]x;
|
||||
endmodule
|
||||
|
4
tests/errors/syntax_err05.v
Normal file
4
tests/errors/syntax_err05.v
Normal file
|
@ -0,0 +1,4 @@
|
|||
module a;
|
||||
input x[2:0];
|
||||
endmodule
|
||||
|
6
tests/errors/syntax_err06.v
Normal file
6
tests/errors/syntax_err06.v
Normal file
|
@ -0,0 +1,6 @@
|
|||
module a;
|
||||
initial
|
||||
begin : label1
|
||||
end: label2
|
||||
endmodule
|
||||
|
6
tests/errors/syntax_err07.v
Normal file
6
tests/errors/syntax_err07.v
Normal file
|
@ -0,0 +1,6 @@
|
|||
module a;
|
||||
wire [5:0]x;
|
||||
wire [3:0]y;
|
||||
assign y = (4)55;
|
||||
endmodule
|
||||
|
6
tests/errors/syntax_err08.v
Normal file
6
tests/errors/syntax_err08.v
Normal file
|
@ -0,0 +1,6 @@
|
|||
module a;
|
||||
wire [5:0]x;
|
||||
wire [3:0]y;
|
||||
assign y = x 55;
|
||||
endmodule
|
||||
|
3
tests/errors/syntax_err09.v
Normal file
3
tests/errors/syntax_err09.v
Normal file
|
@ -0,0 +1,3 @@
|
|||
module a(input wire x = 1'b0);
|
||||
endmodule
|
||||
|
3
tests/errors/syntax_err10.v
Normal file
3
tests/errors/syntax_err10.v
Normal file
|
@ -0,0 +1,3 @@
|
|||
module a;
|
||||
parameter integer [2:0]x=0;
|
||||
endmodule
|
3
tests/errors/syntax_err11.v
Normal file
3
tests/errors/syntax_err11.v
Normal file
|
@ -0,0 +1,3 @@
|
|||
module a;
|
||||
parameter integer real x=0;
|
||||
endmodule
|
7
tests/errors/syntax_err12.v
Normal file
7
tests/errors/syntax_err12.v
Normal file
|
@ -0,0 +1,7 @@
|
|||
interface iface;
|
||||
endinterface
|
||||
|
||||
module a (
|
||||
iface x = 1'b0
|
||||
);
|
||||
endmodule
|
4
tests/errors/syntax_err13.v
Normal file
4
tests/errors/syntax_err13.v
Normal file
|
@ -0,0 +1,4 @@
|
|||
module a #(p = 0)
|
||||
();
|
||||
endmodule
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue