line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Parse::Heavy; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.01; |
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
1310
|
use CSS::Parse; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
6
|
|
|
|
|
|
|
@ISA = qw(CSS::Parse); |
7
|
|
|
|
|
|
|
|
8
|
2
|
|
|
2
|
|
12
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
62
|
|
9
|
2
|
|
|
2
|
|
11
|
use warnings; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
66
|
|
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
12
|
use Carp qw(croak confess); |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
130
|
|
12
|
2
|
|
|
2
|
|
4050
|
use Parse::RecDescent; |
|
2
|
|
|
|
|
105324
|
|
|
2
|
|
|
|
|
16
|
|
13
|
|
|
|
|
|
|
$Parse::RecDescent::skip = ''; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
1629
|
use CSS::Parse::PRDGrammar; |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
54
|
|
16
|
2
|
|
|
2
|
|
11
|
use CSS::Style; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
17
|
2
|
|
|
2
|
|
11
|
use CSS::Selector; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
72
|
|
18
|
2
|
|
|
2
|
|
11
|
use CSS::Property; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
45
|
|
19
|
2
|
|
|
2
|
|
11
|
use CSS::Adaptor; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
47
|
|
20
|
|
|
|
|
|
|
|
21
|
2
|
|
|
2
|
|
11
|
use Data::Dumper; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
310
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub parse_string { |
25
|
3
|
|
|
3
|
0
|
5
|
my $self = shift; |
26
|
3
|
|
|
|
|
6
|
my $source = shift; |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
#$::RD_HINT = 1; |
29
|
|
|
|
|
|
|
#$::RD_TRACE = 1; |
30
|
|
|
|
|
|
|
#$::RD_AUTOACTION = 'use Data::Dumper; print Dumper(@item)."\n";'; |
31
|
3
|
|
|
|
|
7
|
$::RD_AUTOACTION = 'print "token: ".shift @item; print " : @item\n"'; |
32
|
|
|
|
|
|
|
|
33
|
3
|
|
|
|
|
53
|
my $parser = new Parse::RecDescent($CSS::Parse::PRDGrammar::GRAMMAR); |
34
|
3
|
|
|
|
|
1104540
|
$self->{parent}->{styles} = $parser->stylesheet($source); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
__END__ |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
CSS::Parse::Heavy - A CSS::Parse module using Parse::RecDescent |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 SYNOPSIS |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
use CSS; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
# Create a css stylesheet |
49
|
|
|
|
|
|
|
my $CSS = CSS->new({'parser' => 'CSS::Parse::Heavy'}); |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 DESCRIPTION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
This module is a parser for CSS.pm. Read the CSS.pm pod for more details |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHORS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
Copyright (C) 2001-2002, Allen Day <allenday@ucla.edu> |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 SEE ALSO |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
L<CSS>, http://www.w3.org/TR/REC-CSS1 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|