forked from github/verilator
Add cleaner error on version control conflicts in sources.
This commit is contained in:
parent
83a1bd0675
commit
f514049c04
2
Changes
2
Changes
@ -18,6 +18,8 @@ The contributors that suggested a given feature are shown in []. Thanks!
|
||||
|
||||
**** Add error when `resetall inside module (IEEE 2017-22.3).
|
||||
|
||||
**** Add cleaner error on version control conflicts in sources.
|
||||
|
||||
**** Fix little endian cell ranges, bug1631. [Julien Margetts]
|
||||
|
||||
|
||||
|
@ -958,6 +958,11 @@ vnum {vnum1}|{vnum2}|{vnum3}|{vnum4}|{vnum5}
|
||||
"`verilator_config" { FL_FWD; BEGIN VLT; FL_BRK; }
|
||||
"`verilog" { FL_FWD; BEGIN PARSEP->lastVerilogState(); FL_BRK; }
|
||||
|
||||
/* Errors */
|
||||
"<<<<<<<"[^\n\r]* { FL_FWD; yyerrorf("version control conflict marker in file"); FL_BRK; }
|
||||
"======="[^\n\r]* { FL_FWD; yyerrorf("version control conflict marker in file"); FL_BRK; }
|
||||
">>>>>>>"[^\n\r]* { FL_FWD; yyerrorf("version control conflict marker in file"); FL_BRK; }
|
||||
|
||||
/* If add to this list also add to V3LanguageWords.h */
|
||||
}
|
||||
|
||||
|
10
test_regress/t/t_lint_vcmarker_bad.out
Normal file
10
test_regress/t/t_lint_vcmarker_bad.out
Normal file
@ -0,0 +1,10 @@
|
||||
%Error: t/t_lint_vcmarker_bad.v:8: version control conflict marker in file
|
||||
<<<<<<< HEAD
|
||||
^~~~~~~~~~~~~~~
|
||||
%Error: t/t_lint_vcmarker_bad.v:10: version control conflict marker in file
|
||||
=======
|
||||
^~~~~~~~~~~
|
||||
%Error: t/t_lint_vcmarker_bad.v:12: version control conflict marker in file
|
||||
>>>>>>> MERGE
|
||||
^~~~~~~~~~~~~~~~
|
||||
%Error: Exiting due to
|
18
test_regress/t/t_lint_vcmarker_bad.pl
Executable file
18
test_regress/t/t_lint_vcmarker_bad.pl
Executable file
@ -0,0 +1,18 @@
|
||||
#!/usr/bin/perl
|
||||
if (!$::Driver) { use FindBin; exec("$FindBin::Bin/bootstrap.pl", @ARGV, $0); die; }
|
||||
# DESCRIPTION: Verilator: Verilog Test driver/expect definition
|
||||
#
|
||||
# Copyright 2003-2009 by Wilson Snyder. This program is free software; you can
|
||||
# redistribute it and/or modify it under the terms of either the GNU
|
||||
# Lesser General Public License Version 3 or the Perl Artistic License
|
||||
# Version 2.0.
|
||||
|
||||
scenarios(vlt => 1);
|
||||
|
||||
lint(
|
||||
fails => 1,
|
||||
expect_filename => $Self->{golden_filename},
|
||||
);
|
||||
|
||||
ok(1);
|
||||
1;
|
14
test_regress/t/t_lint_vcmarker_bad.v
Normal file
14
test_regress/t/t_lint_vcmarker_bad.v
Normal file
@ -0,0 +1,14 @@
|
||||
// DESCRIPTION: Verilator: Verilog Test module
|
||||
//
|
||||
// This file ONLY is placed into the Public Domain, for any use,
|
||||
// without warranty, 2019 by Wilson Snyder.
|
||||
|
||||
module t (/*AUTOARG*/);
|
||||
|
||||
<<<<<<< HEAD // Intentional test: This conflict marker should be here
|
||||
initial $display("Hello");
|
||||
======= // Intentional test: This conflict marker should be here
|
||||
initial $display("Goodbye");
|
||||
>>>>>>> MERGE // Intentional test: This conflict marker should be here
|
||||
|
||||
endmodule
|
Loading…
Reference in New Issue
Block a user