| Server IP : 216.92.14.13 / Your IP : 216.73.216.171 Web Server : Apache System : Linux vps4089.pairvps.com 5.15.0-190-generic #200-Ubuntu SMP Fri Aug 7 15:06:04 UTC 2026 x86_64 User : rmlac2fmr ( 1040637) PHP Version : 8.2.32 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/bin/ |
Upload File : |
#!/usr/local/bin/perl
use strict;
use warnings;
use CORBA::IDL 2.60;
# visitors
use CORBA::IDL::RepositoryIdVisitor;
use CORBA::IDL::AsciiVisitor;
my $parser = CORBA::IDL::ParserFactory::create('3.0');
$parser->getopts('hi:vx');
if ($parser->YYData->{opt_v}) {
print "CORBA::IDL $CORBA::IDL::VERSION\n";
print "IDL $CORBA::IDL::Parser::IDL_VERSION\n";
print "$0\n";
print "Perl $] on $^O\n";
exit;
}
if ($parser->YYData->{opt_h}) {
use Pod::Usage;
pod2usage(-verbose => 1);
}
my $cflags = '-D__idl';
if ($CORBA::IDL::Parser::IDL_VERSION lt '3.0') {
$cflags .= ' -D_PRE_3_0_COMPILER_';
}
my $preprocessor;
if ($^O eq 'MSWin32') {
$preprocessor = 'cpp -C ' . $cflags;
# $preprocessor = 'CL /E /C /nologo ' . $cflags; # Microsoft VC
}
else {
$preprocessor = 'cpp -C ' . $cflags;
}
$parser->Configure(
'preprocessor' => $preprocessor,
'verbose_error' => 1, # 0, 1
'verbose_warning' => 1, # 0, 1
'verbose_info' => 1, # 0, 1
'verbose_deprecated' => 0, # 0, 1 (concerns only version '2.4' and upper)
# 'collision_allowed' => 1,
);
$parser->Run(@ARGV);
$parser->DisplayStatus();
my $root = $parser->getRoot();
if (defined $root) {
$root->visit(new CORBA::IDL::RepositoryIdVisitor($parser));
if ($parser->YYData->{opt_x}) {
$parser->Export();
}
$root->visit(new CORBA::IDL::AsciiVisitor($parser));
}
#use Data::Dumper;
#if (exists $parser->YYData->{root}) {
# print Data::Dumper->Dump([$parser->YYData->{root}], ['root']);
#}
__END__
=head1 NAME
idl - IDL parser
=head1 SYNOPSIS
idl [options] I<spec>.idl
=head1 OPTIONS
All options are forwarded to C preprocessor, except -h -i -v -x.
With the GNU C Compatible Compiler Processor, useful options are :
=over 8
=item B<-D> I<name>
=item B<-D> I<name>=I<definition>
=item B<-I> I<directory>
=item B<-I->
=item B<-nostdinc>
=back
Specific options :
=over 8
=item B<-h>
Display help.
=item B<-i> I<directory>
Specify a path for import (only for IDL version 3.0).
=item B<-v>
Display version.
=item B<-x>
Enable export (only for IDL version 3.0).
=back
=head1 DESCRIPTION
B<idl> parses the given input file (IDL) and generates
a ASCII file with the .ast extension.
B<idl> is a Perl OO application what uses the visitor design pattern.
The parser is generated by Parse::Yapp.
B<idl> needs a B<cpp> executable.
CORBA Specifications, including IDL (Interface Definition Language)
are available on E<lt>http://www.omg.org/E<gt>.
=head1 SEE ALSO
cpp
=head1 COPYRIGHT
(c) 2001-2007 Francois PERRAD, France. All rights reserved.
This program and all CORBA::IDL modules are distributed
under the terms of the Artistic Licence.
=head1 AUTHOR
Francois PERRAD, francois.perrad@gadz.org
=cut