use v6;
#  -- DO NOT EDIT --
# generated by: make-modules.pl 

grammar CSS::Module::CSS3::Fonts::Spec::Grammar {

    #| font: [ [ <‘font-style’> || <font-variant-css21> || <‘font-weight’> || <‘font-stretch’> ]? <‘font-size’> [ / <‘line-height’> ]? <‘font-family’> ] | caption | icon | menu | message-box | small-caption | status-bar
    rule decl:sym<font> {:i (font) ':' <val( rx{ <expr=.expr-font> }, &?ROUTINE.WHY)> }
    rule expr-font {:i :my @*SEEN; [ [ [ [ <expr-font-style> <!seen(0)> | <font-variant-css21> <!seen(1)> | <expr-font-weight> <!seen(2)> | <expr-font-stretch> <!seen(3)> ]+ ]? <expr-font-size> [ <op('/')> <expr-line-height> ]? <expr-font-family> ] || [ caption | icon | menu | message\-box | small\-caption | status\-bar ] & <keyw> ] }

    #| font-variant-css21: normal | small-caps
    rule font-variant-css21 {:i [ normal | small\-caps ] & <keyw> }

    #| font-family: [ <generic-family> | <family-name> ]#
    rule decl:sym<font-family> {:i (font\-family) ':' <val( rx{ <expr=.expr-font-family> }, &?ROUTINE.WHY)> }
    rule expr-font-family {:i [ [ <generic-family> || <family-name> ] ] +% <op(',')> }

    #| generic-family: serif | sans-serif | cursive | fantasy | monospace
    rule generic-family {:i [ serif | sans\-serif | cursive | fantasy | monospace ] & <keyw> }

    #| family-name: <identifiers> | <string>
    rule family-name {:i [ <identifiers> || <string> ] }

    #| font-feature-settings: normal | <feature-tag-value>#
    rule decl:sym<font-feature-settings> {:i (font\-feature\-settings) ':' <val( rx{ <expr=.expr-font-feature-settings> }, &?ROUTINE.WHY)> }
    rule expr-font-feature-settings {:i [ normal & <keyw> || <feature-tag-value> +% <op(',')> ] }

    #| font-kerning: auto | normal | none
    rule decl:sym<font-kerning> {:i (font\-kerning) ':' <val( rx{ <expr=.expr-font-kerning> }, &?ROUTINE.WHY)> }
    rule expr-font-kerning {:i [ auto | normal | none ] & <keyw> }

    #| font-language-override: normal | <string>
    rule decl:sym<font-language-override> {:i (font\-language\-override) ':' <val( rx{ <expr=.expr-font-language-override> }, &?ROUTINE.WHY)> }
    rule expr-font-language-override {:i [ normal & <keyw> || <string> ] }

    #| font-size: <absolute-size> | <relative-size> | <length> | <percentage>
    rule decl:sym<font-size> {:i (font\-size) ':' <val( rx{ <expr=.expr-font-size> }, &?ROUTINE.WHY)> }
    rule expr-font-size {:i [ <absolute-size> || <relative-size> || <length> || <percentage> ] }

    #| font-size-adjust: none | auto | <number>
    rule decl:sym<font-size-adjust> {:i (font\-size\-adjust) ':' <val( rx{ <expr=.expr-font-size-adjust> }, &?ROUTINE.WHY)> }
    rule expr-font-size-adjust {:i [ [ none | auto ] & <keyw> || <number> ] }

    #| absolute-size: xx-small | x-small | small | medium | large | x-large | xx-large
    rule absolute-size {:i [ xx\-small | x\-small | small | medium | large | x\-large | xx\-large ] & <keyw> }

    #| relative-size: larger | smaller
    rule relative-size {:i [ larger | smaller ] & <keyw> }

    #| font-stretch: normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded
    rule decl:sym<font-stretch> {:i (font\-stretch) ':' <val( rx{ <expr=.expr-font-stretch> }, &?ROUTINE.WHY)> }
    rule expr-font-stretch {:i [ normal | ultra\-condensed | extra\-condensed | condensed | semi\-condensed | semi\-expanded | expanded | extra\-expanded | ultra\-expanded ] & <keyw> }

    #| font-style: normal | italic | oblique
    rule decl:sym<font-style> {:i (font\-style) ':' <val( rx{ <expr=.expr-font-style> }, &?ROUTINE.WHY)> }
    rule expr-font-style {:i [ normal | italic | oblique ] & <keyw> }

    #| font-synthesis: none | [ weight || style ]
    rule decl:sym<font-synthesis> {:i (font\-synthesis) ':' <val( rx{ <expr=.expr-font-synthesis> }, &?ROUTINE.WHY)> }
    rule expr-font-synthesis {:i :my @*SEEN; [ none & <keyw> || [ [ weight & <keyw> <!seen(0)> | style & <keyw> <!seen(1)> ]+ ] ] }

    #| font-variant: normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> || stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name> #) || character-variant(<feature-value-name> #) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) || [ small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps ] || <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero || <east-asian-variant-values> || <east-asian-width-values> || ruby ]
    rule decl:sym<font-variant> {:i (font\-variant) ':' <val( rx{ <expr=.expr-font-variant> }, &?ROUTINE.WHY)> }
    rule expr-font-variant {:i :my @*SEEN; [ [ normal | none ] & <keyw> || [ [ <common-lig-values> <!seen(0)> | <discretionary-lig-values> <!seen(1)> | <historical-lig-values> <!seen(2)> | <contextual-alt-values> <!seen(3)> | <stylistic> <!seen(4)> | historical\-forms & <keyw> <!seen(5)> | <styleset> <!seen(6)> | <character-variant> <!seen(7)> | <swash> <!seen(8)> | <ornaments> <!seen(9)> | <annotation> <!seen(10)> | [ [ small\-caps | all\-small\-caps | petite\-caps | all\-petite\-caps | unicase | titling\-caps ] & <keyw> ] <!seen(11)> | <numeric-figure-values> <!seen(12)> | <numeric-spacing-values> <!seen(13)> | <numeric-fraction-values> <!seen(14)> | ordinal & <keyw> <!seen(15)> | slashed\-zero & <keyw> <!seen(16)> | <east-asian-variant-values> <!seen(17)> | <east-asian-width-values> <!seen(18)> | ruby & <keyw> <!seen(19)> ]+ ] ] }

    #| font-variant-alternates: normal | [ stylistic(<feature-value-name>) || historical-forms || styleset(<feature-value-name>#) || character-variant(<feature-value-name>#) || swash(<feature-value-name>) || ornaments(<feature-value-name>) || annotation(<feature-value-name>) ]
    rule decl:sym<font-variant-alternates> {:i (font\-variant\-alternates) ':' <val( rx{ <expr=.expr-font-variant-alternates> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-alternates {:i :my @*SEEN; [ normal & <keyw> || [ [ <stylistic> <!seen(0)> | historical\-forms & <keyw> <!seen(1)> | <styleset> <!seen(2)> | <character-variant> <!seen(3)> | <swash> <!seen(4)> | <ornaments> <!seen(5)> | <annotation> <!seen(6)> ]+ ] ] }

    #| font-variant-caps: normal | small-caps | all-small-caps | petite-caps | all-petite-caps | unicase | titling-caps
    rule decl:sym<font-variant-caps> {:i (font\-variant\-caps) ':' <val( rx{ <expr=.expr-font-variant-caps> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-caps {:i [ normal | small\-caps | all\-small\-caps | petite\-caps | all\-petite\-caps | unicase | titling\-caps ] & <keyw> }

    #| font-variant-east-asian: normal | [ <east-asian-variant-values> || <east-asian-width-values> || ruby ]
    rule decl:sym<font-variant-east-asian> {:i (font\-variant\-east\-asian) ':' <val( rx{ <expr=.expr-font-variant-east-asian> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-east-asian {:i :my @*SEEN; [ normal & <keyw> || [ [ <east-asian-variant-values> <!seen(0)> | <east-asian-width-values> <!seen(1)> | ruby & <keyw> <!seen(2)> ]+ ] ] }

    #| font-variant-ligatures: normal | none | [ <common-lig-values> || <discretionary-lig-values> || <historical-lig-values> || <contextual-alt-values> ]
    rule decl:sym<font-variant-ligatures> {:i (font\-variant\-ligatures) ':' <val( rx{ <expr=.expr-font-variant-ligatures> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-ligatures {:i :my @*SEEN; [ [ normal | none ] & <keyw> || [ [ <common-lig-values> <!seen(0)> | <discretionary-lig-values> <!seen(1)> | <historical-lig-values> <!seen(2)> | <contextual-alt-values> <!seen(3)> ]+ ] ] }

    #| font-variant-numeric: normal | [ <numeric-figure-values> || <numeric-spacing-values> || <numeric-fraction-values> || ordinal || slashed-zero ]
    rule decl:sym<font-variant-numeric> {:i (font\-variant\-numeric) ':' <val( rx{ <expr=.expr-font-variant-numeric> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-numeric {:i :my @*SEEN; [ normal & <keyw> || [ [ <numeric-figure-values> <!seen(0)> | <numeric-spacing-values> <!seen(1)> | <numeric-fraction-values> <!seen(2)> | ordinal & <keyw> <!seen(3)> | slashed\-zero & <keyw> <!seen(4)> ]+ ] ] }

    #| font-variant-position: normal | sub | super
    rule decl:sym<font-variant-position> {:i (font\-variant\-position) ':' <val( rx{ <expr=.expr-font-variant-position> }, &?ROUTINE.WHY)> }
    rule expr-font-variant-position {:i [ normal | sub | super ] & <keyw> }

    #| font-weight: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
    rule decl:sym<font-weight> {:i (font\-weight) ':' <val( rx{ <expr=.expr-font-weight> }, &?ROUTINE.WHY)> }
    rule expr-font-weight {:i [ [ normal | bold | bolder | lighter ] & <keyw> || [ 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ] & <number> ] }

    #| line-height: normal | <number> | <length> | <percentage>
    rule decl:sym<line-height> {:i (line\-height) ':' <val( rx{ <expr=.expr-line-height> }, &?ROUTINE.WHY)> }
    rule expr-line-height {:i [ normal & <keyw> || <number> || <length> || <percentage> ] }
}
