The valid represenation of string values are:
More...
#include <src/JobOptionsSvc/Grammar.h>
template<typename Iterator, typename Skipper>
class Gaudi::Parsers::StringGrammar< Iterator, Skipper >
The valid represenation of string values are:
- "abc" , "\"abc""
- 'abs' , '\'abc\''
- Todo:
- implement not ASCII chars in strings
- Author
- Alexander MAZUROV Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
-
Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u
- Date
- 2006-05-14
Definition at line 55 of file Grammar.h.
template<typename Iterator, typename Skipper>
template<typename Iterator, typename Skipper>
template<typename Iterator, typename Skipper>
template<typename Iterator, typename Skipper>
Definition at line 60 of file Grammar.h.
60 : StringGrammar::base_type(
str) {
62 quote = enc::char_(qi::_r1);
64 str = qi::lexeme[
begin_quote[qi::_a = qi::_1] >> *((enc::char_(
'\\')
65 >>
quote(qi::_a))[qi::_val += qi::_a]
66 | (enc::char_[qi::_val += qi::_1] -
quote(qi::_a)))
qi::rule< Iterator, void(char)> quote
qi::rule< Iterator, std::string(), qi::locals< char >, Skipper > str
qi::rule< Iterator, char()> begin_quote
template<typename Iterator, typename Skipper>
Definition at line 93 of file GrammarsV2.h.
93 : StringGrammar::base_type(
str ) {
95 quote = enc::char_(qi::_r1);
98 > *( (enc::char_(
'\\') >>
quote(qi::_a))[qi::_val += qi::_a]
99 | (enc::char_[qi::_val += qi::_1] -
quote(qi::_a))) >
qi::rule< Iterator, void(char)> quote
qi::rule< Iterator, std::string(), qi::locals< char >, Skipper > str
qi::rule< Iterator, char()> begin_quote
template<typename Iterator, typename Skipper>
remove CR/LF symbols form the parsed strings
- Attention
- it is a bit dangerous operation The operation allows to write "very long" input strings for opts-files (it is actual e.g. for DataOnDemandSvc configuration) by splitting the strings into few lines All new-line symbols (as well as '
', '', CR/LF etc are substituted by ordinary blanks.
Definition at line 261 of file Grammars.h.
263 for ( std::string::iterator cur=this->val().begin();
264 cur!=this->val().end();cur++)
265 {
if(std::isspace(*cur) ) { *cur =
' '; } }
template<typename Iterator, typename Skipper>
template<typename Iterator, typename Skipper>
template<typename Iterator, typename Skipper>
The documentation for this class was generated from the following files: