expression grammar : allow '-' in @attribute

e.g ```@water-fill```
note: this might clash with subtraction ops (fixme)
This commit is contained in:
artemp 2013-12-04 11:44:18 +00:00
parent 1c490f5312
commit 442ffbe911

View file

@ -185,13 +185,13 @@ expression_grammar<Iterator>::expression_grammar(mapnik::transcoder const& tr)
>> *(unesc_char | "\\x" >> hex | (char_ - lit(_a)))
>> lit(_a);
attr %= '[' >> no_skip[+~char_(']')] >> ']';
global_attr %= '@' >> no_skip[alpha >> *alnum];
global_attr %= '@' >> no_skip[alpha >> * (alnum | char_('-'))];
#else
quoted_ustring %= lit('\'')
>> *(unesc_char | "\\x" >> hex | (char_ - lit('\'')))
>> lit('\'');
attr %= '[' >> lexeme[+(char_ - ']')] >> ']';
global_attr %= '@' >> no_skip[alpha >> *alnum];
global_attr %= '@' >> no_skip[alpha >> * (alnum | char_('-'))];
#endif
}