From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Marcin Borkowski <mbork@mbork.pl>
Cc: emacs-devel@gnu.org
Subject: Re: forward-sexp when on a floating point number
Date: Mon, 18 Jan 2016 16:34:47 -0500 [thread overview]
Message-ID: <jwvio2qmv9o.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <871t9e8usz.fsf@mbork.pl> (Marcin Borkowski's message of "Mon, 18 Jan 2016 22:03:08 +0100")
> FWIW, I did something like this for (La)TeX here:
> https://github.com/mbork/tex-plus.el (note: this is still WiP, and
> contains more than just tokenizing TeX). Either TeX token syntax is
> weird and/or difficult, either I really suck at writing lexers/parsers,
> or this is indeed a (potentially) difficult problem. (Probably all
> three.)
Don't know about the middle one, but the other two indeed apply. In the
general case, the esiest way to solve this problem is probably to go
back to a safe earlier state and then lex forward from there.
A "safe earlier state" could be "right after a character which can only
appear at the end of a token" [ of course, there's no guarantee that such
a character exists ].
Also "going back and then lex forward" implies a potential serious
performance problem, so it would require some form of caching.
Stefan
next prev parent reply other threads:[~2016-01-18 21:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-12 10:42 forward-sexp when on a floating point number Oleh Krehel
2016-01-12 13:58 ` Herring, Davis
2016-01-12 14:20 ` Andreas Schwab
2016-01-12 14:41 ` Oleh Krehel
2016-01-12 17:35 ` John Wiegley
2016-01-12 17:45 ` Dmitry Gutov
2016-01-17 23:07 ` Stefan Monnier
2016-01-17 23:42 ` John Wiegley
2016-01-18 1:36 ` Stefan Monnier
2016-01-18 5:08 ` John Wiegley
2016-01-18 13:30 ` Stefan Monnier
2016-01-18 19:02 ` John Wiegley
2016-01-18 21:03 ` Marcin Borkowski
2016-01-18 21:34 ` Stefan Monnier [this message]
2016-01-20 22:15 ` Marcin Borkowski
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=jwvio2qmv9o.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=mbork@mbork.pl \
/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.