include/antlr3convertutf.h(3)
π NAME π
okay bestie, this is include/antlr3convertutf.h(3) from ANTLR3C β the header that's lowkey the Unicode translator of the whole operation. It's giving "let me convert your UTF-16 to UTF-32 without breaking a sweat" and honestly? iconic. β¨
β¨ SYNOPSIS β¨
#include <antlr3defs.h>
π Macros π
#define halfBase ((UTF32)0x0010000UL)
#define halfMask ((UTF32)0x3FFUL)
#define halfShift ((UTF32)10)
#define UNI_MAX_BMP (UTF32)0x0000FFFF
#define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF
#define UNI_MAX_UTF16 (UTF32)0x0010FFFF
#define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF
#define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD
#define UNI_SUR_HIGH_END (UTF32)0xDBFF
#define UNI_SUR_HIGH_START (UTF32)0xD800
#define UNI_SUR_LOW_END (UTF32)0xDFFF
#define UNI_SUR_LOW_START (UTF32)0xDC00
π§ Typedefs π§
typedef ANTLR3_UINT16 UTF16
typedef ANTLR3_UINT32 UTF32
typedef ANTLR3_UINT8 UTF8
π¦ Enumerations π¦
enum ConversionFlags { strictConversion = 0, lenientConversion }
enum ConversionResult { conversionOK, sourceExhausted, targetExhausted,
sourceIllegal }
π₯ Functions π₯
ConversionResult ConvertUTF16toUTF32 (const UTF16 **sourceStart, const
UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd,
ConversionFlags flags)
ConversionResult ConvertUTF16toUTF8 (const UTF16 **sourceStart, const
UTF16 *sourceEnd, UTF8 **targetStart, UTF8 *targetEnd,
ConversionFlags flags)
ConversionResult ConvertUTF32toUTF16 (const UTF32 **sourceStart, const
UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd,
ConversionFlags flags)
ConversionResult ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32
*sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags
flags)
ConversionResult ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *
sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags
flags)
ConversionResult ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *
sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags
flags)
ANTLR3_BOOLEAN isLegalUTF8Sequence (const UTF8 *source, const UTF8
*sourceEnd)
π₯ Macro Definition Documentation π₯
π #define halfBase ((UTF32)0x0010000UL) π
Referenced by antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().
π #define halfMask ((UTF32)0x3FFUL) π
Referenced by ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().
π #define halfShift ((UTF32)10) π
Referenced by antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().
π #define UNI_MAX_BMP (UTF32)0x0000FFFF π
Referenced by ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().
π #define UNI_MAX_LEGAL_UTF32 (UTF32)0x0010FFFF π
Referenced by ConvertUTF32toUTF16(), ConvertUTF32toUTF8(), and ConvertUTF8toUTF32().
π #define UNI_MAX_UTF16 (UTF32)0x0010FFFF π
Referenced by ConvertUTF8toUTF16().
π #define UNI_MAX_UTF32 (UTF32)0x7FFFFFFF π
π #define UNI_REPLACEMENT_CHAR (UTF32)0x0000FFFD π
Referenced by ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), ConvertUTF32toUTF8(), ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
π #define UNI_SUR_HIGH_END (UTF32)0xDBFF π
Referenced by antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), and ConvertUTF16toUTF8().
π #define UNI_SUR_HIGH_START (UTF32)0xD800 π
Referenced by antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), ConvertUTF32toUTF8(), ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
π #define UNI_SUR_LOW_END (UTF32)0xDFFF π
Referenced by antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), ConvertUTF32toUTF8(), ConvertUTF8toUTF16(), and ConvertUTF8toUTF32().
π #define UNI_SUR_LOW_START (UTF32)0xDC00 π
Referenced by antlr3UTF16Consume(), antlr3UTF16ConsumeBE(), antlr3UTF16ConsumeLE(), antlr3UTF16LA(), antlr3UTF16LABE(), antlr3UTF16LALE(), ConvertUTF16toUTF32(), ConvertUTF16toUTF8(), ConvertUTF32toUTF16(), and ConvertUTF8toUTF16().
π§ Typedef Documentation π§
typedef ANTLR3_UINT16 UTF16typedef ANTLR3_UINT32 UTF32typedef ANTLR3_UINT8 UTF8
π Enumeration Type Documentation π
enum ConversionFlags
Enumerator
strictConversionlenientConversion
enum ConversionResult
Enumerator
conversionOKsourceExhaustedtargetExhaustedsourceIllegal
π Function Documentation π
π₯ ConversionResult ConvertUTF16toUTF32 π₯
ConversionResult ConvertUTF16toUTF32 (const UTF16 **sourceStart, const
UTF16 *sourceEnd, UTF32 **targetStart, UTF32 *targetEnd,
ConversionFlags flags)
References conversionOK, halfBase, halfShift, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, UNI_SUR_HIGH_END, UNI_SUR_HIGH_START, UNI_SUR_LOW_END, and UNI_SUR_LOW_START.
π₯ ConversionResult ConvertUTF16toUTF8 π₯
ConversionResult ConvertUTF16toUTF8 (const UTF16 **sourceStart, const UTF16
*sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags
flags)
References conversionOK, firstByteMark, halfBase, halfShift, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_END, UNI_SUR_HIGH_START, UNI_SUR_LOW_END, and UNI_SUR_LOW_START.
Referenced by toUTF8_UTF16().
π₯ ConversionResult ConvertUTF32toUTF16 π₯
ConversionResult ConvertUTF32toUTF16 (const UTF32 **sourceStart, const
UTF32 *sourceEnd, UTF16 **targetStart, UTF16 *targetEnd,
ConversionFlags flags)
References conversionOK, halfBase, halfMask, halfShift, sourceIllegal, strictConversion, targetExhausted, UNI_MAX_BMP, UNI_MAX_LEGAL_UTF32, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, UNI_SUR_LOW_END, and UNI_SUR_LOW_START.
π₯ ConversionResult ConvertUTF32toUTF8 π₯
ConversionResult ConvertUTF32toUTF8 (const UTF32 **sourceStart, const UTF32
*sourceEnd, UTF8 **targetStart, UTF8 *targetEnd, ConversionFlags
flags)
References conversionOK, firstByteMark, sourceIllegal, strictConversion, targetExhausted, UNI_MAX_LEGAL_UTF32, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, and UNI_SUR_LOW_END.
π₯ ConversionResult ConvertUTF8toUTF16 π₯
ConversionResult ConvertUTF8toUTF16 (const UTF8 **sourceStart, const UTF8 *
sourceEnd, UTF16 **targetStart, UTF16 *targetEnd, ConversionFlags
flags)
References conversionOK, halfBase, halfMask, halfShift, isLegalUTF8(), offsetsFromUTF8, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, trailingBytesForUTF8, UNI_MAX_BMP, UNI_MAX_UTF16, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, UNI_SUR_LOW_END, and UNI_SUR_LOW_START.
π₯ ConversionResult ConvertUTF8toUTF32 π₯
ConversionResult ConvertUTF8toUTF32 (const UTF8 **sourceStart, const UTF8 *
sourceEnd, UTF32 **targetStart, UTF32 *targetEnd, ConversionFlags
flags)
References conversionOK, isLegalUTF8(), offsetsFromUTF8, sourceExhausted, sourceIllegal, strictConversion, targetExhausted, trailingBytesForUTF8, UNI_MAX_LEGAL_UTF32, UNI_REPLACEMENT_CHAR, UNI_SUR_HIGH_START, and UNI_SUR_LOW_END.
π₯ ANTLR3_BOOLEAN isLegalUTF8Sequence π₯
ANTLR3_BOOLEAN isLegalUTF8Sequence (const UTF8 *source, const UTF8 *
sourceEnd)
References ANTLR3_FALSE, isLegalUTF8(), and trailingBytesForUTF8.
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code.
k that's the whole glow-up bestie β Version 3.3.1, Tue Jul 29 2025 00:00, include/antlr3convertutf.h(3) πβ¨π¦
π¦ where this page comes from
- fedora 43: antlr3-C-devel 1:3.4-3.5.3.14.fc43 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms