RDF-Closure-0.001/0000755000076400007640000000000011773065331011671 5ustar taitaiRDF-Closure-0.001/inc/0000755000076400007640000000000011773065330012441 5ustar taitaiRDF-Closure-0.001/inc/YAML/0000755000076400007640000000000011773065330013203 5ustar taitaiRDF-Closure-0.001/inc/YAML/Tiny.pm0000644000076400007640000003534411773064333014477 0ustar taitai#line 1 package YAML::Tiny; use strict; # UTF Support? sub HAVE_UTF8 () { $] >= 5.007003 } BEGIN { if ( HAVE_UTF8 ) { # The string eval helps hide this from Test::MinimumVersion eval "require utf8;"; die "Failed to load UTF-8 support" if $@; } # Class structure require 5.004; require Exporter; require Carp; $YAML::Tiny::VERSION = '1.51'; # $YAML::Tiny::VERSION = eval $YAML::Tiny::VERSION; @YAML::Tiny::ISA = qw{ Exporter }; @YAML::Tiny::EXPORT = qw{ Load Dump }; @YAML::Tiny::EXPORT_OK = qw{ LoadFile DumpFile freeze thaw }; # Error storage $YAML::Tiny::errstr = ''; } # The character class of all characters we need to escape # NOTE: Inlined, since it's only used once # my $RE_ESCAPE = '[\\x00-\\x08\\x0b-\\x0d\\x0e-\\x1f\"\n]'; # Printed form of the unprintable characters in the lowest range # of ASCII characters, listed by ASCII ordinal position. my @UNPRINTABLE = qw( z x01 x02 x03 x04 x05 x06 a x08 t n v f r x0e x0f x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x1a e x1c x1d x1e x1f ); # Printable characters for escapes my %UNESCAPES = ( z => "\x00", a => "\x07", t => "\x09", n => "\x0a", v => "\x0b", f => "\x0c", r => "\x0d", e => "\x1b", '\\' => '\\', ); # Special magic boolean words my %QUOTE = map { $_ => 1 } qw{ null Null NULL y Y yes Yes YES n N no No NO true True TRUE false False FALSE on On ON off Off OFF }; ##################################################################### # Implementation # Create an empty YAML::Tiny object sub new { my $class = shift; bless [ @_ ], $class; } # Create an object from a file sub read { my $class = ref $_[0] ? ref shift : shift; # Check the file my $file = shift or return $class->_error( 'You did not specify a file name' ); return $class->_error( "File '$file' does not exist" ) unless -e $file; return $class->_error( "'$file' is a directory, not a file" ) unless -f _; return $class->_error( "Insufficient permissions to read '$file'" ) unless -r _; # Slurp in the file local $/ = undef; local *CFG; unless ( open(CFG, $file) ) { return $class->_error("Failed to open file '$file': $!"); } my $contents = ; unless ( close(CFG) ) { return $class->_error("Failed to close file '$file': $!"); } $class->read_string( $contents ); } # Create an object from a string sub read_string { my $class = ref $_[0] ? ref shift : shift; my $self = bless [], $class; my $string = $_[0]; eval { unless ( defined $string ) { die \"Did not provide a string to load"; } # Byte order marks # NOTE: Keeping this here to educate maintainers # my %BOM = ( # "\357\273\277" => 'UTF-8', # "\376\377" => 'UTF-16BE', # "\377\376" => 'UTF-16LE', # "\377\376\0\0" => 'UTF-32LE' # "\0\0\376\377" => 'UTF-32BE', # ); if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) { die \"Stream has a non UTF-8 BOM"; } else { # Strip UTF-8 bom if found, we'll just ignore it $string =~ s/^\357\273\277//; } # Try to decode as utf8 utf8::decode($string) if HAVE_UTF8; # Check for some special cases return $self unless length $string; unless ( $string =~ /[\012\015]+\z/ ) { die \"Stream does not end with newline character"; } # Split the file into lines my @lines = grep { ! /^\s*(?:\#.*)?\z/ } split /(?:\015{1,2}\012|\015|\012)/, $string; # Strip the initial YAML header @lines and $lines[0] =~ /^\%YAML[: ][\d\.]+.*\z/ and shift @lines; # A nibbling parser while ( @lines ) { # Do we have a document header? if ( $lines[0] =~ /^---\s*(?:(.+)\s*)?\z/ ) { # Handle scalar documents shift @lines; if ( defined $1 and $1 !~ /^(?:\#.+|\%YAML[: ][\d\.]+)\z/ ) { push @$self, $self->_read_scalar( "$1", [ undef ], \@lines ); next; } } if ( ! @lines or $lines[0] =~ /^(?:---|\.\.\.)/ ) { # A naked document push @$self, undef; while ( @lines and $lines[0] !~ /^---/ ) { shift @lines; } } elsif ( $lines[0] =~ /^\s*\-/ ) { # An array at the root my $document = [ ]; push @$self, $document; $self->_read_array( $document, [ 0 ], \@lines ); } elsif ( $lines[0] =~ /^(\s*)\S/ ) { # A hash at the root my $document = { }; push @$self, $document; $self->_read_hash( $document, [ length($1) ], \@lines ); } else { die \"YAML::Tiny failed to classify the line '$lines[0]'"; } } }; if ( ref $@ eq 'SCALAR' ) { return $self->_error(${$@}); } elsif ( $@ ) { require Carp; Carp::croak($@); } return $self; } # Deparse a scalar string to the actual scalar sub _read_scalar { my ($self, $string, $indent, $lines) = @_; # Trim trailing whitespace $string =~ s/\s*\z//; # Explitic null/undef return undef if $string eq '~'; # Single quote if ( $string =~ /^\'(.*?)\'(?:\s+\#.*)?\z/ ) { return '' unless defined $1; $string = $1; $string =~ s/\'\'/\'/g; return $string; } # Double quote. # The commented out form is simpler, but overloaded the Perl regex # engine due to recursion and backtracking problems on strings # larger than 32,000ish characters. Keep it for reference purposes. # if ( $string =~ /^\"((?:\\.|[^\"])*)\"\z/ ) { if ( $string =~ /^\"([^\\"]*(?:\\.[^\\"]*)*)\"(?:\s+\#.*)?\z/ ) { # Reusing the variable is a little ugly, # but avoids a new variable and a string copy. $string = $1; $string =~ s/\\"/"/g; $string =~ s/\\([never\\fartz]|x([0-9a-fA-F]{2}))/(length($1)>1)?pack("H2",$2):$UNESCAPES{$1}/gex; return $string; } # Special cases if ( $string =~ /^[\'\"!&]/ ) { die \"YAML::Tiny does not support a feature in line '$string'"; } return {} if $string =~ /^{}(?:\s+\#.*)?\z/; return [] if $string =~ /^\[\](?:\s+\#.*)?\z/; # Regular unquoted string if ( $string !~ /^[>|]/ ) { if ( $string =~ /^(?:-(?:\s|$)|[\@\%\`])/ or $string =~ /:(?:\s|$)/ ) { die \"YAML::Tiny found illegal characters in plain scalar: '$string'"; } $string =~ s/\s+#.*\z//; return $string; } # Error die \"YAML::Tiny failed to find multi-line scalar content" unless @$lines; # Check the indent depth $lines->[0] =~ /^(\s*)/; $indent->[-1] = length("$1"); if ( defined $indent->[-2] and $indent->[-1] <= $indent->[-2] ) { die \"YAML::Tiny found bad indenting in line '$lines->[0]'"; } # Pull the lines my @multiline = (); while ( @$lines ) { $lines->[0] =~ /^(\s*)/; last unless length($1) >= $indent->[-1]; push @multiline, substr(shift(@$lines), length($1)); } my $j = (substr($string, 0, 1) eq '>') ? ' ' : "\n"; my $t = (substr($string, 1, 1) eq '-') ? '' : "\n"; return join( $j, @multiline ) . $t; } # Parse an array sub _read_array { my ($self, $array, $indent, $lines) = @_; while ( @$lines ) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { die \"YAML::Tiny found bad indenting in line '$lines->[0]'"; } if ( $lines->[0] =~ /^(\s*\-\s+)[^\'\"]\S*\s*:(?:\s+|$)/ ) { # Inline nested hash my $indent2 = length("$1"); $lines->[0] =~ s/-/ /; push @$array, { }; $self->_read_hash( $array->[-1], [ @$indent, $indent2 ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-(\s*)(.+?)\s*\z/ ) { # Array entry with a value shift @$lines; push @$array, $self->_read_scalar( "$2", [ @$indent, undef ], $lines ); } elsif ( $lines->[0] =~ /^\s*\-\s*\z/ ) { shift @$lines; unless ( @$lines ) { push @$array, undef; return 1; } if ( $lines->[0] =~ /^(\s*)\-/ ) { my $indent2 = length("$1"); if ( $indent->[-1] == $indent2 ) { # Null array entry push @$array, undef; } else { # Naked indenter push @$array, [ ]; $self->_read_array( $array->[-1], [ @$indent, $indent2 ], $lines ); } } elsif ( $lines->[0] =~ /^(\s*)\S/ ) { push @$array, { }; $self->_read_hash( $array->[-1], [ @$indent, length("$1") ], $lines ); } else { die \"YAML::Tiny failed to classify line '$lines->[0]'"; } } elsif ( defined $indent->[-2] and $indent->[-1] == $indent->[-2] ) { # This is probably a structure like the following... # --- # foo: # - list # bar: value # # ... so lets return and let the hash parser handle it return 1; } else { die \"YAML::Tiny failed to classify line '$lines->[0]'"; } } return 1; } # Parse an array sub _read_hash { my ($self, $hash, $indent, $lines) = @_; while ( @$lines ) { # Check for a new document if ( $lines->[0] =~ /^(?:---|\.\.\.)/ ) { while ( @$lines and $lines->[0] !~ /^---/ ) { shift @$lines; } return 1; } # Check the indent level $lines->[0] =~ /^(\s*)/; if ( length($1) < $indent->[-1] ) { return 1; } elsif ( length($1) > $indent->[-1] ) { die \"YAML::Tiny found bad indenting in line '$lines->[0]'"; } # Get the key unless ( $lines->[0] =~ s/^\s*([^\'\" ][^\n]*?)\s*:(\s+(?:\#.*)?|$)// ) { if ( $lines->[0] =~ /^\s*[?\'\"]/ ) { die \"YAML::Tiny does not support a feature in line '$lines->[0]'"; } die \"YAML::Tiny failed to classify line '$lines->[0]'"; } my $key = $1; # Do we have a value? if ( length $lines->[0] ) { # Yes $hash->{$key} = $self->_read_scalar( shift(@$lines), [ @$indent, undef ], $lines ); } else { # An indent shift @$lines; unless ( @$lines ) { $hash->{$key} = undef; return 1; } if ( $lines->[0] =~ /^(\s*)-/ ) { $hash->{$key} = []; $self->_read_array( $hash->{$key}, [ @$indent, length($1) ], $lines ); } elsif ( $lines->[0] =~ /^(\s*)./ ) { my $indent2 = length("$1"); if ( $indent->[-1] >= $indent2 ) { # Null hash entry $hash->{$key} = undef; } else { $hash->{$key} = {}; $self->_read_hash( $hash->{$key}, [ @$indent, length($1) ], $lines ); } } } } return 1; } # Save an object to a file sub write { my $self = shift; my $file = shift or return $self->_error('No file name provided'); # Write it to the file open( CFG, '>' . $file ) or return $self->_error( "Failed to open file '$file' for writing: $!" ); print CFG $self->write_string; close CFG; return 1; } # Save an object to a string sub write_string { my $self = shift; return '' unless @$self; # Iterate over the documents my $indent = 0; my @lines = (); foreach my $cursor ( @$self ) { push @lines, '---'; # An empty document if ( ! defined $cursor ) { # Do nothing # A scalar document } elsif ( ! ref $cursor ) { $lines[-1] .= ' ' . $self->_write_scalar( $cursor, $indent ); # A list at the root } elsif ( ref $cursor eq 'ARRAY' ) { unless ( @$cursor ) { $lines[-1] .= ' []'; next; } push @lines, $self->_write_array( $cursor, $indent, {} ); # A hash at the root } elsif ( ref $cursor eq 'HASH' ) { unless ( %$cursor ) { $lines[-1] .= ' {}'; next; } push @lines, $self->_write_hash( $cursor, $indent, {} ); } else { Carp::croak("Cannot serialize " . ref($cursor)); } } join '', map { "$_\n" } @lines; } sub _write_scalar { my $string = $_[1]; return '~' unless defined $string; return "''" unless length $string; if ( $string =~ /[\x00-\x08\x0b-\x0d\x0e-\x1f\"\'\n]/ ) { $string =~ s/\\/\\\\/g; $string =~ s/"/\\"/g; $string =~ s/\n/\\n/g; $string =~ s/([\x00-\x1f])/\\$UNPRINTABLE[ord($1)]/g; return qq|"$string"|; } if ( $string =~ /(?:^\W|\s|:\z)/ or $QUOTE{$string} ) { return "'$string'"; } return $string; } sub _write_array { my ($self, $array, $indent, $seen) = @_; if ( $seen->{refaddr($array)}++ ) { die "YAML::Tiny does not support circular references"; } my @lines = (); foreach my $el ( @$array ) { my $line = (' ' x $indent) . '-'; my $type = ref $el; if ( ! $type ) { $line .= ' ' . $self->_write_scalar( $el, $indent + 1 ); push @lines, $line; } elsif ( $type eq 'ARRAY' ) { if ( @$el ) { push @lines, $line; push @lines, $self->_write_array( $el, $indent + 1, $seen ); } else { $line .= ' []'; push @lines, $line; } } elsif ( $type eq 'HASH' ) { if ( keys %$el ) { push @lines, $line; push @lines, $self->_write_hash( $el, $indent + 1, $seen ); } else { $line .= ' {}'; push @lines, $line; } } else { die "YAML::Tiny does not support $type references"; } } @lines; } sub _write_hash { my ($self, $hash, $indent, $seen) = @_; if ( $seen->{refaddr($hash)}++ ) { die "YAML::Tiny does not support circular references"; } my @lines = (); foreach my $name ( sort keys %$hash ) { my $el = $hash->{$name}; my $line = (' ' x $indent) . "$name:"; my $type = ref $el; if ( ! $type ) { $line .= ' ' . $self->_write_scalar( $el, $indent + 1 ); push @lines, $line; } elsif ( $type eq 'ARRAY' ) { if ( @$el ) { push @lines, $line; push @lines, $self->_write_array( $el, $indent + 1, $seen ); } else { $line .= ' []'; push @lines, $line; } } elsif ( $type eq 'HASH' ) { if ( keys %$el ) { push @lines, $line; push @lines, $self->_write_hash( $el, $indent + 1, $seen ); } else { $line .= ' {}'; push @lines, $line; } } else { die "YAML::Tiny does not support $type references"; } } @lines; } # Set error sub _error { $YAML::Tiny::errstr = $_[1]; undef; } # Retrieve error sub errstr { $YAML::Tiny::errstr; } ##################################################################### # YAML Compatibility sub Dump { YAML::Tiny->new(@_)->write_string; } sub Load { my $self = YAML::Tiny->read_string(@_); unless ( $self ) { Carp::croak("Failed to load YAML document from string"); } if ( wantarray ) { return @$self; } else { # To match YAML.pm, return the last document return $self->[-1]; } } BEGIN { *freeze = *Dump; *thaw = *Load; } sub DumpFile { my $file = shift; YAML::Tiny->new(@_)->write($file); } sub LoadFile { my $self = YAML::Tiny->read($_[0]); unless ( $self ) { Carp::croak("Failed to load YAML document from '" . ($_[0] || '') . "'"); } if ( wantarray ) { return @$self; } else { # Return only the last document to match YAML.pm, return $self->[-1]; } } ##################################################################### # Use Scalar::Util if possible, otherwise emulate it BEGIN { local $@; eval { require Scalar::Util; }; my $v = eval("$Scalar::Util::VERSION") || 0; if ( $@ or $v < 1.18 ) { eval <<'END_PERL'; # Scalar::Util failed to load or too old sub refaddr { my $pkg = ref($_[0]) or return undef; if ( !! UNIVERSAL::can($_[0], 'can') ) { bless $_[0], 'Scalar::Util::Fake'; } else { $pkg = undef; } "$_[0]" =~ /0x(\w+)/; my $i = do { local $^W; hex $1 }; bless $_[0], $pkg if defined $pkg; $i; } END_PERL } else { *refaddr = *Scalar::Util::refaddr; } } 1; __END__ #line 1175 RDF-Closure-0.001/inc/Scalar/0000755000076400007640000000000011773065330013646 5ustar taitaiRDF-Closure-0.001/inc/Scalar/Util.pm0000644000076400007640000000325111773064332015123 0ustar taitai#line 1 # Scalar::Util.pm # # Copyright (c) 1997-2007 Graham Barr . All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. package Scalar::Util; use strict; use vars qw(@ISA @EXPORT_OK $VERSION @EXPORT_FAIL); require Exporter; require List::Util; # List::Util loads the XS @ISA = qw(Exporter); @EXPORT_OK = qw(blessed dualvar reftype weaken isweak tainted readonly openhandle refaddr isvstring looks_like_number set_prototype); $VERSION = "1.23"; $VERSION = eval $VERSION; unless (defined &dualvar) { # Load Pure Perl version if XS not loaded require Scalar::Util::PP; Scalar::Util::PP->import; push @EXPORT_FAIL, qw(weaken isweak dualvar isvstring set_prototype); } sub export_fail { if (grep { /dualvar/ } @EXPORT_FAIL) { # no XS loaded my $pat = join("|", @EXPORT_FAIL); if (my ($err) = grep { /^($pat)$/ } @_ ) { require Carp; Carp::croak("$err is only available with the XS version of Scalar::Util"); } } if (grep { /^(weaken|isweak)$/ } @_ ) { require Carp; Carp::croak("Weak references are not implemented in the version of perl"); } if (grep { /^(isvstring)$/ } @_ ) { require Carp; Carp::croak("Vstrings are not implemented in the version of perl"); } @_; } sub openhandle ($) { my $fh = shift; my $rt = reftype($fh) || ''; return defined(fileno($fh)) ? $fh : undef if $rt eq 'IO'; if (reftype(\$fh) eq 'GLOB') { # handle openhandle(*DATA) $fh = \(my $tmp=$fh); } elsif ($rt ne 'GLOB') { return undef; } (tied(*$fh) or defined(fileno($fh))) ? $fh : undef; } 1; __END__ #line 283 RDF-Closure-0.001/inc/Scalar/Util/0000755000076400007640000000000011773065330014563 5ustar taitaiRDF-Closure-0.001/inc/Scalar/Util/PP.pm0000644000076400007640000000431711773064333015447 0ustar taitai#line 1 # Scalar::Util::PP.pm # # Copyright (c) 1997-2009 Graham Barr . All rights reserved. # This program is free software; you can redistribute it and/or # modify it under the same terms as Perl itself. # # This module is normally only loaded if the XS module is not available package Scalar::Util::PP; use strict; use warnings; use vars qw(@ISA @EXPORT $VERSION $recurse); require Exporter; use B qw(svref_2object); @ISA = qw(Exporter); @EXPORT = qw(blessed reftype tainted readonly refaddr looks_like_number); $VERSION = "1.23"; $VERSION = eval $VERSION; sub blessed ($) { return undef unless length(ref($_[0])); my $b = svref_2object($_[0]); return undef unless $b->isa('B::PVMG'); my $s = $b->SvSTASH; return $s->isa('B::HV') ? $s->NAME : undef; } sub refaddr($) { return undef unless length(ref($_[0])); my $addr; if(defined(my $pkg = blessed($_[0]))) { $addr .= bless $_[0], 'Scalar::Util::Fake'; bless $_[0], $pkg; } else { $addr .= $_[0] } $addr =~ /0x(\w+)/; local $^W; no warnings 'portable'; hex($1); } { my %tmap = qw( B::NULL SCALAR B::HV HASH B::AV ARRAY B::CV CODE B::IO IO B::GV GLOB B::REGEXP REGEXP ); sub reftype ($) { my $r = shift; return undef unless length(ref($r)); my $t = ref(svref_2object($r)); return exists $tmap{$t} ? $tmap{$t} : length(ref($$r)) ? 'REF' : 'SCALAR'; } } sub tainted { local($@, $SIG{__DIE__}, $SIG{__WARN__}); local $^W = 0; no warnings; eval { kill 0 * $_[0] }; $@ =~ /^Insecure/; } sub readonly { return 0 if tied($_[0]) || (ref(\($_[0])) ne "SCALAR"); local($@, $SIG{__DIE__}, $SIG{__WARN__}); my $tmp = $_[0]; !eval { $_[0] = $tmp; 1 }; } sub looks_like_number { local $_ = shift; # checks from perlfaq4 return 0 if !defined($_); if (ref($_)) { require overload; return overload::Overloaded($_) ? defined(0 + $_) : 0; } return 1 if (/^[+-]?[0-9]+$/); # is a +/- integer return 1 if (/^([+-]?)(?=[0-9]|\.[0-9])[0-9]*(\.[0-9]*)?([Ee]([+-]?[0-9]+))?$/); # a C float return 1 if ($] >= 5.008 and /^(Inf(inity)?|NaN)$/i) or ($] >= 5.006001 and /^Inf$/i); 0; } 1; RDF-Closure-0.001/inc/unicore/0000755000076400007640000000000011773065330014105 5ustar taitaiRDF-Closure-0.001/inc/unicore/Name.pm0000644000076400007640000002127311773064333015332 0ustar taitai#line 1 # !!!!!!! DO NOT EDIT THIS FILE !!!!!!! # This file is machine-generated by lib/unicore/mktables from the Unicode # database, Version 6.1.0. Any changes made here will be lost! # !!!!!!! INTERNAL PERL USE ONLY !!!!!!! # This file is for internal use by core Perl only. The format and even the # name or existence of this file are subject to change without notice. Don't # use it directly. package charnames; # This module contains machine-generated tables and code for the # algorithmically-determinable Unicode character names. The following # routines can be used to translate between name and code point and vice versa { # Closure # Matches legal code point. 4-6 hex numbers, If there are 6, the first # two must be 10; if there are 5, the first must not be a 0. Written this # way to decrease backtracking. The first regex allows the code point to # be at the end of a word, but to work properly, the word shouldn't end # with a valid hex character. The second one won't match a code point at # the end of a word, and doesn't have the run-on issue my $run_on_code_point_re = qr/(?^aax: (?: 10[0-9A-F]{4} | [1-9A-F][0-9A-F]{4} | [0-9A-F]{4} ) \b)/; my $code_point_re = qr/(?^aa:\b(?^aax: (?: 10[0-9A-F]{4} | [1-9A-F][0-9A-F]{4} | [0-9A-F]{4} ) \b))/; # In the following hash, the keys are the bases of names which includes # the code point in the name, like CJK UNIFIED IDEOGRAPH-4E01. The values # of each key is another hash which is used to get the low and high ends # for each range of code points that apply to the name. my %names_ending_in_code_point = ( 'CJK COMPATIBILITY IDEOGRAPH' => { 'high' => [ 64109, 64217, 195101, ], 'low' => [ 63744, 64112, 194560, ], }, 'CJK UNIFIED IDEOGRAPH' => { 'high' => [ 19893, 40908, 173782, 177972, 178205, ], 'low' => [ 13312, 19968, 131072, 173824, 177984, ], }, ); # The following hash is a copy of the previous one, except is for loose # matching, so each name has blanks and dashes squeezed out my %loose_names_ending_in_code_point = ( 'CJKCOMPATIBILITYIDEOGRAPH' => { 'high' => [ 64109, 64217, 195101, ], 'low' => [ 63744, 64112, 194560, ], }, 'CJKUNIFIEDIDEOGRAPH' => { 'high' => [ 19893, 40908, 173782, 177972, 178205, ], 'low' => [ 13312, 19968, 131072, 173824, 177984, ], }, ); # And the following array gives the inverse mapping from code points to # names. Lowest code points are first my @code_points_ending_in_code_point = ( { 'high' => 19893, 'low' => 13312, 'name' => 'CJK UNIFIED IDEOGRAPH', }, { 'high' => 40908, 'low' => 19968, 'name' => 'CJK UNIFIED IDEOGRAPH', }, { 'high' => 64109, 'low' => 63744, 'name' => 'CJK COMPATIBILITY IDEOGRAPH', }, { 'high' => 64217, 'low' => 64112, 'name' => 'CJK COMPATIBILITY IDEOGRAPH', }, { 'high' => 173782, 'low' => 131072, 'name' => 'CJK UNIFIED IDEOGRAPH', }, { 'high' => 177972, 'low' => 173824, 'name' => 'CJK UNIFIED IDEOGRAPH', }, { 'high' => 178205, 'low' => 177984, 'name' => 'CJK UNIFIED IDEOGRAPH', }, { 'high' => 195101, 'low' => 194560, 'name' => 'CJK COMPATIBILITY IDEOGRAPH', }, , ); # Convert from code point to Jamo short name for use in composing Hangul # syllable names my %Jamo = ( 4352 => 'G', 4353 => 'GG', 4354 => 'N', 4355 => 'D', 4356 => 'DD', 4357 => 'R', 4358 => 'M', 4359 => 'B', 4360 => 'BB', 4361 => 'S', 4362 => 'SS', 4363 => '', 4364 => 'J', 4365 => 'JJ', 4366 => 'C', 4367 => 'K', 4368 => 'T', 4369 => 'P', 4370 => 'H', 4449 => 'A', 4450 => 'AE', 4451 => 'YA', 4452 => 'YAE', 4453 => 'EO', 4454 => 'E', 4455 => 'YEO', 4456 => 'YE', 4457 => 'O', 4458 => 'WA', 4459 => 'WAE', 4460 => 'OE', 4461 => 'YO', 4462 => 'U', 4463 => 'WEO', 4464 => 'WE', 4465 => 'WI', 4466 => 'YU', 4467 => 'EU', 4468 => 'YI', 4469 => 'I', 4520 => 'G', 4521 => 'GG', 4522 => 'GS', 4523 => 'N', 4524 => 'NJ', 4525 => 'NH', 4526 => 'D', 4527 => 'L', 4528 => 'LG', 4529 => 'LM', 4530 => 'LB', 4531 => 'LS', 4532 => 'LT', 4533 => 'LP', 4534 => 'LH', 4535 => 'M', 4536 => 'B', 4537 => 'BS', 4538 => 'S', 4539 => 'SS', 4540 => 'NG', 4541 => 'J', 4542 => 'C', 4543 => 'K', 4544 => 'T', 4545 => 'P', 4546 => 'H', ); # Leading consonant (can be null) my %Jamo_L = ( '' => 11, 'B' => 7, 'BB' => 8, 'C' => 14, 'D' => 3, 'DD' => 4, 'G' => 0, 'GG' => 1, 'H' => 18, 'J' => 12, 'JJ' => 13, 'K' => 15, 'M' => 6, 'N' => 2, 'P' => 17, 'R' => 5, 'S' => 9, 'SS' => 10, 'T' => 16, ); # Vowel my %Jamo_V = ( 'A' => 0, 'AE' => 1, 'E' => 5, 'EO' => 4, 'EU' => 18, 'I' => 20, 'O' => 8, 'OE' => 11, 'U' => 13, 'WA' => 9, 'WAE' => 10, 'WE' => 15, 'WEO' => 14, 'WI' => 16, 'YA' => 2, 'YAE' => 3, 'YE' => 7, 'YEO' => 6, 'YI' => 19, 'YO' => 12, 'YU' => 17, ); # Optional trailing consonant my %Jamo_T = ( 'B' => 17, 'BS' => 18, 'C' => 23, 'D' => 7, 'G' => 1, 'GG' => 2, 'GS' => 3, 'H' => 27, 'J' => 22, 'K' => 24, 'L' => 8, 'LB' => 11, 'LG' => 9, 'LH' => 15, 'LM' => 10, 'LP' => 14, 'LS' => 12, 'LT' => 13, 'M' => 16, 'N' => 4, 'NG' => 21, 'NH' => 6, 'NJ' => 5, 'P' => 26, 'S' => 19, 'SS' => 20, 'T' => 25, ); # Computed re that splits up a Hangul name into LVT or LV syllables my $syllable_re = qr/(|B|BB|C|D|DD|G|GG|H|J|JJ|K|M|N|P|R|S|SS|T)(A|AE|E|EO|EU|I|O|OE|U|WA|WAE|WE|WEO|WI|YA|YAE|YE|YEO|YI|YO|YU)(B|BS|C|D|G|GG|GS|H|J|K|L|LB|LG|LH|LM|LP|LS|LT|M|N|NG|NH|NJ|P|S|SS|T)?/; my $HANGUL_SYLLABLE = "HANGUL SYLLABLE "; my $loose_HANGUL_SYLLABLE = "HANGULSYLLABLE"; # These constants names and values were taken from the Unicode standard, # version 5.1, section 3.12. They are used in conjunction with Hangul # syllables my $SBase = 0xAC00; my $LBase = 0x1100; my $VBase = 0x1161; my $TBase = 0x11A7; my $SCount = 11172; my $LCount = 19; my $VCount = 21; my $TCount = 28; my $NCount = $VCount * $TCount; sub name_to_code_point_special { my ($name, $loose) = @_; # Returns undef if not one of the specially handled names; otherwise # returns the code point equivalent to the input name # $loose is non-zero if to use loose matching, 'name' in that case # must be input as upper case with all blanks and dashes squeezed out. if ((! $loose && $name =~ s/$HANGUL_SYLLABLE//) || ($loose && $name =~ s/$loose_HANGUL_SYLLABLE//)) { return if $name !~ qr/^$syllable_re$/; my $L = $Jamo_L{$1}; my $V = $Jamo_V{$2}; my $T = (defined $3) ? $Jamo_T{$3} : 0; return ($L * $VCount + $V) * $TCount + $T + $SBase; } # Name must end in 'code_point' for this to handle. return if (($loose && $name !~ /^ (.*?) ($run_on_code_point_re) $/x) || (! $loose && $name !~ /^ (.*) ($code_point_re) $/x)); my $base = $1; my $code_point = CORE::hex $2; my $names_ref; if ($loose) { $names_ref = \%loose_names_ending_in_code_point; } else { return if $base !~ s/-$//; $names_ref = \%names_ending_in_code_point; } # Name must be one of the ones which has the code point in it. return if ! $names_ref->{$base}; # Look through the list of ranges that apply to this name to see if # the code point is in one of them. for (my $i = 0; $i < scalar @{$names_ref->{$base}{'low'}}; $i++) { return if $names_ref->{$base}{'low'}->[$i] > $code_point; next if $names_ref->{$base}{'high'}->[$i] < $code_point; # Here, the code point is in the range. return $code_point; } # Here, looked like the name had a code point number in it, but # did not match one of the valid ones. return; } sub code_point_to_name_special { my $code_point = shift; # Returns the name of a code point if algorithmically determinable; # undef if not # If in the Hangul range, calculate the name based on Unicode's # algorithm if ($code_point >= $SBase && $code_point <= $SBase + $SCount -1) { use integer; my $SIndex = $code_point - $SBase; my $L = $LBase + $SIndex / $NCount; my $V = $VBase + ($SIndex % $NCount) / $TCount; my $T = $TBase + $SIndex % $TCount; $name = "$HANGUL_SYLLABLE$Jamo{$L}$Jamo{$V}"; $name .= $Jamo{$T} if $T != $TBase; return $name; } # Look through list of these code points for one in range. foreach my $hash (@code_points_ending_in_code_point) { return if $code_point < $hash->{'low'}; if ($code_point <= $hash->{'high'}) { return sprintf("%s-%04X", $hash->{'name'}, $code_point); } } return; # None found } } # End closure 1; RDF-Closure-0.001/inc/Module/0000755000076400007640000000000011773065330013666 5ustar taitaiRDF-Closure-0.001/inc/Module/AutoInstall.pm0000644000076400007640000006216211773064336016477 0ustar taitai#line 1 package Module::AutoInstall; use strict; use Cwd (); use File::Spec (); use ExtUtils::MakeMaker (); use vars qw{$VERSION}; BEGIN { $VERSION = '1.06'; } # special map on pre-defined feature sets my %FeatureMap = ( '' => 'Core Features', # XXX: deprecated '-core' => 'Core Features', ); # various lexical flags my ( @Missing, @Existing, %DisabledTests, $UnderCPAN, $InstallDepsTarget, $HasCPANPLUS ); my ( $Config, $CheckOnly, $SkipInstall, $AcceptDefault, $TestOnly, $AllDeps, $UpgradeDeps ); my ( $PostambleActions, $PostambleActionsNoTest, $PostambleActionsUpgradeDeps, $PostambleActionsUpgradeDepsNoTest, $PostambleActionsListDeps, $PostambleActionsListAllDeps, $PostambleUsed, $NoTest); # See if it's a testing or non-interactive session _accept_default( $ENV{AUTOMATED_TESTING} or ! -t STDIN ); _init(); sub _accept_default { $AcceptDefault = shift; } sub _installdeps_target { $InstallDepsTarget = shift; } sub missing_modules { return @Missing; } sub do_install { __PACKAGE__->install( [ $Config ? ( UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) : () ], @Missing, ); } # initialize various flags, and/or perform install sub _init { foreach my $arg ( @ARGV, split( /[\s\t]+/, $ENV{PERL_AUTOINSTALL} || $ENV{PERL_EXTUTILS_AUTOINSTALL} || '' ) ) { if ( $arg =~ /^--config=(.*)$/ ) { $Config = [ split( ',', $1 ) ]; } elsif ( $arg =~ /^--installdeps=(.*)$/ ) { __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) ); exit 0; } elsif ( $arg =~ /^--upgradedeps=(.*)$/ ) { $UpgradeDeps = 1; __PACKAGE__->install( $Config, @Missing = split( /,/, $1 ) ); exit 0; } elsif ( $arg =~ /^--default(?:deps)?$/ ) { $AcceptDefault = 1; } elsif ( $arg =~ /^--check(?:deps)?$/ ) { $CheckOnly = 1; } elsif ( $arg =~ /^--skip(?:deps)?$/ ) { $SkipInstall = 1; } elsif ( $arg =~ /^--test(?:only)?$/ ) { $TestOnly = 1; } elsif ( $arg =~ /^--all(?:deps)?$/ ) { $AllDeps = 1; } } } # overrides MakeMaker's prompt() to automatically accept the default choice sub _prompt { goto &ExtUtils::MakeMaker::prompt unless $AcceptDefault; my ( $prompt, $default ) = @_; my $y = ( $default =~ /^[Yy]/ ); print $prompt, ' [', ( $y ? 'Y' : 'y' ), '/', ( $y ? 'n' : 'N' ), '] '; print "$default\n"; return $default; } # the workhorse sub import { my $class = shift; my @args = @_ or return; my $core_all; print "*** $class version " . $class->VERSION . "\n"; print "*** Checking for Perl dependencies...\n"; my $cwd = Cwd::cwd(); $Config = []; my $maxlen = length( ( sort { length($b) <=> length($a) } grep { /^[^\-]/ } map { ref($_) ? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} ) : '' } map { +{@args}->{$_} } grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} } )[0] ); # We want to know if we're under CPAN early to avoid prompting, but # if we aren't going to try and install anything anyway then skip the # check entirely since we don't want to have to load (and configure) # an old CPAN just for a cosmetic message $UnderCPAN = _check_lock(1) unless $SkipInstall || $InstallDepsTarget; while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) { my ( @required, @tests, @skiptests ); my $default = 1; my $conflict = 0; if ( $feature =~ m/^-(\w+)$/ ) { my $option = lc($1); # check for a newer version of myself _update_to( $modules, @_ ) and return if $option eq 'version'; # sets CPAN configuration options $Config = $modules if $option eq 'config'; # promote every features to core status $core_all = ( $modules =~ /^all$/i ) and next if $option eq 'core'; next unless $option eq 'core'; } print "[" . ( $FeatureMap{ lc($feature) } || $feature ) . "]\n"; $modules = [ %{$modules} ] if UNIVERSAL::isa( $modules, 'HASH' ); unshift @$modules, -default => &{ shift(@$modules) } if ( ref( $modules->[0] ) eq 'CODE' ); # XXX: bugward combatability while ( my ( $mod, $arg ) = splice( @$modules, 0, 2 ) ) { if ( $mod =~ m/^-(\w+)$/ ) { my $option = lc($1); $default = $arg if ( $option eq 'default' ); $conflict = $arg if ( $option eq 'conflict' ); @tests = @{$arg} if ( $option eq 'tests' ); @skiptests = @{$arg} if ( $option eq 'skiptests' ); next; } printf( "- %-${maxlen}s ...", $mod ); if ( $arg and $arg =~ /^\D/ ) { unshift @$modules, $arg; $arg = 0; } # XXX: check for conflicts and uninstalls(!) them. my $cur = _version_of($mod); if (_version_cmp ($cur, $arg) >= 0) { print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n"; push @Existing, $mod => $arg; $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; } else { if (not defined $cur) # indeed missing { print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n"; } else { # no need to check $arg as _version_cmp ($cur, undef) would satisfy >= above print "too old. ($cur < $arg)\n"; } push @required, $mod => $arg; } } next unless @required; my $mandatory = ( $feature eq '-core' or $core_all ); if ( !$SkipInstall and ( $CheckOnly or ($mandatory and $UnderCPAN) or $AllDeps or $InstallDepsTarget or _prompt( qq{==> Auto-install the } . ( @required / 2 ) . ( $mandatory ? ' mandatory' : ' optional' ) . qq{ module(s) from CPAN?}, $default ? 'y' : 'n', ) =~ /^[Yy]/ ) ) { push( @Missing, @required ); $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; } elsif ( !$SkipInstall and $default and $mandatory and _prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', ) =~ /^[Nn]/ ) { push( @Missing, @required ); $DisabledTests{$_} = 1 for map { glob($_) } @skiptests; } else { $DisabledTests{$_} = 1 for map { glob($_) } @tests; } } if ( @Missing and not( $CheckOnly or $UnderCPAN) ) { require Config; my $make = $Config::Config{make}; if ($InstallDepsTarget) { print "*** To install dependencies type '$make installdeps' or '$make installdeps_notest'.\n"; } else { print "*** Dependencies will be installed the next time you type '$make'.\n"; } # make an educated guess of whether we'll need root permission. print " (You may need to do that as the 'root' user.)\n" if eval '$>'; } print "*** $class configuration finished.\n"; chdir $cwd; # import to main:: no strict 'refs'; *{'main::WriteMakefile'} = \&Write if caller(0) eq 'main'; return (@Existing, @Missing); } sub _running_under { my $thing = shift; print <<"END_MESSAGE"; *** Since we're running under ${thing}, I'll just let it take care of the dependency's installation later. END_MESSAGE return 1; } # Check to see if we are currently running under CPAN.pm and/or CPANPLUS; # if we are, then we simply let it taking care of our dependencies sub _check_lock { return unless @Missing or @_; if ($ENV{PERL5_CPANM_IS_RUNNING}) { return _running_under('cpanminus'); } my $cpan_env = $ENV{PERL5_CPAN_IS_RUNNING}; if ($ENV{PERL5_CPANPLUS_IS_RUNNING}) { return _running_under($cpan_env ? 'CPAN' : 'CPANPLUS'); } require CPAN; if ($CPAN::VERSION > '1.89') { if ($cpan_env) { return _running_under('CPAN'); } return; # CPAN.pm new enough, don't need to check further } # last ditch attempt, this -will- configure CPAN, very sorry _load_cpan(1); # force initialize even though it's already loaded # Find the CPAN lock-file my $lock = MM->catfile( $CPAN::Config->{cpan_home}, ".lock" ); return unless -f $lock; # Check the lock local *LOCK; return unless open(LOCK, $lock); if ( ( $^O eq 'MSWin32' ? _under_cpan() : == getppid() ) and ( $CPAN::Config->{prerequisites_policy} || '' ) ne 'ignore' ) { print <<'END_MESSAGE'; *** Since we're running under CPAN, I'll just let it take care of the dependency's installation later. END_MESSAGE return 1; } close LOCK; return; } sub install { my $class = shift; my $i; # used below to strip leading '-' from config keys my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } ); my ( @modules, @installed ); while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) { # grep out those already installed if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { push @installed, $pkg; } else { push @modules, $pkg, $ver; } } if ($UpgradeDeps) { push @modules, @installed; @installed = (); } return @installed unless @modules; # nothing to do return @installed if _check_lock(); # defer to the CPAN shell print "*** Installing dependencies...\n"; return unless _connected_to('cpan.org'); my %args = @config; my %failed; local *FAILED; if ( $args{do_once} and open( FAILED, '.#autoinstall.failed' ) ) { while () { chomp; $failed{$_}++ } close FAILED; my @newmod; while ( my ( $k, $v ) = splice( @modules, 0, 2 ) ) { push @newmod, ( $k => $v ) unless $failed{$k}; } @modules = @newmod; } if ( _has_cpanplus() and not $ENV{PERL_AUTOINSTALL_PREFER_CPAN} ) { _install_cpanplus( \@modules, \@config ); } else { _install_cpan( \@modules, \@config ); } print "*** $class installation finished.\n"; # see if we have successfully installed them while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { if ( _version_cmp( _version_of($pkg), $ver ) >= 0 ) { push @installed, $pkg; } elsif ( $args{do_once} and open( FAILED, '>> .#autoinstall.failed' ) ) { print FAILED "$pkg\n"; } } close FAILED if $args{do_once}; return @installed; } sub _install_cpanplus { my @modules = @{ +shift }; my @config = _cpanplus_config( @{ +shift } ); my $installed = 0; require CPANPLUS::Backend; my $cp = CPANPLUS::Backend->new; my $conf = $cp->configure_object; return unless $conf->can('conf') # 0.05x+ with "sudo" support or _can_write($conf->_get_build('base')); # 0.04x # if we're root, set UNINST=1 to avoid trouble unless user asked for it. my $makeflags = $conf->get_conf('makeflags') || ''; if ( UNIVERSAL::isa( $makeflags, 'HASH' ) ) { # 0.03+ uses a hashref here $makeflags->{UNINST} = 1 unless exists $makeflags->{UNINST}; } else { # 0.02 and below uses a scalar $makeflags = join( ' ', split( ' ', $makeflags ), 'UNINST=1' ) if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } ); } $conf->set_conf( makeflags => $makeflags ); $conf->set_conf( prereqs => 1 ); while ( my ( $key, $val ) = splice( @config, 0, 2 ) ) { $conf->set_conf( $key, $val ); } my $modtree = $cp->module_tree; while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { print "*** Installing $pkg...\n"; MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall; my $success; my $obj = $modtree->{$pkg}; if ( $obj and _version_cmp( $obj->{version}, $ver ) >= 0 ) { my $pathname = $pkg; $pathname =~ s/::/\\W/; foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) { delete $INC{$inc}; } my $rv = $cp->install( modules => [ $obj->{module} ] ); if ( $rv and ( $rv->{ $obj->{module} } or $rv->{ok} ) ) { print "*** $pkg successfully installed.\n"; $success = 1; } else { print "*** $pkg installation cancelled.\n"; $success = 0; } $installed += $success; } else { print << "."; *** Could not find a version $ver or above for $pkg; skipping. . } MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall; } return $installed; } sub _cpanplus_config { my @config = (); while ( @_ ) { my ($key, $value) = (shift(), shift()); if ( $key eq 'prerequisites_policy' ) { if ( $value eq 'follow' ) { $value = CPANPLUS::Internals::Constants::PREREQ_INSTALL(); } elsif ( $value eq 'ask' ) { $value = CPANPLUS::Internals::Constants::PREREQ_ASK(); } elsif ( $value eq 'ignore' ) { $value = CPANPLUS::Internals::Constants::PREREQ_IGNORE(); } else { die "*** Cannot convert option $key = '$value' to CPANPLUS version.\n"; } push @config, 'prereqs', $value; } elsif ( $key eq 'force' ) { push @config, $key, $value; } elsif ( $key eq 'notest' ) { push @config, 'skiptest', $value; } else { die "*** Cannot convert option $key to CPANPLUS version.\n"; } } return @config; } sub _install_cpan { my @modules = @{ +shift }; my @config = @{ +shift }; my $installed = 0; my %args; _load_cpan(); require Config; if (CPAN->VERSION < 1.80) { # no "sudo" support, probe for writableness return unless _can_write( MM->catfile( $CPAN::Config->{cpan_home}, 'sources' ) ) and _can_write( $Config::Config{sitelib} ); } # if we're root, set UNINST=1 to avoid trouble unless user asked for it. my $makeflags = $CPAN::Config->{make_install_arg} || ''; $CPAN::Config->{make_install_arg} = join( ' ', split( ' ', $makeflags ), 'UNINST=1' ) if ( $makeflags !~ /\bUNINST\b/ and eval qq{ $> eq '0' } ); # don't show start-up info $CPAN::Config->{inhibit_startup_message} = 1; # set additional options while ( my ( $opt, $arg ) = splice( @config, 0, 2 ) ) { ( $args{$opt} = $arg, next ) if $opt =~ /^(?:force|notest)$/; # pseudo-option $CPAN::Config->{$opt} = $arg; } if ($args{notest} && (not CPAN::Shell->can('notest'))) { die "Your version of CPAN is too old to support the 'notest' pragma"; } local $CPAN::Config->{prerequisites_policy} = 'follow'; while ( my ( $pkg, $ver ) = splice( @modules, 0, 2 ) ) { MY::preinstall( $pkg, $ver ) or next if defined &MY::preinstall; print "*** Installing $pkg...\n"; my $obj = CPAN::Shell->expand( Module => $pkg ); my $success = 0; if ( $obj and _version_cmp( $obj->cpan_version, $ver ) >= 0 ) { my $pathname = $pkg; $pathname =~ s/::/\\W/; foreach my $inc ( grep { m/$pathname.pm/i } keys(%INC) ) { delete $INC{$inc}; } my $rv = do { if ($args{force}) { CPAN::Shell->force( install => $pkg ) } elsif ($args{notest}) { CPAN::Shell->notest( install => $pkg ) } else { CPAN::Shell->install($pkg) } }; $rv ||= eval { $CPAN::META->instance( 'CPAN::Distribution', $obj->cpan_file, ) ->{install} if $CPAN::META; }; if ( $rv eq 'YES' ) { print "*** $pkg successfully installed.\n"; $success = 1; } else { print "*** $pkg installation failed.\n"; $success = 0; } $installed += $success; } else { print << "."; *** Could not find a version $ver or above for $pkg; skipping. . } MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall; } return $installed; } sub _has_cpanplus { return ( $HasCPANPLUS = ( $INC{'CPANPLUS/Config.pm'} or _load('CPANPLUS::Shell::Default') ) ); } # make guesses on whether we're under the CPAN installation directory sub _under_cpan { require Cwd; require File::Spec; my $cwd = File::Spec->canonpath( Cwd::cwd() ); my $cpan = File::Spec->canonpath( $CPAN::Config->{cpan_home} ); return ( index( $cwd, $cpan ) > -1 ); } sub _update_to { my $class = __PACKAGE__; my $ver = shift; return if _version_cmp( _version_of($class), $ver ) >= 0; # no need to upgrade if ( _prompt( "==> A newer version of $class ($ver) is required. Install?", 'y' ) =~ /^[Nn]/ ) { die "*** Please install $class $ver manually.\n"; } print << "."; *** Trying to fetch it from CPAN... . # install ourselves _load($class) and return $class->import(@_) if $class->install( [], $class, $ver ); print << '.'; exit 1; *** Cannot bootstrap myself. :-( Installation terminated. . } # check if we're connected to some host, using inet_aton sub _connected_to { my $site = shift; return ( ( _load('Socket') and Socket::inet_aton($site) ) or _prompt( qq( *** Your host cannot resolve the domain name '$site', which probably means the Internet connections are unavailable. ==> Should we try to install the required module(s) anyway?), 'n' ) =~ /^[Yy]/ ); } # check if a directory is writable; may create it on demand sub _can_write { my $path = shift; mkdir( $path, 0755 ) unless -e $path; return 1 if -w $path; print << "."; *** You are not allowed to write to the directory '$path'; the installation may fail due to insufficient permissions. . if ( eval '$>' and lc(`sudo -V`) =~ /version/ and _prompt( qq( ==> Should we try to re-execute the autoinstall process with 'sudo'?), ((-t STDIN) ? 'y' : 'n') ) =~ /^[Yy]/ ) { # try to bootstrap ourselves from sudo print << "."; *** Trying to re-execute the autoinstall process with 'sudo'... . my $missing = join( ',', @Missing ); my $config = join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) if $Config; return unless system( 'sudo', $^X, $0, "--config=$config", "--installdeps=$missing" ); print << "."; *** The 'sudo' command exited with error! Resuming... . } return _prompt( qq( ==> Should we try to install the required module(s) anyway?), 'n' ) =~ /^[Yy]/; } # load a module and return the version it reports sub _load { my $mod = pop; # method/function doesn't matter my $file = $mod; $file =~ s|::|/|g; $file .= '.pm'; local $@; return eval { require $file; $mod->VERSION } || ( $@ ? undef: 0 ); } # report version without loading a module sub _version_of { my $mod = pop; # method/function doesn't matter my $file = $mod; $file =~ s|::|/|g; $file .= '.pm'; foreach my $dir ( @INC ) { next if ref $dir; my $path = File::Spec->catfile($dir, $file); next unless -e $path; require ExtUtils::MM_Unix; return ExtUtils::MM_Unix->parse_version($path); } return undef; } # Load CPAN.pm and it's configuration sub _load_cpan { return if $CPAN::VERSION and $CPAN::Config and not @_; require CPAN; # CPAN-1.82+ adds CPAN::Config::AUTOLOAD to redirect to # CPAN::HandleConfig->load. CPAN reports that the redirection # is deprecated in a warning printed at the user. # CPAN-1.81 expects CPAN::HandleConfig->load, does not have # $CPAN::HandleConfig::VERSION but cannot handle # CPAN::Config->load # Which "versions expect CPAN::Config->load? if ( $CPAN::HandleConfig::VERSION || CPAN::HandleConfig->can('load') ) { # Newer versions of CPAN have a HandleConfig module CPAN::HandleConfig->load; } else { # Older versions had the load method in Config directly CPAN::Config->load; } } # compare two versions, either use Sort::Versions or plain comparison # return values same as <=> sub _version_cmp { my ( $cur, $min ) = @_; return -1 unless defined $cur; # if 0 keep comparing return 1 unless $min; $cur =~ s/\s+$//; # check for version numbers that are not in decimal format if ( ref($cur) or ref($min) or $cur =~ /v|\..*\./ or $min =~ /v|\..*\./ ) { if ( ( $version::VERSION or defined( _load('version') )) and version->can('new') ) { # use version.pm if it is installed. return version->new($cur) <=> version->new($min); } elsif ( $Sort::Versions::VERSION or defined( _load('Sort::Versions') ) ) { # use Sort::Versions as the sorting algorithm for a.b.c versions return Sort::Versions::versioncmp( $cur, $min ); } warn "Cannot reliably compare non-decimal formatted versions.\n" . "Please install version.pm or Sort::Versions.\n"; } # plain comparison local $^W = 0; # shuts off 'not numeric' bugs return $cur <=> $min; } # nothing; this usage is deprecated. sub main::PREREQ_PM { return {}; } sub _make_args { my %args = @_; $args{PREREQ_PM} = { %{ $args{PREREQ_PM} || {} }, @Existing, @Missing } if $UnderCPAN or $TestOnly; if ( $args{EXE_FILES} and -e 'MANIFEST' ) { require ExtUtils::Manifest; my $manifest = ExtUtils::Manifest::maniread('MANIFEST'); $args{EXE_FILES} = [ grep { exists $manifest->{$_} } @{ $args{EXE_FILES} } ]; } $args{test}{TESTS} ||= 't/*.t'; $args{test}{TESTS} = join( ' ', grep { !exists( $DisabledTests{$_} ) } map { glob($_) } split( /\s+/, $args{test}{TESTS} ) ); my $missing = join( ',', @Missing ); my $config = join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} ) if $Config; $PostambleActions = ( ($missing and not $UnderCPAN) ? "\$(PERL) $0 --config=$config --installdeps=$missing" : "\$(NOECHO) \$(NOOP)" ); my $deps_list = join( ',', @Missing, @Existing ); $PostambleActionsUpgradeDeps = "\$(PERL) $0 --config=$config --upgradedeps=$deps_list"; my $config_notest = join( ',', (UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config}), 'notest', 1 ) if $Config; $PostambleActionsNoTest = ( ($missing and not $UnderCPAN) ? "\$(PERL) $0 --config=$config_notest --installdeps=$missing" : "\$(NOECHO) \$(NOOP)" ); $PostambleActionsUpgradeDepsNoTest = "\$(PERL) $0 --config=$config_notest --upgradedeps=$deps_list"; $PostambleActionsListDeps = '@$(PERL) -le "print for @ARGV" ' . join(' ', map $Missing[$_], grep $_ % 2 == 0, 0..$#Missing); my @all = (@Missing, @Existing); $PostambleActionsListAllDeps = '@$(PERL) -le "print for @ARGV" ' . join(' ', map $all[$_], grep $_ % 2 == 0, 0..$#all); return %args; } # a wrapper to ExtUtils::MakeMaker::WriteMakefile sub Write { require Carp; Carp::croak "WriteMakefile: Need even number of args" if @_ % 2; if ($CheckOnly) { print << "."; *** Makefile not written in check-only mode. . return; } my %args = _make_args(@_); no strict 'refs'; $PostambleUsed = 0; local *MY::postamble = \&postamble unless defined &MY::postamble; ExtUtils::MakeMaker::WriteMakefile(%args); print << "." unless $PostambleUsed; *** WARNING: Makefile written with customized MY::postamble() without including contents from Module::AutoInstall::postamble() -- auto installation features disabled. Please contact the author. . return 1; } sub postamble { $PostambleUsed = 1; my $fragment; $fragment .= <<"AUTO_INSTALL" if !$InstallDepsTarget; config :: installdeps \t\$(NOECHO) \$(NOOP) AUTO_INSTALL $fragment .= <<"END_MAKE"; checkdeps :: \t\$(PERL) $0 --checkdeps installdeps :: \t$PostambleActions installdeps_notest :: \t$PostambleActionsNoTest upgradedeps :: \t$PostambleActionsUpgradeDeps upgradedeps_notest :: \t$PostambleActionsUpgradeDepsNoTest listdeps :: \t$PostambleActionsListDeps listalldeps :: \t$PostambleActionsListAllDeps END_MAKE return $fragment; } 1; __END__ #line 1193 RDF-Closure-0.001/inc/Module/Package.pm0000644000076400007640000000311411773064341015557 0ustar taitai#line 1 ## # name: Module::Package # abstract: Postmodern Perl Module Packaging # author: Ingy döt Net # license: perl # copyright: 2011 # see: # - Module::Package::Plugin # - Module::Install::Package # - Module::Package::Tutorial package Module::Package; use 5.005; use strict; BEGIN { $Module::Package::VERSION = '0.30'; $inc::Module::Package::VERSION ||= $Module::Package::VERSION; @inc::Module::Package::ISA = __PACKAGE__; } sub import { my $class = shift; $INC{'inc/Module/Install.pm'} = __FILE__; unshift @INC, 'inc' unless $INC[0] eq 'inc'; eval "use Module::Install 1.01 (); 1" or $class->error($@); package main; Module::Install->import(); eval { module_package_internals_version_check($Module::Package::VERSION); module_package_internals_init(@_); }; if ($@) { $Module::Package::ERROR = $@; die $@; } } # XXX Remove this when things are stable. sub error { my ($class, $error) = @_; if (-e 'inc' and not -e 'inc/.author') { require Data::Dumper; $Data::Dumper::Sortkeys = 1; my $dump1 = Data::Dumper::Dumper(\%INC); my $dump2 = Data::Dumper::Dumper(\@INC); die <<"..."; This should not have happened. Hopefully this dump will explain the problem: inc::Module::Package: $inc::Module::Package::VERSION Module::Package: $Module::Package::VERSION inc::Module::Install: $inc::Module::Install::VERSION Module::Install: $Module::Install::VERSION Error: $error %INC: $dump1 \@INC: $dump2 ... } else { die $error; } } 1; RDF-Closure-0.001/inc/Module/Install/0000755000076400007640000000000011773065330015274 5ustar taitaiRDF-Closure-0.001/inc/Module/Install/Fetch.pm0000644000076400007640000000462711773064337016702 0ustar taitai#line 1 package Module::Install::Fetch; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub get_file { my ($self, %args) = @_; my ($scheme, $host, $path, $file) = $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) { $args{url} = $args{ftp_url} or (warn("LWP support unavailable!\n"), return); ($scheme, $host, $path, $file) = $args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return; } $|++; print "Fetching '$file' from $host... "; unless (eval { require Socket; Socket::inet_aton($host) }) { warn "'$host' resolve failed!\n"; return; } return unless $scheme eq 'ftp' or $scheme eq 'http'; require Cwd; my $dir = Cwd::getcwd(); chdir $args{local_dir} or return if exists $args{local_dir}; if (eval { require LWP::Simple; 1 }) { LWP::Simple::mirror($args{url}, $file); } elsif (eval { require Net::FTP; 1 }) { eval { # use Net::FTP to get past firewall my $ftp = Net::FTP->new($host, Passive => 1, Timeout => 600); $ftp->login("anonymous", 'anonymous@example.com'); $ftp->cwd($path); $ftp->binary; $ftp->get($file) or (warn("$!\n"), return); $ftp->quit; } } elsif (my $ftp = $self->can_run('ftp')) { eval { # no Net::FTP, fallback to ftp.exe require FileHandle; my $fh = FileHandle->new; local $SIG{CHLD} = 'IGNORE'; unless ($fh->open("|$ftp -n")) { warn "Couldn't open ftp: $!\n"; chdir $dir; return; } my @dialog = split(/\n/, <<"END_FTP"); open $host user anonymous anonymous\@example.com cd $path binary get $file $file quit END_FTP foreach (@dialog) { $fh->print("$_\n") } $fh->close; } } else { warn "No working 'ftp' program available!\n"; chdir $dir; return; } unless (-f $file) { warn "Fetching failed: $@\n"; chdir $dir; return; } return if exists $args{size} and -s $file != $args{size}; system($args{run}) if exists $args{run}; unlink($file) if $args{remove}; print(((!exists $args{check_for} or -e $args{check_for}) ? "done!" : "failed! ($!)"), "\n"); chdir $dir; return !$?; } 1; RDF-Closure-0.001/inc/Module/Install/AutoInstall.pm0000644000076400007640000000416211773064336020101 0ustar taitai#line 1 package Module::Install::AutoInstall; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub AutoInstall { $_[0] } sub run { my $self = shift; $self->auto_install_now(@_); } sub write { my $self = shift; $self->auto_install(@_); } sub auto_install { my $self = shift; return if $self->{done}++; # Flatten array of arrays into a single array my @core = map @$_, map @$_, grep ref, $self->build_requires, $self->requires; my @config = @_; # We'll need Module::AutoInstall $self->include('Module::AutoInstall'); require Module::AutoInstall; my @features_require = Module::AutoInstall->import( (@config ? (-config => \@config) : ()), (@core ? (-core => \@core) : ()), $self->features, ); my %seen; my @requires = map @$_, map @$_, grep ref, $self->requires; while (my ($mod, $ver) = splice(@requires, 0, 2)) { $seen{$mod}{$ver}++; } my @build_requires = map @$_, map @$_, grep ref, $self->build_requires; while (my ($mod, $ver) = splice(@build_requires, 0, 2)) { $seen{$mod}{$ver}++; } my @configure_requires = map @$_, map @$_, grep ref, $self->configure_requires; while (my ($mod, $ver) = splice(@configure_requires, 0, 2)) { $seen{$mod}{$ver}++; } my @deduped; while (my ($mod, $ver) = splice(@features_require, 0, 2)) { push @deduped, $mod => $ver unless $seen{$mod}{$ver}++; } $self->requires(@deduped); $self->makemaker_args( Module::AutoInstall::_make_args() ); my $class = ref($self); $self->postamble( "# --- $class section:\n" . Module::AutoInstall::postamble() ); } sub installdeps_target { my ($self, @args) = @_; $self->include('Module::AutoInstall'); require Module::AutoInstall; Module::AutoInstall::_installdeps_target(1); $self->auto_install(@args); } sub auto_install_now { my $self = shift; $self->auto_install(@_); Module::AutoInstall::do_install(); } 1; RDF-Closure-0.001/inc/Module/Install/Package.pm0000644000076400007640000002340511773064331017171 0ustar taitai#line 1 ## # name: Module::Install::Package # abstract: Module::Install support for Module::Package # author: Ingy döt Net # license: perl # copyright: 2011 # see: # - Module::Package # This module contains the Module::Package logic that must be available to # both the Author and the End User. Author-only logic goes in a # Module::Package::Plugin subclass. package Module::Install::Package; use strict; use Module::Install::Base; use vars qw'@ISA $VERSION'; @ISA = 'Module::Install::Base'; $VERSION = '0.30'; #-----------------------------------------------------------------------------# # XXX BOOTBUGHACK # This is here to try to get us out of Module-Package-0.11 cpantesters hell... # Remove this when the situation has blown over. sub pkg { *inc::Module::Package::VERSION = sub { $VERSION }; my $self = shift; $self->module_package_internals_init($@); } #-----------------------------------------------------------------------------# # We allow the author to specify key/value options after the plugin. These # options need to be available both at author time and install time. #-----------------------------------------------------------------------------# # OO accessor for command line options: sub package_options { @_>1?($_[0]->{package_options}=$_[1]):$_[0]->{package_options}} my $default_options = { deps_list => 1, install_bin => 1, install_share => 1, manifest_skip => 1, requires_from => 1, }; #-----------------------------------------------------------------------------# # Module::Install plugin directives. Use long, ugly names to not pollute the # Module::Install plugin namespace. These are only intended to be called from # Module::Package. #-----------------------------------------------------------------------------# # Module::Package starts off life as a normal call to this Module::Install # plugin directive: my $module_install_plugin; my $module_package_plugin; my $module_package_dist_plugin; # XXX ARGVHACK This @argv thing is a temporary fix for an ugly bug somewhere in the # Wikitext module usage. my @argv; sub module_package_internals_init { my $self = $module_install_plugin = shift; my ($plugin_spec, %options) = @_; $self->package_options({%$default_options, %options}); if ($module_install_plugin->is_admin) { $module_package_plugin = $self->_load_plugin($plugin_spec); $module_package_plugin->mi($module_install_plugin); $module_package_plugin->version_check($VERSION); } else { $module_package_dist_plugin = $self->_load_dist_plugin($plugin_spec); $module_package_dist_plugin->mi($module_install_plugin) if ref $module_package_dist_plugin; } # NOTE - This is the point in time where the body of Makefile.PL runs... return; sub INIT { return unless $module_install_plugin; return if $Module::Package::ERROR; eval { if ($module_install_plugin->is_admin) { $module_package_plugin->initial(); $module_package_plugin->main(); } else { $module_install_plugin->_initial(); $module_package_dist_plugin->_initial() if ref $module_package_dist_plugin; $module_install_plugin->_main(); $module_package_dist_plugin->_main() if ref $module_package_dist_plugin; } }; if ($@) { $Module::Package::ERROR = $@; die $@; } @argv = @ARGV; # XXX ARGVHACK } # If this Module::Install plugin was used (by Module::Package) then wrap # up any loose ends. This will get called after Makefile.PL has completed. sub END { @ARGV = @argv; # XXX ARGVHACK return unless $module_install_plugin; return if $Module::Package::ERROR; $module_package_plugin ? do { $module_package_plugin->final; $module_package_plugin->replicate_module_package; } : do { $module_install_plugin->_final; $module_package_dist_plugin->_final() if ref $module_package_dist_plugin; } } } # Module::Package, Module::Install::Package and Module::Package::Plugin # must all have the same version. Seems wise. sub module_package_internals_version_check { my ($self, $version) = @_; return if $version < 0.1800001; # XXX BOOTBUGHACK!! die <<"..." unless $version == $VERSION; Error! Something has gone awry: Module::Package version=$version is using Module::Install::Package version=$VERSION If you are the author of this module, try upgrading Module::Package. Otherwise, please notify the author of this error. ... } # Find and load the author side plugin: sub _load_plugin { my ($self, $spec, $namespace) = @_; $spec ||= ''; $namespace ||= 'Module::Package'; my $version = ''; $Module::Package::plugin_version = 0; if ($spec =~ s/\s+(\S+)\s*//) { $version = $1; $Module::Package::plugin_version = $version; } my ($module, $plugin) = not($spec) ? ('Plugin', "Plugin::basic") : ($spec =~ /^\w(\w|::)*$/) ? ($spec, $spec) : ($spec =~ /^:(\w+)$/) ? ('Plugin', "Plugin::$1") : ($spec =~ /^(\S*\w):(\w+)$/) ? ($1, "$1::$2") : die "$spec is invalid"; $module = "${namespace}::${module}"; $plugin = "${namespace}::${plugin}"; eval "use $module $version (); 1" or die $@; return $plugin->new(); } # Find and load the user side plugin: sub _load_dist_plugin { my ($self, $spec, $namespace) = @_; $spec ||= ''; $namespace ||= 'Module::Package::Dist'; my $r = eval { $self->_load_plugin($spec, $namespace); }; return $r if ref $r; return; } #-----------------------------------------------------------------------------# # These are the user side analogs to the author side plugin API calls. # Prefix with '_' to not pollute Module::Install plugin space. #-----------------------------------------------------------------------------# sub _initial { my ($self) = @_; } sub _main { my ($self) = @_; } # NOTE These must match Module::Package::Plugin::final. sub _final { my ($self) = @_; $self->_all_from; $self->_requires_from; $self->_install_bin; $self->_install_share; $self->_WriteAll; } #-----------------------------------------------------------------------------# # This section is where all the useful code bits go. These bits are needed by # both Author and User side runs. #-----------------------------------------------------------------------------# my $all_from = 0; sub _all_from { my $self = shift; return if $all_from++; return if $self->name; my $file = shift || "$main::PM" or die "all_from has no file"; $self->all_from($file); } my $requires_from = 0; sub _requires_from { my $self = shift; return if $requires_from++; return unless $self->package_options->{requires_from}; my $file = shift || "$main::PM" or die "requires_from has no file"; $self->requires_from($main::PM) } my $install_bin = 0; sub _install_bin { my $self = shift; return if $install_bin++; return unless $self->package_options->{install_bin}; return unless -d 'bin'; my @bin; File::Find::find(sub { return unless -f $_; push @bin, $File::Find::name; }, 'bin'); $self->install_script($_) for @bin; } my $install_share = 0; sub _install_share { my $self = shift; return if $install_share++; return unless $self->package_options->{install_share}; return unless -d 'share'; $self->install_share; } my $WriteAll = 0; sub _WriteAll { my $self = shift; return if $WriteAll++; $self->WriteAll(@_); } # Base package for Module::Package plugin distributed components. package Module::Package::Dist; sub new { my ($class, %args) = @_; bless \%args, $class; } sub mi { @_ > 1 ? ($_[0]->{mi}=$_[1]) : $_[0]->{mi}; } sub _initial { my ($self) = @_; } sub _main { my ($self) = @_; } sub _final { my ($self) = @_; } 1; #-----------------------------------------------------------------------------# # Take a guess at the primary .pm and .pod files for 'all_from', and friends. # Put them in global magical vars in the main:: namespace. #-----------------------------------------------------------------------------# package Module::Package::PM; use overload '""' => sub { $_[0]->guess_pm unless @{$_[0]}; return $_[0]->[0]; }; sub set { $_[0]->[0] = $_[1] } sub guess_pm { my $pm = ''; my $self = shift; if (-e 'META.yml') { open META, 'META.yml' or die "Can't open 'META.yml' for input:\n$!"; my $meta = do { local $/; }; close META; $meta =~ /^module_name: (\S+)$/m or die "Can't get module_name from META.yml"; $pm = $1; $pm =~ s!::!/!g; $pm = "lib/$pm.pm"; } else { require File::Find; my @array = (); File::Find::find(sub { return unless /\.pm$/; my $name = $File::Find::name; my $num = ($name =~ s!/+!/!g); my $ary = $array[$num] ||= []; push @$ary, $name; }, 'lib'); shift @array while @array and not defined $array[0]; die "Can't guess main module" unless @array; (($pm) = sort @{$array[0]}) or die "Can't guess main module"; } my $pmc = $pm . 'c'; $pm = $pmc if -e $pmc; $self->set($pm); } $main::PM = bless [$main::PM ? ($main::PM) : ()], __PACKAGE__; package Module::Package::POD; use overload '""' => sub { return $_[0]->[0] if @{$_[0]}; (my $pod = "$main::PM") =~ s/\.pm/.pod/ or die "Module::Package's \$main::PM value should end in '.pm'"; return -e $pod ? $pod : ''; }; sub set { $_[0][0] = $_[1] } $main::POD = bless [$main::POD ? ($main::POD) : ()], __PACKAGE__; 1; RDF-Closure-0.001/inc/Module/Install/Win32.pm0000644000076400007640000000340311773064337016542 0ustar taitai#line 1 package Module::Install::Win32; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } # determine if the user needs nmake, and download it if needed sub check_nmake { my $self = shift; $self->load('can_run'); $self->load('get_file'); require Config; return unless ( $^O eq 'MSWin32' and $Config::Config{make} and $Config::Config{make} =~ /^nmake\b/i and ! $self->can_run('nmake') ); print "The required 'nmake' executable not found, fetching it...\n"; require File::Basename; my $rv = $self->get_file( url => 'http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe', ftp_url => 'ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe', local_dir => File::Basename::dirname($^X), size => 51928, run => 'Nmake15.exe /o > nul', check_for => 'Nmake.exe', remove => 1, ); die <<'END_MESSAGE' unless $rv; ------------------------------------------------------------------------------- Since you are using Microsoft Windows, you will need the 'nmake' utility before installation. It's available at: http://download.microsoft.com/download/vc15/Patch/1.52/W95/EN-US/Nmake15.exe or ftp://ftp.microsoft.com/Softlib/MSLFILES/Nmake15.exe Please download the file manually, save it to a directory in %PATH% (e.g. C:\WINDOWS\COMMAND\), then launch the MS-DOS command line shell, "cd" to that directory, and run "Nmake15.exe" from there; that will create the 'nmake.exe' file needed by this module. You may then resume the installation process described in README. ------------------------------------------------------------------------------- END_MESSAGE } 1; RDF-Closure-0.001/inc/Module/Install/Makefile.pm0000644000076400007640000002743711773064334017367 0ustar taitai#line 1 package Module::Install::Makefile; use strict 'vars'; use ExtUtils::MakeMaker (); use Module::Install::Base (); use Fcntl qw/:flock :seek/; use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub Makefile { $_[0] } my %seen = (); sub prompt { shift; # Infinite loop protection my @c = caller(); if ( ++$seen{"$c[1]|$c[2]|$_[0]"} > 3 ) { die "Caught an potential prompt infinite loop ($c[1]|$c[2]|$_[0])"; } # In automated testing or non-interactive session, always use defaults if ( ($ENV{AUTOMATED_TESTING} or -! -t STDIN) and ! $ENV{PERL_MM_USE_DEFAULT} ) { local $ENV{PERL_MM_USE_DEFAULT} = 1; goto &ExtUtils::MakeMaker::prompt; } else { goto &ExtUtils::MakeMaker::prompt; } } # Store a cleaned up version of the MakeMaker version, # since we need to behave differently in a variety of # ways based on the MM version. my $makemaker = eval $ExtUtils::MakeMaker::VERSION; # If we are passed a param, do a "newer than" comparison. # Otherwise, just return the MakeMaker version. sub makemaker { ( @_ < 2 or $makemaker >= eval($_[1]) ) ? $makemaker : 0 } # Ripped from ExtUtils::MakeMaker 6.56, and slightly modified # as we only need to know here whether the attribute is an array # or a hash or something else (which may or may not be appendable). my %makemaker_argtype = ( C => 'ARRAY', CONFIG => 'ARRAY', # CONFIGURE => 'CODE', # ignore DIR => 'ARRAY', DL_FUNCS => 'HASH', DL_VARS => 'ARRAY', EXCLUDE_EXT => 'ARRAY', EXE_FILES => 'ARRAY', FUNCLIST => 'ARRAY', H => 'ARRAY', IMPORTS => 'HASH', INCLUDE_EXT => 'ARRAY', LIBS => 'ARRAY', # ignore '' MAN1PODS => 'HASH', MAN3PODS => 'HASH', META_ADD => 'HASH', META_MERGE => 'HASH', PL_FILES => 'HASH', PM => 'HASH', PMLIBDIRS => 'ARRAY', PMLIBPARENTDIRS => 'ARRAY', PREREQ_PM => 'HASH', CONFIGURE_REQUIRES => 'HASH', SKIP => 'ARRAY', TYPEMAPS => 'ARRAY', XS => 'HASH', # VERSION => ['version',''], # ignore # _KEEP_AFTER_FLUSH => '', clean => 'HASH', depend => 'HASH', dist => 'HASH', dynamic_lib=> 'HASH', linkext => 'HASH', macro => 'HASH', postamble => 'HASH', realclean => 'HASH', test => 'HASH', tool_autosplit => 'HASH', # special cases where you can use makemaker_append CCFLAGS => 'APPENDABLE', DEFINE => 'APPENDABLE', INC => 'APPENDABLE', LDDLFLAGS => 'APPENDABLE', LDFROM => 'APPENDABLE', ); sub makemaker_args { my ($self, %new_args) = @_; my $args = ( $self->{makemaker_args} ||= {} ); foreach my $key (keys %new_args) { if ($makemaker_argtype{$key}) { if ($makemaker_argtype{$key} eq 'ARRAY') { $args->{$key} = [] unless defined $args->{$key}; unless (ref $args->{$key} eq 'ARRAY') { $args->{$key} = [$args->{$key}] } push @{$args->{$key}}, ref $new_args{$key} eq 'ARRAY' ? @{$new_args{$key}} : $new_args{$key}; } elsif ($makemaker_argtype{$key} eq 'HASH') { $args->{$key} = {} unless defined $args->{$key}; foreach my $skey (keys %{ $new_args{$key} }) { $args->{$key}{$skey} = $new_args{$key}{$skey}; } } elsif ($makemaker_argtype{$key} eq 'APPENDABLE') { $self->makemaker_append($key => $new_args{$key}); } } else { if (defined $args->{$key}) { warn qq{MakeMaker attribute "$key" is overriden; use "makemaker_append" to append values\n}; } $args->{$key} = $new_args{$key}; } } return $args; } # For mm args that take multiple space-seperated args, # append an argument to the current list. sub makemaker_append { my $self = shift; my $name = shift; my $args = $self->makemaker_args; $args->{$name} = defined $args->{$name} ? join( ' ', $args->{$name}, @_ ) : join( ' ', @_ ); } sub build_subdirs { my $self = shift; my $subdirs = $self->makemaker_args->{DIR} ||= []; for my $subdir (@_) { push @$subdirs, $subdir; } } sub clean_files { my $self = shift; my $clean = $self->makemaker_args->{clean} ||= {}; %$clean = ( %$clean, FILES => join ' ', grep { length $_ } ($clean->{FILES} || (), @_), ); } sub realclean_files { my $self = shift; my $realclean = $self->makemaker_args->{realclean} ||= {}; %$realclean = ( %$realclean, FILES => join ' ', grep { length $_ } ($realclean->{FILES} || (), @_), ); } sub libs { my $self = shift; my $libs = ref $_[0] ? shift : [ shift ]; $self->makemaker_args( LIBS => $libs ); } sub inc { my $self = shift; $self->makemaker_args( INC => shift ); } sub _wanted_t { } sub tests_recursive { my $self = shift; my $dir = shift || 't'; unless ( -d $dir ) { die "tests_recursive dir '$dir' does not exist"; } my %tests = map { $_ => 1 } split / /, ($self->tests || ''); require File::Find; File::Find::find( sub { /\.t$/ and -f $_ and $tests{"$File::Find::dir/*.t"} = 1 }, $dir ); $self->tests( join ' ', sort keys %tests ); } sub write { my $self = shift; die "&Makefile->write() takes no arguments\n" if @_; # Check the current Perl version my $perl_version = $self->perl_version; if ( $perl_version ) { eval "use $perl_version; 1" or die "ERROR: perl: Version $] is installed, " . "but we need version >= $perl_version"; } # Make sure we have a new enough MakeMaker require ExtUtils::MakeMaker; if ( $perl_version and $self->_cmp($perl_version, '5.006') >= 0 ) { # This previous attempted to inherit the version of # ExtUtils::MakeMaker in use by the module author, but this # was found to be untenable as some authors build releases # using future dev versions of EU:MM that nobody else has. # Instead, #toolchain suggests we use 6.59 which is the most # stable version on CPAN at time of writing and is, to quote # ribasushi, "not terminally fucked, > and tested enough". # TODO: We will now need to maintain this over time to push # the version up as new versions are released. $self->build_requires( 'ExtUtils::MakeMaker' => 6.59 ); $self->configure_requires( 'ExtUtils::MakeMaker' => 6.59 ); } else { # Allow legacy-compatibility with 5.005 by depending on the # most recent EU:MM that supported 5.005. $self->build_requires( 'ExtUtils::MakeMaker' => 6.36 ); $self->configure_requires( 'ExtUtils::MakeMaker' => 6.36 ); } # Generate the MakeMaker params my $args = $self->makemaker_args; $args->{DISTNAME} = $self->name; $args->{NAME} = $self->module_name || $self->name; $args->{NAME} =~ s/-/::/g; $args->{VERSION} = $self->version or die <<'EOT'; ERROR: Can't determine distribution version. Please specify it explicitly via 'version' in Makefile.PL, or set a valid $VERSION in a module, and provide its file path via 'version_from' (or 'all_from' if you prefer) in Makefile.PL. EOT if ( $self->tests ) { my @tests = split ' ', $self->tests; my %seen; $args->{test} = { TESTS => (join ' ', grep {!$seen{$_}++} @tests), }; } elsif ( $Module::Install::ExtraTests::use_extratests ) { # Module::Install::ExtraTests doesn't set $self->tests and does its own tests via harness. # So, just ignore our xt tests here. } elsif ( -d 'xt' and ($Module::Install::AUTHOR or $ENV{RELEASE_TESTING}) ) { $args->{test} = { TESTS => join( ' ', map { "$_/*.t" } grep { -d $_ } qw{ t xt } ), }; } if ( $] >= 5.005 ) { $args->{ABSTRACT} = $self->abstract; $args->{AUTHOR} = join ', ', @{$self->author || []}; } if ( $self->makemaker(6.10) ) { $args->{NO_META} = 1; #$args->{NO_MYMETA} = 1; } if ( $self->makemaker(6.17) and $self->sign ) { $args->{SIGN} = 1; } unless ( $self->is_admin ) { delete $args->{SIGN}; } if ( $self->makemaker(6.31) and $self->license ) { $args->{LICENSE} = $self->license; } my $prereq = ($args->{PREREQ_PM} ||= {}); %$prereq = ( %$prereq, map { @$_ } # flatten [module => version] map { @$_ } grep $_, ($self->requires) ); # Remove any reference to perl, PREREQ_PM doesn't support it delete $args->{PREREQ_PM}->{perl}; # Merge both kinds of requires into BUILD_REQUIRES my $build_prereq = ($args->{BUILD_REQUIRES} ||= {}); %$build_prereq = ( %$build_prereq, map { @$_ } # flatten [module => version] map { @$_ } grep $_, ($self->configure_requires, $self->build_requires) ); # Remove any reference to perl, BUILD_REQUIRES doesn't support it delete $args->{BUILD_REQUIRES}->{perl}; # Delete bundled dists from prereq_pm, add it to Makefile DIR my $subdirs = ($args->{DIR} || []); if ($self->bundles) { my %processed; foreach my $bundle (@{ $self->bundles }) { my ($mod_name, $dist_dir) = @$bundle; delete $prereq->{$mod_name}; $dist_dir = File::Basename::basename($dist_dir); # dir for building this module if (not exists $processed{$dist_dir}) { if (-d $dist_dir) { # List as sub-directory to be processed by make push @$subdirs, $dist_dir; } # Else do nothing: the module is already present on the system $processed{$dist_dir} = undef; } } } unless ( $self->makemaker('6.55_03') ) { %$prereq = (%$prereq,%$build_prereq); delete $args->{BUILD_REQUIRES}; } if ( my $perl_version = $self->perl_version ) { eval "use $perl_version; 1" or die "ERROR: perl: Version $] is installed, " . "but we need version >= $perl_version"; if ( $self->makemaker(6.48) ) { $args->{MIN_PERL_VERSION} = $perl_version; } } if ($self->installdirs) { warn qq{old INSTALLDIRS (probably set by makemaker_args) is overriden by installdirs\n} if $args->{INSTALLDIRS}; $args->{INSTALLDIRS} = $self->installdirs; } my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_} ) } keys %$args; my $user_preop = delete $args{dist}->{PREOP}; if ( my $preop = $self->admin->preop($user_preop) ) { foreach my $key ( keys %$preop ) { $args{dist}->{$key} = $preop->{$key}; } } my $mm = ExtUtils::MakeMaker::WriteMakefile(%args); $self->fix_up_makefile($mm->{FIRST_MAKEFILE} || 'Makefile'); } sub fix_up_makefile { my $self = shift; my $makefile_name = shift; my $top_class = ref($self->_top) || ''; my $top_version = $self->_top->VERSION || ''; my $preamble = $self->preamble ? "# Preamble by $top_class $top_version\n" . $self->preamble : ''; my $postamble = "# Postamble by $top_class $top_version\n" . ($self->postamble || ''); local *MAKEFILE; open MAKEFILE, "+< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!"; eval { flock MAKEFILE, LOCK_EX }; my $makefile = do { local $/; }; $makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /; $makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g; $makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g; $makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m; $makefile =~ s/^(PERL = .*)/$1 "-Iinc"/m; # Module::Install will never be used to build the Core Perl # Sometimes PERL_LIB and PERL_ARCHLIB get written anyway, which breaks # PREFIX/PERL5LIB, and thus, install_share. Blank them if they exist $makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m; #$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m; # Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well. $makefile =~ s/(\"?)-I\$\(PERL_LIB\)\1//g; # XXX - This is currently unused; not sure if it breaks other MM-users # $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg; seek MAKEFILE, 0, SEEK_SET; truncate MAKEFILE, 0; print MAKEFILE "$preamble$makefile$postamble" or die $!; close MAKEFILE or die $!; 1; } sub preamble { my ($self, $text) = @_; $self->{preamble} = $text . $self->{preamble} if defined $text; $self->{preamble}; } sub postamble { my ($self, $text) = @_; $self->{postamble} ||= $self->admin->postamble; $self->{postamble} .= $text if defined $text; $self->{postamble} } 1; __END__ #line 544 RDF-Closure-0.001/inc/Module/Install/Can.pm0000644000076400007640000000615711773064337016352 0ustar taitai#line 1 package Module::Install::Can; use strict; use Config (); use ExtUtils::MakeMaker (); use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } # check if we can load some module ### Upgrade this to not have to load the module if possible sub can_use { my ($self, $mod, $ver) = @_; $mod =~ s{::|\\}{/}g; $mod .= '.pm' unless $mod =~ /\.pm$/i; my $pkg = $mod; $pkg =~ s{/}{::}g; $pkg =~ s{\.pm$}{}i; local $@; eval { require $mod; $pkg->VERSION($ver || 0); 1 }; } # Check if we can run some command sub can_run { my ($self, $cmd) = @_; my $_cmd = $cmd; return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd)); for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') { next if $dir eq ''; require File::Spec; my $abs = File::Spec->catfile($dir, $cmd); return $abs if (-x $abs or $abs = MM->maybe_command($abs)); } return; } # Can our C compiler environment build XS files sub can_xs { my $self = shift; # Ensure we have the CBuilder module $self->configure_requires( 'ExtUtils::CBuilder' => 0.27 ); # Do we have the configure_requires checker? local $@; eval "require ExtUtils::CBuilder;"; if ( $@ ) { # They don't obey configure_requires, so it is # someone old and delicate. Try to avoid hurting # them by falling back to an older simpler test. return $self->can_cc(); } # Do we have a working C compiler my $builder = ExtUtils::CBuilder->new( quiet => 1, ); unless ( $builder->have_compiler ) { # No working C compiler return 0; } # Write a C file representative of what XS becomes require File::Temp; my ( $FH, $tmpfile ) = File::Temp::tempfile( "compilexs-XXXXX", SUFFIX => '.c', ); binmode $FH; print $FH <<'END_C'; #include "EXTERN.h" #include "perl.h" #include "XSUB.h" int main(int argc, char **argv) { return 0; } int boot_sanexs() { return 1; } END_C close $FH; # Can the C compiler access the same headers XS does my @libs = (); my $object = undef; eval { local $^W = 0; $object = $builder->compile( source => $tmpfile, ); @libs = $builder->link( objects => $object, module_name => 'sanexs', ); }; my $result = $@ ? 0 : 1; # Clean up all the build files foreach ( $tmpfile, $object, @libs ) { next unless defined $_; 1 while unlink; } return $result; } # Can we locate a (the) C compiler sub can_cc { my $self = shift; my @chunks = split(/ /, $Config::Config{cc}) or return; # $Config{cc} may contain args; try to find out the program part while (@chunks) { return $self->can_run("@chunks") || (pop(@chunks), next); } return; } # Fix Cygwin bug on maybe_command(); if ( $^O eq 'cygwin' ) { require ExtUtils::MM_Cygwin; require ExtUtils::MM_Win32; if ( ! defined(&ExtUtils::MM_Cygwin::maybe_command) ) { *ExtUtils::MM_Cygwin::maybe_command = sub { my ($self, $file) = @_; if ($file =~ m{^/cygdrive/}i and ExtUtils::MM_Win32->can('maybe_command')) { ExtUtils::MM_Win32->maybe_command($file); } else { ExtUtils::MM_Unix->maybe_command($file); } } } } 1; __END__ #line 236 RDF-Closure-0.001/inc/Module/Install/Base.pm0000644000076400007640000000214711773064331016510 0ustar taitai#line 1 package Module::Install::Base; use strict 'vars'; use vars qw{$VERSION}; BEGIN { $VERSION = '1.06'; } # Suspend handler for "redefined" warnings BEGIN { my $w = $SIG{__WARN__}; $SIG{__WARN__} = sub { $w }; } #line 42 sub new { my $class = shift; unless ( defined &{"${class}::call"} ) { *{"${class}::call"} = sub { shift->_top->call(@_) }; } unless ( defined &{"${class}::load"} ) { *{"${class}::load"} = sub { shift->_top->load(@_) }; } bless { @_ }, $class; } #line 61 sub AUTOLOAD { local $@; my $func = eval { shift->_top->autoload } or return; goto &$func; } #line 75 sub _top { $_[0]->{_top}; } #line 90 sub admin { $_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new; } #line 106 sub is_admin { ! $_[0]->admin->isa('Module::Install::Base::FakeAdmin'); } sub DESTROY {} package Module::Install::Base::FakeAdmin; use vars qw{$VERSION}; BEGIN { $VERSION = $Module::Install::Base::VERSION; } my $fake; sub new { $fake ||= bless(\@_, $_[0]); } sub AUTOLOAD {} sub DESTROY {} # Restore warning handler BEGIN { $SIG{__WARN__} = $SIG{__WARN__}->(); } 1; #line 159 RDF-Closure-0.001/inc/Module/Install/WriteAll.pm0000644000076400007640000000237611773064337017373 0ustar taitai#line 1 package Module::Install::WriteAll; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = qw{Module::Install::Base}; $ISCORE = 1; } sub WriteAll { my $self = shift; my %args = ( meta => 1, sign => 0, inline => 0, check_nmake => 1, @_, ); $self->sign(1) if $args{sign}; $self->admin->WriteAll(%args) if $self->is_admin; $self->check_nmake if $args{check_nmake}; unless ( $self->makemaker_args->{PL_FILES} ) { # XXX: This still may be a bit over-defensive... unless ($self->makemaker(6.25)) { $self->makemaker_args( PL_FILES => {} ) if -f 'Build.PL'; } } # Until ExtUtils::MakeMaker support MYMETA.yml, make sure # we clean it up properly ourself. $self->realclean_files('MYMETA.yml'); if ( $args{inline} ) { $self->Inline->write; } else { $self->Makefile->write; } # The Makefile write process adds a couple of dependencies, # so write the META.yml files after the Makefile. if ( $args{meta} ) { $self->Meta->write; } # Experimental support for MYMETA if ( $ENV{X_MYMETA} ) { if ( $ENV{X_MYMETA} eq 'JSON' ) { $self->Meta->write_mymeta_json; } else { $self->Meta->write_mymeta_yaml; } } return 1; } 1; RDF-Closure-0.001/inc/Module/Install/Include.pm0000644000076400007640000000101511773064331017212 0ustar taitai#line 1 package Module::Install::Include; use strict; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } sub include { shift()->admin->include(@_); } sub include_deps { shift()->admin->include_deps(@_); } sub auto_include { shift()->admin->auto_include(@_); } sub auto_include_deps { shift()->admin->auto_include_deps(@_); } sub auto_include_dependent_dists { shift()->admin->auto_include_dependent_dists(@_); } 1; RDF-Closure-0.001/inc/Module/Install/Metadata.pm0000644000076400007640000004327711773064331017367 0ustar taitai#line 1 package Module::Install::Metadata; use strict 'vars'; use Module::Install::Base (); use vars qw{$VERSION @ISA $ISCORE}; BEGIN { $VERSION = '1.06'; @ISA = 'Module::Install::Base'; $ISCORE = 1; } my @boolean_keys = qw{ sign }; my @scalar_keys = qw{ name module_name abstract version distribution_type tests installdirs }; my @tuple_keys = qw{ configure_requires build_requires requires recommends bundles resources }; my @resource_keys = qw{ homepage bugtracker repository }; my @array_keys = qw{ keywords author }; *authors = \&author; sub Meta { shift } sub Meta_BooleanKeys { @boolean_keys } sub Meta_ScalarKeys { @scalar_keys } sub Meta_TupleKeys { @tuple_keys } sub Meta_ResourceKeys { @resource_keys } sub Meta_ArrayKeys { @array_keys } foreach my $key ( @boolean_keys ) { *$key = sub { my $self = shift; if ( defined wantarray and not @_ ) { return $self->{values}->{$key}; } $self->{values}->{$key} = ( @_ ? $_[0] : 1 ); return $self; }; } foreach my $key ( @scalar_keys ) { *$key = sub { my $self = shift; return $self->{values}->{$key} if defined wantarray and !@_; $self->{values}->{$key} = shift; return $self; }; } foreach my $key ( @array_keys ) { *$key = sub { my $self = shift; return $self->{values}->{$key} if defined wantarray and !@_; $self->{values}->{$key} ||= []; push @{$self->{values}->{$key}}, @_; return $self; }; } foreach my $key ( @resource_keys ) { *$key = sub { my $self = shift; unless ( @_ ) { return () unless $self->{values}->{resources}; return map { $_->[1] } grep { $_->[0] eq $key } @{ $self->{values}->{resources} }; } return $self->{values}->{resources}->{$key} unless @_; my $uri = shift or die( "Did not provide a value to $key()" ); $self->resources( $key => $uri ); return 1; }; } foreach my $key ( grep { $_ ne "resources" } @tuple_keys) { *$key = sub { my $self = shift; return $self->{values}->{$key} unless @_; my @added; while ( @_ ) { my $module = shift or last; my $version = shift || 0; push @added, [ $module, $version ]; } push @{ $self->{values}->{$key} }, @added; return map {@$_} @added; }; } # Resource handling my %lc_resource = map { $_ => 1 } qw{ homepage license bugtracker repository }; sub resources { my $self = shift; while ( @_ ) { my $name = shift or last; my $value = shift or next; if ( $name eq lc $name and ! $lc_resource{$name} ) { die("Unsupported reserved lowercase resource '$name'"); } $self->{values}->{resources} ||= []; push @{ $self->{values}->{resources} }, [ $name, $value ]; } $self->{values}->{resources}; } # Aliases for build_requires that will have alternative # meanings in some future version of META.yml. sub test_requires { shift->build_requires(@_) } sub install_requires { shift->build_requires(@_) } # Aliases for installdirs options sub install_as_core { $_[0]->installdirs('perl') } sub install_as_cpan { $_[0]->installdirs('site') } sub install_as_site { $_[0]->installdirs('site') } sub install_as_vendor { $_[0]->installdirs('vendor') } sub dynamic_config { my $self = shift; my $value = @_ ? shift : 1; if ( $self->{values}->{dynamic_config} ) { # Once dynamic we never change to static, for safety return 0; } $self->{values}->{dynamic_config} = $value ? 1 : 0; return 1; } # Convenience command sub static_config { shift->dynamic_config(0); } sub perl_version { my $self = shift; return $self->{values}->{perl_version} unless @_; my $version = shift or die( "Did not provide a value to perl_version()" ); # Normalize the version $version = $self->_perl_version($version); # We don't support the really old versions unless ( $version >= 5.005 ) { die "Module::Install only supports 5.005 or newer (use ExtUtils::MakeMaker)\n"; } $self->{values}->{perl_version} = $version; } sub all_from { my ( $self, $file ) = @_; unless ( defined($file) ) { my $name = $self->name or die( "all_from called with no args without setting name() first" ); $file = join('/', 'lib', split(/-/, $name)) . '.pm'; $file =~ s{.*/}{} unless -e $file; unless ( -e $file ) { die("all_from cannot find $file from $name"); } } unless ( -f $file ) { die("The path '$file' does not exist, or is not a file"); } $self->{values}{all_from} = $file; # Some methods pull from POD instead of code. # If there is a matching .pod, use that instead my $pod = $file; $pod =~ s/\.pm$/.pod/i; $pod = $file unless -e $pod; # Pull the different values $self->name_from($file) unless $self->name; $self->version_from($file) unless $self->version; $self->perl_version_from($file) unless $self->perl_version; $self->author_from($pod) unless @{$self->author || []}; $self->license_from($pod) unless $self->license; $self->abstract_from($pod) unless $self->abstract; return 1; } sub provides { my $self = shift; my $provides = ( $self->{values}->{provides} ||= {} ); %$provides = (%$provides, @_) if @_; return $provides; } sub auto_provides { my $self = shift; return $self unless $self->is_admin; unless (-e 'MANIFEST') { warn "Cannot deduce auto_provides without a MANIFEST, skipping\n"; return $self; } # Avoid spurious warnings as we are not checking manifest here. local $SIG{__WARN__} = sub {1}; require ExtUtils::Manifest; local *ExtUtils::Manifest::manicheck = sub { return }; require Module::Build; my $build = Module::Build->new( dist_name => $self->name, dist_version => $self->version, license => $self->license, ); $self->provides( %{ $build->find_dist_packages || {} } ); } sub feature { my $self = shift; my $name = shift; my $features = ( $self->{values}->{features} ||= [] ); my $mods; if ( @_ == 1 and ref( $_[0] ) ) { # The user used ->feature like ->features by passing in the second # argument as a reference. Accomodate for that. $mods = $_[0]; } else { $mods = \@_; } my $count = 0; push @$features, ( $name => [ map { ref($_) ? ( ref($_) eq 'HASH' ) ? %$_ : @$_ : $_ } @$mods ] ); return @$features; } sub features { my $self = shift; while ( my ( $name, $mods ) = splice( @_, 0, 2 ) ) { $self->feature( $name, @$mods ); } return $self->{values}->{features} ? @{ $self->{values}->{features} } : (); } sub no_index { my $self = shift; my $type = shift; push @{ $self->{values}->{no_index}->{$type} }, @_ if $type; return $self->{values}->{no_index}; } sub read { my $self = shift; $self->include_deps( 'YAML::Tiny', 0 ); require YAML::Tiny; my $data = YAML::Tiny::LoadFile('META.yml'); # Call methods explicitly in case user has already set some values. while ( my ( $key, $value ) = each %$data ) { next unless $self->can($key); if ( ref $value eq 'HASH' ) { while ( my ( $module, $version ) = each %$value ) { $self->can($key)->($self, $module => $version ); } } else { $self->can($key)->($self, $value); } } return $self; } sub write { my $self = shift; return $self unless $self->is_admin; $self->admin->write_meta; return $self; } sub version_from { require ExtUtils::MM_Unix; my ( $self, $file ) = @_; $self->version( ExtUtils::MM_Unix->parse_version($file) ); # for version integrity check $self->makemaker_args( VERSION_FROM => $file ); } sub abstract_from { require ExtUtils::MM_Unix; my ( $self, $file ) = @_; $self->abstract( bless( { DISTNAME => $self->name }, 'ExtUtils::MM_Unix' )->parse_abstract($file) ); } # Add both distribution and module name sub name_from { my ($self, $file) = @_; if ( Module::Install::_read($file) =~ m/ ^ \s* package \s* ([\w:]+) \s* ; /ixms ) { my ($name, $module_name) = ($1, $1); $name =~ s{::}{-}g; $self->name($name); unless ( $self->module_name ) { $self->module_name($module_name); } } else { die("Cannot determine name from $file\n"); } } sub _extract_perl_version { if ( $_[0] =~ m/ ^\s* (?:use|require) \s* v? ([\d_\.]+) \s* ; /ixms ) { my $perl_version = $1; $perl_version =~ s{_}{}g; return $perl_version; } else { return; } } sub perl_version_from { my $self = shift; my $perl_version=_extract_perl_version(Module::Install::_read($_[0])); if ($perl_version) { $self->perl_version($perl_version); } else { warn "Cannot determine perl version info from $_[0]\n"; return; } } sub author_from { my $self = shift; my $content = Module::Install::_read($_[0]); if ($content =~ m/ =head \d \s+ (?:authors?)\b \s* ([^\n]*) | =head \d \s+ (?:licen[cs]e|licensing|copyright|legal)\b \s* .*? copyright .*? \d\d\d[\d.]+ \s* (?:\bby\b)? \s* ([^\n]*) /ixms) { my $author = $1 || $2; # XXX: ugly but should work anyway... if (eval "require Pod::Escapes; 1") { # Pod::Escapes has a mapping table. # It's in core of perl >= 5.9.3, and should be installed # as one of the Pod::Simple's prereqs, which is a prereq # of Pod::Text 3.x (see also below). $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } { defined $2 ? chr($2) : defined $Pod::Escapes::Name2character_number{$1} ? chr($Pod::Escapes::Name2character_number{$1}) : do { warn "Unknown escape: E<$1>"; "E<$1>"; }; }gex; } elsif (eval "require Pod::Text; 1" && $Pod::Text::VERSION < 3) { # Pod::Text < 3.0 has yet another mapping table, # though the table name of 2.x and 1.x are different. # (1.x is in core of Perl < 5.6, 2.x is in core of # Perl < 5.9.3) my $mapping = ($Pod::Text::VERSION < 2) ? \%Pod::Text::HTML_Escapes : \%Pod::Text::ESCAPES; $author =~ s{ E<( (\d+) | ([A-Za-z]+) )> } { defined $2 ? chr($2) : defined $mapping->{$1} ? $mapping->{$1} : do { warn "Unknown escape: E<$1>"; "E<$1>"; }; }gex; } else { $author =~ s{E}{<}g; $author =~ s{E}{>}g; } $self->author($author); } else { warn "Cannot determine author info from $_[0]\n"; } } #Stolen from M::B my %license_urls = ( perl => 'http://dev.perl.org/licenses/', apache => 'http://apache.org/licenses/LICENSE-2.0', apache_1_1 => 'http://apache.org/licenses/LICENSE-1.1', artistic => 'http://opensource.org/licenses/artistic-license.php', artistic_2 => 'http://opensource.org/licenses/artistic-license-2.0.php', lgpl => 'http://opensource.org/licenses/lgpl-license.php', lgpl2 => 'http://opensource.org/licenses/lgpl-2.1.php', lgpl3 => 'http://opensource.org/licenses/lgpl-3.0.html', bsd => 'http://opensource.org/licenses/bsd-license.php', gpl => 'http://opensource.org/licenses/gpl-license.php', gpl2 => 'http://opensource.org/licenses/gpl-2.0.php', gpl3 => 'http://opensource.org/licenses/gpl-3.0.html', mit => 'http://opensource.org/licenses/mit-license.php', mozilla => 'http://opensource.org/licenses/mozilla1.1.php', open_source => undef, unrestricted => undef, restrictive => undef, unknown => undef, ); sub license { my $self = shift; return $self->{values}->{license} unless @_; my $license = shift or die( 'Did not provide a value to license()' ); $license = __extract_license($license) || lc $license; $self->{values}->{license} = $license; # Automatically fill in license URLs if ( $license_urls{$license} ) { $self->resources( license => $license_urls{$license} ); } return 1; } sub _extract_license { my $pod = shift; my $matched; return __extract_license( ($matched) = $pod =~ m/ (=head \d \s+ L(?i:ICEN[CS]E|ICENSING)\b.*?) (=head \d.*|=cut.*|)\z /xms ) || __extract_license( ($matched) = $pod =~ m/ (=head \d \s+ (?:C(?i:OPYRIGHTS?)|L(?i:EGAL))\b.*?) (=head \d.*|=cut.*|)\z /xms ); } sub __extract_license { my $license_text = shift or return; my @phrases = ( '(?:under )?the same (?:terms|license) as (?:perl|the perl (?:\d )?programming language)' => 'perl', 1, '(?:under )?the terms of (?:perl|the perl programming language) itself' => 'perl', 1, 'Artistic and GPL' => 'perl', 1, 'GNU general public license' => 'gpl', 1, 'GNU public license' => 'gpl', 1, 'GNU lesser general public license' => 'lgpl', 1, 'GNU lesser public license' => 'lgpl', 1, 'GNU library general public license' => 'lgpl', 1, 'GNU library public license' => 'lgpl', 1, 'GNU Free Documentation license' => 'unrestricted', 1, 'GNU Affero General Public License' => 'open_source', 1, '(?:Free)?BSD license' => 'bsd', 1, 'Artistic license 2\.0' => 'artistic_2', 1, 'Artistic license' => 'artistic', 1, 'Apache (?:Software )?license' => 'apache', 1, 'GPL' => 'gpl', 1, 'LGPL' => 'lgpl', 1, 'BSD' => 'bsd', 1, 'Artistic' => 'artistic', 1, 'MIT' => 'mit', 1, 'Mozilla Public License' => 'mozilla', 1, 'Q Public License' => 'open_source', 1, 'OpenSSL License' => 'unrestricted', 1, 'SSLeay License' => 'unrestricted', 1, 'zlib License' => 'open_source', 1, 'proprietary' => 'proprietary', 0, ); while ( my ($pattern, $license, $osi) = splice(@phrases, 0, 3) ) { $pattern =~ s#\s+#\\s+#gs; if ( $license_text =~ /\b$pattern\b/i ) { return $license; } } return ''; } sub license_from { my $self = shift; if (my $license=_extract_license(Module::Install::_read($_[0]))) { $self->license($license); } else { warn "Cannot determine license info from $_[0]\n"; return 'unknown'; } } sub _extract_bugtracker { my @links = $_[0] =~ m#L<( https?\Q://rt.cpan.org/\E[^>]+| https?\Q://github.com/\E[\w_]+/[\w_]+/issues| https?\Q://code.google.com/p/\E[\w_\-]+/issues/list )>#gx; my %links; @links{@links}=(); @links=keys %links; return @links; } sub bugtracker_from { my $self = shift; my $content = Module::Install::_read($_[0]); my @links = _extract_bugtracker($content); unless ( @links ) { warn "Cannot determine bugtracker info from $_[0]\n"; return 0; } if ( @links > 1 ) { warn "Found more than one bugtracker link in $_[0]\n"; return 0; } # Set the bugtracker bugtracker( $links[0] ); return 1; } sub requires_from { my $self = shift; my $content = Module::Install::_readperl($_[0]); my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+(v?[\d\.]+)/mg; while ( @requires ) { my $module = shift @requires; my $version = shift @requires; $self->requires( $module => $version ); } } sub test_requires_from { my $self = shift; my $content = Module::Install::_readperl($_[0]); my @requires = $content =~ m/^use\s+([^\W\d]\w*(?:::\w+)*)\s+([\d\.]+)/mg; while ( @requires ) { my $module = shift @requires; my $version = shift @requires; $self->test_requires( $module => $version ); } } # Convert triple-part versions (eg, 5.6.1 or 5.8.9) to # numbers (eg, 5.006001 or 5.008009). # Also, convert double-part versions (eg, 5.8) sub _perl_version { my $v = $_[-1]; $v =~ s/^([1-9])\.([1-9]\d?\d?)$/sprintf("%d.%03d",$1,$2)/e; $v =~ s/^([1-9])\.([1-9]\d?\d?)\.(0|[1-9]\d?\d?)$/sprintf("%d.%03d%03d",$1,$2,$3 || 0)/e; $v =~ s/(\.\d\d\d)000$/$1/; $v =~ s/_.+$//; if ( ref($v) ) { # Numify $v = $v + 0; } return $v; } sub add_metadata { my $self = shift; my %hash = @_; for my $key (keys %hash) { warn "add_metadata: $key is not prefixed with 'x_'.\n" . "Use appopriate function to add non-private metadata.\n" unless $key =~ /^x_/; $self->{values}->{$key} = $hash{$key}; } } ###################################################################### # MYMETA Support sub WriteMyMeta { die "WriteMyMeta has been deprecated"; } sub write_mymeta_yaml { my $self = shift; # We need YAML::Tiny to write the MYMETA.yml file unless ( eval { require YAML::Tiny; 1; } ) { return 1; } # Generate the data my $meta = $self->_write_mymeta_data or return 1; # Save as the MYMETA.yml file print "Writing MYMETA.yml\n"; YAML::Tiny::DumpFile('MYMETA.yml', $meta); } sub write_mymeta_json { my $self = shift; # We need JSON to write the MYMETA.json file unless ( eval { require JSON; 1; } ) { return 1; } # Generate the data my $meta = $self->_write_mymeta_data or return 1; # Save as the MYMETA.yml file print "Writing MYMETA.json\n"; Module::Install::_write( 'MYMETA.json', JSON->new->pretty(1)->canonical->encode($meta), ); } sub _write_mymeta_data { my $self = shift; # If there's no existing META.yml there is nothing we can do return undef unless -f 'META.yml'; # We need Parse::CPAN::Meta to load the file unless ( eval { require Parse::CPAN::Meta; 1; } ) { return undef; } # Merge the perl version into the dependencies my $val = $self->Meta->{values}; my $perl = delete $val->{perl_version}; if ( $perl ) { $val->{requires} ||= []; my $requires = $val->{requires}; # Canonize to three-dot version after Perl 5.6 if ( $perl >= 5.006 ) { $perl =~ s{^(\d+)\.(\d\d\d)(\d*)}{join('.', $1, int($2||0), int($3||0))}e } unshift @$requires, [ perl => $perl ]; } # Load the advisory META.yml file my @yaml = Parse::CPAN::Meta::LoadFile('META.yml'); my $meta = $yaml[0]; # Overwrite the non-configure dependency hashs delete $meta->{requires}; delete $meta->{build_requires}; delete $meta->{recommends}; if ( exists $val->{requires} ) { $meta->{requires} = { map { @$_ } @{ $val->{requires} } }; } if ( exists $val->{build_requires} ) { $meta->{build_requires} = { map { @$_ } @{ $val->{build_requires} } }; } return $meta; } 1; RDF-Closure-0.001/inc/Module/Install/AutoManifest.pm0000644000076400007640000000125711773064336020243 0ustar taitai#line 1 use strict; use warnings; package Module::Install::AutoManifest; use Module::Install::Base; BEGIN { our $VERSION = '0.003'; our $ISCORE = 1; our @ISA = qw(Module::Install::Base); } sub auto_manifest { my ($self) = @_; return unless $Module::Install::AUTHOR; die "auto_manifest requested, but no MANIFEST.SKIP exists\n" unless -e "MANIFEST.SKIP"; if (-e "MANIFEST") { unlink('MANIFEST') or die "Can't remove MANIFEST: $!"; } $self->postamble(<<"END"); create_distdir: manifest_clean manifest distclean :: manifest_clean manifest_clean: \t\$(RM_F) MANIFEST END } 1; __END__ #line 48 #line 131 1; # End of Module::Install::AutoManifest RDF-Closure-0.001/inc/Module/Install/TrustMetaYml.pm0000644000076400007640000000170111773064331020243 0ustar taitai#line 1 package Module::Install::TrustMetaYml; use 5.008; use constant { FALSE => 0, TRUE => 1 }; use strict; use utf8; BEGIN { $Module::Install::TrustMetaYml::AUTHORITY = 'cpan:TOBYINK'; } BEGIN { $Module::Install::TrustMetaYml::VERSION = '0.001'; } use base qw(Module::Install::Base); sub trust_meta_yml { my ($self, $where) = @_; $where ||= 'META.yml'; $self->perl_version('5.006') unless defined $self->perl_version; $self->include_deps('YAML::Tiny', 0); return $self if $self->is_admin; require YAML::Tiny; my $data = YAML::Tiny::LoadFile($where); $self->perl_version($data->{requires}{perl} || '5.006'); KEY: foreach my $key (qw(requires recommends build_requires)) { next KEY unless ref $data->{$key} eq 'HASH'; my %deps = %{$data->{$key}}; DEP: while (my ($pkg, $ver) = each %deps) { next if $pkg eq 'perl'; $self->$key($pkg, $ver); } } return $self; } *trust_meta_yaml = \&trust_meta_yml; TRUE; __END__ RDF-Closure-0.001/inc/Module/Install.pm0000644000076400007640000003013511773064323015635 0ustar taitai#line 1 package Module::Install; # For any maintainers: # The load order for Module::Install is a bit magic. # It goes something like this... # # IF ( host has Module::Install installed, creating author mode ) { # 1. Makefile.PL calls "use inc::Module::Install" # 2. $INC{inc/Module/Install.pm} set to installed version of inc::Module::Install # 3. The installed version of inc::Module::Install loads # 4. inc::Module::Install calls "require Module::Install" # 5. The ./inc/ version of Module::Install loads # } ELSE { # 1. Makefile.PL calls "use inc::Module::Install" # 2. $INC{inc/Module/Install.pm} set to ./inc/ version of Module::Install # 3. The ./inc/ version of Module::Install loads # } use 5.005; use strict 'vars'; use Cwd (); use File::Find (); use File::Path (); use vars qw{$VERSION $MAIN}; BEGIN { # All Module::Install core packages now require synchronised versions. # This will be used to ensure we don't accidentally load old or # different versions of modules. # This is not enforced yet, but will be some time in the next few # releases once we can make sure it won't clash with custom # Module::Install extensions. $VERSION = '1.06'; # Storage for the pseudo-singleton $MAIN = undef; *inc::Module::Install::VERSION = *VERSION; @inc::Module::Install::ISA = __PACKAGE__; } sub import { my $class = shift; my $self = $class->new(@_); my $who = $self->_caller; #------------------------------------------------------------- # all of the following checks should be included in import(), # to allow "eval 'require Module::Install; 1' to test # installation of Module::Install. (RT #51267) #------------------------------------------------------------- # Whether or not inc::Module::Install is actually loaded, the # $INC{inc/Module/Install.pm} is what will still get set as long as # the caller loaded module this in the documented manner. # If not set, the caller may NOT have loaded the bundled version, and thus # they may not have a MI version that works with the Makefile.PL. This would # result in false errors or unexpected behaviour. And we don't want that. my $file = join( '/', 'inc', split /::/, __PACKAGE__ ) . '.pm'; unless ( $INC{$file} ) { die <<"END_DIE" } Please invoke ${\__PACKAGE__} with: use inc::${\__PACKAGE__}; not: use ${\__PACKAGE__}; END_DIE # This reportedly fixes a rare Win32 UTC file time issue, but # as this is a non-cross-platform XS module not in the core, # we shouldn't really depend on it. See RT #24194 for detail. # (Also, this module only supports Perl 5.6 and above). eval "use Win32::UTCFileTime" if $^O eq 'MSWin32' && $] >= 5.006; # If the script that is loading Module::Install is from the future, # then make will detect this and cause it to re-run over and over # again. This is bad. Rather than taking action to touch it (which # is unreliable on some platforms and requires write permissions) # for now we should catch this and refuse to run. if ( -f $0 ) { my $s = (stat($0))[9]; # If the modification time is only slightly in the future, # sleep briefly to remove the problem. my $a = $s - time; if ( $a > 0 and $a < 5 ) { sleep 5 } # Too far in the future, throw an error. my $t = time; if ( $s > $t ) { die <<"END_DIE" } Your installer $0 has a modification time in the future ($s > $t). This is known to create infinite loops in make. Please correct this, then run $0 again. END_DIE } # Build.PL was formerly supported, but no longer is due to excessive # difficulty in implementing every single feature twice. if ( $0 =~ /Build.PL$/i ) { die <<"END_DIE" } Module::Install no longer supports Build.PL. It was impossible to maintain duel backends, and has been deprecated. Please remove all Build.PL files and only use the Makefile.PL installer. END_DIE #------------------------------------------------------------- # To save some more typing in Module::Install installers, every... # use inc::Module::Install # ...also acts as an implicit use strict. $^H |= strict::bits(qw(refs subs vars)); #------------------------------------------------------------- unless ( -f $self->{file} ) { foreach my $key (keys %INC) { delete $INC{$key} if $key =~ /Module\/Install/; } local $^W; require "$self->{path}/$self->{dispatch}.pm"; File::Path::mkpath("$self->{prefix}/$self->{author}"); $self->{admin} = "$self->{name}::$self->{dispatch}"->new( _top => $self ); $self->{admin}->init; @_ = ($class, _self => $self); goto &{"$self->{name}::import"}; } local $^W; *{"${who}::AUTOLOAD"} = $self->autoload; $self->preload; # Unregister loader and worker packages so subdirs can use them again delete $INC{'inc/Module/Install.pm'}; delete $INC{'Module/Install.pm'}; # Save to the singleton $MAIN = $self; return 1; } sub autoload { my $self = shift; my $who = $self->_caller; my $cwd = Cwd::cwd(); my $sym = "${who}::AUTOLOAD"; $sym->{$cwd} = sub { my $pwd = Cwd::cwd(); if ( my $code = $sym->{$pwd} ) { # Delegate back to parent dirs goto &$code unless $cwd eq $pwd; } unless ($$sym =~ s/([^:]+)$//) { # XXX: it looks like we can't retrieve the missing function # via $$sym (usually $main::AUTOLOAD) in this case. # I'm still wondering if we should slurp Makefile.PL to # get some context or not ... my ($package, $file, $line) = caller; die <<"EOT"; Unknown function is found at $file line $line. Execution of $file aborted due to runtime errors. If you're a contributor to a project, you may need to install some Module::Install extensions from CPAN (or other repository). If you're a user of a module, please contact the author. EOT } my $method = $1; if ( uc($method) eq $method ) { # Do nothing return; } elsif ( $method =~ /^_/ and $self->can($method) ) { # Dispatch to the root M:I class return $self->$method(@_); } # Dispatch to the appropriate plugin unshift @_, ( $self, $1 ); goto &{$self->can('call')}; }; } sub preload { my $self = shift; unless ( $self->{extensions} ) { $self->load_extensions( "$self->{prefix}/$self->{path}", $self ); } my @exts = @{$self->{extensions}}; unless ( @exts ) { @exts = $self->{admin}->load_all_extensions; } my %seen; foreach my $obj ( @exts ) { while (my ($method, $glob) = each %{ref($obj) . '::'}) { next unless $obj->can($method); next if $method =~ /^_/; next if $method eq uc($method); $seen{$method}++; } } my $who = $self->_caller; foreach my $name ( sort keys %seen ) { local $^W; *{"${who}::$name"} = sub { ${"${who}::AUTOLOAD"} = "${who}::$name"; goto &{"${who}::AUTOLOAD"}; }; } } sub new { my ($class, %args) = @_; delete $INC{'FindBin.pm'}; { # to suppress the redefine warning local $SIG{__WARN__} = sub {}; require FindBin; } # ignore the prefix on extension modules built from top level. my $base_path = Cwd::abs_path($FindBin::Bin); unless ( Cwd::abs_path(Cwd::cwd()) eq $base_path ) { delete $args{prefix}; } return $args{_self} if $args{_self}; $args{dispatch} ||= 'Admin'; $args{prefix} ||= 'inc'; $args{author} ||= ($^O eq 'VMS' ? '_author' : '.author'); $args{bundle} ||= 'inc/BUNDLES'; $args{base} ||= $base_path; $class =~ s/^\Q$args{prefix}\E:://; $args{name} ||= $class; $args{version} ||= $class->VERSION; unless ( $args{path} ) { $args{path} = $args{name}; $args{path} =~ s!::!/!g; } $args{file} ||= "$args{base}/$args{prefix}/$args{path}.pm"; $args{wrote} = 0; bless( \%args, $class ); } sub call { my ($self, $method) = @_; my $obj = $self->load($method) or return; splice(@_, 0, 2, $obj); goto &{$obj->can($method)}; } sub load { my ($self, $method) = @_; $self->load_extensions( "$self->{prefix}/$self->{path}", $self ) unless $self->{extensions}; foreach my $obj (@{$self->{extensions}}) { return $obj if $obj->can($method); } my $admin = $self->{admin} or die <<"END_DIE"; The '$method' method does not exist in the '$self->{prefix}' path! Please remove the '$self->{prefix}' directory and run $0 again to load it. END_DIE my $obj = $admin->load($method, 1); push @{$self->{extensions}}, $obj; $obj; } sub load_extensions { my ($self, $path, $top) = @_; my $should_reload = 0; unless ( grep { ! ref $_ and lc $_ eq lc $self->{prefix} } @INC ) { unshift @INC, $self->{prefix}; $should_reload = 1; } foreach my $rv ( $self->find_extensions($path) ) { my ($file, $pkg) = @{$rv}; next if $self->{pathnames}{$pkg}; local $@; my $new = eval { local $^W; require $file; $pkg->can('new') }; unless ( $new ) { warn $@ if $@; next; } $self->{pathnames}{$pkg} = $should_reload ? delete $INC{$file} : $INC{$file}; push @{$self->{extensions}}, &{$new}($pkg, _top => $top ); } $self->{extensions} ||= []; } sub find_extensions { my ($self, $path) = @_; my @found; File::Find::find( sub { my $file = $File::Find::name; return unless $file =~ m!^\Q$path\E/(.+)\.pm\Z!is; my $subpath = $1; return if lc($subpath) eq lc($self->{dispatch}); $file = "$self->{path}/$subpath.pm"; my $pkg = "$self->{name}::$subpath"; $pkg =~ s!/!::!g; # If we have a mixed-case package name, assume case has been preserved # correctly. Otherwise, root through the file to locate the case-preserved # version of the package name. if ( $subpath eq lc($subpath) || $subpath eq uc($subpath) ) { my $content = Module::Install::_read($subpath . '.pm'); my $in_pod = 0; foreach ( split //, $content ) { $in_pod = 1 if /^=\w/; $in_pod = 0 if /^=cut/; next if ($in_pod || /^=cut/); # skip pod text next if /^\s*#/; # and comments if ( m/^\s*package\s+($pkg)\s*;/i ) { $pkg = $1; last; } } } push @found, [ $file, $pkg ]; }, $path ) if -d $path; @found; } ##################################################################### # Common Utility Functions sub _caller { my $depth = 0; my $call = caller($depth); while ( $call eq __PACKAGE__ ) { $depth++; $call = caller($depth); } return $call; } # Done in evals to avoid confusing Perl::MinimumVersion eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _read { local *FH; open( FH, '<', $_[0] ) or die "open($_[0]): $!"; my $string = do { local $/; }; close FH or die "close($_[0]): $!"; return $string; } END_NEW sub _read { local *FH; open( FH, "< $_[0]" ) or die "open($_[0]): $!"; my $string = do { local $/; }; close FH or die "close($_[0]): $!"; return $string; } END_OLD sub _readperl { my $string = Module::Install::_read($_[0]); $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; $string =~ s/(\n)\n*__(?:DATA|END)__\b.*\z/$1/s; $string =~ s/\n\n=\w+.+?\n\n=cut\b.+?\n+/\n\n/sg; return $string; } sub _readpod { my $string = Module::Install::_read($_[0]); $string =~ s/(?:\015{1,2}\012|\015|\012)/\n/sg; return $string if $_[0] =~ /\.pod\z/; $string =~ s/(^|\n=cut\b.+?\n+)[^=\s].+?\n(\n=\w+|\z)/$1$2/sg; $string =~ s/\n*=pod\b[^\n]*\n+/\n\n/sg; $string =~ s/\n*=cut\b[^\n]*\n+/\n\n/sg; $string =~ s/^\n+//s; return $string; } # Done in evals to avoid confusing Perl::MinimumVersion eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@; sub _write { local *FH; open( FH, '>', $_[0] ) or die "open($_[0]): $!"; foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; } close FH or die "close($_[0]): $!"; } END_NEW sub _write { local *FH; open( FH, "> $_[0]" ) or die "open($_[0]): $!"; foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!"; } close FH or die "close($_[0]): $!"; } END_OLD # _version is for processing module versions (eg, 1.03_05) not # Perl versions (eg, 5.8.1). sub _version ($) { my $s = shift || 0; my $d =()= $s =~ /(\.)/g; if ( $d >= 2 ) { # Normalise multipart versions $s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg; } $s =~ s/^(\d+)\.?//; my $l = $1 || 0; my @v = map { $_ . '0' x (3 - length $_) } $s =~ /(\d{1,3})\D?/g; $l = $l . '.' . join '', @v if @v; return $l + 0; } sub _cmp ($$) { _version($_[1]) <=> _version($_[2]); } # Cloned from Params::Util::_CLASS sub _CLASS ($) { ( defined $_[0] and ! ref $_[0] and $_[0] =~ m/^[^\W\d]\w*(?:::\w+)*\z/s ) ? $_[0] : undef; } 1; # Copyright 2008 - 2012 Adam Kennedy. RDF-Closure-0.001/inc/Module/Package/0000755000076400007640000000000011773065330015221 5ustar taitaiRDF-Closure-0.001/inc/Module/Package/Dist/0000755000076400007640000000000011773065330016124 5ustar taitaiRDF-Closure-0.001/inc/Module/Package/Dist/RDF.pm0000644000076400007640000000100611773064334017075 0ustar taitai#line 1 package Module::Package::Dist::RDF; use 5.008003; BEGIN { $Module::Package::Dist::RDF::AUTHORITY = 'cpan:TOBYINK'; $Module::Package::Dist::RDF::VERSION = '0.005'; } package Module::Package::Dist::RDF::standard; use 5.008003; use strict; use base qw[Module::Package::Dist]; BEGIN { $Module::Package::Dist::RDF::standard::AUTHORITY = 'cpan:TOBYINK'; $Module::Package::Dist::RDF::standard::VERSION = '0.005'; } sub _main { my ($self) = @_; $self->mi->trust_meta_yml; $self->mi->auto_install; } 1; RDF-Closure-0.001/t/0000755000076400007640000000000011773065330012133 5ustar taitaiRDF-Closure-0.001/t/01basic.t0000644000076400007640000000007611663406020013536 0ustar taitaiuse Test::More tests => 1; BEGIN { use_ok('RDF::Closure') }; RDF-Closure-0.001/t/02reasoning.t0000644000076400007640000000363711772720334014461 0ustar taitaiuse Test::More tests => 4; use Test::RDF; use RDF::Closure; use RDF::Trine qw(statement iri literal blank variable); my ($EX, $RDF, $RDFS, $OWL, $XSD, $FOAF) = do { no warnings; map { RDF::Trine::Namespace->new($_) } qw { http://www.example.com/ http://www.w3.org/1999/02/22-rdf-syntax-ns# http://www.w3.org/2000/01/rdf-schema# http://www.w3.org/2002/07/owl# http://www.w3.org/2001/XMLSchema# http://xmlns.com/foaf/0.1/ } }; my $ser = RDF::Trine::Serializer->new( 'Turtle', namespaces => { ex => $EX->uri->uri, rdf => $RDF->uri->uri, owl => $OWL->uri->uri, xsd => $XSD->uri->uri, foaf => $FOAF->uri->uri, rdfs => $RDF->uri->uri, }, ); my $input = <<'INPUT'; @prefix : . @prefix rdf: . @prefix rdfs: . @prefix owl: . @prefix xsd: . @prefix foaf: . # Mini ontology foaf:Person rdfs:subClassOf foaf:Agent . foaf:homepage a owl:InverseFunctionalProperty . # Some data :Bob a foaf:Person . :Bob foaf:homepage . :Robert foaf:homepage . :Robert foaf:age "102/4"^^owl:rational . INPUT ## Same input data for both my $turtle_parser = RDF::Trine::Parser->new('Turtle'); my ($m_rdfs, $m_owl2rl) = map { my $m = RDF::Trine::Model->new; $turtle_parser->parse_into_model('http://www.example.com/', $input, $m); $m; } 1..2; ## RDFS RDF::Closure::Engine->new(rdfs => $m_rdfs)->closure; pattern_target($m_rdfs); pattern_ok statement($EX->Bob, $RDF->type, $FOAF->Agent); ## OWL2RL RDF::Closure::Engine->new(owl2rl => $m_owl2rl)->closure; pattern_target($m_owl2rl); pattern_ok statement($EX->Robert, $RDF->type, $FOAF->Agent), statement($EX->Robert, $OWL->sameAs, $EX->Bob), statement($EX->Bob, $OWL->sameAs, $EX->Robert); RDF-Closure-0.001/README0000644000076400007640000000767211773064334012567 0ustar taitaiNAME RDF::Closure - pure Perl RDF inferencing SYNOPSIS use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $data = iri('http://bloggs.example.com/foaf.rdf'); my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $model = RDF::Trine::Model->temporary_model; my $p = 'RDF::Trine::Parser'; $p->parse_url_into_model($data->uri, $model, context => $data->uri); $p->parse_url_into_model($foaf->uri, $model, context => $foaf->uri); my $cl = RDF::Closure::Engine->new('rdfs', $model); $cl->closure; my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $output = &sgrep($filter, $model->as_stream); print RDF::Trine::Serializer ->new('RDFXML') ->serialize_iterator_to_string($output); DESCRIPTION This distribution is a pure Perl RDF inference engine designed as an add-in for RDF::Trine. It is largely a port of Ivan Herman's Python RDFClosure library, though there has been some restructuing, and there are a few extras thrown in. Where one of the Perl modules has a direct equivalent in Ivan's library, this is noted in the POD. Functions This package inherits from RDF::Trine and exports the same functions, plus: * "mk_filter($basic_filters, $ignore_contexts)" Creates a filter (coderef) suitable for use with "sgrep" from RDF::Trine::Iterator. $basic_filters is an integer which can be assembled by bitwise-OR-ing the constants "FLT_NONRDF" and "FLT_BORING". $ignore_contexts is an arrayref of RDF::Trine::Node objects, each of which represents a context that should be filtered out. use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $remaining = &sgrep($filter, $model->as_stream); # $remaining is now an iterator which will return all triples # from $model except: those in the FOAF named graph, those which # are non-RDF (e.g. literal subject) and those which are boring. Which triples are boring? Any triple of the form { ?x owl:sameAs ?x .}, { ?x owl:equivalentProperty ?x .}, { ?x owl:equivalentClass ?x .}, { ?x rdfs:subPropertyOf ?x .} or { ?x rdfs:subClassOf ?x .} is boring (i.e. where these statements have the same term in subject and object position). Any triple where the subject, predicate and object nodes are all in the RDF, RDFS, OWL or XSD namespaces is boring. Other triples are not boring. For convenience, "RDF::Closure" also exports variables called $RDF, $RDFS, $OWL and $XSD which are RDF::Trine::Namespace objects. SEE ALSO RDF::Closure::Engine, RDF::Closure::Model, RDF::Trine::Parser::OwlFn. RDF::Trine, RDF::Query. . . AUTHOR Toby Inkster . COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: * The Artistic License 1.0 . * The GNU General Public License Version 1 , or (at your option) any later version. * The W3C Software Notice and License . * The Clarified Artistic License . DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. RDF-Closure-0.001/lib/0000755000076400007640000000000011773065330012436 5ustar taitaiRDF-Closure-0.001/lib/RDF/0000755000076400007640000000000011773065330013051 5ustar taitaiRDF-Closure-0.001/lib/RDF/Trine/0000755000076400007640000000000011773065330014132 5ustar taitaiRDF-Closure-0.001/lib/RDF/Trine/Parser/0000755000076400007640000000000011773065330015366 5ustar taitaiRDF-Closure-0.001/lib/RDF/Trine/Parser/OwlFn/0000755000076400007640000000000011773065330016413 5ustar taitaiRDF-Closure-0.001/lib/RDF/Trine/Parser/OwlFn/Grammar.pm0000644000076400007640000011647611773064025020356 0ustar taitaipackage RDF::Trine::Parser::OwlFn::Grammar; use Parse::RecDescent; our $VERSION = '0.001'; exit(__PACKAGE__->main) unless caller; sub main { (my $package = shift) =~ s/::([^:]+)$/::Compiled/; local $::RD_HINT = 1; Parse::RecDescent->Precompile(&grammar, $package); return 0; } sub new { return Parse::RecDescent->new(&grammar); } sub grammar { local $/; return ; } {{{ # experiments with prefixes my $this_does_not_work = q{ # Definitions from SPARQL PN_CHARS_BASE: /([A-Z]|[a-z]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])/ PN_CHARS_U: PN_CHARS_BASE | '_' PN_CHARS: PN_CHARS_U | /-|[0-9]|\x{00B7}|[\x{0300}-\x{036F}]|[\x{203F}-\x{2040}]/; PN_PREFIX: PN_CHARS_BASE PN_PREFIX_TAIL(?) { $return = $item{PN_CHARS_BASE}; if (ref $item{'PN_PREFIX_TAIL(?)'} eq 'ARRAY') { $return .= $item{'PN_PREFIX_TAIL(?)'}->[0]; } 1; } PN_PREFIX_TAIL: PN_PREFIX_MID(s?) PN_CHARS { if (ref $item{'PN_PREFIX_MID(s?)'} eq 'ARRAY') { $return = join '', @{$item{'PN_PREFIX_MID(s?)'}}; } $return .= $item{PN_CHARS}; 1; } PN_PREFIX_MID: PN_CHARS | '.' PN_LOCAL: PN_LOCAL_START PN_LOCAL_TAIL(?) { $return = $item{PN_LOCAL_START}; if (ref $item{'PN_LOCAL_TAIL(?)'} eq 'ARRAY') { $return .= $item{'PN_LOCAL_TAIL(?)'}->[0]; } 1; } PN_LOCAL_START: PN_CHARS_U | /[0-9]/ PN_LOCAL_TAIL: PN_LOCAL_MID(s?) PN_CHARS { if (ref $item{'PN_LOCAL_MID(s?)'} eq 'ARRAY') { $return = join '', @{$item{'PN_LOCAL_MID(s?)'}}; } $return .= $item{PN_CHARS}; 1; } PN_LOCAL_MID: PN_PREFIX_MID }; my $this_works = q{ # the following are too constrained... PN_LOCAL: /[A-Z0-9_]*/i { $return = $item{__PATTERN1__}; 1; } PNAME_NS: /([A-Z][A-Z0-9_]*)?:/i { $return = $item{__PATTERN1__}; 1; } PNAME_LN: PNAME_NS PN_LOCAL { $return = [ $item{PNAME_NS}, $item{PN_LOCAL} ]; 1; } }; my $this_might_be_close_enough = q{ # the following are not quite right... PN_LOCAL: /(?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*/i { $return = $item{__PATTERN1__}; 1; } PNAME_NS: /(?:[A-Z](?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*)?:/i { $return = $item{__PATTERN1__}; 1; } PNAME_LN: PNAME_NS PN_LOCAL { $return = [ $item{PNAME_NS}, $item{PN_LOCAL} ]; 1; } }; }}} =head1 NAME RDF::Trine::Parser::OwlFn::Grammar - provides a Parse::RecDescent grammar for OWL 2.0 Functional Syntax =head1 DESCRIPTION This package provides two methods: =over =item * C<< grammar >> Returns the grammar as a string. =item * C<< new >> Returns a Parse::RecDescent parser object using the grammar =back Additionally, if you run this C module directly at the command line: perl -w Grammar.pm It will generate a file called C containing a pre-compiled Parse::RecDescent parser. =head1 CONFORMANCE This grammar deviates from the official one in a few places: =over =item * QName (a.k.a. CURIE) syntax is slightly broken - in most cases you won't notice it. =item * CSS-style comments (/* ... */) are allowed. =item * Unquoted xsd:nonNegativeInteger tokens can be used as literals. =item * The unquoted tokens 'true' and 'false' can be used as literals. =item * Multiple C<< Ontology(...) >> instances are allowed in a single file. =back =head1 SEE ALSO L, L. L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut 1; __DATA__ # Annotation = 1 # OntologyAnnotation = 2 # AnnotationAnnotation = 4 { my $OWL = RDF::Trine::Namespace->new('http://www.w3.org/2002/07/owl#'); my $RDFS = RDF::Trine::Namespace->new('http://www.w3.org/2000/01/rdf-schema#'); my $RDF = RDF::Trine::Namespace->new('http://www.w3.org/1999/02/22-rdf-syntax-ns#'); my $XSD = RDF::Trine::Namespace->new('http://www.w3.org/2001/XMLSchema#'); my $declaredAnnotations; my %Prefixes = ( 'rdf:' => $RDF, 'rdfs:' => $RDFS, 'xsd:' => $XSD, 'owl:' => $OWL, ); sub _list_generator { my ($h, $items) = @_; my ($first, @rest) = @$items; return $RDF->nil unless $first; my $rv = RDF::Trine::Node::Blank->new; $h->($rv, $RDF->first, $first); $h->($rv, $RDF->rest, _list_generator($h, \@rest)); $rv; } my $list_generator = \&_list_generator; } # Definitions from SPARQL # the following are not quite right... PN_LOCAL: /(?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*/i { $return = $item{__PATTERN1__}; 1; } PNAME_NS: /(?:[A-Z](?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*)?:/i { $return = $item{__PATTERN1__}; 1; } PNAME_LN: PNAME_NS PN_LOCAL { $return = [ $item{PNAME_NS}, $item{PN_LOCAL} ]; 1; } # 13 Appendix: Complete Grammar (Normative) # 13.1 General Definitions nonNegativeInteger: /\d+/ { $return = $item{__PATTERN1__}; 1; } quotedString: '"' /(?:\\\\|\\"|[^\\\\\\"])*/ '"' { $return = $item{__PATTERN1__}; $return =~ s/\\([\\\"])/$1/g; 1; } languageTag: '@' /[A-Z0-9]{1,8}(?:-[A-Z0-9]{1,8})*/i { $return = $item{__PATTERN1__}; 1; } nodeID: '_:' PN_LOCAL { $return = $item{PN_LOCAL}; 1; } fullIRI: '<' /[^\s><]*/ '>' { $return = $item{__PATTERN1__}; 1; } prefixName: PNAME_NS { $return = $item{PNAME_NS}; 1; } abbreviatedIRI: PNAME_LN { $return = $item{PNAME_LN}; 1; } IRI: fullIRI { $return = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); 1; } IRI: abbreviatedIRI { my ($pfx, $sfx) = @{ $item{abbreviatedIRI} }; if ($Prefixes{$pfx}) { $return = $Prefixes{$pfx}->uri($sfx); } else { warn "Undefined prefix '${pfx}' at line ${thisline}."; $return = RDF::Trine::Node::Resource->new($pfx.$sfx); } 1; } ontologyDocument: prefixDeclaration(s?) Ontology(s) { $return = \%item; 1; } prefixDeclaration: 'Prefix' '(' prefixName '=' fullIRI ')' { if (defined $Prefixes{ $item{prefixName} }) { warn(sprintf("Ignoring attempt to redeclare prefix '%s'.", $item{prefixName})); } else { my $u = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); $Prefixes{ $item{prefixName} } = RDF::Trine::Namespace->new($u->uri); $thisparser->{PREFIX}->($item{prefixName}, $item{fullIRI}); } $return = \%item; 1; } Ontology: 'Ontology' '(' versioningIRIs(?) directlyImportsDocuments ontologyAnnotations axioms ')' { my $h = $thisparser->{TRIPLE}; my ($ont_iri, $ver_iri) = $item{'versioningIRIs(?)'}->[0] && @{ $item{'versioningIRIs(?)'}->[0] } ? @{ $item{'versioningIRIs(?)'}->[0] } : (RDF::Trine::Node::Blank->new); $h->($ont_iri, $RDF->type, $OWL->Ontology); if (ref $ver_iri) { $h->($ont_iri, $OWL->versionIRI, $ver_iri); } foreach my $st (@{ $item{'directlyImportsDocuments'} }) { my $import = $st->bind_variables({ ontology => $ont_iri }); $h->($import); } foreach my $ann (@{ $item{'ontologyAnnotations'} }) { my $st = $ann->{template}->bind_variables({ subject => $ont_iri }); $h->($st, 2); if (ref $ann->{annotationAnnotations} eq 'ARRAY' and @{ $ann->{annotationAnnotations} }) { $thisparser->{ANNOTATE}->($ann->{annotationAnnotations}, $st, 4); } } $return = \%item; 1; } versioningIRIs: ontologyIRI versionIRI { $return = [$item{ontologyIRI}, $item{versionIRI}]; 1; } ontologyIRI: IRI { $return = $item{IRI}; 1; } versionIRI: IRI(?) { $return = $item{'IRI(?)'}->[0]; 1; } directlyImportsDocuments: importStatement(s?) { $return = $item{'importStatement(s?)'}; 1; } importStatement: 'Import' '(' IRI ')' { $return = RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new('ontology'), $OWL->imports, $item{IRI}, ); 1; } ontologyAnnotations: Annotation(s?) { $return = ref $item{'Annotation(s?)'} eq 'ARRAY' ? $item{'Annotation(s?)'} : []; 1; } axioms: Axiom(s?) { $return = \%item; 1; } Declaration: 'Declaration' '(' axiomAnnotationsD Entity ')' Entity: 'Class' '(' Class ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Class}, $RDF->type, $OWL->Class), ); $return = $item{Class}; $declaredAnnotations = undef; 1; } | 'Datatype' '(' Datatype ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Datatype}, $RDF->type, $OWL->Datatype), ); $return = $item{Datatype}; $declaredAnnotations = undef; 1; } | 'ObjectProperty' '(' ObjectProperty ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{ObjectProperty}, $RDF->type, $OWL->ObjectProperty), ); $return = $item{ObjectProperty}; $declaredAnnotations = undef; 1; } | 'DataProperty' '(' DataProperty ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{DataProperty}, $RDF->type, $OWL->DatatypeProperty), ); $return = $item{DataProperty}; $declaredAnnotations = undef; 1; } | 'AnnotationProperty' '(' AnnotationProperty ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{AnnotationProperty}, $RDF->type, $OWL->AnnotationProperty), ); $return = $item{AnnotationProperty}; $declaredAnnotations = undef; 1; } | 'NamedIndividual' '(' NamedIndividual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{NamedIndividual}, $RDF->type, $OWL->NamedIndividual), ); $return = $item{NamedIndividual}; $declaredAnnotations = undef; 1; } AnnotationSubject: IRI | AnonymousIndividual AnnotationValue: AnonymousIndividual | IRI | Literal axiomAnnotations: Annotation(s?) { $return = $item{'Annotation(s?)'}; 1; } axiomAnnotationsD: Annotation(s?) { $declaredAnnotations = $return = $item{'Annotation(s?)'}; 1; } Annotation: 'Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')' { $return = { template => RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new('subject'), $item{AnnotationProperty}, $item{AnnotationValue}, ), annotationAnnotations => $item{annotationAnnotations} }; 1; } annotationAnnotations: Annotation(s?) { $return = $item{'Annotation(s?)'}; 1; } AnnotationAxiom: AnnotationAssertion | SubAnnotationPropertyOf | AnnotationPropertyDomain | AnnotationPropertyRange AnnotationAssertion: 'AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationSubject}, $item{AnnotationProperty}, $item{AnnotationValue}), ); 1; } SubAnnotationPropertyOf: 'SubAnnotationPropertyOf' '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subAnnotationProperty}, $RDFS->subPropertyOf, $item{superAnnotationProperty}), ); 1; } subAnnotationProperty: AnnotationProperty superAnnotationProperty: AnnotationProperty AnnotationPropertyDomain: 'AnnotationPropertyDomain' '(' axiomAnnotations AnnotationProperty IRI ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->domain, $item{IRI}), ); 1; } AnnotationPropertyRange: 'AnnotationPropertyRange' '(' axiomAnnotations AnnotationProperty IRI ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->range, $item{IRI}), ); 1; } # 13.2 Definitions of OWL 2 Constructs Class: IRI Datatype: IRI ObjectProperty: IRI DataProperty: IRI AnnotationProperty: IRI Individual: NamedIndividual | AnonymousIndividual NamedIndividual: IRI AnonymousIndividual: nodeID { $return = RDF::Trine::Node::Blank->new($thisparser->{BPREFIX}.$item{nodeID}); 1; } Literal: typedLiteral | stringLiteralWithLanguage | stringLiteralNoLanguage | numericLiteral | booleanLiteral typedLiteral: lexicalForm '^^' Datatype { if ($item{Datatype}->equal($RDF->PlainLiteral)) { my ($lex, $lang) = ($item{lexicalForm} =~ m{^(.*)\@([^@]*)$}); $return = RDF::Trine::Node::Literal->new($lex, $lang) } else { $return = RDF::Trine::Node::Literal->new($item{lexicalForm}, undef, $item{Datatype}->uri); } 1; } lexicalForm: quotedString stringLiteralNoLanguage: quotedString { $return = RDF::Trine::Node::Literal->new($item{quotedString}); 1; } stringLiteralWithLanguage: quotedString languageTag { $return = RDF::Trine::Node::Literal->new($item{quotedString}, $item{languageTag}); 1; } numericLiteral: nonNegativeInteger { $return = RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri); 1; } booleanLiteral: /(true|false|yes|no)/i { if ($item{__PATTERN1__} =~ /(true|yes)/i) { $return = RDF::Trine::Node::Literal->new('true', undef, $XSD->boolean->uri); } elsif ($item{__PATTERN1__} =~ /(false|no)/i) { $return = RDF::Trine::Node::Literal->new('false', undef, $XSD->boolean->uri); } else { die "huh?"; } 1; } ObjectPropertyExpression: ObjectProperty | InverseObjectProperty InverseObjectProperty: 'ObjectInverseOf' '(' ObjectProperty ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $OWL->inverseOf, $item{ObjectProperty}); $return = $x; 1; } DataPropertyExpression: DataProperty DataRange: Datatype | DataIntersectionOf | DataUnionOf | DataComplementOf | DataOneOf | DatatypeRestriction DataIntersectionOf: 'DataIntersectionOf' '(' DataRange(2..) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'DataRange(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; } DataUnionOf: 'DataUnionOf' '(' DataRange(2..) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'DataRange(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->unionOf, $list); $return = $x; 1; } DataComplementOf: 'DataComplementOf' '(' DataRange ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->datatypeComplementOf, $item{DataRange}); $return = $x; 1; } DataOneOf: 'DataOneOf' '(' Literal(2..) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'Literal(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->oneOf, $list); $return = $x; 1; } DatatypeRestriction: 'DatatypeRestriction' '(' Datatype dtConstraint(s) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->onDatatype, $item{Datatype}); my @y; foreach my $constraint (@{$item{'dtConstraint(s)'}}) { my $y = RDF::Trine::Node::Blank->new; $h->($y, @$constraint); push @y, $y; } $h->($x, $OWL->withRestrictions, $list_generator->($h, \@y)); $return = $x; 1; } dtConstraint: constrainingFacet restrictionValue { $return = [ $item{constrainingFacet}, $item{restrictionValue} ]; 1; } constrainingFacet: IRI restrictionValue: Literal ClassExpression: Class | ObjectIntersectionOf | ObjectUnionOf | ObjectComplementOf | ObjectOneOf | ObjectSomeValuesFrom | ObjectAllValuesFrom | ObjectHasValue | ObjectHasSelf | ObjectMinCardinality | ObjectMaxCardinality | ObjectExactCardinality | DataSomeValuesFrom | DataAllValuesFrom | DataHasValue | DataMinCardinality | DataMaxCardinality | DataExactCardinality ObjectIntersectionOf: 'ObjectIntersectionOf' '(' ClassExpression(2..) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; } ObjectUnionOf: 'ObjectUnionOf' '(' ClassExpression(2..) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->unionOf, $list); $return = $x; 1; } ObjectComplementOf: 'ObjectComplementOf' '(' ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->complementOf, $item{ClassExpression}); $return = $x; 1; } ObjectOneOf: 'ObjectOneOf' '(' Individual(s) ')' { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->oneOf, $list); $return = $x; 1; } ObjectSomeValuesFrom: 'ObjectSomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{ClassExpression}); $return = $x; 1; } ObjectAllValuesFrom: 'ObjectAllValuesFrom' '(' ObjectPropertyExpression ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{ClassExpression}); $return = $x; 1; } ObjectHasValue: 'ObjectHasValue' '(' ObjectPropertyExpression Individual ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasValue, $item{Individual}); $return = $x; 1; } ObjectHasSelf: 'ObjectHasSelf' '(' ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasSelf, RDF::Trine::Node::Literal->new('true', undef, $XSD->boolean->uri)); $return = $x; 1; } ObjectMinCardinality: 'ObjectMinCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } ObjectMaxCardinality: 'ObjectMaxCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } ObjectExactCardinality: 'ObjectExactCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } DataSomeValuesFrom: 'DataSomeValuesFrom' '(' DataPropertyExpression DataRange ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; } DataSomeValuesFrom: 'DataSomeValuesFrom' '(' DataPropertyExpression(2..) DataRange ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{'DataPropertyExpression(2)'}), ); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; } DataAllValuesFrom: 'DataAllValuesFrom' '(' DataPropertyExpression DataRange ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; } DataAllValuesFrom: 'DataAllValuesFrom' '(' DataPropertyExpression(2..) DataRange ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{'DataPropertyExpression(2)'}), ); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; } DataHasValue: 'DataHasValue' '(' DataPropertyExpression Literal ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->hasValue, $item{Literal}); $return = $x; 1; } DataMinCardinality: 'DataMinCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } DataMaxCardinality: 'DataMaxCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } DataExactCardinality: 'DataExactCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange(?) ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; } Axiom: Declaration | ClassAxiom | ObjectPropertyAxiom | DataPropertyAxiom | DatatypeDefinition | HasKey | Assertion | AnnotationAxiom ClassAxiom: SubClassOf | EquivalentClasses | DisjointClasses | DisjointUnion SubClassOf: 'SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subClassExpression}, $RDFS->subClassOf, $item{superClassExpression}), ); 1; } subClassExpression: ClassExpression superClassExpression: ClassExpression EquivalentClasses: 'EquivalentClasses' '(' axiomAnnotations ClassExpression(2..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'ClassExpression(2..)'} }) { foreach my $ce2 (@{ $item{'ClassExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentClass, $ce2), ); } } 1; } DisjointClasses: 'DisjointClasses' '(' axiomAnnotations ClassExpression(2) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ClassExpression(2)'}->[0], $OWL->disjointWith, $item{'ClassExpression(2)'}->[1]), ); 1; } DisjointClasses: 'DisjointClasses' '(' axiomAnnotations ClassExpression(3..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'ClassExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointClasses); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; } DisjointUnion: 'DisjointUnion' '(' axiomAnnotations Class disjointClassExpressions ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{disjointClassExpressions}); $a->( $item{axiomAnnotations}, $h->($item{Class}, $OWL->disjointUnionOf, $list), ); 1; } disjointClassExpressions: ClassExpression(2..) { $return = $item{'ClassExpression(2..)'}; 1; } ObjectPropertyAxiom: SubObjectPropertyOf | EquivalentObjectProperties | DisjointObjectProperties | InverseObjectProperties | ObjectPropertyDomain | ObjectPropertyRange | FunctionalObjectProperty | InverseFunctionalObjectProperty | ReflexiveObjectProperty | IrreflexiveObjectProperty | SymmetricObjectProperty | AsymmetricObjectProperty | TransitiveObjectProperty SubObjectPropertyOf: 'SubObjectPropertyOf' '(' axiomAnnotations subObjectPropertyExpression superObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subObjectPropertyExpression}, $RDFS->subPropertyOf, $item{superObjectPropertyExpression}), ); 1; } SubObjectPropertyOf: 'SubObjectPropertyOf' '(' axiomAnnotations 'ObjectPropertyChain' '(' ObjectPropertyExpression(2..) ')' superObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{'ObjectPropertyExpression(2..)'}); $a->( $item{axiomAnnotations}, $h->($item{superObjectPropertyExpression}, $OWL->propertyChainAxiom, $list), ); 1; } subObjectPropertyExpression: ObjectPropertyExpression superObjectPropertyExpression: ObjectPropertyExpression EquivalentObjectProperties: 'EquivalentObjectProperties' '(' axiomAnnotations ObjectPropertyExpression(2..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'ObjectPropertyExpression(2..)'} }) { foreach my $ce2 (@{ $item{'ObjectPropertyExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; } DisjointObjectProperties: 'DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression(2) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression(2)'}->[0], $OWL->propertyDisjointWith, $item{'ObjectPropertyExpression(2)'}->[1]), ); 1; } DisjointObjectProperties: 'DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression(3..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'ObjectPropertyExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; } ObjectPropertyDomain: 'ObjectPropertyDomain' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; } ObjectPropertyRange: 'ObjectPropertyRange' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->range, $item{ClassExpression}), ); 1; } InverseObjectProperties: 'InverseObjectProperties' '(' axiomAnnotations ObjectPropertyExpression(2) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression(2)'}->[0], $OWL->inverseOf, $item{'ObjectPropertyExpression(2)'}->[1]), ); 1; } FunctionalObjectProperty: 'FunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->FunctionalProperty), ); 1; } InverseFunctionalObjectProperty: 'InverseFunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->InverseFunctionalProperty), ); 1; } ReflexiveObjectProperty: 'ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->ReflexiveProperty), ); 1; } IrreflexiveObjectProperty: 'IrreflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->IrreflexiveProperty), ); 1; } SymmetricObjectProperty: 'SymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->SymmetricProperty), ); 1; } AsymmetricObjectProperty: 'AsymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->AsymmetricProperty), ); 1; } TransitiveObjectProperty: 'TransitiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->TransitiveProperty), ); 1; } DataPropertyAxiom: SubDataPropertyOf | EquivalentDataProperties | DisjointDataProperties | DataPropertyDomain | DataPropertyRange | FunctionalDataProperty SubDataPropertyOf: 'SubDataPropertyOf' '(' axiomAnnotations subDataPropertyExpression(2) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subDataPropertyExpression}, $RDFS->subPropertyOf, $item{superDataPropertyExpression}), ); 1; } subDataPropertyExpression: DataPropertyExpression superDataPropertyExpression: DataPropertyExpression EquivalentDataProperties: 'EquivalentDataProperties' '(' axiomAnnotations DataPropertyExpression(2..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'DataPropertyExpression(2..)'} }) { foreach my $ce2 (@{ $item{'DataPropertyExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; } DisjointDataProperties: 'DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression(2) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'DataPropertyExpression(2)'}->[0], $OWL->propertyDisjointWith, $item{'DataPropertyExpression(2)'}->[1]), ); 1; } DisjointDataProperties: 'DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression(3..) ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'DataPropertyExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; } DataPropertyDomain: 'DataPropertyDomain' '(' axiomAnnotations DataPropertyExpression ClassExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; } DataPropertyRange: 'DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->range, $item{DataRange}), ); 1; } FunctionalDataProperty: 'FunctionalDataProperty' '(' axiomAnnotations DataPropertyExpression ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDF->type, $OWL->FunctionalProperty), ); 1; } DatatypeDefinition: 'DatatypeDefinition' '(' axiomAnnotations Datatype DataRange ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Datatype}, $OWL->equivalentClass, $item{DataRange}), ); 1; } HasKey: 'HasKey' '(' axiomAnnotations ClassExpression '(' ObjectPropertyExpression(s?) ')' '(' DataPropertyExpression(s?) ')' ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my @list_items; push @list_items, @{$item{'ObjectPropertyExpression(s?)'}} if ref $item{'ObjectPropertyExpression(s?)'} eq 'ARRAY' && @{ $item{'ObjectPropertyExpression(s?)'} }; push @list_items, @{$item{'DataPropertyExpression(s?)'}} if ref $item{'DataPropertyExpression(s?)'} eq 'ARRAY' && @{ $item{'DataPropertyExpression(s?)'} }; my $list = $list_generator->($h, \@list_items); $a->( $item{axiomAnnotations}, $h->($item{ClassExpression}, $OWL->hasKey, $list), ); 1; } Assertion: SameIndividual | DifferentIndividuals | ClassAssertion | ObjectPropertyAssertion | NegativeObjectPropertyAssertion | DataPropertyAssertion | NegativeDataPropertyAssertion sourceIndividual: Individual targetIndividual: Individual targetValue: Literal SameIndividual: 'SameIndividual' '(' axiomAnnotations sourceIndividual targetIndividual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->sameAs, $item{targetIndividual}), ); 1; } DifferentIndividuals: 'DifferentIndividuals' '(' axiomAnnotations sourceIndividual targetIndividual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->differentFrom, $item{targetIndividual}), ); 1; } DifferentIndividuals: 'DifferentIndividuals' '(' axiomAnnotations Individual(2..) ')' ClassAssertion: 'ClassAssertion' '(' axiomAnnotations ClassExpression Individual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Individual}, $RDF->type, $item{ClassExpression}), ); 1; } ObjectPropertyAssertion: 'ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $item{ObjectPropertyExpression}, $item{targetIndividual}), ); 1; } NegativeObjectPropertyAssertion: 'NegativeObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')' { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->targetIndividual, $item{targetIndividual}); $a->($item{axiomAnnotations}, $x); 1; } DataPropertyAssertion: 'DataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')' { my $h = $thisparser->{TRIPLE}; $h->($item{sourceIndividual}, $item{DataPropertyExpression}, $item{targetValue}); 1; } NegativeDataPropertyAssertion: 'NegativeDataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')' { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{DataPropertyExpression}); $h->($x, $OWL->targetValue, $item{targetValue}); my $a = $thisparser->{ANNOTATE}; $a->($item{axiomAnnotations}, $x); 1; } RDF-Closure-0.001/lib/RDF/Trine/Parser/OwlFn/Compiled.pm0000644000076400007640000757420711663406017020532 0ustar taitaipackage RDF::Trine::Parser::OwlFn::Compiled; use Parse::RecDescent; { my $ERRORS; package Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled; use strict; use vars qw($skip $AUTOLOAD ); $skip = '\s*'; my $OWL = RDF::Trine::Namespace->new('http://www.w3.org/2002/07/owl#'); my $RDFS = RDF::Trine::Namespace->new('http://www.w3.org/2000/01/rdf-schema#'); my $RDF = RDF::Trine::Namespace->new('http://www.w3.org/1999/02/22-rdf-syntax-ns#'); my $XSD = RDF::Trine::Namespace->new('http://www.w3.org/2001/XMLSchema#'); my $declaredAnnotations; my %Prefixes = ( 'rdf:' => $RDF, 'rdfs:' => $RDFS, 'xsd:' => $XSD, 'owl:' => $OWL, ); sub _list_generator { my ($h, $items) = @_; my ($first, @rest) = @$items; return $RDF->nil unless $first; my $rv = RDF::Trine::Node::Blank->new; $h->($rv, $RDF->first, $first); $h->($rv, $RDF->rest, _list_generator($h, \@rest)); $rv; } my $list_generator = \&_list_generator; ; { local $SIG{__WARN__} = sub {0}; # PRETEND TO BE IN Parse::RecDescent NAMESPACE *Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AUTOLOAD = sub { no strict 'refs'; $AUTOLOAD =~ s/^Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled/Parse::RecDescent/; goto &{$AUTOLOAD}; } } push @Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ISA, 'Parse::RecDescent'; # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"IRI"}; Parse::RecDescent::_trace(q{Trying rule: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{IRI}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [fullIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{IRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{IRI}); %item = (__RULE__ => q{IRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [fullIRI]}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::fullIRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [fullIRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $item{q{fullIRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [fullIRI]<<}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [abbreviatedIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{IRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{IRI}); %item = (__RULE__ => q{IRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [abbreviatedIRI]}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::abbreviatedIRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [abbreviatedIRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $item{q{abbreviatedIRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my ($pfx, $sfx) = @{ $item{abbreviatedIRI} }; if ($Prefixes{$pfx}) { $return = $Prefixes{$pfx}->uri($sfx); } else { warn "Undefined prefix '${pfx}' at line ${thisline}."; $return = RDF::Trine::Node::Resource->new($pfx.$sfx); } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [abbreviatedIRI]<<}, Parse::RecDescent::_tracefirst($text), q{IRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{IRI}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{IRI}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{IRI}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{IRI}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataMaxCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataMaxCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [DataMaxCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataMaxCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataMaxCardinality}); %item = (__RULE__ => q{DataMaxCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataMaxCardinality']}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataMaxCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataRange]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataMaxCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataMaxCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataMaxCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::abbreviatedIRI { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"abbreviatedIRI"}; Parse::RecDescent::_trace(q{Trying rule: [abbreviatedIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [PNAME_LN]}, Parse::RecDescent::_tracefirst($_[1]), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{abbreviatedIRI}); %item = (__RULE__ => q{abbreviatedIRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [PNAME_LN]}, Parse::RecDescent::_tracefirst($text), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PNAME_LN($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [PNAME_LN]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; $item{q{PNAME_LN}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{PNAME_LN}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [PNAME_LN]<<}, Parse::RecDescent::_tracefirst($text), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{abbreviatedIRI}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{abbreviatedIRI}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{abbreviatedIRI}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnonymousIndividual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnonymousIndividual"}; Parse::RecDescent::_trace(q{Trying rule: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [nodeID]}, Parse::RecDescent::_tracefirst($_[1]), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnonymousIndividual}); %item = (__RULE__ => q{AnonymousIndividual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [nodeID]}, Parse::RecDescent::_tracefirst($text), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nodeID($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nodeID]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{nodeID}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Node::Blank->new($thisparser->{BPREFIX}.$item{nodeID}); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [nodeID]<<}, Parse::RecDescent::_tracefirst($text), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnonymousIndividual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnonymousIndividual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnonymousIndividual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectPropertyAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAssertion}); %item = (__RULE__ => q{ObjectPropertyAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectPropertyAssertion']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectPropertyAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetIndividual]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{targetIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $item{ObjectPropertyExpression}, $item{targetIndividual}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectPropertyAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectPropertyAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Assertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Assertion"}; Parse::RecDescent::_trace(q{Trying rule: [Assertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SameIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SameIndividual]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SameIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SameIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{SameIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SameIndividual]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DifferentIndividuals]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DifferentIndividuals]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DifferentIndividuals($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DifferentIndividuals]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{DifferentIndividuals}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DifferentIndividuals]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ClassAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ClassAssertion]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ClassAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [NegativeObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [NegativeObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NegativeObjectPropertyAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [NegativeObjectPropertyAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{NegativeObjectPropertyAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [NegativeObjectPropertyAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyAssertion]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [NegativeDataPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[6]; $text = $_[1]; my $_savetext; @item = (q{Assertion}); %item = (__RULE__ => q{Assertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [NegativeDataPropertyAssertion]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NegativeDataPropertyAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [NegativeDataPropertyAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $item{q{NegativeDataPropertyAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [NegativeDataPropertyAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{Assertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Assertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Assertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Assertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Assertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ontologyIRI { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ontologyIRI"}; Parse::RecDescent::_trace(q{Trying rule: [ontologyIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ontologyIRI}); %item = (__RULE__ => q{ontologyIRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{IRI}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ontologyIRI}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ontologyIRI}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ontologyIRI}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectHasValue { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectHasValue"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectHasValue]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectHasValue' '(' ObjectPropertyExpression Individual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectHasValue}); %item = (__RULE__ => q{ObjectHasValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectHasValue']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectHasValue//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Individual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Individual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasValue, $item{Individual}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectHasValue' '(' ObjectPropertyExpression Individual ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectHasValue}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectHasValue}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectHasValue}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyDomain { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataPropertyDomain"}; Parse::RecDescent::_trace(q{Trying rule: [DataPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataPropertyDomain' '(' axiomAnnotations DataPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyDomain}); %item = (__RULE__ => q{DataPropertyDomain}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataPropertyDomain']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataPropertyDomain//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataPropertyDomain' '(' axiomAnnotations DataPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataPropertyDomain}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataPropertyDomain}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyDomain { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectPropertyDomain"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectPropertyDomain' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyDomain}); %item = (__RULE__ => q{ObjectPropertyDomain}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectPropertyDomain']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectPropertyDomain//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectPropertyDomain' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectPropertyDomain}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectPropertyDomain}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::stringLiteralNoLanguage { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"stringLiteralNoLanguage"}; Parse::RecDescent::_trace(q{Trying rule: [stringLiteralNoLanguage]}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [quotedString]}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{stringLiteralNoLanguage}); %item = (__RULE__ => q{stringLiteralNoLanguage}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [quotedString]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::quotedString($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [quotedString]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; $item{q{quotedString}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Node::Literal->new($item{quotedString}); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [quotedString]<<}, Parse::RecDescent::_tracefirst($text), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{stringLiteralNoLanguage}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{stringLiteralNoLanguage}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{stringLiteralNoLanguage}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::prefixName { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"prefixName"}; Parse::RecDescent::_trace(q{Trying rule: [prefixName]}, Parse::RecDescent::_tracefirst($_[1]), q{prefixName}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [PNAME_NS]}, Parse::RecDescent::_tracefirst($_[1]), q{prefixName}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{prefixName}); %item = (__RULE__ => q{prefixName}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [PNAME_NS]}, Parse::RecDescent::_tracefirst($text), q{prefixName}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PNAME_NS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{prefixName}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [PNAME_NS]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{prefixName}, $tracelevel) if defined $::RD_TRACE; $item{q{PNAME_NS}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{prefixName}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{PNAME_NS}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [PNAME_NS]<<}, Parse::RecDescent::_tracefirst($text), q{prefixName}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{prefixName}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{prefixName}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{prefixName}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{prefixName}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::versionIRI { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"versionIRI"}; Parse::RecDescent::_trace(q{Trying rule: [versionIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{versionIRI}); %item = (__RULE__ => q{versionIRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [IRI]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{'IRI(?)'}->[0]; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{versionIRI}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{versionIRI}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{versionIRI}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{versionIRI}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"InverseObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [InverseObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectInverseOf' '(' ObjectProperty ')']}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{InverseObjectProperty}); %item = (__RULE__ => q{InverseObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectInverseOf']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectInverseOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $OWL->inverseOf, $item{ObjectProperty}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectInverseOf' '(' ObjectProperty ')']<<}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{InverseObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{InverseObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{InverseObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassAxiom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ClassAxiom"}; Parse::RecDescent::_trace(q{Trying rule: [ClassAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SubClassOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ClassAxiom}); %item = (__RULE__ => q{ClassAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SubClassOf]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubClassOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SubClassOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{SubClassOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SubClassOf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [EquivalentClasses]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{ClassAxiom}); %item = (__RULE__ => q{ClassAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [EquivalentClasses]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentClasses($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [EquivalentClasses]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{EquivalentClasses}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [EquivalentClasses]<<}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DisjointClasses]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{ClassAxiom}); %item = (__RULE__ => q{ClassAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DisjointClasses]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointClasses($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DisjointClasses]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DisjointClasses}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DisjointClasses]<<}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DisjointUnion]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{ClassAxiom}); %item = (__RULE__ => q{ClassAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DisjointUnion]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointUnion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DisjointUnion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DisjointUnion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DisjointUnion]<<}, Parse::RecDescent::_tracefirst($text), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ClassAxiom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ClassAxiom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ClassAxiom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')']}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationAssertion}); %item = (__RULE__ => q{AnnotationAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['AnnotationAssertion']}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAnnotationAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationSubject]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationSubject})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationSubject($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationSubject]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationSubject}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationValue]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationValue})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationSubject}, $item{AnnotationProperty}, $item{AnnotationValue}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['AnnotationAssertion' '(' axiomAnnotations AnnotationProperty AnnotationSubject AnnotationValue ')']<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectMaxCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectMaxCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectMaxCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectMaxCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectMaxCardinality}); %item = (__RULE__ => q{ObjectMaxCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectMaxCardinality']}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectMaxCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectMaxCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectMaxCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectMaxCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectMaxCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentObjectProperties { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"EquivalentObjectProperties"}; Parse::RecDescent::_trace(q{Trying rule: [EquivalentObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['EquivalentObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{EquivalentObjectProperties}); %item = (__RULE__ => q{EquivalentObjectProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['EquivalentObjectProperties']}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AEquivalentObjectProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'ObjectPropertyExpression(2..)'} }) { foreach my $ce2 (@{ $item{'ObjectPropertyExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['EquivalentObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{EquivalentObjectProperties}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{EquivalentObjectProperties}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{EquivalentObjectProperties}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataMinCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataMinCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [DataMinCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataMinCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataMinCardinality}); %item = (__RULE__ => q{DataMinCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataMinCardinality']}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataMinCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataRange]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataMinCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataMinCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataMinCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataMinCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DatatypeRestriction { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DatatypeRestriction"}; Parse::RecDescent::_trace(q{Trying rule: [DatatypeRestriction]}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DatatypeRestriction' '(' Datatype dtConstraint ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DatatypeRestriction}); %item = (__RULE__ => q{DatatypeRestriction}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DatatypeRestriction']}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADatatypeRestriction//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [Datatype]}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Datatype})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Datatype]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $item{q{Datatype}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [dtConstraint]}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{dtConstraint})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::dtConstraint, 1, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [dtConstraint]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $item{q{dtConstraint(s)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->onDatatype, $item{Datatype}); my @y; foreach my $constraint (@{$item{'dtConstraint(s)'}}) { my $y = RDF::Trine::Node::Blank->new; $h->($y, @$constraint); push @y, $y; } $h->($x, $OWL->withRestrictions, $list_generator->($h, \@y)); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DatatypeRestriction' '(' Datatype dtConstraint ')']<<}, Parse::RecDescent::_tracefirst($text), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DatatypeRestriction}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DatatypeRestriction}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DatatypeRestriction}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Individual"}; Parse::RecDescent::_trace(q{Trying rule: [Individual]}, Parse::RecDescent::_tracefirst($_[1]), q{Individual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [NamedIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{Individual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Individual}); %item = (__RULE__ => q{Individual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [NamedIndividual]}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NamedIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [NamedIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $item{q{NamedIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [NamedIndividual]<<}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{Individual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{Individual}); %item = (__RULE__ => q{Individual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnonymousIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnonymousIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $item{q{AnonymousIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnonymousIndividual]<<}, Parse::RecDescent::_tracefirst($text), q{Individual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Individual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Individual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Individual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Individual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ClassExpression"}; Parse::RecDescent::_trace(q{Trying rule: [ClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Class]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Class]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Class($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Class]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{Class}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Class]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectIntersectionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectIntersectionOf]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectIntersectionOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectIntersectionOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectIntersectionOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectIntersectionOf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectUnionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectUnionOf]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectUnionOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectUnionOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectUnionOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectUnionOf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectComplementOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectComplementOf]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectComplementOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectComplementOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectComplementOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectComplementOf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectOneOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectOneOf]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectOneOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectOneOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectOneOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectOneOf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectSomeValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectSomeValuesFrom]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectSomeValuesFrom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectSomeValuesFrom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectSomeValuesFrom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectSomeValuesFrom]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectAllValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[6]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectAllValuesFrom]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectAllValuesFrom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectAllValuesFrom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectAllValuesFrom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectAllValuesFrom]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectHasValue]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[7]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectHasValue]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectHasValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectHasValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectHasValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectHasValue]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectHasSelf]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[8]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectHasSelf]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectHasSelf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectHasSelf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectHasSelf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectHasSelf]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectMinCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[9]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectMinCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectMinCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectMinCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectMinCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectMinCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectMaxCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[10]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectMaxCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectMaxCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectMaxCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectMaxCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectMaxCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectExactCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[11]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectExactCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectExactCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectExactCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectExactCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectExactCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataSomeValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[12]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataSomeValuesFrom]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataSomeValuesFrom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataSomeValuesFrom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataSomeValuesFrom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataSomeValuesFrom]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataAllValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[13]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataAllValuesFrom]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataAllValuesFrom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataAllValuesFrom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataAllValuesFrom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataAllValuesFrom]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataHasValue]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[14]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataHasValue]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataHasValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataHasValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataHasValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataHasValue]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataMinCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[15]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataMinCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataMinCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataMinCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataMinCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataMinCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataMaxCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[16]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataMaxCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataMaxCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataMaxCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataMaxCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataMaxCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataExactCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[17]; $text = $_[1]; my $_savetext; @item = (q{ClassExpression}); %item = (__RULE__ => q{ClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataExactCardinality]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataExactCardinality($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataExactCardinality]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataExactCardinality}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataExactCardinality]<<}, Parse::RecDescent::_tracefirst($text), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ClassExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ClassExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ClassExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::annotationAnnotations { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"annotationAnnotations"}; Parse::RecDescent::_trace(q{Trying rule: [annotationAnnotations]}, Parse::RecDescent::_tracefirst($_[1]), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Annotation]}, Parse::RecDescent::_tracefirst($_[1]), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{annotationAnnotations}); %item = (__RULE__ => q{annotationAnnotations}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [Annotation]}, Parse::RecDescent::_tracefirst($text), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Annotation, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Annotation]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; $item{q{Annotation(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{'Annotation(s?)'}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [Annotation]<<}, Parse::RecDescent::_tracefirst($text), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{annotationAnnotations}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{annotationAnnotations}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{annotationAnnotations}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyExpression}); %item = (__RULE__ => q{DataPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataProperty]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataProperty]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationPropertyRange { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationPropertyRange"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['AnnotationPropertyRange' '(' axiomAnnotations AnnotationProperty IRI ')']}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationPropertyRange}); %item = (__RULE__ => q{AnnotationPropertyRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['AnnotationPropertyRange']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAnnotationPropertyRange//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{IRI})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->range, $item{IRI}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['AnnotationPropertyRange' '(' axiomAnnotations AnnotationProperty IRI ')']<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationPropertyRange}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationPropertyRange}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationPropertyRange}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::directlyImportsDocuments { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"directlyImportsDocuments"}; Parse::RecDescent::_trace(q{Trying rule: [directlyImportsDocuments]}, Parse::RecDescent::_tracefirst($_[1]), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [importStatement]}, Parse::RecDescent::_tracefirst($_[1]), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{directlyImportsDocuments}); %item = (__RULE__ => q{directlyImportsDocuments}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [importStatement]}, Parse::RecDescent::_tracefirst($text), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::importStatement, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [importStatement]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; $item{q{importStatement(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{'importStatement(s?)'}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [importStatement]<<}, Parse::RecDescent::_tracefirst($text), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{directlyImportsDocuments}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{directlyImportsDocuments}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{directlyImportsDocuments}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::languageTag { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"languageTag"}; Parse::RecDescent::_trace(q{Trying rule: [languageTag]}, Parse::RecDescent::_tracefirst($_[1]), q{languageTag}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['@' /[A-Z0-9]\{1,8\}(?:-[A-Z0-9]\{1,8\})*/i]}, Parse::RecDescent::_tracefirst($_[1]), q{languageTag}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{languageTag}); %item = (__RULE__ => q{languageTag}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['@']}, Parse::RecDescent::_tracefirst($text), q{languageTag}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\@//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: [/[A-Z0-9]\{1,8\}(?:-[A-Z0-9]\{1,8\})*/i]}, Parse::RecDescent::_tracefirst($text), q{languageTag}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{/[A-Z0-9]\{1,8\}(?:-[A-Z0-9]\{1,8\})*/i})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:[A-Z0-9]{1,8}(?:-[A-Z0-9]{1,8})*)//i) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{languageTag}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['@' /[A-Z0-9]\{1,8\}(?:-[A-Z0-9]\{1,8\})*/i]<<}, Parse::RecDescent::_tracefirst($text), q{languageTag}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{languageTag}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{languageTag}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{languageTag}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{languageTag}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetValue { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"targetValue"}; Parse::RecDescent::_trace(q{Trying rule: [targetValue]}, Parse::RecDescent::_tracefirst($_[1]), q{targetValue}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Literal]}, Parse::RecDescent::_tracefirst($_[1]), q{targetValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{targetValue}); %item = (__RULE__ => q{targetValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Literal]}, Parse::RecDescent::_tracefirst($text), q{targetValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{targetValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Literal]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{targetValue}, $tracelevel) if defined $::RD_TRACE; $item{q{Literal}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Literal]<<}, Parse::RecDescent::_tracefirst($text), q{targetValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{targetValue}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{targetValue}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{targetValue}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{targetValue}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NegativeDataPropertyAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"NegativeDataPropertyAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [NegativeDataPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['NegativeDataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')']}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{NegativeDataPropertyAssertion}); %item = (__RULE__ => q{NegativeDataPropertyAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['NegativeDataPropertyAssertion']}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ANegativeDataPropertyAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetValue]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetValue})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{targetValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{DataPropertyExpression}); $h->($x, $OWL->targetValue, $item{targetValue}); my $a = $thisparser->{ANNOTATE}; $a->($item{axiomAnnotations}, $x); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['NegativeDataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')']<<}, Parse::RecDescent::_tracefirst($text), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{NegativeDataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{NegativeDataPropertyAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{NegativeDataPropertyAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectUnionOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectUnionOf"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectUnionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectUnionOf' '(' ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectUnionOf}); %item = (__RULE__ => q{ObjectUnionOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectUnionOf']}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectUnionOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->unionOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectUnionOf' '(' ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectUnionOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectUnionOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectUnionOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationPropertyDomain { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationPropertyDomain"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['AnnotationPropertyDomain' '(' axiomAnnotations AnnotationProperty IRI ')']}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationPropertyDomain}); %item = (__RULE__ => q{AnnotationPropertyDomain}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['AnnotationPropertyDomain']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAnnotationPropertyDomain//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{IRI})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->domain, $item{IRI}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['AnnotationPropertyDomain' '(' axiomAnnotations AnnotationProperty IRI ')']<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationPropertyDomain}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationPropertyDomain}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationPropertyDomain}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataAllValuesFrom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataAllValuesFrom"}; Parse::RecDescent::_trace(q{Trying rule: [DataAllValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataAllValuesFrom' '(' DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataAllValuesFrom}); %item = (__RULE__ => q{DataAllValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataAllValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataAllValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataAllValuesFrom' '(' DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataAllValuesFrom' '(' DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DataAllValuesFrom}); %item = (__RULE__ => q{DataAllValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataAllValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataAllValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{'DataPropertyExpression(2)'}), ); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataAllValuesFrom' '(' DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataAllValuesFrom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataAllValuesFrom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectComplementOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectComplementOf"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectComplementOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectComplementOf' '(' ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectComplementOf}); %item = (__RULE__ => q{ObjectComplementOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectComplementOf']}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectComplementOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->complementOf, $item{ClassExpression}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectComplementOf' '(' ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectComplementOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectComplementOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectComplementOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Class { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Class"}; Parse::RecDescent::_trace(q{Trying rule: [Class]}, Parse::RecDescent::_tracefirst($_[1]), q{Class}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{Class}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Class}); %item = (__RULE__ => q{Class}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{Class}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Class}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Class}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{Class}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Class}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Class}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Class}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Class}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::quotedString { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"quotedString"}; Parse::RecDescent::_trace(q{Trying rule: [quotedString]}, Parse::RecDescent::_tracefirst($_[1]), q{quotedString}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['"' /(?:\\\\\\\\|\\\\"|[^\\\\\\\\\\\\"])*/ '"']}, Parse::RecDescent::_tracefirst($_[1]), q{quotedString}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{quotedString}); %item = (__RULE__ => q{quotedString}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['"']}, Parse::RecDescent::_tracefirst($text), q{quotedString}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\"//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: [/(?:\\\\\\\\|\\\\"|[^\\\\\\\\\\\\"])*/]}, Parse::RecDescent::_tracefirst($text), q{quotedString}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{/(?:\\\\\\\\|\\\\"|[^\\\\\\\\\\\\"])*/})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:(?:\\\\|\\"|[^\\\\\\"])*)//) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['"']}, Parse::RecDescent::_tracefirst($text), q{quotedString}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'"'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\"//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{quotedString}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; $return =~ s/\\([\\\"])/$1/g; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['"' /(?:\\\\\\\\|\\\\"|[^\\\\\\\\\\\\"])*/ '"']<<}, Parse::RecDescent::_tracefirst($text), q{quotedString}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{quotedString}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{quotedString}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{quotedString}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{quotedString}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superClassExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"superClassExpression"}; Parse::RecDescent::_trace(q{Trying rule: [superClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{superClassExpression}); %item = (__RULE__ => q{superClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ClassExpression]<<}, Parse::RecDescent::_tracefirst($text), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{superClassExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{superClassExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{superClassExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataSomeValuesFrom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataSomeValuesFrom"}; Parse::RecDescent::_trace(q{Trying rule: [DataSomeValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataSomeValuesFrom' '(' DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataSomeValuesFrom}); %item = (__RULE__ => q{DataSomeValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataSomeValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataSomeValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataSomeValuesFrom' '(' DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataSomeValuesFrom' '(' DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DataSomeValuesFrom}); %item = (__RULE__ => q{DataSomeValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataSomeValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataSomeValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{'DataPropertyExpression(2)'}), ); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataSomeValuesFrom' '(' DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataSomeValuesFrom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataSomeValuesFrom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Axiom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Axiom"}; Parse::RecDescent::_trace(q{Trying rule: [Axiom]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Declaration]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Declaration]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Declaration($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Declaration]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{Declaration}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Declaration]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ClassAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ClassAxiom]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassAxiom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassAxiom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassAxiom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ClassAxiom]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyAxiom]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyAxiom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyAxiom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyAxiom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyAxiom]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyAxiom]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyAxiom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyAxiom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyAxiom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyAxiom]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DatatypeDefinition]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DatatypeDefinition]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DatatypeDefinition($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DatatypeDefinition]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DatatypeDefinition}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DatatypeDefinition]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [HasKey]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [HasKey]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::HasKey($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [HasKey]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{HasKey}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [HasKey]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Assertion]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[6]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Assertion]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Assertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Assertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{Assertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Assertion]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[7]; $text = $_[1]; my $_savetext; @item = (q{Axiom}); %item = (__RULE__ => q{Axiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationAxiom]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationAxiom($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationAxiom]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationAxiom}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationAxiom]<<}, Parse::RecDescent::_tracefirst($text), q{Axiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Axiom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Axiom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Axiom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Axiom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ontologyAnnotations { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ontologyAnnotations"}; Parse::RecDescent::_trace(q{Trying rule: [ontologyAnnotations]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Annotation]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ontologyAnnotations}); %item = (__RULE__ => q{ontologyAnnotations}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [Annotation]}, Parse::RecDescent::_tracefirst($text), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Annotation, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Annotation]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; $item{q{Annotation(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = ref $item{'Annotation(s?)'} eq 'ARRAY' ? $item{'Annotation(s?)'} : []; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [Annotation]<<}, Parse::RecDescent::_tracefirst($text), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ontologyAnnotations}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ontologyAnnotations}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ontologyAnnotations}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::FunctionalDataProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"FunctionalDataProperty"}; Parse::RecDescent::_trace(q{Trying rule: [FunctionalDataProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['FunctionalDataProperty' '(' axiomAnnotations DataPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{FunctionalDataProperty}); %item = (__RULE__ => q{FunctionalDataProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['FunctionalDataProperty']}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AFunctionalDataProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDF->type, $OWL->FunctionalProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['FunctionalDataProperty' '(' axiomAnnotations DataPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{FunctionalDataProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{FunctionalDataProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{FunctionalDataProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Datatype"}; Parse::RecDescent::_trace(q{Trying rule: [Datatype]}, Parse::RecDescent::_tracefirst($_[1]), q{Datatype}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{Datatype}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Datatype}); %item = (__RULE__ => q{Datatype}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{Datatype}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Datatype}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Datatype}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{Datatype}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Datatype}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Datatype}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Datatype}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Datatype}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyRange { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectPropertyRange"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectPropertyRange' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyRange}); %item = (__RULE__ => q{ObjectPropertyRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectPropertyRange']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectPropertyRange//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->range, $item{ClassExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectPropertyRange' '(' axiomAnnotations ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectPropertyRange}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectPropertyRange}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectPropertyRange}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationValue { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationValue"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationValue]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationValue}); %item = (__RULE__ => q{AnnotationValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnonymousIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnonymousIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $item{q{AnonymousIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnonymousIndividual]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{AnnotationValue}); %item = (__RULE__ => q{AnnotationValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Literal]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{AnnotationValue}); %item = (__RULE__ => q{AnnotationValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Literal]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Literal]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $item{q{Literal}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Literal]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationValue}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationValue}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationValue}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DifferentIndividuals { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DifferentIndividuals"}; Parse::RecDescent::_trace(q{Trying rule: [DifferentIndividuals]}, Parse::RecDescent::_tracefirst($_[1]), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DifferentIndividuals' '(' axiomAnnotations sourceIndividual targetIndividual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DifferentIndividuals}); %item = (__RULE__ => q{DifferentIndividuals}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DifferentIndividuals']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADifferentIndividuals//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetIndividual]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $item{q{targetIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->differentFrom, $item{targetIndividual}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DifferentIndividuals' '(' axiomAnnotations sourceIndividual targetIndividual ')']<<}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DifferentIndividuals' '(' axiomAnnotations Individual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DifferentIndividuals}); %item = (__RULE__ => q{DifferentIndividuals}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DifferentIndividuals']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADifferentIndividuals//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{Individual})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Individual]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{>>Matched production: ['DifferentIndividuals' '(' axiomAnnotations Individual ')']<<}, Parse::RecDescent::_tracefirst($text), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DifferentIndividuals}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DifferentIndividuals}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DifferentIndividuals}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AsymmetricObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AsymmetricObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [AsymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['AsymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AsymmetricObjectProperty}); %item = (__RULE__ => q{AsymmetricObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['AsymmetricObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAsymmetricObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->AsymmetricProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['AsymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AsymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AsymmetricObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AsymmetricObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::versioningIRIs { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"versioningIRIs"}; Parse::RecDescent::_trace(q{Trying rule: [versioningIRIs]}, Parse::RecDescent::_tracefirst($_[1]), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ontologyIRI versionIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{versioningIRIs}); %item = (__RULE__ => q{versioningIRIs}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ontologyIRI]}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ontologyIRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ontologyIRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $item{q{ontologyIRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [versionIRI]}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{versionIRI})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::versionIRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [versionIRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $item{q{versionIRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = [$item{ontologyIRI}, $item{versionIRI}]; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [ontologyIRI versionIRI]<<}, Parse::RecDescent::_tracefirst($text), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{versioningIRIs}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{versioningIRIs}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{versioningIRIs}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ReflexiveObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ReflexiveObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [ReflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ReflexiveObjectProperty}); %item = (__RULE__ => q{ReflexiveObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ReflexiveObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AReflexiveObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->ReflexiveProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ReflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ReflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ReflexiveObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ReflexiveObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataOneOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataOneOf"}; Parse::RecDescent::_trace(q{Trying rule: [DataOneOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataOneOf' '(' Literal ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataOneOf}); %item = (__RULE__ => q{DataOneOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataOneOf']}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataOneOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [Literal]}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{Literal})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Literal]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $item{q{Literal(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'Literal(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->oneOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataOneOf' '(' Literal ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataOneOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataOneOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataOneOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectExactCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectExactCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectExactCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectExactCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectExactCardinality}); %item = (__RULE__ => q{ObjectExactCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectExactCardinality']}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectExactCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectExactCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectExactCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectExactCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectExactCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubObjectPropertyOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SubObjectPropertyOf"}; Parse::RecDescent::_trace(q{Trying rule: [SubObjectPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SubObjectPropertyOf' '(' axiomAnnotations subObjectPropertyExpression superObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SubObjectPropertyOf}); %item = (__RULE__ => q{SubObjectPropertyOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SubObjectPropertyOf']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASubObjectPropertyOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [subObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{subObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [subObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{subObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [superObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{superObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [superObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{superObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subObjectPropertyExpression}, $RDFS->subPropertyOf, $item{superObjectPropertyExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SubObjectPropertyOf' '(' axiomAnnotations subObjectPropertyExpression superObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SubObjectPropertyOf' '(' axiomAnnotations 'ObjectPropertyChain' '(' ObjectPropertyExpression ')' superObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{SubObjectPropertyOf}); %item = (__RULE__ => q{SubObjectPropertyOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SubObjectPropertyOf']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASubObjectPropertyOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: ['ObjectPropertyChain']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'ObjectPropertyChain'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectPropertyChain//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING4__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING5__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [superObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{superObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [superObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{superObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING6__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{'ObjectPropertyExpression(2..)'}); $a->( $item{axiomAnnotations}, $h->($item{superObjectPropertyExpression}, $OWL->propertyChainAxiom, $list), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SubObjectPropertyOf' '(' axiomAnnotations 'ObjectPropertyChain' '(' ObjectPropertyExpression ')' superObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SubObjectPropertyOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SubObjectPropertyOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SubObjectPropertyOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::stringLiteralWithLanguage { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"stringLiteralWithLanguage"}; Parse::RecDescent::_trace(q{Trying rule: [stringLiteralWithLanguage]}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [quotedString languageTag]}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{stringLiteralWithLanguage}); %item = (__RULE__ => q{stringLiteralWithLanguage}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [quotedString]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::quotedString($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [quotedString]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $item{q{quotedString}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [languageTag]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{languageTag})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::languageTag($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [languageTag]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $item{q{languageTag}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Node::Literal->new($item{quotedString}, $item{languageTag}); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [quotedString languageTag]<<}, Parse::RecDescent::_tracefirst($text), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{stringLiteralWithLanguage}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{stringLiteralWithLanguage}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{stringLiteralWithLanguage}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nodeID { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"nodeID"}; Parse::RecDescent::_trace(q{Trying rule: [nodeID]}, Parse::RecDescent::_tracefirst($_[1]), q{nodeID}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['_:' PN_LOCAL]}, Parse::RecDescent::_tracefirst($_[1]), q{nodeID}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{nodeID}); %item = (__RULE__ => q{nodeID}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['_:']}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A_\://) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [PN_LOCAL]}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{PN_LOCAL})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PN_LOCAL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [PN_LOCAL]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; $item{q{PN_LOCAL}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{PN_LOCAL}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['_:' PN_LOCAL]<<}, Parse::RecDescent::_tracefirst($text), q{nodeID}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{nodeID}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{nodeID}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{nodeID}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{nodeID}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PN_LOCAL { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"PN_LOCAL"}; Parse::RecDescent::_trace(q{Trying rule: [PN_LOCAL]}, Parse::RecDescent::_tracefirst($_[1]), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [/(?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*/i]}, Parse::RecDescent::_tracefirst($_[1]), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{PN_LOCAL}); %item = (__RULE__ => q{PN_LOCAL}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: [/(?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*/i]}, Parse::RecDescent::_tracefirst($text), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:(?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*)//i) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [/(?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*/i]<<}, Parse::RecDescent::_tracefirst($text), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{PN_LOCAL}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{PN_LOCAL}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{PN_LOCAL}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::HasKey { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"HasKey"}; Parse::RecDescent::_trace(q{Trying rule: [HasKey]}, Parse::RecDescent::_tracefirst($_[1]), q{HasKey}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['HasKey' '(' axiomAnnotations ClassExpression '(' ObjectPropertyExpression ')' '(' DataPropertyExpression ')' ')']}, Parse::RecDescent::_tracefirst($_[1]), q{HasKey}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{HasKey}); %item = (__RULE__ => q{HasKey}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['HasKey']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AHasKey//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING4__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING5__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING6__}=$&; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING7__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my @list_items; push @list_items, @{$item{'ObjectPropertyExpression(s?)'}} if ref $item{'ObjectPropertyExpression(s?)'} eq 'ARRAY' && @{ $item{'ObjectPropertyExpression(s?)'} }; push @list_items, @{$item{'DataPropertyExpression(s?)'}} if ref $item{'DataPropertyExpression(s?)'} eq 'ARRAY' && @{ $item{'DataPropertyExpression(s?)'} }; my $list = $list_generator->($h, \@list_items); $a->( $item{axiomAnnotations}, $h->($item{ClassExpression}, $OWL->hasKey, $list), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['HasKey' '(' axiomAnnotations ClassExpression '(' ObjectPropertyExpression ')' '(' DataPropertyExpression ')' ')']<<}, Parse::RecDescent::_tracefirst($text), q{HasKey}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{HasKey}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{HasKey}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{HasKey}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{HasKey}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::prefixDeclaration { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"prefixDeclaration"}; Parse::RecDescent::_trace(q{Trying rule: [prefixDeclaration]}, Parse::RecDescent::_tracefirst($_[1]), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Prefix' '(' prefixName '=' fullIRI ')']}, Parse::RecDescent::_tracefirst($_[1]), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{prefixDeclaration}); %item = (__RULE__ => q{prefixDeclaration}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Prefix']}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\APrefix//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [prefixName]}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{prefixName})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::prefixName($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [prefixName]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $item{q{prefixName}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: ['=']}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'='})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\=//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [fullIRI]}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{fullIRI})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::fullIRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [fullIRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $item{q{fullIRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING4__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { if (defined $Prefixes{ $item{prefixName} }) { warn(sprintf("Ignoring attempt to redeclare prefix '%s'.", $item{prefixName})); } else { my $u = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); $Prefixes{ $item{prefixName} } = RDF::Trine::Namespace->new($u->uri); $thisparser->{PREFIX}->($item{prefixName}, $item{fullIRI}); } $return = \%item; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Prefix' '(' prefixName '=' fullIRI ')']<<}, Parse::RecDescent::_tracefirst($text), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{prefixDeclaration}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{prefixDeclaration}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{prefixDeclaration}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::dtConstraint { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"dtConstraint"}; Parse::RecDescent::_trace(q{Trying rule: [dtConstraint]}, Parse::RecDescent::_tracefirst($_[1]), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [constrainingFacet restrictionValue]}, Parse::RecDescent::_tracefirst($_[1]), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{dtConstraint}); %item = (__RULE__ => q{dtConstraint}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [constrainingFacet]}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::constrainingFacet($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [constrainingFacet]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $item{q{constrainingFacet}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [restrictionValue]}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{restrictionValue})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::restrictionValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [restrictionValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $item{q{restrictionValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = [ $item{constrainingFacet}, $item{restrictionValue} ]; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [constrainingFacet restrictionValue]<<}, Parse::RecDescent::_tracefirst($text), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{dtConstraint}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{dtConstraint}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{dtConstraint}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::constrainingFacet { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"constrainingFacet"}; Parse::RecDescent::_trace(q{Trying rule: [constrainingFacet]}, Parse::RecDescent::_tracefirst($_[1]), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{constrainingFacet}); %item = (__RULE__ => q{constrainingFacet}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{constrainingFacet}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{constrainingFacet}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{constrainingFacet}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superAnnotationProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"superAnnotationProperty"}; Parse::RecDescent::_trace(q{Trying rule: [superAnnotationProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{superAnnotationProperty}); %item = (__RULE__ => q{superAnnotationProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationProperty]<<}, Parse::RecDescent::_tracefirst($text), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{superAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{superAnnotationProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{superAnnotationProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseObjectProperties { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"InverseObjectProperties"}; Parse::RecDescent::_trace(q{Trying rule: [InverseObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['InverseObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{InverseObjectProperties}); %item = (__RULE__ => q{InverseObjectProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['InverseObjectProperties']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AInverseObjectProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 2, 2, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(2)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression(2)'}->[0], $OWL->inverseOf, $item{'ObjectPropertyExpression(2)'}->[1]), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['InverseObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{InverseObjectProperties}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{InverseObjectProperties}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{InverseObjectProperties}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectMinCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectMinCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectMinCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectMinCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectMinCardinality}); %item = (__RULE__ => q{ObjectMinCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectMinCardinality']}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectMinCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectMinCardinality' '(' nonNegativeInteger ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectMinCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectMinCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectMinCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectHasSelf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectHasSelf"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectHasSelf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectHasSelf' '(' ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectHasSelf}); %item = (__RULE__ => q{ObjectHasSelf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectHasSelf']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectHasSelf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasSelf, RDF::Trine::Node::Literal->new('true', undef, $XSD->boolean->uri)); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectHasSelf' '(' ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectHasSelf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectHasSelf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectHasSelf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DatatypeDefinition { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DatatypeDefinition"}; Parse::RecDescent::_trace(q{Trying rule: [DatatypeDefinition]}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DatatypeDefinition' '(' axiomAnnotations Datatype DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DatatypeDefinition}); %item = (__RULE__ => q{DatatypeDefinition}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DatatypeDefinition']}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADatatypeDefinition//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Datatype]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Datatype})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Datatype]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $item{q{Datatype}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Datatype}, $OWL->equivalentClass, $item{DataRange}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DatatypeDefinition' '(' axiomAnnotations Datatype DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DatatypeDefinition}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DatatypeDefinition}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DatatypeDefinition}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::TransitiveObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"TransitiveObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [TransitiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['TransitiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{TransitiveObjectProperty}); %item = (__RULE__ => q{TransitiveObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['TransitiveObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ATransitiveObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->TransitiveProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['TransitiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{TransitiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{TransitiveObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{TransitiveObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyExpression}); %item = (__RULE__ => q{ObjectPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [InverseObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyExpression}); %item = (__RULE__ => q{ObjectPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [InverseObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [InverseObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{InverseObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [InverseObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PNAME_NS { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"PNAME_NS"}; Parse::RecDescent::_trace(q{Trying rule: [PNAME_NS]}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [/(?:[A-Z](?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*)?:/i]}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{PNAME_NS}); %item = (__RULE__ => q{PNAME_NS}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: [/(?:[A-Z](?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*)?:/i]}, Parse::RecDescent::_tracefirst($text), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:(?:[A-Z](?:[A-Z0-9_]|[\x{00C0}-\x{00D6}]|[\x{00D8}-\x{00F6}]|[\x{00F8}-\x{02FF}]|[\x{0370}-\x{037D}]|[\x{037F}-\x{1FFF}]|[\x{200C}-\x{200D}]|[\x{2070}-\x{218F}]|[\x{2C00}-\x{2FEF}]|[\x{3001}-\x{D7FF}]|[\x{F900}-\x{FDCF}]|[\x{FDF0}-\x{FFFD}]|[\x{10000}-\x{EFFFF}])*)?:)//i) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [/(?:[A-Z](?:[A-Z0-9_]|[\\x\{00C0\}-\\x\{00D6\}]|[\\x\{00D8\}-\\x\{00F6\}]|[\\x\{00F8\}-\\x\{02FF\}]|[\\x\{0370\}-\\x\{037D\}]|[\\x\{037F\}-\\x\{1FFF\}]|[\\x\{200C\}-\\x\{200D\}]|[\\x\{2070\}-\\x\{218F\}]|[\\x\{2C00\}-\\x\{2FEF\}]|[\\x\{3001\}-\\x\{D7FF\}]|[\\x\{F900\}-\\x\{FDCF\}]|[\\x\{FDF0\}-\\x\{FFFD\}]|[\\x\{10000\}-\\x\{EFFFF\}])*)?:/i]<<}, Parse::RecDescent::_tracefirst($text), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{PNAME_NS}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{PNAME_NS}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{PNAME_NS}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Annotation { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Annotation"}; Parse::RecDescent::_trace(q{Trying rule: [Annotation]}, Parse::RecDescent::_tracefirst($_[1]), q{Annotation}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Annotation}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Annotation}); %item = (__RULE__ => q{Annotation}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Annotation']}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAnnotation//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [annotationAnnotations]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{annotationAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::annotationAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [annotationAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $item{q{annotationAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [AnnotationValue]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationValue})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = { template => RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new('subject'), $item{AnnotationProperty}, $item{AnnotationValue}, ), annotationAnnotations => $item{annotationAnnotations} }; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Annotation' '(' annotationAnnotations AnnotationProperty AnnotationValue ')']<<}, Parse::RecDescent::_tracefirst($text), q{Annotation}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Annotation}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Annotation}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Annotation}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Annotation}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Ontology { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Ontology"}; Parse::RecDescent::_trace(q{Trying rule: [Ontology]}, Parse::RecDescent::_tracefirst($_[1]), q{Ontology}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Ontology' '(' versioningIRIs directlyImportsDocuments ontologyAnnotations axioms ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Ontology}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Ontology}); %item = (__RULE__ => q{Ontology}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Ontology']}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AOntology//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [versioningIRIs]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{versioningIRIs})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::versioningIRIs, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [versioningIRIs]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $item{q{versioningIRIs(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying subrule: [directlyImportsDocuments]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{directlyImportsDocuments})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::directlyImportsDocuments($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [directlyImportsDocuments]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $item{q{directlyImportsDocuments}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ontologyAnnotations]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ontologyAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ontologyAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ontologyAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $item{q{ontologyAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [axioms]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axioms})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axioms($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axioms]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $item{q{axioms}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my ($ont_iri, $ver_iri) = $item{'versioningIRIs(?)'}->[0] && @{ $item{'versioningIRIs(?)'}->[0] } ? @{ $item{'versioningIRIs(?)'}->[0] } : (RDF::Trine::Node::Blank->new); $h->($ont_iri, $RDF->type, $OWL->Ontology); if (ref $ver_iri) { $h->($ont_iri, $OWL->versionIRI, $ver_iri); } foreach my $st (@{ $item{'directlyImportsDocuments'} }) { my $import = $st->bind_variables({ ontology => $ont_iri }); $h->($import); } foreach my $ann (@{ $item{'ontologyAnnotations'} }) { my $st = $ann->{template}->bind_variables({ subject => $ont_iri }); $h->($st, 2); if (ref $ann->{annotationAnnotations} eq 'ARRAY' and @{ $ann->{annotationAnnotations} }) { $thisparser->{ANNOTATE}->($ann->{annotationAnnotations}, $st, 4); } } $return = \%item; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Ontology' '(' versioningIRIs directlyImportsDocuments ontologyAnnotations axioms ')']<<}, Parse::RecDescent::_tracefirst($text), q{Ontology}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Ontology}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Ontology}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Ontology}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Ontology}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationSubject { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationSubject"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationSubject]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationSubject}); %item = (__RULE__ => q{AnnotationSubject}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{AnnotationSubject}); %item = (__RULE__ => q{AnnotationSubject}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnonymousIndividual]}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnonymousIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnonymousIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $item{q{AnonymousIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnonymousIndividual]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationSubject}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationSubject}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationSubject}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subClassExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"subClassExpression"}; Parse::RecDescent::_trace(q{Trying rule: [subClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{subClassExpression}); %item = (__RULE__ => q{subClassExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ClassExpression]<<}, Parse::RecDescent::_tracefirst($text), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{subClassExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{subClassExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{subClassExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::booleanLiteral { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"booleanLiteral"}; Parse::RecDescent::_trace(q{Trying rule: [booleanLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [/(true|false|yes|no)/i]}, Parse::RecDescent::_tracefirst($_[1]), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{booleanLiteral}); %item = (__RULE__ => q{booleanLiteral}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: [/(true|false|yes|no)/i]}, Parse::RecDescent::_tracefirst($text), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:(true|false|yes|no))//i) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { if ($item{__PATTERN1__} =~ /(true|yes)/i) { $return = RDF::Trine::Node::Literal->new('true', undef, $XSD->boolean->uri); } elsif ($item{__PATTERN1__} =~ /(false|no)/i) { $return = RDF::Trine::Node::Literal->new('false', undef, $XSD->boolean->uri); } else { die "huh?"; } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [/(true|false|yes|no)/i]<<}, Parse::RecDescent::_tracefirst($text), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{booleanLiteral}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{booleanLiteral}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{booleanLiteral}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointDataProperties { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DisjointDataProperties"}; Parse::RecDescent::_trace(q{Trying rule: [DisjointDataProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DisjointDataProperties}); %item = (__RULE__ => q{DisjointDataProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointDataProperties']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointDataProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 2, 2, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(2)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'DataPropertyExpression(2)'}->[0], $OWL->propertyDisjointWith, $item{'DataPropertyExpression(2)'}->[1]), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DisjointDataProperties}); %item = (__RULE__ => q{DisjointDataProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointDataProperties']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointDataProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 3, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(3..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'DataPropertyExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointDataProperties' '(' axiomAnnotations DataPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DisjointDataProperties}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DisjointDataProperties}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DisjointDataProperties}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataUnionOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataUnionOf"}; Parse::RecDescent::_trace(q{Trying rule: [DataUnionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataUnionOf' '(' DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataUnionOf}); %item = (__RULE__ => q{DataUnionOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataUnionOf']}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataUnionOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataRange]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'DataRange(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->unionOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataUnionOf' '(' DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataUnionOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataUnionOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataUnionOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IrreflexiveObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"IrreflexiveObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [IrreflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['IrreflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{IrreflexiveObjectProperty}); %item = (__RULE__ => q{IrreflexiveObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['IrreflexiveObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AIrreflexiveObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->IrreflexiveProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['IrreflexiveObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{IrreflexiveObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{IrreflexiveObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{IrreflexiveObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SymmetricObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SymmetricObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [SymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SymmetricObjectProperty}); %item = (__RULE__ => q{SymmetricObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SymmetricObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASymmetricObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->SymmetricProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SymmetricObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SymmetricObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SymmetricObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SymmetricObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectOneOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectOneOf"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectOneOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectOneOf' '(' Individual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectOneOf}); %item = (__RULE__ => q{ObjectOneOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectOneOf']}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectOneOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{Individual})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual, 1, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Individual]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual(s)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->oneOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectOneOf' '(' Individual ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectOneOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectOneOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectOneOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"nonNegativeInteger"}; Parse::RecDescent::_trace(q{Trying rule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($_[1]), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [/\\d+/]}, Parse::RecDescent::_tracefirst($_[1]), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{nonNegativeInteger}); %item = (__RULE__ => q{nonNegativeInteger}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: [/\\d+/]}, Parse::RecDescent::_tracefirst($text), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:\d+)//) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [/\\d+/]<<}, Parse::RecDescent::_tracefirst($text), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{nonNegativeInteger}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{nonNegativeInteger}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{nonNegativeInteger}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"sourceIndividual"}; Parse::RecDescent::_trace(q{Trying rule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Individual]}, Parse::RecDescent::_tracefirst($_[1]), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{sourceIndividual}); %item = (__RULE__ => q{sourceIndividual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Individual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Individual]<<}, Parse::RecDescent::_tracefirst($text), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{sourceIndividual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{sourceIndividual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{sourceIndividual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subAnnotationProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"subAnnotationProperty"}; Parse::RecDescent::_trace(q{Trying rule: [subAnnotationProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{subAnnotationProperty}); %item = (__RULE__ => q{subAnnotationProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationProperty]<<}, Parse::RecDescent::_tracefirst($text), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{subAnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{subAnnotationProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{subAnnotationProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NamedIndividual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"NamedIndividual"}; Parse::RecDescent::_trace(q{Trying rule: [NamedIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{NamedIndividual}); %item = (__RULE__ => q{NamedIndividual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{NamedIndividual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{NamedIndividual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{NamedIndividual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetIndividual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"targetIndividual"}; Parse::RecDescent::_trace(q{Trying rule: [targetIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Individual]}, Parse::RecDescent::_tracefirst($_[1]), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{targetIndividual}); %item = (__RULE__ => q{targetIndividual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Individual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Individual]<<}, Parse::RecDescent::_tracefirst($text), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{targetIndividual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{targetIndividual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{targetIndividual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataIntersectionOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataIntersectionOf"}; Parse::RecDescent::_trace(q{Trying rule: [DataIntersectionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataIntersectionOf' '(' DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataIntersectionOf}); %item = (__RULE__ => q{DataIntersectionOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataIntersectionOf']}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataIntersectionOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataRange]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'DataRange(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataIntersectionOf' '(' DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataIntersectionOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataIntersectionOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentClasses { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"EquivalentClasses"}; Parse::RecDescent::_trace(q{Trying rule: [EquivalentClasses]}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['EquivalentClasses' '(' axiomAnnotations ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{EquivalentClasses}); %item = (__RULE__ => q{EquivalentClasses}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['EquivalentClasses']}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AEquivalentClasses//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'ClassExpression(2..)'} }) { foreach my $ce2 (@{ $item{'ClassExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentClass, $ce2), ); } } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['EquivalentClasses' '(' axiomAnnotations ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{EquivalentClasses}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{EquivalentClasses}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{EquivalentClasses}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataHasValue { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataHasValue"}; Parse::RecDescent::_trace(q{Trying rule: [DataHasValue]}, Parse::RecDescent::_tracefirst($_[1]), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataHasValue' '(' DataPropertyExpression Literal ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataHasValue}); %item = (__RULE__ => q{DataHasValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataHasValue']}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataHasValue//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Literal]}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Literal})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Literal]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $item{q{Literal}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->hasValue, $item{Literal}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataHasValue' '(' DataPropertyExpression Literal ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataHasValue}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataHasValue}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataHasValue}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::importStatement { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"importStatement"}; Parse::RecDescent::_trace(q{Trying rule: [importStatement]}, Parse::RecDescent::_tracefirst($_[1]), q{importStatement}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Import' '(' IRI ')']}, Parse::RecDescent::_tracefirst($_[1]), q{importStatement}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{importStatement}); %item = (__RULE__ => q{importStatement}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Import']}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AImport//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{IRI})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new('ontology'), $OWL->imports, $item{IRI}, ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Import' '(' IRI ')']<<}, Parse::RecDescent::_tracefirst($text), q{importStatement}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{importStatement}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{importStatement}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{importStatement}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{importStatement}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataRange"}; Parse::RecDescent::_trace(q{Trying rule: [DataRange]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Datatype]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Datatype]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Datatype]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{Datatype}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Datatype]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataIntersectionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataIntersectionOf]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataIntersectionOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataIntersectionOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataIntersectionOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataIntersectionOf]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataUnionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataUnionOf]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataUnionOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataUnionOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataUnionOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataUnionOf]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataComplementOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataComplementOf]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataComplementOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataComplementOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataComplementOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataComplementOf]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataOneOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataOneOf]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataOneOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataOneOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataOneOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataOneOf]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DatatypeRestriction]}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{DataRange}); %item = (__RULE__ => q{DataRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DatatypeRestriction]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DatatypeRestriction($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DatatypeRestriction]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DatatypeRestriction}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DatatypeRestriction]<<}, Parse::RecDescent::_tracefirst($text), q{DataRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataRange}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataRange}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataRange}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataRange}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseFunctionalObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"InverseFunctionalObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [InverseFunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['InverseFunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{InverseFunctionalObjectProperty}); %item = (__RULE__ => q{InverseFunctionalObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['InverseFunctionalObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AInverseFunctionalObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->InverseFunctionalProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['InverseFunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{InverseFunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{InverseFunctionalObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{InverseFunctionalObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::FunctionalObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"FunctionalObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [FunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['FunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{FunctionalObjectProperty}); %item = (__RULE__ => q{FunctionalObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['FunctionalObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AFunctionalObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression'}, $RDF->type, $OWL->FunctionalProperty), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['FunctionalObjectProperty' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{FunctionalObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{FunctionalObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{FunctionalObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationAxiom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationAxiom"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationAxiom}); %item = (__RULE__ => q{AnnotationAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationAssertion]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationAssertion($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationAssertion]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationAssertion}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationAssertion]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SubAnnotationPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{AnnotationAxiom}); %item = (__RULE__ => q{AnnotationAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SubAnnotationPropertyOf]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubAnnotationPropertyOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SubAnnotationPropertyOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{SubAnnotationPropertyOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SubAnnotationPropertyOf]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{AnnotationAxiom}); %item = (__RULE__ => q{AnnotationAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationPropertyDomain]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationPropertyDomain($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationPropertyDomain]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationPropertyDomain}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationPropertyDomain]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AnnotationPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{AnnotationAxiom}); %item = (__RULE__ => q{AnnotationAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationPropertyRange]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationPropertyRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationPropertyRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationPropertyRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AnnotationPropertyRange]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationAxiom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationAxiom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationAxiom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubDataPropertyOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SubDataPropertyOf"}; Parse::RecDescent::_trace(q{Trying rule: [SubDataPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SubDataPropertyOf' '(' axiomAnnotations subDataPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SubDataPropertyOf}); %item = (__RULE__ => q{SubDataPropertyOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SubDataPropertyOf']}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASubDataPropertyOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [subDataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{subDataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subDataPropertyExpression, 2, 2, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [subDataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{subDataPropertyExpression(2)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subDataPropertyExpression}, $RDFS->subPropertyOf, $item{superDataPropertyExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SubDataPropertyOf' '(' axiomAnnotations subDataPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SubDataPropertyOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SubDataPropertyOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SubDataPropertyOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ontologyDocument { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ontologyDocument"}; Parse::RecDescent::_trace(q{Trying rule: [ontologyDocument]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip; Parse::RecDescent::_trace(q{Trying production: [ prefixDeclaration Ontology]}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ontologyDocument}); %item = (__RULE__ => q{ontologyDocument}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying directive: []}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $_tok = do { my $oldskip = $skip; $skip=qr{\s*(?:/[*].*?[*]/\s*)*(?:#[^\n]*\n\s*)*\s*}; $oldskip }; if (defined($_tok)) { Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; } else { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; } last unless defined $_tok; push @item, $item{__DIRECTIVE1__}=$_tok; Parse::RecDescent::_trace(q{Trying repeated subrule: [prefixDeclaration]}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{prefixDeclaration})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::prefixDeclaration, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [prefixDeclaration]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $item{q{prefixDeclaration(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying repeated subrule: [Ontology]}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{Ontology})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Ontology, 1, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Ontology]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $item{q{Ontology(s)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = \%item; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [ prefixDeclaration Ontology]<<}, Parse::RecDescent::_tracefirst($text), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ontologyDocument}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ontologyDocument}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ontologyDocument}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointClasses { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DisjointClasses"}; Parse::RecDescent::_trace(q{Trying rule: [DisjointClasses]}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointClasses' '(' axiomAnnotations ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DisjointClasses}); %item = (__RULE__ => q{DisjointClasses}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointClasses']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointClasses//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 2, 2, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(2)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ClassExpression(2)'}->[0], $OWL->disjointWith, $item{'ClassExpression(2)'}->[1]), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointClasses' '(' axiomAnnotations ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointClasses' '(' axiomAnnotations ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DisjointClasses}); %item = (__RULE__ => q{DisjointClasses}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointClasses']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointClasses//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 3, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(3..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'ClassExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointClasses); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointClasses' '(' axiomAnnotations ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DisjointClasses}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DisjointClasses}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DisjointClasses}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointObjectProperties { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DisjointObjectProperties"}; Parse::RecDescent::_trace(q{Trying rule: [DisjointObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DisjointObjectProperties}); %item = (__RULE__ => q{DisjointObjectProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointObjectProperties']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointObjectProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 2, 2, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(2)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{'ObjectPropertyExpression(2)'}->[0], $OWL->propertyDisjointWith, $item{'ObjectPropertyExpression(2)'}->[1]), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DisjointObjectProperties}); %item = (__RULE__ => q{DisjointObjectProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointObjectProperties']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointObjectProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression, 3, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ObjectPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression(3..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{'ObjectPropertyExpression(3..)'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointObjectProperties' '(' axiomAnnotations ObjectPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DisjointObjectProperties}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DisjointObjectProperties}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DisjointObjectProperties}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Declaration { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Declaration"}; Parse::RecDescent::_trace(q{Trying rule: [Declaration]}, Parse::RecDescent::_tracefirst($_[1]), q{Declaration}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Declaration' '(' axiomAnnotationsD Entity ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Declaration}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Declaration}); %item = (__RULE__ => q{Declaration}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Declaration']}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADeclaration//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotationsD]}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotationsD})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotationsD($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotationsD]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotationsD}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Entity]}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Entity})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Entity($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Entity]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $item{q{Entity}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{>>Matched production: ['Declaration' '(' axiomAnnotationsD Entity ')']<<}, Parse::RecDescent::_tracefirst($text), q{Declaration}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Declaration}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Declaration}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Declaration}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Declaration}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::restrictionValue { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"restrictionValue"}; Parse::RecDescent::_trace(q{Trying rule: [restrictionValue]}, Parse::RecDescent::_tracefirst($_[1]), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Literal]}, Parse::RecDescent::_tracefirst($_[1]), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{restrictionValue}); %item = (__RULE__ => q{restrictionValue}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [Literal]}, Parse::RecDescent::_tracefirst($text), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Literal]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; $item{q{Literal}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [Literal]<<}, Parse::RecDescent::_tracefirst($text), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{restrictionValue}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{restrictionValue}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{restrictionValue}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectIntersectionOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectIntersectionOf"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectIntersectionOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectIntersectionOf' '(' ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectIntersectionOf}); %item = (__RULE__ => q{ObjectIntersectionOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectIntersectionOf']}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectIntersectionOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{'ClassExpression(2..)'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectIntersectionOf' '(' ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectIntersectionOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectIntersectionOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectIntersectionOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superObjectPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"superObjectPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [superObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{superObjectPropertyExpression}); %item = (__RULE__ => q{superObjectPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyExpression]<<}, Parse::RecDescent::_tracefirst($text), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{superObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{superObjectPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{superObjectPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subObjectPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"subObjectPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [subObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{subObjectPropertyExpression}); %item = (__RULE__ => q{subObjectPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyExpression]<<}, Parse::RecDescent::_tracefirst($text), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{subObjectPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{subObjectPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{subObjectPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::typedLiteral { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"typedLiteral"}; Parse::RecDescent::_trace(q{Trying rule: [typedLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [lexicalForm '^^' Datatype]}, Parse::RecDescent::_tracefirst($_[1]), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{typedLiteral}); %item = (__RULE__ => q{typedLiteral}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [lexicalForm]}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::lexicalForm($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [lexicalForm]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $item{q{lexicalForm}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: ['^^']}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'^^'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\^\^//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [Datatype]}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Datatype})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Datatype]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $item{q{Datatype}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { if ($item{Datatype}->equal($RDF->PlainLiteral)) { my ($lex, $lang) = ($item{lexicalForm} =~ m{^(.*)\@([^@]*)$}); $return = RDF::Trine::Node::Literal->new($lex, $lang) } else { $return = RDF::Trine::Node::Literal->new($item{lexicalForm}, undef, $item{Datatype}->uri); } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [lexicalForm '^^' Datatype]<<}, Parse::RecDescent::_tracefirst($text), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{typedLiteral}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{typedLiteral}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{typedLiteral}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PNAME_LN { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"PNAME_LN"}; Parse::RecDescent::_trace(q{Trying rule: [PNAME_LN]}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { local $skip = defined($skip) ? $skip : $Parse::RecDescent::skip; Parse::RecDescent::_trace(q{Trying production: [PNAME_NS PN_LOCAL]}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{PNAME_LN}); %item = (__RULE__ => q{PNAME_LN}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [PNAME_NS]}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PNAME_NS($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [PNAME_NS]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $item{q{PNAME_NS}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying directive: []}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $_tok = do { my $oldskip = $skip; $skip=''; $oldskip }; if (defined($_tok)) { Parse::RecDescent::_trace(q{>>Matched directive<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; } else { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; } last unless defined $_tok; push @item, $item{__DIRECTIVE1__}=$_tok; Parse::RecDescent::_trace(q{Trying subrule: [PN_LOCAL]}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{PN_LOCAL})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::PN_LOCAL($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [PN_LOCAL]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $item{q{PN_LOCAL}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = [ $item{PNAME_NS}, $item{PN_LOCAL} ]; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [PNAME_NS PN_LOCAL]<<}, Parse::RecDescent::_tracefirst($text), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{PNAME_LN}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{PNAME_LN}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{PNAME_LN}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubAnnotationPropertyOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SubAnnotationPropertyOf"}; Parse::RecDescent::_trace(q{Trying rule: [SubAnnotationPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SubAnnotationPropertyOf' '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SubAnnotationPropertyOf}); %item = (__RULE__ => q{SubAnnotationPropertyOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SubAnnotationPropertyOf']}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASubAnnotationPropertyOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [subAnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{subAnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subAnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [subAnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{subAnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [superAnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{superAnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superAnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [superAnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $item{q{superAnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subAnnotationProperty}, $RDFS->subPropertyOf, $item{superAnnotationProperty}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SubAnnotationPropertyOf' '(' axiomAnnotations subAnnotationProperty superAnnotationProperty ')']<<}, Parse::RecDescent::_tracefirst($text), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SubAnnotationPropertyOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SubAnnotationPropertyOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SubAnnotationPropertyOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subDataPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"subDataPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [subDataPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{subDataPropertyExpression}); %item = (__RULE__ => q{subDataPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyExpression]<<}, Parse::RecDescent::_tracefirst($text), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{subDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{subDataPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{subDataPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataPropertyAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [DataPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAssertion}); %item = (__RULE__ => q{DataPropertyAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataPropertyAssertion']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataPropertyAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetValue]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetValue})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetValue($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetValue]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{targetValue}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; $h->($item{sourceIndividual}, $item{DataPropertyExpression}, $item{targetValue}); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataPropertyAssertion' '(' axiomAnnotations DataPropertyExpression sourceIndividual targetValue ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataPropertyAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataPropertyAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superDataPropertyExpression { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"superDataPropertyExpression"}; Parse::RecDescent::_trace(q{Trying rule: [superDataPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{superDataPropertyExpression}); %item = (__RULE__ => q{superDataPropertyExpression}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyExpression]<<}, Parse::RecDescent::_tracefirst($text), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{superDataPropertyExpression}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{superDataPropertyExpression}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{superDataPropertyExpression}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::fullIRI { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"fullIRI"}; Parse::RecDescent::_trace(q{Trying rule: [fullIRI]}, Parse::RecDescent::_tracefirst($_[1]), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['<' /[^\\s><]*/ '>']}, Parse::RecDescent::_tracefirst($_[1]), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{fullIRI}); %item = (__RULE__ => q{fullIRI}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['<']}, Parse::RecDescent::_tracefirst($text), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: [/[^\\s><]*/]}, Parse::RecDescent::_tracefirst($text), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{/[^\\s><]*/})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A(?:[^\s><]*)//) { $expectation->failed(); Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__PATTERN1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['>']}, Parse::RecDescent::_tracefirst($text), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'>'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\>//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{__PATTERN1__}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['<' /[^\\s><]*/ '>']<<}, Parse::RecDescent::_tracefirst($text), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{fullIRI}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{fullIRI}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{fullIRI}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{fullIRI}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataProperty"}; Parse::RecDescent::_trace(q{Trying rule: [DataProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataProperty}); %item = (__RULE__ => q{DataProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubClassOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SubClassOf"}; Parse::RecDescent::_trace(q{Trying rule: [SubClassOf]}, Parse::RecDescent::_tracefirst($_[1]), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SubClassOf}); %item = (__RULE__ => q{SubClassOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SubClassOf']}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASubClassOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [subClassExpression]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{subClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::subClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [subClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $item{q{subClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [superClassExpression]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{superClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::superClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [superClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $item{q{superClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subClassExpression}, $RDFS->subClassOf, $item{superClassExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SubClassOf' '(' axiomAnnotations subClassExpression superClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SubClassOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SubClassOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SubClassOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"axiomAnnotations"}; Parse::RecDescent::_trace(q{Trying rule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Annotation]}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{axiomAnnotations}); %item = (__RULE__ => q{axiomAnnotations}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [Annotation]}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Annotation, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Annotation]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; $item{q{Annotation(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{'Annotation(s?)'}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [Annotation]<<}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{axiomAnnotations}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{axiomAnnotations}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{axiomAnnotations}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Entity { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Entity"}; Parse::RecDescent::_trace(q{Trying rule: [Entity]}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Class' '(' Class ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Class']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AClass//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [Class]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Class})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Class($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Class]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{Class}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Class}, $RDF->type, $OWL->Class), ); $return = $item{Class}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Class' '(' Class ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['Datatype' '(' Datatype ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['Datatype']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADatatype//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [Datatype]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Datatype})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Datatype($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Datatype]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{Datatype}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Datatype}, $RDF->type, $OWL->Datatype), ); $return = $item{Datatype}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['Datatype' '(' Datatype ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectProperty' '(' ObjectProperty ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectProperty']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{ObjectProperty}, $RDF->type, $OWL->ObjectProperty), ); $return = $item{ObjectProperty}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectProperty' '(' ObjectProperty ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataProperty' '(' DataProperty ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataProperty']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [DataProperty]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{DataProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{DataProperty}, $RDF->type, $OWL->DatatypeProperty), ); $return = $item{DataProperty}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataProperty' '(' DataProperty ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['AnnotationProperty' '(' AnnotationProperty ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['AnnotationProperty']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AAnnotationProperty//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{AnnotationProperty})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AnnotationProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{AnnotationProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{AnnotationProperty}, $RDF->type, $OWL->AnnotationProperty), ); $return = $item{AnnotationProperty}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['AnnotationProperty' '(' AnnotationProperty ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['NamedIndividual' '(' NamedIndividual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{Entity}); %item = (__RULE__ => q{Entity}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['NamedIndividual']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ANamedIndividual//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [NamedIndividual]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{NamedIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NamedIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [NamedIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $item{q{NamedIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{NamedIndividual}, $RDF->type, $OWL->NamedIndividual), ); $return = $item{NamedIndividual}; $declaredAnnotations = undef; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['NamedIndividual' '(' NamedIndividual ')']<<}, Parse::RecDescent::_tracefirst($text), q{Entity}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Entity}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Entity}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Entity}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Entity}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axioms { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"axioms"}; Parse::RecDescent::_trace(q{Trying rule: [axioms]}, Parse::RecDescent::_tracefirst($_[1]), q{axioms}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Axiom]}, Parse::RecDescent::_tracefirst($_[1]), q{axioms}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{axioms}); %item = (__RULE__ => q{axioms}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [Axiom]}, Parse::RecDescent::_tracefirst($text), q{axioms}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Axiom, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{axioms}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Axiom]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{axioms}, $tracelevel) if defined $::RD_TRACE; $item{q{Axiom(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{axioms}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = \%item; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [Axiom]<<}, Parse::RecDescent::_tracefirst($text), q{axioms}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{axioms}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{axioms}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{axioms}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{axioms}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectProperty"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectProperty}); %item = (__RULE__ => q{ObjectProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::lexicalForm { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"lexicalForm"}; Parse::RecDescent::_trace(q{Trying rule: [lexicalForm]}, Parse::RecDescent::_tracefirst($_[1]), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [quotedString]}, Parse::RecDescent::_tracefirst($_[1]), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{lexicalForm}); %item = (__RULE__ => q{lexicalForm}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [quotedString]}, Parse::RecDescent::_tracefirst($text), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::quotedString($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [quotedString]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; $item{q{quotedString}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [quotedString]<<}, Parse::RecDescent::_tracefirst($text), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{lexicalForm}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{lexicalForm}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{lexicalForm}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyAxiom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataPropertyAxiom"}; Parse::RecDescent::_trace(q{Trying rule: [DataPropertyAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SubDataPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SubDataPropertyOf]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubDataPropertyOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SubDataPropertyOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{SubDataPropertyOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SubDataPropertyOf]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [EquivalentDataProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [EquivalentDataProperties]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentDataProperties($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [EquivalentDataProperties]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{EquivalentDataProperties}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [EquivalentDataProperties]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DisjointDataProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DisjointDataProperties]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointDataProperties($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DisjointDataProperties]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DisjointDataProperties}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DisjointDataProperties]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyDomain]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyDomain($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyDomain]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyDomain}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyDomain]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DataPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyRange]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DataPropertyRange]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [FunctionalDataProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyAxiom}); %item = (__RULE__ => q{DataPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [FunctionalDataProperty]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::FunctionalDataProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [FunctionalDataProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{FunctionalDataProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [FunctionalDataProperty]<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataPropertyAxiom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataPropertyAxiom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::NegativeObjectPropertyAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"NegativeObjectPropertyAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [NegativeObjectPropertyAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['NegativeObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{NegativeObjectPropertyAssertion}); %item = (__RULE__ => q{NegativeObjectPropertyAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['NegativeObjectPropertyAssertion']}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ANegativeObjectPropertyAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetIndividual]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{targetIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->targetIndividual, $item{targetIndividual}); $a->($item{axiomAnnotations}, $x); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['NegativeObjectPropertyAssertion' '(' axiomAnnotations ObjectPropertyExpression sourceIndividual targetIndividual ')']<<}, Parse::RecDescent::_tracefirst($text), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{NegativeObjectPropertyAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{NegativeObjectPropertyAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{NegativeObjectPropertyAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotationsD { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"axiomAnnotationsD"}; Parse::RecDescent::_trace(q{Trying rule: [axiomAnnotationsD]}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [Annotation]}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{axiomAnnotationsD}); %item = (__RULE__ => q{axiomAnnotationsD}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [Annotation]}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Annotation, 0, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [Annotation]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; $item{q{Annotation(s?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $declaredAnnotations = $return = $item{'Annotation(s?)'}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [Annotation]<<}, Parse::RecDescent::_tracefirst($text), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{axiomAnnotationsD}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{axiomAnnotationsD}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{axiomAnnotationsD}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectSomeValuesFrom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectSomeValuesFrom"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectSomeValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectSomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectSomeValuesFrom}); %item = (__RULE__ => q{ObjectSomeValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectSomeValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectSomeValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{ClassExpression}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectSomeValuesFrom' '(' ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectSomeValuesFrom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectSomeValuesFrom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectSomeValuesFrom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::numericLiteral { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"numericLiteral"}; Parse::RecDescent::_trace(q{Trying rule: [numericLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($_[1]), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{numericLiteral}); %item = (__RULE__ => q{numericLiteral}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [nonNegativeInteger]<<}, Parse::RecDescent::_tracefirst($text), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{numericLiteral}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{numericLiteral}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{numericLiteral}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Literal { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"Literal"}; Parse::RecDescent::_trace(q{Trying rule: [Literal]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [typedLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{Literal}); %item = (__RULE__ => q{Literal}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [typedLiteral]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::typedLiteral($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [typedLiteral]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $item{q{typedLiteral}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [typedLiteral]<<}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [stringLiteralWithLanguage]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{Literal}); %item = (__RULE__ => q{Literal}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [stringLiteralWithLanguage]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::stringLiteralWithLanguage($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [stringLiteralWithLanguage]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $item{q{stringLiteralWithLanguage}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [stringLiteralWithLanguage]<<}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [stringLiteralNoLanguage]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{Literal}); %item = (__RULE__ => q{Literal}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [stringLiteralNoLanguage]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::stringLiteralNoLanguage($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [stringLiteralNoLanguage]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $item{q{stringLiteralNoLanguage}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [stringLiteralNoLanguage]<<}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [numericLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{Literal}); %item = (__RULE__ => q{Literal}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [numericLiteral]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::numericLiteral($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [numericLiteral]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $item{q{numericLiteral}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [numericLiteral]<<}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [booleanLiteral]}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{Literal}); %item = (__RULE__ => q{Literal}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [booleanLiteral]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::booleanLiteral($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [booleanLiteral]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $item{q{booleanLiteral}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [booleanLiteral]<<}, Parse::RecDescent::_tracefirst($text), q{Literal}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{Literal}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{Literal}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{Literal}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{Literal}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AnnotationProperty { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"AnnotationProperty"}; Parse::RecDescent::_trace(q{Trying rule: [AnnotationProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IRI]}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{AnnotationProperty}); %item = (__RULE__ => q{AnnotationProperty}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IRI]}, Parse::RecDescent::_tracefirst($text), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IRI($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IRI]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $item{q{IRI}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IRI]<<}, Parse::RecDescent::_tracefirst($text), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{AnnotationProperty}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{AnnotationProperty}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{AnnotationProperty}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataExactCardinality { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataExactCardinality"}; Parse::RecDescent::_trace(q{Trying rule: [DataExactCardinality]}, Parse::RecDescent::_tracefirst($_[1]), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataExactCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataExactCardinality}); %item = (__RULE__ => q{DataExactCardinality}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataExactCardinality']}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataExactCardinality//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [nonNegativeInteger]}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{nonNegativeInteger})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::nonNegativeInteger($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [nonNegativeInteger]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{nonNegativeInteger}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange, 0, 1, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataRange]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange(?)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{'ClassExpression(?)'}->[0]) if $item{'ClassExpression(?)'} && @{ $item{'ClassExpression(?)'} }; $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataExactCardinality' '(' nonNegativeInteger DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataExactCardinality}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataExactCardinality}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataExactCardinality}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SameIndividual { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"SameIndividual"}; Parse::RecDescent::_trace(q{Trying rule: [SameIndividual]}, Parse::RecDescent::_tracefirst($_[1]), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['SameIndividual' '(' axiomAnnotations sourceIndividual targetIndividual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{SameIndividual}); %item = (__RULE__ => q{SameIndividual}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['SameIndividual']}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ASameIndividual//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [sourceIndividual]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{sourceIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::sourceIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [sourceIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{sourceIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [targetIndividual]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{targetIndividual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::targetIndividual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [targetIndividual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $item{q{targetIndividual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->sameAs, $item{targetIndividual}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['SameIndividual' '(' axiomAnnotations sourceIndividual targetIndividual ')']<<}, Parse::RecDescent::_tracefirst($text), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{SameIndividual}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{SameIndividual}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{SameIndividual}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassAssertion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ClassAssertion"}; Parse::RecDescent::_trace(q{Trying rule: [ClassAssertion]}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ClassAssertion' '(' axiomAnnotations ClassExpression Individual ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ClassAssertion}); %item = (__RULE__ => q{ClassAssertion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ClassAssertion']}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AClassAssertion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Individual]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Individual})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Individual($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Individual]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $item{q{Individual}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Individual}, $RDF->type, $item{ClassExpression}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ClassAssertion' '(' axiomAnnotations ClassExpression Individual ')']<<}, Parse::RecDescent::_tracefirst($text), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ClassAssertion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ClassAssertion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ClassAssertion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentDataProperties { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"EquivalentDataProperties"}; Parse::RecDescent::_trace(q{Trying rule: [EquivalentDataProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['EquivalentDataProperties' '(' axiomAnnotations DataPropertyExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{EquivalentDataProperties}); %item = (__RULE__ => q{EquivalentDataProperties}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['EquivalentDataProperties']}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AEquivalentDataProperties//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying repeated subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [DataPropertyExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{'DataPropertyExpression(2..)'} }) { foreach my $ce2 (@{ $item{'DataPropertyExpression(2..)'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['EquivalentDataProperties' '(' axiomAnnotations DataPropertyExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{EquivalentDataProperties}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{EquivalentDataProperties}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{EquivalentDataProperties}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyAxiom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectPropertyAxiom"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectPropertyAxiom]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SubObjectPropertyOf]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SubObjectPropertyOf]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SubObjectPropertyOf($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SubObjectPropertyOf]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{SubObjectPropertyOf}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SubObjectPropertyOf]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [EquivalentObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[1]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [EquivalentObjectProperties]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::EquivalentObjectProperties($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [EquivalentObjectProperties]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{EquivalentObjectProperties}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [EquivalentObjectProperties]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [DisjointObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[2]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [DisjointObjectProperties]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointObjectProperties($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DisjointObjectProperties]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{DisjointObjectProperties}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [DisjointObjectProperties]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [InverseObjectProperties]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[3]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [InverseObjectProperties]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseObjectProperties($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [InverseObjectProperties]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{InverseObjectProperties}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [InverseObjectProperties]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyDomain]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[4]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyDomain]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyDomain($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyDomain]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyDomain}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyDomain]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ObjectPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[5]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyRange]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ObjectPropertyRange]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [FunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[6]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [FunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::FunctionalObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [FunctionalObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{FunctionalObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [FunctionalObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [InverseFunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[7]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [InverseFunctionalObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::InverseFunctionalObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [InverseFunctionalObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{InverseFunctionalObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [InverseFunctionalObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ReflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[8]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [ReflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ReflexiveObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ReflexiveObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{ReflexiveObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [ReflexiveObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [IrreflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[9]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [IrreflexiveObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::IrreflexiveObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [IrreflexiveObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{IrreflexiveObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [IrreflexiveObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [SymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[10]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [SymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::SymmetricObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [SymmetricObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{SymmetricObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [SymmetricObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [AsymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[11]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [AsymmetricObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::AsymmetricObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [AsymmetricObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{AsymmetricObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [AsymmetricObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [TransitiveObjectProperty]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[12]; $text = $_[1]; my $_savetext; @item = (q{ObjectPropertyAxiom}); %item = (__RULE__ => q{ObjectPropertyAxiom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying subrule: [TransitiveObjectProperty]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::TransitiveObjectProperty($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [TransitiveObjectProperty]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $item{q{TransitiveObjectProperty}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{>>Matched production: [TransitiveObjectProperty]<<}, Parse::RecDescent::_tracefirst($text), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectPropertyAxiom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectPropertyAxiom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectPropertyAxiom}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DisjointUnion { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DisjointUnion"}; Parse::RecDescent::_trace(q{Trying rule: [DisjointUnion]}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DisjointUnion' '(' axiomAnnotations Class disjointClassExpressions ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DisjointUnion}); %item = (__RULE__ => q{DisjointUnion}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DisjointUnion']}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADisjointUnion//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [Class]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{Class})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::Class($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [Class]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $item{q{Class}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [disjointClassExpressions]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{disjointClassExpressions})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::disjointClassExpressions($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [disjointClassExpressions]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $item{q{disjointClassExpressions}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{disjointClassExpressions}); $a->( $item{axiomAnnotations}, $h->($item{Class}, $OWL->disjointUnionOf, $list), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DisjointUnion' '(' axiomAnnotations Class disjointClassExpressions ')']<<}, Parse::RecDescent::_tracefirst($text), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DisjointUnion}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DisjointUnion}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DisjointUnion}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataComplementOf { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataComplementOf"}; Parse::RecDescent::_trace(q{Trying rule: [DataComplementOf]}, Parse::RecDescent::_tracefirst($_[1]), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataComplementOf' '(' DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataComplementOf}); %item = (__RULE__ => q{DataComplementOf}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataComplementOf']}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataComplementOf//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->datatypeComplementOf, $item{DataRange}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataComplementOf' '(' DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataComplementOf}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataComplementOf}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataComplementOf}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyRange { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"DataPropertyRange"}; Parse::RecDescent::_trace(q{Trying rule: [DataPropertyRange]}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')']}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{DataPropertyRange}); %item = (__RULE__ => q{DataPropertyRange}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['DataPropertyRange']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\ADataPropertyRange//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [axiomAnnotations]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{axiomAnnotations})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::axiomAnnotations($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [axiomAnnotations]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{axiomAnnotations}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [DataRange]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{DataRange})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::DataRange($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [DataRange]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $item{q{DataRange}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->range, $item{DataRange}), ); 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['DataPropertyRange' '(' axiomAnnotations DataPropertyExpression DataRange ')']<<}, Parse::RecDescent::_tracefirst($text), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{DataPropertyRange}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{DataPropertyRange}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{DataPropertyRange}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::disjointClassExpressions { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"disjointClassExpressions"}; Parse::RecDescent::_trace(q{Trying rule: [disjointClassExpressions]}, Parse::RecDescent::_tracefirst($_[1]), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: [ClassExpression]}, Parse::RecDescent::_tracefirst($_[1]), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{disjointClassExpressions}); %item = (__RULE__ => q{disjointClassExpressions}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying repeated subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; $expectation->is(q{})->at($text); unless (defined ($_tok = $thisparser->_parserepeat($text, \&Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression, 2, 100000000, $_noactions,$expectation,undef))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched repeated subrule: [ClassExpression]<< (} . @$_tok . q{ times)}, Parse::RecDescent::_tracefirst($text), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression(2..)}} = $_tok; push @item, $_tok; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { $return = $item{'ClassExpression(2..)'}; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: [ClassExpression]<<}, Parse::RecDescent::_tracefirst($text), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{disjointClassExpressions}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{disjointClassExpressions}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{disjointClassExpressions}, $tracelevel) } $_[1] = $text; return $return; } # ARGS ARE: ($parser, $text; $repeating, $_noactions, \@args) sub Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectAllValuesFrom { my $thisparser = $_[0]; use vars q{$tracelevel}; local $tracelevel = ($tracelevel||0)+1; $ERRORS = 0; my $thisrule = $thisparser->{"rules"}{"ObjectAllValuesFrom"}; Parse::RecDescent::_trace(q{Trying rule: [ObjectAllValuesFrom]}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $err_at = @{$thisparser->{errors}}; my $score; my $score_return; my $_tok; my $return = undef; my $_matched=0; my $commit=0; my @item = (); my %item = (); my $repeating = defined($_[2]) && $_[2]; my $_noactions = defined($_[3]) && $_[3]; my @arg = defined $_[4] ? @{ &{$_[4]} } : (); my %arg = ($#arg & 01) ? @arg : (@arg, undef); my $text; my $lastsep=""; my $expectation = new Parse::RecDescent::Expectation($thisrule->expected()); $expectation->at($_[1]); my $thisline; tie $thisline, q{Parse::RecDescent::LineCounter}, \$text, $thisparser; while (!$_matched && !$commit) { Parse::RecDescent::_trace(q{Trying production: ['ObjectAllValuesFrom' '(' ObjectPropertyExpression ClassExpression ')']}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; my $thisprod = $thisrule->{"prods"}[0]; $text = $_[1]; my $_savetext; @item = (q{ObjectAllValuesFrom}); %item = (__RULE__ => q{ObjectAllValuesFrom}); my $repcount = 0; Parse::RecDescent::_trace(q{Trying terminal: ['ObjectAllValuesFrom']}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\AObjectAllValuesFrom//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING1__}=$&; Parse::RecDescent::_trace(q{Trying terminal: ['(']}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{'('})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\(//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING2__}=$&; Parse::RecDescent::_trace(q{Trying subrule: [ObjectPropertyExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ObjectPropertyExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ObjectPropertyExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ObjectPropertyExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{ObjectPropertyExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying subrule: [ClassExpression]}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; if (1) { no strict qw{refs}; $expectation->is(q{ClassExpression})->at($text); unless (defined ($_tok = Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled::ClassExpression($thisparser,$text,$repeating,$_noactions,sub { \@arg }))) { Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $expectation->failed(); last; } Parse::RecDescent::_trace(q{>>Matched subrule: [ClassExpression]<< (return value: [} . $_tok . q{]}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $item{q{ClassExpression}} = $_tok; push @item, $_tok; } Parse::RecDescent::_trace(q{Trying terminal: [')']}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $lastsep = ""; $expectation->is(q{')'})->at($text); unless ($text =~ s/\A($skip)/$lastsep=$1 and ""/e and $text =~ s/\A\)//) { $expectation->failed(); Parse::RecDescent::_trace(qq{<>}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched terminal<< (return value: [} . $& . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $item{__STRING3__}=$&; Parse::RecDescent::_trace(q{Trying action}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_tok = ($_noactions) ? 0 : do { my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{ClassExpression}); $return = $x; 1; }; unless (defined $_tok) { Parse::RecDescent::_trace(q{<> (return value: [undef])}) if defined $::RD_TRACE; last; } Parse::RecDescent::_trace(q{>>Matched action<< (return value: [} . $_tok . q{])}, Parse::RecDescent::_tracefirst($text)) if defined $::RD_TRACE; push @item, $_tok; $item{__ACTION1__}=$_tok; Parse::RecDescent::_trace(q{>>Matched production: ['ObjectAllValuesFrom' '(' ObjectPropertyExpression ClassExpression ')']<<}, Parse::RecDescent::_tracefirst($text), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $_matched = 1; last; } unless ( $_matched || defined($return) || defined($score) ) { $_[1] = $text; # NOT SURE THIS IS NEEDED Parse::RecDescent::_trace(q{<>}, Parse::RecDescent::_tracefirst($_[1]), q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; return undef; } if (!defined($return) && defined($score)) { Parse::RecDescent::_trace(q{>>Accepted scored production<<}, "", q{ObjectAllValuesFrom}, $tracelevel) if defined $::RD_TRACE; $return = $score_return; } splice @{$thisparser->{errors}}, $err_at; $return = $item[$#item] unless defined $return; if (defined $::RD_TRACE) { Parse::RecDescent::_trace(q{>>Matched rule<< (return value: [} . $return . q{])}, "", q{ObjectAllValuesFrom}, $tracelevel); Parse::RecDescent::_trace(q{(consumed: [} . Parse::RecDescent::_tracemax(substr($_[1],0,-length($text))) . q{])}, Parse::RecDescent::_tracefirst($text), , q{ObjectAllValuesFrom}, $tracelevel) } $_[1] = $text; return $return; } } package RDF::Trine::Parser::OwlFn::Compiled; sub new { my $self = bless( { '_AUTOTREE' => undef, 'localvars' => '', 'startcode' => '', '_check' => { 'thisoffset' => '', 'itempos' => '', 'prevoffset' => '', 'prevline' => '', 'prevcolumn' => '', 'thiscolumn' => '' }, 'namespace' => 'Parse::RecDescent::RDF::Trine::Parser::OwlFn::Compiled', '_AUTOACTION' => undef, 'rules' => { 'IRI' => bless( { 'impcount' => 0, 'calls' => [ 'fullIRI', 'abbreviatedIRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'fullIRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 68 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 69, 'code' => '{ $return = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'abbreviatedIRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 70 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 71, 'code' => '{ my ($pfx, $sfx) = @{ $item{abbreviatedIRI} }; if ($Prefixes{$pfx}) { $return = $Prefixes{$pfx}->uri($sfx); } else { warn "Undefined prefix \'${pfx}\' at line ${thisline}."; $return = RDF::Trine::Node::Resource->new($pfx.$sfx); } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'IRI', 'vars' => '', 'line' => 68 }, 'Parse::RecDescent::Rule' ), 'DataMaxCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataMaxCardinality', 'hashname' => '__STRING1__', 'description' => '\'DataMaxCardinality\'', 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 647 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 648, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataMaxCardinality', 'vars' => '', 'line' => 647 }, 'Parse::RecDescent::Rule' ), 'abbreviatedIRI' => bless( { 'impcount' => 0, 'calls' => [ 'PNAME_LN' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'PNAME_LN', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 66 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 67, 'code' => '{ $return = $item{PNAME_LN}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'abbreviatedIRI', 'vars' => '', 'line' => 66 }, 'Parse::RecDescent::Rule' ), 'AnonymousIndividual' => bless( { 'impcount' => 0, 'calls' => [ 'nodeID' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'nodeID', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 315 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 316, 'code' => '{ $return = RDF::Trine::Node::Blank->new($thisparser->{BPREFIX}.$item{nodeID}); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnonymousIndividual', 'vars' => '', 'line' => 315 }, 'Parse::RecDescent::Rule' ), 'ObjectPropertyAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression', 'sourceIndividual', 'targetIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectPropertyAssertion', 'hashname' => '__STRING1__', 'description' => '\'ObjectPropertyAssertion\'', 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1094 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1095, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $item{ObjectPropertyExpression}, $item{targetIndividual}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectPropertyAssertion', 'vars' => '', 'line' => 1094 }, 'Parse::RecDescent::Rule' ), 'Assertion' => bless( { 'impcount' => 0, 'calls' => [ 'SameIndividual', 'DifferentIndividuals', 'ClassAssertion', 'ObjectPropertyAssertion', 'NegativeObjectPropertyAssertion', 'DataPropertyAssertion', 'NegativeDataPropertyAssertion' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SameIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1051 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DifferentIndividuals', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1051 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1051 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ClassAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1051 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1051 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1052 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1051 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'NegativeObjectPropertyAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1052 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1052 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1053 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1052 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '6', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'NegativeDataPropertyAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1053 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 1053 }, 'Parse::RecDescent::Production' ) ], 'name' => 'Assertion', 'vars' => '', 'line' => 1050 }, 'Parse::RecDescent::Rule' ), 'ontologyIRI' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 140 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 141, 'code' => '{ $return = $item{IRI}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ontologyIRI', 'vars' => '', 'line' => 140 }, 'Parse::RecDescent::Rule' ), 'ObjectHasValue' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression', 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectHasValue', 'hashname' => '__STRING1__', 'description' => '\'ObjectHasValue\'', 'lookahead' => 0, 'line' => 510 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 510 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 510 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Individual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 510 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 510 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 511, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasValue, $item{Individual}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectHasValue', 'vars' => '', 'line' => 510 }, 'Parse::RecDescent::Rule' ), 'DataPropertyDomain' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataPropertyDomain', 'hashname' => '__STRING1__', 'description' => '\'DataPropertyDomain\'', 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 985 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 986, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataPropertyDomain', 'vars' => '', 'line' => 985 }, 'Parse::RecDescent::Rule' ), 'ObjectPropertyDomain' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectPropertyDomain', 'hashname' => '__STRING1__', 'description' => '\'ObjectPropertyDomain\'', 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 818 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 819, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->domain, $item{ClassExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectPropertyDomain', 'vars' => '', 'line' => 818 }, 'Parse::RecDescent::Rule' ), 'stringLiteralNoLanguage' => bless( { 'impcount' => 0, 'calls' => [ 'quotedString' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'quotedString', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 334 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 335, 'code' => '{ $return = RDF::Trine::Node::Literal->new($item{quotedString}); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'stringLiteralNoLanguage', 'vars' => '', 'line' => 334 }, 'Parse::RecDescent::Rule' ), 'prefixName' => bless( { 'impcount' => 0, 'calls' => [ 'PNAME_NS' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'PNAME_NS', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 64 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 65, 'code' => '{ $return = $item{PNAME_NS}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'prefixName', 'vars' => '', 'line' => 64 }, 'Parse::RecDescent::Rule' ), 'versionIRI' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'IRI', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 142 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 143, 'code' => '{ $return = $item{\'IRI(?)\'}->[0]; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'versionIRI', 'vars' => '', 'line' => 142 }, 'Parse::RecDescent::Rule' ), 'InverseObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectInverseOf', 'hashname' => '__STRING1__', 'description' => '\'ObjectInverseOf\'', 'lookahead' => 0, 'line' => 353 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 353 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 353 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 353 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 354, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $OWL->inverseOf, $item{ObjectProperty}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'InverseObjectProperty', 'vars' => '', 'line' => 353 }, 'Parse::RecDescent::Rule' ), 'ClassAxiom' => bless( { 'impcount' => 0, 'calls' => [ 'SubClassOf', 'EquivalentClasses', 'DisjointClasses', 'DisjointUnion' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SubClassOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 675 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'EquivalentClasses', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 675 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 675 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DisjointClasses', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 675 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 675 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DisjointUnion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 675 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 675 }, 'Parse::RecDescent::Production' ) ], 'name' => 'ClassAxiom', 'vars' => '', 'line' => 675 }, 'Parse::RecDescent::Rule' ), 'AnnotationAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'AnnotationProperty', 'AnnotationSubject', 'AnnotationValue' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'AnnotationAssertion', 'hashname' => '__STRING1__', 'description' => '\'AnnotationAssertion\'', 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationSubject', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 258 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 259, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationSubject}, $item{AnnotationProperty}, $item{AnnotationValue}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationAssertion', 'vars' => '', 'line' => 258 }, 'Parse::RecDescent::Rule' ), 'ObjectMaxCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectMaxCardinality', 'hashname' => '__STRING1__', 'description' => '\'ObjectMaxCardinality\'', 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 545 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 546, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->maxCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectMaxCardinality', 'vars' => '', 'line' => 545 }, 'Parse::RecDescent::Rule' ), 'EquivalentObjectProperties' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'EquivalentObjectProperties', 'hashname' => '__STRING1__', 'description' => '\'EquivalentObjectProperties\'', 'lookahead' => 0, 'line' => 778 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 778 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 778 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 778 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 778 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 779, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{\'ObjectPropertyExpression(2..)\'} }) { foreach my $ce2 (@{ $item{\'ObjectPropertyExpression(2..)\'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'EquivalentObjectProperties', 'vars' => '', 'line' => 778 }, 'Parse::RecDescent::Rule' ), 'DataMinCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataMinCardinality', 'hashname' => '__STRING1__', 'description' => '\'DataMinCardinality\'', 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 634 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 635, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataMinCardinality', 'vars' => '', 'line' => 634 }, 'Parse::RecDescent::Rule' ), 'DatatypeRestriction' => bless( { 'impcount' => 0, 'calls' => [ 'Datatype', 'dtConstraint' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DatatypeRestriction', 'hashname' => '__STRING1__', 'description' => '\'DatatypeRestriction\'', 'lookahead' => 0, 'line' => 414 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 414 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Datatype', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 414 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'dtConstraint', 'expected' => undef, 'min' => 1, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's', 'lookahead' => 0, 'line' => 414 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 414 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 415, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->onDatatype, $item{Datatype}); my @y; foreach my $constraint (@{$item{\'dtConstraint(s)\'}}) { my $y = RDF::Trine::Node::Blank->new; $h->($y, @$constraint); push @y, $y; } $h->($x, $OWL->withRestrictions, $list_generator->($h, \\@y)); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DatatypeRestriction', 'vars' => '', 'line' => 414 }, 'Parse::RecDescent::Rule' ), 'Individual' => bless( { 'impcount' => 0, 'calls' => [ 'NamedIndividual', 'AnonymousIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'NamedIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 312 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnonymousIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 312 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 312 }, 'Parse::RecDescent::Production' ) ], 'name' => 'Individual', 'vars' => '', 'line' => 312 }, 'Parse::RecDescent::Rule' ), 'ClassExpression' => bless( { 'impcount' => 0, 'calls' => [ 'Class', 'ObjectIntersectionOf', 'ObjectUnionOf', 'ObjectComplementOf', 'ObjectOneOf', 'ObjectSomeValuesFrom', 'ObjectAllValuesFrom', 'ObjectHasValue', 'ObjectHasSelf', 'ObjectMinCardinality', 'ObjectMaxCardinality', 'ObjectExactCardinality', 'DataSomeValuesFrom', 'DataAllValuesFrom', 'DataHasValue', 'DataMinCardinality', 'DataMaxCardinality', 'DataExactCardinality' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Class', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 437 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectIntersectionOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 438 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 438 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectUnionOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 438 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 438 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectComplementOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 438 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 438 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectOneOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 439 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 439 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectSomeValuesFrom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 439 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 439 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '6', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectAllValuesFrom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 439 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 439 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '7', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectHasValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 440 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 440 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '8', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectHasSelf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 440 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 440 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '9', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectMinCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 440 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 440 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '10', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectMaxCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 441 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 441 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '11', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectExactCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 441 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 441 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '12', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataSomeValuesFrom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 442 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 442 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '13', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataAllValuesFrom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 442 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 442 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '14', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataHasValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 442 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 442 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '15', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataMinCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 443 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 443 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '16', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataMaxCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 443 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 443 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '17', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataExactCardinality', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 443 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 443 }, 'Parse::RecDescent::Production' ) ], 'name' => 'ClassExpression', 'vars' => '', 'line' => 437 }, 'Parse::RecDescent::Rule' ), 'annotationAnnotations' => bless( { 'impcount' => 0, 'calls' => [ 'Annotation' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'Annotation', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 253 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 254, 'code' => '{ $return = $item{\'Annotation(s?)\'}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'annotationAnnotations', 'vars' => '', 'line' => 253 }, 'Parse::RecDescent::Rule' ), 'DataPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'DataProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 362 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataPropertyExpression', 'vars' => '', 'line' => 362 }, 'Parse::RecDescent::Rule' ), 'AnnotationPropertyRange' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'AnnotationProperty', 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'AnnotationPropertyRange', 'hashname' => '__STRING1__', 'description' => '\'AnnotationPropertyRange\'', 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 293 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 294, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->range, $item{IRI}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationPropertyRange', 'vars' => '', 'line' => 293 }, 'Parse::RecDescent::Rule' ), 'directlyImportsDocuments' => bless( { 'impcount' => 0, 'calls' => [ 'importStatement' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'importStatement', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 144 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 145, 'code' => '{ $return = $item{\'importStatement(s?)\'}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'directlyImportsDocuments', 'vars' => '', 'line' => 144 }, 'Parse::RecDescent::Rule' ), 'languageTag' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 1, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '@', 'hashname' => '__STRING1__', 'description' => '\'@\'', 'lookahead' => 0, 'line' => 57 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '[A-Z0-9]{1,8}(?:-[A-Z0-9]{1,8})*', 'hashname' => '__PATTERN1__', 'description' => '/[A-Z0-9]\\{1,8\\}(?:-[A-Z0-9]\\{1,8\\})*/i', 'lookahead' => 0, 'rdelim' => '/', 'line' => 57, 'mod' => 'i', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 58, 'code' => '{ $return = $item{__PATTERN1__}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'languageTag', 'vars' => '', 'line' => 57 }, 'Parse::RecDescent::Rule' ), 'targetValue' => bless( { 'impcount' => 0, 'calls' => [ 'Literal' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Literal', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1057 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'targetValue', 'vars' => '', 'line' => 1057 }, 'Parse::RecDescent::Rule' ), 'NegativeDataPropertyAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression', 'sourceIndividual', 'targetValue' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'NegativeDataPropertyAssertion', 'hashname' => '__STRING1__', 'description' => '\'NegativeDataPropertyAssertion\'', 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1125 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1126, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{DataPropertyExpression}); $h->($x, $OWL->targetValue, $item{targetValue}); my $a = $thisparser->{ANNOTATE}; $a->($item{axiomAnnotations}, $x); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'NegativeDataPropertyAssertion', 'vars' => '', 'line' => 1125 }, 'Parse::RecDescent::Rule' ), 'ObjectUnionOf' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectUnionOf', 'hashname' => '__STRING1__', 'description' => '\'ObjectUnionOf\'', 'lookahead' => 0, 'line' => 456 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 456 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 456 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 456 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 457, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'ClassExpression(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->unionOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectUnionOf', 'vars' => '', 'line' => 456 }, 'Parse::RecDescent::Rule' ), 'AnnotationPropertyDomain' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'AnnotationProperty', 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'AnnotationPropertyDomain', 'hashname' => '__STRING1__', 'description' => '\'AnnotationPropertyDomain\'', 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 282 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 283, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{AnnotationProperty}, $RDFS->domain, $item{IRI}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationPropertyDomain', 'vars' => '', 'line' => 282 }, 'Parse::RecDescent::Rule' ), 'DataAllValuesFrom' => bless( { 'impcount' => 0, 'calls' => [ 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataAllValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'DataAllValuesFrom\'', 'lookahead' => 0, 'line' => 597 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 597 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 597 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 597 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 597 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 598, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataAllValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'DataAllValuesFrom\'', 'lookahead' => 0, 'line' => 608 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 608 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 608 }, 'Parse::RecDescent::Repetition' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 608 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 608 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 609, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{\'DataPropertyExpression(2)\'}), ); $h->($x, $OWL->allValuesFrom, $item{DataRange}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataAllValuesFrom', 'vars' => '', 'line' => 597 }, 'Parse::RecDescent::Rule' ), 'ObjectComplementOf' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectComplementOf', 'hashname' => '__STRING1__', 'description' => '\'ObjectComplementOf\'', 'lookahead' => 0, 'line' => 467 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 467 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 467 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 467 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 468, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->complementOf, $item{ClassExpression}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectComplementOf', 'vars' => '', 'line' => 467 }, 'Parse::RecDescent::Rule' ), 'Class' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 306 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'Class', 'vars' => '', 'line' => 304 }, 'Parse::RecDescent::Rule' ), 'quotedString' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 2, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '"', 'hashname' => '__STRING1__', 'description' => '\'"\'', 'lookahead' => 0, 'line' => 51 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(?:\\\\\\\\|\\\\"|[^\\\\\\\\\\\\"])*', 'hashname' => '__PATTERN1__', 'description' => '/(?:\\\\\\\\\\\\\\\\|\\\\\\\\"|[^\\\\\\\\\\\\\\\\\\\\\\\\"])*/', 'lookahead' => 0, 'rdelim' => '/', 'line' => 51, 'mod' => '', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'pattern' => '"', 'hashname' => '__STRING2__', 'description' => '\'"\'', 'lookahead' => 0, 'line' => 51 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 52, 'code' => '{ $return = $item{__PATTERN1__}; $return =~ s/\\\\([\\\\\\"])/$1/g; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'quotedString', 'vars' => '', 'line' => 51 }, 'Parse::RecDescent::Rule' ), 'superClassExpression' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 688 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'superClassExpression', 'vars' => '', 'line' => 688 }, 'Parse::RecDescent::Rule' ), 'DataSomeValuesFrom' => bless( { 'impcount' => 0, 'calls' => [ 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataSomeValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'DataSomeValuesFrom\'', 'lookahead' => 0, 'line' => 571 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 571 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 571 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 571 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 571 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 572, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataSomeValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'DataSomeValuesFrom\'', 'lookahead' => 0, 'line' => 582 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 582 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 582 }, 'Parse::RecDescent::Repetition' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 582 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 582 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 583, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->( $x, $OWL->onProperties, $list_generator->($h, $item{\'DataPropertyExpression(2)\'}), ); $h->($x, $OWL->someValuesFrom, $item{DataRange}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataSomeValuesFrom', 'vars' => '', 'line' => 571 }, 'Parse::RecDescent::Rule' ), 'Axiom' => bless( { 'impcount' => 0, 'calls' => [ 'Declaration', 'ClassAxiom', 'ObjectPropertyAxiom', 'DataPropertyAxiom', 'DatatypeDefinition', 'HasKey', 'Assertion', 'AnnotationAxiom' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Declaration', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ClassAxiom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyAxiom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyAxiom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DatatypeDefinition', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'HasKey', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '6', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Assertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '7', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationAxiom', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 673 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 673 }, 'Parse::RecDescent::Production' ) ], 'name' => 'Axiom', 'vars' => '', 'line' => 673 }, 'Parse::RecDescent::Rule' ), 'ontologyAnnotations' => bless( { 'impcount' => 0, 'calls' => [ 'Annotation' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'Annotation', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 155 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 156, 'code' => '{ $return = ref $item{\'Annotation(s?)\'} eq \'ARRAY\' ? $item{\'Annotation(s?)\'} : []; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ontologyAnnotations', 'vars' => '', 'line' => 155 }, 'Parse::RecDescent::Rule' ), 'FunctionalDataProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'FunctionalDataProperty', 'hashname' => '__STRING1__', 'description' => '\'FunctionalDataProperty\'', 'lookahead' => 0, 'line' => 1007 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1007 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1007 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1007 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1007 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1008, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDF->type, $OWL->FunctionalProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'FunctionalDataProperty', 'vars' => '', 'line' => 1007 }, 'Parse::RecDescent::Rule' ), 'Datatype' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 307 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'Datatype', 'vars' => '', 'line' => 307 }, 'Parse::RecDescent::Rule' ), 'ObjectPropertyRange' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectPropertyRange', 'hashname' => '__STRING1__', 'description' => '\'ObjectPropertyRange\'', 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 829 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 830, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{ObjectPropertyExpression}, $RDFS->range, $item{ClassExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectPropertyRange', 'vars' => '', 'line' => 829 }, 'Parse::RecDescent::Rule' ), 'AnnotationValue' => bless( { 'impcount' => 0, 'calls' => [ 'AnonymousIndividual', 'IRI', 'Literal' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnonymousIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 235 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 235 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 235 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Literal', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 235 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 235 }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationValue', 'vars' => '', 'line' => 235 }, 'Parse::RecDescent::Rule' ), 'DifferentIndividuals' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'sourceIndividual', 'targetIndividual', 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DifferentIndividuals', 'hashname' => '__STRING1__', 'description' => '\'DifferentIndividuals\'', 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1070 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1071, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->differentFrom, $item{targetIndividual}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'pattern' => 'DifferentIndividuals', 'hashname' => '__STRING1__', 'description' => '\'DifferentIndividuals\'', 'lookahead' => 0, 'line' => 1081 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1081 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1081 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Individual', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 1081 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1081 }, 'Parse::RecDescent::Literal' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DifferentIndividuals', 'vars' => '', 'line' => 1070 }, 'Parse::RecDescent::Rule' ), 'AsymmetricObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'AsymmetricObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'AsymmetricObjectProperty\'', 'lookahead' => 0, 'line' => 906 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 906 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 906 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 906 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 906 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 907, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->AsymmetricProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AsymmetricObjectProperty', 'vars' => '', 'line' => 906 }, 'Parse::RecDescent::Rule' ), 'versioningIRIs' => bless( { 'impcount' => 0, 'calls' => [ 'ontologyIRI', 'versionIRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'ontologyIRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 138 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'versionIRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 138 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 139, 'code' => '{ $return = [$item{ontologyIRI}, $item{versionIRI}]; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'versioningIRIs', 'vars' => '', 'line' => 138 }, 'Parse::RecDescent::Rule' ), 'ReflexiveObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ReflexiveObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'ReflexiveObjectProperty\'', 'lookahead' => 0, 'line' => 873 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 873 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 873 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 873 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 873 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 874, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->ReflexiveProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ReflexiveObjectProperty', 'vars' => '', 'line' => 873 }, 'Parse::RecDescent::Rule' ), 'DataOneOf' => bless( { 'impcount' => 0, 'calls' => [ 'Literal' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataOneOf', 'hashname' => '__STRING1__', 'description' => '\'DataOneOf\'', 'lookahead' => 0, 'line' => 403 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 403 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Literal', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 403 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 403 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 404, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'Literal(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->oneOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataOneOf', 'vars' => '', 'line' => 403 }, 'Parse::RecDescent::Rule' ), 'ObjectExactCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectExactCardinality', 'hashname' => '__STRING1__', 'description' => '\'ObjectExactCardinality\'', 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 558 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 559, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectExactCardinality', 'vars' => '', 'line' => 558 }, 'Parse::RecDescent::Rule' ), 'SubObjectPropertyOf' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'subObjectPropertyExpression', 'superObjectPropertyExpression', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SubObjectPropertyOf', 'hashname' => '__STRING1__', 'description' => '\'SubObjectPropertyOf\'', 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'subObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'superObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 753 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 754, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subObjectPropertyExpression}, $RDFS->subPropertyOf, $item{superObjectPropertyExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 6, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SubObjectPropertyOf', 'hashname' => '__STRING1__', 'description' => '\'SubObjectPropertyOf\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => 'ObjectPropertyChain', 'hashname' => '__STRING3__', 'description' => '\'ObjectPropertyChain\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING4__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING5__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'superObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING6__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 763 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 764, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{\'ObjectPropertyExpression(2..)\'}); $a->( $item{axiomAnnotations}, $h->($item{superObjectPropertyExpression}, $OWL->propertyChainAxiom, $list), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SubObjectPropertyOf', 'vars' => '', 'line' => 753 }, 'Parse::RecDescent::Rule' ), 'stringLiteralWithLanguage' => bless( { 'impcount' => 0, 'calls' => [ 'quotedString', 'languageTag' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'quotedString', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 336 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'languageTag', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 336 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 337, 'code' => '{ $return = RDF::Trine::Node::Literal->new($item{quotedString}, $item{languageTag}); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'stringLiteralWithLanguage', 'vars' => '', 'line' => 336 }, 'Parse::RecDescent::Rule' ), 'nodeID' => bless( { 'impcount' => 0, 'calls' => [ 'PN_LOCAL' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 1, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '_:', 'hashname' => '__STRING1__', 'description' => '\'_:\'', 'lookahead' => 0, 'line' => 59 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'PN_LOCAL', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 59 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 60, 'code' => '{ $return = $item{PN_LOCAL}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'nodeID', 'vars' => '', 'line' => 59 }, 'Parse::RecDescent::Rule' ), 'PN_LOCAL' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '(?:[A-Z0-9_]|[\\x{00C0}-\\x{00D6}]|[\\x{00D8}-\\x{00F6}]|[\\x{00F8}-\\x{02FF}]|[\\x{0370}-\\x{037D}]|[\\x{037F}-\\x{1FFF}]|[\\x{200C}-\\x{200D}]|[\\x{2070}-\\x{218F}]|[\\x{2C00}-\\x{2FEF}]|[\\x{3001}-\\x{D7FF}]|[\\x{F900}-\\x{FDCF}]|[\\x{FDF0}-\\x{FFFD}]|[\\x{10000}-\\x{EFFFF}])*', 'hashname' => '__PATTERN1__', 'description' => '/(?:[A-Z0-9_]|[\\\\x\\{00C0\\}-\\\\x\\{00D6\\}]|[\\\\x\\{00D8\\}-\\\\x\\{00F6\\}]|[\\\\x\\{00F8\\}-\\\\x\\{02FF\\}]|[\\\\x\\{0370\\}-\\\\x\\{037D\\}]|[\\\\x\\{037F\\}-\\\\x\\{1FFF\\}]|[\\\\x\\{200C\\}-\\\\x\\{200D\\}]|[\\\\x\\{2070\\}-\\\\x\\{218F\\}]|[\\\\x\\{2C00\\}-\\\\x\\{2FEF\\}]|[\\\\x\\{3001\\}-\\\\x\\{D7FF\\}]|[\\\\x\\{F900\\}-\\\\x\\{FDCF\\}]|[\\\\x\\{FDF0\\}-\\\\x\\{FFFD\\}]|[\\\\x\\{10000\\}-\\\\x\\{EFFFF\\}])*/i', 'lookahead' => 0, 'rdelim' => '/', 'line' => 37, 'mod' => 'i', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 38, 'code' => '{ $return = $item{__PATTERN1__}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'PN_LOCAL', 'vars' => '', 'line' => 36 }, 'Parse::RecDescent::Rule' ), 'HasKey' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ClassExpression', 'ObjectPropertyExpression', 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 7, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'HasKey', 'hashname' => '__STRING1__', 'description' => '\'HasKey\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => '(', 'hashname' => '__STRING3__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING4__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING5__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING6__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => ')', 'hashname' => '__STRING7__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1029 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1030, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my @list_items; push @list_items, @{$item{\'ObjectPropertyExpression(s?)\'}} if ref $item{\'ObjectPropertyExpression(s?)\'} eq \'ARRAY\' && @{ $item{\'ObjectPropertyExpression(s?)\'} }; push @list_items, @{$item{\'DataPropertyExpression(s?)\'}} if ref $item{\'DataPropertyExpression(s?)\'} eq \'ARRAY\' && @{ $item{\'DataPropertyExpression(s?)\'} }; my $list = $list_generator->($h, \\@list_items); $a->( $item{axiomAnnotations}, $h->($item{ClassExpression}, $OWL->hasKey, $list), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'HasKey', 'vars' => '', 'line' => 1029 }, 'Parse::RecDescent::Rule' ), 'prefixDeclaration' => bless( { 'impcount' => 0, 'calls' => [ 'prefixName', 'fullIRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 4, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Prefix', 'hashname' => '__STRING1__', 'description' => '\'Prefix\'', 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'prefixName', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => '=', 'hashname' => '__STRING3__', 'description' => '\'=\'', 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'fullIRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING4__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 87 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 88, 'code' => '{ if (defined $Prefixes{ $item{prefixName} }) { warn(sprintf("Ignoring attempt to redeclare prefix \'%s\'.", $item{prefixName})); } else { my $u = RDF::Trine::Node::Resource->new($item{fullIRI}, $thisparser->{BASE_URI}); $Prefixes{ $item{prefixName} } = RDF::Trine::Namespace->new($u->uri); $thisparser->{PREFIX}->($item{prefixName}, $item{fullIRI}); } $return = \\%item; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'prefixDeclaration', 'vars' => '', 'line' => 87 }, 'Parse::RecDescent::Rule' ), 'dtConstraint' => bless( { 'impcount' => 0, 'calls' => [ 'constrainingFacet', 'restrictionValue' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'constrainingFacet', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 432 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'restrictionValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 432 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 433, 'code' => '{ $return = [ $item{constrainingFacet}, $item{restrictionValue} ]; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'dtConstraint', 'vars' => '', 'line' => 432 }, 'Parse::RecDescent::Rule' ), 'constrainingFacet' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 434 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'constrainingFacet', 'vars' => '', 'line' => 434 }, 'Parse::RecDescent::Rule' ), 'superAnnotationProperty' => bless( { 'impcount' => 0, 'calls' => [ 'AnnotationProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 280 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'superAnnotationProperty', 'vars' => '', 'line' => 280 }, 'Parse::RecDescent::Rule' ), 'InverseObjectProperties' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'InverseObjectProperties', 'hashname' => '__STRING1__', 'description' => '\'InverseObjectProperties\'', 'lookahead' => 0, 'line' => 840 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 840 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 840 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 2, 'matchrule' => 0, 'repspec' => '2', 'lookahead' => 0, 'line' => 840 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 840 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 841, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression(2)\'}->[0], $OWL->inverseOf, $item{\'ObjectPropertyExpression(2)\'}->[1]), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'InverseObjectProperties', 'vars' => '', 'line' => 840 }, 'Parse::RecDescent::Rule' ), 'ObjectMinCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectMinCardinality', 'hashname' => '__STRING1__', 'description' => '\'ObjectMinCardinality\'', 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 532 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 533, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->minCardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectMinCardinality', 'vars' => '', 'line' => 532 }, 'Parse::RecDescent::Rule' ), 'ObjectHasSelf' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectHasSelf', 'hashname' => '__STRING1__', 'description' => '\'ObjectHasSelf\'', 'lookahead' => 0, 'line' => 521 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 521 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 521 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 521 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 522, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->hasSelf, RDF::Trine::Node::Literal->new(\'true\', undef, $XSD->boolean->uri)); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectHasSelf', 'vars' => '', 'line' => 521 }, 'Parse::RecDescent::Rule' ), 'DatatypeDefinition' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'Datatype', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DatatypeDefinition', 'hashname' => '__STRING1__', 'description' => '\'DatatypeDefinition\'', 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Datatype', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1018 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1019, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Datatype}, $OWL->equivalentClass, $item{DataRange}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DatatypeDefinition', 'vars' => '', 'line' => 1018 }, 'Parse::RecDescent::Rule' ), 'TransitiveObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'TransitiveObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'TransitiveObjectProperty\'', 'lookahead' => 0, 'line' => 917 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 917 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 917 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 917 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 917 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 918, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->TransitiveProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'TransitiveObjectProperty', 'vars' => '', 'line' => 917 }, 'Parse::RecDescent::Rule' ), 'ObjectPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectProperty', 'InverseObjectProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 351 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'InverseObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 351 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 351 }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectPropertyExpression', 'vars' => '', 'line' => 351 }, 'Parse::RecDescent::Rule' ), 'PNAME_NS' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '(?:[A-Z](?:[A-Z0-9_]|[\\x{00C0}-\\x{00D6}]|[\\x{00D8}-\\x{00F6}]|[\\x{00F8}-\\x{02FF}]|[\\x{0370}-\\x{037D}]|[\\x{037F}-\\x{1FFF}]|[\\x{200C}-\\x{200D}]|[\\x{2070}-\\x{218F}]|[\\x{2C00}-\\x{2FEF}]|[\\x{3001}-\\x{D7FF}]|[\\x{F900}-\\x{FDCF}]|[\\x{FDF0}-\\x{FFFD}]|[\\x{10000}-\\x{EFFFF}])*)?:', 'hashname' => '__PATTERN1__', 'description' => '/(?:[A-Z](?:[A-Z0-9_]|[\\\\x\\{00C0\\}-\\\\x\\{00D6\\}]|[\\\\x\\{00D8\\}-\\\\x\\{00F6\\}]|[\\\\x\\{00F8\\}-\\\\x\\{02FF\\}]|[\\\\x\\{0370\\}-\\\\x\\{037D\\}]|[\\\\x\\{037F\\}-\\\\x\\{1FFF\\}]|[\\\\x\\{200C\\}-\\\\x\\{200D\\}]|[\\\\x\\{2070\\}-\\\\x\\{218F\\}]|[\\\\x\\{2C00\\}-\\\\x\\{2FEF\\}]|[\\\\x\\{3001\\}-\\\\x\\{D7FF\\}]|[\\\\x\\{F900\\}-\\\\x\\{FDCF\\}]|[\\\\x\\{FDF0\\}-\\\\x\\{FFFD\\}]|[\\\\x\\{10000\\}-\\\\x\\{EFFFF\\}])*)?:/i', 'lookahead' => 0, 'rdelim' => '/', 'line' => 39, 'mod' => 'i', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 40, 'code' => '{ $return = $item{__PATTERN1__}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'PNAME_NS', 'vars' => '', 'line' => 39 }, 'Parse::RecDescent::Rule' ), 'Annotation' => bless( { 'impcount' => 0, 'calls' => [ 'annotationAnnotations', 'AnnotationProperty', 'AnnotationValue' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Annotation', 'hashname' => '__STRING1__', 'description' => '\'Annotation\'', 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'annotationAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'AnnotationValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 241 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 242, 'code' => '{ $return = { template => RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new(\'subject\'), $item{AnnotationProperty}, $item{AnnotationValue}, ), annotationAnnotations => $item{annotationAnnotations} }; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'Annotation', 'vars' => '', 'line' => 241 }, 'Parse::RecDescent::Rule' ), 'Ontology' => bless( { 'impcount' => 0, 'calls' => [ 'versioningIRIs', 'directlyImportsDocuments', 'ontologyAnnotations', 'axioms' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Ontology', 'hashname' => '__STRING1__', 'description' => '\'Ontology\'', 'lookahead' => 0, 'line' => 102 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 102 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'versioningIRIs', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 103 }, 'Parse::RecDescent::Repetition' ), bless( { 'subrule' => 'directlyImportsDocuments', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 104 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ontologyAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 105 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'axioms', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 106 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 107 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 108, 'code' => '{ my $h = $thisparser->{TRIPLE}; my ($ont_iri, $ver_iri) = $item{\'versioningIRIs(?)\'}->[0] && @{ $item{\'versioningIRIs(?)\'}->[0] } ? @{ $item{\'versioningIRIs(?)\'}->[0] } : (RDF::Trine::Node::Blank->new); $h->($ont_iri, $RDF->type, $OWL->Ontology); if (ref $ver_iri) { $h->($ont_iri, $OWL->versionIRI, $ver_iri); } foreach my $st (@{ $item{\'directlyImportsDocuments\'} }) { my $import = $st->bind_variables({ ontology => $ont_iri }); $h->($import); } foreach my $ann (@{ $item{\'ontologyAnnotations\'} }) { my $st = $ann->{template}->bind_variables({ subject => $ont_iri }); $h->($st, 2); if (ref $ann->{annotationAnnotations} eq \'ARRAY\' and @{ $ann->{annotationAnnotations} }) { $thisparser->{ANNOTATE}->($ann->{annotationAnnotations}, $st, 4); } } $return = \\%item; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'Ontology', 'vars' => '', 'line' => 102 }, 'Parse::RecDescent::Rule' ), 'AnnotationSubject' => bless( { 'impcount' => 0, 'calls' => [ 'IRI', 'AnonymousIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 234 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnonymousIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 234 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 234 }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationSubject', 'vars' => '', 'line' => 234 }, 'Parse::RecDescent::Rule' ), 'subClassExpression' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 687 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'subClassExpression', 'vars' => '', 'line' => 687 }, 'Parse::RecDescent::Rule' ), 'booleanLiteral' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '(true|false|yes|no)', 'hashname' => '__PATTERN1__', 'description' => '/(true|false|yes|no)/i', 'lookahead' => 0, 'rdelim' => '/', 'line' => 340, 'mod' => 'i', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 341, 'code' => '{ if ($item{__PATTERN1__} =~ /(true|yes)/i) { $return = RDF::Trine::Node::Literal->new(\'true\', undef, $XSD->boolean->uri); } elsif ($item{__PATTERN1__} =~ /(false|no)/i) { $return = RDF::Trine::Node::Literal->new(\'false\', undef, $XSD->boolean->uri); } else { die "huh?"; } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'booleanLiteral', 'vars' => '', 'line' => 340 }, 'Parse::RecDescent::Rule' ), 'DisjointDataProperties' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointDataProperties', 'hashname' => '__STRING1__', 'description' => '\'DisjointDataProperties\'', 'lookahead' => 0, 'line' => 962 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 962 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 962 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 2, 'matchrule' => 0, 'repspec' => '2', 'lookahead' => 0, 'line' => 962 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 962 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 963, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'DataPropertyExpression(2)\'}->[0], $OWL->propertyDisjointWith, $item{\'DataPropertyExpression(2)\'}->[1]), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointDataProperties', 'hashname' => '__STRING1__', 'description' => '\'DisjointDataProperties\'', 'lookahead' => 0, 'line' => 973 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 973 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 973 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 3, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '3..', 'lookahead' => 0, 'line' => 973 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 973 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 974, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{\'DataPropertyExpression(3..)\'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DisjointDataProperties', 'vars' => '', 'line' => 962 }, 'Parse::RecDescent::Rule' ), 'DataUnionOf' => bless( { 'impcount' => 0, 'calls' => [ 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataUnionOf', 'hashname' => '__STRING1__', 'description' => '\'DataUnionOf\'', 'lookahead' => 0, 'line' => 382 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 382 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataRange', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 382 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 382 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 383, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'DataRange(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->unionOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataUnionOf', 'vars' => '', 'line' => 382 }, 'Parse::RecDescent::Rule' ), 'IrreflexiveObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'IrreflexiveObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'IrreflexiveObjectProperty\'', 'lookahead' => 0, 'line' => 884 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 884 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 884 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 884 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 884 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 885, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->IrreflexiveProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'IrreflexiveObjectProperty', 'vars' => '', 'line' => 884 }, 'Parse::RecDescent::Rule' ), 'SymmetricObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SymmetricObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'SymmetricObjectProperty\'', 'lookahead' => 0, 'line' => 895 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 895 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 895 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 895 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 895 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 896, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->SymmetricProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SymmetricObjectProperty', 'vars' => '', 'line' => 895 }, 'Parse::RecDescent::Rule' ), 'ObjectOneOf' => bless( { 'impcount' => 0, 'calls' => [ 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectOneOf', 'hashname' => '__STRING1__', 'description' => '\'ObjectOneOf\'', 'lookahead' => 0, 'line' => 477 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 477 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Individual', 'expected' => undef, 'min' => 1, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's', 'lookahead' => 0, 'line' => 477 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 477 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 478, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'ClassExpression(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->oneOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectOneOf', 'vars' => '', 'line' => 477 }, 'Parse::RecDescent::Rule' ), 'nonNegativeInteger' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '\\d+', 'hashname' => '__PATTERN1__', 'description' => '/\\\\d+/', 'lookahead' => 0, 'rdelim' => '/', 'line' => 49, 'mod' => '', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 50, 'code' => '{ $return = $item{__PATTERN1__}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'nonNegativeInteger', 'vars' => '', 'line' => 47 }, 'Parse::RecDescent::Rule' ), 'sourceIndividual' => bless( { 'impcount' => 0, 'calls' => [ 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Individual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1055 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'sourceIndividual', 'vars' => '', 'line' => 1055 }, 'Parse::RecDescent::Rule' ), 'subAnnotationProperty' => bless( { 'impcount' => 0, 'calls' => [ 'AnnotationProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 279 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'subAnnotationProperty', 'vars' => '', 'line' => 279 }, 'Parse::RecDescent::Rule' ), 'NamedIndividual' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 314 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'NamedIndividual', 'vars' => '', 'line' => 314 }, 'Parse::RecDescent::Rule' ), 'targetIndividual' => bless( { 'impcount' => 0, 'calls' => [ 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Individual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1056 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'targetIndividual', 'vars' => '', 'line' => 1056 }, 'Parse::RecDescent::Rule' ), 'DataIntersectionOf' => bless( { 'impcount' => 0, 'calls' => [ 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataIntersectionOf', 'hashname' => '__STRING1__', 'description' => '\'DataIntersectionOf\'', 'lookahead' => 0, 'line' => 371 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 371 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataRange', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 371 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 371 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 372, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'DataRange(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataIntersectionOf', 'vars' => '', 'line' => 371 }, 'Parse::RecDescent::Rule' ), 'EquivalentClasses' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'EquivalentClasses', 'hashname' => '__STRING1__', 'description' => '\'EquivalentClasses\'', 'lookahead' => 0, 'line' => 690 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 690 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 690 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 690 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 690 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 691, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{\'ClassExpression(2..)\'} }) { foreach my $ce2 (@{ $item{\'ClassExpression(2..)\'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentClass, $ce2), ); } } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'EquivalentClasses', 'vars' => '', 'line' => 690 }, 'Parse::RecDescent::Rule' ), 'DataHasValue' => bless( { 'impcount' => 0, 'calls' => [ 'DataPropertyExpression', 'Literal' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataHasValue', 'hashname' => '__STRING1__', 'description' => '\'DataHasValue\'', 'lookahead' => 0, 'line' => 623 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 623 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 623 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Literal', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 623 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 623 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 624, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->hasValue, $item{Literal}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataHasValue', 'vars' => '', 'line' => 623 }, 'Parse::RecDescent::Rule' ), 'importStatement' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Import', 'hashname' => '__STRING1__', 'description' => '\'Import\'', 'lookahead' => 0, 'line' => 146 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 146 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 146 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 146 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 147, 'code' => '{ $return = RDF::Trine::Statement->new( RDF::Trine::Node::Variable->new(\'ontology\'), $OWL->imports, $item{IRI}, ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'importStatement', 'vars' => '', 'line' => 146 }, 'Parse::RecDescent::Rule' ), 'DataRange' => bless( { 'impcount' => 0, 'calls' => [ 'Datatype', 'DataIntersectionOf', 'DataUnionOf', 'DataComplementOf', 'DataOneOf', 'DatatypeRestriction' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Datatype', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 364 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataIntersectionOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 365 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 365 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataUnionOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 366 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 366 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataComplementOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 367 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 367 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataOneOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 368 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 368 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DatatypeRestriction', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 369 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 369 }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataRange', 'vars' => '', 'line' => 364 }, 'Parse::RecDescent::Rule' ), 'InverseFunctionalObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'InverseFunctionalObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'InverseFunctionalObjectProperty\'', 'lookahead' => 0, 'line' => 862 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 862 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 862 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 862 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 862 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 863, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->InverseFunctionalProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'InverseFunctionalObjectProperty', 'vars' => '', 'line' => 862 }, 'Parse::RecDescent::Rule' ), 'FunctionalObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'FunctionalObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'FunctionalObjectProperty\'', 'lookahead' => 0, 'line' => 851 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 851 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 851 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 851 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 851 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 852, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression\'}, $RDF->type, $OWL->FunctionalProperty), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'FunctionalObjectProperty', 'vars' => '', 'line' => 851 }, 'Parse::RecDescent::Rule' ), 'AnnotationAxiom' => bless( { 'impcount' => 0, 'calls' => [ 'AnnotationAssertion', 'SubAnnotationPropertyOf', 'AnnotationPropertyDomain', 'AnnotationPropertyRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationAssertion', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 256 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SubAnnotationPropertyOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 256 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 256 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationPropertyDomain', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 256 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 256 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AnnotationPropertyRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 256 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 256 }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationAxiom', 'vars' => '', 'line' => 256 }, 'Parse::RecDescent::Rule' ), 'SubDataPropertyOf' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'subDataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SubDataPropertyOf', 'hashname' => '__STRING1__', 'description' => '\'SubDataPropertyOf\'', 'lookahead' => 0, 'line' => 932 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 932 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 932 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'subDataPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 2, 'matchrule' => 0, 'repspec' => '2', 'lookahead' => 0, 'line' => 932 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 932 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 933, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subDataPropertyExpression}, $RDFS->subPropertyOf, $item{superDataPropertyExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SubDataPropertyOf', 'vars' => '', 'line' => 932 }, 'Parse::RecDescent::Rule' ), 'ontologyDocument' => bless( { 'impcount' => 0, 'calls' => [ 'prefixDeclaration', 'Ontology' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 1, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'hashname' => '__DIRECTIVE1__', 'name' => '', 'lookahead' => 0, 'line' => 85, 'code' => 'my $oldskip = $skip; $skip=qr{\\s*(?:/[*].*?[*]/\\s*)*(?:#[^\\n]*\\n\\s*)*\\s*}; $oldskip' }, 'Parse::RecDescent::Directive' ), bless( { 'subrule' => 'prefixDeclaration', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 85 }, 'Parse::RecDescent::Repetition' ), bless( { 'subrule' => 'Ontology', 'expected' => undef, 'min' => 1, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's', 'lookahead' => 0, 'line' => 85 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 86, 'code' => '{ $return = \\%item; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ontologyDocument', 'vars' => '', 'line' => 85 }, 'Parse::RecDescent::Rule' ), 'DisjointClasses' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointClasses', 'hashname' => '__STRING1__', 'description' => '\'DisjointClasses\'', 'lookahead' => 0, 'line' => 707 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 707 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 707 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 2, 'matchrule' => 0, 'repspec' => '2', 'lookahead' => 0, 'line' => 707 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 707 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 708, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ClassExpression(2)\'}->[0], $OWL->disjointWith, $item{\'ClassExpression(2)\'}->[1]), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointClasses', 'hashname' => '__STRING1__', 'description' => '\'DisjointClasses\'', 'lookahead' => 0, 'line' => 718 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 718 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 718 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 3, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '3..', 'lookahead' => 0, 'line' => 718 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 718 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 719, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{\'ClassExpression(3..)\'}); $h->($x, $RDF->type, $OWL->AllDisjointClasses); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DisjointClasses', 'vars' => '', 'line' => 707 }, 'Parse::RecDescent::Rule' ), 'DisjointObjectProperties' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointObjectProperties', 'hashname' => '__STRING1__', 'description' => '\'DisjointObjectProperties\'', 'lookahead' => 0, 'line' => 795 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 795 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 795 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 2, 'matchrule' => 0, 'repspec' => '2', 'lookahead' => 0, 'line' => 795 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 795 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 796, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{\'ObjectPropertyExpression(2)\'}->[0], $OWL->propertyDisjointWith, $item{\'ObjectPropertyExpression(2)\'}->[1]), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointObjectProperties', 'hashname' => '__STRING1__', 'description' => '\'DisjointObjectProperties\'', 'lookahead' => 0, 'line' => 806 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 806 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 806 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'expected' => undef, 'min' => 3, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '3..', 'lookahead' => 0, 'line' => 806 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 806 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 807, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; my $list = $list_generator->($h, $item{\'ObjectPropertyExpression(3..)\'}); $h->($x, $RDF->type, $OWL->AllDisjointProperties); $h->($x, $OWL->members, $list); $a->($item{axiomAnnotations}, $x); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DisjointObjectProperties', 'vars' => '', 'line' => 795 }, 'Parse::RecDescent::Rule' ), 'Declaration' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotationsD', 'Entity' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'pattern' => 'Declaration', 'hashname' => '__STRING1__', 'description' => '\'Declaration\'', 'lookahead' => 0, 'line' => 160 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 160 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotationsD', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 160 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Entity', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 160 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 160 }, 'Parse::RecDescent::Literal' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'Declaration', 'vars' => '', 'line' => 160 }, 'Parse::RecDescent::Rule' ), 'restrictionValue' => bless( { 'impcount' => 0, 'calls' => [ 'Literal' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'Literal', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 435 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'restrictionValue', 'vars' => '', 'line' => 435 }, 'Parse::RecDescent::Rule' ), 'ObjectIntersectionOf' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectIntersectionOf', 'hashname' => '__STRING1__', 'description' => '\'ObjectIntersectionOf\'', 'lookahead' => 0, 'line' => 445 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 445 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 445 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 445 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 446, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $list = $list_generator->($h, $item{\'ClassExpression(2..)\'}); my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Class); $h->($x, $OWL->intersectionOf, $list); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectIntersectionOf', 'vars' => '', 'line' => 445 }, 'Parse::RecDescent::Rule' ), 'superObjectPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 776 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'superObjectPropertyExpression', 'vars' => '', 'line' => 776 }, 'Parse::RecDescent::Rule' ), 'subObjectPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 775 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'subObjectPropertyExpression', 'vars' => '', 'line' => 775 }, 'Parse::RecDescent::Rule' ), 'typedLiteral' => bless( { 'impcount' => 0, 'calls' => [ 'lexicalForm', 'Datatype' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 1, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'lexicalForm', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 320 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => '^^', 'hashname' => '__STRING1__', 'description' => '\'^^\'', 'lookahead' => 0, 'line' => 320 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Datatype', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 320 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 321, 'code' => '{ if ($item{Datatype}->equal($RDF->PlainLiteral)) { my ($lex, $lang) = ($item{lexicalForm} =~ m{^(.*)\\@([^@]*)$}); $return = RDF::Trine::Node::Literal->new($lex, $lang) } else { $return = RDF::Trine::Node::Literal->new($item{lexicalForm}, undef, $item{Datatype}->uri); } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'typedLiteral', 'vars' => '', 'line' => 320 }, 'Parse::RecDescent::Rule' ), 'PNAME_LN' => bless( { 'impcount' => 0, 'calls' => [ 'PNAME_NS', 'PN_LOCAL' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 1, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'PNAME_NS', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 41 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__DIRECTIVE1__', 'name' => '', 'lookahead' => 0, 'line' => 41, 'code' => 'my $oldskip = $skip; $skip=\'\'; $oldskip' }, 'Parse::RecDescent::Directive' ), bless( { 'subrule' => 'PN_LOCAL', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 41 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 42, 'code' => '{ $return = [ $item{PNAME_NS}, $item{PN_LOCAL} ]; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'PNAME_LN', 'vars' => '', 'line' => 41 }, 'Parse::RecDescent::Rule' ), 'SubAnnotationPropertyOf' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'subAnnotationProperty', 'superAnnotationProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SubAnnotationPropertyOf', 'hashname' => '__STRING1__', 'description' => '\'SubAnnotationPropertyOf\'', 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'subAnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'superAnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 269 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 270, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subAnnotationProperty}, $RDFS->subPropertyOf, $item{superAnnotationProperty}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SubAnnotationPropertyOf', 'vars' => '', 'line' => 269 }, 'Parse::RecDescent::Rule' ), 'subDataPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 942 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'subDataPropertyExpression', 'vars' => '', 'line' => 942 }, 'Parse::RecDescent::Rule' ), 'DataPropertyAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression', 'sourceIndividual', 'targetValue' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataPropertyAssertion', 'hashname' => '__STRING1__', 'description' => '\'DataPropertyAssertion\'', 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetValue', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1118 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1119, 'code' => '{ my $h = $thisparser->{TRIPLE}; $h->($item{sourceIndividual}, $item{DataPropertyExpression}, $item{targetValue}); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataPropertyAssertion', 'vars' => '', 'line' => 1118 }, 'Parse::RecDescent::Rule' ), 'superDataPropertyExpression' => bless( { 'impcount' => 0, 'calls' => [ 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 943 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'superDataPropertyExpression', 'vars' => '', 'line' => 943 }, 'Parse::RecDescent::Rule' ), 'fullIRI' => bless( { 'impcount' => 0, 'calls' => [], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 2, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 1, 'actcount' => 1, 'items' => [ bless( { 'pattern' => '<', 'hashname' => '__STRING1__', 'description' => '\'<\'', 'lookahead' => 0, 'line' => 62 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '[^\\s><]*', 'hashname' => '__PATTERN1__', 'description' => '/[^\\\\s><]*/', 'lookahead' => 0, 'rdelim' => '/', 'line' => 62, 'mod' => '', 'ldelim' => '/' }, 'Parse::RecDescent::Token' ), bless( { 'pattern' => '>', 'hashname' => '__STRING2__', 'description' => '\'>\'', 'lookahead' => 0, 'line' => 62 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 63, 'code' => '{ $return = $item{__PATTERN1__}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'fullIRI', 'vars' => '', 'line' => 62 }, 'Parse::RecDescent::Rule' ), 'DataProperty' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 309 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataProperty', 'vars' => '', 'line' => 309 }, 'Parse::RecDescent::Rule' ), 'SubClassOf' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'subClassExpression', 'superClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SubClassOf', 'hashname' => '__STRING1__', 'description' => '\'SubClassOf\'', 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'subClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'superClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 677 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 678, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{subClassExpression}, $RDFS->subClassOf, $item{superClassExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SubClassOf', 'vars' => '', 'line' => 677 }, 'Parse::RecDescent::Rule' ), 'axiomAnnotations' => bless( { 'impcount' => 0, 'calls' => [ 'Annotation' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'Annotation', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 236 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 237, 'code' => '{ $return = $item{\'Annotation(s?)\'}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'axiomAnnotations', 'vars' => '', 'line' => 236 }, 'Parse::RecDescent::Rule' ), 'Entity' => bless( { 'impcount' => 0, 'calls' => [ 'Class', 'Datatype', 'ObjectProperty', 'DataProperty', 'AnnotationProperty', 'NamedIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Class', 'hashname' => '__STRING1__', 'description' => '\'Class\'', 'lookahead' => 0, 'line' => 161 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 161 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Class', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 161 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 161 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 162, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Class}, $RDF->type, $OWL->Class), ); $return = $item{Class}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'Datatype', 'hashname' => '__STRING1__', 'description' => '\'Datatype\'', 'lookahead' => 0, 'line' => 173 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 173 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'Datatype', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 173 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 173 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 174, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{Datatype}, $RDF->type, $OWL->Datatype), ); $return = $item{Datatype}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => 173 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectProperty', 'hashname' => '__STRING1__', 'description' => '\'ObjectProperty\'', 'lookahead' => 0, 'line' => 185 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 185 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 185 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 185 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 186, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{ObjectProperty}, $RDF->type, $OWL->ObjectProperty), ); $return = $item{ObjectProperty}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => 185 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataProperty', 'hashname' => '__STRING1__', 'description' => '\'DataProperty\'', 'lookahead' => 0, 'line' => 197 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 197 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 197 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 197 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 198, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{DataProperty}, $RDF->type, $OWL->DatatypeProperty), ); $return = $item{DataProperty}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => 197 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'AnnotationProperty', 'hashname' => '__STRING1__', 'description' => '\'AnnotationProperty\'', 'lookahead' => 0, 'line' => 209 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 209 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'AnnotationProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 209 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 209 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 210, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{AnnotationProperty}, $RDF->type, $OWL->AnnotationProperty), ); $return = $item{AnnotationProperty}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => 209 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'NamedIndividual', 'hashname' => '__STRING1__', 'description' => '\'NamedIndividual\'', 'lookahead' => 0, 'line' => 221 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 221 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'NamedIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 221 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 221 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 222, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $declaredAnnotations, $h->($item{NamedIndividual}, $RDF->type, $OWL->NamedIndividual), ); $return = $item{NamedIndividual}; $declaredAnnotations = undef; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => 221 }, 'Parse::RecDescent::Production' ) ], 'name' => 'Entity', 'vars' => '', 'line' => 161 }, 'Parse::RecDescent::Rule' ), 'axioms' => bless( { 'impcount' => 0, 'calls' => [ 'Axiom' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'Axiom', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 157 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 158, 'code' => '{ $return = \\%item; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'axioms', 'vars' => '', 'line' => 157 }, 'Parse::RecDescent::Rule' ), 'ObjectProperty' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 308 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectProperty', 'vars' => '', 'line' => 308 }, 'Parse::RecDescent::Rule' ), 'lexicalForm' => bless( { 'impcount' => 0, 'calls' => [ 'quotedString' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'quotedString', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 333 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'lexicalForm', 'vars' => '', 'line' => 333 }, 'Parse::RecDescent::Rule' ), 'DataPropertyAxiom' => bless( { 'impcount' => 0, 'calls' => [ 'SubDataPropertyOf', 'EquivalentDataProperties', 'DisjointDataProperties', 'DataPropertyDomain', 'DataPropertyRange', 'FunctionalDataProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SubDataPropertyOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 929 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'EquivalentDataProperties', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 929 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 929 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DisjointDataProperties', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 929 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 929 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyDomain', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 930 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 929 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DataPropertyRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 930 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 930 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'FunctionalDataProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 930 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 930 }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataPropertyAxiom', 'vars' => '', 'line' => 928 }, 'Parse::RecDescent::Rule' ), 'NegativeObjectPropertyAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ObjectPropertyExpression', 'sourceIndividual', 'targetIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'NegativeObjectPropertyAssertion', 'hashname' => '__STRING1__', 'description' => '\'NegativeObjectPropertyAssertion\'', 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1105 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1106, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->NegativePropertyAssertion); $h->($x, $OWL->sourceIndividual, $item{sourceIndividual}); $h->($x, $OWL->assertionProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->targetIndividual, $item{targetIndividual}); $a->($item{axiomAnnotations}, $x); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'NegativeObjectPropertyAssertion', 'vars' => '', 'line' => 1105 }, 'Parse::RecDescent::Rule' ), 'axiomAnnotationsD' => bless( { 'impcount' => 0, 'calls' => [ 'Annotation' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'Annotation', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => 's?', 'lookahead' => 0, 'line' => 238 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 239, 'code' => '{ $declaredAnnotations = $return = $item{\'Annotation(s?)\'}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'axiomAnnotationsD', 'vars' => '', 'line' => 238 }, 'Parse::RecDescent::Rule' ), 'ObjectSomeValuesFrom' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectSomeValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'ObjectSomeValuesFrom\'', 'lookahead' => 0, 'line' => 488 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 488 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 488 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 488 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 488 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 489, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->someValuesFrom, $item{ClassExpression}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectSomeValuesFrom', 'vars' => '', 'line' => 488 }, 'Parse::RecDescent::Rule' ), 'numericLiteral' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 338 }, 'Parse::RecDescent::Subrule' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 339, 'code' => '{ $return = RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'numericLiteral', 'vars' => '', 'line' => 338 }, 'Parse::RecDescent::Rule' ), 'Literal' => bless( { 'impcount' => 0, 'calls' => [ 'typedLiteral', 'stringLiteralWithLanguage', 'stringLiteralNoLanguage', 'numericLiteral', 'booleanLiteral' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'typedLiteral', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 318 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'stringLiteralWithLanguage', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 318 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 318 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'stringLiteralNoLanguage', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 318 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 318 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'numericLiteral', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 318 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 318 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'booleanLiteral', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 318 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 318 }, 'Parse::RecDescent::Production' ) ], 'name' => 'Literal', 'vars' => '', 'line' => 318 }, 'Parse::RecDescent::Rule' ), 'AnnotationProperty' => bless( { 'impcount' => 0, 'calls' => [ 'IRI' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IRI', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 310 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'AnnotationProperty', 'vars' => '', 'line' => 310 }, 'Parse::RecDescent::Rule' ), 'DataExactCardinality' => bless( { 'impcount' => 0, 'calls' => [ 'nonNegativeInteger', 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataExactCardinality', 'hashname' => '__STRING1__', 'description' => '\'DataExactCardinality\'', 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'nonNegativeInteger', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'expected' => undef, 'min' => 0, 'argcode' => undef, 'max' => 1, 'matchrule' => 0, 'repspec' => '?', 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 660 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 661, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{DataPropertyExpression}); $h->($x, $OWL->cardinality, RDF::Trine::Node::Literal->new($item{nonNegativeInteger}, undef, $XSD->nonNegativeInteger->uri)); $h->($x, $OWL->onClass, $item{\'ClassExpression(?)\'}->[0]) if $item{\'ClassExpression(?)\'} && @{ $item{\'ClassExpression(?)\'} }; $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataExactCardinality', 'vars' => '', 'line' => 660 }, 'Parse::RecDescent::Rule' ), 'SameIndividual' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'sourceIndividual', 'targetIndividual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'SameIndividual', 'hashname' => '__STRING1__', 'description' => '\'SameIndividual\'', 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'sourceIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'targetIndividual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1059 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1060, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{sourceIndividual}, $OWL->sameAs, $item{targetIndividual}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'SameIndividual', 'vars' => '', 'line' => 1059 }, 'Parse::RecDescent::Rule' ), 'ClassAssertion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'ClassExpression', 'Individual' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ClassAssertion', 'hashname' => '__STRING1__', 'description' => '\'ClassAssertion\'', 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Individual', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 1083 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 1084, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{Individual}, $RDF->type, $item{ClassExpression}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ClassAssertion', 'vars' => '', 'line' => 1083 }, 'Parse::RecDescent::Rule' ), 'EquivalentDataProperties' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'EquivalentDataProperties', 'hashname' => '__STRING1__', 'description' => '\'EquivalentDataProperties\'', 'lookahead' => 0, 'line' => 945 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 945 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 945 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 945 }, 'Parse::RecDescent::Repetition' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 945 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 946, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; foreach my $ce1 (@{ $item{\'DataPropertyExpression(2..)\'} }) { foreach my $ce2 (@{ $item{\'DataPropertyExpression(2..)\'} }) { $a->( $item{axiomAnnotations}, $h->($ce1, $OWL->equivalentProperty, $ce2), ); } } 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'EquivalentDataProperties', 'vars' => '', 'line' => 945 }, 'Parse::RecDescent::Rule' ), 'ObjectPropertyAxiom' => bless( { 'impcount' => 0, 'calls' => [ 'SubObjectPropertyOf', 'EquivalentObjectProperties', 'DisjointObjectProperties', 'InverseObjectProperties', 'ObjectPropertyDomain', 'ObjectPropertyRange', 'FunctionalObjectProperty', 'InverseFunctionalObjectProperty', 'ReflexiveObjectProperty', 'IrreflexiveObjectProperty', 'SymmetricObjectProperty', 'AsymmetricObjectProperty', 'TransitiveObjectProperty' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SubObjectPropertyOf', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 745 }, 'Parse::RecDescent::Subrule' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ), bless( { 'number' => '1', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'EquivalentObjectProperties', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 745 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 745 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '2', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'DisjointObjectProperties', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 746 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 745 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '3', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'InverseObjectProperties', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 746 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 746 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '4', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyDomain', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 747 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 746 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '5', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ObjectPropertyRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 747 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 747 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '6', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'FunctionalObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 748 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 747 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '7', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'InverseFunctionalObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 748 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 748 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '8', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'ReflexiveObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 749 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 748 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '9', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'IrreflexiveObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 749 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 749 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '10', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'SymmetricObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 750 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 749 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '11', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'AsymmetricObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 750 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 750 }, 'Parse::RecDescent::Production' ), bless( { 'number' => '12', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 0, 'items' => [ bless( { 'subrule' => 'TransitiveObjectProperty', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 751 }, 'Parse::RecDescent::Subrule' ) ], 'line' => 750 }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectPropertyAxiom', 'vars' => '', 'line' => 744 }, 'Parse::RecDescent::Rule' ), 'DisjointUnion' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'Class', 'disjointClassExpressions' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DisjointUnion', 'hashname' => '__STRING1__', 'description' => '\'DisjointUnion\'', 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'Class', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'disjointClassExpressions', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 730 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 731, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; my $list = $list_generator->($h, $item{disjointClassExpressions}); $a->( $item{axiomAnnotations}, $h->($item{Class}, $OWL->disjointUnionOf, $list), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DisjointUnion', 'vars' => '', 'line' => 730 }, 'Parse::RecDescent::Rule' ), 'DataComplementOf' => bless( { 'impcount' => 0, 'calls' => [ 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataComplementOf', 'hashname' => '__STRING1__', 'description' => '\'DataComplementOf\'', 'lookahead' => 0, 'line' => 393 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 393 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 393 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 393 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 394, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $RDFS->Datatype); $h->($x, $OWL->datatypeComplementOf, $item{DataRange}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataComplementOf', 'vars' => '', 'line' => 393 }, 'Parse::RecDescent::Rule' ), 'DataPropertyRange' => bless( { 'impcount' => 0, 'calls' => [ 'axiomAnnotations', 'DataPropertyExpression', 'DataRange' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'DataPropertyRange', 'hashname' => '__STRING1__', 'description' => '\'DataPropertyRange\'', 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'axiomAnnotations', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'DataRange', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 996 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 997, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $a = $thisparser->{ANNOTATE}; $a->( $item{axiomAnnotations}, $h->($item{DataPropertyExpression}, $RDFS->range, $item{DataRange}), ); 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'DataPropertyRange', 'vars' => '', 'line' => 996 }, 'Parse::RecDescent::Rule' ), 'disjointClassExpressions' => bless( { 'impcount' => 0, 'calls' => [ 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 0, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'subrule' => 'ClassExpression', 'expected' => undef, 'min' => 2, 'argcode' => undef, 'max' => 100000000, 'matchrule' => 0, 'repspec' => '2..', 'lookahead' => 0, 'line' => 741 }, 'Parse::RecDescent::Repetition' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 742, 'code' => '{ $return = $item{\'ClassExpression(2..)\'}; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'disjointClassExpressions', 'vars' => '', 'line' => 741 }, 'Parse::RecDescent::Rule' ), 'ObjectAllValuesFrom' => bless( { 'impcount' => 0, 'calls' => [ 'ObjectPropertyExpression', 'ClassExpression' ], 'changed' => 0, 'opcount' => 0, 'prods' => [ bless( { 'number' => '0', 'strcount' => 3, 'dircount' => 0, 'uncommit' => undef, 'error' => undef, 'patcount' => 0, 'actcount' => 1, 'items' => [ bless( { 'pattern' => 'ObjectAllValuesFrom', 'hashname' => '__STRING1__', 'description' => '\'ObjectAllValuesFrom\'', 'lookahead' => 0, 'line' => 499 }, 'Parse::RecDescent::Literal' ), bless( { 'pattern' => '(', 'hashname' => '__STRING2__', 'description' => '\'(\'', 'lookahead' => 0, 'line' => 499 }, 'Parse::RecDescent::Literal' ), bless( { 'subrule' => 'ObjectPropertyExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 499 }, 'Parse::RecDescent::Subrule' ), bless( { 'subrule' => 'ClassExpression', 'matchrule' => 0, 'implicit' => undef, 'argcode' => undef, 'lookahead' => 0, 'line' => 499 }, 'Parse::RecDescent::Subrule' ), bless( { 'pattern' => ')', 'hashname' => '__STRING3__', 'description' => '\')\'', 'lookahead' => 0, 'line' => 499 }, 'Parse::RecDescent::Literal' ), bless( { 'hashname' => '__ACTION1__', 'lookahead' => 0, 'line' => 500, 'code' => '{ my $h = $thisparser->{TRIPLE}; my $x = RDF::Trine::Node::Blank->new; $h->($x, $RDF->type, $OWL->Restriction); $h->($x, $OWL->onProperty, $item{ObjectPropertyExpression}); $h->($x, $OWL->allValuesFrom, $item{ClassExpression}); $return = $x; 1; }' }, 'Parse::RecDescent::Action' ) ], 'line' => undef }, 'Parse::RecDescent::Production' ) ], 'name' => 'ObjectAllValuesFrom', 'vars' => '', 'line' => 499 }, 'Parse::RecDescent::Rule' ) } }, 'Parse::RecDescent' ); }RDF-Closure-0.001/lib/RDF/Trine/Parser/OwlFn.pm0000644000076400007640000002200311773064025016746 0ustar taitaipackage RDF::Trine::Parser::OwlFn; use 5.008; use strict; use utf8; use Data::UUID; #use RDF::Trine; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use URI; our @ISA = qw[RDF::Trine::Parser]; our ($ParserClass, $VERSION); use constant AXIOMATIC => 0; use constant ANNOTATION => 1; use constant ONTOLOGY_ANNOTATION => 2; use constant ANNOTATION_ANNOTATION => 4; BEGIN { $VERSION = '0.001'; # Perl package name my $class = __PACKAGE__; $RDF::Trine::Parser::parser_names{'owlfn'} = $class; # Common file extension $RDF::Trine::Parser::parser_names{'ofn'} = $class; $RDF::Trine::Parser::file_extensions{'ofn'} = $class; $RDF::Trine::Parser::file_extensions{'OFN'} = $class; # Format URI $RDF::Trine::Parser::parser_names{'owlfunctional'} = $class; $RDF::Trine::Parser::format_uris{'http://www.w3.org/ns/formats/OWL_Functional'} = $class; # Media type $RDF::Trine::Parser::media_types{'text/owl-functional'} = $class; $RDF::Trine::Parser::canonical_media_types{$class} = 'text/owl-functional'; $RDF::Trine::Parser::encodings{$class} = 'utf8'; } sub new { my ($class, %args) = @_; unless ($ParserClass) { if (eval "use ${class}::Compiled; 1;") { $ParserClass = "${class}::Compiled"; } elsif (eval "use ${class}::Grammar; 1;") { $ParserClass = "${class}::Grammar"; } } return bless { ParserClass => $ParserClass, Options => \%args, }, $class; } sub parse { my ($self, $uri, $text, $handler, %args) = @_; $self->{PRD} = undef; $self->_blank_slate($handler, $args{prefix_handler}||0, $uri); die "PRD parser could not be instantiated.\n" unless defined $self->{PRD}; $self->{PRD}->ontologyDocument(\$text); return $text; } sub _blank_slate { my ($self, $st_handler, $b_handler, $base_uri) = @_; my $parser = $self->{PRD} = $self->{ParserClass}->new; $self->{Handler} = $st_handler || 0; $self->{BindingHandler} = $b_handler || 0; $parser->{BASE_URI} = $base_uri || undef; # Accept a statement from the PRD parser and hand it to the Trine parser. $parser->{STATEMENT} = sub { my ($st, $type) = @_; unless (($self->{Options}{filter}||0) & $type) { if (ref $self->{Handler} eq 'CODE') { $self->{Handler}->($st); } elsif ($self->{Handler} == 1) { printf("%s #%d\n", $st->sse, $type); } } }; # Process a statement from the PRD parser. $parser->{TRIPLE} = sub { my ($st, $source); if ($_[0]->isa('RDF::Trine::Node')) { $st = RDF::Trine::Statement->new(@_[0..2]); $source = $_[3]; } else { $st = $_[0]; $source = $_[1]; } $source = AXIOMATIC unless defined $source; $parser->{STATEMENT}->($st, $source); return $st; }; # Process a set of annotations from the PRD parser. $parser->{ANNOTATE} = sub { my ($annotations, $things, $source) = @_; $things = [$things] unless ref $things eq 'ARRAY'; $source = ANNOTATION unless defined $source; if (ref $annotations eq 'ARRAY' and @$annotations) { foreach my $st (@$things) { my $reified = $st->isa('RDF::Trine::Node') ? $st : RDF::Trine::Node::Blank->new; my $reification_done = 0; foreach my $ann (@$annotations) { unless ($reification_done or $st->isa('RDF::Trine::Node')) { my $type = ($source==ANNOTATION_ANNOTATION) ? $OWL->Annotation : $OWL->Axiom; $parser->{STATEMENT}->(RDF::Trine::Statement->new($reified, $RDF->type, $type), $source); $parser->{STATEMENT}->(RDF::Trine::Statement->new($reified, $OWL->annotatedSource, $st->subject), $source); $parser->{STATEMENT}->(RDF::Trine::Statement->new($reified, $OWL->annotatedProperty, $st->predicate), $source); $parser->{STATEMENT}->(RDF::Trine::Statement->new($reified, $OWL->annotatedTarget, $st->object), $source); $reification_done++; } my $x = $ann->{template}->bind_variables({ subject => $reified }); $parser->{STATEMENT}->($x, $source); if (ref $ann->{annotationAnnotations} eq 'ARRAY' and @{$ann->{annotationAnnotations}}) { $parser->{ANNOTATE}->($ann->{annotationAnnotations}, $x, ANNOTATION_ANNOTATION); } } } } }; # Accept a prefix binding from the PRD parser. $parser->{PREFIX} = sub { if (ref $self->{BindingHandler} eq 'CODE') { $self->{BindingHandler}->(@_); } elsif ($self->{BindingHandler} == 1) { printf("(binding \"%s\" <%s>)\n", @_); } }; # The PRD parser needs a blank node prefix. $parser->{BPREFIX} = Data::UUID->new->create_str; $parser->{BPREFIX} =~ s/-//g; return $self; } sub test { local $/ = undef; my $base = 'http://rdf.example.com/ontologies/family_guy#'; my $document = ; my $model = RDF::Trine::Model->temporary_model; my $parser = __PACKAGE__->new; my $ns = { rdf => $RDF->uri->uri, rdfs => $RDFS->uri->uri, owl => $OWL->uri->uri, xsd => $XSD->uri->uri, ''=>$base }; my $turtle = RDF::Trine::Serializer->new( 'Turtle', namespaces => $ns, ); my $r = $parser->parse_into_model($base, $document, $model); print $turtle->serialize_model_to_string($model); 0; } exit(__PACKAGE__->test) unless caller; 1; =head1 NAME RDF::Trine::Parser::OwlFn - OWL Functional Syntax Parser =head1 SYNOPSIS use RDF::Trine::Parser; my $parser = RDF::Trine::Parser->new('owlfn'); $parser->parse_into_model($base_uri, $data, $model); =head1 DESCRIPTION =head2 Methods Beyond the methods documented below, this class inherits methods from the L class. =over =item C<< new(\%options) >> The only option supported is C which can be used to tell the parser to ignore certain potentially boring triples. $flt = RDF::Trine::Parser::OwlFn::ANNOTATION + RDF::Trine::Parser::OwlFn::ANNOTATION_ANNOTATION; $parser = RDF::Trine::Parser->new('owlfn', filter=>$flt); The following constants are defined for filtering purposes: =over =item * C - axiom annotations =item * C - ontology annotations =item * C - annotation annotations =back =back The usual C<< parse_* >> methods accept an argument C which can take a coderef which is called every time a prefix is defined by the ontology being parsed. The coderef is called with two arguments: the prefix being defined (including trailing colon), and the full URI as a string. The C<< parse_* >> methods return a string containing the remainder of the input (i.e. potentially a tail which could not be parsed). =head1 SEE ALSO L, L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut __DATA__ Prefix(a:=) Prefix(foaf:=) /* Hello world. */ # foo bar baz Ontology( Import(foaf:) Annotation( Annotation( Annotation ( a:dated "2011-03-01"^^xsd:date ) a:assertedBy a:Seth ) foaf:maker a:Seth ) Declaration( Annotation( a:test a:annotation ) Class( a:Person ) ) Declaration( Class( a:Dog ) ) Declaration( Class( a:Species ) ) Declaration( NamedIndividual( a:Peter ) ) Declaration( NamedIndividual( a:Brian ) ) ClassAssertion( a:Person a:Peter ) ClassAssertion( a:Dog a:Brian ) #quux ClassAssertion( a:Species a:Dog ) ClassAssertion( a:Species a:Person ) HasKey(a:Person (a:surname a:forename a:placeOfBirth a:dateOfBirth) ()) DisjointClasses( a:Human a:Fish a:Dog a:Cat ) EquivalentClasses( a:Person a:Human foaf:Person ) SubObjectPropertyOf( ObjectPropertyChain( a:hasMother a:hasSister ) a:hasAunt ) ObjectPropertyAssertion( Annotation( Annotation ( a:dated "2011-03-02"^^xsd:date ) a:assertedBy a:Peter ) Annotation( a:assertedBy a:Brian ) a:owns a:Peter a:Brian ) NegativeObjectPropertyAssertion( Annotation( a:assertedBy a:Peter ) a:owns a:Lois a:Brian ) DataPropertyAssertion(a:isMarried a:Peter yes) DataPropertyAssertion(rdfs:label a:Peter "Peter"@en) DataPropertyAssertion(rdfs:label a:Brian "Brian@en"^^rdf:PlainLiteral) DataPropertyAssertion(rdfs:label a:Lois "Lois@"^^rdf:PlainLiteral) DataPropertyAssertion(rdfs:label a:Meg "Meg") DataPropertyAssertion(rdfs:label a:Monkey "\"Evil\" Monkey") DataPropertyRange( Annotation( rdfs:comment "Labels shouldn't be too long or too short." ) rdfs:label DatatypeRestriction( xsd:string xsd:maxLength 256 xsd:minLength 2 ) ) ) # lalalala RDF-Closure-0.001/lib/RDF/Closure/0000755000076400007640000000000011773065330014465 5ustar taitaiRDF-Closure-0.001/lib/RDF/Closure/Engine.pm0000644000076400007640000000575211773064025016241 0ustar taitaipackage RDF::Closure::Engine; use 5.008; use strict; use utf8; use Module::Pluggable except => qw[RDF::Closure::Engine::Core], require => 1, search_path => qw[RDF::Closure::Engine], sub_name => 'engines', ; our $VERSION = '0.001'; sub new { my ($class, $engine, @args) = @_; $engine = 'RDFS' unless defined $engine; my ($match) = grep { /^${class}::${engine}$/i } $class->engines; die sprintf("Package %s::%s not found.\n", $class, $engine) unless $match; return $match->new(@args); } sub entailment_regime { return undef; } # Child classes MUST implement the following methods sub graph { die "Not implemented.\n"; } sub closure { die "Not implemented.\n"; } sub reset { die "Not implemented.\n"; } sub errors { die "Not implemented.\n"; } 1; =head1 NAME RDF::Closure::Engine - an engine for inferring triples =head1 DESCRIPTION =head2 Constructor =over =item * C<< new($regime, $model, @arguments) >> Instantiates an inference engine. This: RDF::Closure::Engine->new('RDFS', $model, @args); is just a shortcut for: RDF::Closure::Engine::RDFS->new($model, @args); Though in the former, 'RDFS' is treated case-insensitively. C<< $model >> must be an L which the engine will read its input from and write its output to. =back =head2 Methods =over =item * C<< entailment_regime >> Returns a URI string identifying the type of inference implemented by the engine, or undef. =item * C<< graph >> Returns the L the engine is operating on. =item * C<< closure( [ $is_subsequent ] ) >> Adds any new triples to the graph that can be inferred. If C<< $is_subsequent >> is true, then skips axioms. =item * C<< errors >> Returns a list of consistency violations found so far. =item * C<< reset >> Removes all inferred triples from the graph. =back =head2 Class Method =over =item * C<< engines >> Return a list of engines installed, e.g. 'RDF::Closure::Engine::RDFS'. =back =head1 SEE ALSO L, L, L, L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/XsdDatatypes.pm0000644000076400007640000001104711773064025017443 0ustar taitaipackage RDF::Closure::XsdDatatypes; use 5.008; use strict; use utf8; use RDF::Trine qw[statement]; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use base qw[Exporter]; our $VERSION = '0.001'; our @EXPORT = qw[]; our @EXPORT_OK = qw[ $RDFS_Datatypes $OWL_RL_Datatypes $RDFS_Datatype_Subsumptions $OWL_Datatype_Subsumptions ]; #: The basic XSD types used everywhere; this means not the complete set of day/month types our $_Common_XSD_Datatypes = [ $XSD->integer, $XSD->decimal, $XSD->nonNegativeInteger, $XSD->nonPositiveInteger, $XSD->negativeInteger, $XSD->positiveInteger, $XSD->long, $XSD->int, $XSD->short, $XSD->byte, $XSD->unsignedLong, $XSD->unsignedInt, $XSD->unsignedShort, $XSD->unsignedByte, $XSD->float, $XSD->double, $XSD->string, $XSD->normalizedString, $XSD->token, $XSD->language, $XSD->Name, $XSD->NCName, $XSD->NMTOKEN, $XSD->boolean, $XSD->hexBinary, $XSD->base64Binary, $XSD->anyURI, $XSD->dateTimeStamp, $XSD->dateTime, $XSD->time, $XSD->date, $RDFS->Literal, $RDF->XMLLiteral ]; #: RDFS Datatypes: the basic ones plus the complete set of day/month ones our $RDFS_Datatypes = [ @$_Common_XSD_Datatypes, $XSD->gYearMonth, $XSD->gMonthDay, $XSD->gYear, $XSD->gDay, $XSD->gMonth ]; #: OWL RL Datatypes: the basic ones plus plain literal our $OWL_RL_Datatypes = [ @$_Common_XSD_Datatypes, $RDF->PlainLiteral ]; #: XSD Datatype subsumptions our $_Common_Datatype_Subsumptions = { $XSD->dateTimeStamp->uri => [ $XSD->dateTime ], $XSD->integer->uri => [ $XSD->decimal ], $XSD->long->uri => [ $XSD->integer, $XSD->decimal ], $XSD->int->uri => [ $XSD->long, $XSD->integer, $XSD->decimal ], $XSD->short->uri => [ $XSD->int, $XSD->long, $XSD->integer, $XSD->decimal ], $XSD->byte->uri => [ $XSD->short, $XSD->int, $XSD->long, $XSD->integer, $XSD->decimal ], $XSD->nonNegativeInteger->uri => [ $XSD->integer, $XSD->decimal ], $XSD->positiveInteger->uri => [ $XSD->nonNegativeInteger, $XSD->integer, $XSD->decimal ], $XSD->unsignedLong->uri => [ $XSD->nonNegativeInteger, $XSD->integer, $XSD->decimal ], $XSD->unsignedInt->uri => [ $XSD->unsignedLong, $XSD->nonNegativeInteger, $XSD->integer, $XSD->decimal ], $XSD->unsignedShort->uri => [ $XSD->unsignedInt, $XSD->unsignedLong, $XSD->nonNegativeInteger, $XSD->integer, $XSD->decimal ], $XSD->unsignedByte->uri => [ $XSD->unsignedShort, $XSD->unsignedInt, $XSD->unsignedLong, $XSD->nonNegativeInteger, $XSD->integer, $XSD->decimal ], $XSD->nonPositiveInteger->uri => [ $XSD->integer, $XSD->decimal ], $XSD->negativeInteger->uri => [ $XSD->nonPositiveInteger, $XSD->integer, $XSD->decimal ], $XSD->normalizedString->uri => [ $XSD->string ], $XSD->token->uri => [ $XSD->normalizedString, $XSD->string ], $XSD->language->uri => [ $XSD->token, $XSD->normalizedString, $XSD->string ], $XSD->Name->uri => [ $XSD->token, $XSD->normalizedString, $XSD->string ], $XSD->NCName->uri => [ $XSD->Name, $XSD->token, $XSD->normalizedString, $XSD->string ], $XSD->NMTOKEN->uri => [ $XSD->Name, $XSD->token, $XSD->normalizedString, $XSD->string ], }; #: RDFS Datatype subsumptions: at the moment, there is no extra to XSD our $RDFS_Datatype_Subsumptions = $_Common_Datatype_Subsumptions; #: OWL Datatype subsumptions: at the moment, there is no extra to XSD our $OWL_Datatype_Subsumptions = $_Common_Datatype_Subsumptions; 1; =head1 NAME RDF::Closure::XsdDatatypes - exports lists of datatypes =head1 ANALOGOUS PYTHON RDFClosure/XsdDatatypes.py =head1 SEE ALSO L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/AxiomaticTriples.pm0000644000076400007640000010125611773064025020311 0ustar taitaipackage RDF::Closure::AxiomaticTriples; use 5.008; use strict; use utf8; use RDF::Trine qw[statement]; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use base qw[Exporter]; our $VERSION = '0.001'; our @EXPORT = qw[]; our @EXPORT_OK = qw[ $RDFS_Axiomatic_Triples $RDFS_D_Axiomatic_Triples_subclasses $RDFS_D_Axiomatic_Triples_types $RDFS_D_Axiomatic_Triples $OWLRL_Axiomatic_Triples $OWL_D_Axiomatic_Triples_subclasses $OWLRL_Datatypes_Disjointness $OWLRL_D_Axiomatic_Triples ]; #: Simple RDF axiomatic triples statement(typing of $RDF->subject, $RDF->predicate, $RDF->first, $RDF->rest, etc) our $_Simple_RDF_axiomatic_triples = [ statement($RDF->type, $RDF->type, $RDF->Property), statement($RDF->subject, $RDF->type, $RDF->Property), statement($RDF->predicate, $RDF->type, $RDF->Property), statement($RDF->object, $RDF->type, $RDF->Property), statement($RDF->first, $RDF->type, $RDF->Property), statement($RDF->rest, $RDF->type, $RDF->Property), statement($RDF->value, $RDF->type, $RDF->Property), statement($RDF->nil, $RDF->type, $RDF->List), ]; #: RDFS axiomatic triples statement($RDFS->domain and $RDFS->range, as well as class setting for a number of RDFS symbols) our $_RDFS_axiomatic_triples = [ statement($RDF->type, $RDFS->domain, $RDFS->Resource), statement($RDFS->domain, $RDFS->domain, $RDF->Property), statement($RDFS->range, $RDFS->domain, $RDF->Property), statement($RDFS->subPropertyOf, $RDFS->domain, $RDF->Property), statement($RDFS->subClassOf, $RDFS->domain, $RDFS->Class), statement($RDF->subject, $RDFS->domain, $RDF->Statement), statement($RDF->predicate, $RDFS->domain, $RDF->Statement), statement($RDF->object, $RDFS->domain, $RDF->Statement), statement($RDFS->member, $RDFS->domain, $RDFS->Resource), statement($RDF->first, $RDFS->domain, $RDF->List), statement($RDF->rest, $RDFS->domain, $RDF->List), statement($RDFS->seeAlso, $RDFS->domain, $RDFS->Resource), statement($RDFS->isDefinedBy, $RDFS->domain, $RDFS->Resource), statement($RDFS->comment, $RDFS->domain, $RDFS->Resource), statement($RDFS->label, $RDFS->domain, $RDFS->Resource), statement($RDF->value, $RDFS->domain, $RDFS->Resource), statement($RDF->Property, $RDF->type, $RDFS->Class), statement($RDF->type, $RDFS->range, $RDFS->Class), statement($RDFS->domain, $RDFS->range, $RDFS->Class), statement($RDFS->range, $RDFS->range, $RDFS->Class), statement($RDFS->subPropertyOf, $RDFS->range, $RDF->Property), statement($RDFS->subClassOf, $RDFS->range, $RDFS->Class), statement($RDF->subject, $RDFS->range, $RDFS->Resource), statement($RDF->predicate, $RDFS->range, $RDFS->Resource), statement($RDF->object, $RDFS->range, $RDFS->Resource), statement($RDFS->member, $RDFS->range, $RDFS->Resource), statement($RDF->first, $RDFS->range, $RDFS->Resource), statement($RDF->rest, $RDFS->range, $RDF->List), statement($RDFS->seeAlso, $RDFS->range, $RDFS->Resource), statement($RDFS->isDefinedBy, $RDFS->range, $RDFS->Resource), statement($RDFS->comment, $RDFS->range, $RDFS->Literal), statement($RDFS->label, $RDFS->range, $RDFS->Literal), statement($RDF->value, $RDFS->range, $RDFS->Resource), statement($RDF->Alt, $RDFS->subClassOf, $RDFS->Container), statement($RDF->Bag, $RDFS->subClassOf, $RDFS->Container), statement($RDF->Seq, $RDFS->subClassOf, $RDFS->Container), statement($RDFS->ContainerMembershipProperty, $RDFS->subClassOf, $RDF->Property), statement($RDFS->isDefinedBy, $RDFS->subPropertyOf, $RDFS->seeAlso), statement($RDF->XMLLiteral, $RDF->type, $RDFS->Datatype), statement($RDF->XMLLiteral, $RDFS->subClassOf, $RDFS->Literal), statement($RDFS->Datatype, $RDFS->subClassOf, $RDFS->Class), # rdfs valid triples; these would be inferred by the RDFS expansion, but it may make things # a bit faster to add these upfront statement($RDFS->Resource, $RDF->type, $RDFS->Class), statement($RDFS->Class, $RDF->type, $RDFS->Class), statement($RDFS->Literal, $RDF->type, $RDFS->Class), statement($RDF->XMLLiteral, $RDF->type, $RDFS->Class), statement($RDFS->Datatype, $RDF->type, $RDFS->Class), statement($RDF->Seq, $RDF->type, $RDFS->Class), statement($RDF->Bag, $RDF->type, $RDFS->Class), statement($RDF->Alt, $RDF->type, $RDFS->Class), statement($RDFS->Container, $RDF->type, $RDFS->Class), statement($RDF->List, $RDF->type, $RDFS->Class), statement($RDFS->ContainerMembershipProperty, $RDF->type, $RDFS->Class), statement($RDF->Property, $RDF->type, $RDFS->Class), statement($RDF->Statement, $RDF->type, $RDFS->Class), statement($RDFS->domain, $RDF->type, $RDF->Property), statement($RDFS->range, $RDF->type, $RDF->Property), statement($RDFS->subPropertyOf, $RDF->type, $RDF->Property), statement($RDFS->subClassOf, $RDF->type, $RDF->Property), statement($RDFS->member, $RDF->type, $RDF->Property), statement($RDFS->seeAlso, $RDF->type, $RDF->Property), statement($RDFS->isDefinedBy, $RDF->type, $RDF->Property), statement($RDFS->comment, $RDF->type, $RDF->Property), statement($RDFS->label, $RDF->type, $RDF->Property), ]; #: RDFS Axiomatic Triples all together our $RDFS_Axiomatic_Triples = [@$_Simple_RDF_axiomatic_triples, @$_RDFS_axiomatic_triples]; #: RDFS D-entailement triples, ie, possible subclassing of various datatypes our $RDFS_D_Axiomatic_Triples_subclasses = [ # See http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/#built-in-datatypes statement($XSD->decimal, $RDFS->subClassOf, $RDFS->Literal), statement($XSD->integer, $RDFS->subClassOf, $XSD->decimal), statement($XSD->long, $RDFS->subClassOf, $XSD->integer), statement($XSD->int, $RDFS->subClassOf, $XSD->long), statement($XSD->short, $RDFS->subClassOf, $XSD->int), statement($XSD->byte, $RDFS->subClassOf, $XSD->short), statement($XSD->nonNegativeInteger, $RDFS->subClassOf, $XSD->integer), statement($XSD->positiveInteger, $RDFS->subClassOf, $XSD->nonNegativeInteger), statement($XSD->unsignedLong, $RDFS->subClassOf, $XSD->nonNegativeInteger), statement($XSD->unsignedInt, $RDFS->subClassOf, $XSD->unsignedLong), statement($XSD->unsignedShort, $RDFS->subClassOf, $XSD->unsignedInt), statement($XSD->unsignedByte, $RDFS->subClassOf, $XSD->unsignedShort), statement($XSD->nonPositiveInteger, $RDFS->subClassOf, $XSD->integer), statement($XSD->negativeInteger, $RDFS->subClassOf, $XSD->nonPositiveInteger), statement($XSD->normalizedString, $RDFS->subClassOf, $XSD->string), statement($XSD->token, $RDFS->subClassOf, $XSD->normalizedString), statement($XSD->language, $RDFS->subClassOf, $XSD->token), statement($XSD->Name, $RDFS->subClassOf, $XSD->token), statement($XSD->NMTOKEN, $RDFS->subClassOf, $XSD->token), statement($XSD->NCName, $RDFS->subClassOf, $XSD->Name), statement($XSD->dateTimeStamp, $RDFS->subClassOf, $XSD->dateTime), ]; our $RDFS_D_Axiomatic_Triples_types = [ statement($XSD->integer, $RDF->type, $RDFS->Datatype), statement($XSD->decimal, $RDF->type, $RDFS->Datatype), statement($XSD->nonPositiveInteger, $RDF->type, $RDFS->Datatype), statement($XSD->nonPositiveInteger, $RDF->type, $RDFS->Datatype), statement($XSD->positiveInteger, $RDF->type, $RDFS->Datatype), statement($XSD->positiveInteger, $RDF->type, $RDFS->Datatype), statement($XSD->long, $RDF->type, $RDFS->Datatype), statement($XSD->int, $RDF->type, $RDFS->Datatype), statement($XSD->short, $RDF->type, $RDFS->Datatype), statement($XSD->byte, $RDF->type, $RDFS->Datatype), statement($XSD->unsignedLong, $RDF->type, $RDFS->Datatype), statement($XSD->unsignedInt, $RDF->type, $RDFS->Datatype), statement($XSD->unsignedShort, $RDF->type, $RDFS->Datatype), statement($XSD->unsignedByte, $RDF->type, $RDFS->Datatype), statement($XSD->float, $RDF->type, $RDFS->Datatype), statement($XSD->double, $RDF->type, $RDFS->Datatype), statement($XSD->string, $RDF->type, $RDFS->Datatype), statement($XSD->normalizedString, $RDF->type, $RDFS->Datatype), statement($XSD->token, $RDF->type, $RDFS->Datatype), statement($XSD->language, $RDF->type, $RDFS->Datatype), statement($XSD->Name, $RDF->type, $RDFS->Datatype), statement($XSD->NCName, $RDF->type, $RDFS->Datatype), statement($XSD->NMTOKEN, $RDF->type, $RDFS->Datatype), statement($XSD->boolean, $RDF->type, $RDFS->Datatype), statement($XSD->hexBinary, $RDF->type, $RDFS->Datatype), statement($XSD->base64Binary, $RDF->type, $RDFS->Datatype), statement($XSD->anyURI, $RDF->type, $RDFS->Datatype), statement($XSD->dateTimeStamp, $RDF->type, $RDFS->Datatype), statement($XSD->dateTime, $RDF->type, $RDFS->Datatype), statement($RDFS->Literal, $RDF->type, $RDFS->Datatype), statement($RDF->XMLLiteral, $RDF->type, $RDFS->Datatype), ]; our $RDFS_D_Axiomatic_Triples = [@$RDFS_D_Axiomatic_Triples_types, @$RDFS_D_Axiomatic_Triples_subclasses]; #: OWL $RDFS->Class axiomatic triples: definition of special classes our $_OWL_axiomatic_triples_Classes = [ statement($OWL->AllDifferent, $RDF->type, $RDFS->Class), statement($OWL->AllDifferent, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->AllDisjointClasses, $RDF->type, $RDFS->Class), statement($OWL->AllDisjointClasses, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->AllDisjointProperties, $RDF->type, $RDFS->Class), statement($OWL->AllDisjointProperties, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->Annotation, $RDF->type, $RDFS->Class), statement($OWL->Annotation, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->AnnotationProperty, $RDF->type, $RDFS->Class), statement($OWL->AnnotationProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->AsymmetricProperty, $RDF->type, $RDFS->Class), statement($OWL->AsymmetricProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->Class, $RDF->type, $RDFS->Class), statement($OWL->Class, $OWL->equivalentClass, $RDFS->Class), # statement($OWL->DataRange, $RDF->type, $RDFS->Class), # statement($OWL->DataRange, $OWL->equivalentClass, $RDFS->Datatype), statement($RDFS->Datatype, $RDF->type, $RDFS->Class), statement($OWL->DatatypeProperty, $RDF->type, $RDFS->Class), statement($OWL->DatatypeProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->DeprecatedClass, $RDF->type, $RDFS->Class), statement($OWL->DeprecatedClass, $RDFS->subClassOf, $RDFS->Class), statement($OWL->DeprecatedProperty, $RDF->type, $RDFS->Class), statement($OWL->DeprecatedProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->FunctionalProperty, $RDF->type, $RDFS->Class), statement($OWL->FunctionalProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->InverseFunctionalProperty, $RDF->type, $RDFS->Class), statement($OWL->InverseFunctionalProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->IrreflexiveProperty, $RDF->type, $RDFS->Class), statement($OWL->IrreflexiveProperty, $RDFS->subClassOf, $RDF->Property), statement($RDFS->Literal, $RDF->type, $RDFS->Datatype), # statement($OWL->NamedIndividual, $RDF->type, $RDFS->Class), # statement($OWL->NamedIndividual, $OWL->equivalentClass, $RDFS->Resource), statement($OWL->NegativePropertyAssertion, $RDF->type, $RDFS->Class), statement($OWL->NegativePropertyAssertion, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->Nothing, $RDF->type, $RDFS->Class), statement($OWL->Nothing, $RDFS->subClassOf, $OWL->Thing ), statement($OWL->ObjectProperty, $RDF->type, $RDFS->Class), statement($OWL->ObjectProperty, $OWL->equivalentClass, $RDF->Property), statement($OWL->Ontology, $RDF->type, $RDFS->Class), statement($OWL->Ontology, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->OntologyProperty, $RDF->type, $RDFS->Class), statement($OWL->OntologyProperty, $RDFS->subClassOf, $RDF->Property), statement($RDF->Property, $RDF->type, $RDFS->Class), statement($OWL->ReflexiveProperty, $RDF->type, $RDFS->Class), statement($OWL->ReflexiveProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->Restriction, $RDF->type, $RDFS->Class), statement($OWL->Restriction, $RDFS->subClassOf, $RDFS->Class), statement($OWL->SymmetricProperty, $RDF->type, $RDFS->Class), statement($OWL->SymmetricProperty, $RDFS->subClassOf, $RDF->Property), statement($OWL->Thing, $RDF->type, $RDFS->Class), statement($OWL->Thing, $RDFS->subClassOf, $RDFS->Resource), statement($OWL->TransitiveProperty, $RDF->type, $RDFS->Class), statement($OWL->TransitiveProperty, $RDFS->subClassOf, $RDF->Property), # OWL valid triples; some of these would be inferred by the OWL RL expansion, but it may make things # a bit faster to add these upfront statement($OWL->AllDisjointProperties, $RDF->type, $OWL->Class), statement($OWL->AllDisjointClasses, $RDF->type, $OWL->Class), statement($OWL->AllDisjointProperties, $RDF->type, $OWL->Class), statement($OWL->Annotation, $RDF->type, $OWL->Class), statement($OWL->AsymmetricProperty, $RDF->type, $OWL->Class), statement($OWL->Axiom, $RDF->type, $OWL->Class), statement($OWL->DataRange, $RDF->type, $OWL->Class), statement($RDFS->Datatype, $RDF->type, $OWL->Class), statement($OWL->DatatypeProperty, $RDF->type, $OWL->Class), statement($OWL->DeprecatedClass, $RDF->type, $OWL->Class), statement($OWL->DeprecatedClass, $RDFS->subClassOf, $OWL->Class), statement($OWL->DeprecatedProperty, $RDF->type, $OWL->Class), statement($OWL->FunctionalProperty, $RDF->type, $OWL->Class), statement($OWL->InverseFunctionalProperty, $RDF->type, $OWL->Class), statement($OWL->IrreflexiveProperty, $RDF->type, $OWL->Class), statement($OWL->NamedIndividual, $RDF->type, $OWL->Class), statement($OWL->NegativePropertyAssertion, $RDF->type, $OWL->Class), statement($OWL->Nothing, $RDF->type, $OWL->Class), statement($OWL->ObjectProperty, $RDF->type, $OWL->Class), statement($OWL->Ontology, $RDF->type, $OWL->Class), statement($OWL->OntologyProperty, $RDF->type, $OWL->Class), statement($RDF->Property, $RDF->type, $OWL->Class), statement($OWL->ReflexiveProperty, $RDF->type, $OWL->Class), statement($OWL->Restriction, $RDF->type, $OWL->Class), statement($OWL->Restriction, $RDFS->subClassOf, $OWL->Class), # statement(SelfRestriction, $RDF->type, $OWL->Class), statement($OWL->SymmetricProperty, $RDF->type, $OWL->Class), statement($OWL->Thing, $RDF->type, $OWL->Class), statement($OWL->TransitiveProperty, $RDF->type, $OWL->Class), ]; #: OWL $RDF->Property axiomatic triples: definition of domains and ranges our $_OWL_axiomatic_triples_Properties = [ statement($OWL->allValuesFrom, $RDF->type, $RDF->Property), statement($OWL->allValuesFrom, $RDFS->domain, $OWL->Restriction), statement($OWL->allValuesFrom, $RDFS->range, $RDFS->Class), statement($OWL->assertionProperty, $RDF->type, $RDF->Property), statement($OWL->assertionProperty, $RDFS->domain, $OWL->NegativePropertyAssertion), statement($OWL->assertionProperty, $RDFS->range, $RDF->Property), statement($OWL->backwardCompatibleWith, $RDF->type, $OWL->OntologyProperty), statement($OWL->backwardCompatibleWith, $RDF->type, $OWL->AnnotationProperty), statement($OWL->backwardCompatibleWith, $RDFS->domain, $OWL->Ontology), statement($OWL->backwardCompatibleWith, $RDFS->range, $OWL->Ontology), # statement($OWL->bottomDataProperty, $RDF->type, DatatypeProperty), # # statement($OWL->bottomObjectProperty, $RDF->type, ObjectProperty), # statement($OWL->cardinality, $RDF->type, $RDF->Property), # statement($OWL->cardinality, $RDFS->domain, $OWL->Restriction), # statement($OWL->cardinality, $RDFS->range, $XSD->nonNegativeInteger), statement($RDFS->comment, $RDF->type, $OWL->AnnotationProperty), statement($RDFS->comment, $RDFS->domain, $RDFS->Resource), statement($RDFS->comment, $RDFS->range, $RDFS->Literal), statement($OWL->complementOf, $RDF->type, $RDF->Property), statement($OWL->complementOf, $RDFS->domain, $RDFS->Class), statement($OWL->complementOf, $RDFS->range, $RDFS->Class), # # statement($OWL->datatypeComplementOf, $RDF->type, $RDF->Property), # statement($OWL->datatypeComplementOf, $RDFS->domain, $RDFS->Datatype), # statement($OWL->datatypeComplementOf, $RDFS->range, $RDFS->Datatype), statement($OWL->deprecated, $RDF->type, $OWL->AnnotationProperty), statement($OWL->deprecated, $RDFS->domain, $RDFS->Resource), statement($OWL->deprecated, $RDFS->range, $RDFS->Resource), statement($OWL->differentFrom, $RDF->type, $RDF->Property), statement($OWL->differentFrom, $RDFS->domain, $RDFS->Resource), statement($OWL->differentFrom, $RDFS->range, $RDFS->Resource), # statement($OWL->disjointUnionOf, $RDF->type, $RDF->Property), # statement($OWL->disjointUnionOf, $RDFS->domain, $RDFS->Class), # statement($OWL->disjointUnionOf, $RDFS->range, $RDF->List), statement($OWL->disjointWith, $RDF->type, $RDF->Property), statement($OWL->disjointWith, $RDFS->domain, $RDFS->Class), statement($OWL->disjointWith, $RDFS->range, $RDFS->Class), statement($OWL->distinctMembers, $RDF->type, $RDF->Property), statement($OWL->distinctMembers, $RDFS->domain, $OWL->AllDifferent), statement($OWL->distinctMembers, $RDFS->range, $RDF->List), statement($OWL->equivalentClass, $RDF->type, $RDF->Property), statement($OWL->equivalentClass, $RDFS->domain, $RDFS->Class), statement($OWL->equivalentClass, $RDFS->range, $RDFS->Class), statement($OWL->equivalentProperty, $RDF->type, $RDF->Property), statement($OWL->equivalentProperty, $RDFS->domain, $RDF->Property), statement($OWL->equivalentProperty, $RDFS->range, $RDF->Property), statement($OWL->hasKey, $RDF->type, $RDF->Property), statement($OWL->hasKey, $RDFS->domain, $RDFS->Class), statement($OWL->hasKey, $RDFS->range, $RDF->List), statement($OWL->hasValue, $RDF->type, $RDF->Property), statement($OWL->hasValue, $RDFS->domain, $OWL->Restriction), statement($OWL->hasValue, $RDFS->range, $RDFS->Resource), statement($OWL->imports, $RDF->type, $OWL->OntologyProperty), statement($OWL->imports, $RDFS->domain, $OWL->Ontology), statement($OWL->imports, $RDFS->range, $OWL->Ontology), statement($OWL->incompatibleWith, $RDF->type, $OWL->OntologyProperty), statement($OWL->incompatibleWith, $RDF->type, $OWL->AnnotationProperty), statement($OWL->incompatibleWith, $RDFS->domain, $OWL->Ontology), statement($OWL->incompatibleWith, $RDFS->range, $OWL->Ontology), statement($OWL->intersectionOf, $RDF->type, $RDF->Property), statement($OWL->intersectionOf, $RDFS->domain, $RDFS->Class), statement($OWL->intersectionOf, $RDFS->range, $RDF->List), statement($OWL->inverseOf, $RDF->type, $RDF->Property), statement($OWL->inverseOf, $RDFS->domain, $RDF->Property), statement($OWL->inverseOf, $RDFS->range, $RDF->Property), statement($RDFS->isDefinedBy, $RDF->type, $OWL->AnnotationProperty), statement($RDFS->isDefinedBy, $RDFS->domain, $RDFS->Resource), statement($RDFS->isDefinedBy, $RDFS->range, $RDFS->Resource), statement($RDFS->label, $RDF->type, $OWL->AnnotationProperty), statement($RDFS->label, $RDFS->domain, $RDFS->Resource), statement($RDFS->label, $RDFS->range, $RDFS->Literal), statement($OWL->maxCardinality, $RDF->type, $RDF->Property), statement($OWL->maxCardinality, $RDFS->domain, $OWL->Restriction), statement($OWL->maxCardinality, $RDFS->range, $XSD->nonNegativeInteger), statement($OWL->maxQualifiedCardinality, $RDF->type, $RDF->Property), statement($OWL->maxQualifiedCardinality, $RDFS->domain, $OWL->Restriction), statement($OWL->maxQualifiedCardinality, $RDFS->range, $XSD->nonNegativeInteger), statement($OWL->members, $RDF->type, $RDF->Property), statement($OWL->members, $RDFS->domain, $RDFS->Resource), statement($OWL->members, $RDFS->range, $RDF->List), # statement($OWL->minCardinality, $RDF->type, $RDF->Property), # statement($OWL->minCardinality, $RDFS->domain, $OWL->Restriction), # statement($OWL->minCardinality, $RDFS->range, $XSD->nonNegativeInteger), # statement($OWL->minQualifiedCardinality, $RDF->type, $RDF->Property), # statement($OWL->minQualifiedCardinality, $RDFS->domain, $OWL->Restriction), # statement($OWL->minQualifiedCardinality, $RDFS->range, $XSD->nonNegativeInteger), # statement($OWL->annotatedTarget, $RDF->type, $RDF->Property), # statement($OWL->annotatedTarget, $RDFS->domain, $RDFS->Resource), # statement($OWL->annotatedTarget, $RDFS->range, $RDFS->Resource), statement($OWL->onClass, $RDF->type, $RDF->Property), statement($OWL->onClass, $RDFS->domain, $OWL->Restriction), statement($OWL->onClass, $RDFS->range, $RDFS->Class), # statement($OWL->onDataRange, $RDF->type, $RDF->Property), # statement($OWL->onDataRange, $RDFS->domain, $OWL->Restriction), # statement($OWL->onDataRange, $RDFS->range, $RDFS->Datatype), statement($OWL->onDatatype, $RDF->type, $RDF->Property), statement($OWL->onDatatype, $RDFS->domain, $RDFS->Datatype), statement($OWL->onDatatype, $RDFS->range, $RDFS->Datatype), statement($OWL->oneOf, $RDF->type, $RDF->Property), statement($OWL->oneOf, $RDFS->domain, $RDFS->Class), statement($OWL->oneOf, $RDFS->range, $RDF->List), statement($OWL->onProperty, $RDF->type, $RDF->Property), statement($OWL->onProperty, $RDFS->domain, $OWL->Restriction), statement($OWL->onProperty, $RDFS->range, $RDF->Property), # statement($OWL->onProperties, $RDF->type, $RDF->Property), # statement($OWL->onProperties, $RDFS->domain, $OWL->Restriction), # statement($OWL->onProperties, $RDFS->range, $RDF->List), # statement($OWL->annotatedProperty, $RDF->type, $RDF->Property), # statement($OWL->annotatedProperty, $RDFS->domain, $RDFS->Resource), # statement($OWL->annotatedProperty, $RDFS->range, $RDF->Property), statement($OWL->priorVersion, $RDF->type, $OWL->OntologyProperty), statement($OWL->priorVersion, $RDF->type, $OWL->AnnotationProperty), statement($OWL->priorVersion, $RDFS->domain, $OWL->Ontology), statement($OWL->priorVersion, $RDFS->range, $OWL->Ontology), statement($OWL->propertyChainAxiom, $RDF->type, $RDF->Property), statement($OWL->propertyChainAxiom, $RDFS->domain, $RDF->Property), statement($OWL->propertyChainAxiom, $RDFS->range, $RDF->List), # statement($OWL->propertyDisjointWith, $RDF->type, $RDF->Property), # statement($OWL->propertyDisjointWith, $RDFS->domain, $RDF->Property), # statement($OWL->propertyDisjointWith, $RDFS->range, $RDF->Property), # # statement($OWL->qualifiedCardinality, $RDF->type, $RDF->Property), # statement($OWL->qualifiedCardinality, $RDFS->domain, $OWL->Restriction), # statement($OWL->qualifiedCardinality, $RDFS->range, $XSD->nonNegativeInteger), statement($OWL->sameAs, $RDF->type, $RDF->Property), statement($OWL->sameAs, $RDFS->domain, $RDFS->Resource), statement($OWL->sameAs, $RDFS->range, $RDFS->Resource), statement($RDFS->seeAlso, $RDF->type, $OWL->AnnotationProperty), statement($RDFS->seeAlso, $RDFS->domain, $RDFS->Resource), statement($RDFS->seeAlso, $RDFS->range, $RDFS->Resource), statement($OWL->someValuesFrom, $RDF->type, $RDF->Property), statement($OWL->someValuesFrom, $RDFS->domain, $OWL->Restriction), statement($OWL->someValuesFrom, $RDFS->range, $RDFS->Class), statement($OWL->sourceIndividual, $RDF->type, $RDF->Property), statement($OWL->sourceIndividual, $RDFS->domain, $OWL->NegativePropertyAssertion), statement($OWL->sourceIndividual, $RDFS->range, $RDFS->Resource), # # statement($OWL->annotatedSource, $RDF->type, $RDF->Property), # statement($OWL->annotatedSource, $RDFS->domain, $RDFS->Resource), # statement($OWL->annotatedSource, $RDFS->range, $RDFS->Resource), # statement($OWL->targetIndividual, $RDF->type, $RDF->Property), statement($OWL->targetIndividual, $RDFS->domain, $OWL->NegativePropertyAssertion), statement($OWL->targetIndividual, $RDFS->range, $RDFS->Resource), statement($OWL->targetValue, $RDF->type, $RDF->Property), statement($OWL->targetValue, $RDFS->domain, $OWL->NegativePropertyAssertion), statement($OWL->targetValue, $RDFS->range, $RDFS->Literal), # statement($OWL->topDataProperty, $RDF->type, DatatypeProperty), # statement($OWL->topDataProperty, $RDFS->domain, $RDFS->Resource), # statement($OWL->topDataProperty, $RDFS->range, $RDFS->Literal), # # statement($OWL->topObjectProperty, $RDF->type, ObjectProperty), # statement($OWL->topObjectProperty, $RDFS->domain, $RDFS->Resource), # statement($OWL->topObjectProperty, $RDFS->range, $RDFS->Resource), statement($OWL->unionOf, $RDF->type, $RDF->Property), statement($OWL->unionOf, $RDFS->domain, $RDFS->Class), statement($OWL->unionOf, $RDFS->range, $RDF->List), statement($OWL->versionInfo, $RDF->type, $OWL->AnnotationProperty), statement($OWL->versionInfo, $RDFS->domain, $RDFS->Resource), statement($OWL->versionInfo, $RDFS->range, $RDFS->Resource), statement($OWL->versionIRI, $RDF->type, $OWL->AnnotationProperty), statement($OWL->versionIRI, $RDFS->domain, $RDFS->Resource), statement($OWL->versionIRI, $RDFS->range, $RDFS->Resource), statement($OWL->withRestrictions, $RDF->type, $RDF->Property), statement($OWL->withRestrictions, $RDFS->domain, $RDFS->Datatype), statement($OWL->withRestrictions, $RDFS->range, $RDF->List), # some OWL valid triples; these would be inferred by the OWL RL expansion, but it may make things # a bit faster to add these upfront statement($OWL->allValuesFrom, $RDFS->range, $OWL->Class), statement($OWL->complementOf, $RDFS->domain, $OWL->Class), statement($OWL->complementOf, $RDFS->range, $OWL->Class), # statement($OWL->datatypeComplementOf, $RDFS->domain, $OWL->DataRange), # statement($OWL->datatypeComplementOf, $RDFS->range, $OWL->DataRange), statement($OWL->disjointUnionOf, $RDFS->domain, $OWL->Class), statement($OWL->disjointWith, $RDFS->domain, $OWL->Class), statement($OWL->disjointWith, $RDFS->range, $OWL->Class), statement($OWL->equivalentClass, $RDFS->domain, $OWL->Class), statement($OWL->equivalentClass, $RDFS->range, $OWL->Class), statement($OWL->hasKey, $RDFS->domain, $OWL->Class), statement($OWL->intersectionOf, $RDFS->domain, $OWL->Class), statement($OWL->onClass, $RDFS->range, $OWL->Class), # statement($OWL->onDataRange, $RDFS->range, $OWL->DataRange), statement($OWL->onDatatype, $RDFS->domain, $OWL->DataRange), statement($OWL->onDatatype, $RDFS->range, $OWL->DataRange), statement($OWL->oneOf, $RDFS->domain, $OWL->Class), statement($OWL->someValuesFrom, $RDFS->range, $OWL->Class), statement($OWL->unionOf, $RDFS->range, $OWL->Class), # statement($OWL->withRestrictions, $RDFS->domain, $OWL->DataRange) ]; #: OWL RL axiomatic triples: combination of the RDFS triples plus the OWL specific ones our $OWLRL_Axiomatic_Triples = [@$_OWL_axiomatic_triples_Classes, @$_OWL_axiomatic_triples_Properties]; # Note that this is not used anywhere. But I encoded it once and I did not want to remove it...:-) our $_OWL_axiomatic_triples_Facets = [ # langPattern statement($XSD->length,$RDF->type,$RDF->Property), statement($XSD->maxExclusive,$RDF->type,$RDF->Property), statement($XSD->maxInclusive,$RDF->type,$RDF->Property), statement($XSD->maxLength,$RDF->type,$RDF->Property), statement($XSD->minExclusive,$RDF->type,$RDF->Property), statement($XSD->minInclusive,$RDF->type,$RDF->Property), statement($XSD->minLength,$RDF->type,$RDF->Property), statement($XSD->pattern,$RDF->type,$RDF->Property), statement($XSD->length,$RDFS->domain,$RDFS->Resource), statement($XSD->maxExclusive,$RDFS->domain,$RDFS->Resource), statement($XSD->maxInclusive,$RDFS->domain,$RDFS->Resource), statement($XSD->maxLength,$RDFS->domain,$RDFS->Resource), statement($XSD->minExclusive,$RDFS->domain,$RDFS->Resource), statement($XSD->minInclusive,$RDFS->domain,$RDFS->Resource), statement($XSD->minLength,$RDFS->domain,$RDFS->Resource), statement($XSD->pattern,$RDFS->domain,$RDFS->Resource), statement($XSD->length,$RDFS->domain,$RDFS->Resource), statement($XSD->maxExclusive,$RDFS->range,$RDFS->Literal), statement($XSD->maxInclusive,$RDFS->range,$RDFS->Literal), statement($XSD->maxLength,$RDFS->range,$RDFS->Literal), statement($XSD->minExclusive,$RDFS->range,$RDFS->Literal), statement($XSD->minInclusive,$RDFS->range,$RDFS->Literal), statement($XSD->minLength,$RDFS->range,$RDFS->Literal), statement($XSD->pattern,$RDFS->range,$RDFS->Literal), ]; #: OWL D-entailement triples statement(additionally to the RDFS ones), ie, possible subclassing of various extra datatypes our $_OWL_D_Axiomatic_Triples_types = [ statement($RDF->PlainLiteral, $RDF->type, $RDFS->Datatype) ]; our $OWL_D_Axiomatic_Triples_subclasses = [ statement($XSD->string, $RDFS->subClassOf, $RDF->PlainLiteral), statement($XSD->normalizedString, $RDFS->subClassOf, $RDF->PlainLiteral), statement($XSD->token, $RDFS->subClassOf, $RDF->PlainLiteral), statement($XSD->Name, $RDFS->subClassOf, $RDF->PlainLiteral), statement($XSD->NCName, $RDFS->subClassOf, $RDF->PlainLiteral), statement($XSD->NMTOKEN, $RDFS->subClassOf, $RDF->PlainLiteral) ]; our $OWLRL_Datatypes_Disjointness = [ statement($XSD->anyURI, $OWL->disjointWith, $XSD->base64Binary), statement($XSD->anyURI, $OWL->disjointWith, $XSD->boolean), statement($XSD->anyURI, $OWL->disjointWith, $XSD->dateTime), statement($XSD->anyURI, $OWL->disjointWith, $XSD->decimal), statement($XSD->anyURI, $OWL->disjointWith, $XSD->double), statement($XSD->anyURI, $OWL->disjointWith, $XSD->float), statement($XSD->anyURI, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->anyURI, $OWL->disjointWith, $XSD->string), statement($XSD->anyURI, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->anyURI, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->boolean), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->dateTime), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->decimal), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->double), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->float), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->base64Binary, $OWL->disjointWith, $XSD->string), statement($XSD->base64Binary, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->base64Binary, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->boolean, $OWL->disjointWith, $XSD->dateTime), statement($XSD->boolean, $OWL->disjointWith, $XSD->decimal), statement($XSD->boolean, $OWL->disjointWith, $XSD->double), statement($XSD->boolean, $OWL->disjointWith, $XSD->float), statement($XSD->boolean, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->boolean, $OWL->disjointWith, $XSD->string), statement($XSD->boolean, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->boolean, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->dateTime, $OWL->disjointWith, $XSD->decimal), statement($XSD->dateTime, $OWL->disjointWith, $XSD->double), statement($XSD->dateTime, $OWL->disjointWith, $XSD->float), statement($XSD->dateTime, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->dateTime, $OWL->disjointWith, $XSD->string), statement($XSD->dateTime, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->dateTime, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->decimal, $OWL->disjointWith, $XSD->double), statement($XSD->decimal, $OWL->disjointWith, $XSD->float), statement($XSD->decimal, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->decimal, $OWL->disjointWith, $XSD->string), statement($XSD->decimal, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->decimal, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->double, $OWL->disjointWith, $XSD->float), statement($XSD->double, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->double, $OWL->disjointWith, $XSD->string), statement($XSD->double, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->double, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->float, $OWL->disjointWith, $XSD->hexBinary), statement($XSD->float, $OWL->disjointWith, $XSD->string), statement($XSD->float, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->float, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->hexBinary, $OWL->disjointWith, $XSD->string), statement($XSD->hexBinary, $OWL->disjointWith, $RDF->PlainLiteral), statement($XSD->hexBinary, $OWL->disjointWith, $RDF->XMLLiteral), statement($XSD->string, $OWL->disjointWith, $RDF->XMLLiteral), ]; #: OWL RL D Axiomatic triples: combination of the RDFS ones, plus some extra statements on ranges and domains, plus some OWL specific datatypes our $OWLRL_D_Axiomatic_Triples = [@$RDFS_D_Axiomatic_Triples, @$_OWL_D_Axiomatic_Triples_types, @$OWL_D_Axiomatic_Triples_subclasses, @$OWLRL_Datatypes_Disjointness]; 1; =head1 NAME RDF::Closure::AxiomaticTriples - exports lists of axiomatic triples =head1 ANALOGOUS PYTHON RDFClosure/AxiomaticTriples.py =head1 SEE ALSO L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Engine/0000755000076400007640000000000011773065330015672 5ustar taitaiRDF-Closure-0.001/lib/RDF/Closure/Engine/RDFS.pm0000644000076400007640000001740311773064025016773 0ustar taitaipackage RDF::Closure::Engine::RDFS; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine qw[statement iri]; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use RDF::Closure::AxiomaticTriples qw[$RDFS_Axiomatic_Triples $RDFS_D_Axiomatic_Triples]; use RDF::Closure::DatatypeHandling qw[literals_identical]; use RDF::Closure::Rule::Programmatic; use RDF::Closure::Rule::StatementMatcher; use constant { TRUE => 1, FALSE => 0, }; use namespace::clean; use base qw[RDF::Closure::Engine::Core]; our $VERSION = '0.001'; our @OneTimeRules = ( # Identical literal values RDF::Closure::Rule::Programmatic->new( sub { my ($cl, $rule) = @_; my %literals; $cl->graph->get_statements->each(sub { my @nodes = $_[0]->nodes; foreach my $n (@nodes[0..2]) { next unless $n->is_literal; $literals{ $n->sse } = $n; } }); foreach my $lit1 (keys %literals) { foreach my $lit2 (keys %literals) { if ($lit1 ne $lit2) { my $l1 = $literals{$lit1}; my $l2 = $literals{$lit2}; if ($cl->dt_handling->literals_identical($l1, $l2)) { $cl->graph->get_statements(undef, undef, $l1)->each(sub { $cl->store_triple($_[0]->subject, $_[0]->predicate, $l2); }); $cl->graph->get_statements(undef, $l1, undef)->each(sub { $cl->store_triple($_[0]->subject, $l2, $_[0]->object); }); $cl->graph->get_statements($l1, undef, undef)->each(sub { $cl->store_triple($l2, $_[0]->predicate, $_[0]->object); }); } } } } }, 'x-rdfs-literal-identity' ), # rdfs4 RDF::Closure::Rule::StatementMatcher->new( [], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDF->type, $RDFS->Resource); # rdfs4a $cl->store_triple($o, $RDF->type, $RDFS->Resource); # rdfs4b }, 'rdfs4' ), ); our @Rules = ( # rdfs1 RDF::Closure::Rule::StatementMatcher->new( [], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($p, $RDF->type, $RDF->Property); }, 'rdfs1' ), # rdfs2 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->domain, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements(undef, $s, undef); while (my $st = $iter->next) { $cl->store_triple($st->subject, $RDF->type, $o); } }, 'rdfs2' ), # rdfs3 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->range, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements(undef, $s, undef); while (my $st = $iter->next) { $cl->store_triple($st->object, $RDF->type, $o); } }, 'rdfs3' ), # rdfs5 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subPropertyOf, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements($o, $RDFS->subPropertyOf, undef); while (my $st = $iter->next) { $cl->store_triple($s, $RDFS->subPropertyOf, $st->object); } }, 'rdfs5' ), # rdfs6 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->type, $RDF->Property], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDFS->subPropertyOf, $s); }, 'rdfs6' ), # rdfs7 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subPropertyOf, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements(undef, $s, undef); while (my $st = $iter->next) { $cl->store_triple($st->subject, $o, $st->object); } }, 'rdfs7' ), # rdfs8 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $RDFS->Class], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDFS->subClassOf, $RDFS->Resource); }, 'rdfs8' ), # rdfs9 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subClassOf, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements(undef, $RDF->type, $s); while (my $st = $iter->next) { $cl->store_triple($st->subject, $RDF->type, $o); } }, 'rdfs9' ), # rdfs10 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $RDFS->Class], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDFS->subClassOf, $s); }, 'rdfs10' ), # rdfs11 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subClassOf, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $iter = $cl->graph->get_statements($o, $RDFS->subClassOf, undef); while (my $st = $iter->next) { $cl->store_triple($s, $RDFS->subClassOf, $st->object); } }, 'rdfs11' ), # rdfs12 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $RDFS->ContainerMembershipProperty], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDFS->subPropertyOf, $RDFS->member); }, 'rdfs12' ), # ???? RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $RDFS->Datatype], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($s, $RDFS->subClassOf, $RDFS->Literal); }, 'x-rdfs-literal-dt' ), ); sub add_axioms { my ($self) = @_; $self->store_triple(statement($_->nodes, $self->{axiom_context})) foreach @$RDFS_Axiomatic_Triples; for my $i (1 .. $self->{IMaxNum}+1) { my $ci = $RDF->uri(sprintf('_%d', $i)); $self->store_triple(statement($ci, $RDF->type, $RDF->Property, $self->{axiom_context})); $self->store_triple(statement($ci, $RDF->type, $RDFS->ContainerMembershipProperty, $self->{axiom_context})); $self->store_triple(statement($ci, $RDFS->domain, $RDFS->Resource, $self->{axiom_context})); $self->store_triple(statement($ci, $RDF->range, $RDFS->Resource, $self->{axiom_context})); } } sub add_daxioms { my ($self) = @_; $self->store_triple(statement($_->nodes, $self->{daxiom_context})) foreach @$RDFS_D_Axiomatic_Triples; $self->graph->get_statements->each(sub{ my $st = shift; foreach my $node ($st->nodes) { if ($node->is_literal and $node->has_datatype) { $self->store_triple(statement( $node, $RDF->type, iri($node->literal_datatype), $self->{daxiom_context} )); } } }); } sub entailment_regime { return 'http://www.w3.org/ns/entailment/RDFS'; } 1; =head1 NAME RDF::Closure::Engine::RDFS - RDF Schema inference =head1 ANALOGOUS PYTHON RDFClosure/RDFSClosure.py =head1 DESCRIPTION Performs RDFS inference, but not RDFS D-entailment (datatype stuff). =head1 SEE ALSO L. L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Engine/Core.pm0000644000076400007640000001700411773064025017122 0ustar taitaipackage RDF::Closure::Engine::Core; use 5.008; use strict; use utf8; use Data::UUID; use Error qw[:try]; use RDF::Trine; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use Scalar::Util qw[blessed]; use constant { TRUE => 1, FALSE => 0, }; our $VERSION = '0.001'; our $debugGlobal = FALSE; use namespace::clean; use base qw[RDF::Closure::Engine]; our (@Rules, @OneTimeRules); # TOBYINK: addition sub new { my ($class, @args) = @_; my $self = bless {}, $class; return $self->__init__(@args); } sub __init__ { my ($self, $graph, $axioms, $daxioms, $rdfs) = @_; $axioms = TRUE unless defined $axioms; $daxioms = TRUE unless defined $daxioms; $rdfs = FALSE unless defined $rdfs; $graph ||= RDF::Trine::Model->temporary_model; $self->{_debug} = $debugGlobal; # Calculate the maximum 'n' value for the '_i' type predicates (see Horst's paper) { my $n = 0; my $maxnum = 0; my $cont = TRUE; while ($cont) { $cont = FALSE; my $predicate = $RDF->uri(sprintf('_%d', $n)); if ($graph->count_statements(undef, $predicate, undef)) { $maxnum = $n++; $cont = TRUE; } } $self->{IMaxNum} = $maxnum; } $self->{graph} = $graph; $self->{axioms} = $axioms; $self->{daxioms} = $daxioms; $self->{rdfs} = $rdfs; $self->{error_messages} = []; $self->{options} = {}; $self->{dt_handling} = RDF::Closure::DatatypeHandling->new; $self->empty_stored_triples; # TOBYINK: addition { my $uuid = Data::UUID->new; my $throwaway = sub { RDF::Trine::Node::Resource->new(sprintf('urn:uuid:%s', $uuid->create_str)); }; $self->{inferred_context} = $throwaway->(); $self->{imported_context} = $throwaway->(); $self->{axiom_context} = $throwaway->(); $self->{daxiom_context} = $throwaway->(); $self->{uri_generator} = $throwaway; } return $self; } # TOBYINK: addition sub graph { my ($self) = @_; return $self->{graph}; } sub dt_handling { return $_[0]->{dt_handling}; } sub add_error { my ($self, $message, @params) = @_; @params = map { (blessed($_) and $_->isa('RDF::Trine::Node')) ? $_->as_ntriples : $_; } @params; $message = sprintf($message, @params) if @params; unless (grep { $message eq $_ } @{ $self->{error_messages} }) { push @{ $self->{error_messages} }, $message; printf("** %s\n", $message) if $self->{_debug}; } return $self; } sub error_messages { my ($self) = @_; return @{ $self->{error_messages} }; } sub pre_process { my ($self) = @_; return $self; } sub post_process { my ($self) = @_; return $self; } sub rules { my ($self, $t, $cycle_num) = @_; return; } sub add_axioms { my ($self) = @_; return $self; } sub add_daxioms { my ($self) = @_; return $self; } sub one_time_rules { my ($self) = @_; return; } sub get_literal_value { my ($self, $node) = @_; return $node->literal_value if $node->is_literal; return '????'; } sub empty_stored_triples { my ($self) = @_; $self->{added_triples} = {}; return $self; } sub count_stored_triples { my ($self, $lim) = @_; $lim = -1 unless $lim; my $count = 0; foreach my $v (values %{$self->{added_triples}}) { next unless ref $v; $count++; if ($lim > 0 and $count >= $lim) { return $count; } } if ($lim <= 0) { return $count; } return; } sub flush_stored_triples { my ($self) = @_; eval { $self->graph->_store->clear_restrictions; }; $self->graph->begin_bulk_ops; $self->graph->add_statement($_, $_->type eq 'QUAD' ? undef : $self->{inferred_context}) foreach grep { ref $_ } values %{ $self->{added_triples} }; $self->graph->end_bulk_ops; $self->empty_stored_triples; } sub store_triple { my $self = shift; if (substr(ref $_[0], 0, 21) eq 'RDF::Trine::Statement') # horrible, but let's see if it shaves off some time { foreach (@_) { # my own approximation of SSE. benchmarks 7 times faster. my $sse = join ' || ', map { join q( ), map { defined($_) ? $_ : q() } @$_ } @$_; if (defined $self->{added_triples}{$sse}) { # printf("SKIP (a): %s\n", $sse) if $self->{_debug}; next; } if ($self->graph->count_statements($_->subject, $_->predicate, $_->object)) { # printf("SKIP (g): %s\n", $sse) if $self->{_debug}; $self->{added_triples}{$sse} = 1; next; } printf("%s\n", $sse) if $self->{_debug}; $self->{added_triples}{$sse} = $_; } return; } else { my $st = RDF::Trine::Statement->new(@_); return $self->store_triple($st); } } { my (@ST, @OTHER); sub closure { my ($self, $is_subsequent) = @_; unless ($is_subsequent) { $self->pre_process; $self->add_axioms if $self->{axioms}; $self->add_daxioms if $self->{daxioms}; $self->flush_stored_triples; } { $_->apply_to_closure($self) foreach $self->one_time_rules; $self->flush_stored_triples; } my $new_cycle = TRUE; my $cycle_num = 0; # figure out which rules can be applied to individual statements unless ($self->{options}->{technique} eq 'RULE' or @ST or @OTHER) { foreach my $r ($self->rules) { if ($r->can('apply_to_closure_given_statement')) { push @ST, $r; } else { push @OTHER, $r; } } } while ($new_cycle) { $cycle_num++; printf("----- Cycle #%d\n", $cycle_num) if $self->{_debug}; # Alternative techniques for applying rules. if ($self->{options}->{technique} eq 'RULE') { $_->apply_to_closure($self) foreach $self->rules; } else { $self->graph->as_stream->each(sub { $_->apply_to_closure_given_statement($self, $_[0]) foreach @ST; }); $_->apply_to_closure($self) foreach @OTHER; } $new_cycle = $self->count_stored_triples(1); $self->flush_stored_triples; } $self->post_process; $self->flush_stored_triples; return $self; } } sub reset { my ($self) = @_; $self->graph->begin_bulk_ops; $self->graph->remove_statements(undef, undef, undef, $self->{$_}) foreach qw[inferred_context imported_context axiom_context daxiom_context]; $self->graph->end_bulk_ops; return $self; } sub one_time_rules { my ($proto) = @_; $proto = ref $proto if ref $proto; my @rv; eval sprintf('@rv = @%s::%s', $proto, 'OneTimeRules'); return @rv; } sub rules { my ($proto) = @_; $proto = ref $proto if ref $proto; my @rv; eval sprintf('@rv = @%s::%s', $proto, 'Rules'); return @rv; } 1; =head1 NAME RDF::Closure::Engine::Core - common code used by inference engines =head1 ANALOGOUS PYTHON RDFClosure/Closure.py =head1 DESCRIPTION This is a basic forward-chaining engine. Inference engines don't have to inherit from this, but it helps. =head1 SEE ALSO L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Engine/OWL2RL.pm0000644000076400007640000011060111773064025017210 0ustar taitaipackage RDF::Closure::Engine::OWL2RL; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine qw[statement iri]; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use RDF::Closure::AxiomaticTriples qw[ $OWLRL_Datatypes_Disjointness $OWLRL_Axiomatic_Triples $OWLRL_D_Axiomatic_Triples ]; use RDF::Closure::DatatypeHandling qw[ literals_identical literal_valid ]; use RDF::Closure::XsdDatatypes qw[ $OWL_RL_Datatypes $OWL_Datatype_Subsumptions ]; use RDF::Closure::Rule::Programmatic; use RDF::Closure::Rule::StatementMatcher; use Scalar::Util qw[blessed]; use constant { TRUE => 1, FALSE => 0, }; use namespace::clean; use base qw[RDF::Closure::Engine::Core]; our $VERSION = '0.001'; our @OneTimeRules = ( # dt-type2, dt-not-type, dt-diff, dt-eq RDF::Closure::Rule::Programmatic->new( sub { my ($cl, $rule) = @_; my $implicit = {}; my $explicit = {}; my $used_datatypes = {}; local *_add_to_explicit = sub { my ($s, $o) = map { $_->sse } @_; $explicit->{$s} = {} unless exists $explicit->{$s}; $explicit->{$s}{$o}++; }; local *_append_to_explicit = sub { my ($s, $o) = map { $_->sse } @_; $explicit->{$s} = {} unless exists $explicit->{$s}; for my $d (keys %{ $explicit->{$o} }) { $explicit->{$s}{$d}++; } }; local *_add_to_used_datatypes = sub { my ($d) = @_; $d = $d->uri if blessed($d); $used_datatypes->{$d}++; }; local *_handle_subsumptions = sub { my ($r, $dt) = @_; if (exists $OWL_Datatype_Subsumptions->{$dt}) { foreach my $new_dt (@{ $OWL_Datatype_Subsumptions->{$dt} }) { $cl->store_triple($r, $RDF->type, $new_dt); $cl->store_triple($new_dt, $RDF->type, $RDFS->Datatype); _add_to_used_datatypes($new_dt); } } }; my %literals; $cl->graph->get_statements(undef, undef, undef)->each(sub { my $st = shift; my @nodes = $st->nodes; foreach my $lt (@nodes) { next unless $lt->is_literal; # We're now effectively in a foreach literal loop... # Add to %literals, but skip rest of this iteration if it was already there. next if $literals{ $lt->sse }; $literals{ $lt->sse } = $lt; next unless $lt->has_datatype; $cl->store_triple($lt, $RDF->type, iri($lt->literal_datatype)); next unless grep { $_->uri eq $lt->literal_datatype } @$OWL_RL_Datatypes; # RULE dt-type2 $implicit->{ $lt->sse } = $lt->literal_datatype unless exists $implicit->{ $lt->sse }; _add_to_used_datatypes($lt->literal_datatype); # RULE dt-not-type $cl->add_error("Literal's lexical value and datatype do not match: (%s,%s)", $lt->literal_value, $lt->literal_datatype) unless $cl->dt_handling->literal_valid($lt); } }); # RULE dt-diff # RULE dt-eq foreach my $lt1 (keys %literals) { foreach my $lt2 (keys %literals) { if ($lt1 ne $lt2) # @@TODO doesn't work ??? { my $l1 = $literals{$lt1}; my $l2 = $literals{$lt2}; if ($cl->dt_handling->literals_identical($l1, $l2)) { $cl->store_triple($l1, $OWL->sameAs, $l2); } else { $cl->store_triple($l1, $OWL->differentFrom, $l2); } } } } # this next bit catches triples like { [] a xsd:string . } $cl->graph->get_statements(undef, $RDF->type, undef)->each(sub { my $st = shift; my ($s, $p, $o) = ($st->subject, $st->predicate, $st->object); if (grep { $_->equal($o); } @$OWL_RL_Datatypes) { _add_to_used_datatypes($o); _add_to_explicit($s, $o) unless exists $explicit->{ $s->sse }; } }); $cl->graph->get_statements(undef, $OWL->sameAs, undef)->each(sub { my $st = shift; my ($s, $p, $o) = ($st->subject, $st->predicate, $st->object); _append_to_explicit($s, $o) if exists $explicit->{$o}; _append_to_explicit($o, $s) if exists $explicit->{$s}; }); foreach my $dt (@$OWL_RL_Datatypes) { $cl->store_triple($dt, $RDF->type, $RDFS->Datatype); } foreach my $dts (values %$explicit) { foreach my $dt (keys %$dts) { $cl->store_triple(iri($dt), $RDF->type, $RDFS->Datatype); } } foreach my $r (keys %$explicit) { my @dtypes = keys %{ $explicit->{$r} }; $r = RDF::Trine::Node->from_sse($r); foreach my $dt (@dtypes) { $dt = $1 if $dt =~ /^<(.+)>$/; _handle_subsumptions($r, $dt); } } foreach my $r (keys %$implicit) { my $dt = $implicit->{$r}; $r = RDF::Trine::Node->from_sse($r); _handle_subsumptions($r, $dt); } foreach my $t (@$OWLRL_Datatypes_Disjointness) { my ($l, $r) = ($t->subject, $t->object); $cl->store_triple($t) if exists $used_datatypes->{$l->uri} && exists $used_datatypes->{$r->uri}; } }, 'dt-type2, dt-not-type, dt-diff, dt-eq' ), # cls-thing RDF::Closure::Rule::Programmatic->new( sub { my ($cl, $rule) = @_; $cl->store_triple($OWL->Thing, $RDF->type, $OWL->Class); }, 'cls-thing' ), # cls-nothing RDF::Closure::Rule::Programmatic->new( sub { my ($cl, $rule) = @_; $cl->store_triple($OWL->Nothing, $RDF->type, $OWL->Class); }, 'cls-nothing' ), # prp-ap RDF::Closure::Rule::Programmatic->new( sub { my ($cl, $rule) = @_; my $OWLRL_Annotation_properties = [ $RDFS->label, $RDFS->comment, $RDFS->seeAlso, $RDFS->isDefinedBy, $OWL->deprecated, $OWL->versionInfo, $OWL->priorVersion, $OWL->backwardCompatibleWith, $OWL->incompatibleWith, ]; $cl->store_triple($_, $RDF->type, $OWL->AnnotationProperty) foreach @$OWLRL_Annotation_properties; }, 'prp-ap' ), ); my $_EQ_REF = {}; our @Rules = ( # prp-dom RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->domain, undef], sub { my ($cl, $st, $rule) = @_; my ($prop, undef, $class) = $st->nodes; $cl->graph->subjects($prop)->each(sub { $cl->store_triple(shift, $RDF->type, $class); }); }, 'prp-dom' # Same as rdfs2 ), # prp-rng RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->range, undef], sub { my ($cl, $st, $rule) = @_; my ($prop, undef, $class) = $st->nodes; $cl->graph->objects(undef, $prop)->each(sub { $cl->store_triple(shift, $RDF->type, $class); }); }, 'prp-rng' # Same as rdfs3 ), # prp-fp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->FunctionalProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub { my $x = $st->subject; my $y1 = $st->object; $cl->graph->objects($x, $prop)->each(sub{ my $y2 = shift; $cl->store_triple($y1, $OWL->sameAs, $y2) unless $y1->equal($y2); }); }); }, 'prp-fp' ), # prp-ifp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->InverseFunctionalProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub { my $st = shift; my $x = $st->object; my $y1 = $st->subject; $cl->graph->subjects($prop, $x)->each(sub{ my $y2 = shift; $cl->store_triple($y1, $OWL->sameAs, $y2) unless $y1->equal($y2); }); }); }, 'prp-ifp' ), # prp-irp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->IrreflexiveProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub{ my $st = shift; $cl->add_error("Irreflexive property %s used reflexively on %s", $st->predicate, $st->subject) if $st->subject->equal($st->object); }); }, 'prp-irp' ), # prp-symp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->SymmetricProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub{ my $st = shift; $cl->store_triple($st->object, $prop, $st->subject); }); }, 'prp-symp' ), # prp-asym RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->AsymmetricProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub{ my $st = shift; $cl->add_error("Asymmetric property %s used symmetrically on (%s,%s)", $st->predicate, $st->subject, $st->object) if $cl->graph->count_statements($st->object, $st->predicate, $st->subject); }); }, 'prp-asym' ), # prp-trp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->TransitiveProperty], sub { my ($cl, $st, $rule) = @_; my ($prop) = $st->nodes; $cl->graph->get_statements(undef, $prop, undef)->each(sub{ my ($x, undef, $y) = $_[0]->nodes; $cl->graph->objects($y, $prop)->each(sub{ my $z = $_[0]; $cl->store_triple($x, $prop, $z); }); }); }, 'prp-trp' ), # prp-adp RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->AllDisjointProperties], sub { my ($cl, $st, $rule) = @_; my ($x) = $st->nodes; $cl->graph->get_statements($x, $OWL->members, undef)->each(sub { my @pis = $cl->graph->get_list($_[0]->object); for my $i (0 .. scalar(@pis)-1) { for my $j ($i+1 .. scalar(@pis)-1) { my $pi = $pis[$i]; my $pj = $pis[$j]; $cl->graph->get_statements(undef, $pi, undef)->each(sub { my ($x, undef, $y) = $_[0]->nodes; if ($cl->graph->count_statements($x, $pj, $y)) { $cl->add_error("Disjoint properties in an 'AllDisjointProperties' are not really disjoint: %s %s %s and %s %s %s.", $x, $pi, $y, $x, $pj, $y); } }); } } }); }, 'prp-adp' ), # prp-spo1 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subPropertyOf, undef], sub { my ($cl, $st, $rule) = @_; my ($prop1, undef, $prop2) = $st->nodes; $cl->graph->get_statements(undef, $prop1, undef)->each(sub { my $st = shift; $cl->store_triple($st->subject, $prop2, $st->object); }); }, 'prp-spo1' # Same as rdfs7 ), # prp-spo2 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->propertyChainAxiom], sub { my ($cl, $st, $rule) = @_; my ($prop, undef, $chain) = $st->nodes; _property_chain($cl, $prop, $chain); }, 'prp-spo2' ), # prp-eqp1, prp-eqp2 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->equivalentProperty, undef], sub { my ($cl, $st, $rule) = @_; my ($prop1, undef, $prop2) = $st->nodes; return if $prop1->equal($prop2); $cl->graph->get_statements(undef, $prop1, undef)->each(sub { my $st = shift; $cl->store_triple($st->subject, $prop2, $st->object); }); $cl->graph->get_statements(undef, $prop2, undef)->each(sub { my $st = shift; $cl->store_triple($st->subject, $prop1, $st->object); }); }, 'prp-eqp1, prp-eqp2' ), # prp-pdw RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->propertyDisjointWith, undef], sub { my ($cl, $st, $rule) = @_; my ($prop1, undef, $prop2) = $st->nodes; $cl->graph->get_statements(undef, $prop1, undef)->each(sub { my $st = shift; $cl->add_error('Erronous usage of disjoint properties %s and %s on %s and %s', $prop1, $prop2, $st->subject, $st->object) if $cl->graph->count_statements($st->subject, $prop2, $st->object); }); }, 'prp-pdw' ), # prp-inv1, prp-inv2 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->inverseOf, undef], sub { my ($cl, $st, $rule) = @_; my ($prop1, undef, $prop2) = $st->nodes; $cl->graph->get_statements(undef, $prop1, undef)->each(sub { my $st = shift; $cl->store_triple($st->object, $prop2, $st->subject); }); return if $prop1->equal($prop2); $cl->graph->get_statements(undef, $prop2, undef)->each(sub { my $st = shift; $cl->store_triple($st->object, $prop1, $st->subject); }); }, 'prp-inv1, prp-inv2' ), # prp-key RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->hasKey, undef], sub { my ($cl, $st, $rule) = @_; my ($c, $t, $u) = $st->nodes; my $G = $cl->graph; my @pis = $G->get_list($u); if (@pis) { foreach my $x ($G->subjects($RDF->type, $c)) { my $finalList = [ map { [$_] } $G->objects($x, $pis[0]) ]; my (undef, @otherPIS) = @pis; foreach my $pi (@otherPIS) { my $newList = []; foreach my $zi ($G->objects($x, $pi)) { foreach my $l (@$finalList) { push @$newList, [@$l, $zi]; } } $finalList = $newList; } my $valueList = [ grep { scalar(@$_)==scalar(@pis) } @$finalList ]; #use Data::Dumper; #printf("%s is member of class %s, has key values:\n%s\n", # $x->as_ntriples, # $c->as_ntriples, # Dumper($valueList)); INDY: foreach my $y ($G->subjects($RDF->type, $c)) { next if $x->equal($y); next if $G->count_statements($x, $OWL->sameAs, $y); next if $G->count_statements($y, $OWL->sameAs, $x); foreach my $vals (@$valueList) { my $same = TRUE; PROP: for my $i (0 .. scalar(@pis)-1) { unless ($G->count_statements($y, $pis[$i], $vals->[$i])) { $same = FALSE; next PROP; } } if ($same) { $cl->store_triple($x, $OWL->sameAs, $y); $cl->store_triple($y, $OWL->sameAs, $x); next INDY; } } } } } }, 'prp-key' ), # prp-npa1 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->targetIndividual, undef], sub { my ($cl, $st, $rule) = @_; my ($x, undef, $target) = $st->nodes; my @sources = $cl->graph->objects($x, $OWL->sourceIndividual); my @props = $cl->graph->objects($x, $OWL->assertionProperty); foreach my $s (@sources) { foreach my $p (@props) { if ($cl->graph->count_statements($s, $p, $target)) { $cl->add_error('Negative (object) property assertion violated for: (%s %s %s .)', $s, $p, $target); } } } }, 'prp-npa1' ), # prp-npa2 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->targetValue, undef], sub { my ($cl, $st, $rule) = @_; my ($x, undef, $target) = $st->nodes; my @sources = $cl->graph->objects($x, $OWL->sourceIndividual); my @props = $cl->graph->objects($x, $OWL->assertionProperty); foreach my $s (@sources) { foreach my $p (@props) { if ($cl->graph->count_statements($s, $p, $target)) { $cl->add_error('Negative (datatype) property assertion violated for: (%s %s %s .)', $s, $p, $target); } } } }, 'prp-npa2' ), # eq-ref RDF::Closure::Rule::StatementMatcher->new( [], sub { my ($cl, $st, $rule) = @_; my @nodes = $st->nodes; for (0..2) { next if $_EQ_REF->{ $nodes[$_]->sse }++; # optimisation $cl->store_triple($nodes[$_], $OWL->sameAs, $nodes[$_]); } }, 'eq-ref' ), # eq-sym RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->store_triple($o, $OWL->sameAs, $s); }, 'eq-sym' ), # eq-trans RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; foreach my $z ($cl->graph->objects($o, $OWL->sameAs)) { $cl->store_triple($s, $OWL->sameAs, $z); $cl->store_triple($z, $OWL->sameAs, $s); } }, 'eq-trans' ), # eq-rep-s RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->graph->get_statements($s, undef, undef)->each(sub { $cl->store_triple($o, $_[0]->predicate, $_[0]->object); }); }, 'eq-rep-s' ), # eq-rep-p RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->graph->get_statements(undef, $s, undef)->each(sub { $cl->store_triple($_[0]->subject, $o, $_[0]->object); }); }, 'eq-rep-p' ), # eq-rep-o RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->graph->get_statements(undef, undef, $s)->each(sub { $cl->store_triple($_[0]->subject, $_[0]->predicate, $o); }); }, 'eq-rep-o' ), # eq-diff RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->sameAs, undef], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; $cl->add_error("'sameAs' and 'differentFrom' cannot be used on the same subject-object pair: (%s, %s)", $s, $o) if $cl->graph->count_statements($s, $OWL->differentFrom, $o) || $cl->graph->count_statements($o, $OWL->differentFrom, $s); }, 'eq-diff' ), # eq-diff2 and eq-diff3 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->AllDifferent], sub { my ($cl, $st, $rule) = @_; my ($s, $p, $o) = $st->nodes; my $x = $s; my @m1 = $cl->graph->objects($x, $OWL->members); my @m2 = $cl->graph->objects($x, $OWL->distinctMembers); LOOPY: foreach my $y ((@m1, @m2)) { my @zis = $cl->graph->get_list($y); LOOPI: foreach my $i (0 .. scalar(@zis)-1) { my $zi = $zis[$i]; LOOPJ: foreach my $j ($i+1 .. scalar(@zis)-1) { my $zj = $zis[$j]; next LOOPJ if $zi->equal($zj); # caught by another rule $cl->add_error("'sameAs' and 'AllDifferent' cannot be used on the same subject-object pair: (%s, %s)", $zi, $zj) if $cl->graph->count_statements($zi, $OWL->sameAs, $zj) || $cl->graph->count_statements($zj, $OWL->sameAs, $zi); } } } }, 'eq-diff2, eq-diff3' ), # Ivan doesn't seem to have this rule, but it's required by test cases. # { ?x1 owl:differentFrom ?x2 . } => { ?x2 owl:differentFrom ?x1 . } . RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->differentFrom, undef], sub { my ($cl, $st, $rule) = @_; my ($x1, undef, $x2) = $st->nodes; $cl->store_triple($x2, $OWL->differentFrom, $x1); }, '????' ), # cls-nothing2 RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->Nothing], sub { my ($cl, $st, $rule) = @_; $cl->add_error("%s is defined of type 'Nothing'", $st->subject); }, 'cls-nothing' ), # cls-int1, cls-int2 RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->intersectionOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c, undef, $x) = $st->nodes; my @classes = $cl->graph->get_list($x); return unless @classes; # cls-int1 foreach my $y ($cl->graph->subjects($RDF->type, $classes[0])) { my $isInIntersection = TRUE; unless ($cl->graph->count_statements($y, $RDF->type, $c)) # Ivan doesn't do this check { CI: foreach my $ci (@classes[1 .. scalar(@classes)-1]) { unless ($cl->graph->count_statements($y, $RDF->type, $ci)) { $isInIntersection = FALSE; last CI; } } if ($isInIntersection) { $cl->store_triple($y, $RDF->type, $c); } } } # cls-int2 foreach my $y ($cl->graph->subjects($RDF->type, $c)) { $cl->store_triple($y, $RDF->type, $_) foreach @classes; } }, 'cls-int1, cls-int2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->unionOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c, undef, $x) = $st->nodes; my @classes = $cl->graph->get_list($x); foreach my $cu (@classes) { $cl->graph->subjects($RDF->type, $cu)->each(sub { $cl->store_triple($_[0], $RDF->type, $c); }); } }, 'cls-uni' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->complementOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $c2) = $st->nodes; $cl->graph->subjects($RDF->type, $c1)->each(sub{ $cl->add_error("Violation of complementarity for classes %s and %s on element %s", $c1, $c2, $_[0]) if $cl->graph->count_statements($_[0], $RDF->type, $c2); }); }, 'cls-comm' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->someValuesFrom, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $y) = $st->nodes; $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $v) = $_[0]->nodes; if ($y->equal($OWL->Thing) or $cl->graph->count_statements($u, $RDF->type, $y)) { $cl->store_triple($u, $RDF->type, $xx); } }); }); }, 'cls-svf1, cls-svf2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->allValuesFrom, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $y) = $st->nodes; $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->subjects($RDF->type, $xx)->each(sub{ my $u = shift; $cl->graph->objects($u, $pp)->each(sub{ my $v = shift; $cl->store_triple($v, $RDF->type, $y); }); }); }); }, 'cls-avf' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->hasValue, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $y) = $st->nodes; $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->subjects($RDF->type, $xx)->each(sub{ my $u = shift; $cl->store_triple($u, $pp, $y); }); $cl->graph->subjects($pp, $y)->each(sub{ my $u = shift; $cl->store_triple($u, $RDF->type, $xx); }); }); }, 'cls-hv1, cls-hv2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->maxCardinality, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $x) = $st->nodes; my $val = int( $x->is_literal ? $x->literal_value : -1 ); # maxc1 if ($val == 0) { $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $y) = $_[0]->nodes; $cl->add_error("Erronous usage of maximum cardinality with %s, %s", $xx, $y) if $cl->graph->count_statements($u, $RDF->type, $xx); }); }); } # maxc2 elsif ($val == 1) { $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $y1) = $_[0]->nodes; if ($cl->graph->count_statements($u, $RDF->type, $xx)) { $cl->graph->objects($u, $pp)->each(sub{ my $y2 = shift; unless ($y1->equal($y2)) { $cl->store_triple($y1, $OWL->sameAs, $y2); $cl->store_triple($y2, $OWL->sameAs, $y1); } }); } }); }); } else { # awesome, we can't do anything! } }, 'cls-maxc1, cls-maxc2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->maxCardinality, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $x) = $st->nodes; my $val = int( $x->is_literal ? $x->literal_value : -1 ); # cls-maxqc1 and cls-maxqc2 if ($val == 0) { my @cc = $cl->graph->objects($xx, $OWL->onClass); $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; foreach my $cc (@cc) { $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $y) = $_[0]->nodes; $cl->add_error("Erronous usage of maximum qualified cardinality with %s, %s, and %s", $xx, $cc, $y) if $cl->graph->count_statements($u, $RDF->type, $xx) && ($cc->equal($OWL->Thing) or $cl->graph->count_statements($y, $RDF->type, $cc)); }); } }); } # cls-maxqc3 and cls-maxqc4 elsif ($val == 1) { my @cc = $cl->graph->objects($xx, $OWL->onClass); $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; foreach my $cc (@cc) { $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $y1) = $_[0]->nodes; if ($cl->graph->count_statements($u, $RDF->type, $xx)) { if ($cc->equal($OWL->Thing)) { $cl->graph->objects($u, $pp)->each(sub{ my $y2 = shift; unless ($y1->equal($y2)) { $cl->store_triple($y1, $OWL->sameAs, $y2); $cl->store_triple($y2, $OWL->sameAs, $y1); } }); } elsif ($cl->graph->count_statements($y1, $RDF->type, $cc)) { $cl->graph->objects($u, $pp)->each(sub{ my $y2 = shift; if (!$y1->equal($y2) and $cl->graph->count_statements($y2, $RDF->type, $cc)) { $cl->store_triple($y1, $OWL->sameAs, $y2); $cl->store_triple($y2, $OWL->sameAs, $y1); } }); } } }); } }); } else { # awesome, we can't do anything! } }, 'cls-maxqc1, cls-maxqc2, cls-maxqc3, cls-maxqc4' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->oneOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c, undef, $x) = $st->nodes; my @indivs = $cl->graph->get_list($x); foreach my $i (@indivs) { $cl->store_triple($i, $RDF->type, $c); } }, 'cls-oo' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subClassOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $c2) = $st->nodes; unless ($c1->equal($c2)) { $cl->graph->subjects($RDF->type, $c1)->each(sub { $cl->store_triple($_[0], $RDF->type, $c2); }); } }, 'cax-sco' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->equivalentClass, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $c2) = $st->nodes; $cl->store_triple($c2, $OWL->equivalentClass, $c1); # Toby added $cl->store_triple($c1, $RDFS->subClassOf, $c2); $cl->store_triple($c2, $RDFS->subClassOf, $c1); unless ($c1->equal($c2)) { $cl->graph->subjects($RDF->type, $c1)->each(sub { $cl->store_triple($_[0], $RDF->type, $c2); }); $cl->graph->subjects($RDF->type, $c2)->each(sub { $cl->store_triple($_[0], $RDF->type, $c1); }); } }, 'cax-eqc, cax-eqc1' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->disjointWith, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $c2) = $st->nodes; $cl->graph->subjects($RDF->type, $c1)->each(sub { $cl->add_error('Disjoint classes %s and %s have a common individual %s', $c1, $c2, $_[0]) if $cl->graph->count_statements($_[0], $RDF->type, $c2); }); }, 'cax-dw' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->AllDisjointClasses], sub { my ($cl, $st, $rule) = @_; my $x = $st->subject; $cl->graph->objects($x, $OWL->members)->each(sub{ my @classes = $cl->graph->get_list($_[0]); if (@classes) { for my $i (0 .. scalar(@classes)-1) { my $cl1 = $classes[$i]; $cl->graph->subjects($RDF->type, $cl1)->each(sub{ my $z = shift; for my $j ($i+1 .. scalar(@classes)-1) { my $cl2 = $classes[$j]; $cl->add_error("Disjoint classes %s and %s have a common individual %s", $cl1, $cl2, $z) if $cl->graph->count_statements($z, $RDF->type, $cl2); } }); } } }); }, 'cax-adc' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->Class], sub { my ($cl, $st, $rule) = @_; my ($c) = $st->nodes; $cl->store_triple($c, $RDFS->subClassOf, $c); $cl->store_triple($c, $OWL->equivalentClass, $c); $cl->store_triple($c, $RDFS->subClassOf, $OWL->Thing); $cl->store_triple($OWL->Nothing, $RDFS->subClassOf, $c); }, 'scm-cls' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subClassOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $c2) = $st->nodes; $cl->graph->objects($c2, $RDFS->subClassOf)->each(sub { my $c3 = $_[0]; if ($c1->equal($c3)) { # scm-eqc2 $cl->store_triple($c1, $OWL->equivalentClass, $c3); } else { # scm-sco $cl->store_triple($c1, $RDFS->subClassOf, $c3); } # Ivan could optimise his version better. }); }, 'scm-sco, scm-eqc2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->ObjectProperty], sub { my ($cl, $st, $rule) = @_; my ($pp) = $st->nodes; $cl->store_triple($pp, $RDFS->subPropertyOf, $pp); $cl->store_triple($pp, $OWL->equivalentProperty, $pp); }, 'scm-op' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $OWL->DatatypeProperty], sub { my ($cl, $st, $rule) = @_; my ($pp) = $st->nodes; $cl->store_triple($pp, $RDFS->subPropertyOf, $pp); $cl->store_triple($pp, $OWL->equivalentProperty, $pp); }, 'scm-dp' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, $RDF->Property], sub { my ($cl, $st, $rule) = @_; my ($pp) = $st->nodes; $cl->store_triple($pp, $RDFS->subPropertyOf, $pp); $cl->store_triple($pp, $OWL->equivalentProperty, $pp); }, '????' # Ivan made this up ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->equivalentProperty, undef], sub { my ($cl, $st, $rule) = @_; my ($p1, undef, $p2) = $st->nodes; $cl->store_triple($p2, $OWL->equivalentProperty, $p1); # Toby added $cl->store_triple($p1, $RDFS->subPropertyOf, $p2); $cl->store_triple($p2, $RDFS->subPropertyOf, $p1); unless ($p1->equal($p2)) { $cl->graph->subjects($RDF->type, $p1)->each(sub { $cl->store_triple($_[0], $RDF->type, $p2); }); $cl->graph->subjects($RDF->type, $p2)->each(sub { $cl->store_triple($_[0], $RDF->type, $p1); }); } }, 'cax-eqp, cax-eqp1' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->subPropertyOf, undef], sub { my ($cl, $st, $rule) = @_; my ($p1, undef, $p2) = $st->nodes; $cl->graph->objects($p2, $RDFS->subPropertyOf)->each(sub { my $p3 = $_[0]; if ($p1->equal($p3)) { # scm-eqp2 $cl->store_triple($p1, $OWL->equivalentProperty, $p3); } else { # scm-spo $cl->store_triple($p1, $RDFS->subPropertyOf, $p3); } # Ivan could optimise his version better. }); }, 'scm-spo, scm-eqp2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->domain, undef], sub { my ($cl, $st, $rule) = @_; my ($pp, undef, $c1) = $st->nodes; $cl->graph->objects($c1, $RDFS->subClassOf)->each(sub { my $c2 = $_[0]; $cl->store_triple($pp, $RDFS->domain, $c2) unless $c1->equal($c2); }); my ($p2, undef, $c) = $st->nodes; $cl->graph->subjects($RDFS->subPropertyOf, $p2)->each(sub { my $p1 = $_[0]; $cl->store_triple($p1, $RDFS->domain, $c) unless $p1->equal($p2); }); }, 'scm-dom1, scm-dom2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $RDFS->range, undef], sub { my ($cl, $st, $rule) = @_; my ($pp, undef, $c1) = $st->nodes; $cl->graph->objects($c1, $RDFS->subClassOf)->each(sub { my $c2 = $_[0]; $cl->store_triple($pp, $RDFS->range, $c2) unless $c1->equal($c2); }); my ($p2, undef, $c) = $st->nodes; $cl->graph->subjects($RDFS->subPropertyOf, $p2)->each(sub { my $p1 = $_[0]; $cl->store_triple($p1, $RDFS->range, $c) unless $p1->equal($p2); }); }, 'scm-rng1, scm-rng2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->hasValue, undef], sub { my ($cl, $st, $rule) = @_; my ($c1, undef, $i) = $st->nodes; my @p1 = $cl->graph->objects($c1, $OWL->onProperty); my @c2 = $cl->graph->subjects($OWL->hasValue, $i); foreach my $p1 (@p1) { foreach my $c2 (@c2) { foreach my $p2 ($cl->graph->objects($c2, $OWL->onProperty)) { $cl->store_triple($c1, $RDFS->subClassOf, $c2) if $cl->graph->count_statements($p1, $RDFS->subPropertyOf, $p2); } } } }, 'scm-hv' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->someValuesFrom, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $y) = $st->nodes; $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->get_statements(undef, $pp, undef)->each(sub{ my ($u, undef, $v) = (shift)->nodes; if ($y->equal($OWL->Thing) or $cl->graph->count_statements($v, $RDF->type, $y)) { $cl->store_triple($u, $RDF->type, $xx); } }); }); }, 'scm-svf1, scm-svf2' ), RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->allValuesFrom, undef], sub { my ($cl, $st, $rule) = @_; my ($xx, undef, $y) = $st->nodes; $cl->graph->objects($xx, $OWL->onProperty)->each(sub{ my $pp = shift; $cl->graph->subjects($RDF->type, $xx)->each(sub { my $u = shift; $cl->graph->objects($u, $pp)->each(sub { my $v = shift; $cl->store_triple($v, $RDF->type, $y); }); }); }); }, 'scm-avf' ), # scm-int RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->intersectionOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c, undef, $x) = $st->nodes; $cl->store_triple($c, $RDFS->subClassOf, $_) foreach $cl->graph->get_list($x); }, 'scm-int' ), # scm-uni RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->unionOf, undef], sub { my ($cl, $st, $rule) = @_; my ($c, undef, $x) = $st->nodes; $cl->store_triple($_, $RDFS->subClassOf, $c) foreach $cl->graph->get_list($x); }, 'scm-uni' ), ); sub _property_chain { my ($self, $p, $x) = @_; my @chain = $self->graph->get_list($x); return unless @chain; $self->graph->get_statements(undef, $chain[0], undef)->each(sub { my ($u1, $_y, $_z) = $_[0]->nodes; my $finalList = [[$u1,$_z]]; my $chainExists = TRUE; PI: foreach my $pi (@chain[1 .. scalar(@chain)-1]) { my $newList = []; foreach my $q (@$finalList) { my ($_u, $ui) = @$q; foreach my $u ($self->graph->objects($ui, $pi)) { push @$newList, [$u1, $u]; } } if (@$newList) { $finalList = $newList; } else { $chainExists = FALSE; last PI; } } if ($chainExists) { foreach my $q (@$finalList) { my ($_u, $un) = @$q; $self->store_triple(($u1, $p, $un)); } } }); } sub __init__ { my ($self, @args) = @_; $self->SUPER::__init__(@args); $self->{bnodes} = []; $self->{options}{technique} = 'RULE'; return $self; } sub _get_resource_or_literal { my ($self, $node) = @_; $node; # ???? } sub post_process { # Python version removes bnode predicate triples, but I'm going to keep them. } sub add_axioms { my ($self) = @_; $self->store_triple(statement($_->nodes, $self->{axiom_context})) foreach @$OWLRL_Axiomatic_Triples; } sub add_daxioms { my ($self) = @_; $self->store_triple(statement($_->nodes, $self->{daxiom_context})) foreach @$OWLRL_D_Axiomatic_Triples; } sub entailment_regime { return 'http://www.w3.org/ns/owl-profile/RL'; } 1; =head1 NAME RDF::Closure::Engine::OWL2RL - OWL 2 RL inference =head1 ANALOGOUS PYTHON RDFClosure/OWLRL.py =head1 DESCRIPTION Performs OWL 2 inference, using the RL profile of OWL. =head1 SEE ALSO L. L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Engine/OWL2Plus.pm0000644000076400007640000001313211773064202017614 0ustar taitaipackage RDF::Closure::Engine::OWL2Plus; BEGIN { $RDF::Closure::Engine::OWL2Plus::AUTHORITY = 'cpan:TOBYINK'; $RDF::Closure::Engine::OWL2Plus::VERSION = '0.001'; } use 5.008; use strict; use utf8; use RDF::Closure::Engine::RDFS; use RDF::Closure::RestrictedDatatype; use RDF::Closure::Rule::StatementMatcher; use RDF::Closure::DatatypeHandling qw[$XSD $OWL $RDF $RDFS]; use RDF::Closure::XsdDatatypes qw[$OWL_Datatype_Subsumptions]; use RDF::Trine qw[statement iri]; use Number::Fraction; use base qw[RDF::Closure::Engine::OWL2RL]; our $hasSelfRule = RDF::Closure::Rule::StatementMatcher->new( [undef, $OWL->hasSelf, undef], sub { my ($cl, $st, $rule) = @_; my $z = $st->subject; $cl->graph->objects($z, $OWL->onProperty)->each(sub{ my $p = shift; $cl->graph->subjects($RDF->type, $z)->each(sub{ my $y = shift; $cl->store_triple($y, $p, $y); }); $cl->graph->get_statements(undef, $p, undef)->each(sub{ my ($y1, undef, $y2) = (shift)->nodes; $cl->store_triple($y1, $RDF->type, $z) if $y1->equal($y2); }); }); }, 'x-hasSelf-1' ); our $subsumptionRule = RDF::Closure::Rule::StatementMatcher->new( [undef, $RDF->type, undef], sub { my ($cl, $st, $rule) = @_; return unless $st->subject->is_literal; TYPE: foreach my $r (values %{ $cl->{restricted_datatypes} }) { eval { next TYPE unless $st->object->equal($r->base_type); next TYPE unless $r->check($st->subject); $cl->store_triple($st->subject, $RDF->type, $r->datatype); }; } }, 'x-restricted-dt-subsumption-1' ); sub one_time_rules { my @rdfs = RDF::Closure::Engine::RDFS->one_time_rules; my @owl = RDF::Closure::Engine::OWL2RL->one_time_rules; return (@owl, @rdfs, $subsumptionRule); } sub rules { my @rdfs = RDF::Closure::Engine::RDFS->rules; my @owl = RDF::Closure::Engine::OWL2RL->rules; return (@rdfs, @owl, $hasSelfRule); } sub add_axioms { my ($self) = @_; RDF::Closure::Engine::RDFS::add_axioms($self); RDF::Closure::Engine::OWL2RL::add_axioms($self); $self->store_triple(statement($OWL->hasSelf, $RDF->type, $RDF->Property, $self->{axiom_context})); $self->store_triple(statement($OWL->hasSelf, $RDFS->domain, $OWL->Restriction, $self->{axiom_context})); $self->store_triple(statement($OWL->hasSelf, $RDFS->range, $RDFS->Resource, $self->{axiom_context})); $self->store_triple(statement($OWL->Thing, $OWL->equivalentClass, $RDFS->Resource, $self->{axiom_context})); $self->store_triple(statement($OWL->Class, $OWL->equivalentClass, $RDFS->Class, $self->{axiom_context})); $self->store_triple(statement($OWL->DataRange, $OWL->equivalentClass, $RDFS->Datatype, $self->{axiom_context})); return $self; } sub add_daxioms { my ($self) = @_; RDF::Closure::Engine::RDFS::add_daxioms($self); RDF::Closure::Engine::OWL2RL::add_daxioms($self); return $self; } sub create_dt_handling { my %mapping = ( $OWL->rational->uri => sub { my ($v) = @_; my $fraction = Number::Fraction->new($v); return RDF::Closure::Engine::OWL2Plus::DatatypeTuple::Rational ->new("$fraction", $fraction); }, ); my @ichecks = ( sub { my ($dth, $lit1, $lit2) = @_; if ($lit1->[0] eq 'RDF::Closure::DatatypeTuple::Decimal' and $lit2->[0] eq 'RDF::Closure::Engine::OWL2Plus::DatatypeTuple::Rational') { # Convert $lit1->[1] to a fraction. my ($whole, $part) = split /\./, $lit1->[1]; my $numerator = $whole.$part; my $denominator = '1'.('0' x length $part); my $lit1d = Number::Fraction->new($numerator, $denominator); return 1 if "$lit1d" eq $lit2->[1]; } return 0; }, ); return RDF::Closure::DatatypeHandling->new( force_utc => 1, identity_checks => [ @ichecks ], mapping => { %mapping }, ); } sub __init__ { my ($self, @args) = @_; $self->SUPER::__init__(@args); $self->{dt_handling} = &create_dt_handling; $self->{subsumptions} = {%$OWL_Datatype_Subsumptions}; $self->{restricted_datatypes} = { map { $_->datatype => $_ } RDF::Closure::RestrictedDatatype->extract_from_graph($self->graph, $self->{dt_handling}) }; foreach my $r (values %{ $self->{restricted_datatypes} }) { $self->{subsumptions}->{ $r->datatype } = [ $r->base_type.'' ]; } return $self; } sub entailment_regime { return 'tag:buzzword.org.uk,2011:entailment:owl2plus'; } 1; package RDF::Closure::Engine::OWL2Plus::DatatypeTuple::Rational; use base qw[RDF::Closure::DatatypeTuple]; 1; =head1 NAME RDF::Closure::Engine::OWL2Plus - as much OWLish inference as possible =head1 ANALOGOUS PYTHON RDFClosure/OWLRLExtras.py =head1 DESCRIPTION Includes all rules from RDFS and OWL2 RL, some additional axioms, plus support for owl:hasSelf and the owl:rational datatype. =head1 SEE ALSO L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Model.pm0000644000076400007640000001376211773064025016074 0ustar taitaipackage RDF::Closure::Model; use 5.008; use strict; use utf8; use Carp qw[carp croak]; use RDF::Closure::Engine; #use RDF::Trine; use Scalar::Util qw[]; our @ISA = qw[RDF::Trine::Model]; our $VERSION = '0.001'; BEGIN { no strict 'refs'; my $pkg = __PACKAGE__; foreach my $delegated_method (qw[ get_list size etag count_statements get_statements get_pattern get_contexts as_stream as_hashref as_graphviz subjects predicates objects as_string objects_for_predicate_list bounded_description ]) { *{$pkg.'::'.$delegated_method} = sub { my ($self, @args) = @_; return $self->_egraph->$delegated_method(@args); }; } } sub new { my ($class, $original_data, %args) = @_; $args{store} ||= RDF::Trine::Store->temporary_store; $args{engine} ||= 'RDFS'; my $model = RDF::Trine::Model->new($args{store}); if (Scalar::Util::blessed($original_data)) { # Coerce $original_data to be a stream. $original_data = RDF::Trine::Model->new($original_data) if $original_data->isa('RDF::Trine::Store'); $original_data = $original_data->as_stream if $original_data->isa('RDF::Trine::Model'); die("\$original_data cannot be a %s.\n", ref($original_data)) unless $original_data->isa('RDF::Trine::Iterator::Graph'); $original_data->each(sub { $model->add_statement($_[0]); }); } my $engine = RDF::Closure::Engine->new($args{engine}, $model); $engine->closure; return bless { model => $model, engine => $engine, bulkmode => 0, removals => 0, }, $class; } sub entailment_regime { my ($self) = @_; return $self->_engine->entailment_regime; } sub recalculate { my ($self) = @_; $self->{removals} = 0; $self->_engine->reset; $self->_engine->closure; return $self; } sub _engine { return $_[0]->{engine}; } sub _egraph { return $_[0]->_engine->graph; } sub _reclose { my ($self) = @_; if ($self->{removals}) { $self->_engine->reset; $self->_engine->closure; $self->{removals} = 0; } else { $self->_engine->closure(1); } } sub temporary_model { croak "temporary_model not implemented yet (RDF::Closure::Model)"; } sub dataset_model { croak "dataset_model not implemented yet (RDF::Closure::Model)"; } sub begin_bulk_ops { my ($self) = @_; $self->{bulkmode}++; } sub end_bulk_ops { my ($self) = @_; if ($self->{bulkmode} > 0) { $self->{bulkmode}--; if ($self->{bulkmode} < 1) { $self->_reclose; $self->{bulkmode} = 0; } } } sub add_statement { my ($self, @args) = @_; $self->_egraph->add_statement(@args); $self->_reclose unless $self->{bulkmode}; } sub add_hashref { my ($self, @args) = @_; $self->begin_bulk_ops; $self->_egraph->add_hashref(@args); $self->end_bulk_ops; } sub add_list { my ($self, @args) = @_; $self->begin_bulk_ops; $self->_egraph->add_list(@args); $self->end_bulk_ops; } sub remove_statement { my ($self, @args) = @_; $self->_egraph->remove_statement(@args); $self->{removals} = 1; $self->_reclose unless $self->{bulkmode}; } sub remove_statements { my ($self, @args) = @_; $self->_egraph->remove_statements(@args); $self->{removals} = 1; $self->_reclose unless $self->{bulkmode}; } 1; =head1 NAME RDF::Closure::Model - RDF::Trine::Model-compatible inferface =head1 DESCRIPTION This module provides a subclass of L allowing you to dollop some reasoning into existing RDF::Trine code very easily. While L allows you to infer lots of new statements from an existing model, this class also allows you to add and remove statements from the reasoned model with new inferences calculated on-the-fly. Removing a statement is much slower than adding one, though adding a statement isn't what you'd call fast. Juditious use of C and C is recomnmended. If a lot of statements have been added and removed from a model since it was created, then it's theoretically possible for the inferred data to contain statements which are no longer entailed by the explicit data, or for the inferred data to be missing some inferences. A C method is provided which allows you to re-run the inference from scratch. =head2 Constructor =over =item * C<< new($input, [, engine => $engine ] [, store => $store ]) >> Instantiates a module. $input may be undef, an existing L or an L. The input will not be modified. C<$engine> is the inference engine to use; a string suitable for passing to C<< RDF::Closure::Engine->new >>; defaults to 'RDFS'. C<$store> is an L to use to build the inferred model in; defaults to a new, temporary store. =back =head2 Methods This package inherits from L and provides all the methods it does. It additionally provides: =over =item * C<< entailment_regime >> Returns a URI string identifying the type of inference in use. =item * C<< recalculate >> Drops and re-infers all inferred data. =back =head1 SEE ALSO L, L, L. Take careful note of the C and C methods present in L. Judicious use of them can seriously speed up this module. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/Rule/0000755000076400007640000000000011773065330015374 5ustar taitaiRDF-Closure-0.001/lib/RDF/Closure/Rule/Programmatic.pm0000644000076400007640000000102711773064025020357 0ustar taitaipackage RDF::Closure::Rule::Programmatic; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine; use base qw[RDF::Closure::Rule::Core]; our $VERSION = '0.001'; sub new { my ($class, $code, $name) = @_; throw Error::Simple("Code must be a coderef.") unless ref $code eq 'CODE'; bless { code => $code, name => $name }, $class; } sub call { my $self = shift; $self->{code}->(@_); } sub apply_to_closure { my ($self, $closure) = @_; $self->pre_atc; $self->call($closure, $self); $self->post_atc; } 1; RDF-Closure-0.001/lib/RDF/Closure/Rule/PatternMatcher.pm0000644000076400007640000000235011773064025020653 0ustar taitaipackage RDF::Closure::Rule::PatternMatcher; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine; use Scalar::Util qw[blessed]; use base qw[RDF::Closure::Rule::Core]; our $VERSION = '0.001'; sub new { my ($class, $pattern, $template, $name) = @_; throw Error::Simple("Pattern must be a RDF::Trine::Pattern.") unless blessed($pattern) && $pattern->isa('RDF::Trine::Pattern'); throw Error::Simple("Template must be a RDF::Trine::Pattern.") unless blessed($template) && $template->isa('RDF::Trine::Pattern'); bless { pattern => $pattern, template => $template, name => $name }, $class; } sub pattern { $_[0]->{pattern}; } sub template { $_[0]->{template}; } sub apply_to_closure { my ($self, $closure) = @_; $self->pre_atc; if ($self->pattern->can('match')) { $self->pattern->match($closure->graph)->each(sub { my $bound = $self->template->bind_variables($_[0]); $closure->store_triple($_) foreach grep { !$_->referenced_variables } $bound->triples; }); } else { $closure->graph->get_pattern($self->pattern)->each(sub { my $bound = $self->template->bind_variables($_[0]); $closure->store_triple($_) foreach grep { !$_->referenced_variables } $bound->triples; }); } $self->post_atc; } 1; RDF-Closure-0.001/lib/RDF/Closure/Rule/StatementMatcher.pm0000644000076400007640000000237211773064025021206 0ustar taitaipackage RDF::Closure::Rule::StatementMatcher; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine; use base qw[RDF::Closure::Rule::Core]; our $VERSION = '0.001'; sub new { my ($class, $pattern, $code, $name) = @_; throw Error "Pattern must be an arrayref." unless ref $pattern eq 'ARRAY'; throw Error "Code must be a coderef." unless ref $code eq 'CODE'; bless { pattern => $pattern, code => $code, name => $name }, $class; } sub pattern { $_[0]->{pattern}; } sub matches_statement { my ($self, $st) = @_; my $pattern = $self->pattern; return if (defined $pattern->[1] and !$pattern->[1]->equal($st->predicate)); return if (defined $pattern->[2] and !$pattern->[2]->equal($st->object)); return if (defined $pattern->[0] and !$pattern->[0]->equal($st->subject)); return 1; } sub call { my $self = shift; $self->{code}->(@_); } sub apply_to_closure { my ($self, $closure) = @_; $self->pre_atc; $closure->graph->get_statements(@{$self->pattern})->each(sub { my ($st) = @_; $self->call($closure, $st, $self); }); $self->post_atc; } sub apply_to_closure_given_statement { my ($self, $closure, $st) = @_; $self->debug; $self->call($closure, $st, $self) if $self->matches_statement($st); $self; } 1; RDF-Closure-0.001/lib/RDF/Closure/Rule/Core.pm0000644000076400007640000000136511773064025016627 0ustar taitaipackage RDF::Closure::Rule::Core; use 5.008; use strict; use utf8; use Error qw[:try]; use RDF::Trine; use Time::HiRes qw[time]; our $VERSION = '0.001'; sub name { my ($self) = @_; return $self->{name}; } sub debug { my ($self, $message) = @_; printf("+ %s%s\n", $self->name, (defined $message ? ": $message" : '')) if $RDF::Closure::Engine::Core::debugGlobal; } sub apply_to_closure { my ($self, $closure) = @_; throw Error "This method should not be called directly; subclasses should override it."; } sub pre_atc { my ($self) = @_; $self->debug('BEGIN'); $self->{start_time} = time(); } sub post_atc { my ($self) = @_; $self->debug(sprintf("END %03.03f seconds", (time() - $self->{start_time}))); delete $self->{start_time}; } 1; RDF-Closure-0.001/lib/RDF/Closure/DatatypeTuple.pm0000644000076400007640000000571511773064025017620 0ustar taitaipackage RDF::Closure::DatatypeTuple; use 5.008; use strict; use utf8; use overload q[""] => 'to_string'; our $VERSION = '0.001'; sub new { my ($class, @values) = @_; bless [ @values ], $class; } sub to_string { my ($self) = @_; return $self->[0]; } 1; package RDF::Closure::DatatypeTuple::Boolean; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Decimal; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::URI; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Base64Binary; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::HexBinary; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Double; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Float; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::DateTime; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Date; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::Time; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::GYearMonth; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::GYear; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::GMonthDay; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::GDay; #Mate use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::GMonth; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::XMLLiteral; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::PlainLiteral; use base qw[RDF::Closure::DatatypeTuple]; 1; package RDF::Closure::DatatypeTuple::String; use base qw[RDF::Closure::DatatypeTuple]; 1; =head1 NAME RDF::Closure::DatatypeTuple - classes used internally by DatatypeHandling.pm =head1 SEE ALSO L, L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure/RestrictedDatatype.pm0000644000076400007640000001667411773064220020642 0ustar taitaipackage RDF::Closure::RestrictedDatatype; BEGIN { $RDF::Closure::RestrictedDatatype::AUTHORITY = 'cpan:TOBYINK'; $RDF::Closure::RestrictedDatatype::VERSION = '0.001'; } use 5.008; use strict; use utf8; use Error qw':try'; use RDF::Closure::DatatypeHandling; use RDF::Trine qw[iri]; use RDF::Trine::Namespace qw[XSD RDF RDFS OWL]; use Scalar::Util qw[blessed]; #: Constant for datatypes using min, max (inclusive and exclusive): use constant MIN_MAX => 'MIN_MAX'; #: Constant for datatypes using length, minLength, and maxLength (and nothing else) use constant LENGTH => 'LENGTH'; #: Constant for datatypes using length, minLength, maxLength, and pattern use constant LENGTH_AND_PATTERN => 'LENGTH_AND_PATTERN'; #: Constat for datatypes using length, minLength, maxLength, pattern, and lang range use constant LENGTH_PATTERN_LRANGE => 'LENGTH_PATTERN_LRANGE'; #: Dictionary of all the datatypes, keyed by category our %Datatypes_per_facets = ( MIN_MAX => [ $OWL->rational, $XSD->decimal, $XSD->integer, $XSD->nonNegativeInteger, $XSD->nonPositiveInteger, $XSD->positiveInteger, $XSD->negativeInteger, $XSD->long, $XSD->short, $XSD->byte, $XSD->unsignedLong, $XSD->unsignedInt, $XSD->unsignedShort, $XSD->unsignedByte, $XSD->double, $XSD->float, $XSD->dateTime, $XSD->dateTimeStamp, $XSD->time, $XSD->date, ], LENGTH => [ $XSD->hexBinary, $XSD->base64Binary ], LENGTH_AND_PATTERN => [ $XSD->anyURI, $XSD->string, $XSD->NMTOKEN, $XSD->Name, $XSD->NCName, $XSD->language, $XSD->normalizedString, ], LENGTH_PATTERN_LRANGE => [ $RDF->PlainLiteral ], ); our %facet_to_method = ( MIN_MAX => [qw(_check_max_exclusive _check_min_exclusive _check_max_inclusive _check_min_inclusive)], LENGTH => [qw(_check_min_length _check_max_length _check_length)], LENGTH_AND_PATTERN => [qw(_check_min_length _check_max_length _check_length _check_pattern)], LENGTH_PATTERN_LRANGE => [qw(_check_min_length _check_max_length _check_length _check_lang_range)], ); our @facetable_datatypes = map { @$_ } values %Datatypes_per_facets; sub new { my ($class, @args) = @_; my $self = bless {}, $class; $self->__init__(@args); return $self; } sub extract_from_graph { my ($class, $graph, $dth) = @_; my @retval; $graph->subjects($RDF->type, $RDFS->Datatype)->each(sub{ my $dtype = shift; my $base_type; my @facets; eval { my @base_types = $graph->objects($dtype, $OWL->onDatatype); if (@base_types) { if (exists $base_types[1]) { die(sprintf("Several base datatype for the same restriction %s", $dtype)); } else { $base_type = $base_types[0]; if (grep { $base_type->equal($_) } @facetable_datatypes) { my @rlists = $graph->objects($dtype, $OWL->withRestrictions); if (exists $rlists[1]) { die(sprintf("More than one facet lists for the same restriction %s", $dtype)); } elsif (@rlists) { my @final_facets; foreach my $r ($graph->get_list(@rlists)) { $graph->get_statements($r, undef, undef)->each(sub{ my (undef, $facet, $lit) = (shift)->nodes; push @final_facets, [$facet, $lit]; }); } # We do have everything we need: my $new_datatype = $class->new($dtype, $base_type, \@final_facets, $dth); push @retval, $new_datatype; } } } } }; }); return @retval; } sub __init__ { my ($self, $type_uri, $base_type, $facets, $dt_handler) = @_; $dt_handler ||= RDF::Closure::DatatypeHandling->new; $self->{datatype} = $type_uri; $self->{base_type} = $base_type; $self->{dt_handler} = $dt_handler; my $converter = $dt_handler->mapping("$base_type"); unless (defined $converter) { throw Error::Simple("No facet is implemented for datatype %s", $base_type); } $self->{converter} = $converter; $self->{minExclusive} = undef; $self->{maxExclusive} = undef; $self->{minInclusive} = undef; $self->{maxInclusive} = undef; $self->{length} = undef; $self->{maxLength} = undef; $self->{minLength} = undef; $self->{pattern} = []; $self->{langRange} = []; foreach my $pair (@$facets) { my ($facet, $value) = @$pair; $value = $self->{dt_handler}->literal_to_perl($value) if ref $value; if ($facet->equal($XSD->minInclusive) and (!defined $self->{minInclusive} or $self->{minInclusive} < $value)) { $self->{minInclusive} = $value; } elsif ($facet->equal($XSD->maxInclusive) and (!defined $self->{maxInclusive} or $self->{maxInclusive} > $value)) { $self->{maxInclusive} = $value; } elsif ($facet->equal($XSD->minExclusive) and (!defined $self->{minExclusive} or $self->{minExclusive} < $value)) { $self->{minExclusive} = $value; } elsif ($facet->equal($XSD->maxExclusive) and (!defined $self->{maxExclusive} or $self->{maxExclusive} > $value)) { $self->{maxExclusive} = $value; } elsif ($facet->equal($XSD->minLength) and (!defined $self->{minLength} or $self->{minLength} < $value)) { $self->{minLength} = $value; } elsif ($facet->equal($XSD->maxLength) and (!defined $self->{maxLength} or $self->{maxLength} > $value)) { $self->{maxLength} = $value; } elsif ($facet->equal($XSD->length)) { $self->{length} = $value; } elsif ($facet->equal($XSD->pattern)) { push @{$self->{pattern}}, qr($value)so; } elsif ($facet->equal($RDF->langRange)) { push @{$self->{langRange}}, $value; } } $self->{check_methods} = []; LOOP: foreach my $cat (keys %Datatypes_per_facets) { if (grep {$_->equal($base_type)} @{$Datatypes_per_facets{$cat}}) { $self->{category} = $cat; $self->{check_methods} = $facet_to_method{$cat}; last LOOP; } } } sub datatype { return $_[0]->{datatype}; } sub base_type { return $_[0]->{base_type}; } sub check { my ($self, $value, $dt) = @_; if (blessed($value) and $value->isa('RDF::Trine::Node')) { $dt ||= $value->literal_datatype; $value = $self->{dt_handler}->literal_to_perl($value); } foreach my $method (@{$self->{check_methods}}) { return unless $self->$method($value, $dt); } return $self; } sub _check_min_exclusive { my ($self, $value) = @_; return $self unless defined $self->{minExclusive}; return ($self->{minExclusive} < $value); } sub _check_max_exclusive { my ($self, $value) = @_; return $self unless defined $self->{maxExclusive}; return ($self->{maxExclusive} > $value); } sub _check_min_inclusive { my ($self, $value) = @_; return $self unless defined $self->{minInclusive}; return ($self->{minInclusive} <= $value); } sub _check_max_inclusive { my ($self, $value) = @_; return $self unless defined $self->{maxInclusive}; return ($self->{maxInclusive} >= $value); } sub _check_min_length { my ($self, $value) = @_; return $self unless defined $self->{minLength}; return ($self->{minLength} <= length($value)); } sub _check_max_length { my ($self, $value) = @_; return $self unless defined $self->{maxLength}; return ($self->{maxLength} >= length($value)); } sub _check_length { my ($self, $value) = @_; return $self unless defined $self->{length}; return ($self->{length} == length($value)); } sub _check_pattern { my ($self, $value) = @_; foreach my $pattern (@{$self->{pattern}}) { return unless $value =~ $pattern; } return $self; } sub _check_lang_range { my ($self, $value) = @_; return unless blessed($value) && $value->can('lang_range_check'); foreach my $r (@{$self->{langRange}}) { return unless $value->lang_range_check($r); } return $self; } 1; RDF-Closure-0.001/lib/RDF/Closure/DatatypeHandling.pm0000644000076400007640000006140211773064025020246 0ustar taitaipackage RDF::Closure::DatatypeHandling; use 5.008; use bignum; use strict; use utf8; use DateTime; use DateTime::Format::Strptime; use DateTime::Format::XSD; use DateTime::TimeZone; use Error qw[:try]; use Math::BigInt; use MIME::Base64 qw[encode_base64 decode_base64]; use RDF::Trine qw[statement iri]; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use RDF::Closure::DatatypeTuple; use Scalar::Util qw[blessed]; use URI qw[]; use XML::LibXML; use base qw[Exporter]; our $VERSION = '0.001'; our @EXPORT = qw[]; our @EXPORT_OK = qw[ literal_tuple literal_valid literal_canonical literal_to_perl literal_canonical_safe literals_identical $RDF $RDFS $OWL $XSD ]; use constant { TRUE => 1, FALSE => 0, }; use namespace::clean; sub _strToBool { my ($v) = @_; return RDF::Closure::DatatypeTuple::Boolean->new('true', 1) if lc $v eq 'true' || $v eq '1'; return RDF::Closure::DatatypeTuple::Boolean->new('false', 0) if lc $v eq 'false' || $v eq '0'; throw Error::Simple(sprintf('Invalid boolean literal value "%s"', $v)); } sub _strToDecimal { my ($v) = @_; if ($v =~ /^(?:(?i)(?:[+-]?)(?:(?=[0123456789]|[.])(?:[0123456789]*)(?:(?:[.])(?:[0123456789]{0,}))?))$/) { $v =~ s/^\+//; # remove explicit positive $v =~ s/0+$// if $v =~ /\./; # remove trailing zeros $v =~ s/^(\-)?0+/$1/; # remove leading zeros $v =~ s/\.$//; # remove trailing point $v =~ s/^(\-)?\./${1}0./; # restore leading zero if abs($v) < 1.0 $v = '0' unless length $v; # empty string is '0' return RDF::Closure::DatatypeTuple::Decimal->new($v); } throw Error::Simple(sprintf('Invalid decimal literal value "%s"', $v)); } sub _strToAnyURI { my ($v) = @_; # percent-encoded with non-hexadecimal characters my @bits = split /\%/, $v; shift @bits; throw Error::Simple(sprintf('Invalid IRI "%s"', $v)) if grep { !/^[0-9A-F]{2}/i } @bits; my $u = URI->new($v); return RDF::Closure::DatatypeTuple::URI->new($u->canonical->as_string, $u); } sub _strToBase64Binary { my ($v) = @_; return RDF::Closure::DatatypeTuple::Base64Binary->new(encode_base64(decode_base64($v), '')) if $v =~ /^[A-Za-z0-9\=\+\/\r\n\s]*$/; throw Error::Simple(sprintf('Invalid Base64Binary "%s"', $v)); } #: limits for unsigned bytes my $_limits_unsignedByte = [-1, 256]; #: limits for bytes my $_limits_byte = [-129, 128]; #: limits for unsigned int my $_limits_unsignedInt = [-1, 4294967296]; #: limits for int my $_limits_int = [-2147483649, 2147483648]; #: limits for unsigned short my $_limits_unsignedShort = [-1, 65536]; #: limits for short my $_limits_short = [-32769, 32768]; #: limits for unsigned long my $_limits_unsignedLong = [-1, 18446744073709551616]; #: limits for long my $_limits_long = [-9223372036854775809, 9223372036854775808]; #: limits for positive integer my $_limits_positiveInteger = [0, undef]; #: limits for non positive integer my $_limits_nonPositiveInteger = [undef, 1]; #: limits for non negative ingteger my $_limits_nonNegativeInteger = [-1, undef]; #: limits for negative ingteger my $_limits_negativeInteger = [undef, 0]; sub _strToBoundNumeral { my ($incoming_v, $interval, $conversion) = @_; $conversion ||= sub { Math::BigInt->new($_[0]); }; return try { my $i = $conversion->($incoming_v); my $v = $i->bstr; $v =~ s/0+$// if $v =~ /\./; # remove trailing zeros $v =~ s/^(\-)?0+/$1/; # remove leading zeros $v =~ s/\.$//; # remove trailing point $v =~ s/^(\-)?\./${1}0./; # restore leading zero if abs($v) < 1.0 $v = '0' unless length $v; # empty string is '0' return RDF::Closure::DatatypeTuple::Decimal->new($v) if ( (!defined $interval->[0] or $interval->[0] < $i) and (!defined $interval->[1] or $interval->[1] > $i) ); # } # except # { # return RDF::Closure::DatatypeTuple::Decimal->new($incoming_v); }; throw Error::Simple(sprintf('Invalid numerical value "%s"', $incoming_v)); } # xsd:double and xsd:float are pairwise disjoint with xsd:decimal and its ilk. # (xsd:decimal and its ilk are NOT disjoint with each other) { my $floatey = sub { my ($incoming_v, $niceclass, $class, $ulim, $llim) = @_; (my $v = $incoming_v) =~ s/^\+//; return $class->new("NaN") if $v =~ /^\-?NaN$/i; return $class->new("INF") if $v =~ /^\-?INF$/i; return $class->new("0.0E0") if $v =~ /^\-?0+$/; throw Error::Simple(sprintf('Invalid %s (octal/hex-looking notation) "%s"', $niceclass, $incoming_v)) if $v =~ /0[xb]/i; $v = Math::BigFloat->new($v); throw Error::Simple(sprintf('Invalid %s "%s"', $niceclass, $incoming_v)) if $v->is_nan; my $avalue = $v->babs; if (defined $ulim and $avalue > $ulim) { throw Error::Simple(sprintf('Invalid %s (too big)"%s"', $niceclass, $incoming_v)); } elsif (defined $llim and $avalue < $llim) { throw Error::Simple(sprintf('Invalid %s (too near zero)"%s"', $niceclass, $incoming_v)); } my $formatted; my ($m, $e) = $v->parts; $m = $m->bstr; my ($m1, $mrest) = (substr($m,0,1), substr($m,1)); $e += length($mrest); $mrest =~ s/0+$//; $mrest = '0' unless length $mrest; $formatted = sprintf('%s.%sE%s', $m1, $mrest, $e->bstr); return $class->new($formatted); }; { my ($ulim, $llim); sub _strToDouble { $ulim ||= Math::BigFloat->new('1.0E+310'); $llim ||= Math::BigFloat->new('1.0E-330'); $floatey->($_[0], 'double', 'RDF::Closure::DatatypeTuple::Double', $ulim, $llim); } } { my ($ulim, $llim); sub _strToFloat { $ulim ||= Math::BigFloat->new('1.0E+40'); $llim ||= Math::BigFloat->new('1.0E-50'); $floatey->($_[0], 'float', 'RDF::Closure::DatatypeTuple::Float', $ulim, $llim); } } } sub _strToHexBinary { my ($v) = @_; throw Error::Simple(sprintf('Invalid hex binary (odd number of digits) "%s"', $v)) if length($v) % 2 == 1; throw Error::Simple(sprintf('Invalid hex binary (non-hex digits) "%s"', $v)) unless $v =~ /^[0-9A-F]*$/i; $v =~ s/([a-fA-F0-9][a-fA-F0-9])/uc($1)/eg; return RDF::Closure::DatatypeTuple::HexBinary->new($v); } { my $format; sub _strToDateTimeAndStamp { my ($incoming_v, $timezone_required, $FORCE_UTC) = @_; $format ||= DateTime::Format::XSD->new; my $v = try { $format->parse_datetime($incoming_v); } except { throw Error::Simple(sprintf('Invalid dateTime (bad syntax) "%s"', $incoming_v)); }; throw Error::Simple(sprintf('Invalid dateTimeStamp (no timezone) "%s"', $incoming_v)) if $v->time_zone->is_floating && $timezone_required; # XSD does this; OWL2 does not. if ($FORCE_UTC and !$v->time_zone->is_floating) { $v->set_time_zone('UTC'); # canonicalise TZ } my $formatted = $format->format_datetime($v); # DateTime::Format::XSD ignores fractional seconds :-( # DateTime::Format::XSD seems to assume UTC :-( :-( if ($v->nanosecond or $v->time_zone->is_floating) { my ($datetime, $zone) = ($formatted =~ m{^(.+?)(Z|[\+\-]\d{2}:\d{2})?$}); if ($v->nanosecond) { $datetime .= $v->strftime('.%9N'); # append nine digits of fractional seconds $datetime =~ s/0+$//g; # remove trailing 0s } $formatted = $datetime; $formatted .= $zone unless $v->time_zone->is_floating; } $formatted =~ s/[\+\-]00:00$/Z/; return RDF::Closure::DatatypeTuple::DateTime->new($formatted, $v); } sub _strToTime { my ($incoming_v, $FORCE_UTC) = @_; # Just pass through _strToDateTimeAndStamp with a fake date (which # shouldn't be too near any leap seconds!) my $rv = ''._strToDateTimeAndStamp("2009-02-12T${incoming_v}", FALSE, $FORCE_UTC); $rv =~ s/^\d{4}-\d{2}-\d{2}T//i; return RDF::Closure::DatatypeTuple::Time->new($rv); } } { my (%format, %format_tz); sub _strToDateOrPart { my ($incoming_v, $class, $pattern, $has_timezone) = @_; # DateTime always needs a year, month and day. my $processed_v = $incoming_v; my $processed_pattern = $pattern; unless ($pattern =~ /\%y/i) { my $processing = '##%s## %s'; $processed_pattern = sprintf($processing, '%Y', $pattern); $processed_v = sprintf($processing, '2012', $incoming_v); # use a leap year! } unless ($pattern =~ /\%m/) { my $processing = '####%s#### %s'; $processed_pattern = sprintf($processing, '%m', $processed_pattern); $processed_v = sprintf($processing, '10', $processed_v); # use a 31 day month! } unless ($pattern =~ /\%d/) { my $processing = '######%s###### %s'; $processed_pattern = sprintf($processing, '%d', $processed_pattern); $processed_v = sprintf($processing, '24', $processed_v); } # strptime only understands '+0100' style timezones $processed_v =~ s/z$/\+0000/i; $processed_v =~ s/([\+\-]\d\d):(\d\d)$/$1$2/; $format{ $processed_pattern } ||= DateTime::Format::Strptime->new( pattern => $processed_pattern, time_zone => DateTime::TimeZone->new(name=>'floating'), locale => 'en_US', on_error => 'undef', ); $format_tz{ $processed_pattern } ||= DateTime::Format::Strptime->new( pattern => $processed_pattern.'%z', locale => 'en_US', on_error => 'undef', ); my $v = $format_tz{ $processed_pattern }->parse_datetime($processed_v) || $format{ $processed_pattern }->parse_datetime($processed_v); throw Error::Simple(sprintf('Invalid date/date-part (unparsable) "%s"', $incoming_v)) if !defined $v; throw Error::Simple(sprintf('Invalid date/date-part (no timezone) "%s"', $incoming_v)) if $v->time_zone->is_floating && defined $has_timezone && $has_timezone==1; throw Error::Simple(sprintf('Invalid date/date-part (has timezone) "%s"', $incoming_v)) if !$v->time_zone->is_floating && defined $has_timezone && $has_timezone==0; my $formatted = $v->strftime($pattern); unless ($v->time_zone->is_floating) { if ($v->time_zone->is_utc) { $formatted .= 'Z'; } else { (my $tz = $v->strftime('%z')) =~ s/^(...)(..)$/$1:$2/; $formatted .= $tz; } } $class = sprintf('RDF::Closure::DatatypeTuple::%s', $class) unless $class =~ /::/; return $class->new($formatted, $v); } } #: regular expression for a 'language' datatype my $_re_language = qr/^[a-zA-Z]{1,8}(-[a-zA-Z0-9]{1,8})*$/; #: regexp for NMTOKEN. It must be used with a re.U flag (the '(?U' regexp form did not work. It may depend on the locale...) my $_re_NMTOKEN = qr/^[\w:_.\-]+$/; #: characters not permitted at a starting position for Name (otherwise Name is like NMTOKEN my $_re_Name_ex = [qw{. - 0 1 2 3 4 5 6 7 8 9}]; #: regexp for NCName. It must be used with a re.U flag (the '(?U' regexp form did not work. It may depend on the locale...) my $_re_NCName = qr/^[\w_.\-]+$/; #: characters not permitted at a starting position for NCName my $_re_NCName_ex = [qw{. - 0 1 2 3 4 5 6 7 8 9}]; # xsd:normalisedString my $_re_normalString = qr"^[^\n\t\r]+$"; sub _strToVal_Regexp { my ($v, $regexp, $excludeStart) = @_; $excludeStart ||= []; if (defined $regexp and $v !~ $regexp) { throw Error::Simple(sprintf('Invalid literal "%s"; does not match %s.', $v, $regexp)); } my $firstChar = substr($v, 0, 1); if (grep { $_ eq $firstChar } @$excludeStart) { throw Error::Simple(sprintf('Invalid literal "%s"; starts with "%s" but should not.', $v, $firstChar)); } return RDF::Closure::DatatypeTuple::String->new($v); } sub _strToToken { my ($v) = @_; throw Error::Simple(sprintf('Invalid token (illegal whitespace character) "%s".', $v)) unless $v =~ $_re_normalString; throw Error::Simple(sprintf('Invalid token (doubled space) "%s".', $v)) if $v =~ /\s\s/; throw Error::Simple(sprintf('Invalid token (leading space) "%s".', $v)) if $v =~ /^\s/; throw Error::Simple(sprintf('Invalid token (trailing space) "%s".', $v)) if $v =~ /\s$/; return RDF::Closure::DatatypeTuple::String->new($v); } sub _strToPlainLiteral { my ($v) = @_; my ($value, $lang) = ($v =~ m{^(.*)\@([^\@]+)?$}); if (defined $lang and $lang !~ $_re_language) { throw Error::Simple(sprintf('Invalid language tag "%s"', $lang)); } return RDF::Closure::DatatypeTuple::PlainLiteral->new(sprintf('%s@%s', $value, lc($lang||''))); } { my $parser; sub _strToXMLLiteral { my ($v) = @_; $parser ||= XML::LibXML->new; try { my $fragment = $parser->parse_balanced_chunk($v); my $canonical = join '', map { my $r; # we should use canonical XML, # but that doesn't always work out. :-( $r = eval { $_->toStringEC14N(TRUE); }; $r = eval { $_->toStringC14N(TRUE); } unless defined $r; $r = eval { $_->toString; } unless defined $r; } $fragment->childNodes; return RDF::Closure::DatatypeTuple::XMLLiteral->new($canonical, $fragment); } except { throw Error::Simple(sprintf('Poorly-formed XML """%s"""', $v)); }; } } { my %mapping = ( $XSD->language->uri => sub { _strToVal_Regexp($_[0], $_re_language); }, $XSD->NMTOKEN->uri => sub { _strToVal_Regexp($_[0], $_re_NMTOKEN); }, $XSD->Name->uri => sub { _strToVal_Regexp($_[0], $_re_NMTOKEN, $_re_Name_ex); }, $XSD->NCName->uri => sub { _strToVal_Regexp($_[0], $_re_NCName, $_re_NCName_ex); }, $XSD->token->uri => \&_strToToken, $RDF->PlainLiteral->uri => \&_strToPlainLiteral, $XSD->boolean->uri => \&_strToBool, $XSD->decimal->uri => \&_strToDecimal, $XSD->anyURI->uri => \&_strToAnyURI, $XSD->base64Binary->uri => \&_strToBase64Binary, $XSD->double->uri => \&_strToDouble, $XSD->float->uri => \&_strToFloat, $XSD->byte->uri => sub { _strToBoundNumeral($_[0], $_limits_byte); }, $XSD->int->uri => sub { _strToBoundNumeral($_[0], $_limits_int); }, $XSD->long->uri => sub { _strToBoundNumeral($_[0], $_limits_long); }, $XSD->positiveInteger->uri => sub { _strToBoundNumeral($_[0], $_limits_positiveInteger); }, $XSD->nonPositiveInteger->uri => sub { _strToBoundNumeral($_[0], $_limits_nonPositiveInteger); }, $XSD->negativeInteger->uri => sub { _strToBoundNumeral($_[0], $_limits_negativeInteger); }, $XSD->nonNegativeInteger->uri => sub { _strToBoundNumeral($_[0], $_limits_nonNegativeInteger); }, $XSD->short->uri => sub { _strToBoundNumeral($_[0], $_limits_short); }, $XSD->unsignedByte->uri => sub { _strToBoundNumeral($_[0], $_limits_unsignedByte); }, $XSD->unsignedShort->uri => sub { _strToBoundNumeral($_[0], $_limits_unsignedShort); }, $XSD->unsignedInt->uri => sub { _strToBoundNumeral($_[0], $_limits_unsignedInt); }, $XSD->unsignedLong->uri => sub { _strToBoundNumeral($_[0], $_limits_unsignedLong); }, $XSD->hexBinary->uri => \&_strToHexBinary, $RDF->XMLLiteral->uri => \&_strToXMLLiteral, $XSD->integer->uri => sub { _strToBoundNumeral($_[0], [undef, undef]); }, $XSD->string->uri => sub { _strToVal_Regexp($_[0]); }, $XSD->normalizedString->uri => sub { _strToVal_Regexp($_[0], $_re_normalString); }, $XSD->dateTime->uri => sub { my $n = $_[1]||__PACKAGE->new; _strToDateTimeAndStamp($_[0], FALSE, $n->force_utc); }, $XSD->dateTimeStamp->uri => sub { my $n = $_[1]||__PACKAGE->new; _strToDateTimeAndStamp($_[0], TRUE, $n->force_utc); }, # # These are RDFS specific... $XSD->time->uri => \&_strToTime, $XSD->date->uri => sub { _strToDateOrPart($_[0], 'Date', '%Y-%m-%d'); }, $XSD->gYearMonth->uri => sub { _strToDateOrPart($_[0], 'GYearMonth', '%Y-%m'); }, $XSD->gYear->uri => sub { _strToDateOrPart($_[0], 'GYear', '%Y'); }, $XSD->gMonthDay->uri => sub { _strToDateOrPart($_[0], 'GMonthDay', '--%m-%d'); }, $XSD->gDay->uri => sub { _strToDateOrPart($_[0], 'GDay', '---%d'); }, $XSD->gMonth->uri => sub { _strToDateOrPart($_[0], 'GMonth', '--%m'); }, ); my @ichecks = ( sub { my ($self, $lit1, $lit2) = @_; # Perhaps we have a plain literal and an xsd:string. # There's still a chance that they're identical! # (refer to the value space of rdf:PlainLiteral) if ($lit1->[0] eq $RDF->PlainLiteral->uri || $lit1->[0] eq 'RDF::Closure::DatatypeTuple::PlainLiteral' and $lit2->[0] eq $XSD->string->uri || $lit2->[0] eq 'RDF::Closure::DatatypeTuple::String') { return TRUE if $lit1->[1] eq sprintf('%s@', $lit2->[1]); } return FALSE; }, ); sub new { my ($class, %args) = @_; my $self = bless {%args}, $class; while (my ($dt, $code) = each %mapping) { $self->{mapping}{$dt} ||= $code; } $self->{identity_checks} ||= []; push @{ $self->{identity_checks} }, @ichecks; return $self; } } sub force_utc { my ($self) = @_; return $self->{force_utc} if defined $self->{force_utc}; return FALSE; # default } sub mapping { my ($self, $dt) = @_; if (defined $dt) { return $self->{mapping}{$dt}; } return $self->{mapping}; } sub _process_args { my @args = @_; my $self; if (blessed($args[0]) and $args[0]->isa(__PACKAGE__)) { $self = shift @args; } elsif (!ref($args[0]) and $args[0]->isa(__PACKAGE__)) { $self = shift(@args)->new; } else { $self = __PACKAGE__->new; } return ($self, @args); } sub literal_to_perl { my ($self, $lit) = _process_args(@_); my $dt = $lit->literal_datatype; if (!defined $dt) { return RDF::Closure::DatatypeHandling::StringWithLang->new($lit->literal_value, $lit->literal_value_language); } elsif ($dt eq $RDF->PlainLiteral->uri) { if ($lit->literal_value =~ /^(.*)@([^@]*)$/) { return RDF::Closure::DatatypeHandling::StringWithLang->new($1, $2); } return $lit->literal_value; } elsif (defined $self->mapping($dt)) { my $r = $self->mapping($dt)->($lit->literal_value, $self); return defined $r->[1] ? $r->[1] : $r->[0]; } return $lit->literal_value; } sub literal_tuple { my ($self, $lit) = _process_args(@_); my $dt = $lit->literal_datatype; if (!defined $dt) { throw Error::Simple(sprintf('Plain literal language "%s" looks designed to trip me up!', $lit->literal_value_language)) if ($lit->literal_value_language||'') =~ /\@/; return [ 'RDF::Closure::DatatypeTuple::PlainLiteral', sprintf('%s@%s', $lit->literal_value, lc($lit->literal_value_language||'')) ]; } elsif (defined $self->mapping($dt)) { my $r = $self->mapping($dt)->($lit->literal_value, $self); return [ ref($r), "$r" ]; } return [ $dt, $lit->literal_value ]; } sub literal_tuple_safe { my ($self, $lit) = _process_args(@_); return try { return $self->literal_tuple($lit); } catch Error with { return [$lit->literal_datatype, $lit->literal_value]; }; } sub literal_valid { my ($self, $lit) = _process_args(@_); my $r = try { return $self->literal_tuple($lit); } catch Error with { return undef; }; return $r||TRUE if defined $r; return; } sub literal_canonical { my ($self, $lit) = _process_args(@_); if (!$lit->has_datatype) { throw Error::Simple(sprintf('Plain literal language "%s" looks designed to trip me up!', $lit->literal_value_language)) if ($lit->literal_value_language||'') =~ /\@/; return RDF::Trine::Node::Literal->new( sprintf('%s@%s', $lit->literal_value, lc($lit->literal_value_language||'')), undef, $RDF->PlainLiteral->uri, ); } my $dt = $lit->literal_datatype; if (defined $dt and defined $self->mapping($dt)) { return RDF::Trine::Node::Literal->new( $self->mapping($dt)->($lit->literal_value, $self)->to_string, undef, $dt, ); } return $lit; } sub literal_canonical_safe { my ($self, $lit) = _process_args(@_); return try { return $self->literal_canonical($lit); } catch Error with { return $lit; }; } sub literals_identical { my ($self, @args) = _process_args(@_); my ($lit1, $lit2) = map { $self->literal_tuple_safe($_); } @args[0..1]; return [$lit1, $lit2] if ($lit1->[0] eq $lit2->[0] and $lit1->[1] eq $lit2->[1]); ($lit1, $lit2) = sort {$a->[0] cmp $b->[0]} ($lit1, $lit2); foreach my $check (@{ $self->{identity_checks} }) { return [$lit1, $lit2] if $check->($self, $lit1, $lit2); } return; } 1; package RDF::Closure::DatatypeHandling::StringWithLang; use overload '""' => sub { $_[0]->value }; sub new { my ($class, @args) = @_; return bless \@args, $class; } sub value { $_[0]->[0]; } sub lang { lc $_[0]->[1]; } sub trine { RDF::Trine::Node::Literal->new($_[0]->value, $_[0]->lang); } sub lang_range_check { my ($self, $range) = @_; my $lang = $self->lang; $range =~ s/\s//g; $lang =~ s/\s//g; my $match = sub { my ($r, $l) = @_; return ($r eq '*' || $r eq $l); }; my @range = split /\-/, lc $range; my @lang = split /\-/, lc $lang; return unless $match->($range[0], $lang[0]); my $rI = 1; my $rL = 1; LOOP: while ($rI < scalar(@range)) { if ($range[$rI] eq '*') { $rI++; next LOOP; } if ($rL >= scalar(@lang)) { return; } if ($match->($range[$rI], $lang[$rL])) { $rI++; $rL++; next LOOP; } if (length($lang[$rL]) == 1) { return; } $rL++; } return 1; } 1; =head1 NAME RDF::Closure::DatatypeHandling - validate and canonicalise typed literals =head1 ANALOGOUS PYTHON RDFClosure/DatatypeHandling.py =head1 DESCRIPTION Provides datatype handling functions for OWL 2 RL and RDFS datatypes. =head2 Functional Interface This module can export four functions: =over =item * C<< literal_canonical($lit) >> Given an RDF::Trine::Node::Literal, returns a literal with the canonical lexical value for its given datatype. If the literal is not a valid lexical form for its datatype throws an L. If the literal is a plain literal, returns an rdf:PlainLiteral typed literal; if the literal is of an unrecognised datatype, simply returns the original literal. Note that as per OWL 2 RL rules, xsd:dateTime literals are I shifted to UTC, even though XSD says that UTC is the canonical form. By setting the C<< force_utc >> to true, you can force XSD-style canonicalisation. (See the object-oriented interface.) =item * C<< literal_canonical_safe($lit) >> As per C, but in the case where a literal is not a valid lexical form, simply returns the original literal. =item * C<< literal_valid($lit) >> Returns true iff the literal is a valid lexical form for its datatype. An example of an invalid literal might be: "2011-02-29"^^xsd:date =item * C<< literals_identical($lit1, $lit2) >> Returns true iff the two literals are identical according to OWL 2 RL. Here are some example pairs that are identical: # integers and decimals are drawn from the same pool of values "1.000"^^xsd:decimal "1"^^xsd:integer # different ways of writing the same datetime "2010-01-01T12:00:00.000Z"^^xsd:dateTime "2010-01-01T12:00:00+00:00"^^xsd:dateTime Here are some example literals that are not identical: # floats and decimals are drawn from different pools of values "1.000"^^xsd:float "1"^^xsd:integer # according to OWL 2 these are "equal but not identical". "2010-01-01T12:00:00+00:00"^^xsd:dateTime "2010-01-01T11:00:00-01:00"^^xsd:dateTime This latter example is affected by C<< force_utc >>. =item * C<< literal_to_perl($lit) >> Returns a scalar value for the literal, or an appropriate object with overloaded operators (e.g. L, L). =back Variables C<$RDF>, C<$RDFS>, C<$OWL> and C<$XSD> may also be exported as a convenience. These are L objects. Don't modify them. =head2 Object-Oriented Interface use RDF::Trine; use RDF::Closure::DatatypeHandling qw[$XSD]; my $lit = RDF::Trine::Node::Literal->new( "2010-01-01T11:00:00-01:00", undef, $XSD->dateTime); my $handler = RDF::Closure::DatatypeHandling->new(force_utc => 1); print $handler->literal_canonical($lit)->as_ntriples; =head1 SEE ALSO L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2008-2011 Ivan Herman Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/lib/RDF/Closure.pm0000644000076400007640000001262611773064025015032 0ustar taitaipackage RDF::Closure; use 5.008; use strict; use utf8; use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use RDF::Trine::Parser::OwlFn qw[]; use RDF::Closure::Engine qw[]; use RDF::Closure::Model qw[]; use Scalar::Util qw[]; eval { require RDF::Trine }; our @ISA = qw(RDF::Trine); use constant FLT_NONRDF => 1; use constant FLT_BORING => 2; our $VERSION = '0.001'; our @EXPORT_OK; BEGIN { @EXPORT_OK = (@RDF::Trine::EXPORT_OK, qw[mk_filter FLT_NONRDF FLT_BORING $RDF $RDFS $OWL $XSD]); } sub mk_filter { my ($conditions, $boring_contexts) = @_; $boring_contexts = [$boring_contexts] unless ref $boring_contexts eq 'ARRAY'; return sub { my ($st) = @_; if ($conditions & FLT_NONRDF) { return 0 unless $st->rdf_compatible; } return 0 if grep { $st->context->equal($_) } @$boring_contexts; if ($conditions & FLT_BORING) { return 0 if $st->subject->equal($st->object) && { $OWL->sameAs->uri => 1, $OWL->equivalentProperty->uri => 1, $OWL->equivalentClass->uri => 1, $RDFS->subPropertyOf->uri => 1, $RDFS->subClassOf->uri => 1, }->{$st->predicate->uri}; my @nodes = $st->nodes; foreach my $node (@nodes[0..2]) { return 1 unless in_namespace($node, $RDF) || in_namespace($node, $RDFS) || in_namespace($node, $OWL) || in_namespace($node, $XSD); } return 0; } return 1; }; } sub in_namespace { my ($node, $ns) = @_; return 0 if Scalar::Util::blessed($node) && !$node->is_resource; my $ns_str = $ns->uri('')->uri; my $node_substr = substr($node->uri, 0, length $ns_str); return ($node_substr eq $ns_str); } 1; =head1 NAME RDF::Closure - pure Perl RDF inferencing =head1 SYNOPSIS use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $data = iri('http://bloggs.example.com/foaf.rdf'); my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $model = RDF::Trine::Model->temporary_model; my $p = 'RDF::Trine::Parser'; $p->parse_url_into_model($data->uri, $model, context => $data->uri); $p->parse_url_into_model($foaf->uri, $model, context => $foaf->uri); my $cl = RDF::Closure::Engine->new('rdfs', $model); $cl->closure; my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $output = &sgrep($filter, $model->as_stream); print RDF::Trine::Serializer ->new('RDFXML') ->serialize_iterator_to_string($output); =head1 DESCRIPTION This distribution is a pure Perl RDF inference engine designed as an add-in for L. It is largely a port of Ivan Herman's Python RDFClosure library, though there has been some restructuing, and there are a few extras thrown in. Where one of the Perl modules has a direct equivalent in Ivan's library, this is noted in the POD. =head2 Functions This package inherits from L and exports the same functions, plus: =over =item * C<< mk_filter($basic_filters, $ignore_contexts) >> Creates a filter (coderef) suitable for use with C from L. C<$basic_filters> is an integer which can be assembled by bitwise-OR-ing the constants C and C. C<$ignore_contexts> is an arrayref of L objects, each of which represents a context that should be filtered out. use RDF::Trine::Iterator qw[sgrep]; use RDF::Closure qw[iri mk_filter FLT_NONRDF FLT_BORING]; my $foaf = iri('http://xmlns.com/foaf/0.1/index.rdf'); my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$foaf]); my $remaining = &sgrep($filter, $model->as_stream); # $remaining is now an iterator which will return all triples # from $model except: those in the FOAF named graph, those which # are non-RDF (e.g. literal subject) and those which are boring. Which triples are boring? Any triple of the form { ?x owl:sameAs ?x .}, { ?x owl:equivalentProperty ?x .}, { ?x owl:equivalentClass ?x .}, { ?x rdfs:subPropertyOf ?x .} or { ?x rdfs:subClassOf ?x .} is boring (i.e. where these statements have the same term in subject and object position). Any triple where the subject, predicate and object nodes are all in the RDF, RDFS, OWL or XSD namespaces is boring. Other triples are not boring. =back For convenience, C also exports variables called C<$RDF>, C<$RDFS>, C<$OWL> and C<$XSD> which are L objects. =head1 SEE ALSO L, L, L. L, L. L. L. =head1 AUTHOR Toby Inkster Etobyink@cpan.orgE. =head1 COPYRIGHT Copyright 2011-2012 Toby Inkster This library is free software; you can redistribute it and/or modify it under any of the following licences: =over =item * The Artistic License 1.0 L. =item * The GNU General Public License Version 1 L, or (at your option) any later version. =item * The W3C Software Notice and License L. =item * The Clarified Artistic License L. =back =head1 DISCLAIMER OF WARRANTIES THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. =cut RDF-Closure-0.001/TODO0000644000076400007640000000067111663406017012363 0ustar taitaiTODO: * Restricted datatypes (Ivan's RDFClosure/RestrictedDatatype.py) I don't plan on writing the following myself but would accept patches for: * Manchester syntax parser * OWL/XML parser * OwlFn, Manchester, OWL/XML serialisers - OwlFn serialiser is now in OWL::DirectSemantics. Ideas for separate packages: * OWL API * Wrappers for external reasoning tools * A log:implies engine and perhaps some other parts of Notation 3 logic. RDF-Closure-0.001/MANIFEST0000644000076400007640000000273411773065331013030 0ustar taitaiChanges examples/example1.pl examples/example2.pl examples/example3.pl examples/example4.pl FAQ inc/Module/AutoInstall.pm inc/Module/Install.pm inc/Module/Install/AutoInstall.pm inc/Module/Install/AutoManifest.pm inc/Module/Install/Base.pm inc/Module/Install/Can.pm inc/Module/Install/Fetch.pm inc/Module/Install/Include.pm inc/Module/Install/Makefile.pm inc/Module/Install/Metadata.pm inc/Module/Install/Package.pm inc/Module/Install/TrustMetaYml.pm inc/Module/Install/Win32.pm inc/Module/Install/WriteAll.pm inc/Module/Package.pm inc/Module/Package/Dist/RDF.pm inc/Scalar/Util.pm inc/Scalar/Util/PP.pm inc/unicore/Name.pm inc/YAML/Tiny.pm lib/RDF/Closure.pm lib/RDF/Closure/AxiomaticTriples.pm lib/RDF/Closure/DatatypeHandling.pm lib/RDF/Closure/DatatypeTuple.pm lib/RDF/Closure/Engine.pm lib/RDF/Closure/Engine/Core.pm lib/RDF/Closure/Engine/OWL2Plus.pm lib/RDF/Closure/Engine/OWL2RL.pm lib/RDF/Closure/Engine/RDFS.pm lib/RDF/Closure/Model.pm lib/RDF/Closure/RestrictedDatatype.pm lib/RDF/Closure/Rule/Core.pm lib/RDF/Closure/Rule/PatternMatcher.pm lib/RDF/Closure/Rule/Programmatic.pm lib/RDF/Closure/Rule/StatementMatcher.pm lib/RDF/Closure/XsdDatatypes.pm lib/RDF/Trine/Parser/OwlFn.pm lib/RDF/Trine/Parser/OwlFn/Compiled.pm lib/RDF/Trine/Parser/OwlFn/Grammar.pm LICENSE Makefile.PL MANIFEST This list of files META.yml meta/changes.ttl meta/doap.ttl meta/makefile.ttl README t/01basic.t t/02reasoning.t TODO SIGNATURE Public-key signature (added by MakeMaker) RDF-Closure-0.001/SIGNATURE0000644000076400007640000001114011773065331013152 0ustar taitaiThis file contains message digests of all files listed in MANIFEST, signed via the Module::Signature module, version 0.68. To verify the content in this distribution, first make sure you have Module::Signature installed, then type: % cpansign -v It will check each file's integrity, as well as the signature's validity. If "==> Signature verified OK! <==" is not displayed, the distribution may already have been compromised, and you should not run its Makefile.PL or Build.PL. -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 SHA1 72f937756f1c81559e59d75b3f559244377c7100 Changes SHA1 312faf783b79d16d29a70e4b02c7b5275ba626f9 FAQ SHA1 4f8f74883c875ac16791b355c07f58294743ab76 LICENSE SHA1 3a66056457bda30b3fca2b8bd4aa00ff60fa382c MANIFEST SHA1 9efc1ea5f6a65be2d9527d5bf7b8372c6ccba20f META.yml SHA1 84366cd3811e570bb1c9e29f2990e5a0dc8601eb Makefile.PL SHA1 35f82ffaf7c63a7d429fe0548ee11236dda95674 README SHA1 9817bf2199af0d0dcc9fb2de82a275169308afd2 TODO SHA1 c1273d93f06ab4f7d0849153a8295758ec21198c examples/example1.pl SHA1 d5bc1451f8119bc2eba477cc805ec0fce58c7d00 examples/example2.pl SHA1 bc34fd41b265edf3dbe503d4aaa1985bac677a33 examples/example3.pl SHA1 f046d946a6c2644133c534c3437b123ebed0379e examples/example4.pl SHA1 06c410f05488c1612ed66b06d3a86b2580581e4a inc/Module/AutoInstall.pm SHA1 8a924add836b60fb23b25c8506d45945e02f42f4 inc/Module/Install.pm SHA1 61ab1dd37e33ddbe155907ce51df8a3e56ac8bbf inc/Module/Install/AutoInstall.pm SHA1 c04f94f91fa97b9f8cfb5a36071098ab0e6c78e3 inc/Module/Install/AutoManifest.pm SHA1 2d0fad3bf255f8c1e7e1e34eafccc4f595603ddc inc/Module/Install/Base.pm SHA1 f0e01fff7d73cd145fbf22331579918d4628ddb0 inc/Module/Install/Can.pm SHA1 7328966e4fda0c8451a6d3850704da0b84ac1540 inc/Module/Install/Fetch.pm SHA1 66d3d335a03492583a3be121a7d888f63f08412c inc/Module/Install/Include.pm SHA1 b62ca5e2d58fa66766ccf4d64574f9e1a2250b34 inc/Module/Install/Makefile.pm SHA1 1aa925be410bb3bfcd84a16985921f66073cc1d2 inc/Module/Install/Metadata.pm SHA1 3b9281ddf7dd6d6f5de0a9642c69333023193c80 inc/Module/Install/Package.pm SHA1 b86d0385e10881db680d28bde94f275e49e34a27 inc/Module/Install/TrustMetaYml.pm SHA1 e4196994fa75e98bdfa2be0bdeeffef66de88171 inc/Module/Install/Win32.pm SHA1 c3a6d0d5b84feb3280622e9599e86247d58b0d18 inc/Module/Install/WriteAll.pm SHA1 26d58a041cd6b3d21db98b32e8fd1841aae21204 inc/Module/Package.pm SHA1 6b807287940754cc31a3db59f2b22e363d5525be inc/Module/Package/Dist/RDF.pm SHA1 e31c281782183601e1e057c5914f63269e043932 inc/Scalar/Util.pm SHA1 5eae2f71c45a996a296d2445b18d0589307111f0 inc/Scalar/Util/PP.pm SHA1 feb933cefe2e3762e8322bd6071a2499f3440da1 inc/YAML/Tiny.pm SHA1 8105c0510a773b56840995fb4dd2dc64fe9ddaee inc/unicore/Name.pm SHA1 e4b486823884918f33e61a7c435c9c9c88684d48 lib/RDF/Closure.pm SHA1 36c56cd4123944b6b788a54d4710392a3836a232 lib/RDF/Closure/AxiomaticTriples.pm SHA1 7758889f87006e0b675bd7432e480d1eb5b5d1e1 lib/RDF/Closure/DatatypeHandling.pm SHA1 02e766a4a9795481bf5e26a22e0e0fa296f715bb lib/RDF/Closure/DatatypeTuple.pm SHA1 577722e6971029bdbf2dfb688d1c1255788014ae lib/RDF/Closure/Engine.pm SHA1 f7f8a7f07c0d99a6fcd2649d40e4c17f80d83265 lib/RDF/Closure/Engine/Core.pm SHA1 1fc0bacd85496ec183ac4e602b4b78fc75be6a46 lib/RDF/Closure/Engine/OWL2Plus.pm SHA1 6481f32949a32446b2c8f52a9727a1ab947e05fc lib/RDF/Closure/Engine/OWL2RL.pm SHA1 6eba267368ffe4c3f985af144a011e55354bb042 lib/RDF/Closure/Engine/RDFS.pm SHA1 8324f970ec8097fe668a486d533a2eb6c658f8e1 lib/RDF/Closure/Model.pm SHA1 8b927d6b999717c2aedfc353519110aa5f91ed77 lib/RDF/Closure/RestrictedDatatype.pm SHA1 ffb098753cdcbb4ba6fa8df96cefbc1470ae6ac2 lib/RDF/Closure/Rule/Core.pm SHA1 195780ab603c049f82c651f919e14df44c25f66b lib/RDF/Closure/Rule/PatternMatcher.pm SHA1 02f0b651b70fc4e43b553a67e9fd176ebd9ded05 lib/RDF/Closure/Rule/Programmatic.pm SHA1 ded6b2ff5e3ea6496089d2ff28c3b3574f2472cc lib/RDF/Closure/Rule/StatementMatcher.pm SHA1 bce1116548e24359943815db6fcc878801d07707 lib/RDF/Closure/XsdDatatypes.pm SHA1 1024f87c138b97a787f4a9a4b230b0a5ff24cb2a lib/RDF/Trine/Parser/OwlFn.pm SHA1 ff69d76eadb6cb619e7c6114e978b2dfb9fd49df lib/RDF/Trine/Parser/OwlFn/Compiled.pm SHA1 ec5236ffa0cd330a0cb0dcfe8b9ad45fafd0f798 lib/RDF/Trine/Parser/OwlFn/Grammar.pm SHA1 dafd2bf54541341e5d48fd277c83cdd860c713fe meta/changes.ttl SHA1 12a1aa6e02d5d999e7c1bde69ce263770e382fae meta/doap.ttl SHA1 d53bd5257ccec809ddf3ffc848aba6e04ae7533d meta/makefile.ttl SHA1 6e7a7677f8d4e6bd2bb1765ffc81aa3fbebe2da4 t/01basic.t SHA1 bcde620e09301de175de2f5cbe9507d5c19a8cbf t/02reasoning.t -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk/satkACgkQzr+BKGoqfTn01wCfV+b2bbp43aX2DnrE7OAi1E/S KvAAn0OwdXd0X3NNNZY10Nn0WFBvZhQJ =W2WS -----END PGP SIGNATURE----- RDF-Closure-0.001/LICENSE0000644000076400007640000004401311773064336012704 0ustar taitaiThis software is copyright (c) 2012 by Ivan Herman, Toby Inkster . This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Terms of the Perl programming language system itself a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" --- The GNU General Public License, Version 1, February 1989 --- This software is Copyright (c) 2012 by Ivan Herman, Toby Inkster . This is free software, licensed under: The GNU General Public License, Version 1, February 1989 GNU GENERAL PUBLIC LICENSE Version 1, February 1989 Copyright (C) 1989 Free Software Foundation, Inc. 51 Franklin St, Suite 500, Boston, MA 02110-1335 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The license agreements of most software companies try to keep users at the mercy of those companies. By contrast, our General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. The General Public License applies to the Free Software Foundation's software and to any other program whose authors commit to using it. You can use it for your programs, too. When we speak of free software, we are referring to freedom, not price. Specifically, the General Public License is designed to make sure that you have the freedom to give away or sell copies of free software, that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of a such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must tell them their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any work containing the Program or a portion of it, either verbatim or with modifications. Each licensee is addressed as "you". 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this General Public License and to the absence of any warranty; and give any other recipients of the Program a copy of this General Public License along with the Program. You may charge a fee for the physical act of transferring a copy. 2. You may modify your copy or copies of the Program or any portion of it, and copy and distribute such modifications under the terms of Paragraph 1 above, provided that you also do the following: a) cause the modified files to carry prominent notices stating that you changed the files and the date of any change; and b) cause the whole of any work that you distribute or publish, that in whole or in part contains the Program or any part thereof, either with or without modifications, to be licensed at no charge to all third parties under the terms of this General Public License (except that you may choose to grant warranty protection to some or all third parties, at your option). c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the simplest and most usual way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this General Public License. d) You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. Mere aggregation of another independent work with the Program (or its derivative) on a volume of a storage or distribution medium does not bring the other work under the scope of these terms. 3. You may copy and distribute the Program (or a portion or derivative of it, under Paragraph 2) in object code or executable form under the terms of Paragraphs 1 and 2 above provided that you also do one of the following: a) accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Paragraphs 1 and 2 above; or, b) accompany it with a written offer, valid for at least three years, to give any third party free (except for a nominal charge for the cost of distribution) a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Paragraphs 1 and 2 above; or, c) accompany it with the information you received as to where the corresponding source code may be obtained. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form alone.) Source code for a work means the preferred form of the work for making modifications to it. For an executable file, complete source code means all the source code for all modules it contains; but, as a special exception, it need not include source code for modules which are standard libraries that accompany the operating system on which the executable file runs, or for standard header files or definitions files that accompany that operating system. 4. You may not copy, modify, sublicense, distribute or transfer the Program except as expressly provided under this General Public License. Any attempt otherwise to copy, modify, sublicense, distribute or transfer the Program is void, and will automatically terminate your rights to use the Program under this License. However, parties who have received copies, or rights to use copies, from you under this General Public License will not have their licenses terminated so long as such parties remain in full compliance. 5. By copying, distributing or modifying the Program (or any work based on the Program) you indicate your acceptance of this license to do so, and all its terms and conditions. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. 7. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of the license which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the license, you may choose any version ever published by the Free Software Foundation. 8. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 10. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to humanity, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19xx name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (a program to direct compilers to make passes at assemblers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice That's all there is to it! --- The Artistic License 1.0 --- This software is Copyright (c) 2012 by Ivan Herman, Toby Inkster . This is free software, licensed under: The Artistic License 1.0 The Artistic License Preamble The intent of this document is to state the conditions under which a Package may be copied, such that the Copyright Holder maintains some semblance of artistic control over the development of the package, while giving the users of the package the right to use and distribute the Package in a more-or-less customary fashion, plus the right to make reasonable modifications. Definitions: - "Package" refers to the collection of files distributed by the Copyright Holder, and derivatives of that collection of files created through textual modification. - "Standard Version" refers to such a Package if it has not been modified, or has been modified in accordance with the wishes of the Copyright Holder. - "Copyright Holder" is whoever is named in the copyright or copyrights for the package. - "You" is you, if you're thinking about copying or distributing this Package. - "Reasonable copying fee" is whatever you can justify on the basis of media cost, duplication charges, time of people involved, and so on. (You will not be required to justify it to the Copyright Holder, but only to the computing community at large as a market that must bear the fee.) - "Freely Available" means that no fee is charged for the item itself, though there may be fees involved in handling the item. It also means that recipients of the item may redistribute it under the same conditions they received it. 1. You may make and give away verbatim copies of the source form of the Standard Version of this Package without restriction, provided that you duplicate all of the original copyright notices and associated disclaimers. 2. You may apply bug fixes, portability fixes and other modifications derived from the Public Domain or from the Copyright Holder. A Package modified in such a way shall still be considered the Standard Version. 3. You may otherwise modify your copy of this Package in any way, provided that you insert a prominent notice in each changed file stating how and when you changed that file, and provided that you do at least ONE of the following: a) place your modifications in the Public Domain or otherwise make them Freely Available, such as by posting said modifications to Usenet or an equivalent medium, or placing the modifications on a major archive site such as ftp.uu.net, or by allowing the Copyright Holder to include your modifications in the Standard Version of the Package. b) use the modified Package only within your corporation or organization. c) rename any non-standard executables so the names do not conflict with standard executables, which must also be provided, and provide a separate manual page for each non-standard executable that clearly documents how it differs from the Standard Version. d) make other distribution arrangements with the Copyright Holder. 4. You may distribute the programs of this Package in object code or executable form, provided that you do at least ONE of the following: a) distribute a Standard Version of the executables and library files, together with instructions (in the manual page or equivalent) on where to get the Standard Version. b) accompany the distribution with the machine-readable source of the Package with your modifications. c) accompany any non-standard executables with their corresponding Standard Version executables, giving the non-standard executables non-standard names, and clearly documenting the differences in manual pages (or equivalent), together with instructions on where to get the Standard Version. d) make other distribution arrangements with the Copyright Holder. 5. You may charge a reasonable copying fee for any distribution of this Package. You may charge any fee you choose for support of this Package. You may not charge a fee for this Package itself. However, you may distribute this Package in aggregate with other (possibly commercial) programs as part of a larger (possibly commercial) software distribution provided that you do not advertise this Package as a product of your own. 6. The scripts and library files supplied as input to or produced as output from the programs of this Package do not automatically fall under the copyright of this Package, but belong to whomever generated them, and may be sold commercially, and may be aggregated with this Package. 7. C or perl subroutines supplied by you and linked into this Package shall not be considered part of this Package. 8. The name of the Copyright Holder may not be used to endorse or promote products derived from this software without specific prior written permission. 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. The End RDF-Closure-0.001/examples/0000755000076400007640000000000011773065330013506 5ustar taitaiRDF-Closure-0.001/examples/example4.pl0000644000076400007640000000202611663406017015561 0ustar taitaiuse lib "lib"; use RDF::Trine qw[iri literal]; use RDF::Closure::RestrictedDatatype; use RDF::Closure qw[$XSD $RDF $RDFS $OWL]; my $rdt1 = RDF::Closure::RestrictedDatatype->new( 'http://example.com/lownum', $XSD->integer->uri, [ [ $XSD->minInclusive, literal(0, undef, $XSD->integer->uri) ], [ $XSD->maxExclusive, literal(10, undef, $XSD->integer->uri) ], ], ); my $test1 = literal(10, undef, $XSD->integer->uri); print $rdt1->check($test1) ? "Pass\n" : "Fail\n"; my $rdt2 = RDF::Closure::RestrictedDatatype->new( 'http://example.com/mystring', $RDF->PlainLiteral->uri, [ [ $XSD->minLength, literal(4, undef, $XSD->integer->uri) ], [ $XSD->maxLength, literal(10, undef, $XSD->integer->uri) ], [ $XSD->pattern, literal('^[Hh]ello$', undef, $XSD->regexp->uri) ], [ $RDF->langRange, literal('en-gb', undef, $XSD->lang->uri) ], [ $RDF->langRange, literal('en-*-oed', undef, $XSD->lang->uri) ], ], ); my $test2 = literal('Hello@en-gb-oed', undef, $RDF->PlainLiteral->uri); print $rdt2->check($test2) ? "Pass\n" : "Fail\n"; RDF-Closure-0.001/examples/example1.pl0000644000076400007640000000462211663406017015562 0ustar taitaiuse lib "lib"; use RDF::Trine::Iterator qw[sgrep]; use RDF::TrineShortcuts; use RDF::Closure qw[mk_filter FLT_BORING FLT_NONRDF]; my $g = rdf_parse(<<'TURTLE', type=>'turtle'); @prefix rdf: . @prefix rdfs: . @prefix owl: . @prefix xsd: . @prefix ex: . ex:son rdfs:subPropertyOf ex:child ; rdfs:range ex:Male . ex:Alice rdfs:label "Alice"^^xsd:string ; ex:son ex:Bob . ex:Robert owl:sameAs ex:Bob ; rdfs:label "Robert"^^xsd:string . ex:Bob rdfs:label "Robert" . ex:child a owl:AsymmetricProperty ; rdfs:domain ex:Person ; rdfs:range ex:Person . ex:Carol ex:child ex:Dave . ex:Dave ex:child ex:Carol . ex:grandchild owl:propertyChainAxiom (ex:child ex:child) . ex:child rdfs:subPropertyOf ex:descendent . ex:descendent a owl:TransitiveProperty . ex:Bob ex:child ex:Fey . ex:parent owl:inverseOf ex:child ; rdfs:domain ex:Person ; rdfs:range ex:Person . ex:Robert ex:mother ex:Ali , ex:Alice . ex:mother rdfs:subPropertyOf ex:parent ; rdfs:range ex:Female . ex:Person rdfs:subClassOf [ a owl:Restriction; owl:onProperty ex:mother ; owl:maxCardinality 1 ] . # should be able to infer that { ex:Ali owl:sameAs ex:Alice . } ex:Ali ex:age "29"^^xsd:integer , "29.0"^^xsd:decimal , "29/1"^^owl:rational . ex:Person owl:hasKey (ex:forename ex:surname) ; rdfs:subClassOf [ a owl:Restriction ; owl:hasSelf true; owl:onProperty ex:knows ] . ex:Dave ex:forename "David" ; ex:surname "Jones" . ex:David a ex:Person; ex:forename "David" ; ex:surname "Jones" . ex:Robert ex:forename "Bob"^^xsd:string . ex:ShortNamedPerson rdfs:subClassOf ex:Person , [ a owl:Restriction ; owl:onProperty ex:forename ; owl:someValuesFrom [ a rdfs:Datatype ; owl:onDatatype xsd:string ; owl:withRestrictions ( [ xsd:minLength 1 ] [ xsd:maxLength 3 ] ) ] ] . TURTLE my $cl = RDF::Closure::Engine->new('OWL2Plus', $g); $cl->closure; #my $filter = mk_filter(FLT_NONRDF|FLT_BORING, [$cl->{error_context}]); #my $stream = &sgrep($filter, $cl->graph->as_stream); print rdf_string($g => 'turtle', namespaces=>{ rdf => 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', rdfs => 'http://www.w3.org/2000/01/rdf-schema#', owl => 'http://www.w3.org/2002/07/owl#', xsd => 'http://www.w3.org/2001/XMLSchema#', ex => 'http://example.com/', }); RDF-Closure-0.001/examples/example3.pl0000644000076400007640000000046111663406017015561 0ustar taitaiuse Number::Fraction; my $n = 12.48; my $N = _decimalToRational($n); print "$N\n"; sub _decimalToRational { my ($d) = @_; my ($whole, $part) = split /\./, $d; my $numerator = $whole.$part; my $denominator = '1'.('0' x length $part); return Number::Fraction->new($numerator, $denominator); }RDF-Closure-0.001/examples/example2.pl0000644000076400007640000001357111663406017015566 0ustar taitaiuse 5.010; use lib "lib"; use Data::Dumper; use Error qw':try'; use RDF::Trine; # use RDF::Trine::Namespace qw[RDF RDFS OWL XSD]; use RDF::Closure::DatatypeHandling qw[ literal_valid literal_canonical literals_identical literal_tuple $RDF $RDFS $OWL $XSD ]; use RDF::Closure::Engine::OWL2Plus; my $lit1 = RDF::Trine::Node::Literal->new('TrUe', undef, $XSD->boolean->uri); my $lit2 = RDF::Trine::Node::Literal->new('Tre', undef, $XSD->boolean->uri); my $lit3 = RDF::Trine::Node::Literal->new('1', undef, $XSD->boolean->uri); { say RDF::Closure::DatatypeHandling->literal_valid($lit1) ? 'lit1 valid' : 'lit1 invalid'; say literal_valid($lit2) ? 'lit2 valid' : 'lit2 invalid'; } { say literals_identical($lit1, $lit2) ? 'lit1 == lit2' : 'lit1 != lit2'; say literals_identical($lit1, $lit3) ? 'lit1 == lit3' : 'lit1 != lit3'; } { my $plain1 = RDF::Trine::Node::Literal->new('Hello@en-GB', undef, $RDF->PlainLiteral->uri); my $plain2 = RDF::Trine::Node::Literal->new('Hello', 'en-GB', undef); say Dumper( literal_tuple($plain1), literal_tuple($plain2) ); say RDF::Closure::DatatypeHandling->literals_identical($plain1, $plain2) ? 'rdf:PlainLiteral and RDF plain literals are equivalent' : 'Bad fooey'; } { my $dth = RDF::Closure::Engine::OWL2Plus::create_dt_handling(); my $twentynine1 = RDF::Trine::Node::Literal->new('29', undef, $XSD->integer->uri); my $twentynine2 = RDF::Trine::Node::Literal->new('29.000', undef, $XSD->decimal->uri); my $twentynine3 = RDF::Trine::Node::Literal->new('29/1', undef, $OWL->rational->uri); say Dumper( $dth->literal_tuple($twentynine1), $dth->literal_tuple($twentynine2), $dth->literal_tuple($twentynine3) ); say $dth->literals_identical($twentynine1, $twentynine2) ? 'numbers equivalent' : 'Bad fooey times twentynine'; say $dth->literals_identical($twentynine2, $twentynine3) ? 'numbers equivalent' : 'Bad fooey times twentynine'; say $dth->literals_identical($twentynine1, $twentynine3) ? 'numbers equivalent' : 'Bad fooey times twentynine'; } { my $dth = RDF::Closure::Engine::OWL2Plus::create_dt_handling(); my $n1 = RDF::Trine::Node::Literal->new('0.75', undef, $XSD->decimal->uri); my $n2 = RDF::Trine::Node::Literal->new('3/4', undef, $OWL->rational->uri); say Dumper( $dth->literal_tuple($n1), $dth->literal_tuple($n2) ); say $dth->literals_identical($n1, $n2) ? 'rationals equivalent' : 'Bad fooey with rationals'; } { my $dth = RDF::Closure::DatatypeHandling->new; my $n1 = RDF::Trine::Node::Literal->new('0.75', undef, $XSD->decimal->uri); my $n2 = RDF::Trine::Node::Literal->new('3/4', undef, $OWL->rational->uri); say Dumper( $dth->literal_tuple($n1), $dth->literal_tuple($n2) ); say $dth->literals_identical($n1, $n2) ? 'bad fooey - owl:rational should not be supported by default' : 'usually owl:rational is not supported'; } { my $plain1 = RDF::Trine::Node::Literal->new('Hello@', undef, $RDF->PlainLiteral->uri); my $plain2 = RDF::Trine::Node::Literal->new('Hello', undef, undef); my $plain3 = RDF::Trine::Node::Literal->new('Hello', 'en', undef); my $string = RDF::Trine::Node::Literal->new('Hello', undef, $XSD->string); say RDF::Closure::DatatypeHandling->literals_identical($plain1, $string) ? 'rdf:PlainLiteral and strings can be equivalent' : 'Bad fooey'; say RDF::Closure::DatatypeHandling->literals_identical($plain2, $string) ? 'RDF plain literals and strings can be equivalent' : 'Bad fooey'; say !RDF::Closure::DatatypeHandling->literals_identical($plain3, $string) ? '... but not if they have a language tag set!' : 'Bad fooey'; } { my $xml1 = RDF::Trine::Node::Literal->new("", undef, $RDF->XMLLiteral->uri); my $xml2 = RDF::Trine::Node::Literal->new("", undef, $RDF->XMLLiteral->uri); say Dumper( literal_canonical($xml1), literal_canonical($xml2) ); say RDF::Closure::DatatypeHandling->literals_identical($xml1, $xml2) ? 'Canonical XML works' : 'Bad fooey'; } { say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('Hello','en-GB') ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('Hello world',undef, $XSD->token->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('+002001.1230', undef, $XSD->decimal->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('+002001.1230', undef, $XSD->float->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001-01-02T15:00:00.000100+01:00', undef, $XSD->dateTimeStamp->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001-01-02T15:00:00.000100', undef, $XSD->dateTime->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('ZXhhbXBsZQ ', undef, $XSD->base64Binary->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001-01-02', undef, $XSD->date->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001-01-02+07:00', undef, $XSD->date->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001-01', undef, $XSD->gYearMonth->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('2001', undef, $XSD->gYear->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('--01-02', undef, $XSD->gMonthDay->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('--02-29', undef, $XSD->gMonthDay->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('---02Z', undef, $XSD->gDay->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('00:15:00.123456789', undef, $XSD->time->uri) ) ); say Dumper( literal_canonical( RDF::Trine::Node::Literal->new('00:15:00.123456789-02:00', undef, $XSD->time->uri) ) ); } my $lit = RDF::Trine::Node::Literal->new( "2010-01-01T11:00:00-01:00", undef, $XSD->dateTime); my $handler = RDF::Closure::DatatypeHandling->new(force_utc => 1); print $handler->literal_canonical($lit)->as_ntriples; RDF-Closure-0.001/Makefile.PL0000644000076400007640000000005111772721207013637 0ustar taitaiuse inc::Module::Package 'RDF:standard' RDF-Closure-0.001/meta/0000755000076400007640000000000011773065330012616 5ustar taitaiRDF-Closure-0.001/meta/makefile.ttl0000644000076400007640000000143511772776641015140 0ustar taitai# This file provides instructions for packaging. @prefix : . :perl_version_from _:main ; :version_from _:main ; :readme_from _:main ; :requires "Data::UUID" ; :requires "DateTime" ; :requires "DateTime::Format::Strptime"; :requires "DateTime::Format::XSD"; :requires "DateTime::TimeZone"; :requires "Error" ; :requires "Module::Pluggable" ; :requires "namespace::clean" ; :requires "Number::Fraction" ; :requires "Parse::RecDescent" ; :requires "RDF::Trine 0.135" ; :requires "URI" ; :requires "XML::LibXML 1.94" ; :test_requires "Test::RDF 0.24" ; :test_requires "Test::More 0.61" . _:main "lib/RDF/Closure.pm" . RDF-Closure-0.001/meta/doap.ttl0000644000076400007640000000370611772671043014277 0ustar taitai@prefix : . @prefix dcs: . @prefix dc: . @prefix foaf: . @prefix my: . @prefix rdfs: . @prefix toby: . @prefix xsd: . my:project a :Project ; :name "RDF-Closure" ; :shortdesc "pure Perl RDF inferencing"@en ; :programming-language "Perl" ; :homepage ; :download-page ; :bug-database ; rdfs:seeAlso ; :repository [ a :HgRepository ; :browse ] ; :maintainer toby:i ; :developer toby:i , ; :documenter toby:i ; :tester toby:i ; :created "2011-02-23"^^xsd:date ; :license ; :category [ rdfs:label "RDF" ]; :category [ rdfs:label "Reasoning"@en ]; :category [ rdfs:label "Inference"@en ]; :category [ rdfs:label "OWL" ]; :category [ rdfs:label "RDFS" ]; :category [ rdfs:label "Rules"@en ]; :category [ rdfs:label "RL" ]. toby:i a foaf:Person ; foaf:name "Toby Inkster" ; foaf:homepage ; foaf:page ; foaf:mbox ; . a foaf:Person ; foaf:name "Ivan Herman" ; foaf:homepage ; foaf:workplaceHomepage . RDF-Closure-0.001/meta/changes.ttl0000644000076400007640000000560511773063743014767 0ustar taitai@prefix : . @prefix dcs: . @prefix dc: . @prefix foaf: . @prefix my: . @prefix rdfs: . @prefix toby: . @prefix xsd: . my:project :release my:v_0-000_01 . my:v_0-000_01 a :Version ; dc:issued "2011-03-14"^^xsd:date ; :revision "0.000_01"^^xsd:string ; :file-release ; rdfs:label "pi-day preview"@en . my:project :release my:v_0-000_02 . my:v_0-000_02 a :Version ; dc:issued "2011-03-27"^^xsd:date ; :revision "0.000_02"^^xsd:string ; :file-release ; rdfs:label "pre-hackathon release"@en ; dcs:changeset [ dcs:versus my:v_0-000_01 ; dcs:item [ rdfs:label "Implemented some more of OWL2 RL."@en ] ] . my:project :release my:v_0-000_03 . my:v_0-000_03 a :Version ; dc:issued "2011-04-06"^^xsd:date ; :revision "0.000_03"^^xsd:string ; :file-release ; dcs:changeset [ dcs:versus my:v_0-000_02 ; dcs:item [ rdfs:label "Implemented some more of OWL2 RL."@en ] ; dcs:item [ rdfs:label "Some small optimisations."@en ] ] . my:project :release my:v_0-000_04 . my:v_0-000_04 a :Version ; dc:issued "2012-06-27"^^xsd:date ; :revision "0.000_04"^^xsd:string ; :file-release ; dcs:changeset [ dcs:versus my:v_0-000_03 ; dcs:item [ rdfs:label "OWL2 Plus engine"@en; a dcs:Addition ]; dcs:item [ rdfs:label "Drop dependencies on common::sense and parent.pm."@en ]; dcs:item [ rdfs:label "Module::Package::RDF"@en ; a dcs:Packaging ] ] . my:project :release my:v_0-000_05 . my:v_0-000_05 a :Version ; dc:issued "2012-06-28"^^xsd:date ; :revision "0.000_05"^^xsd:string ; :file-release ; dcs:changeset [ dcs:versus my:v_0-000_04 ; dcs:item [ rdfs:label "Fix missing dependency on Test::RDF"@en ; a dcs:Packaging, dcs:Bugfix ] ] . my:project :release my:v_0-001 . my:v_0-001 a :Version ; dc:issued "2012-06-28"^^xsd:date ; :revision "0.001"^^xsd:string ; :file-release ; rdfs:label "First official release!"@en; dcs:changeset [ dcs:versus my:v_0-000_05 ; dcs:item [ rdfs:label "Add FAQ."@en ; a dcs:Documentation ] ] . RDF-Closure-0.001/META.yml0000644000076400007640000000217711773064341013151 0ustar taitai--- abstract: 'pure Perl RDF inferencing' author: - 'Ivan Herman' - 'Toby Inkster ' build_requires: ExtUtils::MakeMaker: 6.59 Test::More: 0.61 Test::RDF: 0.24 configure_requires: ExtUtils::MakeMaker: 6.59 distribution_type: module dynamic_config: 1 generated_by: 'Module::Install version 1.06' keywords: - Inference - OWL - RDF - RDFS - RL - Reasoning - Rules license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: 1.4 module_name: RDF::Closure name: RDF-Closure no_index: directory: - examples - inc - t - xt requires: Data::UUID: 0 DateTime: 0 DateTime::Format::Strptime: 0 DateTime::Format::XSD: 0 DateTime::TimeZone: 0 Error: 0 Module::Pluggable: 0 Number::Fraction: 0 Parse::RecDescent: 0 RDF::Trine: 0.135 URI: 0 XML::LibXML: 1.94 namespace::clean: 0 perl: 5.8.0 resources: bugtracker: http://rt.cpan.org/Dist/Display.html?Queue=RDF-Closure homepage: https://metacpan.org/release/RDF-Closure license: http://dev.perl.org/licenses/ repository: https://bitbucket.org/tobyink/p5-rdf-closure version: 0.001 RDF-Closure-0.001/Changes0000644000076400007640000000135211773064336013171 0ustar taitaiRDF-Closure =========== Created: 2011-02-23 Home page: Bug tracker: Maintainer: Toby Inkster 0.001 2012-06-28 # First official release! - (Documentation) Add FAQ. 0.000_05 2012-06-28 - (Bugfix Packaging) Fix missing dependency on Test::RDF 0.000_04 2012-06-27 - (Addition) OWL2 Plus engine - (Packaging) Module::Package::RDF - Drop dependencies on common::sense and parent.pm. 0.000_03 2011-04-06 - Implemented some more of OWL2 RL. - Some small optimisations. 0.000_02 2011-03-27 # pre-hackathon release - Implemented some more of OWL2 RL. 0.000_01 2011-03-14 # pi-day preview RDF-Closure-0.001/FAQ0000644000076400007640000000011311773063600012213 0ustar taitaiQ: Why is this so bloody slow? A: Dunno. It really is though, isn't it?!!