public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [v3] <regex> implementation foundation, version 2
@ 2010-06-21 19:52 Stephen M. Webb
  2010-06-22 10:19 ` Paolo Carlini
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen M. Webb @ 2010-06-21 19:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: libstdc++

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Version 2 of <regex>, now with the following:

o  long lines have been fixed
o  everything is now in headers (no ABI failures from library)
o  more test cases

-- 
Stephen M. Webb
stephen.webb@bregmasoft.ca

[-- Attachment #2: ChangeLog --]
[-- Type: text/plain, Size: 8324 bytes --]

2010-06-21  Stephen M. Webb  <stephen.webb@bregmasoft.ca

  Initial regex implementation.

  * include/std/regex: Modified to use bits/regex_* headers.
  * include/bits/regex_compiler.h: New file.
  * include/bits/regex_constants.h: New file.
  * include/bits/regex_cursor.h: New file.
  * include/bits/regex_error.h: New file.
  * include/bits/regex_grep_matcher.h: New file.
  * include/bits/regex_grep_matcher.tcc: New file.
  * include/bits/regex.h: New file.
  * include/bits/regex_nfa.h: New file.
  * include/bits/regex_nfa.tcc: New file.
  * include/Makefile.am: Added above new files.
  * include/Makefile.in: Regenrated.
  * testsuite/28_regex/02_definitions: New file.
  * testsuite/28_regex/03_requirements: New file.
  * testsuite/28_regex/03_requirements/typedefs.cc: New file.
  * testsuite/28_regex/04_header: New file.
  * testsuite/28_regex/04_header/regex: New file.
  * testsuite/28_regex/04_header/regex/std_c++0x_neg.cc: New file.
  * testsuite/28_regex/05_constants: New file.
  * testsuite/28_regex/05_constants/error_type.cc: New file.
  * testsuite/28_regex/05_constants/match_flag_type.cc: New file.
  * testsuite/28_regex/05_constants/syntax_option_type.cc: New file.
  * testsuite/28_regex/06_exception_type: New file.
  * testsuite/28_regex/06_exception_type/regex_error.cc: New file.
  * testsuite/28_regex/07_traits: New file.
  * testsuite/28_regex/07_traits/char: New file.
  * testsuite/28_regex/07_traits/char/ctor.cc: New file.
  * testsuite/28_regex/07_traits/char/length.cc: New file.
  * testsuite/28_regex/07_traits/char/transform.cc: New file.
  * testsuite/28_regex/07_traits/char/transform_primary.cc: New file.
  * testsuite/28_regex/07_traits/char/translate.cc: New file.
  * testsuite/28_regex/07_traits/char/translate_nocase.cc: New file.
  * testsuite/28_regex/07_traits/char/value.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t: New file.
  * testsuite/28_regex/07_traits/wchar_t/ctor.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t/length.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t/transform.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t/translate.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t/translate_nocase.cc: New file.
  * testsuite/28_regex/07_traits/wchar_t/value.cc: New file.
  * testsuite/28_regex/08_basic_regex: New file.
  * testsuite/28_regex/08_basic_regex/assign: New file.
  * testsuite/28_regex/08_basic_regex/assign/char: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/cstring_op.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/moveable.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/pstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/range.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/string.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/char/string_op.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/cstring_op.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/pstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/range.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/string.cc: New file.
  * testsuite/28_regex/08_basic_regex/assign/wchar_t/string_op.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors: New file.
  * testsuite/28_regex/08_basic_regex/ctors/basic: New file.
  * testsuite/28_regex/08_basic_regex/ctors/basic/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/basic/pstring_char.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/basic/pstring_wchar_t.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/basic/string_range_01_02_03.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/copy.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/cstring_awk.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/cstring_ecma.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/cstring_egrep.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/cstring_grep.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/default.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/move.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/range.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/char/string.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/extended: New file.
  * testsuite/28_regex/08_basic_regex/ctors/extended/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/extended/string_range_01_02_03.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/wchar_t: New file.
  * testsuite/28_regex/08_basic_regex/ctors/wchar_t/cstring.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/wchar_t/default.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/wchar_t/range.cc: New file.
  * testsuite/28_regex/08_basic_regex/ctors/wchar_t/string.cc: New file.
  * testsuite/28_regex/08_basic_regex/regex.cc: New file.
  * testsuite/28_regex/09_sub_match: New file.
  * testsuite/28_regex/09_sub_match/cast_char.cc: New file.
  * testsuite/28_regex/09_sub_match/cast_wchar_t.cc: New file.
  * testsuite/28_regex/09_sub_match/length.cc: New file.
  * testsuite/28_regex/09_sub_match/typedefs.cc: New file.
  * testsuite/28_regex/10_match_results: New file.
  * testsuite/28_regex/10_match_results/ctors: New file.
  * testsuite/28_regex/10_match_results/ctors/char: New file.
  * testsuite/28_regex/10_match_results/ctors/char/default.cc: New file.
  * testsuite/28_regex/10_match_results/ctors/wchar_t: New file.
  * testsuite/28_regex/10_match_results/ctors/wchar_t/default.cc: New file.
  * testsuite/28_regex/10_match_results/typedefs.cc: New file.
  * testsuite/28_regex/11_algorithms: New file.
  * testsuite/28_regex/11_algorithms/02_match: New file.
  * testsuite/28_regex/11_algorithms/02_match/basic: New file.
  * testsuite/28_regex/11_algorithms/02_match/basic/string_01.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/basic/string_range_00_03.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/basic/string_range_01_03.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/basic/string_range_02_03.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/cstring_plus.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/cstring_questionmark.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/string_any.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/string_range_00_03.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/string_range_01_03.cc: New file.
  * testsuite/28_regex/11_algorithms/02_match/extended/string_range_02_03.cc: New file.
  * testsuite/28_regex/12_iterators: New file.
  * testsuite/28_regex/12_iterators/regex_iterator: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/ctors: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/ctors/char: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/ctors/char/default.cc: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/ctors/wchar_t: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/ctors/wchar_t/default.cc: New file.
  * testsuite/28_regex/12_iterators/regex_iterator/typedefs.cc: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/ctors: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/ctors/char: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/ctors/char/default.cc: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/ctors/wchar_t: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/ctors/wchar_t/default.cc: New file.
  * testsuite/28_regex/12_iterators/regex_token_iterator/typedefs.cc: New file.
  * testsuite/28_regex/13_ecmascript: New file.

[-- Attachment #3: patch --]
[-- Type: application/x-bzip2, Size: 27979 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v3] <regex> implementation foundation, version 2
  2010-06-21 19:52 [v3] <regex> implementation foundation, version 2 Stephen M. Webb
@ 2010-06-22 10:19 ` Paolo Carlini
  2010-06-22 11:17   ` Paolo Carlini
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Carlini @ 2010-06-22 10:19 UTC (permalink / raw)
  To: stephen.webb; +Cc: Stephen M. Webb, gcc-patches, libstdc++

On 06/21/2010 08:58 PM, Stephen M. Webb wrote:
> Version 2 of <regex>, now with the following:
>
> o  long lines have been fixed
> o  everything is now in headers (no ABI failures from library)
> o  more test cases
>   
Thanks.

Please add definiitions for those const static data members, I'm not
comfortable with playing such undefined behavior tricks just to spare a
few lines, in these times of whole program optimization, etc. It's
risky. I may bu guilty myself of some in the past, that's not an excuse.

Another change we should make, *.tcc files, by definition host *out of
line* functions: thus, the functions which we decided, for now at least,
to have inline in headers, should be simply defined in the class body,
in the *.h file. In any case, stuff like the _State constructors should
be inline anyway. I'm also seeing _M_lookup_classname, for example, out
of line, and it's also tiny. In general, remember, in our library *tiny*
functions are inline, and defined in the class body itself, in the *.h file.

Thanks,
Paolo.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [v3] <regex> implementation foundation, version 2
  2010-06-22 10:19 ` Paolo Carlini
@ 2010-06-22 11:17   ` Paolo Carlini
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Carlini @ 2010-06-22 11:17 UTC (permalink / raw)
  To: stephen.webb; +Cc: Stephen M. Webb, gcc-patches, libstdc++

... stylistically, SMW_IMPLEMENT_LATER should be uglified as
_SMW_IMPLEMENT_LATER; more important, never a comma at the beginning of
a line, I see that problem quite a few times in constructors, for the
commas separating the initializers.

Paolo.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-06-22 10:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-06-21 19:52 [v3] <regex> implementation foundation, version 2 Stephen M. Webb
2010-06-22 10:19 ` Paolo Carlini
2010-06-22 11:17   ` Paolo Carlini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).