public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working
@ 2014-11-07 18:33 gnu-org at bignm dot com
2014-11-08 9:23 ` [Bug libstdc++/63775] " timshen at gcc dot gnu.org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: gnu-org at bignm dot com @ 2014-11-07 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63775
Bug ID: 63775
Summary: [C++11] Regex range with leading dash (-) not working
Product: gcc
Version: 4.9.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: gnu-org at bignm dot com
Created attachment 33918
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33918&action=edit
Source code of test program
Partial output from file below:
Note the String below should match the Regexp. Full source code of the test
program is attached below.
DEBUG: test_group(): String = 'module_method'
DEBUG: test_group(): Regexp = '/^([-a-z0-9]+)_([-a-z0-9]+)$/o'
DEBUG: group_regexp(): Using 'o' flag
DEBUG: group_regexp(): Match Failed!
DEBUG: test_group(): First match in 0.000753880 seconds
DEBUG: test_group(): First match failed!
DEBUG: group_regexp(): Using 'o' flag
DEBUG: group_regexp(): Match Failed!
DEBUG: test_group(): Second match in 0.000759125 seconds
DEBUG: test_group(): Second match failed!
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/63775] [C++11] Regex range with leading dash (-) not working
2014-11-07 18:33 [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working gnu-org at bignm dot com
@ 2014-11-08 9:23 ` timshen at gcc dot gnu.org
2014-11-13 7:40 ` timshen at gcc dot gnu.org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2014-11-08 9:23 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63775
Tim Shen <timshen at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |timshen at gcc dot gnu.org
--- Comment #1 from Tim Shen <timshen at gcc dot gnu.org> ---
Ah, the current bracket expression implementation is too naive. I'll fix it.
Thanks for reporting :)
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/63775] [C++11] Regex range with leading dash (-) not working
2014-11-07 18:33 [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working gnu-org at bignm dot com
2014-11-08 9:23 ` [Bug libstdc++/63775] " timshen at gcc dot gnu.org
@ 2014-11-13 7:40 ` timshen at gcc dot gnu.org
2015-06-05 4:59 ` timshen at gcc dot gnu.org
2023-07-20 11:32 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2014-11-13 7:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63775
--- Comment #2 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Thu Nov 13 07:40:01 2014
New Revision: 217461
URL: https://gcc.gnu.org/viewcvs?rev=217461&root=gcc&view=rev
Log:
PR libstdc++/63775
* include/bits/regex_compiler.h (_Compiler<>::_M_expression_term,
_BracketMatcher<>::_M_make_range): Throw regex_erorr on invalid range
like [z-a]. Change _M_expression_term interface.
* include/bits/regex_compiler.tcc (
_Compiler<>::_M_insert_bracket_matcher,
_Compiler<>::_M_expression_term): Rewrite bracket expression parsing.
* testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
Add testcases and move file out of extended.
Added:
trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc
Removed:
trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/bits/regex_compiler.h
trunk/libstdc++-v3/include/bits/regex_compiler.tcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/63775] [C++11] Regex range with leading dash (-) not working
2014-11-07 18:33 [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working gnu-org at bignm dot com
2014-11-08 9:23 ` [Bug libstdc++/63775] " timshen at gcc dot gnu.org
2014-11-13 7:40 ` timshen at gcc dot gnu.org
@ 2015-06-05 4:59 ` timshen at gcc dot gnu.org
2023-07-20 11:32 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: timshen at gcc dot gnu.org @ 2015-06-05 4:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63775
--- Comment #4 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Fri Jun 5 04:58:26 2015
New Revision: 224144
URL: https://gcc.gnu.org/viewcvs?rev=224144&root=gcc&view=rev
Log:
PR libstdc++/66359
Backport from mainline
2014-11-13 Tim Shen <timshen@google.com>
PR libstdc++/63775
* include/bits/regex_compiler.h (_Compiler<>::_M_expression_term,
_BracketMatcher<>::_M_make_range): Throw regex_erorr on invalid range
like [z-a]. Change _M_expression_term interface.
* include/bits/regex_compiler.tcc (
_Compiler<>::_M_insert_bracket_matcher,
_Compiler<>::_M_expression_term): Rewrite bracket expression parsing.
* testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
Add testcases and move file out of extended.
Added:
branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc
Removed:
branches/gcc-4_9-branch/libstdc++-v3/testsuite/28_regex/algorithms/regex_match/extended/cstring_bracket_01.cc
Modified:
branches/gcc-4_9-branch/libstdc++-v3/ChangeLog
branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex_compiler.h
branches/gcc-4_9-branch/libstdc++-v3/include/bits/regex_compiler.tcc
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/63775] [C++11] Regex range with leading dash (-) not working
2014-11-07 18:33 [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working gnu-org at bignm dot com
` (2 preceding siblings ...)
2015-06-05 4:59 ` timshen at gcc dot gnu.org
@ 2023-07-20 11:32 ` redi at gcc dot gnu.org
3 siblings, 0 replies; 5+ messages in thread
From: redi at gcc dot gnu.org @ 2023-07-20 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63775
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.9.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-20 11:32 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-07 18:33 [Bug c++/63775] New: [C++11] Regex range with leading dash (-) not working gnu-org at bignm dot com
2014-11-08 9:23 ` [Bug libstdc++/63775] " timshen at gcc dot gnu.org
2014-11-13 7:40 ` timshen at gcc dot gnu.org
2015-06-05 4:59 ` timshen at gcc dot gnu.org
2023-07-20 11:32 ` redi at gcc dot gnu.org
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).