Commit 4f2fc1b5 authored by Bechir Zalila's avatar Bechir Zalila

* (ocarina-fe_aadl-parser-namespaces.adb,

	ocarina-fe_aadl-parser_errors.ad?): Add a decent error message when
	parsing an erronous empty package
parent 1f79a566
......@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2015 ESA & ISAE. --
-- Copyright (C) 2008-2009 Telecom ParisTech, 2010-2016 ESA & ISAE. --
-- --
-- Ocarina is free software; you can redistribute it and/or modify under --
-- terms of the GNU General Public License as published by the Free Soft- --
......@@ -555,6 +555,8 @@ package body Ocarina.FE_AADL.Parser.Namespaces is
Restore_Lexer (Loc);
else
Skip_Tokens (T_Semicolon);
DPE (PC_Package_Specification, EMC_Empty_Package);
return No_Node;
end if;
end if;
......@@ -584,6 +586,8 @@ package body Ocarina.FE_AADL.Parser.Namespaces is
Skip_Tokens (T_Semicolon);
Success := False;
DPE (PC_Package_Specification, EMC_Empty_Package);
return No_Node;
end if;
else
......
......@@ -244,6 +244,9 @@ package body Ocarina.FE_AADL.Parser_Errors is
when EMC_At_Least_Three_Elements_Expected =>
return "At least 3 elements are expected";
when EMC_Empty_Package =>
return "Empty packages are not allowed";
when others =>
To_Lower (S);
for I in S'Range loop
......
......@@ -266,6 +266,7 @@ package Ocarina.FE_AADL.Parser_Errors is
EMC_No_Defining_Identifier,
EMC_Refinement_Is_Not_Allowed,
EMC_Extends_Incompatible_Entity,
EMC_Empty_Package,
EMC_Not_Allowed_In_AADL_V1,
EMC_Not_Allowed_In_AADL_V2,
EMC_Port_Group_Not_Allowed_In_AADL_V2,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment