public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "timshen at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/61424] std::regex matches right to left, not leftmost longest
Date: Tue, 01 Jul 2014 02:11:00 -0000	[thread overview]
Message-ID: <bug-61424-4-ORbuSTS5EX@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-61424-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61424

--- Comment #3 from Tim Shen <timshen at gcc dot gnu.org> ---
Author: timshen
Date: Tue Jul  1 02:10:31 2014
New Revision: 212184

URL: https://gcc.gnu.org/viewcvs?rev=212184&root=gcc&view=rev
Log:
    PR libstdc++/61424
    * include/bits/regex.tcc (__regex_algo_impl<>): Use DFS for ECMAScript,
    not just regex containing back-references.
    * include/bits/regex_compiler.tcc (_Compiler<>::_M_disjunction):
    exchange _M_next and _M_alt for alternative operator,
    making matching from left to right.
    * include/bits/regex_executor.h (_State_info<>::_M_get_sol_pos):
    Add position tracking fom DFS.
    * include/bits/regex_executor.tcc (_Executor<>::_M_main_dispatch,
    _Executor<>::_M_dfs): Likewise.
    * include/bits/regex_scanner.h: Remove unused enum entry.
    * testsuite/28_regex/algorithms/regex_search/61424.cc: New
    testcase from PR.


Added:
    trunk/libstdc++-v3/testsuite/28_regex/algorithms/regex_search/61424.cc
Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/regex.tcc
    trunk/libstdc++-v3/include/bits/regex_compiler.tcc
    trunk/libstdc++-v3/include/bits/regex_executor.h
    trunk/libstdc++-v3/include/bits/regex_executor.tcc
    trunk/libstdc++-v3/include/bits/regex_scanner.h


  parent reply	other threads:[~2014-07-01  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-05 20:11 [Bug libstdc++/61424] New: " redi at gcc dot gnu.org
2014-06-05 21:06 ` [Bug libstdc++/61424] " redi at gcc dot gnu.org
2014-06-05 22:33 ` timshen at gcc dot gnu.org
2014-07-01  2:11 ` timshen at gcc dot gnu.org [this message]
2015-02-10 14:43 ` pierreblavy at yahoo dot fr

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-61424-4-ORbuSTS5EX@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).