From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1258 invoked by alias); 26 Sep 2008 14:57:40 -0000 Received: (qmail 1250 invoked by uid 22791); 26 Sep 2008 14:57:39 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-107-backup.nerim.net (HELO kraid.nerim.net) (62.4.16.107) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 26 Sep 2008 14:56:53 +0000 Received: from hector.lesours (ours.starynkevitch.net [213.41.244.95]) by kraid.nerim.net (Postfix) with ESMTP id 5A698CFB0F; Fri, 26 Sep 2008 16:56:49 +0200 (CEST) Received: from glinka.lesours ([192.168.0.1] ident=basile) by hector.lesours with esmtp (Exim 4.63) (envelope-from ) id 1KjEil-0005W1-5k; Fri, 26 Sep 2008 16:55:03 +0200 Message-ID: <48DCF82F.1000104@starynkevitch.net> Date: Fri, 26 Sep 2008 15:44:00 -0000 From: Basile STARYNKEVITCH User-Agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724) MIME-Version: 1.0 To: Arnaud Charlet CC: gcc-patches@gcc.gnu.org, Matthew Gingell Subject: Re: [libcpp] RFA: Add support for comments retrieval References: <20080926145008.GA11573@adacore.com> In-Reply-To: <20080926145008.GA11573@adacore.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2008-09/txt/msg01826.txt.bz2 Arnaud Charlet wrote: > This is a patch that adds support for easy retrieval of C/C++ comments > parsed by libcpp. > > We have another patch depending on this one that would then take advantage > of this new "cpp_get_comments" function. This other patch will add the > capability to dump GCC GENERIC trees using Ada syntax, thus providing > a way to generate Ada specs automatically from C/C++ header files. > In this context, being able to also dump the original comments from the > header files is very useful. > > I'm sure this function could then be used in other contexts (e.g. other > kind of source code analyzer/plug-ins based on GCC). I agree, but in that case I suggest adding some documentation somewhere, probably a small paragraph in some *.texi file. I am currently not able to figure out how could I use such a function, even if it interests me a lot. My previous thinking was that comments is the first thing a lexer wants to be removed! -- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basilestarynkevitchnet mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***