text
stringlengths 0
234
|
|---|
elsif End_Given and (not Duration_Given) then
|
-- Put_Line (Node ("begin") & "|" & Node ("end"));
|
return Create (Start_On => Instant_Raw (Node ("begin")),
|
End_On => Instant_Raw (Node ("end")));
|
else
|
return Create (Start_On => Instant_Raw (Node.Value ("begin")),
|
Duration => Duration_Raw (Node.Value ("duration")));
|
end if;
|
end Get_Times;
|
------------
|
-- Create --
|
------------
|
function Create
|
(Params : not null access Plugins.Parameter_Maps.Map)
|
return Parser_Type
|
is
|
pragma Unreferenced (Params);
|
Result : Parser_Type;
|
begin
|
return Result;
|
end Create;
|
procedure Parse_Deliverable (WP : EU_Projects.Nodes.Action_Nodes.WPs.Project_WP_Access;
|
Node_Seq : in out Node_Parser.Node_Scanner;
|
Node_Dir : in out Node_Tables.Node_Table)
|
with Pre => Class_Is (Node_Seq, Deliverable);
|
-----------------------
|
-- Parse_Deliverable --
|
-----------------------
|
-----------------------
|
-- Parse_Deliverable --
|
-----------------------
|
procedure Parse_Deliverable (WP : EU_Projects.Nodes.Action_Nodes.WPs.Project_WP_Access;
|
Node_Seq : in out Node_Parser.Node_Scanner;
|
Node_Dir : in out Node_Tables.Node_Table)
|
is
|
use EU_Projects.Nodes.Timed_Nodes.Deliverables;
|
Deliv_Node : Node_Type := Peek (Node_Seq);
|
This_Deliv : Deliverable_Access;
|
begin
|
Node_Images.Set_Current_Node (Deliv_Node);
|
Next (Node_Seq);
|
Check (Deliverable_Checker, Deliv_Node);
|
declare
|
use Tokenize;
|
Label : constant Deliverable_Label :=
|
Deliverable_Label'(To_ID (Deliv_Node ("label")));
|
Delivered_By : constant EU_Projects.Nodes.Node_Label_Lists.Vector :=
|
Nodes.Parse_Label_List (Deliv_Node ("tasks"));
|
Due_Times : Token_Vectors.Vector :=
|
Token_Vectors.To_Vector (Split (Deliv_Node ("when"), ';'));
|
begin
|
if Node_Dir.Contains (EU_Projects.Nodes.Node_Label (Label)) then
|
raise Parsing_Error
|
with "Duplicated label '" & Image (Label) & "' in deliverable";
|
end if;
|
This_Deliv :=
|
Create (Label => Label,
|
Name => Deliv_Node ("name"),
|
Short_Name => Deliv_Node ("short"),
|
Description => Deliv_Node.Description,
|
Delivered_By => Delivered_By,
|
Linked_Milestones => Nodes.Parse_Label_List (Deliv_Node ("milestones")),
|
Due_On => Due_Times.First_Element,
|
Node_Dir => Node_Dir,
|
Parent_WP => EU_Projects.Nodes.Node_Access (WP),
|
Deliv_Type => Deliverable_Type'Value (Deliv_Node ("type")),
|
Dissemination => Dissemination_Level'Value (Deliv_Node ("dissemination")));
|
for Idx in Due_Times.First_Index + 1 .. Due_Times.Last_Index loop
|
Clone (Item => This_Deliv.all,
|
Due_On => Due_Times (Idx),
|
Node_Dir => Node_Dir);
|
end loop;
|
WP.Add_Deliverable (This_Deliv);
|
Function Definition: procedure Test_Config_String_Parsers is
|
Function Body: function Identity (X : String) return String
|
is (X);
|
package Test_Parsers is
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.