wrap grammar into anonymous namespace - attempting to fix VC++ compilation issue (#3573)
This commit is contained in:
parent
9010cd9ac6
commit
e46785a063
1 changed files with 7 additions and 10 deletions
|
@ -94,29 +94,26 @@ void parse_attr(svg_parser & parser,rapidxml::xml_node<char> const* node);
|
||||||
void parse_attr(svg_parser & parser,char const * name, char const* value);
|
void parse_attr(svg_parser & parser,char const * name, char const* value);
|
||||||
|
|
||||||
|
|
||||||
namespace grammar {
|
namespace { namespace grammar {
|
||||||
|
|
||||||
namespace x3 = boost::spirit::x3;
|
namespace x3 = boost::spirit::x3;
|
||||||
|
|
||||||
using color_lookup_type = std::vector<std::pair<double, agg::rgba8> >;
|
using color_lookup_type = std::vector<std::pair<double, agg::rgba8> >;
|
||||||
using pairs_type = std::vector<std::pair<std::string, std::string> >;
|
using pairs_type = std::vector<std::pair<std::string, std::string> >;
|
||||||
|
|
||||||
x3::rule<class key_value_sequence_ordered, pairs_type> const key_value_sequence_ordered("key_value_sequence_ordered");
|
x3::rule<class key_value_sequence_ordered_tag, pairs_type> const key_value_sequence_ordered("key_value_sequence_ordered");
|
||||||
x3::rule<class key_value, std::pair<std::string, std::string> > key_value("key_value");
|
x3::rule<class key_value_tag, std::pair<std::string, std::string> > key_value("key_value");
|
||||||
x3::rule<class key, std::string> key("key");
|
x3::rule<class key_tag, std::string> key("key");
|
||||||
x3::rule<class value_, std::string> value("value");
|
x3::rule<class value_tag, std::string> value("value");
|
||||||
|
|
||||||
auto const key_def = x3::char_("a-zA-Z_") > *x3::char_("a-zA-Z_0-9-");
|
auto const key_def = x3::char_("a-zA-Z_") > *x3::char_("a-zA-Z_0-9-");
|
||||||
auto const value_def = +(x3::char_ - ';');
|
auto const value_def = +(x3::char_ - ';');
|
||||||
auto const key_value_def = key > -(':' > value);
|
auto const key_value_def = key > -(':' > value);
|
||||||
auto const key_value_sequence_ordered_def = key_value % ';';
|
auto const key_value_sequence_ordered_def = key_value % ';';
|
||||||
|
|
||||||
BOOST_SPIRIT_DEFINE(key);
|
BOOST_SPIRIT_DEFINE(key, value, key_value, key_value_sequence_ordered);
|
||||||
BOOST_SPIRIT_DEFINE(value);
|
|
||||||
BOOST_SPIRIT_DEFINE(key_value);
|
|
||||||
BOOST_SPIRIT_DEFINE(key_value_sequence_ordered);
|
|
||||||
|
|
||||||
}
|
}}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
mapnik::color parse_color(T & error_messages, const char* str)
|
mapnik::color parse_color(T & error_messages, const char* str)
|
||||||
|
|
Loading…
Reference in a new issue