2.9 - [lex.ppnumber] - 【词法.预处理数字】

这篇博客详细探讨了预处理数字在词法分析过程中的处理方式,涵盖了字符、翻译、数字处理等方面,旨在理解预处理阶段如何识别和转换数字 token。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

请不要转载本文;请不要以任何形式重新出版,发布本文;请在下载本文 24 小时内将其删除;禁止将本文用于商业目的。

2 Lexical conventions [lex]

2.9 Preprocessing numbers [lex.ppnumber]

 

2 词法约定 【词法】

2.9 预处理数字 【词法.预处理数字】

 

    pp-number:
        digit
        . digit
        pp-number digit
        pp-number nondigit
        pp-number e sign
        pp-number E sign
        pp-number .

    h-char-sequence:
        h-char
        h-char-sequence h-char

    h-char:
        any member of the source character set except
            new-line and >

    q-char-sequence:
        q-char
        q-char-sequence q-char

    q-char:
        any member of the source character set except
            new-line and "

 

    头-名称:
        <h-字符-序列>
        "q-字符-序列"

    h-字符-序列:
        h-字符
        h-字符-序列 h-字符

    h-字符:
        源字符集中的任何字符,除了
            换行和 >

    q-字符-序列:
        q-字符
        q-字符-序列 q-字符

    q-字符:
        源字符集中的任何字符,除了
            换行和 "

 

Preprocessing number tokens lexically include all integral literal tokens (2.13.1) and all floating literal tokens (2.13.3).

 

预处理数字标记在词汇上包含所有整数文字量(2.13.1)和所有浮点文字量(2.13.3)。

 

A Preprocessing number does not have a type or a value; it acquires both after a successful conversion (as part of translation phase 7, 2.1) to an integral literal token or a floating literal token.

 

预处理数字标记没有类型或值;类型或值将在向整数文字量或浮点文字量成功转换(作为第 7 阶段的一部分,2.1)之后获得。

 

19) Thus, sequences of characters that resemble escape sequences cause undefined behavior.

 

19) 比如,转义序列一类的字符序列将导致未定义行为。

 

PREV [lex.header] | NEXT [lex.name]上一页 【词法.头】 | 下一页 【词法.名字】
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值