Commit Graph

29 Commits

Author SHA1 Message Date
Tim Shen
7948838864 regex_scanner.tcc: (_Scanner<>::_M_scan_normal...
2013-10-18  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex_scanner.tcc: (_Scanner<>::_M_scan_normal,
	_Scanner<>::_M_eat_escape_ecma, _Scanner<>::_M_eat_escape_posix,
	_Scanner<>::_M_eat_escape_awk): Narrow character before finding in maps.
	* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
	New.

From-SVN: r203827
2013-10-18 16:13:07 +00:00
Tim Shen
6cb4308702 regex.h: (regex_token_iterator<>::regex_token_iterator): Fix compile error.
2013-10-06  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h: (regex_token_iterator<>::regex_token_iterator):
	Fix compile error.
	* include/bits/regex.tcc: (regex_replace<>): Remove default parameter.

2013-10-06  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h (__regex_algo_impl<>, regex_match<>,
	regex_search<>): New abstract function for regex_match and regex_search.
	* include/bits/regex.tcc (__regex_algo_impl<>): Implement.
	* include/bits/regex_executor.h
	(_Executor<>::_M_lookahead,
	 _DFSExecutor<>::_M_clone,
	 _BFSExecutor<>::_M_clone): Let _M_clone to choose which executor to
	use.
	* include/bits/regex_executor.tcc (__get_executor<>): Update the
	definition to support __policy.
	* testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc: Use
	*_debug.
	* testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/basic/string_01.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/basic/string_range_00_03.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/basic/string_range_02_03.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_bracket_01.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_questionmark.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/extended/string_any.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_range_00_03.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_range_01_03.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_range_02_03.cc: Same.
	* testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
	Same.
	* testsuite/28_regex/algorithms/regex_search/basic/string_01.cc: Same.
	* testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc: Same.
	* testsuite/28_regex/algorithms/regex_search/ecma/flags.cc: Same.
	* testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc: Same.
	* testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc: Same.
	* testsuite/28_regex/match_results/format.cc: Same.
	* testsuite/util/testsuite_regex.h
	(regex_match_debug<>, regex_search_debug<>): Implement.

From-SVN: r203231
2013-10-06 17:53:14 +00:00
Tim Shen
756aa0c302 2013-10-02 Tim Shen <timshen91@gmail.com>
* include/bits/regex_compiler.h
	(_BracketMatcher<>::_M_add_equivalence_class): Implement it correctly.
	* include/bits/regex_compiler.tcc (_BracketMatcher<>::operator()):
	Add _M_equiv_set support.
	* testsuite/28_regex/algorithms/regex_match/extended/
	cstring_bracket_01.cc: Add new "[[=a=]]" testcase.

From-SVN: r203117
2013-10-02 15:13:18 +00:00
Tim Shen
70b50ed7b5 re PR libstdc++/58576 (std::regex_match() reports mismatched braces on a valid regex)
2013-10-01  Tim Shen  <timshen91@gmail.com>

	PR libstdc++/58576
	* include/bits/regex_automaton.tcc (_NFA<>::_M_eliminate_dummy)
	(_StateSeq<>::_M_clone): Add _S_opcode_subexpr_lookahead branch.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/58576.cc: New.

From-SVN: r203067
2013-10-01 15:26:50 +00:00
Tim Shen
d4e1260101 regex_error.h: Remove _S_error_last to follow the standard.
2013-09-26  Tim Shen  <timshen91@gmail.com>

	* regex_error.h: Remove _S_error_last to follow the standard.
	* regex_scanner.tcc:
	(_Scanner<_FwdIter>::_M_scan_in_brace): Change error_brace to
	error_badbrace.
	(_Scanner<>::_M_eat_escape_posix): Extended doesn't support
	back-reference.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/53622.cc:
	Move here from ../../extended.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/57173.cc:
	Likewise.

From-SVN: r202958
2013-09-26 21:48:04 +00:00
Tim Shen
c2669da93d Makefile.am: Add regex.tcc.
2013-09-24  Tim Shen  <timshen91@gmail.com>

	* include/Makefile.am: Add regex.tcc.
	* include/Makefile.in: Regenerate.
	* include/bits/regex.h: Remove definitions to regex.tcc.
	* include/bits/regex.tcc: New.
	(match_results::format, regex_replace): Implement;
	* include/bits/regex_compiler.h: Move _M_flags to the top of class
	member list, because other members' initialization depend on it.
	* include/bits/regex_compiler.tcc
	(_Compiler<>::_Compiler): Adjust member initializations.
	(_Compiler<>::_M_quantifier): Fix ungreedy interval quantifier.
	* include/bits/regex_executor.h: Remove _RegexT from _*Executor classes.
	In the future, all regex classes may refactor to *Impl style.
	* include/bits/regex_executor.tcc (_Executor::_M_set_results):
	Merge identical code from _*Executor classes.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc (fake_match<>): Adjust the hacking-style testcase
	caller for new __get_executors interface.
	* testsuite/28_regex/algorithms/regex_replace/char/basic_replace.cc:
	New.
	* testsuite/28_regex/match_results/format.cc: New.
	* testsuite/28_regex/traits/char/lookup_collatename.cc: Remove digraph
	testcase.
	* testsuite/28_regex/traits/wchar_t/lookup_collatename.cc: Likewise.

From-SVN: r202858
2013-09-24 02:05:00 +00:00
Tim Shen
b21abceec3 regex.h: Add friend classes.
2013-09-18  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h: Add friend classes.
	(match_results<>::position, regex_iterator<>::operator++):
	Implement position specification in regex_iterator.
	(regex_match<>, regex_search<>):
	Move match_results initializations to these function. Remove `todo`.
	* include/bits/regex_compiler.tcc:
	(_Compiler<>::_M_quantifier): Fix greedy/ungreedy of interval matching.
	* include/bits/regex_constants.h:
	Fix indentation. Change match_flag_type to enum type.
	* include/bits/regex_executor.h:
	Merge identical code to the base class _Executor.
	Support flags in regex_constants.
	* include/bits/regex_executor.tcc: Likewise.
	* include/bits/regex_scanner.h: Add comments.
	* include/bits/regex_scanner.tcc: Same.
	* testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
	Add a testcase.
	* testsuite/28_regex/algorithms/regex_search/ecma/flags.cc: New.
	* testsuite/28_regex/iterators/regex_iterator/char/
	string_position_01.cc: Remove `xfail`.
	* testsuite/28_regex/iterators/regex_iterator/wchar_t/string_02.cc:
	Remove `xfail` and make the case really work.

From-SVN: r202706
2013-09-18 15:56:20 +00:00
Tim Shen
7b86458e38 regex.h (regex_match<>, [...]): Change regex_executor caller.
2013-09-14  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h (regex_match<>, regex_search<>):
	Change regex_executor caller. Now use their return value instead
	of checking __m[0].matched to find out if it's successful.
	(regex_search<>): Move the search logic to regex_executor.
	* include/bits/regex_automaton.h: Add some new _Opcode. Refactor
	_NFA::_M_insert_*.
	* include/bits/regex_automaton.tcc: Add DEBUG dump for new
	_Opcode. Refactor _NFA::_M_insert_*.
	* include/bits/regex_compiler.h (_Compiler<>::_M_get_nfa):
	Use make_shared instead of construct by hand.
	* include/bits/regex_compiler.tcc: Implement _Compiler<>::_M_assertion.
	* include/bits/regex_constants.h: Fix indentation and line breaking.
	* include/bits/regex_executor.h: Add _ResultsEntry to support
	greedy/ungreedy mode. Move regex_search logic here.
	* include/bits/regex_executor.tcc: Implement assertions and
	greedy/ungreedy matching.
	* include/bits/regex_scanner.h: Add a new token _S_token_ungreedy.
	* include/bits/regex_scanner.tcc: Parse a new token _S_token_ungreedy.
	* testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc: New.
	* testsuite/28_regex/algorithms/regex_search/ecma/greedy.cc: New.
	* testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
	Fix comment.

From-SVN: r202591
2013-09-14 14:23:44 +00:00
Tim Shen
7c812a2a57 regex_automaton.h: Add dummy node type.
2013-09-05  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex_automaton.h: Add dummy node type. Rewrite
	_StateSeq.
	* include/bits/regex_automaton.tcc: Implement them.
	* include/bits/regex_compiler.h: Rewrite _Compiler to use new
	_StateSeq interfaces.
	* include/bits/regex_compiler.tcc: Implement them.
	* include/bits/regex_scanner.h: Add word boundry assertion token.
	* include/bits/regex_scanner.tcc (_Scanner<>::_M_eat_escape_ecma):
	Support word boundry.
	* testsuite/28_regex/algorithms/regex_match/basic/
	string_range_02_03.cc: Remove "xfail".
	* testsuite/28_regex/algorithms/regex_match/extended/cstring_plus.cc:
	Likewise.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_range_02_03.cc: Likewise.
	* testsuite/28_regex/algorithms/regex_match/extended/
	cstring_questionmark.cc: Remove xfail and get correct length of
	c-string.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_range_00_03.cc: Likewise.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/quoted_char.cc:
	New.
	* testsuite/28_regex/algorithms/regex_match/extended/cstring_range.cc:
	New.
	* testsuite/28_regex/iterators/regex_iterator/wchar_t/string_02.cc: New.

From-SVN: r202290
2013-09-05 15:20:39 +00:00
Tim Shen
e350969184 regex_automaton.h: Rearrange _NFA's layout.
2013-09-02  Tim Shen  <timshen91@gmail.com>

	* regex_automaton.h: Rearrange _NFA's layout.
	* include/bits/regex_compiler.h: Add _AnyMatcher and _CharMatcher.
	  Rearrange _BracketMatcher's layout.
	  (_BracketMatcher<>::_M_add_char): Use set instead of vector for
	  _M_char_set.
	  (_BracketMatcher<>::_M_add_collating_element): Likewise.
	  (_BracketMatcher<>::_M_make_range): Likewise.
	* include/bits/regex_compiler.tcc (_Compiler<>::_M_atom): Use
	  apropriate constructors of matchers above.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/anymatcher.cc:
	  New.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc: New.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/empty_range.cc:
	  New.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/emptygroup.cc:
	  New.
	* testsuite/28_regex/algorithms/regex_match/ecma/char/hex.cc: New.
	* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
	  New.
	* testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc: New.

From-SVN: r202189
2013-09-02 22:20:56 +00:00
Tim Shen
9222fb6f08 regex.h (basic_regex<>::assign): Don't lose _M_traits.
2013-08-29  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h (basic_regex<>::assign): Don't lose _M_traits.
	  (regex_iterator<>::regex_iterator): Return nullptr when regex_search
	     failed.
	  (regex_token_iterator<>::_M_end_of_seq): Should be defined true when
	    _M_result is(not isn't) nullptr.
	* include/bits/regex_compiler.h: Store _Compiler::_M_traits by reference
	  instead of by value.
	* include/bits/regex_executor.h (_DFSExecutor<>::_DFSExecutor): Add
	  _M_traits to _DFSExecutor.
	* include/bits/regex_executor.tcc (__get_executor<>): Pass traits to
	  _DFSExecutor too.
	* testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
	  New.
	* testsuite/28_regex/iterators/regex_token_iterator/wchar_t/
	  wstring_02.cc: New.

From-SVN: r202082
2013-08-29 18:33:07 +00:00
Tim Shen
33fbbb766c Makefile.am: Add regex_scanner.{h,tcc}.
2013-08-26  Tim Shen  <timshen91@gmail.com>

	* include/Makefile.am: Add regex_scanner.{h,tcc}.
	* include/Makefile.in: Regenerate.
	* include/bits/regex.h (match_search): Handle the `__first == __last`
	  situation correctly.
	* include/bits/regex_compiler.h: Move _Scanner...
	* include/bits/regex_scanner.h: ...to here. New.
	* include/bits/regex_compiler.tcc: Move _Scanner...
	* include/bits/regex_scanner.tcc: ...to here, too. New.
	* include/bits/regex_executor.tcc: Use value instead of reference for
	  submatch.
	* include/std/regex: Add regex_scanner.h
	* testsuite/28_regex/algorithms/regex_match/awk/cstring_01.cc: New.
	* testsuite/28_regex/algorithms/regex_match/basic/empty_range.cc: New.
	* testsuite/28_regex/algorithms/regex_match/ecma/cstring_hex.cc: New.
	* testsuite/28_regex/algorithms/regex_match/ecma/empty_range.cc: New.
	* testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc: New.

From-SVN: r202015
2013-08-27 02:49:22 +00:00
Tim Shen
1b488e33b6 regex.h: Executor caller.
2013-08-22  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex.h: Executor caller.
	* include/bits/regex_executor.h: Fix empty grouping problem.
	* include/bits/regex_executor.tcc: Same.
	* testsuite/28_regex/algorithms/regex_match/ecma/cstring_emptygroup.cc:
	  New.

From-SVN: r201914
2013-08-22 00:58:28 +00:00
Tim Shen
ce645eb091 regex_automaton.h: _S_opcode_backref.
2013-08-18  Tim Shen  <timshen91@gmail.com>

	* include/bits/regex_automaton.h: _S_opcode_backref.
	* include/bits/regex_automaton.tcc: Backref automaton support.
	* include/bits/regex_compiler.tcc: Parsing support.
	* include/bits/regex_executor.h: Add _M_traits for _DFSExecutor.
	* include/bits/regex_executor.tcc: Add _S_opcode_backref support.
	* testsuite/28_regex/algorithms/regex_match/ecma/string_backref.cc: New.

From-SVN: r201825
2013-08-18 13:55:48 +00:00
Tim Shen
6cb784b639 Makefile.am: Adjust to new files.
2013-08-07  Tim Shen  <timshen91@gmail.com>

	* include/Makefile.am: Adjust to new files.
	* include/Makefile.in: Regenerate.
	* include/bits/regex.h: Adjust to new interfaces.
	* include/bits/regex_automaton.h: New.
	* include/bits/regex_automaton.tcc: New.
	* include/bits/regex_compiler.h: Adjust to new files.
	* include/bits/regex_compiler.tcc: New.
	* include/bits/regex_constants.h: Tail spaces.
	* include/bits/regex_error.h: Likewise.
	* include/bits/regex_executor.h: New.
	* include/bits/regex_executor.tcc: New.
	* include/std/regex: Adjust to new files.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc: Adjust to new interfaces.

From-SVN: r201573
2013-08-07 16:27:36 +00:00
Tim Shen
399eeef978 Implement bracket expression.
2013-08-03  Tim Shen  <timshen91@gmail.com>

	Implement bracket expression.
	* include/bits/regex.h: Remove constexpr from "|=", etc.
	* include/bits/regex_compiler.h: Parse bracket expression.
	* include/bits/regex_nfa.h: _Comparator and _BracketMatcher(old
	_RangeMatcher).
	* include/bits/regex_nfa.tcc: Implement them.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	from regex_search to regex_match.
	* testsuite/28_regex/algorithms/regex_match/extended/
	cstring_bracket_01.cc: New.

From-SVN: r201465
2013-08-03 14:32:54 +00:00
Tim Shen
95c7d82816 Thompson matcher refactored.
2013-07-31  Tim Shen  <timshen91@gmail.com>

	Thompson matcher refactored. Fix grouping problem.
	* include/bits/regex.h: Use a dispatcher _M_get_matcher().
	* include/bits/regex_compiler.h: Tweak for auto switching.
	* include/bits/regex_grep_matcher.h: Class structure.
	* include/bits/regex_grep_matcher.tcc: _BFSMatcher(Thompson
	matcher) refactoring.
	* include/bits/regex_nfa.h: Change _Results's interfaces.
	* include/std/regex: Includes <map> and <queue>.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/57173.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc: New.

From-SVN: r201391
2013-07-31 22:36:11 +00:00
Tim Shen
1151053225 Revert last commit.
From-SVN: r201360
2013-07-31 03:36:37 +00:00
Tim Shen
abf1719efe Thompson matcher refactored.
2013-07-31  Tim Shen  <timshen91@gmail.com>

	Thompson matcher refactored. Fix grouping problem.
	* include/bits/regex.h: Use a dispatcher _M_get_matcher().
	* include/bits/regex_compiler.h: Tweak for auto switching.
	* include/bits/regex_grep_matcher.h: Class structure.
	* include/bits/regex_grep_matcher.tcc: _BFSMatcher(Thompson
	matcher) refactoring.
	* include/bits/regex_nfa.h: Change _Results's interfaces.
	* include/std/regex: Includes <map> and <queue>.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/57173.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/
	string_dispatch_01.cc: New.

From-SVN: r201358
2013-07-31 00:20:06 +00:00
Paolo Carlini
9a92fa8b66 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
Revert last commit.

From-SVN: r201349
2013-07-30 18:16:33 +00:00
Paolo Carlini
5034aa2102 2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
Revert last commit.

From-SVN: r201348
2013-07-30 18:13:15 +00:00
Tim Shen
a6dc77bc3d Thompson matcher refactored.
2013-07-30  Tim Shen  <timshen91@gmail.com>

	Thompson matcher refactored. Fix grouping problem.
	* include/bits/regex.h: Use a dispatcher _M_get_matcher().
	* include/bits/regex_compiler.h: Tweak for auto switching.
	* include/bits/regex_grep_matcher.h: Class structure.
	* include/bits/regex_grep_matcher.tcc: _BFSMatcher(Thompson
	matcher) refactoring.
	* include/bits/regex_nfa.h: Change _Results's interfaces.
	* include/std/regex: Includes <map> and <queue>.
	* testsuite/28_regex/algorithms/regex_match/extended/53622.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/57173.cc:
	For both matchers.
	* testsuite/28_regex/algorithms/regex_match/extended/string_dispatch_01.cc:
	New.

From-SVN: r201334
2013-07-30 12:02:55 +00:00
Tim Shen
37c74e2816 Reimplment matcher using Depth-first search(backtracking).
2013-07-24  Tim Shen  <timshen91@gmail.com>

	Reimplment matcher using Depth-first search(backtracking).
	PR libstdc++/53622
	PR libstdc++/57173
	* include/bits/regex.h: regex_match() and regex_search().
	* include/bits/regex_cursor.h: Fix _M_set_pos().
	* include/bits/regex_grep_matcher.h: add _M_dfs_match().
	* include/bits/regex_grep_matcher.tcc: Implement it.
	* testsuite/28_regex/algorithms/regex_match/extended/string_group_01.cc:
	New.
	* testsuite/28_regex/algorithms/regex_match/extended/string_group_02.cc:
	New.
	* testsuite/28_regex/algorithms/regex_search/basic/string_01.cc:
	Remove xfail.

From-SVN: r201213
2013-07-24 14:39:54 +00:00
Tim Shen
603c431f90 Partially implement regex_search.
2013-07-21  Tim Shen  <timshen91@gmail.com>

	Partially implement regex_search.
	* include/bits/regex.h: regex_search.
	* include/bits/regex_grep_matcher.h: _M_search_from_first.
	* include/bits/regex_grep_matcher.tcc: Implement it.
	* testsuite/28_regex/algorithms/regex_search/basic/string_01.cc: New.

From-SVN: r201113
2013-07-21 23:34:02 +00:00
Richard Sandiford
405feeb871 Update copyright in libstdc++-v3.
From-SVN: r195701
2013-02-03 17:54:05 +00:00
Benjamin Kosnik
d2edfb151d match: Rename to...
2012-10-05  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/28_regex/algorithms/match: Rename to...
	* testsuite/28_regex/algorithms/regex_match: ...this.
	* testsuite/28_regex/basic_regex/regex.cc: Rename to...
	* testsuite/28_regex/basic_regex/ctors/basic/default.cc: ...this.
	* testsuite/util/testsuite_regex.h: New.
	* testsuite/28_regex/basic_regex/ctors/basic/raw_string.cc: New.

From-SVN: r192146
2012-10-05 21:18:54 +00:00
Benjamin Kosnik
511e47fc2f 02_match: To...
2012-06-24  Benjamin Kosnik  <bkoz@redhat.com>

	* testsuite/28_regex/algorithms/02_match: To...
	* testsuite/28_regex/algorithms/match: ...this.
	* testsuite/28_regex/headers/04_header/regex/std_c++0x_neg.cc: Remove
	duplicate.

From-SVN: r188923
2012-06-25 06:01:13 +00:00
Paolo Carlini
f32fd5aaec re PR libstdc++/51711 (regex.h contains incorrect code)
2011-12-30  Paolo Carlini  <paolo.carlini@oracle.com>

	PR libstdc++/51711
	* include/bits/regex.h (regex_replace): Fix thinko.
	* testsuite/28_regex/algorithms/regex_replace/char/51711.cc: New.
	* testsuite/28_regex/algorithms/regex_replace/wchar_t/51711.cc:
	Likewise.

From-SVN: r182740
2011-12-30 11:40:37 +00:00
Benjamin Kosnik
cedf52d247 Makefile.am (sources): Add regex.cc.
2011-02-10  Benjamin Kosnik  <bkoz@redhat.com>

	* src/Makefile.am (sources): Add regex.cc.
	* src/Makefile.in: Regenerate.
	* src/regex.cc: New.
	* include/bits/regex_error.h (error_type): Use constexpr.
	(regex_error): Move ctor and dtor out of line.

	* testsuite/28_regex/03_requirements: To...
	* testsuite/28_regex/requirements: ... this.
	* testsuite/28_regex/04_header: To...
	* testsuite/28_regex/headers: ... this.
	* testsuite/28_regex/05_constants: To...
	* testsuite/28_regex/constants: ... this.
	* testsuite/28_regex/06_exception_type: To...
	* testsuite/28_regex/regex_error: ... this.
	* testsuite/28_regex/07_traits: To...
	* testsuite/28_regex/traits: ... this.
	* testsuite/28_regex/08_basic_regex: To...
	* testsuite/28_regex/basic_regex: ... this.
	* testsuite/28_regex/09_sub_match: To...
	* testsuite/28_regex/sub_match: ... this.
	* testsuite/28_regex/10_match_results: To...
	* testsuite/28_regex/match_results: ... this.
	* testsuite/28_regex/11_algorithms: To...
	* testsuite/28_regex/algorithms: ... this.
	* testsuite/28_regex/12_iterators: To...
	* testsuite/28_regex/iterators: ... this.

From-SVN: r170038
2011-02-11 01:23:10 +00:00