CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
TrackerDetIdSelectorGrammar< ITERATOR > Struct Template Reference
Inheritance diagram for TrackerDetIdSelectorGrammar< ITERATOR >:

Public Member Functions

 TrackerDetIdSelectorGrammar ()
 

Public Attributes

boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type, boost::spirit::qi::locals< ExpressionAST > > comboRule
 
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > expressionRule
 
boost::spirit::qi::rule< ITERATOR, std::string(), boost::spirit::ascii::space_type > identifierFctRule
 
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > identifierRule
 

Detailed Description

template<typename ITERATOR>
struct TrackerDetIdSelectorGrammar< ITERATOR >

Definition at line 123 of file TrackerDetIdSelector.cc.

Constructor & Destructor Documentation

◆ TrackerDetIdSelectorGrammar()

template<typename ITERATOR>
TrackerDetIdSelectorGrammar< ITERATOR >::TrackerDetIdSelectorGrammar ( )
inline

Definition at line 135 of file TrackerDetIdSelector.cc.

References simBeamSpotPI::alpha, TrackerDetIdSelectorGrammar< ITERATOR >::comboRule, TrackerDetIdSelectorGrammar< ITERATOR >::expressionRule, TrackerDetIdSelectorGrammar< ITERATOR >::identifierFctRule, and TrackerDetIdSelectorGrammar< ITERATOR >::identifierRule.

135  : TrackerDetIdSelectorGrammar::base_type(comboRule) {
136  namespace qi = boost::spirit::qi;
137  namespace ascii = boost::spirit::ascii;
138  namespace phoenix = boost::phoenix;
139 
140  identifierFctRule = qi::lexeme[+qi::alpha[qi::_val += qi::_1]];
141 
142  identifierRule = (qi::true_[qi::_val = 1] | qi::false_[qi::_val = 0]) | (qi::int_[qi::_val = qi::_1]) |
143  identifierFctRule[qi::_val = qi::_1];
144 
145  comboRule = (expressionRule[qi::_a = qi::_1] >>
146  *((qi::lit("&&") >> expressionRule[qi::_a = qi::_a && qi::_1]) |
147  (qi::lit("||") >> expressionRule[qi::_a = qi::_a || qi::_1])))[qi::_val = qi::_a];
148 
149  expressionRule = qi::lit("(") >> comboRule[qi::_val = qi::_1] >> qi::lit(")") |
150  (identifierRule >> qi::lit(">") >> identifierRule)[qi::_val = qi::_1 > qi::_2] |
151  (identifierRule >> qi::lit(">=") >> identifierRule)[qi::_val = qi::_1 >= qi::_2] |
152  (identifierRule >> qi::lit("<") >> identifierRule)[qi::_val = qi::_1 < qi::_2] |
153  (identifierRule >> qi::lit("<=") >> identifierRule)[qi::_val = qi::_1 <= qi::_2] |
154  (identifierRule >> qi::lit("==") >> identifierRule)[qi::_val = qi::_1 == qi::_2] |
155  (identifierRule >> qi::lit("!=") >> identifierRule)[qi::_val = qi::_1 != qi::_2] |
156  identifierRule[qi::_val = qi::_1];
157  }
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > expressionRule
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type, boost::spirit::qi::locals< ExpressionAST > > comboRule
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > identifierRule
boost::spirit::qi::rule< ITERATOR, std::string(), boost::spirit::ascii::space_type > identifierFctRule

Member Data Documentation

◆ comboRule

template<typename ITERATOR>
boost::spirit::qi:: rule<ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type, boost::spirit::qi::locals<ExpressionAST> > TrackerDetIdSelectorGrammar< ITERATOR >::comboRule

◆ expressionRule

template<typename ITERATOR>
boost::spirit::qi::rule<ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type> TrackerDetIdSelectorGrammar< ITERATOR >::expressionRule

◆ identifierFctRule

template<typename ITERATOR>
boost::spirit::qi::rule<ITERATOR, std::string(), boost::spirit::ascii::space_type> TrackerDetIdSelectorGrammar< ITERATOR >::identifierFctRule

◆ identifierRule

template<typename ITERATOR>
boost::spirit::qi::rule<ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type> TrackerDetIdSelectorGrammar< ITERATOR >::identifierRule