CMS 3D CMS Logo

expressionParser.cc
Go to the documentation of this file.
4 
5 using namespace reco::parser;
6 
8  const std::string& value,
10  bool lazy) {
11  using namespace boost::spirit::classic;
12  Grammar grammar(expr, t, lazy);
13  bool returnValue = false;
14  const char* startingFrom = value.c_str();
15  try {
16  returnValue = parse(startingFrom, grammar.use_parser<1>() >> end_p, space_p).full;
17  } catch (BaseException& e) {
19  << "Expression parser error:" << baseExceptionWhat(e) << " (char " << e.where - startingFrom << ")\n";
20  }
21  return returnValue;
22 }
reco::parser::baseExceptionWhat
const char * baseExceptionWhat(const BaseException &e)
returns the appropriate 'what' message for the exception
Definition: Exception.h:36
boost::spirit::classic
Definition: DDPartSelection.cc:10
EDMException.h
dumpparser.parse
def parse(path, config)
Definition: dumpparser.py:13
edm::TypeWithDict
Definition: TypeWithDict.h:38
reco::parser::BaseException
boost::spirit::classic::parser_error< reco::parser::SyntaxErrors > BaseException
Definition: Exception.h:33
value
Definition: value.py:1
reco::parser::ExpressionPtr
std::shared_ptr< ExpressionBase > ExpressionPtr
Definition: ExpressionBase.h:25
reco::parser::Grammar
Definition: Grammar.h:45
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
reco::parser
Definition: cutParser.h:9
jets_cff.expr
expr
Definition: jets_cff.py:497
Exception
Definition: hltDiff.cc:245
reco::parser::expressionParser
bool expressionParser(const edm::TypeWithDict &t, const std::string &value, ExpressionPtr &expr, bool lazy)
Definition: expressionParser.cc:7
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
edm::errors::Configuration
Definition: EDMException.h:36
expressionParser.h
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37
Grammar.h