lqf 0.1.1

A lightweight, easy-to-read config format with clean section syntax and simple parsing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
WHITESPACE = _{ " " | "\t" | "\n" }
COMMENT = _{ "#" ~ (!"\n" ~ ANY)* }

file = { SOI ~ section* ~ EOI }

section = { section_header ~ assignment* }
section_header = { ">" ~ identifier }
assignment = { identifier ~ ">>" ~ value }

value = _{ string | number | boolean | array | null }
string = { "\"" ~ (!"\"" ~ ANY)* ~ "\"" }
number = { ASCII_DIGIT+ ~ ("." ~ ASCII_DIGIT+)? }
boolean = { "true" | "false" }
null = { "null" }
array = { "[" ~ (value ~ ("," ~ value)*)? ~ "]" }

identifier = @{ ASCII_ALPHANUMERIC+ }