 |
Free Electron
|
9 "avg: 0.278 # Batting average\n" 10 "rbi: 147 # Runs Batted In";
16 "- New York Yankees\n" 24 " name: Mark McGwire\n" 33 "- [name , hr, avg ]\n" 34 "- [Mark McGwire, 65, 0.278]\n" 35 "- [Sammy Sosa , 63, 0.288]";
38 "Mark McGwire: {hr: 65, avg: 0.278}\n" 45 "# Ranking of 1998 home runs\n" 54 "- St Louis Cardinals";
59 "player: Sammy Sosa\n" 60 "action: strike (miss)\n" 64 "player: Sammy Sosa\n" 65 "action: grand slam\n" 70 "hr: # 1998 hr ranking\n" 74 " # 1998 rbi ranking\n" 82 " # Following node labeled SS\n" 85 " - *SS # Subsequent occurrence\n" 89 "? - Detroit Tigers\n" 94 "? [ New York Yankees,\n" 96 ": [ 2001-07-02, 2001-08-12,\n" 101 "# Products purchased\n" 102 "- item : Super Hoop\n" 104 "- item : Basketball\n" 106 "- item : Big Shoes\n" 118 " year was crippled\n" 119 " by a knee injury.";
123 " Sammy Sosa completed another\n" 124 " fine season with great stats.\n" 127 " 0.288 Batting Average\n" 132 "name: Mark McGwire\n" 133 "accomplishment: >\n" 134 " Mark set a major league\n" 135 " home run record in 1998.\n" 138 " 0.278 Batting Average\n";
141 "unicode: \"Sosa did fine.\\u263A\"\n" 142 "control: \"\\b1998\\t1999\\t2000\\n\"\n" 143 "hex esc: \"\\x0d\\x0a is \\r\\n\"\n" 145 "single: '\"Howdy!\" he cried.'\n" 146 "quoted: ' # Not a ''comment''.'\n" 147 "tie-fighter: '|\\-*-/|'";
151 " This unquoted scalar\n" 152 " spans many lines.\n" 154 "quoted: \"So does this\n" 155 " quoted scalar.\\n\"";
161 "hexadecimal: 0xC\n";
164 "canonical: 1.23015e+3\n" 165 "exponential: 12.3015e+02\n" 167 "negative infinity: -.inf\n" 168 "not a number: .NaN\n";
172 "booleans: [ true, false ]\n" 173 "string: '012345'\n";
176 "canonical: 2001-12-15T02:59:43.1Z\n" 177 "iso8601: 2001-12-14t21:59:43.10-05:00\n" 178 "spaced: 2001-12-14 21:59:43.10 -5\n" 179 "date: 2002-12-14\n";
183 "not-date: !!str 2002-04-28\n" 185 "picture: !!binary |\n" 186 " R0lGODlhDAAMAIQAAP//9/X\n" 187 " 17unp5WZmZgAAAOfn515eXv\n" 188 " Pz7Y6OjuDg4J+fn5OTk6enp\n" 189 " 56enmleECcgggoBADs=\n" 191 "application specific tag: !something |\n" 192 " The semantics of the tag\n" 193 " above may be different for\n" 194 " different documents.";
197 "%TAG ! tag:clarkevans.com,2002:\n" 199 " # Use the ! handle for presenting\n" 200 " # tag:clarkevans.com,2002:circle\n" 202 " center: &ORIGIN {x: 73, y: 129}\n" 206 " finish: { x: 89, y: 102 }\n" 210 " text: Pretty vector drawing.";
213 "# Sets are represented as a\n" 214 "# Mapping where each key is\n" 215 "# associated with a null value\n" 222 "# Ordered maps are represented as\n" 223 "# A sequence of mappings, with\n" 224 "# each mapping having one key\n" 226 "- Mark McGwire: 65\n" 231 "--- !<tag:clarkevans.com,2002:invoice>\n" 233 "date : 2001-01-23\n" 241 " city : Royal Oak\n" 248 " description : Basketball\n" 252 " description : Super Hoop\n" 257 " Late afternoon is best.\n" 258 " Backup contact is Nancy\n" 259 " Billsmer @ 338-4338.";
263 "Time: 2001-11-23 15:01:42 -5\n" 266 " This is an error message\n" 267 " for the log file\n" 269 "Time: 2001-11-23 15:02:31 -5\n" 272 " A slightly different error\n" 275 "Date: 2001-11-23 15:03:17 -5\n" 278 " Unknown variable \"bar\"\n" 280 " - file: TopClass.py\n" 283 " x = MoreObject(\"345\\n\")\n" 284 " - file: MoreClass.py\n" 301 "sequence: [ one, two, ]\n" 302 "mapping: { sky: blue, sea: green }";
304 const char *ex5_5 =
"# Comment only.";
307 "anchored: !local &anchor value\n" 327 " Line break (no glyph)\n" 328 " Line break (glyphed)\n";
331 "# Tabs and spaces\n" 332 "quoted: \"Quoted\t\"\n" 335 " \tprintf(\"Hello, world!\\n\");\n" 340 "\\\" \\a \\b \\e \\f \\\n" 341 "\\n \\r \\t \\v \\0 \\\n" 342 "\\ \\_ \\N \\L \\P \\\n" 343 "\\x41 \\u0041 \\U00000041\"";
351 " # Leading comment line spaces are\n" 352 " # neither content nor indentation.\n" 358 " Flow style: [ # Leading spaces\n" 359 " By two, # in flow style\n" 360 " Also by two, # are neither\n" 361 " \tStill by two # content nor\n" 388 " as a line feed\"\n" 390 " Clipped empty lines\n" 435 "{ first: Sammy, last: Sosa }:\n" 443 "%FOO bar baz # Should be ignored\n" 444 " # with a warning.\n" 448 "%YAML 1.3 # Attempt parsing\n" 449 " # with a warning\n" 459 "%TAG !yaml! tag:yaml.org,2002:\n" 473 "%TAG ! tag:example.com,2000:app/\n" 478 "%TAG !! tag:example.com,2000:app/\n" 480 "!!int 1 - 3 # Interval, not integer";
483 "%TAG !e! tag:example.com,2000:app/\n" 490 "!m!light fluorescent\n" 497 "%TAG !e! tag:example.com,2000:app/\n" 502 "!!str &a1 \"foo\":\n" 507 "!<tag:yaml.org,2002:str> foo :\n" 515 "%TAG !e! tag:example.com,2000:app/\n" 521 const char *ex6_27a =
522 "%TAG !e! tag:example,2000:app/\n" 526 const char *ex6_27b =
527 "%TAG !e! tag:example,2000:app/\n" 532 "# Assuming conventional resolution:\n" 538 "First occurrence: &anchor Value\n" 539 "Second occurrence: *anchor";
542 "First occurrence: &anchor Foo\n" 543 "Second occurrence: *anchor\n" 544 "Override anchor: &anchor Bar\n" 545 "Reuse anchor: *anchor";
560 "\"implicit block key\" : [\n" 561 " \"implicit flow key\" : value,\n" 568 "to a line feed, or \t\\\n" 569 " \\ \tnon-content\"";
575 "\t3rd non-empty \"";
577 const char *ex7_7 =
" 'here''s to \"quotes\"'";
580 "'implicit block key' : [\n" 581 " 'implicit flow key' : value,\n" 591 "# Outside flow collection:\n" 594 "- Up, up, and away!\n" 596 "- http://example.com/foo#bar\n" 597 "# Inside flow collection:\n" 600 " \"Up, up, and away!\",\n" 602 " http://example.com/foo#bar ]";
605 "implicit block key : [\n" 606 " implicit flow key : value,\n" 622 " quoted\", 'single\n" 625 " text, [ nested ],\n" 630 "- { one : two , three: four , }\n" 631 "- {five: six,seven : eight}";
635 "? explicit: entry,\n" 642 "unquoted : \"separate\",\n" 650 "\"adjacent\":value,\n" 651 "\"readable\":value,\n" 667 "- [ YAML : separate ]\n" 668 "- [ : empty key entry ]\n" 669 "- [ {JSON: like}:adjacent ]";
691 "- | # Empty header\n" 693 "- >1 # Indentation indicator\n" 695 "- |+ # Chomping indicator\n" 698 "- >1- # Both indicators\n" 806 const char *ex8_11 = ex8_10;
807 const char *ex8_12 = ex8_10;
808 const char *ex8_13 = ex8_10;
819 "- - one # Compact\n" 820 " - two # sequence\n" 821 "- one: two # Compact mapping\n";
828 "? explicit key # Empty value\n" 831 ": - one # Explicit compact\n" 832 " - two # block value\n";
835 "plain key: in-line value\n" 847 " \"flow in block\"\n" 850 "- !!map # Block collection\n"