From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= Newsgroups: gmane.emacs.devel Subject: Re: SMIE documentation Date: Sun, 28 Nov 2010 22:56:50 +0100 Message-ID: <87aakt863h.fsf@gmail.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1290981543 15632 80.91.229.12 (28 Nov 2010 21:59:03 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 28 Nov 2010 21:59:03 +0000 (UTC) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 28 22:58:56 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PMpGi-0000qx-Ja for ged-emacs-devel@m.gmane.org; Sun, 28 Nov 2010 22:58:49 +0100 Original-Received: from localhost ([127.0.0.1]:38831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMpGi-0000Wn-5w for ged-emacs-devel@m.gmane.org; Sun, 28 Nov 2010 16:58:48 -0500 Original-Received: from [140.186.70.92] (port=39758 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PMpGc-0000WT-NV for emacs-devel@gnu.org; Sun, 28 Nov 2010 16:58:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PMpGa-0008T9-Om for emacs-devel@gnu.org; Sun, 28 Nov 2010 16:58:42 -0500 Original-Received: from mail-fx0-f41.google.com ([209.85.161.41]:54859) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PMpGa-0008Sc-Jf for emacs-devel@gnu.org; Sun, 28 Nov 2010 16:58:40 -0500 Original-Received: by fxm13 with SMTP id 13so3443111fxm.0 for ; Sun, 28 Nov 2010 13:58:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject :in-reply-to:references:user-agent:date:message-id:mime-version :content-type:content-transfer-encoding; bh=UW5yWuwbkZg4QFpaLNT3GBUwZvZrGyhwSsxDtvMhATU=; b=A1B02N40Ib9p3rJx6Y1JLZv04e4VCDi7vamI4+BRSHd4yYzH135WClp/ckczGM98Y+ Avd5SZRPK1GS0s7LZKDWp1NKserTJA518OwPAILIP5G0Dlk6q3hsuGZSr8y+Ar9PdmYd b+3vWRV5bad5ewlSyK4CG8AqOGedvTinhjT10= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; b=Es9wtupjHFpl9ksONNgoF9Bf9Z+qZBN8CeJc8xx2yEZmusOUROJFrU9d+KP31ash+n Y8M5VmjSEGvv5QE0jgSoUC4UbvWAU4xlMv0XsSs7dEYMVGlXe+YBSTgCXyCVXCNXLgO8 CDQmrpIF5grpJM4drxmQ3a1YTwcJieyI0DEI4= Original-Received: by 10.223.74.11 with SMTP id s11mr4566424faj.11.1290981519122; Sun, 28 Nov 2010 13:58:39 -0800 (PST) Original-Received: from localhost (176.119.broadband10.iol.cz [90.177.119.176]) by mx.google.com with ESMTPS id r24sm992900fax.3.2010.11.28.13.58.37 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 28 Nov 2010 13:58:37 -0800 (PST) In-Reply-To: (Stefan Monnier's message of "Sun, 28 Nov 2010 15:36:26 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:133214 Archived-At: Stefan Monnier writes: > While Savannah is down, maybe someone will feel like checking my attempt > at documenting SMIE. See patch below. I intend to install it on the > emacs-23 branch, in case it matters. [...] Thank you. A few nits I noticed: > +@c @defvar smie-grammar > +@c This variable is an alist specifying the left and right precedence of > +@c each token. It is meant to be initialized with the use of one of the > +@c functions below. > +@c @end defvar Why is this commented out? [...] > +The returned @emph{prec2} table holds constraints between pairs of token= , and ^^^^^ tokens > +for any given pair only one constraint can be present, either: T1 < T2, > +T1 =3D T2, or T1 > T2. [...] > +returns nil or an empty string, SMIE will try to handle the corresponding > +text as an sexp according to syntax tables. ^^ a [...] > +@code{'((assoc "else" "then"))}. It can also happen for cases where the > +conflict is real and cannot really be resolved, but it is unlikely to > +pose problem in practice. ^^^^^^^^^^^^ problems? [...] > +An other important concept is the notion of @emph{parent}: The ^^^^^^^^ another > +@emph{parent} of a token, is the head token of the most closely > +enclosing syntactic construct. For example, the parent of an What about "nearest enclosing" instead of "most closely enclosing"? [...] > +SMIE provides various functions designed specifically for use in the > +indentation rules function (several of those function will break if used ^^^^^^^^ functions > +in another context). These functions all start with the prefix > +@code{smie-rule-}. [...] > +@defun smie-rule-hanging-p > +Return non-@code{nil} if the current token is @emph{hanging}. > +A token is @emph{hanging} if it is at the last token on the line ^^^ [delete] > +and if it is preceded by other tokens: a lone token on a line is not [...] > +By @emph{separator}, we mean here a token whose sole purpose is to > +separate various elements within some enclosing syntactic construct, and > +which does not have any semantic significance in itself (i.e. it would > +typically no exist as a node in an abstract syntax tree). ^^ not [...] =C5=A0t=C4=9Bp=C3=A1n