Committed revision 185449.

Thanks!

Howard

On Jun 28, 2013, at 8:31 PM, William Fisher <[email protected]> wrote:

> This patch fixes a bug where the regex parser doesn't advance the pointer 
> after reading the third character of an octal escape (in awk mode).
> 
> That is, regex{"\\141", awk} results in the regular expression /a1/ instead 
> of just /a/.
> 
> Here is the test case:
> 
> ```
> #include <regex>
> #include <cassert>
> 
> int main() 
> {
>     using std::regex_constants::awk;
> 
>     assert(std::regex_match("\4", std::regex{"\\4", awk}));
>     assert(std::regex_match("\41", std::regex{"\\41", awk}));
>     assert(std::regex_match("\141", std::regex{"\\141", awk}));
>     assert(std::regex_match("\1411", std::regex{"\\1411", awk}));
> }
> ```
> 
> Thanks.
> 
> <octal_escape.patch>_______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to