Skip to content

Commit

Permalink
abnf: 🎨 minor style changes
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Nov 14, 2017
1 parent f431d48 commit 369fd8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

This comment was marked as off-topic.

Copy link
@Fahad19911

Fahad19911 May 6, 2021

00ffa

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions toml.abnf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 369fd8a

Please sign in to comment.