emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Formal description of Org files


From: Carsten Dominik
Subject: Re: [O] Formal description of Org files
Date: Fri, 15 Apr 2011 12:57:41 +0200

On Apr 15, 2011, at 10:54 AM, Rainer Stengele wrote:

> Am 15.04.2011 09:58, schrieb Carsten Dominik:
>> Hi,
>> 
>> I have a question.
>> 
>> At FOSDEM, someone asked me if there was a formal description of the 
>> structure of Org files, in some language that would be the input for a 
>> parser (or parser generator?) so that Org file could be easily parsed.
>> 
>> Unfortunately I did not catch the name of the format description language 
>> that could be
>> used for something, not did I catch the name of the person who talked to me.
>> 
>> Can anyone help out here?  Let me know what language to use, and maybe help 
>> work on such a formal description?  I think it would be useful to have....
>> 
>> - Carsten
>> 
> Hi,
> 
> maybe Backus-Naur was meant?


That is very well possible.  Sounds like a word I would not have recognized....
So would on Org-mode grammar start like this?

-------------------------------------------------------------------------------

<headline> ::= "*"+ <opt-todo-keyword>
                    <opt-priority-cookie>
                    <title>
                    <opt-tags>

<opt-todo-keyword> ::= <whitespace> <todo-keyword> | ""

<opt-priority-cookie> ::= <whitespace> <priority-cookie> | ""

<opt-tags> ::= <whitespace> <tags> | ""



<todo-keyword> ::= "TODO" | "DONE"

<priority-cookie> ::= "[" "#" <priority> "]"

<priority> ::= "A" | "B" | "C"                   

<tags> ::= ( ":" <tag> )+ ":"

<whitespace> ::= " " <opt-whitespace> | "\t" <opt-whitespace>

<opt-whitespace> ::= <whitespace> | ""

-------------------------------------------------------------------------------


reply via email to

[Prev in Thread] Current Thread [Next in Thread]