From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier Schwander Subject: Re: Formal description of Org files Date: Wed, 20 Apr 2011 14:37:41 +0200 Message-ID: <20110420123741.GA21304@buga.lan> References: <4213EBED-2EFC-413F-8618-2A594AECEDCF@gmail.com> <877hav8lup.fsf@gmail.com> <2970.1302892280@alphaville.americas.hpqcorp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCWfA-0001xB-UW for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 08:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCWf9-0005fF-Cu for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 08:37:44 -0400 Received: from ns27638.ovh.net ([91.121.87.85]:59142) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCWf9-0005ex-2J for emacs-orgmode@gnu.org; Wed, 20 Apr 2011 08:37:43 -0400 Content-Disposition: inline In-Reply-To: <2970.1302892280@alphaville.americas.hpqcorp.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nick Dokos Cc: emacs-orgmode mailing list , Carsten Dominik Le 15 Apr 2011 14:31, Nick Dokos a écrit: > Eric Schulte wrote: > > > If one goal of such a formal description of Org-mode would be to parse > > text Org-mode files into an abstract syntax tree ... > > > > I think this should be the starting point: what are the goals for all this? > Providing a formal description in EBNF is one thing. Preparing an attribute > grammar for input into a specific tool is another (and probably an order of > magnitude - or two - harder) - what would the resulting parser(s) be used for? > > Clear(er) answers to these questions should go a long way towards figuring out > what specific tool(s) should be used - or whether it's at all necessary to > worry about that. The primary goal I see for such a formal description is to provide a specification that third party parsers are supposed to respect. Writing a real parser may be too much project specific and difficult to generalize in a way usable by the community. During the development of neo[1], I was confronted to the need of defining what is an org file (actually, what is an headline, a todo keyword, a tag, a drawer, a timestamp, etc) and determining what is the expected output of a parser. Maybe the most appropriate format for such a description would be free text, letting parser developers choosing between context-free grammars, regexps or whatever they want ( with a bunch of example org files for reference and tests). Regards, Olivier [1] I am just discovering this thread