help-source-highlight
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-source-highlight] Logo


From: Martin Gebert
Subject: Re: [Help-source-highlight] Logo
Date: Tue, 08 Apr 2003 10:05:01 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.0.2) Gecko/20030208 Netscape/7.02



Daniel Ajoy schrieb:
Does source-highlight needs to be recompiled to make it
work with an new programming Language? I might want to
make it work with Logo.

If it only were recompiling... ;-)
First you'll have to write your own scanner; as a template you should look at the cpp_scanner.ll or java_scanner.ll file in the src/ subdir which are the "original ones" and which you could adapt for your purpose. They are simply (?!) Flex files; you can get an overview of Flex here:

http://dinosaur.compilertools.net/

Sorry if you already knew that. Second you have to include your scanner into the source-highlight code. Lorenzo wanted to write a How-To about including new scanners (you'll mainly have to adapt the Makefiles for that) and to simplify the Makefiles for that purpose, but I don't know how far he's gotten with that; last time I tried to do that (been a while now) it was some work... Hope he'll show up later and explain.

For testing new scanners, *I* simply replaced one of the other scanners (simply give your scanner file the name of a scanner you want to substitute), made source-highlight anew (by 'make') and called it with the input type of the substituted scanner; the finished scanner was sent to Lorenzo (with a new name). But there have been some obstacles (run the scanner through flex by hand, and AFAI remember also something with sed-ing some constructs in this file), so if you aren't willing to do some work by hand you shouldn't go this way.

Hope this gives you an overview. Good luck, and don't let yourself be discouraged by my sermon! ;-) It surely is worth the work.

Martin







reply via email to

[Prev in Thread] Current Thread [Next in Thread]