• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
        • Soft
        • Bv
        • Imp-language
        • Ethereum
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
                • Ascii-identifier-part-p
                • Identifier
                • Tidentifier
                • Umidentifier
                • Ascii-identifier-ignore-p
                • Ascii-identifier-start-p
                • Nonascii-identifier-part-p
                • Nonascii-identifier-ignore-p
                • Nonascii-identifier-start-p
                • Identifier-part-listp
                • Identifier-start-p
                • Identifier-part-p
                • Identifier-ignore-p
                • Tidentifierp
                • No-identifier-ignore-p
                • Umidentifier-fix
                • Tidentifier-fix
                • Identifierp
                • Identifier-fix
                • Umidentifierp
                • Identifier-list
              • Primitive-types
              • Reference-types
              • Unicode-characters
              • Keywords
              • Integer-literals
              • String-literals
              • Octal-digits
              • Hexadecimal-digits
              • Decimal-digits
              • Binary-digits
              • Character-literals
              • Null-literal
              • Floating-point-literals
              • Boolean-literals
              • Package-names
              • Literals
            • Semantics
        • Riscv
        • Bitcoin
        • Zcash
        • Yul
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Axe
        • Lists-light
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Syntax

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.