TAO: grammar

The formal grammar of TAO is defined below in various notations.

Notes

  1. All grammar definitions should be equivalent.

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

  3. For brevity the following simple rules are defined only descriptively:

Descriptive

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>