Syntax Highlighting and Lexical Analysis

"Dominic Tootell" <Dominic@tootedom.freeserve.co.uk>
11 Sep 1999 09:03:50 -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: "Dominic Tootell" <Dominic@tootedom.freeserve.co.uk>
Newsgroups: comp.compilers
Date: 11 Sep 1999 09:03:50 -0400
Organization: Customer of Planet Online
Keywords: tools, question

Hi everyone


I'm trying to building my own editor.


Here's is what I have to do.... SPASS is an automated deducer (a first order
logic theorem prover http://spass.mpi-sb.mpg.de) to see a sample input file
that is what I want to syntax highlight is found at
http://spass.mpi-sb.mpg.de/WebSPASS.


I have to provide syntax highlighting of the input file. At the moment I
just want a first open syntax highlighter or on command of the user, not an
interactive one (I have no idea how they work yet, let alone an interactive
one).


I have never before done any lexical analysis type work, and I was wondering
if anyone could point me in the correct direction. I know that you read the
file in and produce a parse tree build on tokens (using a variation of the
red black tree). The problem is how to I do about parsing the file,
especially when commands can span lines, eg curly brackets and the like.


If anyone can help me, or provide me with any information I will be most
grateful. The kind of syntax highlighting I am looking for is the type that
is done in emacs for C code or Java. I know that emacs uses an internal
Lisp engine to read the code depending on a .el configuration file, but the
thought of having to program a Lisp engine is scarry, and I have never
bofore had any interaction with lisp.


Please help


Dominic
Dominic@tootedom.freeserve.co.uk
[It is my impression that most of these highlighters do regular expression
pattern matching rather than trying to parse the whole file. -John]





Post a followup to this message

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