Affine applet


Description

The Affine applet uses two custom classes, the GridArea class and the Lexer class to implement a simple rule-based text translation system. Text entered in the GridArea text component is translated forwards or backwards using two sets of mirror-image rewriting rules

For example if the forward set contained the rule a --> Ab, then the reverse set would contain the rule Ab --> a. This allows for "infinite undo" without caching intermediate states.

Instructions

Enter text in the GridArea, or use the default text. Select expand or revert, then press the apply button. Note: If the text is expanded past the bottom of the GridArea, it will over-write the top line, resulting in a loss of information.