docs: grammar format changed to BNF

This commit is contained in:
Mateusz Pusz
2024-01-23 21:32:26 +01:00
parent a5c35a0cf6
commit 5756a96709

View File

@@ -120,8 +120,8 @@ OutputIt format_global_buffer(OutputIt out, const fill_align_width_format_specs<
// //
// dimension-format-spec ::= [fill-and-align] [width] [dimension-spec] // dimension-format-spec ::= [fill-and-align] [width] [dimension-spec]
// dimension-spec ::= [text-encoding] // dimension-spec ::= [text-encoding]
// text-encoding ::= one of // text-encoding ::= 'U' | 'A'
// U A //
// template<typename Char> // template<typename Char>
// struct dimension_format_specs : fill_align_width_format_specs<Char>, dimension_symbol_formatting {}; // struct dimension_format_specs : fill_align_width_format_specs<Char>, dimension_symbol_formatting {};
@@ -137,10 +137,9 @@ OutputIt format_global_buffer(OutputIt out, const fill_align_width_format_specs<
// [unit-symbol-solidus] [unit-symbol-separator] [text-encoding] [L] // [unit-symbol-solidus] [unit-symbol-separator] [text-encoding] [L]
// [unit-symbol-separator] [text-encoding] [unit-symbol-solidus] [L] // [unit-symbol-separator] [text-encoding] [unit-symbol-solidus] [L]
// [unit-symbol-separator] [unit-symbol-solidus] [text-encoding] [L] // [unit-symbol-separator] [unit-symbol-solidus] [text-encoding] [L]
// unit-symbol-solidus ::= one of // unit-symbol-solidus ::= '1' | 'a' | 'n'1
// 1 a n // unit-symbol-separator ::= 's' | 'd'
// unit-symbol-separator ::= one of //
// s d
template<mp_units::Unit U, typename Char> template<mp_units::Unit U, typename Char>
class MP_UNITS_STD_FMT::formatter<U, Char> { class MP_UNITS_STD_FMT::formatter<U, Char> {
struct format_specs : mp_units::detail::fill_align_width_format_specs<Char>, mp_units::unit_symbol_formatting {}; struct format_specs : mp_units::detail::fill_align_width_format_specs<Char>, mp_units::unit_symbol_formatting {};
@@ -253,16 +252,16 @@ public:
// quantity-specs ::= conversion-spec // quantity-specs ::= conversion-spec
// quantity-specs conversion-spec // quantity-specs conversion-spec
// quantity-specs literal-char // quantity-specs literal-char
// literal-char ::= any character other than '{', '}', or '%' // literal-char ::= <any character other than '{', '}', or '%'>
// conversion-spec ::= placement-spec // conversion-spec ::= placement-spec
// subentity-replacement-field // subentity-replacement-field
// placement-spec ::= '%' placement-type // placement-spec ::= '%' placement-type
// placement-type ::= one of // placement-type ::= 'N' | 'U' | 'D' | '?' | '%'
// N U D ? % // subentity-replacement-field ::= '{' '%' subentity-id [format-specifier] '}'
// subentity-replacement-field ::= { % subentity-id [format-specifier] } // subentity-id ::= literal-char
// subentity-id ::= any character other than {, }, or % // subentity-id literal-char
// format-specifier ::= : format-spec // format-specifier ::= ':' format-spec
// format-spec ::= as specified by the formatter for the argument type; cannot start with } // format-spec ::= <as specified by the formatter for the argument type; cannot start with '}'>
// //
template<auto Reference, typename Rep, typename Char> template<auto Reference, typename Rep, typename Char>
class MP_UNITS_STD_FMT::formatter<mp_units::quantity<Reference, Rep>, Char> { class MP_UNITS_STD_FMT::formatter<mp_units::quantity<Reference, Rep>, Char> {