From: Michael <Mic...@ya...> - 2005-07-01 05:28:37
|
YAMLCookbook at http://yaml4r.sourceforge.net/cookbook/ says: =2D------------------------------------------------------------------------= =2D--------------------- Commas in Values Brief List items in collections are delimited by commas, but there must be a spac= e=20 after each comma. This allows you to add numbers without quoting. Yaml Commas in Values in YAML?=20 attendances: [ 45,123, 70,000, 17,222 ]=20 Ruby Commas in Values in Ruby?=20 { 'attendances' =3D> [ 45123, 70000, 17222 ] }=20 =2D------------------------------------------------------------------------= =2D--------------------- But looking at the YAML specification, productions 191-194 [191] c-flow-sequence(n,c) ::=3D =E2=80=9C[=E2=80=9D s-separate(n= ,c)?=20 ns-s-flow-seq-inner(n,c)* ns-s-flow-seq-last(n,c)? =E2=80=9C]=E2=80=9D [192] ns-s-flow-seq-inner(n,c) ::=3D ns-s-flow-seq-entry(n,c) =E2=80= =9C,=E2=80=9D=20 s-separate(n,c)? [193] ns-s-flow-seq-last(n,c) ::=3D ns-s-flow-seq-entry(n,c) [194] ns-s-flow-seq-entry(n,c) ::=3D ( ns-flow-node(n,in-flow(c)) s-separate(n,in-flow(c))? ) | ns-s-flow-single-pair(n,in-flow(c))=20 It seems that comma in collection can have no spaces after it, so [ 45,123= ,=20 70,000, 17,222 ] must be parsed as [ 45, 123, 70, 000, 17, 222 ]. What is wrong? Michael |