• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
        • Soft
        • C
        • Bv
        • Imp-language
        • Event-macros
        • Java
          • Atj
          • Aij
          • Language
            • Syntax
              • Grammar
              • Unicode-escapes
              • Unicode-input-char
              • Escape-sequence
              • Identifiers
              • Primitive-types
              • Reference-types
              • Keywords
              • Unicode-characters
              • Integer-literals
              • String-literals
              • Octal-digits
              • Hexadecimal-digits
              • Decimal-digits
              • Binary-digits
              • Character-literals
                • Unicode-charlit-char
                • Char-literal
                  • Char-literal-fix
                  • Char-literal-case
                  • Char-literal-equiv
                  • Char-literalp
                  • Char-literal-escape
                  • Char-literal-char
                  • Char-literal-kind
                • Unicode-charlit-char-fix
                • Unicode-charlit-char-p
              • Null-literal
              • Floating-point-literals
              • Boolean-literals
              • Package-names
              • Literals
            • Semantics
        • Bitcoin
        • Ethereum
        • Yul
        • Zcash
        • ACL2-programming-language
        • Prime-fields
        • Json
        • Syntheto
        • File-io-light
        • Cryptography
        • Number-theory
        • Lists-light
        • Axe
        • Builtins
        • Solidity
        • Helpers
        • Htclient
        • Typed-lists-light
        • Arithmetic-light
      • X86isa
      • Axe
      • Execloader
    • Math
    • Testing-utilities
  • Character-literals

Char-literal

Fixtype of character literals.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:char → char-literal-char
:escape → char-literal-escape

According to the grammar rule for character-literal [JLS14:3.10.4], a character literal is either a single-character (see unicode-charlit-char) or an escape sequence (see escape-sequence), between single quotes. Abstractly, but without losing any information, we leave the surrounding single quotes implicit, and define character literals via a tagged sum.

The set of values of this fixtype should be isomorphic to the set of strings (or parse trees) defined by the Java grammar rule character-literal. This remains to be proved formally.

Subtopics

Char-literal-fix
Fixing function for char-literal structures.
Char-literal-case
Case macro for the different kinds of char-literal structures.
Char-literal-equiv
Basic equivalence relation for char-literal structures.
Char-literalp
Recognizer for char-literal structures.
Char-literal-escape
Char-literal-char
Char-literal-kind
Get the kind (tag) of a char-literal structure.