diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 08:17:50 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-10-29 08:17:50 +0000 |
commit | 060c84227e7faf3c4eb8fd831cba23a0829c077c (patch) | |
tree | 3caa525faf8065b32a7532321edc6d4d68e5c6ac /gcc/ada/pprint.ads | |
parent | 1efb1df046de1cd0fca45f0f1750503380ebb59d (diff) | |
download | gcc-060c84227e7faf3c4eb8fd831cba23a0829c077c.tar.gz |
* pprint.ads, pprint.adb: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192909 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/pprint.ads')
-rw-r--r-- | gcc/ada/pprint.ads | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/gcc/ada/pprint.ads b/gcc/ada/pprint.ads new file mode 100644 index 00000000000..8fc1036b1e4 --- /dev/null +++ b/gcc/ada/pprint.ads @@ -0,0 +1,60 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT COMPILER COMPONENTS -- +-- -- +-- P P R I N T -- +-- -- +-- S p e c -- +-- -- +-- Copyright (C) 2008-2012, 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 3, 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 COPYING3. If not, go to -- +-- http://www.gnu.org/licenses for a complete copy of the license. -- +-- -- +-- GNAT was originally developed by the GNAT team at New York University. -- +-- Extensive contributions were provided by Ada Core Technologies Inc. -- +-- -- +------------------------------------------------------------------------------ + +-- This package (pretty print) contains a routine for printing an expression +-- given its node in the syntax tree. Contrarily to the Sprint package, this +-- routine tries to obtain "pretty" output that can be used for e.g. error +-- messages. + +with Types; use Types; +with Urealp; use Urealp; + +package Pprint is + + generic + + -- ??? The generic parameters should be removed. + + with function Real_Image (U : Ureal) return String; + with function String_Image (S : String_Id) return String; + with function Ident_Image (Expr : Node_Id; + Orig_Expr : Node_Id; + Expand_Type : Boolean) + return String; + -- Will be called for printing N_Identifier and N_Defining_Identifier + -- nodes + -- ??? Expand_Type argument should be removed + + function Expression_Image (Expr : Node_Id; + Default : String) + return String; + -- Given a Node for an expression, return a String that is meaningful for + -- the programmer. If the expression comes from source, it is copied from + -- there. + -- Subexpressions outside of the maximum depth (3), the maximal number of + -- accepted nodes (24), and the maximal number of list elements (3), are + -- replaced by the default string. + +end Pprint; |