| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Public Member Functions | Public Attributes

# Gaudi::Parsers::ParserGrammar::definition< ScannerT > Struct Template Reference

`#include <ParserGrammar.h>`

Collaboration diagram for Gaudi::Parsers::ParserGrammar::definition< ScannerT >:
[legend]

List of all members.

## Public Member Functions
| definition (ParserGrammar const &self)
rule< ScannerT > const & | start () const
## Public Attributes
PropertyGrammar | property_grammar
IdentifierGrammar | identifier_grammar
StringGrammar | string_grammar
ValueGrammar | value_grammar
rule< ScannerT, ClosureGrammar < std::string >::context_t > | include_statement
rule< ScannerT, ClosureGrammar < std::string >::context_t > | units_statement
rule< ScannerT, ClosureGrammar < std::vector< std::string > >::context_t > | assign_statement
rule< ScannerT > | job_options_file
rule< ScannerT > | shell_statement
rule< ScannerT > | platform_statement
rule< ScannerT > | assertable_statement
rule< ScannerT > | assertion_statement
rule< ScannerT > | platform_dependency
rule< ScannerT > | pragma_statement
rule< ScannerT > | pragma
rule< ScannerT > | printopt_statement

## Detailed Description

### template<typename ScannerT>
struct Gaudi::Parsers::ParserGrammar::definition< ScannerT >

Definition at line 618 of file ParserGrammar.h.

## Constructor & Destructor Documentation

template<typename ScannerT >

Gaudi::Parsers::ParserGrammar::definition< ScannerT >::definition | ( | ParserGrammar const & | self ) | `[inline]`

Definition at line 620 of file ParserGrammar.h.

                                                  {
              value_grammar.setParser(self.parser());
              boost::tuples::get<0>(self.attrs()) = true;
              // ------------------------------------------------------------------
              // OPERATORS
              // ------------------------------------------------------------------
              chlit<>     O_SEMI(';');
              chlit<>     O_DOT('.');

              strlit<>    O_ASSIGN("=");
              strlit<>    O_PLUSASSIGN("+=");
              strlit<>    O_MINUSASSIGN("-=");

              // ------------------------------------------------------------------
              // TOKENS
              // ------------------------------------------------------------------
                                            strlit<> T_SHELL("#!");
              strlit<> T_IFDEF("#ifdef");
              strlit<> T_IFNDEF("#ifndef");
              strlit<> T_ELSE("#else");
              strlit<> T_ENDIF("#endif");
              strlit<> T_WIN32("WIN32");
              strlit<> T_INCLUDE("#include");
              strlit<> T_UNITS("#units");
              strlit<> T_PRAGMA("#pragma");
              strlit<> T_PRINTOPTIONS("#printOptions");
              // ------------------------------------------------------------------
              job_options_file =
                !shell_statement >> *(platform_statement | platform_dependency);
              // ------------------------------------------------------------------
                                            shell_statement = comment_p(T_SHELL);
              // ------------------------------------------------------------------
                                platform_statement = assertable_statement | pragma_statement;
              // ------------------------------------------------------------------
              assertable_statement =
                include_statement
                [boost::bind(&ParserGrammar::matchInclude,&self,_1)]
                | units_statement
                [boost::bind(&ParserGrammar::matchUnits,&self,_1)]
                | assign_statement
                [boost::bind(&ParserGrammar::matchAssign,&self,_1)];
              // ------------------------------------------------------------------
              assertion_statement =
                T_IFDEF
                [boost::bind(&ParserGrammar::matchPlatform,&self,"ifdef")]
                |
                T_IFNDEF
                [boost::bind(&ParserGrammar::matchPlatform,&self,"ifndef")];
              // ------------------------------------------------------------------
              platform_dependency =
                assertion_statement
                  >> T_WIN32
                  >> *platform_statement
                  >> !(
                       T_ELSE[boost::bind(&ParserGrammar::matchPlatform,&self,"else")]
                       >> *platform_statement
                       )
                  >> T_ENDIF
                [boost::bind(&ParserGrammar::matchPlatform,&self,"endif")];
              // ------------------------------------------------------------------
              include_statement =
                T_INCLUDE
                  >> (string_grammar[include_statement.val=arg1]>>eps_p)
                [self.val=arg1];
              // ------------------------------------------------------------------
              units_statement =
                T_UNITS
                  >> (string_grammar[units_statement.val=arg1]>>eps_p)
                [self.val=arg1];;
              // ------------------------------------------------------------------
              pragma_statement = pragma | printopt_statement;
              // ------------------------------------------------------------------
              pragma = (T_PRAGMA>>eps_p)[self.val=arg1] >> str_p("print")
                                >> ((str_p("on") | str_p("ON"))
                                    [boost::bind(&ParserGrammar::matchPrint,&self,true)]
                                    | (str_p("off") | str_p("OFF"))
                                    [boost::bind(&ParserGrammar::matchPrint,&self,false)]) ;
              // ------------------------------------------------------------------
              printopt_statement = ((T_PRINTOPTIONS>>eps_p)[self.val = arg1] >>
                !as_lower_d["full"])
                [boost::bind(&ParserGrammar::matchPrintOptions,&self,true)];
              // ------------------------------------------------------------------
              assign_statement =
                      property_grammar[assign_statement.val=arg1]
                  >> eps_p[PushBack(assign_statement.val,"#")]
                  >> (
                      O_ASSIGN[PushBack(assign_statement.val,"=")]
                      |O_PLUSASSIGN[PushBack(assign_statement.val,"+=")]
                      |O_MINUSASSIGN[PushBack(assign_statement.val,"-=")]
                      )
                  >>  value_grammar[boost::bind(&ParserGrammar::matchValue,&self,_1)]
                  >> O_SEMI;
              // ------------------------------------------------------------------
            }

## Member Function Documentation

template<typename ScannerT >

rule<ScannerT> const& Gaudi::Parsers::ParserGrammar::definition< ScannerT >::start | ( | ) | const`[inline]`

Definition at line 736 of file ParserGrammar.h.

                                                {
              return job_options_file;
            }

## Member Data Documentation

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::assertable_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::assertion_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT,ClosureGrammar<std::vector<std::string> >::context_t> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::assign_statement

Definition at line 723 of file ParserGrammar.h.

template<typename ScannerT >

IdentifierGrammar Gaudi::Parsers::ParserGrammar::definition< ScannerT >::identifier_grammar

Definition at line 716 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT,ClosureGrammar<std::string>::context_t> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::include_statement

Definition at line 720 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::job_options_file

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::platform_dependency

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::platform_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::pragma

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::pragma_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::printopt_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

PropertyGrammar Gaudi::Parsers::ParserGrammar::definition< ScannerT >::property_grammar

Definition at line 715 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::shell_statement

Definition at line 726 of file ParserGrammar.h.

template<typename ScannerT >

StringGrammar Gaudi::Parsers::ParserGrammar::definition< ScannerT >::string_grammar

Definition at line 717 of file ParserGrammar.h.

template<typename ScannerT >

rule<ScannerT,ClosureGrammar<std::string>::context_t> Gaudi::Parsers::ParserGrammar::definition< ScannerT >::units_statement

Definition at line 720 of file ParserGrammar.h.

template<typename ScannerT >

ValueGrammar Gaudi::Parsers::ParserGrammar::definition< ScannerT >::value_grammar

Definition at line 718 of file ParserGrammar.h.

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

- /afs/.cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r2/GaudiSvc/src/JobOptionsSvc/ParserGrammar.h

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines