Re: Syntax Highlighting and Lexical Analysis

Marko =?ISO-8859-1?Q?M=E4kel=E4?= <Marko.Makela@HUT.FI>
20 Sep 1999 11:55:25 -0400

          From comp.compilers

Related articles
Syntax Highlighting and Lexical Analysis Dominic@tootedom.freeserve.co.uk (Dominic Tootell) (1999-09-11)
Re: Syntax Highlighting and Lexical Analysis jacob.navia@wanadoo.fr (jacob.navia) (1999-09-16)
Re: Syntax Highlighting and Lexical Analysis webid@asi.fr (Armel) (1999-09-16)
Re: Syntax Highlighting and Lexical Analysis Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (1999-09-20)
Re: Syntax Highlighting and Lexical Analysis maratb@CS.Berkeley.EDU (Marat Boshernitsan) (1999-09-20)
Re: Syntax Highlighting and Lexical Analysis qjackson@wave.home.com (Quinn Tyler Jackson) (1999-10-04)
| List of all articles for this month |
From: Marko =?ISO-8859-1?Q?M=E4kel=E4?= <Marko.Makela@HUT.FI>
Newsgroups: comp.compilers
Date: 20 Sep 1999 11:55:25 -0400
Organization: Helsinki University of Technology, CS lab
References: 99-09-041 99-09-048
Keywords: tools, lex

>>>>> "John" == jacob navia <jacob.navia@wanadoo.fr> writes:


John> That just shows that someone doesn't know how to implement REs.
John> We did RE-based stuff in a window editor on the PDP-10,
John> laughably slow by modern standards, and performance was
John> fine. -John


Or how to write efficient REs. The regexp engine of Emacs is pretty
efficient. It is not hard to add syntax highlighting for custom
languages in GNU Emacs 19.34 or later. Since the syntax highlighting
engine (font-lock-mode) allows Lisp code for matching constructs, it
is even possible to highlight things like


int a, b, c (char d, e);


correctly ("int" colored as a type name, "c" colored as a function
name and the other letters colored as variable names). But the Lisp
function that parses this is very hairy, and if I remember correctly,
it will not search past the end of the current line.


Marko


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.