Lexical Structure (JDK8-jsl)
in In-My-Mind with 77 comments

Lexical Structure (JDK8-jsl)

in In-My-Mind with 77 comments

Unicode

Identifiers

Identifier:
    IdentifierChars but not a Keyword or BooleanLiteral or NullLiteral
IdentifierChars:
    JavaLetter {JavaLetterOrDigit}
JavaLetter:
    any Unicode character that is a "Java letter"
JavaLetterOrDigit:
    any Unicode character that is a "Java letter-or-digit"

Keywords, Boolean Literals, Null Literals

abstract   continue   for          new         switch
assert     default    if           package     synchronized
boolean    do         goto         private     this
break      double     implements   protected   throw
byte       else       import       public      throws
case       enum       instanceof   return      transient
catch      extends    int          short       try
char       final      interface    static      void
class      finally    long         strictfp    volatile
const      float      native       super       while

Integer

IntegerLiteral:
    DecimalIntegerLiteral
    HexIntegerLiteral
    OctalIntegerLiteral
    BinaryIntegerLiteral
DecimalIntegerLiteral:
    DecimalNumeral [IntegerTypeSuffix]
HexIntegerLiteral:
    HexNumeral [IntegerTypeSuffix]
OctalIntegerLiteral:
    OctalNumeral [IntegerTypeSuffix]
BinaryIntegerLiteral:
    BinaryNumeral [IntegerTypeSuffix]
IntegerTypeSuffix:
    (one of)
    l L

Boolean

ture/ false

Character

String

Escapes

EscapeSequence:
    \ b (backspace BS, Unicode \u0008)
    \ t (horizontal tab HT, Unicode \u0009)
    \ n (linefeed LF, Unicode \u000a)
    \ f (form feed FF, Unicode \u000c)
    \ r (carriage return CR, Unicode \u000d)
    \ " (double quote ", Unicode \u0022)
    \ ' (single quote ', Unicode \u0027)
    \ \ (backslash \, Unicode \u005c)
    OctalEscape (octal value, Unicode \u0000 to \u00ff)
OctalEscape:
    \ OctalDigit
    \ OctalDigit OctalDigit
    \ ZeroToThree OctalDigit OctalDigit
OctalDigit:
    (one of)
    0 1 2 3 4 5 6 7
ZeroToThree:
    (one of)
    0 1 2 3

Null

Separators (Punctuators)

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

Operators

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

Ref.

Lexical Structure

Comments are closed.