@@ -7,7 +7,7 @@ unit grammar CSS::Module::CSS21::Gen::Grammar;
7
7
8
8
# | azimuth: <angle> | [ <direction> || <behind> ] | <delta>
9
9
rule decl :sym <azimuth > {:i (azimuth) ':' <val ( rx { <expr = .expr - azimuth > }, & ? ROUTINE . WHY )> }
10
- rule expr-azimuth {:i :my @ S ; [ <angle > || [ [ <direction > <!{ @ S [ 0 ] ++ } > | <behind > <!{ @ S [ 1 ] ++ } > ]+ ] || <delta > ] }
10
+ rule expr-azimuth {:i :my @ * SEEN ; [ <angle > || [ [ <direction > <!seen ( 0 ) > | <behind > <!seen ( 1 ) > ]+ ] || <delta > ] }
11
11
12
12
# | delta: leftwards | rightwards
13
13
rule delta {:i [ leftwards | rightwards ] & <keyw > }
@@ -32,7 +32,7 @@ rule expr-background-image {:i [ <uri> || none & <keyw> ] }
32
32
33
33
# | background-position: [ [ <percentage> | <length> | <align> ] [ <percentage> | <length> | <valign> ]? ] | [ <align> || <valign> ]
34
34
rule decl :sym <background-position > {:i (background\-position) ':' <val ( rx { <expr = .expr - background - position > }, & ? ROUTINE . WHY )> }
35
- rule expr-background-position {:i :my @ S ; [ [ [ [ <percentage > || <length > || <align > ] ] [ [ <percentage > || <length > || <valign > ] ]? ] || [ [ <align > <!{ @ S [ 0 ] ++ } > | <valign > <!{ @ S [ 1 ] ++ } > ]+ ] ] }
35
+ rule expr-background-position {:i :my @ * SEEN ; [ [ [ [ <percentage > || <length > || <align > ] ] [ [ <percentage > || <length > || <valign > ] ]? ] || [ [ <align > <!seen ( 0 ) > | <valign > <!seen ( 1 ) > ]+ ] ] }
36
36
37
37
# | align: left | center | right
38
38
rule align {:i [ left | center | right ] & <keyw > }
@@ -46,7 +46,7 @@ rule expr-background-repeat {:i [ repeat | repeat\-x | repeat\-y | no\-repeat ]
46
46
47
47
# | background: ['background-color' || 'background-image' || 'background-repeat' || 'background-attachment' || 'background-position']
48
48
rule decl :sym <background > {:i (background) ':' <val ( rx { <expr = .expr - background > }, & ? ROUTINE . WHY )> }
49
- rule expr-background {:i :my @ S ; [ [ <expr - background - color > <!{ @ S [ 0 ] ++ } > | <expr - background - image > <!{ @ S [ 1 ] ++ } > | <expr - background - repeat > <!{ @ S [ 2 ] ++ } > | <expr - background - attachment > <!{ @ S [ 3 ] ++ } > | <expr - background - position > <!{ @ S [ 4 ] ++ } > ]+ ] }
49
+ rule expr-background {:i :my @ * SEEN ; [ [ <expr - background - color > <!seen ( 0 ) > | <expr - background - image > <!seen ( 1 ) > | <expr - background - repeat > <!seen ( 2 ) > | <expr - background - attachment > <!seen ( 3 ) > | <expr - background - position > <!seen ( 4 ) > ]+ ] }
50
50
51
51
# | border-collapse: collapse | separate
52
52
rule decl :sym <border-collapse > {:i (border\-collapse) ':' <val ( rx { <expr = .expr - border - collapse > }, & ? ROUTINE . WHY )> }
@@ -69,19 +69,19 @@ rule border-style {:i [ none | hidden | dotted | dashed | solid | double | groov
69
69
70
70
# | border-top: [ 'border-top-width' || 'border-top-style' || 'border-top-color' ]
71
71
rule decl :sym <border-top > {:i (border\-top) ':' <val ( rx { <expr = .expr - border - top > }, & ? ROUTINE . WHY )> }
72
- rule expr-border-top {:i :my @ S ; [ [ <expr - border - top - width > <!{ @ S [ 0 ] ++ } > | <expr - border - top - style > <!{ @ S [ 1 ] ++ } > | <expr - border - top - color > <!{ @ S [ 2 ] ++ } > ]+ ] }
72
+ rule expr-border-top {:i :my @ * SEEN ; [ [ <expr - border - top - width > <!seen ( 0 ) > | <expr - border - top - style > <!seen ( 1 ) > | <expr - border - top - color > <!seen ( 2 ) > ]+ ] }
73
73
74
74
# | border-right: [ 'border-right-width' || 'border-right-style' || 'border-right-color' ]
75
75
rule decl :sym <border-right > {:i (border\-right) ':' <val ( rx { <expr = .expr - border - right > }, & ? ROUTINE . WHY )> }
76
- rule expr-border-right {:i :my @ S ; [ [ <expr - border - right - width > <!{ @ S [ 0 ] ++ } > | <expr - border - right - style > <!{ @ S [ 1 ] ++ } > | <expr - border - right - color > <!{ @ S [ 2 ] ++ } > ]+ ] }
76
+ rule expr-border-right {:i :my @ * SEEN ; [ [ <expr - border - right - width > <!seen ( 0 ) > | <expr - border - right - style > <!seen ( 1 ) > | <expr - border - right - color > <!seen ( 2 ) > ]+ ] }
77
77
78
78
# | border-bottom: [ 'border-bottom-width' || 'border-bottom-style' || 'border-bottom-color' ]
79
79
rule decl :sym <border-bottom > {:i (border\-bottom) ':' <val ( rx { <expr = .expr - border - bottom > }, & ? ROUTINE . WHY )> }
80
- rule expr-border-bottom {:i :my @ S ; [ [ <expr - border - bottom - width > <!{ @ S [ 0 ] ++ } > | <expr - border - bottom - style > <!{ @ S [ 1 ] ++ } > | <expr - border - bottom - color > <!{ @ S [ 2 ] ++ } > ]+ ] }
80
+ rule expr-border-bottom {:i :my @ * SEEN ; [ [ <expr - border - bottom - width > <!seen ( 0 ) > | <expr - border - bottom - style > <!seen ( 1 ) > | <expr - border - bottom - color > <!seen ( 2 ) > ]+ ] }
81
81
82
82
# | border-left: [ 'border-left-width' || 'border-left-style' || 'border-left-color' ]
83
83
rule decl :sym <border-left > {:i (border\-left) ':' <val ( rx { <expr = .expr - border - left > }, & ? ROUTINE . WHY )> }
84
- rule expr-border-left {:i :my @ S ; [ [ <expr - border - left - width > <!{ @ S [ 0 ] ++ } > | <expr - border - left - style > <!{ @ S [ 1 ] ++ } > | <expr - border - left - color > <!{ @ S [ 2 ] ++ } > ]+ ] }
84
+ rule expr-border-left {:i :my @ * SEEN ; [ [ <expr - border - left - width > <!seen ( 0 ) > | <expr - border - left - style > <!seen ( 1 ) > | <expr - border - left - color > <!seen ( 2 ) > ]+ ] }
85
85
86
86
# | border-top-color: <color> | transparent
87
87
rule decl :sym <border-top-color > {:i (border\-top\-color) ':' <val ( rx { <expr = .expr - border - top - color > }, & ? ROUTINE . WHY )> }
@@ -140,7 +140,7 @@ rule border-width {:i [ [ thin | medium | thick ] & <keyw> || <length> ] }
140
140
141
141
# | border: [ 'border-width' || 'border-style' || 'border-color' ]
142
142
rule decl :sym <border > {:i (border) ':' <val ( rx { <expr = .expr - border > }, & ? ROUTINE . WHY )> }
143
- rule expr-border {:i :my @ S ; [ [ <expr - border - width > <!{ @ S [ 0 ] ++ } > | <expr - border - style > <!{ @ S [ 1 ] ++ } > | <expr - border - color > <!{ @ S [ 2 ] ++ } > ]+ ] }
143
+ rule expr-border {:i :my @ * SEEN ; [ [ <expr - border - width > <!seen ( 0 ) > | <expr - border - style > <!seen ( 1 ) > | <expr - border - color > <!seen ( 2 ) > ]+ ] }
144
144
145
145
# | bottom: <length> | <percentage> | auto
146
146
rule decl :sym <bottom > {:i (bottom) ':' <val ( rx { <expr = .expr - bottom > }, & ? ROUTINE . WHY )> }
@@ -184,7 +184,7 @@ rule expr-cue-before {:i [ <uri> || none & <keyw> ] }
184
184
185
185
# | cue: [ 'cue-before' || 'cue-after' ]
186
186
rule decl :sym <cue > {:i (cue) ':' <val ( rx { <expr = .expr - cue > }, & ? ROUTINE . WHY )> }
187
- rule expr-cue {:i :my @ S ; [ [ <expr - cue - before > <!{ @ S [ 0 ] ++ } > | <expr - cue - after > <!{ @ S [ 1 ] ++ } > ]+ ] }
187
+ rule expr-cue {:i :my @ * SEEN ; [ [ <expr - cue - before > <!seen ( 0 ) > | <expr - cue - after > <!seen ( 1 ) > ]+ ] }
188
188
189
189
# | cursor: [ [<uri> ,]* [ auto | crosshair | default | pointer | move | e-resize | ne-resize | nw-resize | n-resize | se-resize | sw-resize | s-resize | w-resize | text | wait | help | progress ] ]
190
190
rule decl :sym <cursor > {:i (cursor) ':' <val ( rx { <expr = .expr - cursor > }, & ? ROUTINE . WHY )> }
@@ -247,7 +247,7 @@ rule expr-font-weight {:i [ [ normal | bold | bolder | lighter ] & <keyw> || [ 1
247
247
248
248
# | font: [ [ 'font-style' || 'font-variant' || 'font-weight' ]? 'font-size' [ / 'line-height' ]? 'font-family' ] | caption | icon | menu | message-box | small-caption | status-bar
249
249
rule decl :sym <font > {:i (font) ':' <val ( rx { <expr = .expr - font > }, & ? ROUTINE . WHY )> }
250
- rule expr-font {:i :my @ S ; [ [ [ [ <expr - font - style > <!{ @ S [ 0 ] ++ } > | <expr - font - variant > <!{ @ S [ 1 ] ++ } > | <expr - font - weight > <!{ @ S [ 2 ] ++ } > ]+ ]? <expr - font - size > [ <op (' /' )> <expr - line - height > ]? <expr - font - family > ] || [ caption | icon | menu | message\-box | small\-caption | status\-bar ] & <keyw > ] }
250
+ rule expr-font {:i :my @ * SEEN ; [ [ [ [ <expr - font - style > <!seen ( 0 ) > | <expr - font - variant > <!seen ( 1 ) > | <expr - font - weight > <!seen ( 2 ) > ]+ ]? <expr - font - size > [ <op (' /' )> <expr - line - height > ]? <expr - font - family > ] || [ caption | icon | menu | message\-box | small\-caption | status\-bar ] & <keyw > ] }
251
251
252
252
# | height: <length> | <percentage> | auto
253
253
rule decl :sym <height > {:i (height) ':' <val ( rx { <expr = .expr - height > }, & ? ROUTINE . WHY )> }
@@ -279,7 +279,7 @@ rule expr-list-style-type {:i [ disc | circle | square | decimal | decimal\-lead
279
279
280
280
# | list-style: [ 'list-style-type' || 'list-style-position' || 'list-style-image' ]
281
281
rule decl :sym <list-style > {:i (list\-style) ':' <val ( rx { <expr = .expr - list - style > }, & ? ROUTINE . WHY )> }
282
- rule expr-list-style {:i :my @ S ; [ [ <expr - list - style - type > <!{ @ S [ 0 ] ++ } > | <expr - list - style - position > <!{ @ S [ 1 ] ++ } > | <expr - list - style - image > <!{ @ S [ 2 ] ++ } > ]+ ] }
282
+ rule expr-list-style {:i :my @ * SEEN ; [ [ <expr - list - style - type > <!seen ( 0 ) > | <expr - list - style - position > <!seen ( 1 ) > | <expr - list - style - image > <!seen ( 2 ) > ]+ ] }
283
283
284
284
# | margin-right: <margin-width>
285
285
rule decl :sym <margin-right > {:i (margin\-right) ':' <val ( rx { <expr = .expr - margin - right > }, & ? ROUTINE . WHY )> }
@@ -342,7 +342,7 @@ rule expr-outline-width {:i [ [ thin | medium | thick ] & <keyw> || <length> ] }
342
342
343
343
# | outline: [ 'outline-color' || 'outline-style' || 'outline-width' ]
344
344
rule decl :sym <outline > {:i (outline) ':' <val ( rx { <expr = .expr - outline > }, & ? ROUTINE . WHY )> }
345
- rule expr-outline {:i :my @ S ; [ [ <expr - outline - color > <!{ @ S [ 0 ] ++ } > | <expr - outline - style > <!{ @ S [ 1 ] ++ } > | <expr - outline - width > <!{ @ S [ 2 ] ++ } > ]+ ] }
345
+ rule expr-outline {:i :my @ * SEEN ; [ [ <expr - outline - color > <!seen ( 0 ) > | <expr - outline - style > <!seen ( 1 ) > | <expr - outline - width > <!seen ( 2 ) > ]+ ] }
346
346
347
347
# | overflow: visible | hidden | scroll | auto
348
348
rule decl :sym <overflow > {:i (overflow) ':' <val ( rx { <expr = .expr - overflow > }, & ? ROUTINE . WHY )> }
@@ -405,7 +405,7 @@ rule expr-pitch {:i [ <frequency> || [ x\-low | low | medium | high | x\-high ]
405
405
406
406
# | play-during: <uri> [ mix || repeat ]? | auto | none
407
407
rule decl :sym <play-during > {:i (play\-during) ':' <val ( rx { <expr = .expr - play - during > }, & ? ROUTINE . WHY )> }
408
- rule expr-play-during {:i :my @ S ; [ <uri > [ [ mix & <keyw > <!{ @ S [ 0 ] ++ } > | repeat & <keyw > <!{ @ S [ 1 ] ++ } > ]+ ]? || [ auto | none ] & <keyw > ] }
408
+ rule expr-play-during {:i :my @ * SEEN ; [ <uri > [ [ mix & <keyw > <!seen ( 0 ) > | repeat & <keyw > <!seen ( 1 ) > ]+ ]? || [ auto | none ] & <keyw > ] }
409
409
410
410
# | position: static | relative | absolute | fixed
411
411
rule decl :sym <position > {:i (position) ':' <val ( rx { <expr = .expr - position > }, & ? ROUTINE . WHY )> }
@@ -461,7 +461,7 @@ rule expr-text-align {:i [ <align> || justify & <keyw> ] }
461
461
462
462
# | text-decoration: none | [ underline || overline || line-through || blink ]
463
463
rule decl :sym <text-decoration > {:i (text\-decoration) ':' <val ( rx { <expr = .expr - text - decoration > }, & ? ROUTINE . WHY )> }
464
- rule expr-text-decoration {:i :my @ S ; [ none & <keyw > || [ [ underline & <keyw > <!{ @ S [ 0 ] ++ } > | overline & <keyw > <!{ @ S [ 1 ] ++ } > | line\-through & <keyw > <!{ @ S [ 2 ] ++ } > | blink & <keyw > <!{ @ S [ 3 ] ++ } > ]+ ] ] }
464
+ rule expr-text-decoration {:i :my @ * SEEN ; [ none & <keyw > || [ [ underline & <keyw > <!seen ( 0 ) > | overline & <keyw > <!seen ( 1 ) > | line\-through & <keyw > <!seen ( 2 ) > | blink & <keyw > <!seen ( 3 ) > ]+ ] ] }
465
465
466
466
# | text-indent: <length> | <percentage>
467
467
rule decl :sym <text-indent > {:i (text\-indent) ':' <val ( rx { <expr = .expr - text - indent > }, & ? ROUTINE . WHY )> }
0 commit comments