From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 74B31BC69 for ; Wed, 30 May 2007 07:28:47 +0200 (CEST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.183]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l4U5Sk6N002116 for ; Wed, 30 May 2007 07:28:46 +0200 Received: by py-out-1112.google.com with SMTP id u52so1246741pyb for ; Tue, 29 May 2007 22:28:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=eAwnVtP+f2sbmJY1CPiyw3GdIxobvjAC8ggTnszcdaaDQXpsYYEBmpSZ8PtbWuUw3oZSWzhbgP4aeM5meFhD+B7EcZ0zNKg8VMVQ5NvNr4ryOsE2DxAEnPBMGwzkP4DqvrsH8P2BastFza2Gr4A8uDV5aH7Nnms9vYKl3EGMviM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=Pp1EGS5Kko0i8VLNfOuFpCZ8Q3ycgJ7YMoAHKqd8+mhUelxNRyAE06eE8BzvIR1fL4ztx6vQIDlIa/3/iBmRjv28P1Y/a0ZtvzD76K/pDhcz5ATH8F1dIQUD7LFh/W3rcCHZNyh1ZkX2vDTI9oM77Ywv3RMsom7iOwVeK1TpnMU= Received: by 10.65.114.11 with SMTP id r11mr14520637qbm.1180502925961; Tue, 29 May 2007 22:28:45 -0700 (PDT) Received: from ?192.168.0.7? ( [70.243.139.152]) by mx.google.com with ESMTP id e18sm13578668qba.2007.05.29.22.28.44; Tue, 29 May 2007 22:28:45 -0700 (PDT) Message-ID: <465D0BFC.7040006@gmail.com> Date: Wed, 30 May 2007 00:30:36 -0500 From: Edgar Friendly User-Agent: Thunderbird 2.0.0.0 (X11/20070326) MIME-Version: 1.0 To: Robert Roessler , caml-list Subject: Re: [Caml-list] GtkSourceView2.0 syntax highlighting References: <465C7954.1060208@gmail.com> <465C9CFA.4000601@rftp.com> In-Reply-To: <465C9CFA.4000601@rftp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-j-chkmail-Score: MSGID : 465D0B8E.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 465D0B8E.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 syntax:01 parsing:01 ocaml:01 ocaml:01 yup:01 literals:01 lexer:01 pervasives:01 pred:01 bool:01 edgar:98 2.0:98 edgar:98 char:01 Robert Roessler wrote: > Edgar Friendly wrote: >> The upcoming version of GtkSourceView, the library used by many Gnome >> text editors for syntax highlighting, supports new and more powerful >> language parsing. I volunteer to update the language definition for >> Ocaml, and would like some feedback from the community regarding useful >> things to highlight. > > A "gotcha" to be aware of (if you aren't already handling this): don't > forget that OCaml comments nest. ;) > Yup, that's being handled. Another fun gotcha I found is that comments aren't comments inside string literals. > Also, from my OCaml lexer in the Scintilla distribution: > > # suggested; more could come from, say, Pervasives > keywordoptional1.caml= \ > option Some None ignore ref lnot succ pred > > # suggested; more could come from, say, user-defined types > keywordoptional2.caml= \ > array bool char float int list string unit > wow, this is going to be a lot of keyword highlighting. people might run out of colors on their screen. > The full set (including default coloring values) may be found in the > caml.properties file in a Scintilla source tree. > > Robert Roessler > roessler@rftp.com > http://www.rftp.com > Thanks for the feedback, E.