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

Change ABNF array definition to permit single value types only #663

Closed
wants to merge 6 commits into from
30 changes: 28 additions & 2 deletions toml.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,34 @@ array = array-open [ array-values ] ws-comment-newline array-close
array-open = %x5B ; [
array-close = %x5D ; ]

array-values = ws-comment-newline val ws array-sep array-values
array-values =/ ws-comment-newline val ws [ array-sep ]
array-values = array-strings
array-values =/ array-booleans
array-values =/ array-arrays
array-values =/ array-inline-tables
array-values =/ array-date-times
array-values =/ array-floats
array-values =/ array-integers

array-strings = ws-comment-newline string ws array-sep array-strings
array-strings =/ ws-comment-newline string ws [ array-sep ]

array-booleans = ws-comment-newline boolean ws array-sep array-booleans
array-booleans =/ ws-comment-newline boolean ws [ array-sep ]

array-arrays = ws-comment-newline array ws array-sep array-arrays
array-arrays =/ ws-comment-newline array ws [ array-sep ]

array-inline-tables = ws-comment-newline inline-table ws array-sep array-inline-tables
array-inline-tables =/ ws-comment-newline inline-table ws [ array-sep ]

array-date-times = ws-comment-newline date-time ws array-sep array-date-times
array-date-times =/ ws-comment-newline date-time ws [ array-sep ]

array-floats = ws-comment-newline float ws array-sep array-floats
array-floats =/ ws-comment-newline float ws [ array-sep ]

array-integers = ws-comment-newline integer ws array-sep array-integers
array-integers =/ ws-comment-newline integer ws [ array-sep ]

array-sep = %x2C ; , Comma

Expand Down