Commit 122e50cb authored by Alexander Mazurov's avatar Alexander Mazurov Committed by Marco Clemencic
Browse files

Patch #5166: Allow "::" in property and component names.

https://savannah.cern.ch/patch/?5166

From: Alexander Mazurov <alexander.mazurov@cern.ch>


git-svn-id: svn+ssh://svn.cern.ch/reps/gaudi/Gaudi/trunk@6752 53ecefc3-a64d-0410-9bdf-b8581fa3287e
parent 7273003d
......@@ -4,6 +4,9 @@
# Description: basic and mandatory components for a Gaudi application
################################################################################
! 2011-12-13 - Sasha Mazurov
- Patch #5166: Allow "::" in property and component names.
! 2011-11-01 - Marco Clemencic
- Moved core services out of GaudiSvc and into the new packages GaudiCoreSvc
and GaudiCommonSvc. (patch #1816)
......@@ -80,11 +80,14 @@ struct IdentifierGrammar: qi::grammar<Iterator, Node(), Skipper> {
//-----------------------------------------------------------------------------
IdentifierGrammar() : IdentifierGrammar::base_type(ident) {
ident = rep::qi::iter_pos[op(qi::_val, qi::_1)] >> str[op(qi::_val, qi::_1)][op(qi::_val, Node::kIdentifier)];
str = qi::lexeme[qi::alpha >> *(qi::alnum | '_')];
str = -qi::lit("::")[qi::_val += "::"] >> inner[qi::_val += qi::_1]
>> *(qi::lit("::") >> inner[qi::_val += ("::"+qi::_1)]);
inner = qi::alpha >> *(qi::alnum | '_');
}
// ----------------------------------------------------------------------------
qi::rule<Iterator, Node(), Skipper> ident;
qi::rule<Iterator, std::string(), Skipper> str;
qi::rule<Iterator, std::string()> inner;
ph::function<NodeOperations> op;
};
// ============================================================================
......@@ -185,9 +188,8 @@ struct FileGrammar: qi::grammar<Iterator, Node(), Skipper> {
>> value[op(qi::_val, qi::_1)]
>> ';';
property = rep::qi::iter_pos[op(qi::_val, qi::_1)]
>> (gidentifier[op(qi::_val, qi::_1)]
>> -(gidentifier[op(qi::_val, qi::_1)]) % '.')
[op(qi::_val, Node::kProperty)];
>> (gidentifier[op(qi::_val, qi::_1)] % '.')
[op(qi::_val, Node::kProperty)];
property_ref %= -qi::lit('@') >>
property[op(qi::_val, Node::kPropertyRef)];
oper = rep::qi::iter_pos[op(qi::_val, qi::_1)]
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment