|Make an editor for a language firstname.lastname@example.org (Davide Marino) (1999-02-27)|
|Re: Make an editor for a language email@example.com (1999-02-28)|
|Re: Make an editor for a language firstname.lastname@example.org (1999-03-02)|
|Re: Make an editor for a language maratb@CS.Berkeley.EDU (Marat Boshernitsan) (1999-03-02)|
|Re: Make an editor for a language email@example.com (Kenn Heinrich) (1999-03-02)|
|Re: Make an editor for a language firstname.lastname@example.org (George Russell) (1999-03-04)|
|Re: Make an editor for a language email@example.com (1999-03-04)|
|From:||firstname.lastname@example.org (Anton Ertl)|
|Date:||2 Mar 1999 14:06:50 -0500|
|Organization:||Institut fuer Computersprachen, Technische Universitaet Wien|
"Davide Marino" <email@example.com> writes:
> I need make an editor for a programming language. It would be capable
> of color tokens according their lexical value. ...
One idea for dealing with this for an FSA-based scanner is to remember
the state between any two characters. After a change, you start
running the FSA from the first changed character, and then continue
until the state synchronizes with the stored state. You can defer
this operation for off-screen stuff until it becomes on-screen.
If your lexical analysis requires something like lex' lookahead
feature, things become complicated, though. And I have no idea how to
coerce lex/flex to support this scheme.
> My idea is to mantain in
> memory all the text in this form:
> - there is a double linked list with one element for each line of text
> with a link to the line after and before.
I tried that and failed. A much better representation in my
experience is the plain character array with a hole at the cursor.
AFAIK emacs uses this data structure; I have also seen it described in
several places, but don't remember where.
M. Anton Ertl Some things have to be seen to be believed
firstname.lastname@example.org Most things have to be believed to be seen
Return to the
Search the comp.compilers archives again.