Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newline-Delimited Inner Tables #551

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion toml.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ dotted-key = simple-key 1*( dot-sep simple-key )
dot-sep = ws %x2E ws ; . Period
keyval-sep = ws %x3D ws ; =

val = string / boolean / array / inline-table / date-time / float / integer
val = string / boolean / array / table-val / date-time / float / integer
table-val = inline-table / inner-table

;; String

Expand Down Expand Up @@ -211,6 +212,17 @@ std-table = std-table-open key std-table-close
std-table-open = %x5B ws ; [ Left square bracket
std-table-close = ws %x5D ; ] Right square bracket

;; Newline-Delimited Inner Table

inner-table = inner-table-open inner-table-keyvals inner-table-close

inner-table-open = %x7B ws [comment] newline ; { at end of line
inner-table-close = ws %x7D ; } at start of line

inner-table-keyvals = *( inner-table-keyval newline )
inner-table-keyval = ws [ comment ]
inner-table-keyval =/ ws keyval ws [ comment ]

;; Inline Table

inline-table = inline-table-open inline-table-keyvals inline-table-close
Expand Down