Main Page
Namespaces
Classes
Package Documentation
CommonTools
Utils
src
expressionParser.cc
Go to the documentation of this file.
1
#include "
CommonTools/Utils/src/Grammar.h
"
2
#include "
FWCore/Utilities/interface/EDMException.h
"
3
#include "
CommonTools/Utils/interface/expressionParser.h
"
4
5
using namespace
reco::parser
;
6
7
bool
reco::parser::expressionParser
(
const
edm::TypeWithDict
&
t
,
const
std::string
&
value
,
ExpressionPtr
&
expr
,
bool
lazy) {
8
using namespace
boost::spirit::classic
;
9
Grammar
grammar(expr, t, lazy);
10
bool
returnValue =
false
;
11
const
char
* startingFrom = value.c_str();
12
try
{
13
returnValue=
parse
(startingFrom, grammar.use_parser<1>() >> end_p, space_p).full;
14
}
catch
(
BaseException
&
e
){
15
throw
edm::Exception
(
edm::errors::Configuration
)<<
"Expression parser error:"
<<
baseExceptionWhat
(e)<<
" (char "
<<e.where-startingFrom<<
")\n"
;
16
}
17
return
returnValue;
18
}
Exception
Definition:
hltDiff.cc:292
reco::parser::expressionParser
bool expressionParser(const edm::TypeWithDict &t, const std::string &value, ExpressionPtr &expr, bool lazy)
Definition:
expressionParser.cc:7
reco::parser::BaseException
boost::spirit::classic::parser_error< reco::parser::SyntaxErrors > BaseException
Definition:
Exception.h:37
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
MillePedeFileConverter_cfg.e
e
Definition:
MillePedeFileConverter_cfg.py:37
reco::parser::ExpressionPtr
boost::shared_ptr< ExpressionBase > ExpressionPtr
Definition:
ExpressionBase.h:22
jets_cff.expr
expr
Definition:
jets_cff.py:216
edm::errors::Configuration
Definition:
EDMException.h:37
expressionParser.h
EDMException.h
value
Definition:
value.py:1
reco::parser::baseExceptionWhat
const char * baseExceptionWhat(const BaseException &e)
returns the appropriate 'what' message for the exception
Definition:
Exception.h:40
boost::spirit::classic
Definition:
DDPartSelection.cc:8
dumpparser.parse
def parse(path, config)
Definition:
dumpparser.py:13
Grammar.h
reco::parser::Grammar
Definition:
Grammar.h:45
edm::TypeWithDict
Definition:
TypeWithDict.h:38
lumiQTWidget.t
t
Definition:
lumiQTWidget.py:50
reco::parser
Definition:
cutParser.h:9
Generated for CMSSW Reference Manual by
1.8.11