From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Evgeniy Dushistov Newsgroups: gmane.emacs.devel,gmane.emacs.cedet Subject: Re: IDE Date: Fri, 23 Oct 2015 18:51:01 +0300 Message-ID: <20151023155101.GA5071@whiterain> References: <83wpum3ozk.fsf@gnu.org> <87si59ln6u.fsf@isaac.fritz.box> <56224B63.3010803@yandex.ru> <562592ED.1070104@siege-engine.com> <56262577.70107@yandex.ru> <562702C2.6070505@gmail.com> <56276ECE.3090508@yandex.ru> <56281747.9050305@gmail.com> <20151023113318.GA14031@whiterain> <87twphhbxx.fsf@isaac.fritz.box> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1445615519 32122 80.91.229.3 (23 Oct 2015 15:51:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2015 15:51:59 +0000 (UTC) Cc: John Wiegley , Eric Ludlam , Dmitry Gutov , emacs-devel@gnu.org, Eric Ludlam , cedet-devel@lists.sourceforge.net To: David Engster Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 23 17:51:46 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Zpecl-0008DP-Nf for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 17:51:23 +0200 Original-Received: from localhost ([::1]:39494 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpecl-0005f1-7z for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 11:51:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34500) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpecg-0005eZ-QR for emacs-devel@gnu.org; Fri, 23 Oct 2015 11:51:19 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zpecc-0008SO-KE for emacs-devel@gnu.org; Fri, 23 Oct 2015 11:51:18 -0400 Original-Received: from smtp4.mail.ru ([94.100.179.57]:46897) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpecc-0008R6-4d for emacs-devel@gnu.org; Fri, 23 Oct 2015 11:51:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=IuxlLI2upizLfrDu5TivMevU7CajdY+2Dmu7Cwb6kP0=; b=q3PfOxgpxBhTjLiIeKadI7vNSZW6seFu3Kg+e6mi47D5TJxvE8me9exkeZ19jTTAI9xqMJICt2D/8nBPFecz9D0x7R41zjAAaUMqRMR2vvbNlLCEUCc1YAf/kzVt2N5KPvVCPc7G+MdRwV21pLbkurWYhGIsHK95+6K/jySHrxU=; Original-Received: from [89.23.194.117] (port=54490 helo=whiterain) by smtp4.mail.ru with esmtpa (envelope-from ) id 1ZpecZ-0004Ue-UX; Fri, 23 Oct 2015 18:51:12 +0300 Content-Disposition: inline In-Reply-To: <87twphhbxx.fsf@isaac.fritz.box> User-Agent: Mutt/1.5.24 (2015-08-30) X-Mras: Ok X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 94.100.179.57 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:192500 gmane.emacs.cedet:7280 Archived-At: On Fri, Oct 23, 2015 at 04:55:06PM +0200, David Engster wrote: > Evgeniy Dushistov writes: > > On Wed, Oct 21, 2015 at 06:52:55PM -0400, Eric Ludlam wrote: > >> > >> Semantic doesn't demand it's parsers be in wisent, or even in Emacs at all. > >> If you have a nice Ruby grammar in Ruby, and you can convert it's internal > >> data into lisp-like syntax, pulling it into the Semantic system is pretty > >> easy. What you would loose is dynamic reparsing without having to save, > >> thus it may be a bit quirky. > >> > > > > Is any documentation about this: > > - format of data that Semantic understand > > See chapter 1 in the Semantic AppDev manual: > > http://www.randomsample.de/cedetdocs/semantic-appdev/ > Thanks, I used 'info semantic' and have no idea that there is also semantic-appdev > > So I think it would be good integrate > > rtags(https://github.com/Andersbakken/rtags) (or some another existing > > daemon) for such complex language as c++ and cedet. > > AFAIK, rtags solely uses libclang, which does not give you direct access > to the AST, so I wouldn't know how rtags could be used to export the > semantic tags of the current buffer. You could hook rtags into Semantic > purely for the end-user features, like completion/references. > > This is also why I will use libtooling for C++, which lets you walk the > AST. Why do you think that libclang not give access to AST? I used it from python like this: def callexpr_visitor(node, parent, parser): # your code here for c in node.get_children(): callexpr_visitor(c, node, parser) return 2 # means continue visiting recursively tu = TranslationUnit.from_source(fname, args) callexpr_visitor(tu.cursor, None, parser) and callexpr_visitor visit each node in AST. Because of clang's python API just part of C/C++ API, then it should be possible in rtags to have access to AST. -- /Evgeniy