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: SMIE Date: Sat, 12 Jul 2014 09:38:13 -0500 Message-ID: <85zjge1w2y.fsf@stephe-leake.org> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1405175923 26642 80.91.229.3 (12 Jul 2014 14:38:43 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 12 Jul 2014 14:38:43 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jul 12 16:38:35 2014 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 1X5yRe-00077O-EF for ged-emacs-devel@m.gmane.org; Sat, 12 Jul 2014 16:38:34 +0200 Original-Received: from localhost ([::1]:49262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5yRe-0002qI-00 for ged-emacs-devel@m.gmane.org; Sat, 12 Jul 2014 10:38:34 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5yRU-0002li-W1 for emacs-devel@gnu.org; Sat, 12 Jul 2014 10:38:31 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X5yRO-00062p-OU for emacs-devel@gnu.org; Sat, 12 Jul 2014 10:38:24 -0400 Original-Received: from dnvrco-outbound-snat.email.rr.com ([107.14.73.231]:29539 helo=dnvrco-oedge-vip.email.rr.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X5yRO-00062Q-JN for emacs-devel@gnu.org; Sat, 12 Jul 2014 10:38:18 -0400 Original-Received: from [70.94.38.149] ([70.94.38.149:61903] helo=TAKVER) by dnvrco-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id 69/D3-32028-95841C35; Sat, 12 Jul 2014 14:38:17 +0000 In-Reply-To: (Matt DeBoard's message of "Wed, 9 Jul 2014 23:53:04 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) X-RR-Connecting-IP: 107.14.64.118:25 X-Authority-Analysis: v=2.1 cv=aL1+qNNm c=1 sm=1 tr=0 a=AppmJ/7ZOOFWL/q6u6u93g==:117 a=AppmJ/7ZOOFWL/q6u6u93g==:17 a=ayC55rCoAAAA:8 a=9XSUBuVRJI8A:10 a=o_R75loqY_IA:10 a=IkcTkHD0fZMA:10 a=9i_RQKNPAAAA:8 a=pGLkceISAAAA:8 a=s0T_ZLpVpS7mN_HQoowA:9 a=QEXdDO2ut3YA:10 a=aSGvOcXLKsgA:10 a=MSl-tDqOz04A:10 X-Cloudmark-Score: 0 X-detected-operating-system: by eggs.gnu.org: BaiduSpider X-Received-From: 107.14.73.231 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:173000 Archived-At: Matt DeBoard writes: > In general I=E2=80=99m having a hard time connecting the dots between the= BNF > grammar table creation, the smie-rules (i.e. :before, :after, etc.), > tokenization, indentation, and so forth, and how it all comes together > to make this indentation machine work. You might consider using wisi (http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html, and in Gnu ELPA) instead of SMIE. The main difference is that wisi is a full LALR parser, while SMIE is an incremental operator grammar parser. In practice, that means the wisi grammar is _much_ closer to the language BNF, and thus possibly easier to understand. On the downside, wisi must parse the entire compilation unit (top level grammar item), so it can be slow on large files. I'm working on implementing a parser state cache to speed up re-parsing while editing. Currently, wisi is only used in Ada mode and gpr mode (GNAT project files), so there are fewer examples to work from.=20 I'd be interested in your feedback. --=20 -- Stephe