11 #ifndef _ATTRIB_STRING_PARSER_H_
12 #define _ATTRIB_STRING_PARSER_H_
18 # pragma clang diagnostic push
21 # pragma clang diagnostic ignored "-Wkeyword-macro"
23 #include <boost/regex.hpp>
25 # pragma clang diagnostic pop
82 boost::sregex_iterator
m_it;
89 static const boost::sregex_iterator endmark;
90 if (
m_it != endmark ) {
94 static const boost::regex varexp{
"\\$\\{([^}]+)\\}" };
101 const std::string name = m[1];
102 const char* cname = name.c_str();
103 if ( System::isEnvSet( cname ) ) {
105 return System::getEnv( cname );
109 boost::match_default | boost::format_all );
130 boost::sregex_iterator
parse()
const {
131 static const boost::regex exp{
"[[:space:]]*([^[:space:]]+)[[:space:]]*=[[:space:]]*'(.*?)'" };
132 return boost::sregex_iterator(
begin( m_data ),
end( m_data ), exp );