CMS 3D CMS Logo

List of all members | Public Member Functions | Private Types | Private Attributes
triggerExpression::Parser< Iterator > Class Template Reference

#include <TriggerExpressionParser.h>

Inheritance diagram for triggerExpression::Parser< Iterator >:

Public Member Functions

 Parser ()
 

Private Types

typedef qi::rule< Iterator, std::string(), ascii::space_type > name_rule
 
typedef qi::rule< Iterator, Evaluator *(), ascii::space_type > rule
 

Private Attributes

rule element
 
rule expression
 
rule operand
 
rule parenthesis
 
rule prescale
 
rule token
 
name_rule token_l1algo
 
name_rule token_path
 
rule unary
 

Detailed Description

template<typename Iterator>
class triggerExpression::Parser< Iterator >

Definition at line 23 of file TriggerExpressionParser.h.

Member Typedef Documentation

◆ name_rule

template<typename Iterator>
typedef qi::rule<Iterator, std::string(), ascii::space_type> triggerExpression::Parser< Iterator >::name_rule
private

Definition at line 48 of file TriggerExpressionParser.h.

◆ rule

template<typename Iterator>
typedef qi::rule<Iterator, Evaluator *(), ascii::space_type> triggerExpression::Parser< Iterator >::rule
private

Definition at line 49 of file TriggerExpressionParser.h.

Constructor & Destructor Documentation

◆ Parser()

template<typename Iterator>
triggerExpression::Parser< Iterator >::Parser ( )
inline

Definition at line 25 of file TriggerExpressionParser.h.

References triggerExpression::Parser< Iterator >::element, triggerExpression::Parser< Iterator >::expression, triggerExpression::Parser< Iterator >::operand, triggerExpression::Parser< Iterator >::parenthesis, triggerExpression::Parser< Iterator >::token, triggerExpression::Parser< Iterator >::token_l1algo, triggerExpression::Parser< Iterator >::token_path, and triggerExpression::Parser< Iterator >::unary.

25  : Parser::base_type(expression) {
26  token_l1algo %= qi::raw[qi::lexeme["L1_" >> +(qi::char_("a-zA-Z0-9_*?"))]];
27  token_path %= qi::raw[qi::lexeme[+(qi::char_("a-zA-Z0-9_*?"))]];
28 
29  token = (qi::lit("TRUE")[qi::_val = new_<Constant>(true)] | qi::lit("FALSE")[qi::_val = new_<Constant>(false)] |
30  token_l1algo[qi::_val = new_<L1uGTReader>(qi::_1)] | token_path[qi::_val = new_<PathReader>(qi::_1)]);
31 
32  parenthesis %= ('(' >> expression >> ')');
33 
34  element %= (token | parenthesis);
35 
36  prescale = (element >> '/' >> qi::uint_)[qi::_val = new_<Prescaler>(qi::_1, qi::_2)];
37 
38  operand %= (prescale | element);
39 
40  unary = (operand[qi::_val = qi::_1] | (qi::lit("NOT") >> operand)[qi::_val = new_<OperatorNot>(qi::_1)]);
41 
42  expression =
43  unary[qi::_val = qi::_1] >> *((qi::lit("AND") >> unary)[qi::_val = new_<OperatorAnd>(qi::_val, qi::_1)] |
44  (qi::lit("OR") >> unary)[qi::_val = new_<OperatorOr>(qi::_val, qi::_1)]);
45  }

Member Data Documentation

◆ element

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::element
private

◆ expression

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::expression
private

◆ operand

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::operand
private

◆ parenthesis

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::parenthesis
private

◆ prescale

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::prescale
private

Definition at line 57 of file TriggerExpressionParser.h.

◆ token

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::token
private

◆ token_l1algo

template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_l1algo
private

◆ token_path

template<typename Iterator>
name_rule triggerExpression::Parser< Iterator >::token_path
private

◆ unary

template<typename Iterator>
rule triggerExpression::Parser< Iterator >::unary
private