2.12 - [lex.operators] - 【词法.运算符】

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

2 Lexical conventions [lex]

2.12 Operators and punctuators [lex.operators]

 

2 词法约定 【词法】

2.12 运算符和标点 【词法.运算符】

 

The lexical representation of C++ programs includes a number of preprocessing tokens which are used in the syntax of the preprocessor or are converted into tokens for operators and punctuators:

    preprocessing-op-or-punc: one of
        {    }    [    ]    #    ##   (    )
        <:   :>   <%   %>   %:   %:%: ;    :    ...
        new  delete    ?    ::   .    .*
        +    -    *    /    %    ^    &    |    ~
        !    =    <    >    +=   -=   *=   /=   %=
        ^=   &=   |=   <<   >>   >>=  <<=  ==   !=
        <=   >=   &&   ||   ++   --   ,    ->*  ->
        and  and_eq    bitand    bitor     compl
        not  not_eq    or   or_eq     xor  xor_eq

Each preprocessing-op-or-punc is converted to a single token in translation phase 7 (2.1).

 

C++ 程序的词法表示包括一些在预处理器语法中使用,或被转换成表示运算符和标点的标记的预处理标记:

    预处理-运算符-或-标点: 下列之一
        {    }    [    ]    #    ##   (    )
        <:   :>   <%   %>   %:   %:%: ;    :    ...
        new  delete    ?    ::   .    .*
        +    -    *    /    %    ^    &    |    ~
        !    =    <    >    +=   -=   *=   /=   %=
        ^=   &=   |=   <<   >>   >>=  <<=  ==   !=
        <=   >=   &&   ||   ++   --   ,    ->*  ->
        and  and_eq    bitand    bitor     compl
        not  not_eq    or   or_eq     xor  xor_eq

在翻译阶段 7 中(2.1),每个预处理-运算符-或-标点被转换成单个的标记。

 

PREV [lex.key] | NEXT [lex.literal]上一页 【词法.关键字】 | 下一页 【词法.文字量】
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值