Homepage: https://git.sr.ht/~jemarch/a68-mode
Author: Jose E. Marchesi, Omar Polo
Updated:
Major mode for editing Algol 68 code
A major mode for editing Algol 68 code. This mode uses SMIE in order to implement syntax-driven highlighting and automatic indentation. SMIE is based on operator precedence grammars, which often makes it difficult to express the syntax of programming languages due to their many restrictions. Fortunately, the parsing of Algol 68 by the means of an operator precedence grammar has been extensively studied by Meertens and van Vliet, and documented in two main works: - "An operator-priority grammar for Algol 68+" L.G.L.T Meertens & J.C. van Vliet https://ir.cwi.nl/pub/9325 - "Making ALGOL 68+ texts conform to an operator-priority grammar" L.G.L.T Meertens & J.C. van Vliet https://ir.cwi.nl/pub/9318 The first article provides an operator-priority grammar for the language, and indicates what inserts are necessary in order to comply with the grammar's structural restrictions. This is the basis of many of the rules in the SMIE grammar used in this file, particularly the tricky cases like loop clauses. The second article provides rules to determine when the several inserts must be inserted by the lexer. This is the basis of the SMIE lexer used in this file.