Identifiers
Java identifiers [JLS25:3.8].
Java identifiers are sequences of characters that, among other things,
must differ from Java keywords.
Since, as discussed in the topic on keywords, there are reserved and contextual Java keywords,
correspondingly there are slightly different kinds of Java identifiers.
One, and the main, kind excludes only reserved keywords:
these identifiers are usable in most contexts,
and correspond to the grammar rule for identifier.
The other two kinds further exclude
some of the contextual keywords,
and correspond to the grammar rules for
type-identifier and unqualified-method-identifier.
Here we formalize these three kinds of identifiers.
Subtopics
- Ascii-identifier-part-p
- Check if an ASCII character can be non-starting part of identifiers.
- Identifier
- Fixtype of Java identifiers, for most contexts.
- Tidentifier
- Fixtype of Java type identifiers.
- Umidentifier
- Fixtype of Java unqualified method identifiers.
- Ascii-identifier-ignore-p
- Check if an ASCII character is ignorable in identifiers.
- Ascii-identifier-start-p
- Check if an ASCII character can start identifiers.
- Nonascii-identifier-part-p
- Check if a non-ASCII Java Unicode character
can be non-starting part of identifiers.
- Nonascii-identifier-ignore-p
- Check if a non-ASCII Java Unicode character
is ignorable in identifiers.
- Nonascii-identifier-start-p
- Check if a non-ASCII Java Unicode character can start identifiers.
- Identifier-part-listp
- Check if a list of Java Unicode characters consists of
only characters that can be non-starting parts of identifiers.
- Identifier-start-p
- Check if a Java Unicode character can start identifiers.
- Identifier-part-p
- Check if a Java Unicode character
can be non-starting part of identifiers.
- Identifier-ignore-p
- Check if a Java Unicode character is ignorable in identifiers.
- Tidentifierp
- Recognizer for tidentifier.
- No-identifier-ignore-p
- Check if a list of Java Unicode characters
does not include any character that is ignorable in identifiers.
- Umidentifier-fix
- Fixer for umidentifierp.
- Tidentifier-fix
- Fixer for tidentifierp.
- Identifierp
- Recognizer for identifier.
- Identifier-fix
- Fixer for identifierp.
- Umidentifierp
- Recognizer for umidentifier.
- Identifier-list
- Fixtype of lists of Java identifiers, for most contexts.