From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Leake Newsgroups: gmane.emacs.devel Subject: Re: access to parser stack in SMIE Date: Mon, 08 Oct 2012 23:29:30 -0400 Message-ID: <85txu4iaqt.fsf@member.fsf.org> References: <85pq4wgrho.fsf@member.fsf.org> <85lifjfn10.fsf@member.fsf.org> <85wqz1dg7k.fsf@member.fsf.org> <857gr1da6d.fsf@member.fsf.org> <85vcek1sgm.fsf@member.fsf.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1349753677 24747 80.91.229.3 (9 Oct 2012 03:34:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Oct 2012 03:34:37 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 09 05:34:44 2012 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 1TLQag-0008Kr-Lo for ged-emacs-devel@m.gmane.org; Tue, 09 Oct 2012 05:34:42 +0200 Original-Received: from localhost ([::1]:55257 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQaa-0004l3-Bf for ged-emacs-devel@m.gmane.org; Mon, 08 Oct 2012 23:34:36 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQaY-0004ke-5T for emacs-devel@gnu.org; Mon, 08 Oct 2012 23:34:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TLQaX-0002Tb-7O for emacs-devel@gnu.org; Mon, 08 Oct 2012 23:34:34 -0400 Original-Received: from qmta03.westchester.pa.mail.comcast.net ([76.96.62.32]:55613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TLQaX-0002TM-37 for emacs-devel@gnu.org; Mon, 08 Oct 2012 23:34:33 -0400 Original-Received: from omta04.westchester.pa.mail.comcast.net ([76.96.62.35]) by qmta03.westchester.pa.mail.comcast.net with comcast id 8eeT1k00B0ldTLk53rac1X; Tue, 09 Oct 2012 03:34:36 +0000 Original-Received: from TAKVER ([69.140.67.196]) by omta04.westchester.pa.mail.comcast.net with comcast id 8rVM1k00S4E4Fsd3QrVMSs; Tue, 09 Oct 2012 03:29:22 +0000 In-Reply-To: (Stefan Monnier's message of "Mon, 08 Oct 2012 22:26:11 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (windows-nt) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 76.96.62.32 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:154252 Archived-At: Stefan Monnier writes: >> I'll still play with semantic; there are front-end tools like code >> completion and function call template that rely on it. But it's less >> urgent. > > Semantic support would be really neat, yes. > [ Hopefully, at some point SMIE and Semantic will get closer, to the > point where a given language mode doesn't need to give 2 different > specifications of the language. ] You could write a translator from the bison BNF format to the current SMIE BNF format, that should not be too hard. But I suspect that the subset of the language represented in the BNF will be different for the two; the tools that semantic supports (_not_ indentation) require different things. Detailed lists of parameter names (for function template/code completion), for one, which SMIE does not need. I'll know more after I finish this current Ada mode project. Neither set of tools wants a _complete_ BNF. Automating a BNF filter to extract just the right subset for each tool would be a really neat feat (and probably pass the Turing test :). -- -- Stephe