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

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

Re: [Help-source-highlight] C-sharp style of surce-highlight


From: HEMMI, Shigeru
Subject: Re: [Help-source-highlight] C-sharp style of surce-highlight
Date: Thu, 20 Apr 2006 10:48:25 +0900

Thanks for your reply,

To be honest, I am a newbie in C#, I can not provide credible/good
info for your work.
However, I wish to show you some info within my very limited experience.
Please use it if you think it is useful. If you think not useful,
simply discard it.
I will be very happy if you provide a good C-sharp style.

( I will not attach my archived file here, since it is not proper to include
 atachments in public mailing list. I will send it to you directly in
another email.)

Regards,

2006/4/19, Lorenzo Bettini <address@hidden>:
> HEMMI, Shigeru wrote:
> > Hello,
> >
> > I wanted to add a C-sharp (C#) style of source-highight.
> >
> > What I did was:
> > 1. cp cpp.lang csharp.lang
> > 2. Edit csharp.lang only in keyword and type; other fields not changed.
> > 3. Edit lang.map, Makefile.am and Makefile.in so that csharp.lang is 
> > included.
> > 4. Make install
> > It seems OK at a glance.
> >
> > However, I am wondering if there is a better way or I made somthing
> > mistakes in it.
> > Let me know if there is points to improve/correct.
>
> Hi there!
>
> thanks for the C# definition, which was really missing.
>
> I'd like to add it to the source-highlight distribution; could you
> please send me a test file that I can add to the test suite for C#?
>
> Probably a better way to define the .lang file was to include cpp.lang
> and redefine only the parts that are different.
>
> hope to hear from you soon!
>
> Lorenzo
>
> >
> > ----- FYI, my csharp.lang  is as follows:
> > --------------------------------------------------------
> > # definitions for C-sharp
> > # by S. HEMMI, this is not authorized.
> > include "c_comment.lang"
> >
> > state preproc start '^[[:blank:]]*#(?:[[:blank:]]*include)' begin
> >        string delim "<" ">"
> >        string delim "\"" "\"" escape "\\"
> >        include "c_comment.lang"
> > end
> >
> > preproc = '^[[:blank:]]*#([[:blank:]]*[[:word:]]*)'
> >
> > include "number.lang"
> >
> > include "c_string.lang"
> >
> > keyword =  "abstract|event|new|struct ",
> >  "as|explicit|null|switch",
> >  "base|extern|object|this ",
> >  "bool|false|operator|throw ",
> >  "break|finally|out|true ",
> >  "byte|fixed|override|try ",
> >  "case|float|params|typeof ",
> >  "catch|for|private|uint ",
> >  "char|foreach|protected|ulong ",
> >  "checked|goto|public|unchecked ",
> >  "class|if|readonly|unsafe ",
> >  "const|implicit|ref|ushort ",
> >  "continue|in|return|using ",
> >  "decimal|int|sbyte|virtual ",
> >  "default|interface|sealed|volatile ",
> >  "delegate|internal|short|void ",
> >  "do|is|sizeof|while ",
> >  "double|lock|stackalloc ",
> >  "else|long|static  ",
> >  "enum|namespace|string ",
> >  "get|partial|set ",
> >  "value|where|yield "
> >
> > type = "bool|byte|sbyte|char|decimal|double",
> >  "float|int|uint|long|ulong|object",
> >  "short|ushort|string"
> >
> > include "symbols.lang"
> >
> > cbracket = "{|}"
> >
> > include "function.lang"
> >
> > ####
>
> --
> +-----------------------------------------------------+
> |  Lorenzo Bettini          ICQ# lbetto, 16080134     |
> |  PhD in Computer Science                            |
> |  Dip. Sistemi e Informatica, Univ. di Firenze       |
> |  Tel +39 055 4237460, Fax +39 055 4237437           |
> |  Florence - Italy        (GNU/Linux User # 158233)  |
> |  Home Page        : http://www.lorenzobettini.it    |
> |  http://music.dsi.unifi.it         XKlaim language  |
> |  http://www.purplesucker.com Deep 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    |
> +-----------------------------------------------------+
>
>
>
> _______________________________________________
> Help-source-highlight mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-source-highlight
>




reply via email to

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