help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: SMIE & transpose-sexps


From: Kris Jenkins
Subject: Re: SMIE & transpose-sexps
Date: Fri, 28 Feb 2014 04:11:44 -0800 (PST)
User-agent: G2/1.0

On Friday, 28 February 2014 02:30:27 UTC, Stefan Monnier  wrote:
> > And that this would be both jolly useful in itself, and proof that I'd
> 
> > set up the parsing rules correctly.  But it doesn't work, and I have
> 
> > no idea why.
> 
> 
> 
> It usually works for the "=" case but not for the AND case.
> 
> 
> 
> The reason is that transpose-sexps doesn't actually know about SMIE
> 
> tokens, so when it sees AND it has no idea it's an infix operator,
> 
> instead it uses the syntax-tables and thinks AND is an identifier.
> 
> For infix operators which are made of symbols (i.e. chars of
> 
> "punctuation" syntax), it happens to do the right thing, which is
> 
> neat indeed.
> 
> 
> 
> 
> 
>         Stefan

Aha, I see. Thanks for explaining. :-)

So...is there any other way to see SMIE's idea of the syntax tree for a given 
buffer, for debugging?

Cheers,
Kris


reply via email to

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