#include <LitValue.hxx>
Public Member Functions | |
| std::string | asString () const |
| LitValue () | |
Static Public Member Functions | |
| static bool | valid_char_printable (ucs4_t ucs4) |
| static bool | valid_charpoint (ucs4_t ucs4) |
| static bool | valid_charpunct (ucs4_t ucs4) |
| static unsigned | validate_string (const char *s) |
| static long | digitValue (ucs4_t, unsigned radix) |
If c is a digit character in radix radix, return its decimal value. | |
| static ucs4_t | GetEscapedCodePoint (const char *escapedLiteral) |
| static ucs4_t | DecodeNumericCharacter (const char *s, const char **next) |
| static ucs4_t | DecodeBlockCharacter (const char *s) |
| static ucs4_t | DecodeStringCharacter (const char *s, const char **next) |
| static ucs4_t | DecodeCharacter (const std::string &) |
Data Fields | |
| LiteralType | litType |
| bool | b |
| unsigned long | c |
| sherpa::BigNum | i |
| double | d |
| std::string | s |
Static Public Attributes | |
| static EscapedLiteral | EscapedLiteralMap [] |
| static const size_t | EscapedLiteralMapLength |
Data Structures | |
| struct | EscapedLiteral |
Definition at line 56 of file LitValue.hxx.
| LitValue::LitValue | ( | ) | [inline] |
| std::string LitValue::asString | ( | ) | const |
Definition at line 409 of file LitValue.cxx.
References asciiPrintableCharacter(), b, c, d, i, litType, lt_bool, lt_char, lt_float, lt_int, lt_string, needsBackslashEscape(), and s.
Referenced by operator<<().
| ucs4_t LitValue::DecodeBlockCharacter | ( | const char * | s | ) | [static] |
Definition at line 340 of file LitValue.cxx.
References DecodeNumericCharacter(), GetEscapedCodePoint(), sherpa::utf8_decode(), valid_charpoint(), and valid_charpunct().
Referenced by DecodeCharacter().
| ucs4_t LitValue::DecodeCharacter | ( | const std::string & | ) | [static] |
Definition at line 380 of file LitValue.cxx.
References DecodeBlockCharacter().
Referenced by AST::makeCharLit().
| ucs4_t LitValue::DecodeNumericCharacter | ( | const char * | s, | |
| const char ** | next | |||
| ) | [static] |
Definition at line 221 of file LitValue.cxx.
References digitValue().
Referenced by DecodeBlockCharacter().
| ucs4_t LitValue::DecodeStringCharacter | ( | const char * | s, | |
| const char ** | next | |||
| ) | [static] |
Definition at line 272 of file LitValue.cxx.
References c, DEBUG_DECODE, GetEscapedCodePoint(), and sherpa::utf8_decode().
Referenced by toc(), and validate_string().
| long LitValue::digitValue | ( | ucs4_t | , | |
| unsigned | radix | |||
| ) | [static] |
If c is a digit character in radix radix, return its decimal value.
Definition at line 57 of file LitValue.cxx.
Referenced by DecodeNumericCharacter().
| ucs4_t LitValue::GetEscapedCodePoint | ( | const char * | escapedLiteral | ) | [static] |
Definition at line 209 of file LitValue.cxx.
References EscapedLiteralMap, EscapedLiteralMapLength, i, and s.
Referenced by DecodeBlockCharacter(), and DecodeStringCharacter().
| bool LitValue::valid_char_printable | ( | ucs4_t | ucs4 | ) | [static] |
| bool LitValue::valid_charpoint | ( | ucs4_t | ucs4 | ) | [static] |
Definition at line 118 of file LitValue.cxx.
References valid_char_printable().
Referenced by DecodeBlockCharacter().
| bool LitValue::valid_charpunct | ( | ucs4_t | ucs4 | ) | [static] |
| unsigned LitValue::validate_string | ( | const char * | s | ) | [static] |
| bool LitValue::b |
| unsigned long LitValue::c |
Definition at line 60 of file LitValue.hxx.
Referenced by asString(), DecodeStringCharacter(), and validate_string().
| double LitValue::d |
Initial value:
{
ESCAPED_LITERAL("space", ' '),
ESCAPED_LITERAL("linefeed", '\n'),
SINGLE_LITERAL("n", '\n' ),
ESCAPED_LITERAL("return", '\r'),
SINGLE_LITERAL("r", '\r' ),
ESCAPED_LITERAL("tab", '\t'),
SINGLE_LITERAL("t", '\t' ),
ESCAPED_LITERAL("backspace", '\b'),
SINGLE_LITERAL("b", '\b' ),
ESCAPED_LITERAL("formfeed", '\f'),
SINGLE_LITERAL("f", '\f' ),
SINGLE_LITERAL("s", ' ' ),
ESCAPED_LITERAL("backslash", '\\'),
SINGLE_LITERAL("\\", '\\' ),
ESCAPED_LITERAL("dquote", '\"'),
SINGLE_LITERAL("\"", '\"' ),
ESCAPED_LITERAL("squote", '\''),
}
Definition at line 83 of file LitValue.hxx.
Referenced by GetEscapedCodePoint().
const size_t LitValue::EscapedLiteralMapLength [static] |
Initial value:
(sizeof(LitValue::EscapedLiteralMap) / sizeof(LitValue::EscapedLiteralMap[0]))
Definition at line 84 of file LitValue.hxx.
Referenced by GetEscapedCodePoint().
| std::string LitValue::s |
1.4.7