[Rock-dev] [rock] #408: orogen: guard against reserved keywords in "someprojectTypes.hpp"
rock
noreply at opendfki.de
Tue Jan 14 14:10:14 CET 2014
#408: orogen: guard against reserved keywords in "someprojectTypes.hpp"
-------------------------+------------------------------------
Reporter: mzenzes | Owner: rock-dev-mailing-list
Type: enhancement | Status: new
Priority: major | Milestone:
Component: base | Keywords: orogen,omniidl,keyword
-------------------------+------------------------------------
Hi,
the use of special words in orogen Type-Headers is not prohibited (this
ticket was created after stumbling over the "interface"). So a type-header
like the following for example:
{{{
#ifndef SOMEPROJECT_ROCK_TYPES_H
#define SOMEPROJECT_ROCK_TYPES_H
#include <string>
namespace someproject {
struct Config
{
struct thing {
// name of the interface to use
std::string interface; /// <-- using the word "interface" will
break
};
};
}
#endif
}}}
Will break with a complex error message: (at least for the novice)
{{{
$ROCK_ROOT/ndlcom_rock/.orogen/typekit/transports/corba/someprojectTypes.idl:22:
Syntax error in member declaration
}}}
where the criticized part of the generated idl-file looks like this:
{{{
module someproject {
module Config {
module Corba {
struct thing {
string interface;
};
};
};
};
}}}
There are probably more names prohibited for messages ("module"?). Since
these keywords should be defined somewhere for idl-files, catching these
previously at some ruby-layer and printing a more informative message
might be possible.
A similar ticket is #402.
Greetings
--
Ticket URL: <http://rock.opendfki.de/ticket/408>
rock <http://rock.opendfki.de>
rock: the robot construction kit
More information about the Rock-dev
mailing list