examples.qbk 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. [/
  2. Copyright 2006-2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:examples Test and Example Programs]
  8. [h4 Test Programs]
  9. [*regress:]
  10. A regression test application that gives the matching/searching algorithms a
  11. full workout. The presence of this program is your guarantee that the
  12. library will behave as claimed - at least as far as those items tested
  13. are concerned - if anyone spots anything that isn't being tested I'd be
  14. glad to hear about it.
  15. Files:
  16. * [@../../test/regress/main.cpp main.cpp]
  17. * [@../../test/regress/basic_tests.cpp basic_tests.cpp]
  18. * [@../../test/regress/test_alt.cpp test_alt.cpp]
  19. * [@../../test/regress/test_anchors.cpp test_anchors.cpp]
  20. * [@../../test/regress/test_asserts.cpp test_asserts.cpp]
  21. * [@../../test/regress/test_backrefs.cpp test_backrefs.cpp]
  22. * [@../../test/regress/test_deprecated.cpp test_deprecated.cpp]
  23. * [@../../test/regress/test_emacs.cpp test_emacs.cpp]
  24. * [@../../test/regress/test_escapes.cpp test_escapes.cpp]
  25. * [@../../test/regress/test_grep.cpp test_grep.cpp]
  26. * [@../../test/regress/test_icu.cpp test_icu.cpp]
  27. * [@../../test/regress/test_locale.cpp test_locale.cpp]
  28. * [@../../test/regress/test_mfc.cpp test_mfc.cpp]
  29. * [@../../test/regress/test_non_greedy_repeats.cpp test_non_greedy_repeats.cpp]
  30. * [@../../test/regress/test_operators.cpp test_operators.cpp]
  31. * [@../../test/regress/test_overloads.cpp test_overloads.cpp]
  32. * [@../../test/regress/test_perl_ex.cpp test_perl_ex.cpp]
  33. * [@../../test/regress/test_replace.cpp test_replace.cpp]
  34. * [@../../test/regress/test_sets.cpp test_sets.cpp]
  35. * [@../../test/regress/test_simple_repeats.cpp test_simple_repeats.cpp]
  36. * [@../../test/regress/test_tricky_cases.cpp test_tricky_cases.cpp]
  37. * [@../../test/regress/test_unicode.cpp test_unicode.cpp]
  38. [*bad_expression_test:]
  39. Verifies that "bad" regular expressions don't cause the matcher to go into
  40. infinite loops, but to throw an exception instead.
  41. Files: [@../../test/pathology/bad_expression_test.cpp bad_expression_test.cpp].
  42. [*recursion_test:]
  43. Verifies that the matcher can't overrun the stack (no matter what the expression).
  44. Files: [@../../test/pathology/recursion_test.cpp recursion_test.cpp].
  45. [*concepts:]
  46. Verifies that the library meets all documented concepts (a compile only test).
  47. Files: [@../../test/concepts/concept_check.cpp concept_check.cpp].
  48. [*captures_test:]
  49. Test code for captures.
  50. Files: [@../../test/captures/captures_test.cpp captures_test.cpp].
  51. [h4 Example programs]
  52. [*grep]
  53. A simple grep implementation, run with the -h command line option to find out its usage.
  54. Files: [@../../example/grep/grep.cpp grep.cpp]
  55. [*timer.exe]
  56. A simple interactive expression matching application, the results of all
  57. matches are timed, allowing the programmer to optimize their regular expressions
  58. where performance is critical.
  59. Files: [@../../example/timer/regex_timer.cpp regex_timer.cpp].
  60. [h4 Code snippets]
  61. The snippets examples contain the code examples used in the documentation:
  62. [@../../example/snippets/captures_example.cpp captures_example.cpp]: Demonstrates the use of captures.
  63. [@../../example/snippets/credit_card_example.cpp credit_card_example.cpp]: Credit card number formatting code.
  64. [@../../example/snippets/partial_regex_grep.cpp partial_regex_grep.cpp]: Search example using partial matches.
  65. [@../../example/snippets/partial_regex_match.cpp partial_regex_match.cpp]: regex_match example using partial matches.
  66. [@../../example/snippets/regex_iterator_example.cpp regex_iterator_example.cpp]: Iterating through a series of matches.
  67. [@../../example/snippets/regex_match_example.cpp regex_match_example.cpp]: ftp based regex_match example.
  68. [@../../example/snippets/regex_merge_example.cpp regex_merge_example.cpp]: regex_merge example: converts a C++ file to syntax highlighted HTML.
  69. [@../../example/snippets/regex_replace_example.cpp regex_replace_example.cpp]: regex_replace example: converts a C++ file to syntax highlighted HTML
  70. [@../../example/snippets/regex_search_example.cpp regex_search_example.cpp]: regex_search example: searches a cpp file for class definitions.
  71. [@../../example/snippets/regex_token_iterator_eg_1.cpp regex_token_iterator_eg_1.cpp]: split a string into a series of tokens.
  72. [@../../example/snippets/regex_token_iterator_eg_2.cpp regex_token_iterator_eg_2.cpp]: enumerate the linked URL's in a HTML file.
  73. The following are deprecated:
  74. [@../../example/snippets/regex_grep_example_1.cpp regex_grep_example_1.cpp]: regex_grep example 1: searches a cpp file for class definitions.
  75. [@../../example/snippets/regex_grep_example_2.cpp regex_grep_example_2.cpp]: regex_grep example 2: searches a cpp file for class definitions, using a global callback function.
  76. [@../../example/snippets/regex_grep_example_3.cpp regex_grep_example_3.cpp]: regex_grep example 2: searches a cpp file for class definitions, using a bound member function callback.
  77. [@../../example/snippets/regex_grep_example_4.cpp regex_grep_example_4.cpp]: regex_grep example 2: searches a cpp file for class definitions, using a C++ Builder closure as a callback.
  78. [@../../example/snippets/regex_split_example_1.cpp regex_split_example_1.cpp]: regex_split example: split a string into tokens.
  79. [@../../example/snippets/regex_split_example_2.cpp regex_split_example_2.cpp] : regex_split example: spit out linked URL's.
  80. [endsect]