• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • 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
      • Taspi
      • Riscv
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • 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.