[omniORB] Omniidl and include file

Laurent Pointal pointal@lure.u-psud.fr
Tue, 08 Jun 1999 15:03:30 +0200


Seem to be a small bug in omniidl2 (omniORB 2.7.1, WinNT4SP1, Visual C++5
SP3).

A #include not left aligned give illegal syntax / parsing errors.

Example: -----------------------------------------------------------------
// ----- Test1.IDL
#pragma prefix "my.location"
module Test1 {
	#include "TestCsts.idl"
	interface MyObject {
		void DummyFct () ;
		} ;
	} ;

// ----- TestCsts.IDL
const long A_CONST = 12 ;

N:\PbOmniidl>omniidl2 Test1.idl
Test1.idl
omniidl2: "Test1.idl", line 4: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 4: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 4: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 4: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 4: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 6: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 6: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 6: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 6: Illegal syntax following module '{' opener
omniidl2: "Test1.idl", line 6: Illegal syntax following module '{' opener
omniidl2: Test1.idl: found 10 errors

Another example: -----------------------------------------------------------
// ----- Test1.IDL
#pragma prefix "my.location"
module Test1 {
	interface Hello {
		void HelloFct () ;
		} ;
	#include "TestCsts.idl"
	interface MyObject {
		void DummyFct () ;
		} ;
	} ;

N:\PbOmniidl>omniidl2 Test1.idl
Test1.idl
omniidl2: "Test1.idl", line 7: Statement can not be parsed
omniidl2: "Test1.idl", line 7: Statement can not be parsed
omniidl2: "Test1.idl", line 7: Statement can not be parsed
omniidl2: "Test1.idl", line 7: Statement can not be parsed
omniidl2: "Test1.idl", line 7: Statement can not be parsed
omniidl2: "Test1.idl", line 9: Statement can not be parsed
omniidl2: "Test1.idl", line 9: Statement can not be parsed
omniidl2: "Test1.idl", line 9: Statement can not be parsed
omniidl2: "Test1.idl", line 9: Statement can not be parsed
omniidl2: "Test1.idl", line 9: Statement can not be parsed
omniidl2: Test1.idl: found 10 errors

The folowing works: --------------------------------------------------------
// ----- Test1.IDL
#pragma prefix "my.location"
module Test1 {
#include "TestCsts.idl"
	interface MyObject {
		void DummyFct () ;
		} ;
	} ;

// ----- Test1.IDL
#pragma prefix "my.location"
module Test1 {
	interface Hello {
		void HelloFct () ;
		} ;
#include "TestCsts.idl"
	interface MyObject {
		void DummyFct () ;
		} ;
	} ;

----------------------------------------------------------------------------
----------
A+

Laurent.



Laurent POINTAL - CNRS/LURE - Service Informatique Experiences
Tel/fax: 01 64 46 82 80 / 01 64 46 41 48
email  : pointal@lure.u-psud.fr  ou  lpointal@planete.net 
ouebe  : http://www.planete.net/~lpointal