• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
8
9[section:examples Test and Example Programs]
10
11[h4 Test Programs]
12
13[*regress:]
14
15A regression test application that gives the matching/searching algorithms a
16full workout. The presence of this program is your guarantee that the
17library will behave as claimed - at least as far as those items tested
18are concerned - if anyone spots anything that isn't being tested I'd be
19glad to hear about it.
20
21Files:
22
23* [@../../test/regress/main.cpp main.cpp]
24* [@../../test/regress/basic_tests.cpp basic_tests.cpp]
25* [@../../test/regress/test_alt.cpp test_alt.cpp]
26* [@../../test/regress/test_anchors.cpp test_anchors.cpp]
27* [@../../test/regress/test_asserts.cpp test_asserts.cpp]
28* [@../../test/regress/test_backrefs.cpp test_backrefs.cpp]
29* [@../../test/regress/test_deprecated.cpp test_deprecated.cpp]
30* [@../../test/regress/test_emacs.cpp test_emacs.cpp]
31* [@../../test/regress/test_escapes.cpp test_escapes.cpp]
32* [@../../test/regress/test_grep.cpp test_grep.cpp]
33* [@../../test/regress/test_icu.cpp test_icu.cpp]
34* [@../../test/regress/test_locale.cpp test_locale.cpp]
35* [@../../test/regress/test_mfc.cpp test_mfc.cpp]
36* [@../../test/regress/test_non_greedy_repeats.cpp test_non_greedy_repeats.cpp]
37* [@../../test/regress/test_operators.cpp test_operators.cpp]
38* [@../../test/regress/test_overloads.cpp test_overloads.cpp]
39* [@../../test/regress/test_perl_ex.cpp test_perl_ex.cpp]
40* [@../../test/regress/test_replace.cpp test_replace.cpp]
41* [@../../test/regress/test_sets.cpp test_sets.cpp]
42* [@../../test/regress/test_simple_repeats.cpp test_simple_repeats.cpp]
43* [@../../test/regress/test_tricky_cases.cpp test_tricky_cases.cpp]
44* [@../../test/regress/test_unicode.cpp test_unicode.cpp]
45
46[*bad_expression_test:]
47
48Verifies that "bad" regular expressions don't cause the matcher to go into
49infinite loops, but to throw an exception instead.
50
51Files: [@../../test/pathology/bad_expression_test.cpp bad_expression_test.cpp].
52
53[*recursion_test:]
54
55Verifies that the matcher can't overrun the stack (no matter what the expression).
56
57Files: [@../../test/pathology/recursion_test.cpp recursion_test.cpp].
58
59[*concepts:]
60
61Verifies that the library meets all documented concepts (a compile only test).
62
63Files: [@../../test/concepts/concept_check.cpp concept_check.cpp].
64
65[*captures_test:]
66
67Test code for captures.
68
69Files: [@../../test/captures/captures_test.cpp captures_test.cpp].
70
71[h4 Example programs]
72
73[*grep]
74
75A simple grep implementation, run with the -h command line option to find out its usage.
76
77Files: [@../../example/grep/grep.cpp grep.cpp]
78
79[*timer.exe]
80
81A simple interactive expression matching application, the results of all
82matches are timed, allowing the programmer to optimize their regular expressions
83where performance is critical.
84
85Files: [@../../example/timer/regex_timer.cpp regex_timer.cpp].
86
87[h4 Code snippets]
88
89The snippets examples contain the code examples used in the documentation:
90
91[@../../example/snippets/captures_example.cpp captures_example.cpp]: Demonstrates the use of captures.
92
93[@../../example/snippets/credit_card_example.cpp credit_card_example.cpp]: Credit card number formatting code.
94
95[@../../example/snippets/partial_regex_grep.cpp partial_regex_grep.cpp]: Search example using partial matches.
96
97[@../../example/snippets/partial_regex_match.cpp partial_regex_match.cpp]: regex_match example using partial matches.
98
99[@../../example/snippets/regex_iterator_example.cpp regex_iterator_example.cpp]: Iterating through a series of matches.
100
101[@../../example/snippets/regex_match_example.cpp regex_match_example.cpp]: ftp based regex_match example.
102
103[@../../example/snippets/regex_merge_example.cpp regex_merge_example.cpp]: regex_merge example: converts a C++ file to syntax highlighted HTML.
104
105[@../../example/snippets/regex_replace_example.cpp regex_replace_example.cpp]: regex_replace example: converts a C++ file to syntax highlighted HTML
106
107[@../../example/snippets/regex_search_example.cpp regex_search_example.cpp]: regex_search example: searches a cpp file for class definitions.
108
109[@../../example/snippets/regex_token_iterator_eg_1.cpp regex_token_iterator_eg_1.cpp]: split a string into a series of tokens.
110
111[@../../example/snippets/regex_token_iterator_eg_2.cpp regex_token_iterator_eg_2.cpp]: enumerate the linked URL's in a HTML file.
112
113The following are deprecated:
114
115[@../../example/snippets/regex_grep_example_1.cpp regex_grep_example_1.cpp]: regex_grep example 1: searches a cpp file for class definitions.
116
117[@../../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.
118
119[@../../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.
120
121[@../../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.
122
123[@../../example/snippets/regex_split_example_1.cpp regex_split_example_1.cpp]: regex_split example: split a string into tokens.
124
125[@../../example/snippets/regex_split_example_2.cpp regex_split_example_2.cpp] : regex_split example: spit out linked URL's.
126
127[endsect]
128
129