From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/15265 Path: main.gmane.org!not-for-mail From: Nikolai Weibull Newsgroups: gmane.comp.tex.context Subject: Wrapping \type{} Date: Sun, 30 May 2004 01:20:22 +0200 Sender: ntg-context-admin@ntg.nl Message-ID: <20040529232021.GA3268@puritan.pcp.ath.cx> Reply-To: ntg-context@ntg.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1085872975 13949 80.91.224.253 (29 May 2004 23:22:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 29 May 2004 23:22:55 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Sun May 30 01:22:48 2004 Return-path: Original-Received: from ref.vet.uu.nl ([131.211.172.13] helo=ref.ntg.nl) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BUDA8-0001HT-00 for ; Sun, 30 May 2004 01:22:48 +0200 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id E595F10B09; Sun, 30 May 2004 01:17:56 +0200 (MEST) Original-Received: from mxfep02.bredband.com (mxfep02.bredband.com [195.54.107.73]) by ref.ntg.nl (Postfix) with ESMTP id DBEC010ACC for ; Sun, 30 May 2004 01:15:35 +0200 (MEST) Original-Received: from puritan.pcp.ath.cx ([213.112.43.196] [213.112.43.196]) by mxfep02.bredband.com with ESMTP id <20040529232022.IIQG14728.mxfep02.bredband.com@puritan.pcp.ath.cx> for ; Sun, 30 May 2004 01:20:22 +0200 Original-Received: by puritan.pcp.ath.cx (Postfix, from userid 1000) id 2C85DADFDF; Sun, 30 May 2004 01:20:22 +0200 (CEST) Original-To: NTG-context List Content-Disposition: inline User-Agent: Mutt/1.5.6i Errors-To: ntg-context-admin@ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.0.13 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.comp.tex.context:15265 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:15265 In my BNF module I use " as an active character that begins and ends terminals in the grammar: : ; , "\|", . Now, the above doesn't quite work as written, as \ is still active (and so is, in fact | as we're really inside a \starttabulate. What I would like for the "" pair to do is work as a wrapper for \type{}, so that everything in-between is passed on to \type{}. Is there a way of getting them to do that? This is my current definition: \gdef"% {\ifBNFoutsidestring% \global\BNFoutsidestringfalse% \begingroup% \BNFunsetcatcodes% \catcode`\"\@@active% \@@bnfterminalstart% \else% \@@bnfterminalstop% \endgroup% \global\BNFoutsidestringtrue% \fi} I figured something like \long\gdef"#1"% {\type{#1}} might work, but it didn't. It chokes on "." where . is also an activated character for terminating a production in the grammar. Any suggestions on how to go about this? I mean, the obvious solution is simply to write : ; , "\type{\|}", . instead, but I would like to keep the input as clean as possible. nikolai -- ::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka ::: ::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden ::: ::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 ::: main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}