%%%
 %% Section 3.10.4: Character Literals
 %%
 %% @author Martin Bravenboer <martin@cs.uu.nl>
 %%%
module languages/java-14/lexical/literals/CharacterLiterals
imports
  languages/java-14/lexical/literals/EscapeSequences
  languages/java-14/lexical/UnicodeEscapes

exports
  sorts
    CharLiteral
    CharContent
    SingleChar

  syntax
    CharLiteral   -> <CharLiteral-CF>

    "'" CharContent "'" -> CharLiteral {cons("Char")}
    SingleChar    -> CharContent {cons("Single")}
    UnicodeEscape -> CharContent
    EscapeSeq     -> CharContent

    ~[\12\13\'\\] -> SingleChar
