aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2016-02-17 21:38:17 +0100
committerTristan Gingold <tgingold@free.fr>2016-02-17 21:39:26 +0100
commitd080e03a0b3ae146408f9d35d8e24ded17dca045 (patch)
tree236a889b5d21b99ae8a3de1ed8810d283d364f72 /src
parent01e01e6748e0e7e0991942ef9805fe9b50af2fec (diff)
downloadghdl-d080e03a0b3ae146408f9d35d8e24ded17dca045.tar.gz
ghdl-d080e03a0b3ae146408f9d35d8e24ded17dca045.tar.bz2
ghdl-d080e03a0b3ae146408f9d35d8e24ded17dca045.zip
parse: avoid weird error message for end protected.
Diffstat (limited to 'src')
-rw-r--r--src/vhdl/parse.adb9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index 012a54264..0dd10d9d4 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -2139,7 +2139,14 @@ package body Parse is
Parse_Declarative_Part (Res);
Expect (Tok_End);
- Scan_Expect (Tok_Protected);
+ -- Eat 'end'.
+ Scan;
+ if Flags.Vhdl_Std >= Vhdl_00 then
+ Expect (Tok_Protected);
+ else
+ -- Avoid weird message: 'protected' expected instead of 'protected'.
+ Expect (Tok_Identifier);
+ end if;
Set_End_Has_Reserved_Id (Res, True);
if Get_Kind (Res) = Iir_Kind_Protected_Type_Body then
Scan_Expect (Tok_Body);