← Back to Patent Explorer
US5813019A Expired / Lapsed US ⏱️ 0.0 years remaining

Token-based computer program editor with program comment management

Assignee: Sun Microsystems Inc
•
Filing: 1995-07-06
•
Granted: 1998-09-22
•
Expires: 2015-07-06
📄 Original PDF 🌐 Google Patents 🔄 Sync Now

Abstract

Abstract A user-friendly text editor for structurally represented computer programs is disclosed. The present editor combines advantages of text editors and structure editors by transforming, as the user types, the text stream entered by the user into a token stream, where the tokens of the token stream constitute the words of the program being entered. Each of the tokens is classified by the editor as one of a group of extended lexemes defined by the language in which the program being edited is written. These extended lexemes are defined similar to lexemes that might be used in a batch lexer, but are more numerous as the present editor must account for the incomplete and ill-formed lexemes that arise as the user types the program. Before performing lexical analysis, the present editor separates program statements from program comments. The editor then stores the text of the comments along with comment positioning information that allows the original position of the comments as entered by the user to be recreated for printing or display purposes. Based on the token stream and the separately represented comments, the editor prettyprints the program and comments as the user types. The editor also allows the user to edit the program from the prettyprinted display as if the program were internally represented as text. The present editor also allows the user to periodically request a syntactical analysis of the program, wherein the structure of the program is represented in a syntax tree that references the token stream.

Inventors

  • 👤 Michael L. Van De Vanter

Bibliographic Details

Application Number —
Jurisdiction US
Data Source google_patents
Last Synchronized 2026-11-04 06:50
CPC Classifications
G; G06; G06F; G06F8/00; G06F8/30; G06F8/33; G06F8/40; G06F8/41; G06F8/42; G06F8/425

Claims Analysis

Total Claims: 32
Claim 1
Independent Claim 204 words
A computer readable medium for use in a computer having a memory and at least one input device, said computer readable medium having programs stored thereon to direct said computer to function in a specified manner when said computer and said at least one input device are used to edit a computer program internally represented as a stream of tokens, said programs comprising: a keystroke executive configured to receive an event stream that includes keystrokes from said at least one input device, said keystrokes corresponding to editing actions made to said computer program using said at least one input device, and to separate program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being related to program comments and program statements, respectively, said keystroke executive forming said stream of tokens by lexically analyzing only said program statement keystrokes; and a comment processor configured to receive said program comment keystrokes as said program is being edited, said comment processor grouping said comment keystrokes into said program comments, storing said comments as annotations in a list of annotations and associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 2
Dependent Claim 204 words
A computer readable medium for use in a computer having a memory and at least one input device, said computer readable medium having programs stored thereon to direct said computer to function in a specified manner when said computer and said at least one input device are used to edit a computer program internally represented as a stream of tokens, said programs comprising: a keystroke executive configured to receive an event stream that includes keystrokes from said at least one input device, said keystrokes corresponding to editing actions made to said computer program using said at least one input device, and to separate program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being related to program comments and program statements, respectively, said keystroke executive forming said stream of tokens by lexically analyzing only said program statement keystrokes; and a comment processor configured to receive said program comment keystrokes as said program is being edited, said comment processor grouping said comment keystrokes into said program comments, storing said comments as annotations in a list of annotations and associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 3
Dependent Claim 27 words
The computer readable medium of claim 1, wherein said keystroke executive separates said comment keystrokes from said statement keystrokes by detecting comment delimiters in said event stream.
Claim 4
Dependent Claim 49 words
The computer readable medium of claim 1 wherein said positional information comprises: stream position, which indicates a position of each comment in said stream of tokens; and surrounding newlines, which indicates a two-dimensional position of each of said comments as entered with respect to proximal lines of said tokens.
Claim 5
Dependent Claim 53 words
The computer readable medium of claim 3, wherein said surrounding newlines comprises: lexical position of said comment, said lexical position indicating position of said comment as entered with respect to surrounding tokens in said token stream; and vertical space around said comment, said vertical space indicating newlines entered before and after said comment.
Claim 6
Dependent Claim 135 words
The computer readable medium of claim 4, wherein said lexical position is an enumerated variable having one of three predefined values: "line", to which value said comment processor sets said lexical position variable when said comment is on a line or lines by itself as entered; "trailing", to which value said comment processor sets said lexical position variable when said comment is on a line with at least one of said program statements and is positioned to the right of all said at least one of said program statements as entered; and "embedded", to which value said comment processor sets said lexical position variable when said comment is on a line with some of said program statements and not all of said some program statements are positioned to the left of said comment as entered.
Claim 7
Dependent Claim 129 words
The computer readable medium of claim 5, wherein said vertical space is an enumerated variable having one of four predefined values: "noVerticalSpace", to which value said comment processor sets said vertical space variable when said comment has adjacent lines of text immediately above and below said comment as entered; "beforeOnly", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines only above said comment as entered; "afterOnly", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines only below said comment as entered; and "beforeAftere", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines above and below said comment as entered.
Claim 8
Dependent Claim 51 words
The computer readable medium of claim 3, wherein said surrounding newlines comprises two variables: preceding newline characters, said preceding newline characters being a number of line breaks entered immediately above said comment; and subsequent newline characters, said subsequent newline characters being a number of line breaks entered immediately after said comment.
Claim 9
Dependent Claim 45 words
The computer readable medium of claim 1, further comprising a typographical display processor configured to display each of said comments according to language-specific display rules and at display positions with respect to displayed tokens corresponding to said positional information associated with each of said comments.
Claim 10
Dependent Claim 27 words
The computer readable medium of claim 8, wherein said typographical display processor displays said comments in a visually distinct manner from said display of said program statements.
Claim 11
Dependent Claim 37 words
The computer readable medium of claim 9, wherein any of said comments can be edited as if with a text editor by virtue of a user placing said cursor inside visually distinct borders of said displayed comment.
Claim 12
Dependent Claim 161 words
A computer program editing process in which a computer program being edited is internally represented as a stream of tokens, said computer program editing process comprising the steps of: receiving an event stream that includes keystrokes from at least one input device while a user edits said computer program using said at least one input device; separating program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being associated with program comments and program statements, respectively; forming said stream of tokens by lexically analyzing only said program statement keystrokes; representing separately from said token stream said keystrokes associated with said program comments as said program is being edited; said representing including grouping said comment keystrokes into said program comments and storing said comments as annotations in a list of annotations; said representing also including associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 13
Dependent Claim 161 words
A computer program editing process in which a computer program being edited is internally represented as a stream of tokens, said computer program editing process comprising the steps of: receiving an event stream that includes keystrokes from at least one input device while a user edits said computer program using said at least one input device; separating program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being associated with program comments and program statements, respectively; forming said stream of tokens by lexically analyzing only said program statement keystrokes; representing separately from said token stream said keystrokes associated with said program comments as said program is being edited; said representing including grouping said comment keystrokes into said program comments and storing said comments as annotations in a list of annotations; said representing also including associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 14
Dependent Claim 18 words
The editing process of claim 11, wherein said separating step comprises detecting comment delimiters in said event stream.
Claim 15
Dependent Claim 48 words
The editing process of claim 11 wherein said positional information comprises: stream position, which indicates the position of each comment in said stream of tokens; and surrounding newlines, which indicates the two-dimensional position of each of said comments as entered with respect to proximal lines of said tokens.
Claim 16
Dependent Claim 53 words
The editing process of claim 13, wherein said surrounding newlines comprises: lexical position of said comment, said lexical position indicating a position of said comment as entered with respect to surrounding tokens in said token stream; and vertical space around said comment, said vertical space indicating newlines entered before and after said comment.
Claim 17
Dependent Claim 93 words
The editing process of claim 14, wherein said lexical position is an enumerated variable having one of three predefined values: "line", indicating said comment is on a line or lines by itself as entered; "trailing", indicating said comment is on a line with some of said program statements and is to the right of all said collinear program statements as entered; and "embedded", indicating said comment is on a line with some of said program statements and not all of said some program statements are to the left of said comment as entered.
Claim 18
Dependent Claim 106 words
The editing process of claim 15, wherein said vertical space is an enumerated variable having one of four predefined values: "noVerticalSpace", indicating said comment has adjacent lines of text immediately above and below said comment as entered; "beforeOnly", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines only above said comment as entered; "afterOnly", indicating said comment has immediately adjacent blank lines only below said comment as entered; and "beforeAfter", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines above and below said comment as entered.
Claim 19
Dependent Claim 50 words
The editing process of claim 13, wherein said surrounding newlines comprises two variables: preceding newline characters, said preceding newline characters being a number of line breaks entered immediately above said comment; and subsequent newline characters, said subsequent newline characters being a number of line breaks entered immediately after said comment.
Claim 20
Dependent Claim 41 words
The editing process of claim 11, further comprising the step of displaying each of said comments according to language-specific display rules and at display positions with respect to displayed tokens corresponding to said positioning information associated with each of said comments.
Claim 21
Dependent Claim 27 words
The editing process of claim 18, wherein said displaying step further comprises displaying said comments in a visually distinct manner from said display of said program statements.
Claim 22
Dependent Claim 282 words
A computer system, comprising: a processor; at least one input device configured to receive a computer program; a display on which said program is displayed as said program is being edited, said display and said at least one input device being coupled to said processor and controlled by applications running in said processor; a primary memory coupled to said processor for storing said applications and data for said applications; a secondary memory coupled to said processor for storing said applications and said data for said applications, said secondary memory being slower than said primary memory; and a computer program editor in which a computer program being edited is internally represented as a stream of tokens, said computer program editor being one of said applications running in said processor, said computer program being edited being one of said data, said program editor including: a keystroke executive configured to receive an event stream that includes keystrokes from at least one input device, said keystrokes corresponding to editing actions made to said computer program using said at least one input device, and to separate program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being related to program comments and program statements, respectively, said keystroke executive forming said stream of tokens by lexically analyzing only said program statement keystrokes; and a comment processor configured to receive said program comment keystrokes, said comment processor grouping said comment keystrokes into said program comments as said program is being edited, storing said comments as annotations in a list of annotations and associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 23
Dependent Claim 282 words
A computer system, comprising: a processor; at least one input device configured to receive a computer program; a display on which said program is displayed as said program is being edited, said display and said at least one input device being coupled to said processor and controlled by applications running in said processor; a primary memory coupled to said processor for storing said applications and data for said applications; a secondary memory coupled to said processor for storing said applications and said data for said applications, said secondary memory being slower than said primary memory; and a computer program editor in which a computer program being edited is internally represented as a stream of tokens, said computer program editor being one of said applications running in said processor, said computer program being edited being one of said data, said program editor including: a keystroke executive configured to receive an event stream that includes keystrokes from at least one input device, said keystrokes corresponding to editing actions made to said computer program using said at least one input device, and to separate program comment keystrokes from program statement keystrokes, said program comment and program statement keystrokes being related to program comments and program statements, respectively, said keystroke executive forming said stream of tokens by lexically analyzing only said program statement keystrokes; and a comment processor configured to receive said program comment keystrokes, said comment processor grouping said comment keystrokes into said program comments as said program is being edited, storing said comments as annotations in a list of annotations and associating with each of said annotations positional information indicating where said comments are located in said token stream for display and printing purposes.
Claim 24
Dependent Claim 26 words
The computer system of claim 20, wherein said keystroke executive separates said comment keystrokes from said statement keystrokes by detecting comment delimiters in said event stream.
Claim 25
Dependent Claim 48 words
The computer system of claim 20, wherein said positional information comprises: stream position, which indicates a position of each comment in said stream of tokens; and surrounding newlines, which indicates a two-dimensional position of each of said comments as entered with respect to proximal lines of said tokens.
Claim 26
Dependent Claim 52 words
The computer system of claim 22, wherein said surrounding newlines comprises: lexical position of said comment, said lexical position indicating position of said comment as entered with respect to surrounding tokens in said token stream; and vertical space around said comment, said vertical space indicating newlines entered before and after said comment.
Claim 27
Dependent Claim 134 words
The computer system of claim 23, wherein said lexical position is an enumerated variable having one of three predefined values: "line", to which value said comment processor sets said lexical position variable when said comment is on a line or lines by itself as entered; "trailing", to which value said comment processor sets said lexical position variable when said comment is on a line with at least one of said program statements and is positioned to the right of all said at least one of said program statements as entered; and "embedded", to which value said comment processor sets said lexical position variable when said comment is on a line with some of said program statements and not all of said some program statements are positioned to the left of said comment as entered.
Claim 28
Dependent Claim 128 words
The computer system of claim 24, wherein said vertical space is an enumerated variable having one of four predefined values: "noVerticalSpace", to which value said comment processor sets said vertical space variable when said comment has adjacent lines of text immediately above and below said comment as entered; "beforeOnly", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines only above said comment as entered; "afterOnly", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines only below said comment as entered; and "beforeAfter", to which value said comment processor sets said vertical space variable when said comment has immediately adjacent blank lines above and below said comment as entered.
Claim 29
Dependent Claim 50 words
The computer system of claim 22, wherein said surrounding newlines comprises two variables: preceding newline characters, said preceding newline characters being a number of line breaks entered immediately above said comment; and subsequent newline characters, said subsequent newline characters being a number of line breaks entered immediately after said comment.
Claim 30
Dependent Claim 44 words
The computer system of claim 20, further comprising a typographical display processor configured to display each of said comments according to language-specific display rules and at display positions with respect to displayed tokens corresponding to said positional information associated with each of said comments.
Claim 31
Dependent Claim 26 words
The computer system of claim 27, wherein said typographical display processor displays said comments in a visually distinct manner from said display of said program statements.
Claim 32
Dependent Claim 36 words
The computer system of claim 28, wherein any of said comments can be edited as if with a text editor by virtue of a user placing said cursor inside visually distinct borders of said displayed comment.

References Cited (Backward Citations)

US4989145A Cited
US5493678A Cited
US5513305A Cited

USPTO Annuity & Maintenance Windows

Annuity Stage Window Opens Payment Deadline Surcharge Period Until Estimated Fee Status
3.5 Years (Year 4) 2001-09-21 2002-03-23 2002-09-22 $2000.00 Window Closed / Lapsed
7.5 Years (Year 8) 2005-09-21 2006-03-23 2006-09-22 $3760.00 Window Closed / Lapsed
11.5 Years (Year 12) 2009-09-21 2010-03-23 2010-09-22 $7700.00 Window Closed / Lapsed

Assigned Categories & Tags

No categories assigned to this patent yet.

Assign Category Tag