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

Sync ABNF and Specification #491

Merged
merged 13 commits into from
Nov 23, 2017
Next Next commit
abnf: 🎨 minor style changes
pradyunsg committed Nov 14, 2017
commit 369fd8aef1a38373151e23a6a0da33baa7621f6d
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -125,8 +125,6 @@ as strings. **Quoted keys** follow the exact same rules as either basic strings
or literal strings and allow you to use a much broader set of key names. Best
practice is to use bare keys except when absolutely necessary.



```toml
key = "value"
bare_key = "value"
@@ -149,8 +147,8 @@ discouraged).
'' = 'blank' # VALID but discouraged
```

Values must be of the following types: String, Integer, Float, Boolean, Datetime,
Array, or Inline Table. Unspecified values are invalid.
Values must be of the following types: String, Integer, Float, Boolean,
Datetime, Array, or Inline Table. Unspecified values are invalid.

```toml
key = # INVALID
@@ -327,6 +325,7 @@ flt6 = -2E-2
# both
flt7 = 6.626e-34
```

A fractional part is a decimal point followed by one or more digits.

An exponent part is an E (upper or lower case) followed by an integer part
@@ -409,7 +408,6 @@ timezone.
```toml
lt1 = 07:32:00
lt2 = 00:32:00.999999

```

The precision of fractional seconds is implementation specific, but at least
8 changes: 4 additions & 4 deletions toml.abnf
Original file line number Diff line number Diff line change
@@ -57,15 +57,15 @@ table = std-table / array-table

;; Standard Table

std-table = std-table-open key *( table-key-sep key) std-table-close
std-table = std-table-open key *( table-key-sep key ) std-table-close

std-table-open = %x5B ws ; [ Left square bracket
std-table-close = ws %x5D ; ] Right square bracket
table-key-sep = ws %x2E ws ; . Period

;; Array Table

array-table = array-table-open key *( table-key-sep key) array-table-close
array-table = array-table-open key *( table-key-sep key ) array-table-close

array-table-open = %x5B.5B ws ; [[ Double left square bracket
array-table-close = ws %x5D.5D ; ]] Double right quare bracket
@@ -123,7 +123,7 @@ ml-basic-string = ml-basic-string-delim ml-basic-body ml-basic-string-delim

ml-basic-string-delim = 3quotation-mark

ml-basic-body = *( ml-basic-char / newline / ( escape ws newline ))
ml-basic-body = *( ml-basic-char / newline / ( escape ws newline ) )
ml-basic-char = ml-basic-unescaped / escaped
ml-basic-unescaped = %x20-5B / %x5D-10FFFF

@@ -165,7 +165,7 @@ time-secfrac = "." 1*DIGIT
time-numoffset = ( "+" / "-" ) time-hour ":" time-minute
time-offset = "Z" / time-numoffset

partial-time = time-hour ":" time-minute ":" time-second [time-secfrac]
partial-time = time-hour ":" time-minute ":" time-second [ time-secfrac ]
full-date = date-fullyear "-" date-month "-" date-mday
full-time = partial-time time-offset