--------------------------------------------------------------------------------------------------------------- ----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