infinite negative utility


The adnot format (a shortering of Algebraic Data Notation) is a work-in-progress data format intended for human-readable data storage and editing. It arguably looks to fill a niche like YAML or TOML, but it is much simpler than either of those; conversely, it can be understood as an attempt to borrow the best features of both JSON and s-expressions into a single format. Finally, unlike most other data storage formats, it has a built-in notion of tagged data which is convenient for serializing algebraic data types as used in something like Haskell, OCaml, or Rust.

# adnot expressions allow bash-style line comments
[ # lists are written with square brackets
   22 # an integer literal

An Adnot expression is either an atomic value or a composite value. Atomic values include integers, rational numbers, strings contained in double quotes, and bare alphanumeric symbols. Composite values include lists, maps, and tagged values: a list is zero or more whitespace-separated expressions contained in square brackets; a map is zero or more whitespace-separated symbol-expression pairs contained in curly brackets, and tagged sequences are an obligatory symbol followed by zero or more whitespace-separated expressions contained in parentheses.

expr ::= "{" (symbol expr) * "}"
       | "(" symbol expr* ")"
       | "[" expr* "]"
       | string
       | symbol
       | integer
       | double