raw_string: '`' {.} '`'; interpreted_string: '"' {_byte_value | _little_u_value | _big_u_value | _escaped_char | ' ' - '!' | '#' - '[' | ']' - '\U0010FFFF'} '"'; _unicode_value: . | _little_u_value | _big_u_value | _escaped_char; _byte_value: _octal_byte_value | _hex_byte_value; _little_u_value: '\\' 'u' _hex_digit _hex_digit _hex_digit _hex_digit; _big_u_value: '\\' 'U' _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit _hex_digit; _escaped_char: '\\' ('a' | 'b' | 'f' | 'n' | 'r' | 't' | 'v' | '\\' | '\'' | '"'); _octal_byte_value: '\\' _oct_digit _oct_digit _oct_digit; _hex_byte_value: '\\' 'x' _hex_digit _hex_digit; rune: '\'' (_unicode_value | _byte_value) '\''; _bin_digit: '0' - '1'; _bin_digits: _bin_digit {_bin_digit | '_'}; _oct_digit: _bin_digit | '2' - '7'; _oct_digits: _oct_digit {_oct_digit | '_'}; _dec_digit: _oct_digit | '8' - '9'; _dec_digits: _dec_digit {_dec_digit | '_'}; _hex_digit: _dec_digit | 'A' - 'F' | 'a' - 'f'; _hex_digits: _hex_digit {_hex_digit | '_'}; _int: ['-' | '+'] '0' ('b' | 'B') _bin_digits | ['-' | '+'] '0' ('o' | 'O') _oct_digits | ['-' | '+'] _dec_digits | ['-' | '+'] '0' ('x' | 'X') _hex_digits; int: _int; _dec_exponent: ('e' | 'E') ['+' | '-'] _dec_digits; _dec_float: ['-' | '+'] _dec_digits '.' [_dec_digits] [_dec_exponent] | _dec_digits _dec_exponent | '.' _dec_digits [_dec_exponent]; _hex_exponent: ('p' | 'P') ['+' | '-'] _dec_digits; _hex_mantissa: ['_'] _hex_digits '.' _hex_digits | ['_'] _hex_digits | '.' _hex_digits; _hex_float: ['-' | '+'] '0' ('x' | 'X') _hex_mantissa _hex_exponent; _float: _dec_float | _hex_float; float: _float; imaginary: (_dec_digits | _int | _float) 'i'; _name_initial: 'A' - 'Z' | 'a' - 'z' | '_' | '~' | '!' | '@' | '#' | '$' | '%' | '^' | '&' | '*' | '-' | '_' | '+' | '=' | '?' | '/' | '.'; _name_char: _name_initial | _dec_digit; name: _name_initial {_name_char}; !whitespace: ' ' | '\t' | '\n' | '\r'; !comment: ';' {.} '\n'; << import ( "azalea/schema/ast" "azalea/schema/token" ) >> Schema: ExprList; ExprList : Expr <> | ExprList Expr <> ; ValList : Val <> | ValList Val <> ; Val : raw_string <> | interpreted_string <> | rune <> | int <> | float <> | imaginary <> | name <> | Expr <> ; Expr : "(" name Val Val ")" <> | "(" name Val ")" <> | "(" name ")" <> | "(" "." ValList ")" <> ;