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 129 of file TrackerDetIdSelector.cc.

Constructor & Destructor Documentation

◆ TrackerDetIdSelectorGrammar()

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

Definition at line 141 of file TrackerDetIdSelector.cc.

141  : TrackerDetIdSelectorGrammar::base_type(comboRule) {
142  namespace qi = boost::spirit::qi;
143  namespace ascii = boost::spirit::ascii;
144  namespace phoenix = boost::phoenix;
145 
146  identifierFctRule = qi::lexeme[+qi::alpha[qi::_val += qi::_1]];
147 
148  identifierRule = (qi::true_[qi::_val = 1] | qi::false_[qi::_val = 0]) | (qi::int_[qi::_val = qi::_1]) |
149  identifierFctRule[qi::_val = qi::_1];
150 
151  comboRule = (expressionRule[qi::_a = qi::_1] >>
152  *((qi::lit("&&") >> expressionRule[qi::_a = qi::_a && qi::_1]) |
153  (qi::lit("||") >> expressionRule[qi::_a = qi::_a || qi::_1])))[qi::_val = qi::_a];
154 
155  expressionRule = qi::lit("(") >> comboRule[qi::_val = qi::_1] >> qi::lit(")") |
156  (identifierRule >> qi::lit(">") >> identifierRule)[qi::_val = qi::_1 > qi::_2] |
157  (identifierRule >> qi::lit(">=") >> identifierRule)[qi::_val = qi::_1 >= qi::_2] |
158  (identifierRule >> qi::lit("<") >> identifierRule)[qi::_val = qi::_1 < qi::_2] |
159  (identifierRule >> qi::lit("<=") >> identifierRule)[qi::_val = qi::_1 <= qi::_2] |
160  (identifierRule >> qi::lit("==") >> identifierRule)[qi::_val = qi::_1 == qi::_2] |
161  (identifierRule >> qi::lit("!=") >> identifierRule)[qi::_val = qi::_1 != qi::_2] |
162  identifierRule[qi::_val = qi::_1];
163  }

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

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
TrackerDetIdSelectorGrammar::identifierRule
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > identifierRule
Definition: TrackerDetIdSelector.cc:135
alpha
float alpha
Definition: AMPTWrapper.h:105
TrackerDetIdSelectorGrammar::identifierFctRule
boost::spirit::qi::rule< ITERATOR, std::string(), boost::spirit::ascii::space_type > identifierFctRule
Definition: TrackerDetIdSelector.cc:133
TrackerDetIdSelectorGrammar::expressionRule
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type > expressionRule
Definition: TrackerDetIdSelector.cc:135
TrackerDetIdSelectorGrammar::comboRule
boost::spirit::qi::rule< ITERATOR, ExpressionAST(), boost::spirit::ascii::space_type, boost::spirit::qi::locals< ExpressionAST > > comboRule
Definition: TrackerDetIdSelector.cc:139