info_parser.qbk 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. [/
  2. / Copyright (c) 2008 Marcin Kalicinski (kalita <at> poczta dot onet dot pl)
  3. / Copyright (c) 2009 Sebastian Redl (sebastian dot redl <at> getdesigned dot at)
  4. /
  5. / Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. /]
  8. [section INFO Parser]
  9. The INFO format was created specifically for the property tree library. It
  10. provides a simple, efficient format that can be used to serialize property
  11. trees that are otherwise only stored in memory. It can also be used for any
  12. other purpose, although the lack of widespread existing use may prove to be an
  13. impediment.
  14. INFO provides several features that make it familiar to C++ programmers and
  15. efficient for medium-sized datasets, especially those used for test input. It
  16. supports C-style character escapes, nesting via curly braces, and file inclusion
  17. via #include.
  18. INFO is also used for visualization of property trees in this documentation.
  19. A typical INFO file might look like this:
  20. key1 value1
  21. key2
  22. {
  23. key3 value3
  24. {
  25. key4 "value4 with spaces"
  26. }
  27. key5 value5
  28. }
  29. Here's a more complicated file demonstrating all of INFO's features:
  30. ; A comment
  31. key1 value1 ; Another comment
  32. key2 "value with special characters in it {};#\n\t\"\0"
  33. {
  34. subkey "value split "\
  35. "over three"\
  36. "lines"
  37. {
  38. a_key_without_value ""
  39. "a key with special characters in it {};#\n\t\"\0" ""
  40. "" value ; Empty key with a value
  41. "" "" ; Empty key with empty value!
  42. }
  43. }
  44. #include "file.info" ; included file
  45. INFO round-trips except for the loss of comments and include directives.
  46. [endsect] [/info_parser]