re PR libstdc++/77356 (regex error for a ECMAScript syntax string)
authorTim Shen <timshen@google.com>
Sat, 27 Aug 2016 02:03:23 +0000 (02:03 +0000)
committerTim Shen <timshen@gcc.gnu.org>
Sat, 27 Aug 2016 02:03:23 +0000 (02:03 +0000)
commit4aebb4e4a6444400c9592484dab9336754e185e3
treee0750202a9066afec6ce77776c317ae1c32a7cfe
parentd8921e81e9891b357f6302a0802434f6e3f6e09e
re PR libstdc++/77356 (regex error for a ECMAScript syntax string)

PR libstdc++/77356
* include/bits/regex_compiler.tcc(_M_insert_bracket_matcher,
_M_expression_term): Modify to support dash literal.
* include/bits/regex_scanner.h: Add dash as a token type to make
a different from the mandated dash literal by escaping.
* include/bits/regex_scanner.tcc(_M_scan_in_bracket): Emit dash
token in bracket expression parsing.
* testsuite/28_regex/regression.cc: Add new testcases.

From-SVN: r239794
libstdc++-v3/ChangeLog
libstdc++-v3/include/bits/regex_compiler.tcc
libstdc++-v3/include/bits/regex_scanner.h
libstdc++-v3/include/bits/regex_scanner.tcc
libstdc++-v3/testsuite/28_regex/regression.cc