aboutsummaryrefslogtreecommitdiffstats
path: root/src/vhdl
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-23 18:20:55 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-23 18:20:55 +0200
commit038cd1c044fd7a01ae8c6ad9eef8af2eb7e33168 (patch)
tree4f3cf1273f842188df0c733cb839946b2e057243 /src/vhdl
parent87d918b21de7f83c269b8270bc648988947ff52c (diff)
downloadghdl-038cd1c044fd7a01ae8c6ad9eef8af2eb7e33168.tar.gz
ghdl-038cd1c044fd7a01ae8c6ad9eef8af2eb7e33168.tar.bz2
ghdl-038cd1c044fd7a01ae8c6ad9eef8af2eb7e33168.zip
scanner: disp a nice message for '!='.
Diffstat (limited to 'src/vhdl')
-rw-r--r--src/vhdl/scanner.adb16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/vhdl/scanner.adb b/src/vhdl/scanner.adb
index 43e33ae63..824f69d81 100644
--- a/src/vhdl/scanner.adb
+++ b/src/vhdl/scanner.adb
@@ -1601,10 +1601,18 @@ package body Scanner is
if Flag_Psl then
Current_Token := Tok_Exclam_Mark;
else
- -- LRM93 13.10
- -- A vertical line (|) can be replaced by an exclamation
- -- mark (!) where used as a delimiter.
- Current_Token := Tok_Bar;
+ if Source (Pos + 1) = '=' then
+ -- != is not allowed in VHDL, but be friendly with C users.
+ Error_Msg_Scan
+ (Get_Token_Location, "Use '/=' for inequality in vhdl");
+ Current_Token := Tok_Not_Equal;
+ Pos := Pos + 1;
+ else
+ -- LRM93 13.10
+ -- A vertical line (|) can be replaced by an exclamation
+ -- mark (!) where used as a delimiter.
+ Current_Token := Tok_Bar;
+ end if;
end if;
Pos := Pos + 1;
return;