mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
parent
e0e96ae80d
commit
cfa230c480
@ -110,7 +110,11 @@ sub _Dereference($$)
|
||||
sub _Error($)
|
||||
{
|
||||
my ($self) = @_;
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."' near `". $self->YYData->{LAST_TOKEN} . "'");
|
||||
if (defined($self->YYData->{LAST_TOKEN})) {
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."' near `". $self->YYData->{LAST_TOKEN} . "'");
|
||||
} else {
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."'");
|
||||
}
|
||||
}
|
||||
|
||||
sub Run {
|
||||
|
@ -179,7 +179,7 @@ typedecl: usertype ';' { $_[1] };
|
||||
sign: 'signed' | 'unsigned';
|
||||
|
||||
existingtype:
|
||||
| sign identifier { "$_[1] $_[2]" }
|
||||
sign identifier { ($_[1]?$_[1]:"signed") ." $_[2]" }
|
||||
| identifier
|
||||
;
|
||||
|
||||
|
@ -1349,7 +1349,11 @@ sub _Dereference($$)
|
||||
sub _Error($)
|
||||
{
|
||||
my ($self) = @_;
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."' near `". $self->YYData->{LAST_TOKEN} . "'");
|
||||
if (defined($self->YYData->{LAST_TOKEN})) {
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."' near `". $self->YYData->{LAST_TOKEN} . "'");
|
||||
} else {
|
||||
$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."'");
|
||||
}
|
||||
}
|
||||
|
||||
sub Run {
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -18,14 +18,22 @@ my $warnings = "";
|
||||
undef &Parse::Pidl::warning;
|
||||
*Parse::Pidl::warning = sub {
|
||||
my ($e, $l) = @_;
|
||||
$warnings .= "$e->{FILE}:$e->{LINE}: $l\n";
|
||||
if (defined($e)) {
|
||||
$warnings .= "$e->{FILE}:$e->{LINE}: $l\n";
|
||||
} else {
|
||||
$warnings .= "$l\n";
|
||||
}
|
||||
};
|
||||
|
||||
my $errors = "";
|
||||
undef &Parse::Pidl::error;
|
||||
*Parse::Pidl::error = sub {
|
||||
my ($e, $l) = @_;
|
||||
$errors .= "$e->{FILE}:$e->{LINE}: $l\n";
|
||||
if (defined($e)) {
|
||||
$errors .= "$e->{FILE}:$e->{LINE}: $l\n";
|
||||
} else {
|
||||
$errors .= "$l\n";
|
||||
}
|
||||
};
|
||||
|
||||
use Test::More;
|
||||
|
@ -2,6 +2,7 @@
|
||||
# (C) 2007 Jelmer Vernooij <jelmer@samba.org>
|
||||
# Published under the GNU General Public License
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 56;
|
||||
use FindBin qw($RealBin);
|
||||
|
Loading…
Reference in New Issue
Block a user