Gnu Emacs wisi homepage

wisi is an Emacs package providing utilities for indentation and navigation of source code files in Emacs. Currently, it is used for the Ada and gpr languages; other people are considering using it for other languages.

The source language to be indented is described by a grammar file in a bnf-like form, very similar to the bison grammar file. That is processed by the wisi-generate tool, to produce an elisp source file defining the parse tables for a generalized LALR parser. The parser is implemented in elisp.

This works quite well, except that it can be noticably slow on very large files (~ 1.2 second for 7000 lines of Ada on my machine).

The semantic information produced by the parser is stored in text properties; they are used by the indentation and navigation engine. This makes it possible to provide very detailed indentation and navigation for a complex language like Ada.

This means the indentation engine fails if the parser fails, such as for illegal syntax. Unfortunately, illegal syntax happens often when you are editing code, which is when you want indentation to work. The current approach to dealing with this problem is twofold:

This takes a little getting used to, but I find it an acceptable tradeoff for the ease of maintenance of the Ada mode indentation engine, compared to other approaches. Some users of Ada mode have other opinions.

A better solution to this problem is robust error handling in the parser.

wisi-generate is written in Ada 2012, using the OpenToken parser library. See the Opentoken website for download and build information.

Discussion about wisi and wisi-generate takes place on the Emacs ada-mode mailing list.

wisi 1.1.6

Available via Gnu ELPA.
To install:
Wisi release notes; API changes
Source tarball download area
wisi was developed for ada-mode, so that's where the elisp source lives.
Opentoken 6.0a
wisi-generate is an OpenToken application; the Ada source for wisi-generate is bundled with OpenToken.
Wisi elisp release notes; API changes
wisi user guide
Describes the grammar file syntax, and a few other things.

The ada-france monotone repository has up-to-date code.

mailing list, bugs

Subscribe to the Emacs ada-mode mailing list archive

Please report bugs both to the mailing list and to the Emacs bug tracker, or to me directly. Put Package: emacs, wisi as the first line of the Emacs bug tracker message.

my home page Author : Stephen Leake Valid HTML 4.01! Created with Emacs Last modified: Mon Oct 2 23:41:15 CDT 2017