[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-source-highlight] Logo
From: |
Lorenzo Bettini |
Subject: |
Re: [Help-source-highlight] Logo |
Date: |
Wed, 09 Apr 2003 17:28:35 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030313 |
Martin Gebert wrote:
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/
Hi!
Martin is right :-)
I was planning of providing an easier script language for automatically
generate flex code.
However, if you don't feel like writing a flex scanner for Logo, you can
provide me with some information about the syntax of the language
(keywords, comments, strings...) and I'll try to do that for you.
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.
I still haven't done that... :-)
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.
now the makefiles do not use sed stuff anymore, and use an option of
flex :-)
however I use a more recent version of flex, that you have to download
form the site.
I'm looking forward to hearing from you!
cheers
Lore
--
+-----------------------------------------------------+
| Lorenzo Bettini ICQ# lbetto, 16080134 |
| PhD in Computer Science |
| Dip. Sistemi e Informatica, Univ. di Firenze |
| Tel +39 055 4796741, Fax +39 055 4796730 |
| Florence - Italy (Linux User # 158233) |
| Home Page : http://www.lorenzobettini.it |
| http://music.dsi.unifi.it XKlaim language |
| http://www.lorenzobettini.it/purple Cover Band |
| http://www.gnu.org/software/src-highlite |
| http://www.gnu.org/software/gengetopt |
+-----------------------------------------------------+