File: | blib/lib/CSS/Grammar/Simple.pm |
Coverage: | 100.0% |
line | stmt | bran | cond | sub | time | code |
---|---|---|---|---|---|---|
1 | package CSS::Grammar::Simple; | |||||
2 | ||||||
3 | 1 1 1 | 10 3 8 | use strict; | |||
4 | 1 1 1 | 9 4 9 | use warnings; | |||
5 | ||||||
6 | 1 1 1 | 10 4 8 | use base 'CSS::Grammar'; | |||
7 | ||||||
8 | sub init { | |||||
9 | 1 | 3 | my ($self) = @_; | |||
10 | ||||||
11 | 1 | 4 | $self->{case_insensitive} = 1; | |||
12 | ||||||
13 | 1 | 6 | $self->add_toke_rule('A', "a"); | |||
14 | 1 | 4 | $self->add_toke_rule('B', 'b'); | |||
15 | 1 | 4 | $self->add_toke_rule('C', 'c'); | |||
16 | 1 | 5 | $self->add_toke_rule('D', 'd'); | |||
17 | 1 | 4 | $self->add_toke_rule('E', 'e'); | |||
18 | 1 | 4 | $self->add_toke_rule('F', 'f'); | |||
19 | 1 | 4 | $self->add_toke_rule('G', 'g'); | |||
20 | 1 | 3 | $self->add_toke_rule('H', 'h'); | |||
21 | 1 | 5 | $self->add_toke_rule('I', 'i'); | |||
22 | ||||||
23 | 1 | 6 | $self->add_lex_rule('base', 'A pair+'); | |||
24 | 1 | 4 | $self->add_lex_rule('pair', 'B C'); | |||
25 | ||||||
26 | 1 | 8 | $self->set_base('base'); | |||
27 | } | |||||
28 | ||||||
29 | 1; | |||||
30 |