|
libxr
1.0
Want to be the best embedded framework
|
printf 降级阶段共享的描述表与策略辅助函数 / Shared descriptor-table and policy helpers for printf lowering More...
Data Structures | |
| struct | IndexingState |
| brace 字段自动索引与手动索引的源级状态 / Source-level indexing mode for automatic versus manual brace fields More... | |
| struct | ResolvedArgumentVisitor |
| 将已解析转换解析成最终源顺序参数元信息摘要的 visitor / Visitor that resolves parsed conversions into the final source-ordered argument metadata summary More... | |
| struct | SourceAnalysis |
| 单条 brace 风格格式字面量的仅源串分析数据 / Source-only analysis data for one brace-style format literal More... | |
| struct | SourceAnalysisScratch |
| 仅源串分析阶段使用的保守临时累加器 / Conservative temporary accumulator used during source-only analysis More... | |
Functions | |
| constexpr bool | IsDigit (char ch) |
| brace 风格语法的源串解析辅助函数 / Source parser helpers for the brace-style grammar | |
| constexpr bool | IsAlign (char ch) |
| 判断一个源字符是否为合法的 brace 格式对齐标记 / Return whether one source character is a valid brace-format align token | |
| constexpr Align | ParseAlign (char ch) |
| 将一个 brace 格式对齐字符转换为前端枚举值 / Convert one brace-format align token to the frontend enum value | |
| constexpr bool | HasEmbeddedNul (std::string_view source) |
| 判断源字符串在终止前是否包含嵌入式 NUL / Return whether the source contains an embedded NUL before the terminator | |
| constexpr bool | IsSupportedPresentation (char ch) |
| 判断一个展示字符是否被 brace 前端支持 / Return whether one presentation token is supported by the brace frontend | |
| template<typename UInt > | |
| consteval Error | ParseUnsigned (std::string_view source, size_t &pos, UInt limit, UInt &value) |
| 解析一个十进制整数字段片段,并检查是否溢出 / Parse one decimal integer fragment with overflow checking | |
| consteval Error | ParseFieldHead (std::string_view source, size_t &pos, IndexingState &indexing, ParsedField &field) |
解析 : 或 } 之前的字段头,包括自动或手动参数索引选择 / Parse the field head before : or }, including automatic or manual argument index selection | |
| consteval Error | ParseFormatSpec (std::string_view source, size_t &pos, ParsedField &field) |
解析一个 brace 字段中 : 之后的可选 format-spec 部分 / Parse the optional format-spec portion after : inside one brace field | |
| consteval Error | ParseField (std::string_view source, size_t &pos, IndexingState &indexing, ParsedField &field) |
解析一个完整 brace 字段,从 { 一直到匹配的 } / Parse one complete brace field from { through the matching } | |
| consteval Error | WalkSource (std::string_view source, auto &visitor) |
| 遍历一个 brace 源字符串,并发射字面文本片段与已解析字段 / Walk one brace source string and emit literal-text spans plus parsed fields | |
| template<Text Source> | |
| consteval auto | Analyze () |
| 对一个 brace 字面量执行仅源串分析,并返回按顺序整理的参数索引摘要 / Run source-only analysis for one brace literal and return the ordered argument-index summary | |
| consteval Error | ParseArgumentIndex (std::string_view source, size_t &pos, IndexingState &indexing, Conversion &conversion) |
| 解析可选的前导 n$ 位置参数选择器 / Parse the optional leading n$ positional argument selector | |
| consteval Error | ParseByte (std::string_view source, size_t &pos, uint8_t limit, uint8_t &value) |
| 解析一个目标为字节宽度的十进制整数字段片段,并检查是否溢出 / Parse one decimal byte-sized integer fragment with overflow checking | |
| consteval Error | ParseFlags (std::string_view source, size_t &pos, Conversion &conversion) |
| 单个 printf 转换体的源级解析器 / Source parser for one printf conversion body | |
| consteval Error | ParseWidth (std::string_view source, size_t &pos, Conversion &conversion) |
| 解析一个可选的常量宽度字段 / Parse one optional constant width field | |
| consteval Error | ParsePrecision (std::string_view source, size_t &pos, Conversion &conversion) |
| 解析一个可选的常量精度字段 / Parse one optional constant precision field | |
| consteval void | ParseLength (std::string_view source, size_t &pos, Conversion &conversion) |
| 解析一个可选的长度修饰符序列 / Parse one optional length modifier sequence | |
| consteval Error | ParseSpecifier (std::string_view source, size_t &pos, Conversion &conversion) |
| 解析并校验最终的转换说明符字符 / Parse and validate the final conversion specifier token | |
| consteval Error | Parse (std::string_view source, size_t &pos, IndexingState &indexing, Conversion &conversion) |
在前导 % 之后解析一个完整 printf 转换项 / Parse one complete printf conversion after the leading % | |
printf 降级阶段共享的描述表与策略辅助函数 / Shared descriptor-table and policy helpers for printf lowering
为一个已解析 printf 转换选择运行期语义类型 / Choose the runtime semantic type for one parsed printf conversion
|
nodiscardconsteval |
对一个 brace 字面量执行仅源串分析,并返回按顺序整理的参数索引摘要 / Run source-only analysis for one brace literal and return the ordered argument-index summary
对一个 printf 字面量执行仅源串分析,并返回按顺序整理的参数引用摘要 / Run source-only analysis for one printf literal and return the ordered argument-reference summary
| Source | brace 风格格式串字面量 / Brace-style format literal |
| Source | printf 风格格式串字面量 / Printf-style format literal |
Definition at line 140 of file format_frontend_source.hpp.
|
nodiscardconstexpr |
判断源字符串在终止前是否包含嵌入式 NUL / Return whether the source contains an embedded NUL before the terminator
判断源字符串在结尾终止字节之前是否包含嵌入式 NUL / Return whether the source contains an embedded NUL byte before the terminator
| source | 待检查的源字符串 / Source string to inspect |
\\0 则返回 true,否则返回 false / Returns true when \\0 appears before the terminator, otherwise false| source | 待检查的源字符串 / Source string to inspect |
true,否则返回 false / Returns true when an embedded NUL exists before the terminator, otherwise false Definition at line 52 of file format_frontend_source.hpp.
|
nodiscardconstexpr |
判断一个源字符是否为合法的 brace 格式对齐标记 / Return whether one source character is a valid brace-format align token
| ch | 待检查的源字符 / Source character to inspect |
true,否则返回 false / Returns true for a valid align token, otherwise false Definition at line 22 of file format_frontend_source.hpp.
|
nodiscardconstexpr |
brace 风格语法的源串解析辅助函数 / Source parser helpers for the brace-style grammar
判断一个源字节是否为 ASCII 十进制数字 / Return whether one source byte is an ASCII decimal digit
判断一个源字节是否为 ASCII 十进制数字 / Return whether one source byte is an ASCII decimal digit
| ch | 待检查的源字节 / Source byte to inspect |
true,否则返回 false / Returns true for an ASCII decimal digit, otherwise false| ch | 待检查的源字节 / Source byte to test |
true,否则返回 false / Returns true for an ASCII decimal digit, otherwise false Definition at line 12 of file format_frontend_source.hpp.
|
nodiscardconstexpr |
判断一个展示字符是否被 brace 前端支持 / Return whether one presentation token is supported by the brace frontend
| ch | 展示字符 / Presentation token |
true,否则返回 false / Returns true when the token is supported, otherwise false Definition at line 69 of file format_frontend_source.hpp.
|
nodiscardconsteval |
在前导 % 之后解析一个完整 printf 转换项 / Parse one complete printf conversion after the leading %
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,进入时应指向 %,成功时推进到该转换项之后 / Current parse position; must point at % on entry and lands after the conversion on success |
| indexing | 源级索引模式跟踪状态 / Source-level indexing mode tracker |
| conversion | 输出转换项结果 / Conversion result output |
Error::None;解析或校验失败时返回对应错误 / Returns Error::None on success, or the first parse or validation failure Definition at line 207 of file printf_frontend_source.hpp.
|
nodiscardconstexpr |
将一个 brace 格式对齐字符转换为前端枚举值 / Convert one brace-format align token to the frontend enum value
| ch | 对齐字符 / Align token |
Align 枚举;未知字符返回 Align::None / Returns the corresponding Align enum; unknown tokens map to Align::None Definition at line 32 of file format_frontend_source.hpp.
|
nodiscardconsteval |
解析可选的前导 n$ 位置参数选择器 / Parse the optional leading n$ positional argument selector
This probe only consumes digits when they are immediately followed by '$'. Plain width digits such as %05d stay untouched for the later width parser. 只有当数字后面紧跟 '$' 时,这个探测才会真正消费它们;像 %05d 这样的普通宽度 数字会完整保留给后续宽度解析阶段。
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,成功时推进到 n$ 之后 / Current parse position; advanced past n$ on success |
| indexing | 源级索引模式跟踪状态 / Source-level indexing mode tracker |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Error::None;出错时返回首个解析错误 / Returns the first parse error, or Error::None when no positional selector is present or parsing succeeds Definition at line 54 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析一个目标为字节宽度的十进制整数字段片段,并检查是否溢出 / Parse one decimal byte-sized integer fragment with overflow checking
| source | 含该十进制片段的源字符串 / Source string holding the decimal fragment |
| pos | 当前解析位置,成功时推进到片段之后 / Current parse position; advanced past the fragment on success |
| limit | 该字段允许的最大值 / Inclusive upper bound accepted by this field |
| value | 输出解析结果 / Parsed result output |
Error::None;溢出或语法非法时返回对应错误 / Returns Error::None on success, or the first overflow or syntax failure Definition at line 111 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析一个完整 brace 字段,从 { 一直到匹配的 } / Parse one complete brace field from { through the matching }
| source | 源字符串 / Source string |
| pos | 当前解析位置,进入时应指向 {,成功时推进到 } 之后 / Current parse position; must point at { on entry and lands after } on success |
| indexing | 自动或手动索引状态 / Auto or manual indexing state |
| field | 输出字段结果 / Parsed field output |
Error::None;字段语法不合法时返回对应错误 / Returns Error::None on success, or the first field-syntax error Definition at line 313 of file format_frontend_source.hpp.
|
nodiscardconsteval |
解析 : 或 } 之前的字段头,包括自动或手动参数索引选择 / Parse the field head before : or }, including automatic or manual argument index selection
| source | 源字符串 / Source string |
| pos | 当前解析位置,成功时推进到字段头之后 / Current parse position; advanced past the field head on success |
| indexing | 自动或手动索引状态 / Auto or manual indexing state |
| field | 输出字段头结果 / Parsed field-head output |
Error::None;语法或索引模式不合法时返回对应错误 / Returns Error::None on success, or the first syntax or indexing error Definition at line 147 of file format_frontend_source.hpp.
|
nodiscardconsteval |
单个 printf 转换体的源级解析器 / Source parser for one printf conversion body
解析单个转换项前导的标志位簇 / Parse the leading flag cluster of one conversion
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,成功时推进到已解析标志之后 / Current parse position; advanced past parsed flags |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Error::None;遇到非法标志时返回对应错误 / Returns Error::None on success, or the first invalid flag error Definition at line 16 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析一个 brace 字段中 : 之后的可选 format-spec 部分 / Parse the optional format-spec portion after : inside one brace field
| source | 源字符串 / Source string |
| pos | 当前解析位置,成功时推进到 format-spec 之后 / Current parse position; advanced past the format-spec on success |
| field | 待填充的字段结果 / Parsed field output being filled |
Error::None;format-spec 非法时返回对应错误 / Returns Error::None on success, or the first format-spec error Definition at line 203 of file format_frontend_source.hpp.
|
consteval |
解析一个可选的长度修饰符序列 / Parse one optional length modifier sequence
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置;若存在长度修饰符则推进到其后 / Current parse position; advanced past the length modifier when present |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Definition at line 120 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析一个可选的常量精度字段 / Parse one optional constant precision field
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,成功时推进到精度片段之后 / Current parse position; advanced past the precision fragment on success |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Error::None;精度相关错误时返回对应错误 / Returns Error::None on success, or the first precision-related error Definition at line 82 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析并校验最终的转换说明符字符 / Parse and validate the final conversion specifier token
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,成功时推进到说明符之后 / Current parse position; advanced past the specifier on success |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Error::None;说明符、长度或功能开关不合法时返回对应错误 / Returns Error::None on success, or the first specifier, length, or gate error Definition at line 171 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
解析一个十进制整数字段片段,并检查是否溢出 / Parse one decimal integer fragment with overflow checking
| UInt | 目标无符号整数类型 / Target unsigned integer type |
| source | 源字符串 / Source string |
| pos | 当前解析位置,成功时推进到片段之后 / Current parse position; advanced past the fragment on success |
| limit | 允许的最大值 / Inclusive upper bound accepted by this field |
| value | 输出解析结果 / Parsed result output |
Error::None;溢出或语法不合法时返回对应错误 / Returns Error::None on success, or the first overflow or syntax error Definition at line 104 of file format_frontend_source.hpp.
|
nodiscardconsteval |
解析一个可选的常量宽度字段 / Parse one optional constant width field
| source | 完整 printf 源字符串 / Full printf source string |
| pos | 当前解析位置,成功时推进到宽度片段之后 / Current parse position; advanced past the width fragment on success |
| conversion | 当前正在填充的转换项 / Conversion being filled |
Error::None;动态宽度或非法宽度时返回对应错误 / Returns Error::None on success, or the first dynamic-field or invalid-width error Definition at line 58 of file printf_frontend_source.hpp.
|
nodiscardconsteval |
遍历一个 brace 源字符串,并发射字面文本片段与已解析字段 / Walk one brace source string and emit literal-text spans plus parsed fields
遍历一个 printf 源字符串,并发射字面文本片段与已解析转换项 / Walk one printf source string and emit literal-text spans plus parsed conversions
| source | 当前待解析的 brace 源字符串 / Brace source string to walk |
| visitor | 接收文本片段与已解析字段的 visitor / Visitor receiving text spans and parsed fields |
Error::None / Returns the first source-level parse error, or Error::None on success| source | 当前待解析的 printf 源字符串 / Printf source string to walk |
| visitor | 接收文本片段与已解析转换项的 visitor / Visitor receiving text spans and parsed conversions |
Error::None / Returns the first source-level parse error, or Error::None on success Definition at line 51 of file format_frontend_source.hpp.