aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/prj-pp.ads
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gnat.com>2002-03-28 16:21:33 +0100
committerGeert Bosch <bosch@gcc.gnu.org>2002-03-28 16:21:33 +0100
commit792c4e744099b705a889e0676b8f1f71fb467343 (patch)
tree795001cac0dd5309101e64ddc941a039f470b144 /gcc/ada/prj-pp.ads
parent915e8bada343b9357346af3bfb3308f8edecfa2b (diff)
downloadgcc-792c4e744099b705a889e0676b8f1f71fb467343.zip
gcc-792c4e744099b705a889e0676b8f1f71fb467343.tar.gz
gcc-792c4e744099b705a889e0676b8f1f71fb467343.tar.bz2
prj-pp.adb: New file.
* prj-pp.adb : New file. * prj-pp.ads : New file. From-SVN: r51512
Diffstat (limited to 'gcc/ada/prj-pp.ads')
-rw-r--r--gcc/ada/prj-pp.ads80
1 files changed, 80 insertions, 0 deletions
diff --git a/gcc/ada/prj-pp.ads b/gcc/ada/prj-pp.ads
new file mode 100644
index 0000000..b70ff47
--- /dev/null
+++ b/gcc/ada/prj-pp.ads
@@ -0,0 +1,80 @@
+------------------------------------------------------------------------------
+-- --
+-- GNAT COMPILER COMPONENTS --
+-- --
+-- P R J . P P --
+-- --
+-- S p e c --
+-- --
+-- $Revision$
+-- --
+-- Copyright (C) 2001 Free Software Foundation, Inc. --
+-- --
+-- GNAT is free software; you can redistribute it and/or modify it under --
+-- terms of the GNU General Public License as published by the Free Soft- --
+-- ware Foundation; either version 2, or (at your option) any later ver- --
+-- sion. GNAT is distributed in the hope that it will be useful, but WITH- --
+-- OUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY --
+-- or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License --
+-- for more details. You should have received a copy of the GNU General --
+-- Public License distributed with GNAT; see file COPYING. If not, write --
+-- to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, --
+-- MA 02111-1307, USA. --
+-- --
+-- GNAT was originally developed by the GNAT team at New York University. --
+-- It is now maintained by Ada Core Technologies Inc (http://www.gnat.com). --
+-- --
+------------------------------------------------------------------------------
+--
+-- This package is the Project File Pretty Printer.
+-- It is used to output a project file from a project file tree.
+-- It is used by gnatname to update or create project files.
+-- It is also used GLIDE2 to display project file trees.
+-- It can also be used for debugging purposes for tools that create project
+-- file trees.
+
+with Prj.Tree;
+
+package Prj.PP is
+
+ -- The following access to procedure types are used
+ -- to redirect output when calling Pretty_Print.
+
+ type Write_Char_Ap is access procedure (C : Character);
+
+ type Write_Eol_Ap is access procedure;
+
+ type Write_Str_Ap is access procedure (S : String);
+
+ procedure Pretty_Print
+ (Project : Prj.Tree.Project_Node_Id;
+ Increment : Positive := 3;
+ Eliminate_Empty_Case_Constructions : Boolean := False;
+ Minimize_Empty_Lines : Boolean := False;
+ W_Char : Write_Char_Ap := null;
+ W_Eol : Write_Eol_Ap := null;
+ W_Str : Write_Str_Ap := null);
+ -- Output a project file, using either the default output
+ -- routines, or the ones specified by W_Char, W_Eol and W_Str.
+ --
+ -- Increment is the number of spaces for each indentation level.
+ --
+ -- W_Char, W_Eol and W_Str can be used to change the default output
+ -- procedures. The default values force the output to Standard_Output.
+ --
+ -- If Eliminate_Empty_Case_Constructions is True, then case constructions
+ -- and case items that do not include any declarations will not be output.
+ --
+ -- If Minimize_Empty_Lines is True, empty lines will be output only
+ -- after the last with clause, after the line declaring the project name,
+ -- after the last declarative item of the project and before each
+ -- package declaration. Otherwise, more empty lines are output.
+
+private
+
+ procedure Output_Statistics;
+ -- This procedure can be used after one or more calls to Pretty_Print
+ -- to display what Project_Node_Kinds have not been exercised by the
+ -- call(s) to Pretty_Print. It is used only for testing purposes.
+
+end Prj.PP;