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

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

[Help-source-highlight] GNU Source-highlight 2.0 Candidate Release


From: Lorenzo Bettini
Subject: [Help-source-highlight] GNU Source-highlight 2.0 Candidate Release
Date: Wed, 08 Dec 2004 18:04:19 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040929

Hi Everybody

for those who want to try this new release, here's an unofficila candidate release.

http://rap.dsi.unifi.it/~bettini/source-highlight-2.0-rc1.tar.gz

The huge novelty is that language specifications are read at run-time, so that new languages can be easily added dynamically (without recompiling the sources) by using a simple syntax (you don't have to learn flex anymore to add a new language). It now depends on the Boost regex library (http://www.boost.org/) so you need to install this library (boost libraries are usually shipped with most distributions).

Here's, for instance, the definition of Java language

----------------  java.lang  ------------------------------
preproc = "import","package"

include "c_comment.lang"

include "number.lang"

string delim "\"" "\"" escape "\\"
string delim "'" "'"  escape "\\"

keyword = "abstract|assert|break|case|catch|class|const",
          "continue|default|do|else|extends|false|final",
          "finally|for|goto|if|implements|instanceof|interface"
keyword = "native|new|null|private|protected|public|return",
          "static|strictfp|super|switch|synchronized|throw",
          "throws|true|this|transient|try|volatile|while"

type = "int|byte|boolean|char|long|float|double|short|void"

include "symbols.lang"

cbracket = "{|}"

include "function.lang"
----------------------------------------------------

I'd really appreciate some feedback! :-)

there's also a brand new texinfo manual, that also explains the syntax for language definitions.

many thanks in advance

cheers
        Lorenzo

--
+-----------------------------------------------------+
|  Lorenzo Bettini          ICQ# lbetto, 16080134     |
|  PhD in Computer Science                            |
|  Dip. Sistemi e Informatica, Univ. di Firenze       |
|  Florence - Italy        (GNU/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              |
|  http://www.lorenzobettini.it/software/gengen       |
|  http://www.lorenzobettini.it/software/doublecpp    |
+-----------------------------------------------------+




reply via email to

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