C 标记C Tokens

在 C 源程序中,编译器识别的基本元素是“标记”。In a C source program, the basic element recognized by the compiler is the "token." 标记是编译器不会分解为组件元素的源程序文本。A token is source-program text that the compiler does not break down into component elements.

语法Syntax

token:token:
keywordkeyword

identifieridentifier

constantconstant

string-literalstring-literal

operatoroperator

punctuatorpunctuator

备注

有关 ANSI 语法约定的说明,请参阅 C 语言语法摘要的简介。See the introduction toC Language Syntax Summary for an explanation of the ANSI syntax conventions.

本节描述的关键字、标识符、常量、字符串文本和运算符是标记的示例。The keywords, identifiers, constants, string literals, and operators described in this section are examples of tokens. 标点符号(如方括号 ([ ])、大括号 ({ })、圆括号 ( ( ) ) 和逗号 (,) 也是标记。Punctuation characters such as brackets ([ ]), braces ({ }), parentheses ( ( ) ), and commas (,) are also tokens.

请参阅See Also

C 的元素Elements of C