C Reference Manual Reading Notes: 005 Tokens ( Without Constants )

来源:互联网 发布:urllib2.urlopen json 编辑:程序博客网 时间:2024/05/16 23:54

    Five classes of tokens: operators, separators, identifiers, keywords, and constants.

 

    (1) operators and separators.

             ! % ^ & * - + = ~ | . < > / ?

             += -= *= /= %=

             <<= >>= &= ^= |=

             --> ++ -- << >>

             <= >= == != && ||

             () [] {} , ; : ...

             <% %> <: :> %: %:%: (see the section 001)

 

    (2) identifiers

             (a).  An identifier, or name, is a sequence of Latin capital and small letters, digits, and LOWLINE character. An identifier must bot begin with a digit, and it must not have the same spelling as a keyword.

             (b). Beginning with C99, identifiers may also contain unversal character names and other implementation-defined multibyte characters. Unversal characters must not be used to place a diagit at the beginning of an identifier and further restricted to be "letter-like" character and not puncuators.

             (c). Identifiers sensitive of case.

             (d). All identifiers may not beginning with an underscore and followed by ethier a capital(uppercase) letter or another underscore because which all are reserved for standard library.

             (e). Internal identidfiers: C89 requires implementation to permit a minimum of 31 significant character in identifiers, and C99 raises this minimum to 63 characters.

             (f). External identifiers: C89 requires a minimum capacity of only six characters, not counting letter case. C99 raises this to 31 characters, including letter case. But allowing unversal character names to be treated as 6 characters or 10 characters.

 

    (3). Keywords

              auto _Bool break case char _Complex const continue default restrict do double

              else enum extern float for goto if _Imaginary inline int long register return short

              signed sizeof static struct switch typedef union unsigned void volatile while

 

    (4). Constants. It's more complicated than forwards. The next section will note the constants.