#include <assert.h>#include <stdint.h>#include <stdlib.h>#include <dirent.h>#include <string.h>#include <fstream>#include <iostream>#include <string>#include <sstream>#include <unicode/uchar.h>#include <libsherpa/utf8.hxx>#include "LitValue.hxx"Go to the source code of this file.
Defines | |
| #define | DEBUG_DECODE false |
| #define | ESCAPED_LITERAL(s, cp) |
| Map from all of the named, escaped literals to the corresponding code points. | |
| #define | SINGLE_LITERAL(s, cp) |
Functions | |
| static bool | needsBackslashEscape (uint32_t c) |
| static bool | asciiPrintableCharacter (uint32_t c) |
| #define DEBUG_DECODE false |
| #define ESCAPED_LITERAL | ( | s, | |||
| cp | ) |
Value:
Map from all of the named, escaped literals to the corresponding code points.There were getting to be too many of these to keep in sync, so I wanted one place to maintain them.
This table is only used to validate lexically well-formed escapes. The format for in-string, sexpr-char, and block-char escapes are mutually non-overlapping, so we just stick them all in a single table.
The multi-character literals appear in three forms:
S-expression: # Block character escape: '' Embedded in a string: "...\{formfeed}..."
The single character versions do not have short-form S-expression character variants, because this would interfere with the normal S-expression character syntax.
Definition at line 176 of file LitValue.cxx.
| #define SINGLE_LITERAL | ( | s, | |||
| cp | ) |
| static bool asciiPrintableCharacter | ( | uint32_t | c | ) | [static] |
Definition at line 401 of file LitValue.cxx.
| static bool needsBackslashEscape | ( | uint32_t | c | ) | [static] |
Definition at line 395 of file LitValue.cxx.
1.4.7