TAO: grammar


The formal grammar of TAO is defined below in various notations. For brevity the following simple rules are defined only descriptively:

Augmented Backus-Naur Form (ABNF)

    op = "`" any
    note = 1*any-except-meta
    tree = "[" tao "]"
    tao  = *(tree / op / note)

Backus-Naur Form (BNF)

    <op> ::= "`" <any>
    <note> ::= <any-except-meta> | <note> <note>
    <tree> ::= "[" <tao> "]"
    <tao>  ::= "" | <tree> | <op> | <note> | <tao> <tao>


The above formal definitions can be translated as:

The three parts of a tao are captured mnemonically in the TAO acronym which expands to Tree Annotation Operator where:


  1. All grammar definitions should be equivalent.

  2. A reference implementation of the grammar is available as an interactive parser in JavaScript.