Next: Incremental Parsing Framework, Up: Syntax Protocol
Class precedence list:
syntax, name-mixin, standard-object, slot-object, t
The base class for all syntaxes.
The redisplay module exploits the syntax module for several things:
User commands can use the syntax module for:
The view that the syntax module has of the buffer is updated only when needed, and then only for the parts of the buffer that are needed. Most syntax modules (such as for programming languages) need to compute their representations from the beginning of the buffer up to a particular point beyond which the structure of the buffer does not need to be known.
There are three situations where updating might be needed:
The first case is handled by the redisplay invoking the following generic function:
Inform the syntax module that it must update its view of the buffer The low-mark and the high-mark of the buffer indicate what region has been updated.
The second case is handled by the following generic function:
Inform the syntax module that it must update its syntactic analysis to cover the region between the two marks from and to.
The third case is handled by the syntax module itself when needed in order to correctly compute the effects of a command.
It is important to realize that the syntax module is not directly involved in displaying buffer contents in a pane. In fact, the syntax module should work even if there is no graphic user interface present, and it should be exploitable by several, potentially totally different, display units.