emacs-devel
[Top][All Lists]
Advanced

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

Re: SMIE


From: Stephen Leake
Subject: Re: SMIE
Date: Sat, 12 Jul 2014 09:38:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt)

Matt DeBoard <address@hidden> writes:

> In general I’m having a hard time connecting the dots between the BNF
> grammar table creation, the smie-rules (i.e. :before, :after, etc.),
> tokenization, indentation, and so forth, and how it all comes together
> to make this indentation machine work.

You might consider using wisi
(http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html, and in
Gnu ELPA) instead of SMIE.

The main difference is that wisi is a full LALR parser, while SMIE is an
incremental operator grammar parser. In practice, that means the wisi
grammar is _much_ closer to the language BNF, and thus possibly easier
to understand.

On the downside, wisi must parse the entire compilation unit (top level
grammar item), so it can be slow on large files. I'm working on
implementing a parser state cache to speed up re-parsing while editing.

Currently, wisi is only used in Ada mode and gpr mode (GNAT
project files), so there are fewer examples to work from. 

I'd be interested in your feedback.

-- 
-- Stephe



reply via email to

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