ANTLR3_STRING_FACTORY_struct(3)
π ANTLR3_STRING_FACTORY_struct(3) β the ANTLR3C manual, bestie edition π
okay so. you opened section 3 of the ANTLR3C manual and landed on ANTLR3_STRING_FACTORY_struct and you're like "what is this". babe. it's the string factory. it makes strings. it tracks them. it's literally the girlboss of string allocation and I'm obsessed. sit down, grab a strawberry, let's go πβ¨
β¨ NAME β¨
ANTLR3_STRING_FACTORY_struct β Definition of the string factory interface, which creates and tracks strings for you of various shapes and sizes.
like. it's giving personal assistant for strings. shapes AND sizes. no cap. π
πΈ SYNOPSIS πΈ
#include <antlr3string.h>
π Data Fields
void(* close )(struct ANTLR3_STRING_FACTORY_struct *factory)β Pointer to function that closes the factory. goodbye bestie πvoid(* destroy )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)β Pointer to function that deletes the string altogether. not just a trim, a full deletion, it's over.ANTLR3_UINT32 indexβ the index field, just vibing there.pANTLR3_STRING(* newPtr )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)β Pointer to function that manufactures a string from a given pointer and length.pANTLR3_STRING(* newPtr8 )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)β Pointer to function that manufactures a string from a given pointer and length.pANTLR3_STRING(* newRaw )(struct ANTLR3_STRING_FACTORY_struct *factory)β Pointer to function that manufactures an empty string. blank slate energy β¨pANTLR3_STRING(* newSize )(struct ANTLR3_STRING_FACTORY_struct *factory, ANTLR3_UINT32 size)β Pointer to function that manufactures a raw string with no text in it but space for size characters.pANTLR3_STRING(* newStr )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)β Pointer to function that manufactures a string from a given pointer and works out the length.pANTLR3_STRING(* newStr8 )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)β Pointer to function that manufactures a string from a given pointer and length.pANTLR3_STRING(* printable )(struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)β Pointer to function that returns a copy of the string in printable form without any control characters in it. no sneaky control chars allowed, we're sanitized πpANTLR3_VECTOR stringsβ List of all the strings that have been allocated by the factory. the receipts. she keeps them. π
π¦ Detailed Description
Definition of the string factory interface, which creates and tracks strings for you of various shapes and sizes.
π Field Documentation π
π void(* ANTLR3_STRING_FACTORY_struct::close) (struct ANTLR3_STRING_FACTORY_struct *factory)
Pointer to function that closes the factory.
Referenced by antlr3InputClose(), and antlr3StringFactoryNew().
π void(* ANTLR3_STRING_FACTORY_struct::destroy) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)
Pointer to function that deletes the string altogether.
Referenced by antlr3StringFactoryNew().
π ANTLR3_UINT32 ANTLR3_STRING_FACTORY_struct::index
Referenced by antlr3StringFactoryNew(), destroy(), newRaw8(), and newRawUTF16().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newPtr) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Pointer to function that manufactures a string from a given pointer and length. The pointer is assumed to point to characters in the same encoding as the string type, hence if this is a UTF16 string the pointer should point to UTF16 characters.
β οΈ read that twice bestie β same encoding as the string type. UTF16 string means UTF16 characters. do NOT mix, the vibe check will fail.
Referenced by antlr38BitSubstr(), antlr3StringFactoryNew(), antlr3UTF16Substr(), antlr3UTF32Substr(), createTokenFromToken(), newStrUTF16_UTF16(), subString8(), subStringUTF16(), toString(), and toUTF8_8().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newPtr8) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string, ANTLR3_UINT32 size)
Pointer to function that manufactures a string from a given pointer and length. The pointer is assumed to point at 8 bit characters which must be converted on the fly to the encoding of the actual string.
Referenced by antlr3StringFactoryNew(), newStr8(), and newStrUTF16_8().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newRaw) (struct ANTLR3_STRING_FACTORY_struct *factory)
Pointer to function that manufactures an empty string.
Referenced by antlr3StringFactoryNew(), newSize8(), newSizeUTF16(), toString(), toStringSS(), toStringSS(), toStringTree(), and toStringWork().
(and yes, toStringSS() really does show up twice in that list. we don't gatekeep, we report faithfully. π)
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newSize) (struct ANTLR3_STRING_FACTORY_struct *factory, ANTLR3_UINT32 size)
Pointer to function that manufactures a raw string with no text in it but space for size characters.
Referenced by antlr3StringFactoryNew(), createNode(), errorNode(), newPtr8(), newPtrUTF16_8(), newPtrUTF16_UTF16(), printable8(), printableUTF16(), serializeNode(), and serializeToken().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newStr) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)
Pointer to function that manufactures a string from a given pointer and works out the length. The pointer is assumed to point to characters in the same encoding as the string itself, i.e. UTF16 if a UTF16 string and so on.
Referenced by antlr38BitReuse(), and antlr3StringFactoryNew().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::newStr8) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_UINT8 string)
Pointer to function that manufactures a string from a given pointer and length. The pointer should point to 8 bit characters regardless of the actual encoding of the string. The 8 bit characters will be converted to the actual string encoding on the fly.
Referenced by antlr3FileStreamNew(), antlr3StringFactoryNew(), antlr3StringStreamNew(), getText(), makeDot(), and toUTF8_UTF16().
π pANTLR3_STRING(* ANTLR3_STRING_FACTORY_struct::printable) (struct ANTLR3_STRING_FACTORY_struct *factory, pANTLR3_STRING string)
Pointer to function that returns a copy of the string in printable form without any control characters in it.
Referenced by antlr3StringFactoryNew().
π pANTLR3_VECTOR ANTLR3_STRING_FACTORY_struct::strings
List of all the strings that have been allocated by the factory.
Referenced by antlr3StringFactoryNew(), closeFactory(), destroy(), newRaw8(), and newRawUTF16().
π Author π
Generated automatically by Doxygen for ANTLR3C from the source code.
(not me being emotionally moved by an autogenerated Doxygen page. it's fine. I'm fine. π)
okay so that's the whole thing, you ate it up, main character energy, periodt π π¦
Version 3.3.1 β Tue Jul 29 2025 β and that's the footer bestie, we're done here, go forth and manufacture strings responsibly β¨ππ
π¦ 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