emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Debugging SMIE by printing an S-expression


From: Stefan Monnier
Subject: Re: Debugging SMIE by printing an S-expression
Date: Mon, 06 Jun 2016 20:54:48 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]