From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Engster Newsgroups: gmane.emacs.devel,gmane.emacs.cedet Subject: Re: IDE Date: Fri, 23 Oct 2015 16:55:06 +0200 Message-ID: <87twphhbxx.fsf@isaac.fritz.box> References: <561E32D2.4060501@yandex.ru> <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> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1445612142 8165 80.91.229.3 (23 Oct 2015 14:55:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 23 Oct 2015 14:55:42 +0000 (UTC) Cc: John Wiegley , Eric Ludlam , Dmitry Gutov , emacs-devel@gnu.org, Eric Ludlam , cedet-devel@lists.sourceforge.net To: Evgeniy Dushistov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Oct 23 16:55:34 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 1Zpdkg-000720-5j for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 16:55:30 +0200 Original-Received: from localhost ([::1]:39029 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpdkf-00074N-IZ for ged-emacs-devel@m.gmane.org; Fri, 23 Oct 2015 10:55:29 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42395) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zpdkb-000738-KR for emacs-devel@gnu.org; Fri, 23 Oct 2015 10:55:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZpdkW-0004ig-3g for emacs-devel@gnu.org; Fri, 23 Oct 2015 10:55:25 -0400 Original-Received: from randomsample.de ([5.45.97.173]:45318) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZpdkV-0004hT-Qn for emacs-devel@gnu.org; Fri, 23 Oct 2015 10:55:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=randomsample.de; s=a; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:Cc:To:From; bh=8tkfYlo8SAjS4C5OIgYgBIsy0zPncXwa4R7A0VP8MvY=; b=egI/XCwDrvr6pKf7uPdp7y9JiWeL3EpfPfiTXdTND9NpY5plsffJc6i7aZyk3PXsCsj50fcTBxQIHJXDbUVU2fse8eNjiq9Zmhj7vXzw9fOcPDohL25UCaRYyowoXW4w; Original-Received: from ip4d1645ea.dynamic.kabel-deutschland.de ([77.22.69.234] helo=isaac.fritz.box) by randomsample.de with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from ) id 1ZpdkO-0005bS-8C; Fri, 23 Oct 2015 16:55:12 +0200 In-Reply-To: <20151023113318.GA14031@whiterain> (Evgeniy Dushistov's message of "Fri, 23 Oct 2015 14:33:18 +0300") User-Agent: Gnus/5.13001 (Ma Gnus v0.10) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 5.45.97.173 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:192494 gmane.emacs.cedet:7279 Archived-At: 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/ Running M-x bovinate in a C file will already give you a good impression. > - which hooks should be used to give this information to semantic, so > it can use it to colorization, completition, tags navigation etc ? Hooks are not well suited for this task, since you want to extend or override functionality depending on the current major-mode. For this, the mode-local package is used, so one should get familiar with it first. The most important functions to override are listed in the Semantic AppDev manual (see for instance chapters 7 and 12). It is also good to look into a Semantic backend for a language which you know reasonably well to see how it is done. Last not least, you can ask on cedet-devel. > 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. -David