Toml: Verify the ABNF

Created on 16 Aug 2019  路  7Comments  路  Source: toml-lang/toml

I like that progress is being made on various tweaks to the ABNF to bring it closer to the README's requirements, I have to ask, even at the risk of sounding dumb:

What would verifying the ABNF even mean? https://github.com/toml-lang/toml/projects/1#card-21107891

abnf

Most helpful comment

@workingjubilee Good catch. Keeping floats and integers separated is the way to go.

Full disclosure: I would prefer heterogeneous arrays in v1.0.0, if it could be done. But if we're going to do something wrong, we'd best do the wrong thing right. See #663.

All 7 comments

What would verifying the ABNF even mean? toml-lang/toml/projects/1#card-21107891

Making sure that all the rules are in sync with what the README states and to sit and try to identify things like #640.

Do single-type arrays need to be made explicit in the ABNF? As it currently stands, the ABNF allows multi-type arrays.

Writing this with https://github.com/toml-lang/toml/issues/553#issuecomment-445187862 in mind; float and int may or may not be grouped together.

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

Arrays are square brackets with values inside. Whitespace is ignored. Elements are separated by commas. Data types may not be mixed (different ways to define strings should be considered the same type, and so should arrays with different element types).
... # truncated
arr6 = [ 1, 2.0 ] # INVALID
-TOML

Integer and Floats seem to be pretty clearly defined as separate types in the spec. If the ABNF is desired to be current as of 1.0, it should probably reject arr6 = [ 1, 2.0 ], and can be iterated on later if we do in fact commit to a change of allowing heterogenous arrays.

@workingjubilee Good catch. Keeping floats and integers separated is the way to go.

Full disclosure: I would prefer heterogeneous arrays in v1.0.0, if it could be done. But if we're going to do something wrong, we'd best do the wrong thing right. See #663.

~I don't think anything other than #640 is left here.~

I was wrong; this got posted accidentally. 馃檲

Now, I actually think #640 (and open PRs) are the only thing left to do here.

I went through the ABNF today -- while I'm sure there's some degree of inattention-due-to-familiarity concerns, the ABNF seems to be pretty much in sync with the README so I'm gonna go ahead and close this now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chillum picture chillum  路  4Comments

mqudsi picture mqudsi  路  3Comments

Silentdoer picture Silentdoer  路  4Comments

hukkin picture hukkin  路  4Comments

LongTengDao picture LongTengDao  路  4Comments