line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# RDF::Trine::Parser::Turtle::Constants |
2
|
|
|
|
|
|
|
# ----------------------------------------------------------------------------- |
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
RDF::Trine::Parser::Turtle::Constants - Constant definitions for use in parsing Turtle, TriG, and N-Triples |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 VERSION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
This document describes RDF::Trine::Parser::Turtle::Constants version 1.018 |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 SYNOPSIS |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
use RDF::Trine::Parser::Constants; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 METHODS |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=over 4 |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package RDF::Trine::Parser::Turtle::Constants; |
23
|
|
|
|
|
|
|
|
24
|
68
|
|
|
68
|
|
421
|
use strict; |
|
68
|
|
|
|
|
159
|
|
|
68
|
|
|
|
|
1617
|
|
25
|
68
|
|
|
68
|
|
333
|
use warnings; |
|
68
|
|
|
|
|
152
|
|
|
68
|
|
|
|
|
1359
|
|
26
|
68
|
|
|
68
|
|
938
|
use 5.010; |
|
68
|
|
|
|
|
258
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
our $VERSION; |
29
|
|
|
|
|
|
|
our @EXPORT; |
30
|
|
|
|
|
|
|
BEGIN { |
31
|
68
|
|
|
68
|
|
249
|
$VERSION = '1.018'; |
32
|
68
|
|
|
|
|
1582
|
@EXPORT = qw( |
33
|
|
|
|
|
|
|
LBRACKET |
34
|
|
|
|
|
|
|
RBRACKET |
35
|
|
|
|
|
|
|
LPAREN |
36
|
|
|
|
|
|
|
RPAREN |
37
|
|
|
|
|
|
|
DOT |
38
|
|
|
|
|
|
|
SEMICOLON |
39
|
|
|
|
|
|
|
COMMA |
40
|
|
|
|
|
|
|
HATHAT |
41
|
|
|
|
|
|
|
A |
42
|
|
|
|
|
|
|
BOOLEAN |
43
|
|
|
|
|
|
|
PREFIXNAME |
44
|
|
|
|
|
|
|
IRI |
45
|
|
|
|
|
|
|
BNODE |
46
|
|
|
|
|
|
|
DOUBLE |
47
|
|
|
|
|
|
|
DECIMAL |
48
|
|
|
|
|
|
|
INTEGER |
49
|
|
|
|
|
|
|
WS |
50
|
|
|
|
|
|
|
COMMENT |
51
|
|
|
|
|
|
|
STRING3D |
52
|
|
|
|
|
|
|
STRING3S |
53
|
|
|
|
|
|
|
STRING1D |
54
|
|
|
|
|
|
|
STRING1S |
55
|
|
|
|
|
|
|
BASE |
56
|
|
|
|
|
|
|
PREFIX |
57
|
|
|
|
|
|
|
SPARQLBASE |
58
|
|
|
|
|
|
|
SPARQLPREFIX |
59
|
|
|
|
|
|
|
LANG |
60
|
|
|
|
|
|
|
LBRACE |
61
|
|
|
|
|
|
|
RBRACE |
62
|
|
|
|
|
|
|
EQUALS |
63
|
|
|
|
|
|
|
decrypt_constant |
64
|
|
|
|
|
|
|
) |
65
|
|
|
|
|
|
|
}; |
66
|
68
|
|
|
68
|
|
397
|
use base 'Exporter'; |
|
68
|
|
|
|
|
158
|
|
|
68
|
|
|
|
|
7376
|
|
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
{ |
69
|
|
|
|
|
|
|
my %mapping; |
70
|
|
|
|
|
|
|
my %reverse; |
71
|
|
|
|
|
|
|
BEGIN { |
72
|
68
|
|
|
68
|
|
273
|
my $cx = 0; |
73
|
68
|
|
|
|
|
197
|
foreach my $name (grep { $_ ne 'decrypt_constant' } @EXPORT) { |
|
2108
|
|
|
|
|
3489
|
|
74
|
2040
|
|
|
|
|
3002
|
my $value = ++$cx; |
75
|
2040
|
|
|
|
|
4109
|
$reverse{ $value } = $name; |
76
|
2040
|
|
|
|
|
6013
|
$mapping{ $name } = $value; |
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
} |
79
|
68
|
|
|
68
|
|
450
|
use constant +{ %mapping }; |
|
68
|
|
|
|
|
168
|
|
|
68
|
|
|
|
|
19972
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=item C<< decrypt_constant ( $type ) >> |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Returns the token name for the given toke type. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=cut |
86
|
|
|
|
|
|
|
|
87
|
68
|
|
|
68
|
1
|
123
|
sub decrypt_constant { my $num = +shift; $reverse{$num} } |
|
68
|
|
|
|
|
584
|
|
88
|
|
|
|
|
|
|
}; |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
1; |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
__END__ |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=back |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=head1 BUGS |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
Please report any bugs or feature requests to through the GitHub web interface |
99
|
|
|
|
|
|
|
at L<https://github.com/kasei/perlrdf/issues>. |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
=head1 AUTHOR |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
Toby Inkster C<< <tobyink@cpan.org> >> |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head1 COPYRIGHT |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Copyright (c) 2012 Toby Inkster. This |
108
|
|
|
|
|
|
|
program is free software; you can redistribute it and/or modify it under |
109
|
|
|
|
|
|
|
the same terms as Perl itself. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |