head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.16
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.14
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.12
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	netbsd-7-2-RELEASE:1.1.1.1
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	netbsd-7-1-2-RELEASE:1.1.1.1
	pgoyette-compat:1.2.0.10
	pgoyette-compat-base:1.2
	netbsd-7-1-1-RELEASE:1.1.1.1
	perseant-stdc-iso10646:1.2.0.8
	perseant-stdc-iso10646-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.6
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	netbsd-7-1:1.1.1.1.0.14
	netbsd-7-1-RELEASE:1.1.1.1
	netbsd-7-1-RC2:1.1.1.1
	netbsd-7-nhusb-base-20170116:1.1.1.1
	bouyer-socketcan:1.2.0.4
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	netbsd-7-1-RC1:1.1.1.1
	pgoyette-localcount-20161104:1.2
	netbsd-7-0-2-RELEASE:1.1.1.1
	localcount-20160914:1.2
	netbsd-7-nhusb:1.1.1.1.0.12
	netbsd-7-nhusb-base:1.1.1.1
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.2
	pgoyette-localcount-base:1.2
	netbsd-7-0-1-RELEASE:1.1.1.1
	netbsd-7-0:1.1.1.1.0.10
	netbsd-7-0-RELEASE:1.1.1.1
	gcc-4-8-5-pre-gcc-old-import:1.1.1.1
	netbsd-7-0-RC3:1.1.1.1
	netbsd-7-0-RC2:1.1.1.1
	post-gcc-4-8-5-merge:1.1.1.1
	gcc-4-8-5:1.1.1.1
	netbsd-7-0-RC1:1.1.1.1
	gcc-4-8-4:1.1.1.1
	gcc-4-8-20141009:1.1.1.1
	tls-maxphys-base:1.1.1.1
	tls-maxphys:1.1.1.1.0.8
	netbsd-7:1.1.1.1.0.6
	netbsd-7-base:1.1.1.1
	gcc-4-8-3:1.1.1.1
	yamt-pagecache:1.1.1.1.0.4
	yamt-pagecache-base9:1.1.1.1
	tls-earlyentropy:1.1.1.1.0.2
	tls-earlyentropy-base:1.1.1.1
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.1.1.1
	riastradh-drm2-base3:1.1.1.1
	gcc-4-8-3-pre-r208254:1.1.1.1
	gcc-4-8-3-pre-r206687:1.1.1.1
	FSF:1.1.1;
locks; strict;
comment	@ * @;


1.2
date	2016.01.24.09.43.39;	author mrg;	state dead;
branches;
next	1.1;
commitid	dxhNntGC3MSSqaSy;

1.1
date	2014.03.01.08.41.34;	author mrg;	state Exp;
branches
	1.1.1.1;
next	;
commitid	TtaB91QNTknAoYqx;

1.1.1.1
date	2014.03.01.08.41.34;	author mrg;	state Exp;
branches
	1.1.1.1.4.1
	1.1.1.1.8.1;
next	;
commitid	TtaB91QNTknAoYqx;

1.1.1.1.4.1
date	2014.03.01.08.41.34;	author yamt;	state dead;
branches;
next	1.1.1.1.4.2;
commitid	DX8bafDLmqEbpyBx;

1.1.1.1.4.2
date	2014.05.22.16.37.48;	author yamt;	state Exp;
branches;
next	;
commitid	DX8bafDLmqEbpyBx;

1.1.1.1.8.1
date	2014.03.01.08.41.34;	author tls;	state dead;
branches;
next	1.1.1.1.8.2;
commitid	jTnpym9Qu0o4R1Nx;

1.1.1.1.8.2
date	2014.08.19.23.54.49;	author tls;	state Exp;
branches;
next	;
commitid	jTnpym9Qu0o4R1Nx;


desc
@@


1.2
log
@merge GCC 5.3.  round 1.  this probably won't work  :-)

libsanitizer likely needs to be re-ported, though i've done most of
the updating we'll need i think already.
@
text
@// class template regex -*- C++ -*-

// Copyright (C) 2010-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/**
 *  @@file bits/regex_grep_matcher.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @@headername{regex}
 */

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  template<typename _BiIter>
    class sub_match;

  template<typename _Bi_iter, typename _Allocator>
    class match_results;

_GLIBCXX_END_NAMESPACE_VERSION
  
namespace __detail
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   *  @@defgroup regex-detail Base and Implementation Classes
   *  @@ingroup regex
   *  @@{
   */

  /// A _Results facade specialized for wrapping a templated match_results.
  template<typename _FwdIterT, typename _Alloc>
    class _SpecializedResults
    : public _Results
    {
    public:
      _SpecializedResults(const _Automaton::_SizeT __size,
			  const _SpecializedCursor<_FwdIterT>& __cursor,
			  match_results<_FwdIterT, _Alloc>& __m);

      void
      _M_set_pos(int __i, int __j, const _PatternCursor& __pc);

      void
      _M_set_matched(int __i, bool __is_matched)
      { _M_results.at(__i).matched = __is_matched; }

    private:
      match_results<_FwdIterT, _Alloc>& _M_results;
    };

  template<typename _FwdIterT, typename _Alloc>
    _SpecializedResults<_FwdIterT, _Alloc>::
    _SpecializedResults(const _Automaton::_SizeT __size,
    			const _SpecializedCursor<_FwdIterT>& __cursor,
                        match_results<_FwdIterT, _Alloc>& __m)
    : _M_results(__m)
    {
      _M_results.clear();
      _M_results.reserve(__size + 2);
      _M_results.resize(__size);
      typename match_results<_FwdIterT, _Alloc>::value_type __sm;
      __sm.first = __sm.second = __cursor._M_begin();
      _M_results.push_back(__sm);
      __sm.first = __sm.second = __cursor._M_end();
      _M_results.push_back(__sm);
    }

  template<typename _FwdIterT, typename _Alloc>
    void
    _SpecializedResults<_FwdIterT, _Alloc>::
    _M_set_pos(int __i, int __j, const _PatternCursor& __pc)
    { 
      typedef const _SpecializedCursor<_FwdIterT>& _CursorT;
      _CursorT __c = static_cast<_CursorT>(__pc);
      if (__j == 0)
	_M_results.at(__i).first = __c._M_pos();
      else
	_M_results.at(__i).second = __c._M_pos()+1;
    }

  /// A stack of states used in evaluating the NFA.
  typedef std::stack<_StateIdT, std::vector<_StateIdT> > _StateStack;

  /// Executes a regular expression NFA/DFA over a range using a
  /// variant of the parallel execution algorithm featured in the grep
  /// utility, modified to use Laurikari tags.
  class _Grep_matcher
  {
  public:
    _Grep_matcher(_PatternCursor&                   __p,
		  _Results&                         __r,
		  const _AutomatonPtr&              __automaton,
		  regex_constants::match_flag_type  __flags);

  private:
    _StateSet
    _M_e_closure(_StateIdT __i);

    _StateSet
    _M_e_closure(const _StateSet& __s);

    _StateSet
    _M_e_closure(_StateStack& __stack, const _StateSet& __s);

    const std::shared_ptr<_Nfa>        _M_nfa;
    _PatternCursor&                    _M_pattern;
    _Results&                          _M_results;
  };

 //@@} regex-detail
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __detail
} // namespace std

#include <bits/regex_grep_matcher.tcc>
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@import GCC 4.8 branch at r206687.

highlights from: http://gcc.gnu.org/gcc-4.6/changes.html

   GCC now has stricter checks for invalid command-line options
   New -Wunused-but-set-variable and -Wunused-but-set-parameter
      warnings
   Many platforms have been obsoleted
   Link-time optimization improvements
   A new switch -fstack-usage has been added
   A new function attribute leaf was introduced
   A new warning, enabled by -Wdouble-promotion
   Support for selectively enabling and disabling warnings via
      #pragma GCC diagnostic has been added
   There is now experimental support for some features from the
      upcoming C1X revision of the ISO C standard
   Improved experimental support for the upcoming C++0x ISO C++
      standard
   G++ now issues clearer diagnostics in several cases
   Updates for ARM, x86, MIPS, PPC/PPC64, SPARC
   Darwin, FreeBSD, Solaris 2, MinGW and Cygwin now all support
      __float128 on 32-bit and 64-bit x86 targets. [*1]

highlights from: http://gcc.gnu.org/gcc-4.7/changes.html

   The -fconserve-space flag has been deprecated
   Support for a new parameter --param case-values-threshold=n
      was added
   Interprocedural and Link-time optimization improvements
   A new built-in, __builtin_assume_aligned, has been added
   A new warning option -Wunused-local-typedefs was added
   A new experimental command-line option -ftrack-macro-expansion
      was added
   Support for atomic operations specifying the C++11/C11 memory
      model has been added
   There is support for some more features from the C11 revision
      of the ISO C standard
   Improved experimental support for the new ISO C++ standard,
      C++11
   Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE*
   A new option (-grecord-gcc-switches) was added

highlights from: http://gcc.gnu.org/gcc-4.8/changes.html

   GCC now uses C++ as its implementation language.  This means
      that to build GCC from sources, you will need a C++
      compiler that understands C++ 2003
   DWARF4 is now the default when generating DWARF debug
      information
   A new general optimization level, -Og, has been introduced
   A new option -ftree-partial-pre was added
   The option -fconserve-space has been removed
   The command-line options -fipa-struct-reorg and
      -fipa-matrix-reorg have been removed
   Interprocedural and Link-time optimization improvements
   AddressSanitizer, a fast memory error detector, has been
      added  [*2]
   A new -Wsizeof-pointer-memaccess warning has been added
   G++ now supports a -std=c++1y option for experimentation
      with features proposed for the next revision of the
      standard, expected around 2014
   Improved experimental support for the new ISO C++ standard,
      C++11
   A new port has been added to support AArch64
   Updates for ARM, x86, MIPS, PPC/PPC64, SH, SPARC, TILE*


[*1] we should support this too!
[*2] we should look into this.
     https://code.google.com/p/address-sanitizer/
@
text
@@


1.1.1.1.8.1
log
@file regex_grep_matcher.h was added on branch tls-maxphys on 2014-08-19 23:54:49 +0000
@
text
@d1 138
@


1.1.1.1.8.2
log
@Rebase to HEAD as of a few days ago.
@
text
@a0 138
// class template regex -*- C++ -*-

// Copyright (C) 2010-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/**
 *  @@file bits/regex_grep_matcher.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @@headername{regex}
 */

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  template<typename _BiIter>
    class sub_match;

  template<typename _Bi_iter, typename _Allocator>
    class match_results;

_GLIBCXX_END_NAMESPACE_VERSION
  
namespace __detail
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   *  @@defgroup regex-detail Base and Implementation Classes
   *  @@ingroup regex
   *  @@{
   */

  /// A _Results facade specialized for wrapping a templated match_results.
  template<typename _FwdIterT, typename _Alloc>
    class _SpecializedResults
    : public _Results
    {
    public:
      _SpecializedResults(const _Automaton::_SizeT __size,
			  const _SpecializedCursor<_FwdIterT>& __cursor,
			  match_results<_FwdIterT, _Alloc>& __m);

      void
      _M_set_pos(int __i, int __j, const _PatternCursor& __pc);

      void
      _M_set_matched(int __i, bool __is_matched)
      { _M_results.at(__i).matched = __is_matched; }

    private:
      match_results<_FwdIterT, _Alloc>& _M_results;
    };

  template<typename _FwdIterT, typename _Alloc>
    _SpecializedResults<_FwdIterT, _Alloc>::
    _SpecializedResults(const _Automaton::_SizeT __size,
    			const _SpecializedCursor<_FwdIterT>& __cursor,
                        match_results<_FwdIterT, _Alloc>& __m)
    : _M_results(__m)
    {
      _M_results.clear();
      _M_results.reserve(__size + 2);
      _M_results.resize(__size);
      typename match_results<_FwdIterT, _Alloc>::value_type __sm;
      __sm.first = __sm.second = __cursor._M_begin();
      _M_results.push_back(__sm);
      __sm.first = __sm.second = __cursor._M_end();
      _M_results.push_back(__sm);
    }

  template<typename _FwdIterT, typename _Alloc>
    void
    _SpecializedResults<_FwdIterT, _Alloc>::
    _M_set_pos(int __i, int __j, const _PatternCursor& __pc)
    { 
      typedef const _SpecializedCursor<_FwdIterT>& _CursorT;
      _CursorT __c = static_cast<_CursorT>(__pc);
      if (__j == 0)
	_M_results.at(__i).first = __c._M_pos();
      else
	_M_results.at(__i).second = __c._M_pos()+1;
    }

  /// A stack of states used in evaluating the NFA.
  typedef std::stack<_StateIdT, std::vector<_StateIdT> > _StateStack;

  /// Executes a regular expression NFA/DFA over a range using a
  /// variant of the parallel execution algorithm featured in the grep
  /// utility, modified to use Laurikari tags.
  class _Grep_matcher
  {
  public:
    _Grep_matcher(_PatternCursor&                   __p,
		  _Results&                         __r,
		  const _AutomatonPtr&              __automaton,
		  regex_constants::match_flag_type  __flags);

  private:
    _StateSet
    _M_e_closure(_StateIdT __i);

    _StateSet
    _M_e_closure(const _StateSet& __s);

    _StateSet
    _M_e_closure(_StateStack& __stack, const _StateSet& __s);

    const std::shared_ptr<_Nfa>        _M_nfa;
    _PatternCursor&                    _M_pattern;
    _Results&                          _M_results;
  };

 //@@} regex-detail
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __detail
} // namespace std

#include <bits/regex_grep_matcher.tcc>
@


1.1.1.1.4.1
log
@file regex_grep_matcher.h was added on branch yamt-pagecache on 2014-05-22 16:37:48 +0000
@
text
@d1 138
@


1.1.1.1.4.2
log
@sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs.  ("Protocol error: too many arguments")
@
text
@a0 138
// class template regex -*- C++ -*-

// Copyright (C) 2010-2013 Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library.  This library is free
// software; you can redistribute it and/or modify it under the
// terms of the GNU General Public License as published by the
// Free Software Foundation; either version 3, or (at your option)
// any later version.

// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// Under Section 7 of GPL version 3, you are granted additional
// permissions described in the GCC Runtime Library Exception, version
// 3.1, as published by the Free Software Foundation.

// You should have received a copy of the GNU General Public License and
// a copy of the GCC Runtime Library Exception along with this program;
// see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
// <http://www.gnu.org/licenses/>.

/**
 *  @@file bits/regex_grep_matcher.h
 *  This is an internal header file, included by other library headers.
 *  Do not attempt to use it directly. @@headername{regex}
 */

namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  template<typename _BiIter>
    class sub_match;

  template<typename _Bi_iter, typename _Allocator>
    class match_results;

_GLIBCXX_END_NAMESPACE_VERSION
  
namespace __detail
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION

  /**
   *  @@defgroup regex-detail Base and Implementation Classes
   *  @@ingroup regex
   *  @@{
   */

  /// A _Results facade specialized for wrapping a templated match_results.
  template<typename _FwdIterT, typename _Alloc>
    class _SpecializedResults
    : public _Results
    {
    public:
      _SpecializedResults(const _Automaton::_SizeT __size,
			  const _SpecializedCursor<_FwdIterT>& __cursor,
			  match_results<_FwdIterT, _Alloc>& __m);

      void
      _M_set_pos(int __i, int __j, const _PatternCursor& __pc);

      void
      _M_set_matched(int __i, bool __is_matched)
      { _M_results.at(__i).matched = __is_matched; }

    private:
      match_results<_FwdIterT, _Alloc>& _M_results;
    };

  template<typename _FwdIterT, typename _Alloc>
    _SpecializedResults<_FwdIterT, _Alloc>::
    _SpecializedResults(const _Automaton::_SizeT __size,
    			const _SpecializedCursor<_FwdIterT>& __cursor,
                        match_results<_FwdIterT, _Alloc>& __m)
    : _M_results(__m)
    {
      _M_results.clear();
      _M_results.reserve(__size + 2);
      _M_results.resize(__size);
      typename match_results<_FwdIterT, _Alloc>::value_type __sm;
      __sm.first = __sm.second = __cursor._M_begin();
      _M_results.push_back(__sm);
      __sm.first = __sm.second = __cursor._M_end();
      _M_results.push_back(__sm);
    }

  template<typename _FwdIterT, typename _Alloc>
    void
    _SpecializedResults<_FwdIterT, _Alloc>::
    _M_set_pos(int __i, int __j, const _PatternCursor& __pc)
    { 
      typedef const _SpecializedCursor<_FwdIterT>& _CursorT;
      _CursorT __c = static_cast<_CursorT>(__pc);
      if (__j == 0)
	_M_results.at(__i).first = __c._M_pos();
      else
	_M_results.at(__i).second = __c._M_pos()+1;
    }

  /// A stack of states used in evaluating the NFA.
  typedef std::stack<_StateIdT, std::vector<_StateIdT> > _StateStack;

  /// Executes a regular expression NFA/DFA over a range using a
  /// variant of the parallel execution algorithm featured in the grep
  /// utility, modified to use Laurikari tags.
  class _Grep_matcher
  {
  public:
    _Grep_matcher(_PatternCursor&                   __p,
		  _Results&                         __r,
		  const _AutomatonPtr&              __automaton,
		  regex_constants::match_flag_type  __flags);

  private:
    _StateSet
    _M_e_closure(_StateIdT __i);

    _StateSet
    _M_e_closure(const _StateSet& __s);

    _StateSet
    _M_e_closure(_StateStack& __stack, const _StateSet& __s);

    const std::shared_ptr<_Nfa>        _M_nfa;
    _PatternCursor&                    _M_pattern;
    _Results&                          _M_results;
  };

 //@@} regex-detail
_GLIBCXX_END_NAMESPACE_VERSION
} // namespace __detail
} // namespace std

#include <bits/regex_grep_matcher.tcc>
@


