2.4 - [lex.pptoken] - [lexing. Preprocessing tag]

xiaoxiao2021-03-06  117

Please don't reprint this article; please don't re-publish in any form; please delete it within 24 hours of downloading this article; it is forbidden to use this article for commercial purposes.

2 Lexical conventions [lex] 2.4 Preprocessing tokens [lex.pptoken] 2 lexical Lexical Conventions [2.4] [lexical marker preprocessing preprocessing token.] Preprocessing-token: header-name identifier pp-number character-literal string-literal preprocessing- Op-or-Punc Each Non-White-Space Character That Cannot Be One of the Above Pretreatment - Tag: Head - Name Identifier Prerequisite - Digital Character - Document String - Text Quantities Prerequisite - Operator - or - Points are not included in the above-mentioned non-empty-white That Is Converted to a token (2.6) Shall Have The Lexical Form of a Keyword, An Identifier, A Litral, An Operator, or a Punctuator. Each can be converted to tag (2.6) The preprocessing marks should have the form of keywords, identifiers, text quantities, operators, or punctuation. A preprocessing token is the minimal lexical element of the language in translation phases 3 through 6. The categories of preprocessing token are: header names, identifiers, preprocessing numbers, character literals, string literals, preprocessing-op-or-punc, and single non -white-space characters that do not lexically match the other preprocessing token categories If a 'or a "character matches the last category, the behavior is undefined Preprocessing tokens can be separated by white space;.. this consists of comments (2.7), or white-space characters (spaces, horizontal tab, new-line, vertical tab, and form-feed), or both. As described in clause 16, in certain circumstances during translation phase 4, white space (or the absence thereof) serves as more than preprocessing token separation. White space can appear within a preprocessing token only as a part of a header name or between the quotation characters in a character literal or string literal. preprocessing token is the smallest language from stage 3 to 6 Lord elements.

The pretreatment is marked with the following categories: head name, identifier, preprocessing number, character, character, string, pretreatment operator or punctuation, and a single non-blank character that does not meet the above lexical types. If a 'or "character belongs to the last class, its behavior is undefined. The pre-processed tag is separated by blank, blank by comments (2.7), or blank characters (spaces, horizontal tables, wraps, vertical tables, and switching), or It consists of both. As in Chapter 16, in some cases, in some cases, blank (possibly) may not only separate the pre-processing tag. Only as part of the header, or in character text When the quantity or string quantity is between the quota characters, the blank can appear inside the pre-processing mark. If The Input Stream Has Been Parsed Into Preprocessing Tokens Up to a Given Character, The Next Preprocessing token Is The Longest Sequence of Characters That COULD CONSTITUTE A PreProcessing token, Even if That Would Cause Further Lexical Analysis To Fail. If a stream has been parsed to a pretreatment mark, the next pre-processing mark will construct a pretreatment mark. The long character sequence consists, regardless of the further lexical analysis fail. [Example: the program fragment 1ex is pased as a preprossion Number token (One That IS Not a Valid Floating or Integer Literal token), Even Though a Parse As the Pair of preprocessing tokens 1 and Ex might produce a valid expression (for example, if Ex were a macro defined as 1). Similarly, the program fragment 1E1 is parsed as a preprocessing number (one that is a valid floating literal token), whether or NOT E IS A Macro Name.] [Example: Whether the pre-processing tag 1 and EX generate a valid expression (such as EX is A macro that is defined as a 1), the program clip 1EX is always parsed to a pretreatment digital tag (an invalid floating point or integer tag). Similarly, whether e is a macro name, the program clip 1e1 is always parsed as a pretreatment number (a valid floating point quantity tag).

转载请注明原文地址:https://www.9cbs.com/read-98704.html

New Post(0)