line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CSS::Parse::Compiled; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
$VERSION = 1.01; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
392
|
use CSS::Parse; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
6
|
|
|
|
|
|
|
@ISA = qw(CSS::Parse); |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
21
|
|
9
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
25
|
|
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
4
|
use Carp qw(croak confess); |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
51
|
|
12
|
|
|
|
|
|
|
|
13
|
1
|
|
|
1
|
|
4
|
use CSS::Style; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
14
|
1
|
|
|
1
|
|
5
|
use CSS::Selector; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
18
|
|
15
|
1
|
|
|
1
|
|
5
|
use CSS::Property; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
16
|
1
|
|
|
1
|
|
4
|
use CSS::Adaptor; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
14
|
|
17
|
|
|
|
|
|
|
|
18
|
1
|
|
|
1
|
|
4364
|
use CSS::Parse::CompiledGrammar; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
175
|
|
19
|
|
|
|
|
|
|
$Parse::RecDescent::skip = ''; |
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
1
|
|
17
|
use Data::Dumper; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
173
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub parse_string { |
24
|
3
|
|
|
3
|
0
|
7
|
my $self = shift; |
25
|
3
|
|
|
|
|
7
|
my $source = shift; |
26
|
|
|
|
|
|
|
|
27
|
3
|
|
|
|
|
22
|
my $parser = CSS::Parse::CompiledGrammar->new(); |
28
|
3
|
|
|
|
|
139
|
$self->{parent}->{styles} = $parser->stylesheet($source); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
CSS::Parse::Compiled - A CSS::Parse module using a compiled Parse::RecDescent grammar |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
use CSS; |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
# Create a css stylesheet |
43
|
|
|
|
|
|
|
my $CSS = CSS->new({'parser' => 'CSS::Parse::Compiled'}); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 DESCRIPTION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This module is a parser for CSS.pm. Read the CSS.pm pod for more details |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 AUTHORS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com> |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L<CSS>, http://www.w3.org/TR/REC-CSS1 |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |
58
|
|
|
|
|
|
|
|