In response to programmer input of a trigger token, a program editor
creates a pair of boundary tokens encapsulating an embedded lexical
context and positions an insertion point within the embedded lexical
context. The operations on the embedded lexical context are preferably
performed using an embeddable sub-editor specialized to the task at hand.
Since boundary tokens are generated in pairs, stability of lexical
boundaries is enforced. Accordingly, stable implementations of certain
desirable behaviors, including language-oriented advanced program
typography that is robust to user edits, are facilitated using the
invented techniques.