1
1
unit grammar Test::CSS::Aural::Spec::Grammar ;
2
2
# | <angle> | [[ left-side | far-left | left | center-left | center | center-right | right | far-right | right-side ] || behind ] | leftwards | rightwards
3
3
rule decl :sym <azimuth > {;
4
- :i (azimuth) ":" <val (/ <expr = .expr - azimuth > /, & ? ROUTINE . WHY )> }
4
+ :i (azimuth) ":" <val (/<expr = .expr - azimuth > /, & ? ROUTINE . WHY )> }
5
5
rule expr-azimuth { :i <angle > | [[:my @ S ;
6
6
; [[["left-side" | "far-left" | left | "center-left" | center | "center-right" | right | "far-right" | "right-side" ]& <keyw >]]<!{
7
7
@ S [0 ]++
@@ -10,15 +10,15 @@ rule expr-azimuth { :i <angle> | [[:my @S;
10
10
}> ]+ ] | [[leftwards | rightwards ]& <keyw >] }
11
11
# | <uri> | none
12
12
rule decl :sym <cue-after > {;
13
- :i ("cue-after" ) ":" <val (/ <expr = .expr - cue - after > /, & ? ROUTINE . WHY )> }
13
+ :i ("cue-after" ) ":" <val (/<expr = .expr - cue - after > /, & ? ROUTINE . WHY )> }
14
14
rule expr-cue-after { :i <uri > | [none & <keyw >] }
15
15
# | <uri> | none
16
16
rule decl :sym <cue-before > {;
17
- :i ("cue-before" ) ":" <val (/ <expr = .expr - cue - before > /, & ? ROUTINE . WHY )> }
17
+ :i ("cue-before" ) ":" <val (/<expr = .expr - cue - before > /, & ? ROUTINE . WHY )> }
18
18
rule expr-cue-before { :i <uri > | [none & <keyw >] }
19
19
# | [ 'cue-before' || 'cue-after' ]
20
20
rule decl :sym <cue > {;
21
- :i (cue) ":" <val (/ <expr = .expr - cue > /, & ? ROUTINE . WHY )> }
21
+ :i (cue) ":" <val (/<expr = .expr - cue > /, & ? ROUTINE . WHY )> }
22
22
rule expr-cue { :i [[:my @ S ;
23
23
; <expr - cue - before ><!{
24
24
@ S [0 ]++
@@ -27,31 +27,31 @@ rule expr-cue { :i [[:my @S;
27
27
}> ]+ ] }
28
28
# | <angle> | below | level | above | higher | lower
29
29
rule decl :sym <elevation > {;
30
- :i (elevation) ":" <val (/ <expr = .expr - elevation > /, & ? ROUTINE . WHY )> }
30
+ :i (elevation) ":" <val (/<expr = .expr - elevation > /, & ? ROUTINE . WHY )> }
31
31
rule expr-elevation { :i <angle > | [[below | level | above | higher | lower ]& <keyw >] }
32
32
# | [ [<time> | <percentage>]{1,2} ]
33
33
rule decl :sym <pause > {;
34
- :i (pause) ":" <val (/ <expr = .expr - pause > /, & ? ROUTINE . WHY )> }
34
+ :i (pause) ":" <val (/<expr = .expr - pause > /, & ? ROUTINE . WHY )> }
35
35
rule expr-pause { :i [[<time > | <percentage > ]** 1.. 2] }
36
36
# | <time> | <percentage>
37
37
rule decl :sym <pause-after > {;
38
- :i ("pause-after" ) ":" <val (/ <expr = .expr - pause - after > /, & ? ROUTINE . WHY )> }
38
+ :i ("pause-after" ) ":" <val (/<expr = .expr - pause - after > /, & ? ROUTINE . WHY )> }
39
39
rule expr-pause-after { :i <time > | <percentage > }
40
40
# | <time> | <percentage>
41
41
rule decl :sym <pause-before > {;
42
- :i ("pause-before" ) ":" <val (/ <expr = .expr - pause - before > /, & ? ROUTINE . WHY )> }
42
+ :i ("pause-before" ) ":" <val (/<expr = .expr - pause - before > /, & ? ROUTINE . WHY )> }
43
43
rule expr-pause-before { :i <time > | <percentage > }
44
44
# | <number>
45
45
rule decl :sym <pitch-range > {;
46
- :i ("pitch-range" ) ":" <val (/ <expr = .expr - pitch - range > /, & ? ROUTINE . WHY )> }
46
+ :i ("pitch-range" ) ":" <val (/<expr = .expr - pitch - range > /, & ? ROUTINE . WHY )> }
47
47
rule expr-pitch-range { :i <number > }
48
48
# | <frequency> | x-low | low | medium | high | x-high
49
49
rule decl :sym <pitch > {;
50
- :i (pitch) ":" <val (/ <expr = .expr - pitch > /, & ? ROUTINE . WHY )> }
50
+ :i (pitch) ":" <val (/<expr = .expr - pitch > /, & ? ROUTINE . WHY )> }
51
51
rule expr-pitch { :i <frequency > | [["x-low" | low | medium | high | "x-high" ]& <keyw >] }
52
52
# | <uri> [ mix || repeat ]? | auto | none
53
53
rule decl :sym <play-during > {;
54
- :i ("play-during" ) ":" <val (/ <expr = .expr - play - during > /, & ? ROUTINE . WHY )> }
54
+ :i ("play-during" ) ":" <val (/<expr = .expr - play - during > /, & ? ROUTINE . WHY )> }
55
55
rule expr-play-during { :i <uri > [[:my @ S ;
56
56
; [mix & <keyw >]<!{
57
57
@ S [0 ]++
@@ -60,35 +60,35 @@ rule expr-play-during { :i <uri> [[:my @S;
60
60
}> ]+ ]? | [[auto | none ]& <keyw >] }
61
61
# | <number>
62
62
rule decl :sym <richness > {;
63
- :i (richness) ":" <val (/ <expr = .expr - richness > /, & ? ROUTINE . WHY )> }
63
+ :i (richness) ":" <val (/<expr = .expr - richness > /, & ? ROUTINE . WHY )> }
64
64
rule expr-richness { :i <number > }
65
65
# | normal | none | spell-out
66
66
rule decl :sym <speak > {;
67
- :i (speak) ":" <val (/ <expr = .expr - speak > /, & ? ROUTINE . WHY )> }
67
+ :i (speak) ":" <val (/<expr = .expr - speak > /, & ? ROUTINE . WHY )> }
68
68
rule expr-speak { :i [[normal | none | "spell-out" ]& <keyw >] }
69
69
# | once | always
70
70
rule decl :sym <speak-header > {;
71
- :i ("speak-header" ) ":" <val (/ <expr = .expr - speak - header > /, & ? ROUTINE . WHY )> }
71
+ :i ("speak-header" ) ":" <val (/<expr = .expr - speak - header > /, & ? ROUTINE . WHY )> }
72
72
rule expr-speak-header { :i [[once | always ]& <keyw >] }
73
73
# | digits | continuous
74
74
rule decl :sym <speak-numeral > {;
75
- :i ("speak-numeral" ) ":" <val (/ <expr = .expr - speak - numeral > /, & ? ROUTINE . WHY )> }
75
+ :i ("speak-numeral" ) ":" <val (/<expr = .expr - speak - numeral > /, & ? ROUTINE . WHY )> }
76
76
rule expr-speak-numeral { :i [[digits | continuous ]& <keyw >] }
77
77
# | code | none
78
78
rule decl :sym <speak-punctuation > {;
79
- :i ("speak-punctuation" ) ":" <val (/ <expr = .expr - speak - punctuation > /, & ? ROUTINE . WHY )> }
79
+ :i ("speak-punctuation" ) ":" <val (/<expr = .expr - speak - punctuation > /, & ? ROUTINE . WHY )> }
80
80
rule expr-speak-punctuation { :i [[code | none ]& <keyw >] }
81
81
# | <number> | x-slow | slow | medium | fast | x-fast | faster | slower
82
82
rule decl :sym <speech-rate > {;
83
- :i ("speech-rate" ) ":" <val (/ <expr = .expr - speech - rate > /, & ? ROUTINE . WHY )> }
83
+ :i ("speech-rate" ) ":" <val (/<expr = .expr - speech - rate > /, & ? ROUTINE . WHY )> }
84
84
rule expr-speech-rate { :i <number > | [["x-slow" | slow | medium | fast | "x-fast" | faster | slower ]& <keyw >] }
85
85
# | <number>
86
86
rule decl :sym <stress > {;
87
- :i (stress) ":" <val (/ <expr = .expr - stress > /, & ? ROUTINE . WHY )> }
87
+ :i (stress) ":" <val (/<expr = .expr - stress > /, & ? ROUTINE . WHY )> }
88
88
rule expr-stress { :i <number > }
89
89
# | [<generic-voice> | <specific-voice> ]#
90
90
rule decl :sym <voice-family > {;
91
- :i ("voice-family" ) ":" <val (/ <expr = .expr - voice - family > /, & ? ROUTINE . WHY )> }
91
+ :i ("voice-family" ) ":" <val (/<expr = .expr - voice - family > /, & ? ROUTINE . WHY )> }
92
92
rule expr-voice-family { :i [<generic - voice > | <specific - voice > ]+% <op (" ," )> }
93
93
# | male | female | child
94
94
rule generic-voice {;
@@ -98,25 +98,25 @@ rule specific-voice {;
98
98
:i <identifier > | <string > }
99
99
# | <number> | <percentage> | silent | x-soft | soft | medium | loud | x-loud
100
100
rule decl :sym <volume > {;
101
- :i (volume) ":" <val (/ <expr = .expr - volume > /, & ? ROUTINE . WHY )> }
101
+ :i (volume) ":" <val (/<expr = .expr - volume > /, & ? ROUTINE . WHY )> }
102
102
rule expr-volume { :i <number > | <percentage > | [[silent | "x-soft" | soft | medium | loud | "x-loud" ]& <keyw >] }
103
103
# | [ <color> | transparent ]{1,4}
104
104
rule decl :sym <border-color > {;
105
- :i ("border-color" ) ":" <val (/ <expr = .expr - border - color > /, & ? ROUTINE . WHY )> }
105
+ :i ("border-color" ) ":" <val (/<expr = .expr - border - color > /, & ? ROUTINE . WHY )> }
106
106
rule expr-border-color { :i [<color > | [transparent & <keyw >] ]** 1.. 4 }
107
107
# | <color> | transparent
108
108
rule decl :sym <border-top-color > {;
109
- :i ("border-top-color" ) ":" <val (/ <expr = .expr - border - top - color > /, & ? ROUTINE . WHY )> }
109
+ :i ("border-top-color" ) ":" <val (/<expr = .expr - border - top - color > /, & ? ROUTINE . WHY )> }
110
110
rule expr-border-top-color { :i <color > | [transparent & <keyw >] }
111
111
# | <color> | transparent
112
112
rule decl :sym <border-right-color > {;
113
- :i ("border-right-color" ) ":" <val (/ <expr = .expr - border - right - color > /, & ? ROUTINE . WHY )> }
113
+ :i ("border-right-color" ) ":" <val (/<expr = .expr - border - right - color > /, & ? ROUTINE . WHY )> }
114
114
rule expr-border-right-color { :i <color > | [transparent & <keyw >] }
115
115
# | <color> | transparent
116
116
rule decl :sym <border-bottom-color > {;
117
- :i ("border-bottom-color" ) ":" <val (/ <expr = .expr - border - bottom - color > /, & ? ROUTINE . WHY )> }
117
+ :i ("border-bottom-color" ) ":" <val (/<expr = .expr - border - bottom - color > /, & ? ROUTINE . WHY )> }
118
118
rule expr-border-bottom-color { :i <color > | [transparent & <keyw >] }
119
119
# | <color> | transparent
120
120
rule decl :sym <border-left-color > {;
121
- :i ("border-left-color" ) ":" <val (/ <expr = .expr - border - left - color > /, & ? ROUTINE . WHY )> }
121
+ :i ("border-left-color" ) ":" <val (/<expr = .expr - border - left - color > /, & ? ROUTINE . WHY )> }
122
122
rule expr-border-left-color { :i <color > | [transparent & <keyw >] }
0 commit comments