Bach syntax

Current negotiation identifier is Bach_beta2. Final will be Bach.

Elements in mapping and lists are separated with ,.

Mapping is surrounded with {}. Elements in mapping are encoded as name:value. Name is encoded without quotes if it consists of digits or uppercase or lowercase letter (a-z) or _. Name must not start with a number. Quoted name can contain anything, see strings. Value can be anything.

List is surrounded with []. Values can be anything. Top level object in streams is a list. So stream starts with [ and ends with ] (same as <atlas> and </atlas> in XML).

Integer can start with +- (optional) and digits.

Float numbers consist of mantissa and exponent (optional). Mantissa can contain one .. Otherwise they are encoded as integers and are separated with e or E (in case there is an exponent).

String is surrounded with " and " is quoted as \" and \ is quoted as \\. (in future may allow octals and special characters like \n).

# is comment character: all character from this to end of line is comment. (Might be some day decoded as "comment" -attribute or something equivalent)

Whitespace is allowed outside values and names (Regular expression \s or any of \t \n\r\f\v).

Example:

{
   parents: ["info"], 
   arg: {
     name: "Joe", 
     pos: [4.5, 6.7, 2.3], 
     meaning_of_life: 42
   }
}

Aloril
Last modified: Mon Jul 8 05:02:40 EEST 2002