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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 6D32ABC69 for ; Tue, 29 May 2007 23:37:22 +0200 (CEST) Received: from smtp112.sbc.mail.mud.yahoo.com (smtp112.sbc.mail.mud.yahoo.com [68.142.198.211]) by concorde.inria.fr (8.13.6/8.13.6) with SMTP id l4TLbKhN029284 for ; Tue, 29 May 2007 23:37:21 +0200 Received: (qmail 73125 invoked from network); 29 May 2007 21:37:20 -0000 Received: from unknown (HELO ?192.168.1.100?) (rftp@pacbell.net@69.230.191.246 with plain) by smtp112.sbc.mail.mud.yahoo.com with SMTP; 29 May 2007 21:37:20 -0000 X-YMail-OSG: eUHOHOMVM1lcdx9rM_vXHn1pZgot2k7IaGhlvwRt7EFdNzlcOMsCfyO__genI.YfMYuYi_DWEhYj_5TAcyfNjsx9kNQ7312LLXS_N3dsDOjlx36dxnI- Message-ID: <465C9CFA.4000601@rftp.com> Date: Tue, 29 May 2007 14:36:58 -0700 From: Robert Roessler User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070526 Mnenhy/0.7.4.0 SeaMonkey/1.5a MIME-Version: 1.0 To: Edgar Friendly Cc: caml-list Subject: Re: [Caml-list] GtkSourceView2.0 syntax highlighting References: <465C7954.1060208@gmail.com> In-Reply-To: <465C7954.1060208@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 465C9D10.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 lexer:01 pervasives:01 pred:01 bool:01 2.0:98 edgar:98 char:01 wrote:01 caml-list:01 int:01 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. ;) 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 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