|
From: | address@hidden |
Subject: | Re: Emacs-devel Digest, Vol 148, Issue 12 |
Date: | Tue, 7 Jun 2016 10:27:55 -0400 |
Date: Mon, 06 Jun 2016 20:54:48 -0400
From: Stefan Monnier <address@hidden>
To: address@hidden
Subject: Re: Debugging SMIE by printing an S-_expression_
Message-ID: <address@hidden>
Content-Type: text/plain
> I am having some trouble understanding the indentation I'm getting for a
> simple SMIE grammar and set of indentation rules. It seems like it would
> be useful to be able to print out an S-_expression_ of what is being parsed -
> the buffer, whatever has been reduced, really, anything at all just to give
> me some insight as to what I want to match against in the indentation rules
> - but really, to make sure what I think the grammar should produce is being
> produced. Is there an easy way to do this?
Not really, no. I don't think it would necessarily require changes to
the existing code, but it would require a second implementation of
parsing which additionally builds an s-exp of what it parsed.
Instead, the usual way I use to find out how things are parsed is with
C-M-f and C-M-b, which is somewhat crude but works fairly well in my
experience once you learn to figure out how to interpret its behavior.
Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |