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> | ""
-------------------------------------------------------------------------------