[Top][All Lists]

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

passing the torch

From: Stephen Leake
Subject: passing the torch
Date: Sat, 04 Nov 2023 14:46:32 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.1 (windows-nt)

8.1.0 is my last release as Emacs ada-mode maintainer; it's time for
me to retire.

I'm not using Ada for any serious projects (other than ada-mode
itself), my health is declining, and all my available energy is taken
by my darling baby grandaughter (FIXME: attach photo).

So I'm looking for someone to take over as maintainer. Ideally, this
would be someone employed by a company that values Ada and Emacs, but
anyone with sufficient interest, energy, and time can do the job.

I'll be available to teach the new maintainer what they need to know.

If you are interested, contact me via the Emacs ada-mode mailing list
( or directly at

What's involved in being ada-mode maintainer?

- Wisitoken parser generator and runtime
  - All Ada (very small amount of C in the lexer wrapper)
    - 92 files, 18k statements
  - uses re2c lexer generator (generates C code)
  - generalized LR, error-correction, incremental
  - very complex Ada code
  - User grammar source file is parsed by a WisiToken parser
  - full test suite
    - 52 Ada files, 3492 statements
    - 45 grammar files
  - some documentation of algorithms

- gnat-compiler package
  - elisp wrapper to call gnat tools in various ways
  - 3 elisp files, 1938 lines

- gpr-query package
  - Provides project-wide cross reference for Ada
  - mix of elisp and Ada
    - 1 Ada file 211 statements, 1 elisp file 1075 lines
  - The Ada code is evolved from an old AdaCore utility
  - it uses gnatcoll packages to query a database built from .ali
    files produced by the GNAT compiler.

- wisi indentation, face, navigation package
  - mix of Emacs lisp and Ada
    - 19 Ada files, 2592 statements
    - 8 elisp files, 7097 lines
  - interfaces to wisitoken parser in a separate process
  - Uses rules in the grammar, and the syntax tree produced by parser,
    to compute indentation, face, navigation.
  - tested by the ada-mode test suite

- ada-mode package
  - Uses wisi, gnat-compiler
  - uses gpr-query or ada_language_server via eglot for cross-reference.
  - some Ada code to customize wisi computations
    - 15 Ada files generated by wisitoken
    - 15 Ada files, 2361 statements
    - 7 elisp files 4102 lines
  - ada_annex_p.wy grammar file derived from ARM Annex P. (3037 lines)
  - also supports ada_language server via eglot

- gpr-mode package
  - for GNAT .gpr files
  - uses wisi, gnat-compiler
  - small amount of Ada code to customize wisi computations
  - gpr.wy grammar file derived from gprbuild user guide.

- wisitoken-grammar-mode
  - for .wy files
  - uses wisi
  - grammar file derived from that used to generate WisiToken grammar
    source file parser

- ada-ref-man package
  - Provides info version of Ada Reference Manual as an ELPA package
  - Has Ada code that adds info capability to the official ARM formatting 

There could be one maintainer for all of the above, or several to
share the work as they see fit.

I've had a lot of fun maintaining ada-mode over the years (I've lost
track of when I started; sometime around 1995?). While I was working
at NASA writing Ada for dynamic simulators, it was very nice to be
able to just fix ada-mode to do what I wanted. Adding error correction
and incremental parsing to the parser was very challenging, and very
satisfying when it worked. The occasional thanks from users is also
very satisfying.

There are several paths forward for a new maintainer:

1) Learn all the current code, and maintain it.

2) Drop the wisitoken parser generator and runtime, use tree-sitter
   instead. This requires writing a wrapper for tree-sitter to match
   the wisitoken syntax-tree API; then the current wisi indentation
   code can be used.

   This maintains all of the ada-mode features, while reducing the
   maintenance burden significantly.

   I believe the tree-sitter error correction is less powerful than
   wisitoken, but it would be interesting to see if that matters in

3) Drop everything except the grammar; use tree-sitter parser and
   emacs tree-sitter queries for indentation, face, navigation.

   It will not be possible to match the current ada-mode indentation
   styles, and some ada-mode features will be lost. Even more
   maintenance burden reduction.

4) Just use eglot and AdaCore ada_language_server.

   Even larger deviation from current styles, even more features lost.
   But could work with AdaCore to improve things; that would also
   improve GNAT Studio.

If you are interested in handling all or part of this work, contact me
via the Emacs ada-mode mailing list
( or directly at

-- Stephe

reply via email to

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