@@grammar::Able
@@eol_comments :: /#([^\n]*?)$/
@@parseinfo :: True

start = @:implicit_list $ ;

sign = '+' | '-' ;

DECIMAL = '.' ;

DECIMAL_FRAGMENT = /[0-9]+/ ;

HEX_FRAGMENT = /[0-9a-fA-F]+/ ;

BINARY_FRAGMENT = /[01]+/ ;

hex_prefix = '0x' | '0X' ;

binary_prefix = '0b' | '0B' ;

numeric_float = [sign] DECIMAL_FRAGMENT DECIMAL DECIMAL_FRAGMENT ;

infinity = /(?i)[+-]?inf(inity)?/ ;

float = numeric_float | 'nan' | infinity ;

hex_integer = [sign] hex_prefix HEX_FRAGMENT ;

binary_integer = [sign] binary_prefix BINARY_FRAGMENT ;

decimal_integer = [sign] DECIMAL_FRAGMENT ;

number = float | hex_integer | binary_integer | decimal_integer ;

double_quoted_string = '"' @:/[^"]+/ '"' ;

single_quoted_string = "'" @:/[^']+/ "'" ;

string = double_quoted_string | single_quoted_string ;

pair = @:/[\w]+/ ':' @:value ;

value = number | string | pair | list ;

list = '[' @:{ value }* ']' ;

implicit_list = { value }* ;
