// class template regex -*- C++ -*-
-// Copyright (C) 2010 Free Software Foundation, Inc.
+// Copyright (C) 2010, 2011 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
// <http://www.gnu.org/licenses/>.
/**
- * @file bits/regex_parser.h
- * This is an internal header file, included by other library headers.
- * You should not attempt to use it directly.
+ * @file bits/regex_compiler.h
+ * This is an internal header file, included by other library headers.
+ * Do not attempt to use it directly. @headername{regex}
*/
-namespace std
+namespace std _GLIBCXX_VISIBILITY(default)
{
+_GLIBCXX_BEGIN_NAMESPACE_VERSION
+
namespace __regex
{
struct _Scanner_base
: _M_traits(__traits), _M_scanner(__b, __e, __flags, _M_traits.getloc()),
_M_state_store(__flags)
{
- using std::bind;
- using std::placeholders::_1;
- using std::placeholders::_2;
typedef _StartTagger<_InIter, _TraitsT> _Start;
typedef _EndTagger<_InIter, _TraitsT> _End;
_StateSeq __r(_M_state_store,
- _M_state_store._M_insert_subexpr_begin(
- bind(_Start(0), _1, _2)));
+ _M_state_store._M_insert_subexpr_begin(_Start(0)));
_M_disjunction();
if (!_M_stack.empty())
{
__r._M_append(_M_stack.top());
_M_stack.pop();
}
- __r._M_append(_M_state_store.
- _M_insert_subexpr_end(0, bind(_End(0), _1, _2)));
+ __r._M_append(_M_state_store._M_insert_subexpr_end(0, _End(0)));
__r._M_append(_M_state_store._M_insert_accept());
}
_Compiler<_InIter, _TraitsT>::
_M_atom()
{
- using std::bind;
- using std::placeholders::_1;
- using std::placeholders::_2;
typedef _CharMatcher<_InIter, _TraitsT> _CMatcher;
typedef _StartTagger<_InIter, _TraitsT> _Start;
typedef _EndTagger<_InIter, _TraitsT> _End;
if (_M_match_token(_ScannerT::_S_token_anychar))
{
_M_stack.push(_StateSeq(_M_state_store,
- _M_state_store.
- _M_insert_matcher(bind(_AnyMatcher, _1))));
+ _M_state_store._M_insert_matcher
+ (_AnyMatcher)));
return true;
}
if (_M_match_token(_ScannerT::_S_token_ord_char))
{
- _M_stack.push(_StateSeq
- (_M_state_store, _M_state_store.
- _M_insert_matcher
- (bind(_CMatcher(_M_cur_value[0], _M_traits), _1))));
+ _M_stack.push(_StateSeq(_M_state_store,
+ _M_state_store._M_insert_matcher
+ (_CMatcher(_M_cur_value[0], _M_traits))));
return true;
}
if (_M_match_token(_ScannerT::_S_token_quoted_char))
{
// note that in the ECMA grammar, this case covers backrefs.
_M_stack.push(_StateSeq(_M_state_store,
- _M_state_store.
- _M_insert_matcher
- (bind(_CMatcher(_M_cur_value[0], _M_traits),
- _1))));
+ _M_state_store._M_insert_matcher
+ (_CMatcher(_M_cur_value[0], _M_traits))));
return true;
}
if (_M_match_token(_ScannerT::_S_token_backref))
int __mark = _M_state_store._M_sub_count();
_StateSeq __r(_M_state_store,
_M_state_store.
- _M_insert_subexpr_begin(bind(_Start(__mark), _1, _2)));
+ _M_insert_subexpr_begin(_Start(__mark)));
this->_M_disjunction();
if (!_M_match_token(_ScannerT::_S_token_subexpr_end))
__throw_regex_error(regex_constants::error_paren);
_M_stack.pop();
}
__r._M_append(_M_state_store._M_insert_subexpr_end
- (__mark, bind(_End(__mark), _1, _2)));
+ (__mark, _End(__mark)));
_M_stack.push(__r);
return true;
}
_Compiler<_InIter, _TraitsT>::
_M_bracket_expression()
{
- using std::bind;
- using std::placeholders::_1;
if (_M_match_token(_ScannerT::_S_token_bracket_begin))
{
_RMatcherT __matcher(_M_match_token(_ScannerT::_S_token_line_begin),
|| !_M_match_token(_ScannerT::_S_token_bracket_end))
__throw_regex_error(regex_constants::error_brack);
_M_stack.push(_StateSeq(_M_state_store,
- _M_state_store._M_insert_matcher
- (bind(__matcher, _1))));
+ _M_state_store._M_insert_matcher(__matcher)));
return true;
}
return false;
__f)._M_nfa())); }
} // namespace __regex
-} // namespace std
+
+_GLIBCXX_END_NAMESPACE_VERSION
+} // namespace
/* vim: set ts=8 sw=2 sts=2: */