[omniORB] omniORB for Python and new IDL compiler pre-release
Duncan Grisby
dgrisby@uk.research.att.com
Wed, 03 Nov 1999 17:28:53 +0000
On Wednesday 3 November, Rick Ethington wrote:
[... IDL compiler...]
> looks interesting, and yes i have entertained an idea (showing ideas a
> good time is what i like to do best) that this might support.
> Do comments in the idl get passed to the python back-end? i had been
> looking for an up to date version of idldoc and it had been suggested
> that a new back-end for this idl compiler might be the answer. what do
> you think?
At the moment, comments do not get past the C preprocessor. Most
preprocessors have a switch which tells them not to strip comments,
but I'm not sure that all do. However, what do get through to the
back-end are any #pragmas which are not recognised by the front-end.
This could be used both for annotating IDL to generate extra code, and
for embedding documentation.
One thing which we have considered is writing a simple
pre-preprocessor which converts specially formatted comments into
suitable #pragmas before the C preprocessor is run.
Something which I need to document is how the front-end chooses which
node in the syntax tree it should attach the #pragmas to. Basically,
they are attached to the most recently created node. This means that
to document an operation, you could to do something like:
interface I {
void op(
#pragma doc op() is an operation
in string arg);
};
Which is ugly, but could easily be generated from something nicer.
Cheers,
Duncan.
--
-- Duncan Grisby \ Research Engineer --
-- AT&T Laboratories Cambridge --
-- http://www.uk.research.att.com/~dpg1 --