Commit 6fc9fae2 authored by Maxime Perrotin's avatar Maxime Perrotin

Minor cleanup

parent 920c8759
......@@ -8,7 +8,7 @@ all: build
build:
if [ -d "templates-parser" ]; then cd templates-parser && git pull; else git clone https://github.com/AdaCore/templates-parser; fi
make -C templates-parser -j
-- make -C templates-parser -j
ifeq ($(UNAME), Linux)
@echo "package TASTE.Parser_Version is" > src/taste-parser_version.ads.new
@echo " Parser_Release : constant String :=" >> src/taste-parser_version.ads.new
......@@ -35,7 +35,7 @@ ifeq ($(UNAME), Linux)
fi
endif
@#[ $(ARCH) == 64 ] && EXTRAFLAG="--target=x86_64-linux" ;
ADA_PROJECT_PATH=templates-parser/:${ADA_PROJECT_PATH} OCARINA_PATH=`ocarina-config --prefix` \
OCARINA_PATH=`ocarina-config --prefix` \
$(gnatpath)gprbuild -j0 -x -g $(exec) -p -P aadl_parser.gpr -XBUILD="debug" $$EXTRAFLAG
install:
......
......@@ -21,14 +21,13 @@ project AADL_Parser is
package Compiler is
for Default_Switches ("Ada") use
("-g",
"-Ada2012",
"-gnatf",
"-gnaty",
"-gnatwa",
"-gnatoa",
"-gnatg",
"-fstack-check",
"-no-pie");
"-fstack-check");
-- "-no-pie");
end Compiler;
end AADL_Parser;
......
......@@ -238,6 +238,7 @@ package body TASTE.Deployment_View is
end if;
for Index in ST'Range loop
Get_Name_String (ST (Index));
pragma Assert (Name_Len >= 1 and then Name_Len <= 16384);
if Tail (Source => Name_Buffer (1 .. Name_Len),
Count => 4) = ".asn"
then
......
......@@ -616,7 +616,10 @@ package body TASTE.Interface_View is
-- Recursive parsing of a system made of nested functions (TASTE v2)
function Rec_Function (Prefix : String := "";
Context : String := "_Root";
Func : Node_Id) return Boolean is
Func : Node_Id) return Boolean
with Pre => Prefix'Length <= Integer'Last - 1
is
Inner : Node_Id;
Is_Terminal : Boolean := True;
CI : constant Node_Id := Corresponding_Instance (Func);
......
......@@ -57,7 +57,8 @@ package body TASTE.Parser_Utils is
end Strip_String;
procedure Parse_Command_Line (Result : out Taste_Configuration) is
Config : Command_Line_Configuration;
Config : Command_Line_Configuration;
Version : aliased Boolean := False;
use String_Holders;
IV, DeplV, DataV, OutDir : aliased GNAT.Strings.String_Access := null;
......@@ -108,7 +109,7 @@ package body TASTE.Parser_Utils is
Switch => "-g",
Long_Switch => "--debug",
Help => "Set debug mode");
Define_Switch (Config, Output => Result.Version'Access,
Define_Switch (Config, Output => Version'Access,
Switch => "-v",
Long_Switch => "--version",
Help => "Display tool version");
......@@ -141,7 +142,7 @@ package body TASTE.Parser_Utils is
then To_Holder (OutDir.all)
else To_Holder ("."));
if Result.Version then
if Version then
raise Exit_From_Command_Line;
end if;
......@@ -170,7 +171,6 @@ package body TASTE.Parser_Utils is
& Assoc ("Glue", Config.Glue)
& Assoc ("Use_POHIC", Config.Use_POHIC)
& Assoc ("Debug_Flag", Config.Debug_Flag)
& Assoc ("Version", Config.Version)
& Assoc ("Timer_Resolution", Config.Timer_Resolution);
for Each of Config.Other_Files loop
Vec := Vec & Each;
......
......@@ -134,18 +134,17 @@ package TASTE.Parser_Utils is
Deployment_View : String_Holder;
Data_View : String_Holder;
Output_Dir : String_Holder;
-- aliased GNAT.Strings.String_Access;
Check_Data_View : aliased Boolean := False;
Skeletons : aliased Boolean := True;
Glue : aliased Boolean := False;
Use_POHIC : aliased Boolean := False;
Timer_Resolution : aliased Integer := 100;
Debug_Flag : aliased Boolean := False;
Version : aliased Boolean := False;
Other_Files : String_Vectors.Vector;
end record;
procedure Debug_Dump (Config : Taste_Configuration; Output : File_Type);
procedure Debug_Dump (Config : Taste_Configuration;
Output : File_Type);
procedure Parse_Command_Line (Result : out Taste_Configuration);
-- Define a vector for template_parser translate sets
......
......@@ -11,7 +11,6 @@
|Generate skeletons : @_YES_NO:Skeletons_@
|Generate glue : @_YES_NO:Glue_@
|Debug mode : @_YES_NO:Debug_Flag_@
|Request Version : @_YES_NO:Version_@
|Timer resolution : @_Timer_Resolution_@
|Use PolyORB-HI-C : @_YES_NO:Use_POHIC_@
|
......
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