| The Gaudi Framework v27r1

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

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

Public Member Functions | Public Attributes | List of all members
Gaudi::Parsers::FileGrammar< Iterator, Skipper > Struct Template Reference

`#include <src/JobOptionsSvc/Grammar.h>`

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

## Public Member Functions
| FileGrammar ()

## Public Attributes
qi::rule< Iterator, Node(), Skipper > | file
qi::rule< Iterator, Node(), Skipper > | include
qi::rule< Iterator, Node(), Skipper > | assign
qi::rule< Iterator, Node(), Skipper > | property
qi::rule< Iterator, Node(), Skipper > | property_ref
qi::rule< Iterator, Node(), Skipper > | oper
qi::rule< Iterator, Node(), Skipper > | map_value
qi::rule< Iterator, Node(), Skipper > | pair_value
qi::rule< Iterator, Node(), Skipper > | simple_value
qi::rule< Iterator, Node(), Skipper > | pair
qi::rule< Iterator, Node(), Skipper > | units
qi::rule< Iterator, Node(), Skipper > | print_options
qi::rule< Iterator, Node(), Skipper > | pragma
qi::rule< Iterator, Node(), Skipper > | pragma_print
qi::rule< Iterator, Node(), Skipper > | pragma_tree
qi::rule< Iterator, Node(), Skipper > | pragma_dump_file
qi::rule< Iterator, Node(), qi::locals< std::string > > | shell
qi::rule< Iterator, Node(), qi::locals< Iterator >, Skipper > | statement
qi::rule< Iterator, Node(), qi::locals< Iterator >, Skipper > | value
qi::rule< Iterator, Node(), qi::locals< char >, Skipper > | vector_value
qi::rule< Iterator, Node(), qi::locals< Node, Node >, Skipper > | condition
qi::rule< Iterator, char()> | begin_vector
qi::rule< Iterator, void(char)> | end_vector
StringGrammar< Iterator, Skipper > | gstring
BoolGrammar< Iterator, Skipper > | gbool
RealGrammar< Iterator, Skipper > | greal
IdentifierGrammar< Iterator, Skipper > | gidentifier
ph::function< NodeOperations > | op

## Detailed Description

### template<typename Iterator, typename Skipper>
struct Gaudi::Parsers::FileGrammar< Iterator, Skipper >

Definition at line 148 of file Grammar.h.

## Constructor & Destructor Documentation

template<typename Iterator , typename Skipper >

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

Definition at line 149 of file Grammar.h.

149 : FileGrammar::base_type(file) {
150 file = -shell[op(qi::_val,qi::_1)] >>
151 *(statement[op(qi::_val, qi::_1)])
152 [op(qi::_val, Node::kRoot)];
153 shell = rep::confix("#!", qi::eol)[*(qi::char_[qi::_a += qi::_1]
154 - qi::eol)][op(qi::_val,Node::kShell)]
155 [op(qi::_val,qi::_a)];
156 statement = rep::qi::iter_pos[qi::_a = qi::_1]
157 >> (include | assign | units | print_options | pragma
158 | condition)[qi::_val = qi::_1][op(qi::_val,qi::_a)];
159 condition = (qi::lit("#ifdef")[op(qi::_a,Node::kIfdef)]
160 | qi::lit("#ifndef")[op(qi::_a,Node::kIfndef)])
161 >> property[op(qi::_val,qi::_1)]
162 >> (*statement[op(qi::_a,qi::_1)])[op(qi::_val, qi::_a)]
163 >> -(qi::lit("#else")[op(qi::_b,Node::kElse)]
164 >> *statement[op(qi::_b,qi::_1)])[op(qi::_val,qi::_b)]
165 >> qi::lit("#endif")[op(qi::_val, Node::kCondition)];
166 include = qi::lit("#include")
167 >> gstring[op(qi::_val, qi::_1)]
168 [op(qi::_val, Node::kInclude)];
169 units = qi::lit("#units")
170 >> gstring[op(qi::_val, qi::_1)]
171 [op(qi::_val, Node::kUnits)];
172 print_options = qi::lit("#printOptions") >> qi::lit("full")
173 [op(qi::_val, Node::kPrintOptions)];
174 pragma = qi::lit("#pragma") >> (pragma_print | pragma_tree |
175 pragma_dump_file);
176 pragma_print = qi::lit("print") >> enc::no_case[
177 qi::lit("on")[op(qi::_val, Node::kPrintOn)]
178 | qi::lit("off")[op(qi::_val, Node::kPrintOff)]
179 ];
180 pragma_tree = enc::no_case[
181 qi::lit("printtree")[op(qi::_val, Node::kPrintTree)]
182 ];
183 pragma_dump_file = qi::lit("dumpfile") >> gstring[op(qi::_val, qi::_1)]
184 [op(qi::_val, Node::kDumpFile)];
185 assign = property[op(qi::_val, qi::_1)]
186 [op(qi::_val, Node::kAssign)]
187 >> oper[op(qi::_val, qi::_1)]
188 >> value[op(qi::_val, qi::_1)]
189 >> ';';
190 property = rep::qi::iter_pos[op(qi::_val, qi::_1)]
191 >> (gidentifier[op(qi::_val, qi::_1)] % '.')
192 [op(qi::_val, Node::kProperty)];
193 property_ref %= -qi::lit('@') >>
194 property[op(qi::_val, Node::kPropertyRef)];
195 oper = rep::qi::iter_pos[op(qi::_val, qi::_1)]
196 >> (qi::lit("=")[op(qi::_val, Node::kEqual)]
197 |
198 qi::lit("+=")[op(qi::_val, Node::kPlusEqual)]
199 |
200 qi::lit("-=")[op(qi::_val, Node::kMinusEqual)]);
201 value = rep::qi::iter_pos[qi::_a = qi::_1]
202 >>
203 (map_value | vector_value | simple_value | property |
204 property_ref)
205 [qi::_val = qi::_1][op(qi::_val, qi::_a)]
206 ;
207 begin_vector = enc::char_('(')[qi::_val=')']
208 |
209 enc::char_('[')[qi::_val=']']
210 |
211 enc::char_('{')[qi::_val='}'];
212 end_vector = qi::char_(qi::_r1);
213 vector_value = (begin_vector[qi::_a = qi::_1]
214 >> -(value[op(qi::_val,qi::_1)] % ',')
215 >> end_vector(qi::_a)
216 )[op(qi::_val,Node::kVector)];
217 map_value = (enc::char_('{')
218 >> -(pair[op(qi::_val, qi::_1)] % ',')
219 >> enc::char_('}'))
220 [op(qi::_val, Node::kMap)];
221 pair = simple_value[op(qi::_val,qi::_1)] >> ':'
222 >> value[op(qi::_val,qi::_1)]
223 [op(qi::_val,Node::kPair)];
224 simple_value =
225 (gstring[op(qi::_val, qi::_1)][op(qi::_val, Node::kString)])
226 |
227 (gbool[op(qi::_val, qi::_1)][op(qi::_val, Node::kBool)])
228 |
229 (greal[qi::_val = qi::_1]);
230 }
Gaudi::Parsers::Node::kString
Definition: Node.h:28
Gaudi::Parsers::Node::kRoot
Definition: Node.h:26
Gaudi::Parsers::FileGrammar::file
qi::rule< Iterator, Node(), Skipper > file
Definition: Grammar.h:231
Gaudi::Parsers::Node::kMap
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::oper
qi::rule< Iterator, Node(), Skipper > oper
Definition: Grammar.h:231
Gaudi::Parsers::Node::kPlusEqual
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::simple_value
qi::rule< Iterator, Node(), Skipper > simple_value
Definition: Grammar.h:231
Gaudi::Parsers::Node::kShell
Definition: Node.h:29
Gaudi::Parsers::Node::kPair
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::condition
qi::rule< Iterator, Node(), qi::locals< Node, Node >, Skipper > condition
Definition: Grammar.h:237
Gaudi::Parsers::FileGrammar::shell
qi::rule< Iterator, Node(), qi::locals< std::string > > shell
Definition: Grammar.h:234
Gaudi::Parsers::FileGrammar::print_options
qi::rule< Iterator, Node(), Skipper > print_options
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::include
qi::rule< Iterator, Node(), Skipper > include
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::gidentifier
IdentifierGrammar< Iterator, Skipper > gidentifier
Definition: Grammar.h:243
Gaudi::Parsers::Node::kIfdef
Definition: Node.h:28
Gaudi::Parsers::Node::kMinusEqual
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::pair
qi::rule< Iterator, Node(), Skipper > pair
Definition: Grammar.h:231
Gaudi::Parsers::Node::kElse
Definition: Node.h:29
Gaudi::Parsers::FileGrammar::greal
RealGrammar< Iterator, Skipper > greal
Definition: Grammar.h:242
Gaudi::Parsers::Node::kVector
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::end_vector
qi::rule< Iterator, void(char)> end_vector
Definition: Grammar.h:239
Gaudi::Parsers::Node::kEqual
Definition: Node.h:27
Gaudi::Parsers::Node::kPrintOff
Definition: Node.h:29
Gaudi::Parsers::FileGrammar::assign
qi::rule< Iterator, Node(), Skipper > assign
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::statement
qi::rule< Iterator, Node(), qi::locals< Iterator >, Skipper > statement
Definition: Grammar.h:235
Gaudi::Parsers::FileGrammar::value
qi::rule< Iterator, Node(), qi::locals< Iterator >, Skipper > value
Definition: Grammar.h:235
Gaudi::Parsers::Node::kAssign
Definition: Node.h:27
Gaudi::Parsers::FileGrammar::pragma_tree
qi::rule< Iterator, Node(), Skipper > pragma_tree
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::gbool
BoolGrammar< Iterator, Skipper > gbool
Definition: Grammar.h:241
Gaudi::Parsers::FileGrammar::op
ph::function< NodeOperations > op
Definition: Grammar.h:244
Gaudi::Parsers::Node::kCondition
Definition: Node.h:28
Gaudi::Parsers::FileGrammar::begin_vector
qi::rule< Iterator, char()> begin_vector
Definition: Grammar.h:238
Gaudi::Parsers::FileGrammar::vector_value
qi::rule< Iterator, Node(), qi::locals< char >, Skipper > vector_value
Definition: Grammar.h:236
Gaudi::Parsers::FileGrammar::units
qi::rule< Iterator, Node(), Skipper > units
Definition: Grammar.h:231
Gaudi::Parsers::Node::kBool
Definition: Node.h:28
Gaudi::Parsers::FileGrammar::property
qi::rule< Iterator, Node(), Skipper > property
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::property_ref
qi::rule< Iterator, Node(), Skipper > property_ref
Definition: Grammar.h:231
Gaudi::Parsers::Node::kPrintOptions
Definition: Node.h:29
Gaudi::Parsers::Node::kPrintTree
Definition: Node.h:29
Gaudi::Parsers::Node::kInclude
Definition: Node.h:26
Gaudi::Parsers::FileGrammar::gstring
StringGrammar< Iterator, Skipper > gstring
Definition: Grammar.h:240
Gaudi::Parsers::Node::kPrintOn
Definition: Node.h:29
Gaudi::Parsers::FileGrammar::map_value
qi::rule< Iterator, Node(), Skipper > map_value
Definition: Grammar.h:231
Gaudi::Parsers::Node::kUnits
Definition: Node.h:28
Gaudi::Parsers::FileGrammar::pragma_print
qi::rule< Iterator, Node(), Skipper > pragma_print
Definition: Grammar.h:231
Gaudi::Parsers::Node::kIfndef
Definition: Node.h:28
Gaudi::Parsers::Node::kDumpFile
Definition: Node.h:29
Gaudi::Parsers::Node::kProperty
Definition: Node.h:26
Gaudi::Parsers::Node::kPropertyRef
Definition: Node.h:30
Gaudi::Parsers::FileGrammar::pragma
qi::rule< Iterator, Node(), Skipper > pragma
Definition: Grammar.h:231
Gaudi::Parsers::FileGrammar::pragma_dump_file
qi::rule< Iterator, Node(), Skipper > pragma_dump_file
Definition: Grammar.h:231

## Member Data Documentation

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::assign

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, char()> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::begin_vector

Definition at line 238 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), qi::locals<Node, Node>, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::condition

Definition at line 237 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, void(char)> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::end_vector

Definition at line 239 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::file

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

BoolGrammar<Iterator, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::gbool

Definition at line 241 of file Grammar.h.

template<typename Iterator , typename Skipper >

IdentifierGrammar<Iterator, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::gidentifier

Definition at line 243 of file Grammar.h.

template<typename Iterator , typename Skipper >

RealGrammar<Iterator, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::greal

Definition at line 242 of file Grammar.h.

template<typename Iterator , typename Skipper >

StringGrammar<Iterator, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::gstring

Definition at line 240 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::include

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::map_value

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

ph::function<NodeOperations> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::op

Definition at line 244 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::oper

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pair

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pair_value

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pragma

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pragma_dump_file

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pragma_print

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::pragma_tree

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::print_options

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::property

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::property_ref

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(),qi::locals<std::string> > Gaudi::Parsers::FileGrammar< Iterator, Skipper >::shell

Definition at line 234 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::simple_value

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), qi::locals<Iterator>, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::statement

Definition at line 235 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::units

Definition at line 231 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), qi::locals<Iterator>, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::value

Definition at line 235 of file Grammar.h.

template<typename Iterator , typename Skipper >

qi::rule<Iterator, Node(), qi::locals<char>, Skipper> Gaudi::Parsers::FileGrammar< Iterator, Skipper >::vector_value

Definition at line 236 of file Grammar.h.

The documentation for this struct was generated from the following file:

- GaudiCoreSvc/src/JobOptionsSvc/Grammar.h