aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-10-18 06:09:34 +0200
committerTristan Gingold <tgingold@free.fr>2017-10-18 06:09:34 +0200
commit95571911c3eaa33433b9e31013dfa697175713ce (patch)
treeacccbdf82d93a61dea37728bf8495b274f81a9df
parent715af927683530376d65524cfcc87476cbf47758 (diff)
downloadghdl-95571911c3eaa33433b9e31013dfa697175713ce.tar.gz
ghdl-95571911c3eaa33433b9e31013dfa697175713ce.tar.bz2
ghdl-95571911c3eaa33433b9e31013dfa697175713ce.zip
parser: improve error message on extra ';'.
-rw-r--r--src/vhdl/parse.adb10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/vhdl/parse.adb b/src/vhdl/parse.adb
index d624a4563..a046c10aa 100644
--- a/src/vhdl/parse.adb
+++ b/src/vhdl/parse.adb
@@ -6589,6 +6589,14 @@ package body Parse is
when Tok_Wait =>
Stmt := Parse_Wait_Statement;
+
+ when Tok_Semi_Colon =>
+ Error_Msg_Parse ("extra ';' ignored");
+
+ -- Eat ';'
+ Scan;
+
+ goto Again;
when others =>
return First_Stmt;
end case;
@@ -6612,6 +6620,8 @@ package body Parse is
Set_Chain (Last_Stmt, Stmt);
end if;
Last_Stmt := Stmt;
+
+ <<Again>> null;
end loop;
end Parse_Sequential_Statements;