Efficient computation of character offsets for token-oriented representation of program code
OwnerMichael L. Van De Vanter, Kenneth B. Urquhartinventors
Life of this patent
Estimating the term…
Loading patent…
OwnerMichael L. Van De Vanter, Kenneth B. Urquhartinventors
Estimating the term…
An editor, software engineering tool or collection of such tools may be configured to encode (or employ an encoding of) an insertion point in both token-coordinates and character-coordinates. Efficient implementations of insert, remove and replace operations that employ and maintain such a representation are described herein. Some realizations further maintain a total buffer size encoding consistent with each such operations. Computational costs of such operations typically scale at worst with the size of fragments inserted into and/or removed from such a token-oriented representation, rather than with buffer size. Accordingly, such implementations are particularly well-suited to providing efficient support for programming tool environments in which a token stream is updated incrementally in correspondence with user edits.
A software engineering tool encoded in one or more computer readable media as instructions executable to represent program code as a doubly-linked list of lexical tokens and to maintain, consistent with operations thereon, both a token-coordinates representation and a character-coordinates representation of an insertion point.
A method of providing character-oriented coordinates for an insertion point in an edit buffer represented as a sequence of lexical tokens, the method comprising:
One or more computer readable media encoding a data structure that represents contents of an edit buffer as a sequence of lexical tokens, the encoded data structure comprising:
A method of supporting access by one or more software engineering tools to program code, wherein at least one such tool operates on the program code as a token sequence and at least one such tool operates on the program code as a character sequence, the method comprising:
An apparatus comprising:
Dependencies are inferred from the claim text.