all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kris Jenkins <krisajenkins@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Re: SMIE & transpose-sexps
Date: Fri, 28 Feb 2014 04:11:44 -0800 (PST)	[thread overview]
Message-ID: <351f06ff-2925-45ab-a820-06b8855bb928@googlegroups.com> (raw)
In-Reply-To: <mailman.16218.1393554659.10748.help-gnu-emacs@gnu.org>

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


  parent reply	other threads:[~2014-02-28 12:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-27 11:54 SMIE & transpose-sexps krisajenkins
2014-02-28  2:30 ` Stefan Monnier
     [not found] ` <mailman.16218.1393554659.10748.help-gnu-emacs@gnu.org>
2014-02-28 12:11   ` Kris Jenkins [this message]
2014-03-10 15:12     ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=351f06ff-2925-45ab-a820-06b8855bb928@googlegroups.com \
    --to=krisajenkins@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.