| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Gaudi::Parsers::StringGrammar< Iterator, Skipper > Class Template Reference

The valid represenation of string values are: More...

`#include <Grammar.h>`

Inheritance diagram for Gaudi::Parsers::StringGrammar< Iterator, Skipper >:
[legend]
Collaboration diagram for Gaudi::Parsers::StringGrammar< Iterator, Skipper >:
[legend]

## Classes
struct | definition

## Public Types
typedef std::string | ResultT
typedef std::string | ResultT
typedef std::string | ResultT

## Public Member Functions
| StringGrammar ()
void | matchString () const
| remove CR/LF symbols form the parsed strings
| StringGrammar ()

## Public Attributes
qi::rule< Iterator, std::string(), qi::locals < char >, Skipper > | str
qi::rule< Iterator, char()> | begin_quote
qi::rule< Iterator, void(char)> | quote

## Detailed Description

### 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.

## Member Typedef Documentation

template<typename Iterator , typename Skipper >

typedef std::string Gaudi::Parsers::StringGrammar< Iterator, Skipper >::ResultT

Definition at line 58 of file Grammar.h.

template<typename Iterator , typename Skipper >

typedef std::string Gaudi::Parsers::StringGrammar< Iterator, Skipper >::ResultT

Definition at line 91 of file GrammarsV2.h.

template<typename Iterator , typename Skipper >

typedef std::string Gaudi::Parsers::StringGrammar< Iterator, Skipper >::ResultT

Definition at line 252 of file Grammars.h.

## Constructor & Destructor Documentation

template<typename Iterator , typename Skipper >

Gaudi::Parsers::StringGrammar< Iterator, Skipper >::StringGrammar | ( |  | ) |
| inline

Definition at line 60 of file Grammar.h.

: StringGrammar::base_type(str) {
begin_quote = enc::char_("\"'");
quote = enc::char_(qi::_r1);
str = qi::lexeme[begin_quote[qi::_a = qi::_1] >> *((enc::char_('\\')
>> quote(qi::_a))[qi::_val += qi::_a]
| (enc::char_[qi::_val += qi::_1] - quote(qi::_a)))
>> quote(qi::_a)];
}
template<typename Iterator , typename Skipper >

Gaudi::Parsers::StringGrammar< Iterator, Skipper >::StringGrammar | ( |  | ) |
| inline

Definition at line 93 of file GrammarsV2.h.

: StringGrammar::base_type( str ) {
begin_quote = enc::char_("\"'");
quote = enc::char_(qi::_r1);
str = qi::lexeme[begin_quote[qi::_a = qi::_1]
> *( (enc::char_('\\') >> quote(qi::_a))[qi::_val += qi::_a]
| (enc::char_[qi::_val += qi::_1] - quote(qi::_a))) >
quote(qi::_a)]
;
}

## Member Function Documentation

template<typename Iterator , typename Skipper >

void Gaudi::Parsers::StringGrammar< Iterator, Skipper >::matchString | ( |  | ) | const
| inline

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.

{
for ( std::string::iterator cur=this->val().begin();
cur!=this->val().end();cur++)
{ if(std::isspace(*cur) ) { *cur = ' '; } }
}

## Member Data Documentation

template<typename Iterator , typename Skipper >

qi::rule< Iterator, char()> Gaudi::Parsers::StringGrammar< Iterator, Skipper >::begin_quote

Definition at line 71 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule< Iterator, void(char)> Gaudi::Parsers::StringGrammar< Iterator, Skipper >::quote

Definition at line 72 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule< Iterator, std::string(), qi::locals< char >, Skipper > Gaudi::Parsers::StringGrammar< Iterator, Skipper >::str

Definition at line 70 of file Grammar.h.

The documentation for this class was generated from the following files:

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiCoreSvc/src/JobOptionsSvc/Grammar.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/Grammars.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiKernel/GaudiKernel/GrammarsV2.h