[omniORB] omniidl assert error about comments after upgrade from 2.8 to 3

Stefan Seefeld seefelds@MAGELLAN.UMontreal.CA
Fri, 17 Mar 2000 11:50:50 -0500


Duncan Grisby wrote:

> It won't be especially easy to support comments before a declaration.
> The way it currently works it to attach comments to the most recently
> encountered declaration. (There are currently a few surprises with
> this, due to the way the parser works, but I'll fix them some time
> soon.) To attach comments to declarations appearing after the comment,
> the comments would have to be stored somewhere, then grabbed as a new
> declaration was encountered. Not particularly hard, but code would
> have to be added to quite a lot of places. I might do it, but don't
> expect it any time soon.

One possibility to do this would be to make comments 'first class citizens'
in your AST. Then your visitor base class would need another method (which
probably is a noop in most cases) for visiting the comment.

Someone who wants to use this AST for documentation (like me) would provide
a visitor which knows whether to bind the comment to the next or the last
declaration in the AST.

This might be some more work but I feel it's the right thing.

Anyway, thanks a lot for your continued support, Duncan !

Best regards,	Stefan
_______________________________________________________              
              
Stefan Seefeld
Departement de Physique
Universite de Montreal
email: seefelds@magellan.umontreal.ca

_______________________________________________________

      ...ich hab' noch einen Koffer in Berlin...