Flux language specification

The following document specifies the Flux language and query execution.

This document is a living document and may not represent the current implementation of Flux. Any section that is not currently implemented is commented with a [IMPL#XXX] where XXX is an issue number tracking discussion and progress towards implementation.

The Flux language is centered on querying and manipulating time series data.

Notation

The syntax of the language is specified using Extended Backus-Naur Form (EBNF):

  1. Production = production_name "=" [ Expression ] "." .
  2. Expression = Alternative { "|" Alternative } .
  3. Alternative = Term { Term } .
  4. Term = production_name | token [ "…" token ] | Group | Option | Repetition .
  5. Group = "(" Expression ")" .
  6. Option = "[" Expression "]" .
  7. Repetition = "{" Expression "}" .

Productions are expressions constructed from terms and the following operators, in increasing precedence:

  1. | alternation
  2. () grouping
  3. [] option (0 or 1 times)
  4. {} repetition (0 to n times)

Lower-case production names are used to identify lexical tokens. Non-terminals are in Camel case. Lexical tokens are enclosed in double quotes ("") or back quotes (``).

flux