From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/14833 Path: main.gmane.org!not-for-mail From: Hans Hagen Newsgroups: gmane.comp.tex.context Subject: Re: \doifnextcharelse problem Date: Thu, 26 Feb 2004 19:00:33 +0100 Sender: ntg-context-admin@ntg.nl Message-ID: <6.0.1.1.2.20040226185816.01febec0@server-1> References: <20040226163813.GG26896@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"; format=flowed X-Trace: sea.gmane.org 1077818585 14123 80.91.224.253 (26 Feb 2004 18:03:05 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 26 Feb 2004 18:03:05 +0000 (UTC) Original-X-From: ntg-context-admin@ntg.nl Thu Feb 26 19:02:52 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 1AwPqW-00005U-00 for ; Thu, 26 Feb 2004 19:02:52 +0100 Original-Received: from ref.ntg.nl (localhost.localdomain [127.0.0.1]) by ref.ntg.nl (Postfix) with ESMTP id 03DB010B2A; Thu, 26 Feb 2004 19:00:47 +0100 (MET) Original-Received: from mail.solcon.nl (mail.solcon.nl [212.45.33.11]) by ref.ntg.nl (Postfix) with ESMTP id 1907210B26 for ; Thu, 26 Feb 2004 18:59:44 +0100 (MET) Original-Received: from server-1.pragma-net.nl (dsl-212-84-128-085.solcon.nl [212.84.128.85]) by mail.solcon.nl (8.12.10/SQL-8.12.10-1/8.12.5) with ESMTP id i1QI1aAW028412 for ; Thu, 26 Feb 2004 19:01:36 +0100 Original-Received: by server-1.pragma-net.nl (Postfix, from userid 65534) id 725BD17D43; Thu, 26 Feb 2004 19:01:41 +0100 (CET) Original-Received: from laptop-3.wxs.nl (unknown [10.100.1.191]) by server-1.pragma-net.nl (Postfix) with ESMTP id B836517CED for ; Thu, 26 Feb 2004 18:01:39 +0000 (UTC) X-Sender: hagen-mail@server-1 X-Mailer: QUALCOMM Windows Eudora Version 6.0.1.1 Original-To: ntg-context@ntg.nl In-Reply-To: <20040226163813.GG26896@puritan.pcp.ath.cx> Original-References: <20040226163813.GG26896@puritan.pcp.ath.cx> X-AntiVirus: checked by Vexira Milter 1.0.6; VAE 6.24.0.5; VDF 6.24.0.20 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:14833 X-Report-Spam: http://spam.gmane.org/gmane.comp.tex.context:14833 At 17:38 26/02/2004, you wrote: >which case the first character in the body of the command is checked >\doifnextcharelse[... which thus fails but in some manner eats it (even tricky indeed (will think about it) go the etex way: \definecomplexorsimpleempty\startbnfgrammar \long\def\complexstartbnfgrammar[#1]#2\stopbnfgrammar {\bgroup% \global\firstruletrue% \global\newruletrue% \global\donerulefalse% \setupbnfgrammar[#1]% \setcatcodes% \starttable[|r|c|l|]\scantokens{#2}\LR\stoptable \egroup} beware, use \def\BNFsomecommand to avoid future nameclashes; also, no % are needed after a \cs: \long\def\complexstartbnfgrammar[#1]#2\stopbnfgrammar {\bgroup \global\firstruletrue \global\newruletrue \global\donerulefalse \setupbnfgrammar[#1]% \setcatcodes \starttable[|r|c|l|]\scantokens{#2}\LR\stoptable \egroup} I assume that you know that \setcatcodes is an internal command Hans