CharacterStringLiteral =
"'" { CharacterLiteral } "'".
CharacterLiteral =
NonSpecialCharacterLiteral | SpecialCharacterLiteral |
HexadecimalCharacterLiteral.
NonSpecialCharacterLiteral =
any ASCII character except apostrophe ('),
double quote ("), back slash (\), and new line.
SpecialCharacterLiteral =
"\n" | "\t" | "\v" | "\b" | "\r" | "\f" |
"\\" | "\'" | '\"' .
HexadecimalCharacterLiteral = .
"\x" HexadecimalDigit HexadecimalDigit.
Digit =
"0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" |
"8" | "9".
HexadecimalDigit =
Digit |
"A" | "B" | "C" | "D" | "E" | "F" |
"a" | "b" | "c" | "d" | "e" | "f".
Each character symbol corresponds to a character, and is represented by a character literal
enclosed in apostrophes. For instance:
Ordinarily, a character is represented by itself, except the following characters:
A character literal representing a character symbol or appearing in a word symbol can be
written as
For example,
A sequence of several character symbols may be written as a single string consisting of
character literals and enclosed in apostrophes. For instance:
Thus, the sequence of three character symbols