[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Debugging SMIE for sh-script.el
From: |
Stefan Monnier |
Subject: |
Re: Debugging SMIE for sh-script.el |
Date: |
Mon, 06 Sep 2021 16:23:04 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> returned by the smie lexer as "" when it runs into them from the outside.
There's no such thing as "the smie lexer":
Every major mode uses the lexer it wants with the behavior it fancies.
If the lexer decides to return nil when bumping into a char with paren
or string syntax then SMIE will treat it as a sign that this should be
handled in the "normal" way. The main benefit is that paired parens can
then be skipped with things like `forward-sexp` which is much faster
than letting SMIE do the lexing+parsing inside the pair.
But a lexer doesn't have to do that. An example would be when the
parens are escaped, e.g, in ELisp, `foo\(toto\)bar` is a single symbol
so an SMIE lexer for ELisp should handle it as a single token.
Stefan
- Re: Debugging SMIE for sh-script.el, (continued)
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/03
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/05
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/06
- Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/06
- Re: Debugging SMIE for sh-script.el, Nikolay Kudryavtsev, 2021/09/06
- Re: Debugging SMIE for sh-script.el,
Stefan Monnier <=
- Re: Debugging SMIE for sh-script.el, Kévin Le Gouguec, 2021/09/12
Re: Debugging SMIE for sh-script.el, Stefan Monnier, 2021/09/02