From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49611 Path: news.gmane.org!not-for-mail From: Drazen Baic Newsgroups: gmane.comp.tex.context Subject: Files for verbatim output of Python source, zc.buildout and Apache config files Date: Sun, 19 Apr 2009 18:54:26 +0200 Message-ID: <6607a2f30904190954mfc9fd86h7b0dbd4fdc839855@mail.gmail.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1240160117 23312 80.91.229.12 (19 Apr 2009 16:55:17 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Apr 2009 16:55:17 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Sun Apr 19 18:56:36 2009 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1LvaJj-00064r-Vd for gctc-ntg-context-518@m.gmane.org; Sun, 19 Apr 2009 18:56:32 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id AD11F1FB3C; Sun, 19 Apr 2009 18:55:04 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04564-01-2; Sun, 19 Apr 2009 18:54:39 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4B1031FB1D; Sun, 19 Apr 2009 18:54:39 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 0BF121FADF for ; Sun, 19 Apr 2009 18:54:37 +0200 (CEST) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 04564-01 for ; Sun, 19 Apr 2009 18:54:28 +0200 (CEST) Original-Received: from filter2-til.mf.surf.net (filter2-til.mf.surf.net [194.171.167.218]) by ronja.ntg.nl (Postfix) with ESMTP id F1CDD1FB1D for ; Sun, 19 Apr 2009 18:54:27 +0200 (CEST) Original-Received: from mail-fx0-f176.google.com (mail-fx0-f176.google.com [209.85.220.176]) by filter2-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n3JGsQrc012543 for ; Sun, 19 Apr 2009 18:54:27 +0200 Original-Received: by fxm24 with SMTP id 24so1712250fxm.2 for ; Sun, 19 Apr 2009 09:54:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=tO8PCzIkb2n43TFLmxSTEGjnIcxUNAoT1HSdpiAHlEE=; b=iF9E6IF1Pn4W6NYKXvzLNYRUuK8HjCFhqsrnwp+hHzh7qZytft6UyyPiYViErz92tC 2OKX7DCpsw3vF8xmsUKbqIzw4vZB7uBNLMsf6Q9gonWf+JhjXmUAMGLkfLoHfU4xQvXY 5fEiTt7pl6+T2DHkcsIxR1T1a0MksxKnkV6wo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=HU5ZftWo0ZVbrxs5Trh61fSnUE87m71n7OZEIslusHZssYEYLhqXzez69ZqudatgcD HCNnr9zrX32wejMQauMmxqOdOVwjJ6sOWlHr+XSW8ge1Wf1oQ6BDMTMwPMMg4bf4AOjg BQfL/eSqSAlj6aiikTapc66ZJCssJugy4Qx7c= Original-Received: by 10.239.179.13 with SMTP id b13mr193317hbg.81.1240160066487; Sun, 19 Apr 2009 09:54:26 -0700 (PDT) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=209.85.220.176; country=US; region=CA; city=Mountain View; postalcode=94043; latitude=37.4192; longitude=-122.0574; metrocode=807; areacode=650; http://maps.google.com/maps?q=37.4192,-122.0574&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 210832122 - 1615050c795f - 20090419 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.218 X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.11 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:49611 Archived-At: Hello, I'm using MKIV and needed syntax highlighting for a few source and config files. I read on the Wiki and on this list that it should be pretty easy to do this in Lua and although I never wrote anything in Lua I just tried it. Maybe the result will be of use for somebody so I tried to post them to this list a few days ago but the mail never showed up. Maybe because of the attachment size. I read on the Wiki that the best place for putting custom formatter files would be the context distribution or http://modules.contextgarden.net but as I'm pretty sure that some stuff is missing and I'm sure there are some bugs included I tried to post them here. Would it be OK to put the files in a section on the Wiki to start something like a repository for verb-*.lua files where it would be easy to extend and correct them? The verb-*.lua files I created are for syntax highlighting of Python source code, Apache http.conf and zc.buildout config files. For the zc.buildout files I used a simple solution and just defined the keywords that appear in a standard Plone buildout.cfg file as I didn't need more. I hope to finish two additional verbatim files for XML and Shell scripts in the next days. As I don't have any experience in writing Lua code I chose to use the tex/context/base/verb-*.lua and the verb-cpp.lua files posted by Shen Chen in http://archive.contextgarden.net/message/20081002.173802.460c46fe.en.html) for a start. Additionally I used the vim syntax files and the official Apache documentation. Here is an overview of what is covered: The verb-apa.lua file distinguishes between the following five states: - declarations - strings - sections (like and ) - comments - options The verb-py.lua file distinguishes between the following five states: - all statements, repeats, conditionals and operators - strings (multi line comment wit ''' or """ are supported) - preconditions (import, from, as) - comments - builtins The verb-py.cfg file distinguishes between the following four states: - sections - variables - keywords - comments Regards, Drazen ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________