297 lines
6.3 KiB
Plaintext
297 lines
6.3 KiB
Plaintext
================================================================================
|
|
VALID - empty file
|
|
================================================================================
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document)
|
|
|
|
================================================================================
|
|
INVALID - key/value pair - multiline string for keys are not allowed
|
|
================================================================================
|
|
|
|
"""
|
|
invalid
|
|
multiline
|
|
basic
|
|
key
|
|
""" = false
|
|
|
|
'''
|
|
invalid
|
|
multiline
|
|
literal
|
|
key
|
|
''' = false
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(ERROR
|
|
(quoted_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key))
|
|
(pair
|
|
(bare_key)
|
|
(ERROR)
|
|
(boolean))
|
|
(ERROR
|
|
(quoted_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key))
|
|
(pair
|
|
(bare_key)
|
|
(ERROR)
|
|
(boolean)))
|
|
|
|
================================================================================
|
|
INVALID - float - whitespaces between its components are not allowed
|
|
================================================================================
|
|
|
|
invalid_fractional = 1 .0
|
|
invalid_exponent = 1 e 2
|
|
invalid_both = 1 .0 e 2
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(ERROR
|
|
(bare_key)
|
|
(integer)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)))
|
|
|
|
================================================================================
|
|
INVALID - offset date time - whitespaces between its components are not allowed
|
|
================================================================================
|
|
|
|
invalid1 = 1979-05-27 07:32:00 Z
|
|
invalid2 = 1979-05-27 T 07:32:00 Z
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(ERROR
|
|
(bare_key)
|
|
(local_date)
|
|
(local_time)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(local_time)
|
|
(bare_key)))
|
|
|
|
================================================================================
|
|
INVALID - local date time - whitespaces between its components are not allowed
|
|
================================================================================
|
|
|
|
invalid1 = 1979-05-27 07:32:00
|
|
invalid2 = 1979-05-27 T 07:32:00
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(ERROR
|
|
(bare_key)
|
|
(local_date)
|
|
(local_time)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(local_time)))
|
|
|
|
================================================================================
|
|
VALID - local date - trailing whitespaces are allowed
|
|
================================================================================
|
|
|
|
valid = 1979-05-27
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(pair
|
|
(bare_key)
|
|
(local_date)))
|
|
|
|
================================================================================
|
|
INVALID - table - multiline string for header keys are not allowed
|
|
================================================================================
|
|
|
|
["""
|
|
invalid
|
|
multiline
|
|
basic
|
|
key
|
|
"""]
|
|
|
|
['''
|
|
invalid
|
|
multiline
|
|
basic
|
|
key
|
|
''']
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(table
|
|
(ERROR
|
|
(quoted_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key))
|
|
(bare_key)
|
|
(ERROR))
|
|
(table
|
|
(ERROR
|
|
(quoted_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key))
|
|
(bare_key)
|
|
(ERROR)))
|
|
|
|
================================================================================
|
|
INVALID - inline table - newlines outside of pairs are not allowed
|
|
================================================================================
|
|
|
|
key = {
|
|
newline = true
|
|
}
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(pair
|
|
(bare_key)
|
|
(inline_table
|
|
(ERROR)
|
|
(pair
|
|
(bare_key)
|
|
(boolean))
|
|
(ERROR))))
|
|
|
|
================================================================================
|
|
INVALID - array of tables - multiline string for header keys are not allowed
|
|
================================================================================
|
|
|
|
[["""
|
|
invalid
|
|
multiline
|
|
basic
|
|
key
|
|
"""]]
|
|
|
|
[['''
|
|
invalid
|
|
multiline
|
|
basic
|
|
key
|
|
''']]
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(ERROR
|
|
(ERROR
|
|
(quoted_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key)
|
|
(bare_key))
|
|
(bare_key)))
|
|
|
|
================================================================================
|
|
VALID - table - empty content separated by comments
|
|
================================================================================
|
|
|
|
[table]
|
|
|
|
# comment
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(table
|
|
(bare_key)
|
|
(comment)))
|
|
|
|
================================================================================
|
|
VALID - array of tables - empty content separated by comments
|
|
================================================================================
|
|
|
|
[[array-table]]
|
|
|
|
# comment
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(table_array_element
|
|
(bare_key)
|
|
(comment)))
|
|
|
|
================================================================================
|
|
VALID - table - two pairs separated by comments
|
|
================================================================================
|
|
|
|
[table]
|
|
|
|
a = 1
|
|
|
|
# comment
|
|
|
|
b = 2
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(table
|
|
(bare_key)
|
|
(pair
|
|
(bare_key)
|
|
(integer))
|
|
(comment)
|
|
(pair
|
|
(bare_key)
|
|
(integer))))
|
|
|
|
================================================================================
|
|
VALID - array of tables - two pairs separated by comments
|
|
================================================================================
|
|
|
|
[[array-table]]
|
|
|
|
a = 1
|
|
|
|
# comment
|
|
|
|
b = 2
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
(document
|
|
(table_array_element
|
|
(bare_key)
|
|
(pair
|
|
(bare_key)
|
|
(integer))
|
|
(comment)
|
|
(pair
|
|
(bare_key)
|
|
(integer))))
|