Permalink
Browse files

import version 2.05 from backpan

  • Loading branch information...
1 parent b8b7c31 commit 5f9a44301f1ca08e8ea06e3b7d431cd43006e246 @fperrad committed with Dec 17, 2003
Showing with 10,806 additions and 10,491 deletions.
  1. +6 −0 Changes
  2. +1 −1 README
  3. +2 −2 lexer.pm
  4. +1 −1 makefile.yapp
  5. +41 −22 node.pm
  6. +3,142 −3,063 parser23.pm
  7. +29 −4 parser23.yp
  8. +3,141 −3,102 parser24.pm
  9. +29 −4 parser24.yp
  10. +4,368 −4,278 parser30.pm
  11. +29 −4 parser30.yp
  12. +17 −10 repos_id.pm
View
@@ -1,5 +1,11 @@
Revision history for Perl extension CORBA::IDL.
+2.05 Wed Dec 17 12:30:00 2003
+ - improvement for EnumType
+ - improvement for value and boxed value
+ - add extra rules in grammar (export for value)
+ - bug in _StringLexer
+
2.04 Mon Sep 22 12:30:00 2003
- support cpp GCC 3.2.3
- bug : value inheritance
View
2 README
@@ -19,12 +19,12 @@ Description:
Prerequisites:
--------------
- This module needs Math::BigInt and Math::BigFloat modules.
This module needs a C preprocessor executable, like cpp.
See also:
---------
CORBA::C - Implements CORBA C language mapping
+ CORBA::JAVA - Implements CORBA Java language mapping
CORBA::HTML - Implements HTML documentation
References:
View
@@ -117,7 +117,7 @@ sub _StringLexer {
s/^\\v//
and $str .= "\013", # vertical tab
last;
- s/^\\([\\?'"])\'//
+ s/^\\([\?'"])//
and $str .= $1, # backslash, question mark, single quote, double quote
last;
@@ -168,7 +168,7 @@ sub _CharLexer {
and return ($token,"\f"); # form feed
s/^\\a\'//
and return ($token,"\a"); # alert
- s/^\\([\\?'"])\'//
+ s/^\\([\?'"])\'//
and return ($token,$1); # backslash, question mark, single quote, double quote
s/^\\([0-7]{1,3})\'//
and return ($token,chr oct $1);
View
@@ -1,7 +1,7 @@
YAPP=yapp -s -v -m
CP=copy
-RM=del
+RM=-del
all: parser30.pm parser24.pm parser23.pm parser22.pm parser21.pm parser20.pm
$(RM) Parser.pm
View
63 node.pm
@@ -7,7 +7,7 @@ use UNIVERSAL;
package node;
use vars qw($VERSION);
-$VERSION = '2.04';
+$VERSION = '2.05';
sub _Build {
my $proto = shift;
@@ -318,14 +318,20 @@ use base qw(node);
sub _Init {
my $self = shift;
my ($parser) = @_;
+ $self->{hash_interface} = {};
my %hash;
# 3.8.5 Interface Inheritance
if (exists $self->{list_interface}) {
foreach my $name (@{$self->{list_interface}}) {
if (exists $hash{$name}) {
$parser->Warning("'$name' redeclares inheritance.\n");
} else {
- $hash{$name} = $_;
+ $hash{$name} = 1;
+ $self->{hash_interface}->{$name} = 1;
+ my $base = $parser->YYData->{symbtab}->Lookup($name);
+ foreach (keys %{$base->{inheritance}->{hash_interface}}) {
+ $self->{hash_interface}->{$_} = 1;
+ }
}
}
}
@@ -335,7 +341,12 @@ sub _Init {
if (exists $hash{$name}) {
$parser->Warning("'$name' redeclares inheritance.\n");
} else {
- $hash{$name} = $_;
+ $hash{$name} = 1;
+ $self->{hash_interface}->{$name} = 1;
+ my $base = $parser->YYData->{symbtab}->Lookup($name);
+ foreach (keys %{$base->{inheritance}->{hash_interface}}) {
+ $self->{hash_interface}->{$_} = 1;
+ }
}
}
}
@@ -516,20 +527,20 @@ sub _CheckInheritance {
}
}
-#sub Configure {
-# my $self = shift;
-# my $parser = shift;
-# $self->SUPER::Configure($parser,@_);
-# my @list;
-# foreach my $value_element (@{$self->{list_decl}}) {
-# next unless (ref $value_element eq 'StateMembers');
-# foreach (@{$value_element->{list_decl}}) {
-# push @list, $_;
-# }
-# }
-# $self->configure(list_value => \@list); # list of 'StateMember'
-# return $self;
-#}
+sub Configure {
+ my $self = shift;
+ my $parser = shift;
+ $self->SUPER::Configure($parser,@_);
+ my @list;
+ foreach my $value_element (@{$self->{list_decl}}) {
+ next unless (ref $value_element eq 'StateMembers');
+ foreach (@{$value_element->{list_decl}}) {
+ push @list, $_;
+ }
+ }
+ $self->configure(list_value => \@list); # list of 'StateMember'
+ return $self;
+}
sub _CheckLocal {
# A local type may be used as a parameter, attribute, return type, or exception
@@ -657,13 +668,20 @@ sub _Init {
my ($parser) = @_;
$self->{prefix} = $parser->YYData->{symbtab}->GetPrefix();
$self->{_typeprefix} = $parser->YYData->{symbtab}->GetTypePrefix();
- $parser->YYData->{symbtab}->Insert($self);
$self->line_stamp($parser);
if ($parser->YYData->{doc} ne '') {
$self->{doc} = $parser->YYData->{doc};
$parser->YYData->{doc} = '';
}
+ $parser->YYData->{symbtab}->PushCurrentScope($self);
+ $parser->YYData->{curr_itf} = $self;
$parser->YYData->{curr_node} = $self;
+}
+
+sub Configure {
+ my $self = shift;
+ my $parser = shift;
+ $self->configure(@_);
my $type = TypeDeclarator->GetDefn($parser, $self->{type});
if ($type->isa('Value')) {
if ($Parser::IDL_version ge '3.0') {
@@ -672,6 +690,7 @@ sub _Init {
$parser->Info("$self->{type}->{idf} is a value type.\n");
}
}
+ return $self;
}
#
@@ -975,7 +994,7 @@ sub _Eval {
return undef;
}
} elsif ($elt->isa('Enum')) {
- if ($type eq $elt->{type}) {
+ if ($type eq $parser->YYData->{symbtab}->Lookup($elt->{type})) {
return $elt;
} else {
$parser->Error("'$elt->{idf}' is not a '$type->{idf}'.\n");
@@ -1796,7 +1815,7 @@ sub Configure {
push @list, $_->{full};
}
$_->configure(
- type => $self,
+ type => $self->{full},
value => "$idx"
);
$idx++;
@@ -2360,7 +2379,7 @@ sub Configure {
return $self;
}
-=pod
+=for tree
node
Specification -
@@ -2458,7 +2477,7 @@ sub Configure {
Factory
Finder
-=cut
+=end tree
1;
Oops, something went wrong.

0 comments on commit 5f9a443

Please sign in to comment.