You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

868 lines
16 KiB

3 months ago
  1. namespace {
  2. const char *ex2_1 =
  3. "- Mark McGwire\n"
  4. "- Sammy Sosa\n"
  5. "- Ken Griffey";
  6. const char *ex2_2 =
  7. "hr: 65 # Home runs\n"
  8. "avg: 0.278 # Batting average\n"
  9. "rbi: 147 # Runs Batted In";
  10. const char *ex2_3 =
  11. "american:\n"
  12. "- Boston Red Sox\n"
  13. "- Detroit Tigers\n"
  14. "- New York Yankees\n"
  15. "national:\n"
  16. "- New York Mets\n"
  17. "- Chicago Cubs\n"
  18. "- Atlanta Braves";
  19. const char *ex2_4 =
  20. "-\n"
  21. " name: Mark McGwire\n"
  22. " hr: 65\n"
  23. " avg: 0.278\n"
  24. "-\n"
  25. " name: Sammy Sosa\n"
  26. " hr: 63\n"
  27. " avg: 0.288";
  28. const char *ex2_5 =
  29. "- [name , hr, avg ]\n"
  30. "- [Mark McGwire, 65, 0.278]\n"
  31. "- [Sammy Sosa , 63, 0.288]";
  32. const char *ex2_6 =
  33. "Mark McGwire: {hr: 65, avg: 0.278}\n"
  34. "Sammy Sosa: {\n"
  35. " hr: 63,\n"
  36. " avg: 0.288\n"
  37. " }";
  38. const char *ex2_7 =
  39. "# Ranking of 1998 home runs\n"
  40. "---\n"
  41. "- Mark McGwire\n"
  42. "- Sammy Sosa\n"
  43. "- Ken Griffey\n"
  44. "\n"
  45. "# Team ranking\n"
  46. "---\n"
  47. "- Chicago Cubs\n"
  48. "- St Louis Cardinals";
  49. const char *ex2_8 =
  50. "---\n"
  51. "time: 20:03:20\n"
  52. "player: Sammy Sosa\n"
  53. "action: strike (miss)\n"
  54. "...\n"
  55. "---\n"
  56. "time: 20:03:47\n"
  57. "player: Sammy Sosa\n"
  58. "action: grand slam\n"
  59. "...";
  60. const char *ex2_9 =
  61. "---\n"
  62. "hr: # 1998 hr ranking\n"
  63. " - Mark McGwire\n"
  64. " - Sammy Sosa\n"
  65. "rbi:\n"
  66. " # 1998 rbi ranking\n"
  67. " - Sammy Sosa\n"
  68. " - Ken Griffey";
  69. const char *ex2_10 =
  70. "---\n"
  71. "hr:\n"
  72. " - Mark McGwire\n"
  73. " # Following node labeled SS\n"
  74. " - &SS Sammy Sosa\n"
  75. "rbi:\n"
  76. " - *SS # Subsequent occurrence\n"
  77. " - Ken Griffey";
  78. const char *ex2_11 =
  79. "? - Detroit Tigers\n"
  80. " - Chicago cubs\n"
  81. ":\n"
  82. " - 2001-07-23\n"
  83. "\n"
  84. "? [ New York Yankees,\n"
  85. " Atlanta Braves ]\n"
  86. ": [ 2001-07-02, 2001-08-12,\n"
  87. " 2001-08-14 ]";
  88. const char *ex2_12 =
  89. "---\n"
  90. "# Products purchased\n"
  91. "- item : Super Hoop\n"
  92. " quantity: 1\n"
  93. "- item : Basketball\n"
  94. " quantity: 4\n"
  95. "- item : Big Shoes\n"
  96. " quantity: 1";
  97. const char *ex2_13 =
  98. "# ASCII Art\n"
  99. "--- |\n"
  100. " \\//||\\/||\n"
  101. " // || ||__";
  102. const char *ex2_14 =
  103. "--- >\n"
  104. " Mark McGwire's\n"
  105. " year was crippled\n"
  106. " by a knee injury.";
  107. const char *ex2_15 =
  108. ">\n"
  109. " Sammy Sosa completed another\n"
  110. " fine season with great stats.\n"
  111. " \n"
  112. " 63 Home Runs\n"
  113. " 0.288 Batting Average\n"
  114. " \n"
  115. " What a year!";
  116. const char *ex2_16 =
  117. "name: Mark McGwire\n"
  118. "accomplishment: >\n"
  119. " Mark set a major league\n"
  120. " home run record in 1998.\n"
  121. "stats: |\n"
  122. " 65 Home Runs\n"
  123. " 0.278 Batting Average\n";
  124. const char *ex2_17 =
  125. "unicode: \"Sosa did fine.\\u263A\"\n"
  126. "control: \"\\b1998\\t1999\\t2000\\n\"\n"
  127. "hex esc: \"\\x0d\\x0a is \\r\\n\"\n"
  128. "\n"
  129. "single: '\"Howdy!\" he cried.'\n"
  130. "quoted: ' # Not a ''comment''.'\n"
  131. "tie-fighter: '|\\-*-/|'";
  132. const char *ex2_18 =
  133. "plain:\n"
  134. " This unquoted scalar\n"
  135. " spans many lines.\n"
  136. "\n"
  137. "quoted: \"So does this\n"
  138. " quoted scalar.\\n\"";
  139. const char *ex2_19 =
  140. "canonical: 12345\n"
  141. "decimal: +12345\n"
  142. "octal: 0o14\n"
  143. "hexadecimal: 0xC\n";
  144. const char *ex2_20 =
  145. "canonical: 1.23015e+3\n"
  146. "exponential: 12.3015e+02\n"
  147. "fixed: 1230.15\n"
  148. "negative infinity: -.inf\n"
  149. "not a number: .NaN\n";
  150. const char *ex2_21 =
  151. "null:\n"
  152. "booleans: [ true, false ]\n"
  153. "string: '012345'\n";
  154. const char *ex2_22 =
  155. "canonical: 2001-12-15T02:59:43.1Z\n"
  156. "iso8601: 2001-12-14t21:59:43.10-05:00\n"
  157. "spaced: 2001-12-14 21:59:43.10 -5\n"
  158. "date: 2002-12-14\n";
  159. const char *ex2_23 =
  160. "---\n"
  161. "not-date: !!str 2002-04-28\n"
  162. "\n"
  163. "picture: !!binary |\n"
  164. " R0lGODlhDAAMAIQAAP//9/X\n"
  165. " 17unp5WZmZgAAAOfn515eXv\n"
  166. " Pz7Y6OjuDg4J+fn5OTk6enp\n"
  167. " 56enmleECcgggoBADs=\n"
  168. "\n"
  169. "application specific tag: !something |\n"
  170. " The semantics of the tag\n"
  171. " above may be different for\n"
  172. " different documents.";
  173. const char *ex2_24 =
  174. "%TAG ! tag:clarkevans.com,2002:\n"
  175. "--- !shape\n"
  176. " # Use the ! handle for presenting\n"
  177. " # tag:clarkevans.com,2002:circle\n"
  178. "- !circle\n"
  179. " center: &ORIGIN {x: 73, y: 129}\n"
  180. " radius: 7\n"
  181. "- !line\n"
  182. " start: *ORIGIN\n"
  183. " finish: { x: 89, y: 102 }\n"
  184. "- !label\n"
  185. " start: *ORIGIN\n"
  186. " color: 0xFFEEBB\n"
  187. " text: Pretty vector drawing.";
  188. const char *ex2_25 =
  189. "# Sets are represented as a\n"
  190. "# Mapping where each key is\n"
  191. "# associated with a null value\n"
  192. "--- !!set\n"
  193. "? Mark McGwire\n"
  194. "? Sammy Sosa\n"
  195. "? Ken Griffey";
  196. const char *ex2_26 =
  197. "# Ordered maps are represented as\n"
  198. "# A sequence of mappings, with\n"
  199. "# each mapping having one key\n"
  200. "--- !!omap\n"
  201. "- Mark McGwire: 65\n"
  202. "- Sammy Sosa: 63\n"
  203. "- Ken Griffey: 58";
  204. const char *ex2_27 =
  205. "--- !<tag:clarkevans.com,2002:invoice>\n"
  206. "invoice: 34843\n"
  207. "date : 2001-01-23\n"
  208. "bill-to: &id001\n"
  209. " given : Chris\n"
  210. " family : Dumars\n"
  211. " address:\n"
  212. " lines: |\n"
  213. " 458 Walkman Dr.\n"
  214. " Suite #292\n"
  215. " city : Royal Oak\n"
  216. " state : MI\n"
  217. " postal : 48046\n"
  218. "ship-to: *id001\n"
  219. "product:\n"
  220. " - sku : BL394D\n"
  221. " quantity : 4\n"
  222. " description : Basketball\n"
  223. " price : 450.00\n"
  224. " - sku : BL4438H\n"
  225. " quantity : 1\n"
  226. " description : Super Hoop\n"
  227. " price : 2392.00\n"
  228. "tax : 251.42\n"
  229. "total: 4443.52\n"
  230. "comments:\n"
  231. " Late afternoon is best.\n"
  232. " Backup contact is Nancy\n"
  233. " Billsmer @ 338-4338.";
  234. const char *ex2_28 =
  235. "---\n"
  236. "Time: 2001-11-23 15:01:42 -5\n"
  237. "User: ed\n"
  238. "Warning:\n"
  239. " This is an error message\n"
  240. " for the log file\n"
  241. "---\n"
  242. "Time: 2001-11-23 15:02:31 -5\n"
  243. "User: ed\n"
  244. "Warning:\n"
  245. " A slightly different error\n"
  246. " message.\n"
  247. "---\n"
  248. "Date: 2001-11-23 15:03:17 -5\n"
  249. "User: ed\n"
  250. "Fatal:\n"
  251. " Unknown variable \"bar\"\n"
  252. "Stack:\n"
  253. " - file: TopClass.py\n"
  254. " line: 23\n"
  255. " code: |\n"
  256. " x = MoreObject(\"345\\n\")\n"
  257. " - file: MoreClass.py\n"
  258. " line: 58\n"
  259. " code: |-\n"
  260. " foo = bar";
  261. // TODO: 5.1 - 5.2 BOM
  262. const char *ex5_3 =
  263. "sequence:\n"
  264. "- one\n"
  265. "- two\n"
  266. "mapping:\n"
  267. " ? sky\n"
  268. " : blue\n"
  269. " sea : green";
  270. const char *ex5_4 =
  271. "sequence: [ one, two, ]\n"
  272. "mapping: { sky: blue, sea: green }";
  273. const char *ex5_5 = "# Comment only.";
  274. const char *ex5_6 =
  275. "anchored: !local &anchor value\n"
  276. "alias: *anchor";
  277. const char *ex5_7 =
  278. "literal: |\n"
  279. " some\n"
  280. " text\n"
  281. "folded: >\n"
  282. " some\n"
  283. " text\n";
  284. const char *ex5_8 =
  285. "single: 'text'\n"
  286. "double: \"text\"";
  287. // TODO: 5.9 directive
  288. // TODO: 5.10 reserved indicator
  289. const char *ex5_11 =
  290. "|\n"
  291. " Line break (no glyph)\n"
  292. " Line break (glyphed)\n";
  293. const char *ex5_12 =
  294. "# Tabs and spaces\n"
  295. "quoted: \"Quoted\t\"\n"
  296. "block: |\n"
  297. " void main() {\n"
  298. " \tprintf(\"Hello, world!\\n\");\n"
  299. " }";
  300. const char *ex5_13 =
  301. "\"Fun with \\\\\n"
  302. "\\\" \\a \\b \\e \\f \\\n"
  303. "\\n \\r \\t \\v \\0 \\\n"
  304. "\\ \\_ \\N \\L \\P \\\n"
  305. "\\x41 \\u0041 \\U00000041\"";
  306. const char *ex5_14 =
  307. "Bad escapes:\n"
  308. " \"\\c\n"
  309. " \\xq-\"";
  310. const char *ex6_1 =
  311. " # Leading comment line spaces are\n"
  312. " # neither content nor indentation.\n"
  313. " \n"
  314. "Not indented:\n"
  315. " By one space: |\n"
  316. " By four\n"
  317. " spaces\n"
  318. " Flow style: [ # Leading spaces\n"
  319. " By two, # in flow style\n"
  320. " Also by two, # are neither\n"
  321. " \tStill by two # content nor\n"
  322. " ] # indentation.";
  323. const char *ex6_2 =
  324. "? a\n"
  325. ": -\tb\n"
  326. " - -\tc\n"
  327. " - d";
  328. const char *ex6_3 =
  329. "- foo:\t bar\n"
  330. "- - baz\n"
  331. " -\tbaz";
  332. const char *ex6_4 =
  333. "plain: text\n"
  334. " lines\n"
  335. "quoted: \"text\n"
  336. " \tlines\"\n"
  337. "block: |\n"
  338. " text\n"
  339. " \tlines\n";
  340. const char *ex6_5 =
  341. "Folding:\n"
  342. " \"Empty line\n"
  343. " \t\n"
  344. " as a line feed\"\n"
  345. "Chomping: |\n"
  346. " Clipped empty lines\n"
  347. " ";
  348. const char *ex6_6 =
  349. ">-\n"
  350. " trimmed\n"
  351. " \n"
  352. " \n"
  353. "\n"
  354. " as\n"
  355. " space";
  356. const char *ex6_7 =
  357. ">\n"
  358. " foo \n"
  359. " \n"
  360. " \t bar\n"
  361. "\n"
  362. " baz\n";
  363. const char *ex6_8 =
  364. "\"\n"
  365. " foo \n"
  366. " \n"
  367. " \t bar\n"
  368. "\n"
  369. " baz\n"
  370. "\"";
  371. const char *ex6_9 =
  372. "key: # Comment\n"
  373. " value";
  374. const char *ex6_10 =
  375. " # Comment\n"
  376. " \n"
  377. "\n";
  378. const char *ex6_11 =
  379. "key: # Comment\n"
  380. " # lines\n"
  381. " value\n"
  382. "\n";
  383. const char *ex6_12 =
  384. "{ first: Sammy, last: Sosa }:\n"
  385. "# Statistics:\n"
  386. " hr: # Home runs\n"
  387. " 65\n"
  388. " avg: # Average\n"
  389. " 0.278";
  390. const char *ex6_13 =
  391. "%FOO bar baz # Should be ignored\n"
  392. " # with a warning.\n"
  393. "--- \"foo\"";
  394. const char *ex6_14 =
  395. "%YAML 1.3 # Attempt parsing\n"
  396. " # with a warning\n"
  397. "---\n"
  398. "\"foo\"";
  399. const char *ex6_15 =
  400. "%YAML 1.2\n"
  401. "%YAML 1.1\n"
  402. "foo";
  403. const char *ex6_16 =
  404. "%TAG !yaml! tag:yaml.org,2002:\n"
  405. "---\n"
  406. "!yaml!str \"foo\"";
  407. const char *ex6_17 =
  408. "%TAG ! !foo\n"
  409. "%TAG ! !foo\n"
  410. "bar";
  411. const char *ex6_18 =
  412. "# Private\n"
  413. "!foo \"bar\"\n"
  414. "...\n"
  415. "# Global\n"
  416. "%TAG ! tag:example.com,2000:app/\n"
  417. "---\n"
  418. "!foo \"bar\"";
  419. const char *ex6_19 =
  420. "%TAG !! tag:example.com,2000:app/\n"
  421. "---\n"
  422. "!!int 1 - 3 # Interval, not integer";
  423. const char *ex6_20 =
  424. "%TAG !e! tag:example.com,2000:app/\n"
  425. "---\n"
  426. "!e!foo \"bar\"";
  427. const char *ex6_21 =
  428. "%TAG !m! !my-\n"
  429. "--- # Bulb here\n"
  430. "!m!light fluorescent\n"
  431. "...\n"
  432. "%TAG !m! !my-\n"
  433. "--- # Color here\n"
  434. "!m!light green";
  435. const char *ex6_22 =
  436. "%TAG !e! tag:example.com,2000:app/\n"
  437. "---\n"
  438. "- !e!foo \"bar\"";
  439. const char *ex6_23 =
  440. "!!str &a1 \"foo\":\n"
  441. " !!str bar\n"
  442. "&a2 baz : *a1";
  443. const char *ex6_24 =
  444. "!<tag:yaml.org,2002:str> foo :\n"
  445. " !<!bar> baz";
  446. const char *ex6_25 =
  447. "- !<!> foo\n"
  448. "- !<$:?> bar\n";
  449. const char *ex6_26 =
  450. "%TAG !e! tag:example.com,2000:app/\n"
  451. "---\n"
  452. "- !local foo\n"
  453. "- !!str bar\n"
  454. "- !e!tag%21 baz\n";
  455. const char *ex6_27a =
  456. "%TAG !e! tag:example,2000:app/\n"
  457. "---\n"
  458. "- !e! foo";
  459. const char *ex6_27b =
  460. "%TAG !e! tag:example,2000:app/\n"
  461. "---\n"
  462. "- !h!bar baz";
  463. const char *ex6_28 =
  464. "# Assuming conventional resolution:\n"
  465. "- \"12\"\n"
  466. "- 12\n"
  467. "- ! 12";
  468. const char *ex6_29 =
  469. "First occurrence: &anchor Value\n"
  470. "Second occurrence: *anchor";
  471. const char *ex7_1 =
  472. "First occurrence: &anchor Foo\n"
  473. "Second occurrence: *anchor\n"
  474. "Override anchor: &anchor Bar\n"
  475. "Reuse anchor: *anchor";
  476. const char *ex7_2 =
  477. "{\n"
  478. " foo : !!str,\n"
  479. " !!str : bar,\n"
  480. "}";
  481. const char *ex7_3 =
  482. "{\n"
  483. " ? foo :,\n"
  484. " : bar,\n"
  485. "}\n";
  486. const char *ex7_4 =
  487. "\"implicit block key\" : [\n"
  488. " \"implicit flow key\" : value,\n"
  489. " ]";
  490. const char *ex7_5 =
  491. "\"folded \n"
  492. "to a space,\t\n"
  493. " \n"
  494. "to a line feed, or \t\\\n"
  495. " \\ \tnon-content\"";
  496. const char *ex7_6 =
  497. "\" 1st non-empty\n"
  498. "\n"
  499. " 2nd non-empty \n"
  500. "\t3rd non-empty \"";
  501. const char *ex7_7 = " 'here''s to \"quotes\"'";
  502. const char *ex7_8 =
  503. "'implicit block key' : [\n"
  504. " 'implicit flow key' : value,\n"
  505. " ]";
  506. const char *ex7_9 =
  507. "' 1st non-empty\n"
  508. "\n"
  509. " 2nd non-empty \n"
  510. "\t3rd non-empty '";
  511. const char *ex7_10 =
  512. "# Outside flow collection:\n"
  513. "- ::vector\n"
  514. "- \": - ()\"\n"
  515. "- Up, up, and away!\n"
  516. "- -123\n"
  517. "- http://example.com/foo#bar\n"
  518. "# Inside flow collection:\n"
  519. "- [ ::vector,\n"
  520. " \": - ()\",\n"
  521. " \"Up, up, and away!\",\n"
  522. " -123,\n"
  523. " http://example.com/foo#bar ]";
  524. const char *ex7_11 =
  525. "implicit block key : [\n"
  526. " implicit flow key : value,\n"
  527. " ]";
  528. const char *ex7_12 =
  529. "1st non-empty\n"
  530. "\n"
  531. " 2nd non-empty \n"
  532. "\t3rd non-empty";
  533. const char *ex7_13 =
  534. "- [ one, two, ]\n"
  535. "- [three ,four]";
  536. const char *ex7_14 =
  537. "[\n"
  538. "\"double\n"
  539. " quoted\", 'single\n"
  540. " quoted',\n"
  541. "plain\n"
  542. " text, [ nested ],\n"
  543. "single: pair,\n"
  544. "]";
  545. const char *ex7_15 =
  546. "- { one : two , three: four , }\n"
  547. "- {five: six,seven : eight}";
  548. const char *ex7_16 =
  549. "{\n"
  550. "? explicit: entry,\n"
  551. "implicit: entry,\n"
  552. "?\n"
  553. "}";
  554. const char *ex7_17 =
  555. "{\n"
  556. "unquoted : \"separate\",\n"
  557. "http://foo.com,\n"
  558. "omitted value:,\n"
  559. ": omitted key,\n"
  560. "}";
  561. const char *ex7_18 =
  562. "{\n"
  563. "\"adjacent\":value,\n"
  564. "\"readable\":value,\n"
  565. "\"empty\":\n"
  566. "}";
  567. const char *ex7_19 =
  568. "[\n"
  569. "foo: bar\n"
  570. "]";
  571. const char *ex7_20 =
  572. "[\n"
  573. "? foo\n"
  574. " bar : baz\n"
  575. "]";
  576. const char *ex7_21 =
  577. "- [ YAML : separate ]\n"
  578. "- [ : empty key entry ]\n"
  579. "- [ {JSON: like}:adjacent ]";
  580. const char *ex7_22 =
  581. "[ foo\n"
  582. " bar: invalid,"; // Note: we don't check (on purpose) the >1K chars for an
  583. // implicit key
  584. const char *ex7_23 =
  585. "- [ a, b ]\n"
  586. "- { a: b }\n"
  587. "- \"a\"\n"
  588. "- 'b'\n"
  589. "- c";
  590. const char *ex7_24 =
  591. "- !!str \"a\"\n"
  592. "- 'b'\n"
  593. "- &anchor \"c\"\n"
  594. "- *anchor\n"
  595. "- !!str";
  596. const char *ex8_1 =
  597. "- | # Empty header\n"
  598. " literal\n"
  599. "- >1 # Indentation indicator\n"
  600. " folded\n"
  601. "- |+ # Chomping indicator\n"
  602. " keep\n"
  603. "\n"
  604. "- >1- # Both indicators\n"
  605. " strip\n";
  606. const char *ex8_2 =
  607. "- |\n"
  608. " detected\n"
  609. "- >\n"
  610. " \n"
  611. " \n"
  612. " # detected\n"
  613. "- |1\n"
  614. " explicit\n"
  615. "- >\n"
  616. " \t\n"
  617. " detected\n";
  618. const char *ex8_3a =
  619. "- |\n"
  620. " \n"
  621. " text";
  622. const char *ex8_3b =
  623. "- >\n"
  624. " text\n"
  625. " text";
  626. const char *ex8_3c =
  627. "- |2\n"
  628. " text";
  629. const char *ex8_4 =
  630. "strip: |-\n"
  631. " text\n"
  632. "clip: |\n"
  633. " text\n"
  634. "keep: |+\n"
  635. " text\n";
  636. const char *ex8_5 =
  637. " # Strip\n"
  638. " # Comments:\n"
  639. "strip: |-\n"
  640. " # text\n"
  641. " \n"
  642. " # Clip\n"
  643. " # comments:\n"
  644. "\n"
  645. "clip: |\n"
  646. " # text\n"
  647. " \n"
  648. " # Keep\n"
  649. " # comments:\n"
  650. "\n"
  651. "keep: |+\n"
  652. " # text\n"
  653. "\n"
  654. " # Trail\n"
  655. " # Comments\n";
  656. const char *ex8_6 =
  657. "strip: >-\n"
  658. "\n"
  659. "clip: >\n"
  660. "\n"
  661. "keep: |+\n"
  662. "\n";
  663. const char *ex8_7 =
  664. "|\n"
  665. " literal\n"
  666. " \ttext\n"
  667. "\n";
  668. const char *ex8_8 =
  669. "|\n"
  670. " \n"
  671. " \n"
  672. " literal\n"
  673. " \n"
  674. " \n"
  675. " text\n"
  676. "\n"
  677. " # Comment\n";
  678. const char *ex8_9 =
  679. ">\n"
  680. " folded\n"
  681. " text\n"
  682. "\n";
  683. const char *ex8_10 =
  684. ">\n"
  685. "\n"
  686. " folded\n"
  687. " line\n"
  688. "\n"
  689. " next\n"
  690. " line\n"
  691. " * bullet\n"
  692. "\n"
  693. " * list\n"
  694. " * lines\n"
  695. "\n"
  696. " last\n"
  697. " line\n"
  698. "\n"
  699. "# Comment\n";
  700. const char *ex8_11 = ex8_10;
  701. const char *ex8_12 = ex8_10;
  702. const char *ex8_13 = ex8_10;
  703. const char *ex8_14 =
  704. "block sequence:\n"
  705. " - one\n"
  706. " - two : three\n";
  707. const char *ex8_15 =
  708. "- # Empty\n"
  709. "- |\n"
  710. " block node\n"
  711. "- - one # Compact\n"
  712. " - two # sequence\n"
  713. "- one: two # Compact mapping\n";
  714. const char *ex8_16 =
  715. "block mapping:\n"
  716. " key: value\n";
  717. const char *ex8_17 =
  718. "? explicit key # Empty value\n"
  719. "? |\n"
  720. " block key\n"
  721. ": - one # Explicit compact\n"
  722. " - two # block value\n";
  723. const char *ex8_18 =
  724. "plain key: in-line value\n"
  725. ": # Both empty\n"
  726. "\"quoted key\":\n"
  727. "- entry\n";
  728. const char *ex8_19 =
  729. "- sun: yellow\n"
  730. "- ? earth: blue\n"
  731. " : moon: white\n";
  732. const char *ex8_20 =
  733. "-\n"
  734. " \"flow in block\"\n"
  735. "- >\n"
  736. " Block scalar\n"
  737. "- !!map # Block collection\n"
  738. " foo : bar\n";
  739. const char *ex8_21 =
  740. "literal: |2\n"
  741. " value\n"
  742. "folded:\n"
  743. " !foo\n"
  744. " >1\n"
  745. " value\n";
  746. const char *ex8_22 =
  747. "sequence: !!seq\n"
  748. "- entry\n"
  749. "- !!seq\n"
  750. " - nested\n"
  751. "mapping: !!map\n"
  752. " foo: bar\n";
  753. }