Commit 3df128dd authored by julien.delange's avatar julien.delange
Browse files

fix parsing errors with mast



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/ocarina@1356 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent 0997dedb
...@@ -273,6 +273,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -273,6 +273,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write (Tok_Avg_ISR_Switch); Write (Tok_Avg_ISR_Switch);
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space;
if Avg_ISR_Switch (N) /= No_Node then if Avg_ISR_Switch (N) /= No_Node then
Generate (Avg_ISR_Switch (N)); Generate (Avg_ISR_Switch (N));
else else
...@@ -284,6 +285,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -284,6 +285,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write (Tok_Best_ISR_Switch); Write (Tok_Best_ISR_Switch);
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space;
if Best_ISR_Switch (N) /= No_Node then if Best_ISR_Switch (N) /= No_Node then
Generate (Best_ISR_Switch (N)); Generate (Best_ISR_Switch (N));
else else
...@@ -295,16 +297,15 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -295,16 +297,15 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write (Tok_Worst_ISR_Switch); Write (Tok_Worst_ISR_Switch);
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space;
if Worst_ISR_Switch (N) /= No_Node then if Worst_ISR_Switch (N) /= No_Node then
Generate (Worst_ISR_Switch (N)); Generate (Worst_ISR_Switch (N));
else else
Write_Str ("0.00"); Write_Str ("0.00");
end if; end if;
Write_Line (Tok_Colon);
Decrement_Indentation;
Write_Indentation (-1);
Write_Line (");"); Write_Line (");");
Decrement_Indentation;
end Generate_Processing_Resource; end Generate_Processing_Resource;
-------------------------------- --------------------------------
...@@ -370,19 +371,25 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -370,19 +371,25 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write_Line ("Type => Periodic,"); Write_Line ("Type => Periodic,");
end if; end if;
if not Is_Empty (External_Events (N))then Write_Indentation (-1);
Write_Str ("Name => ");
Write_Name (Node_Name (N));
Write (Tok_Colon);
if not Is_Empty (External_Events (N))then
Write_Eol;
Write_Indentation (-1); Write_Indentation (-1);
Write (Tok_External_Events); Write (Tok_External_Events);
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space; Write_Space;
Write_Line (Tok_Left_Paren); Write (Tok_Left_Paren);
Write_Eol;
Increment_Indentation; Increment_Indentation;
Write_Indentation (-1);
F := First_Node (External_Events (N)); F := First_Node (External_Events (N));
while Present (F) loop while Present (F) loop
Write_Indentation (-1);
Generate (F); Generate (F);
if Present (Next_Node (F)) then if Present (Next_Node (F)) then
Write_Eol; Write_Eol;
...@@ -402,12 +409,13 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -402,12 +409,13 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space; Write_Space;
Write_Line (Tok_Left_Paren); Write_Eol;
Write_Indentation (-1);
Write (Tok_Left_Paren);
Increment_Indentation; Increment_Indentation;
F := First_Node (Internal_Events (N)); F := First_Node (Internal_Events (N));
while Present (F) loop while Present (F) loop
Write_Indentation (-1);
Generate (F); Generate (F);
if Present (Next_Node (F)) then if Present (Next_Node (F)) then
Write_Eol; Write_Eol;
...@@ -438,17 +446,11 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -438,17 +446,11 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write_Eol; Write_Eol;
else else
Write (Tok_Right_Paren); Write (Tok_Right_Paren);
Write_Line (Tok_Colon);
end if; end if;
F := Next_Node (F); F := Next_Node (F);
end loop; end loop;
Decrement_Indentation; Decrement_Indentation;
end if; end if;
Write_Indentation (-1);
Write_Str ("Name => ");
Write_Name (Node_Name (N));
Write_Line (");"); Write_Line (");");
end Generate_Transaction; end Generate_Transaction;
...@@ -472,17 +474,26 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -472,17 +474,26 @@ package body Ocarina.Backends.MAST_Tree.Generator is
end if; end if;
Write_Line (Tok_Colon); Write_Line (Tok_Colon);
Write_Indentation (-1);
Write (Tok_Name);
Write_Space;
Write (Tok_Assign);
Write_Space;
Write_Name (Node_Name (N));
Write (Tok_Colon);
if MTN.Period (N) /= No_Node then if MTN.Period (N) /= No_Node then
Write_Eol;
Write_Indentation (-1); Write_Indentation (-1);
Write (Tok_Period); Write (Tok_Period);
Write_Space; Write_Space;
Write (Tok_Assign); Write (Tok_Assign);
Write_Space; Write_Space;
Generate (Period (N)); Generate (Period (N));
Write_Line (Tok_Colon);
end if; end if;
if Timing_Requirements (N) /= No_Node then if Timing_Requirements (N) /= No_Node then
Write_Eol;
Write_Indentation (-1); Write_Indentation (-1);
Write (Tok_Timing_Requirements); Write (Tok_Timing_Requirements);
Write_Space; Write_Space;
...@@ -493,16 +504,8 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -493,16 +504,8 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write (Tok_Left_Paren); Write (Tok_Left_Paren);
Generate (Timing_Requirements (N)); Generate (Timing_Requirements (N));
Write (Tok_Right_Paren); Write (Tok_Right_Paren);
Write_Line (Tok_Colon);
Decrement_Indentation; Decrement_Indentation;
end if; end if;
Write_Indentation (-1);
Write (Tok_Name);
Write_Space;
Write (Tok_Assign);
Write_Space;
Write_Name (Node_Name (N));
Write (Tok_Right_Paren); Write (Tok_Right_Paren);
end Generate_Event; end Generate_Event;
...@@ -611,6 +614,10 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -611,6 +614,10 @@ package body Ocarina.Backends.MAST_Tree.Generator is
Write_Line ("Type => Enclosing,"); Write_Line ("Type => Enclosing,");
end if; end if;
Write_Indentation (-1);
Write_Str ("Name => ");
Write_Name (Node_Name (N));
if Worst_Case_Execution_Time (N) /= No_Node then if Worst_Case_Execution_Time (N) /= No_Node then
Write_Indentation (-1); Write_Indentation (-1);
Write (Tok_Worst_Case_Execution_Time); Write (Tok_Worst_Case_Execution_Time);
...@@ -648,6 +655,8 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -648,6 +655,8 @@ package body Ocarina.Backends.MAST_Tree.Generator is
end if; end if;
if not Is_Empty (Operations (N)) then if not Is_Empty (Operations (N)) then
Write (Tok_Colon);
Write_Eol;
Write_Indentation (-1); Write_Indentation (-1);
Write (Tok_Composite_Operation_List); Write (Tok_Composite_Operation_List);
Write_Space; Write_Space;
...@@ -665,14 +674,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is ...@@ -665,14 +674,7 @@ package body Ocarina.Backends.MAST_Tree.Generator is
end loop; end loop;
Write (Tok_Right_Paren); Write (Tok_Right_Paren);
Write (Tok_Colon);
Write_Eol;
end if; end if;
Write_Indentation (-1);
Write_Str ("Name => ");
Write_Name (Node_Name (N));
Write_Line (");"); Write_Line (");");
end Generate_Operation; end Generate_Operation;
......
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