From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/49953 Path: news.gmane.org!not-for-mail From: "R. Bastian" Newsgroups: gmane.comp.tex.context Subject: Re: BNF grammar for ConTeXt (was: What happened with sectionworld?) Date: Thu, 30 Apr 2009 12:05:11 +0200 Message-ID: <20090430120511.4208c4c4@KUBUNTU64> References: <1D0F418D-E66C-4A90-9616-8757CDB08058@fiee.net> <20090429174315.3d61cce0@KUBUNTU64> <20090429184654.740d27cf@KUBUNTU64> <20090429231641.693c8867@KUBUNTU64> <20090430101646.237ad726@KUBUNTU64> 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 1241085996 8391 80.91.229.12 (30 Apr 2009 10:06:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Apr 2009 10:06:36 +0000 (UTC) To: ntg-context@ntg.nl Original-X-From: ntg-context-bounces@ntg.nl Thu Apr 30 12:06:27 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 1LzT9u-0004On-Sa for gctc-ntg-context-518@m.gmane.org; Thu, 30 Apr 2009 12:06:26 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id D0FC41FDEF; Thu, 30 Apr 2009 12:06:18 +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 19082-05; Thu, 30 Apr 2009 12:05:25 +0200 (CEST) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 45DB31FDE2; Thu, 30 Apr 2009 12:05:25 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 4C2C71FDE2 for ; Thu, 30 Apr 2009 12:05:23 +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 04195-01-3 for ; Thu, 30 Apr 2009 12:05:14 +0200 (CEST) Original-Received: from filter1-til.mf.surf.net (filter1-til.mf.surf.net [194.171.167.217]) by ronja.ntg.nl (Postfix) with ESMTP id 823881FD09 for ; Thu, 30 Apr 2009 12:05:13 +0200 (CEST) Original-Received: from smtp2e.orange.fr (smtp2e.orange.fr [80.12.242.111]) by filter1-til.mf.surf.net (8.13.8/8.13.8/Debian-3) with ESMTP id n3UA5CYw012257 for ; Thu, 30 Apr 2009 12:05:12 +0200 Original-Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2e04.orange.fr (SMTP Server) with ESMTP id 4CEA28000339 for ; Thu, 30 Apr 2009 12:05:12 +0200 (CEST) Original-Received: from KUBUNTU64 (AStrasbourg-156-1-67-224.w86-204.abo.wanadoo.fr [86.204.126.224]) by mwinf2e04.orange.fr (SMTP Server) with ESMTP id E9F738000333 for ; Thu, 30 Apr 2009 12:05:11 +0200 (CEST) X-ME-UUID: 20090430100511959.E9F738000333@mwinf2e04.orange.fr In-Reply-To: X-Mailer: Claws Mail 2.10.0 (GTK+ 2.12.0; x86_64-pc-linux-gnu) X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=80.12.242.111; country=FR; latitude=46.0000; longitude=2.0000; http://maps.google.com/maps?q=46.0000,2.0000&z=6 X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 217534898 - 660154f0b0e0 - 20090430 X-Scanned-By: CanIt (www . roaringpenguin . com) on 194.171.167.217 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:49953 Archived-At: On Thu, 30 Apr 2009 10:57:04 +0200 luigi scarso scribit: > On Thu, Apr 30, 2009 at 10:16 AM, R. Bastian wrote: > > > On Thu, 30 Apr 2009 09:48:40 +0200 > > luigi scarso scribit: > > > > > R. Bastian: > > > > > > > CONTEXT_SOURCE ::= PREAMBLE "\starttext" TEXT "\stoptext" | > > CONTEXT_SOURCE > > > >>> TEXT ::= STARTSTOPS | SETUPS | DEFINES | OTHERS [ TEXT > > > >> > > > >> luigi: > > > > > > > To be general, i think > > > >> MY_CONTEXT_SOURCE ::= MACRO* END > > > >> > > > > > > > R. Bastian: > > > > > > > I dont understand the sense of "\end\starttext" > > > > > > sense==semantic > > > > > > "\end""\starttext" is a valid string for a hypothetical bnf grammar of > > > ContTeXt > > > which is not valid for your bnf ; > > > "\end""\starttext""\stoptext" is in your bnf grammar > > > and has the same semantic of "\end""\starttext" . > > > > > > The point is : a bnf for Context can be hard to define > > > > > > > > > luigi: > > > > > > think that a bnf or lpeg grammar is really useful for a sort of > > > >> standard-ConTeXt > > > >> or minimal-ConTeXt or light-ConTeXt > > > >> ie a ConTeXt to use as "reference" > > > >> > > > > > > > R. Bastian: > > > > > > > Exactly what I need : standard, minimal and light > > > > > > > > > > Exactly what can be hard to define and capture in a bnf . > > > > > > wolfgang > > > > > > > > > > > How could a BNF grammar help to learn ConTeXt, > > > > > > a bnf can help to build a syntax checker, a highlighter etc. > > > Actually the only way to say that you have a valid ConTeXt string > > > is running context on that string . > > > > > > The semantic is another story. > > > > OK - but isn't it not worth to try it ? > > > sure, and I encourage you to go on and possibly write something x next > eurotex. > > My suggestions to start : > 1) define a **simple but significative** domain ,ie "this grammar is for > subset of ConTeXt language dedicated to variable-data pdf forms" yes > 2) make a bnf grammar spec yes > 3) build a parser lex/yacc for 2) later > 4) make a lpeg grammar > 5) user lpeg inside context for 3) > > PS > it was just a coincidence , but for other reasons I have found this link > http://martinfowler.com/dslwip/ > > -- > luigi I think a wiki would be a better forum than this mailing-list ? ___________________________________________________________________________________ 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 ___________________________________________________________________________________