Java Grammar (2)--Statement parsing grammar

Source: Internet
Author: User

--------------------------------------------------------------------------------------------------------------- ----extension One (line break definition): lineterminator:the ASCII LF character, also known as "newline" the ASCII CR character, also known as "return "The ASCII CR character followed by the ASCII LF Character---------------------------------------------------------------------------------------------------------------- -----extension Two (line break filter syntax): Inputcharacter:unicodeinputcharacter but not CR or LF----------------------------------------------------------------------------------------------------------------------Expansion Exhibition III (definition of sentence grammar): input:inputelements opt Sub optinputelements:inputelementinputelements inputelementinputelement: WhiteSpaceCommentTokenToken:IdentifierKeywordLiteralSeparatorOperatorSub:the ASCII SUB character, also known as " Control-z "Description: Sentence grammar definition after filtering newline characters the input characters and line terminators that result from escape processing (§3.3) and then Inpu T line recognition (§3.4) is reduced to a sequence of input elemEnts. Those input elements that is not white space (§3.6) or Comments (§3.7) is tokens. The tokens is the terminal symbols of the syntactic grammar (§2.3). White space (§3.6) and Comments (§3.7) can serve to separate tokens, ifadjacent, might is tokenized in another manner . For example, the ASCII Characters-and = in the input can form the operator token-= (§3.12) only if there is nointervenin G white space or comment. As a special concession for compatibility with certain operating systems, the asciisub character (\u001a, or control-z) is ignored if it's the last character in theescaped input stream. Consider tokens x and y in the resulting input stream. If x precedes y, then wesay that's the left of y and that y are to the right of X. For example, in this simple piece of Code:class Empty {}we say that the} token are to the right of the {token, even thoug H it appears, in this two-dimensional representation, downward and to the left of the {token. This Convention AbouTthe use of the words left and right allows us to speak, for example, of the right-hand operandof a binary operator or of The left-hand side of an assignment.

  

Java Grammar (2)--Statement parsing grammar

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.