Lines Matching refs:factory
38 static pANTLR3_STRING newRaw8 (pANTLR3_STRING_FACTORY factory);
39 static pANTLR3_STRING newRawUTF16 (pANTLR3_STRING_FACTORY factory);
40 static pANTLR3_STRING newSize8 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size);
41 static pANTLR3_STRING newSizeUTF16 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size);
42 static pANTLR3_STRING newPtr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string, ANTLR3_U…
43 static pANTLR3_STRING newPtrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string, AN…
44 static pANTLR3_STRING newPtrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string…
45 static pANTLR3_STRING newStr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string);
46 static pANTLR3_STRING newStrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string);
47 static pANTLR3_STRING newStrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 string…
48 static void destroy (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string);
49 static pANTLR3_STRING printable8 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string);
50 static pANTLR3_STRING printableUTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string);
51 static void closeFactory(pANTLR3_STRING_FACTORY factory);
100 pANTLR3_STRING_FACTORY factory; in antlr3StringFactoryNew() local
104 factory = (pANTLR3_STRING_FACTORY) ANTLR3_CALLOC(1, sizeof(ANTLR3_STRING_FACTORY)); in antlr3StringFactoryNew()
106 if (factory == NULL) in antlr3StringFactoryNew()
113 factory->strings = antlr3VectorNew(0); in antlr3StringFactoryNew()
114 factory->index = 0; in antlr3StringFactoryNew()
116 if (factory->strings == NULL) in antlr3StringFactoryNew()
118 ANTLR3_FREE(factory); in antlr3StringFactoryNew()
149 factory->newRaw = newRawUTF16; in antlr3StringFactoryNew()
150 factory->newSize = newSizeUTF16; in antlr3StringFactoryNew()
151 factory->newPtr = newPtrUTF16_UTF16; in antlr3StringFactoryNew()
152 factory->newPtr8 = newPtrUTF16_8; in antlr3StringFactoryNew()
153 factory->newStr = newStrUTF16_UTF16; in antlr3StringFactoryNew()
154 factory->newStr8 = newStrUTF16_8; in antlr3StringFactoryNew()
155 factory->printable = printableUTF16; in antlr3StringFactoryNew()
156 factory->destroy = destroy; in antlr3StringFactoryNew()
157 factory->close = closeFactory; in antlr3StringFactoryNew()
165 factory->newRaw = newRaw8; in antlr3StringFactoryNew()
166 factory->newSize = newSize8; in antlr3StringFactoryNew()
167 factory->newPtr = newPtr8; in antlr3StringFactoryNew()
168 factory->newPtr8 = newPtr8; in antlr3StringFactoryNew()
169 factory->newStr = newStr8; in antlr3StringFactoryNew()
170 factory->newStr8 = newStr8; in antlr3StringFactoryNew()
171 factory->printable = printable8; in antlr3StringFactoryNew()
172 factory->destroy = destroy; in antlr3StringFactoryNew()
173 factory->close = closeFactory; in antlr3StringFactoryNew()
176 return factory; in antlr3StringFactoryNew()
186 newRaw8 (pANTLR3_STRING_FACTORY factory) in newRaw8() argument
200 string->factory = factory; in newRaw8()
204 …factory->strings->set(factory->strings, factory->index, (void *) string, (void (ANTLR3_CDECL *)(vo… in newRaw8()
205 string->index = factory->index++; in newRaw8()
215 newRawUTF16 (pANTLR3_STRING_FACTORY factory) in newRawUTF16() argument
229 string->factory = factory; in newRawUTF16()
233 …factory->strings->set(factory->strings, factory->index, (void *) string, (void (ANTLR3_CDECL *)(vo… in newRawUTF16()
234 string->index = factory->index++; in newRawUTF16()
351 return string->factory->newPtr(string->factory, (pANTLR3_UINT8)(string->chars), string->len); in toUTF8_8()
372 utf8String = string->factory->newStr8(string->factory, (pANTLR3_UINT8)""); in toUTF8_UTF16()
421 newSize8 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) in newSize8() argument
425 string = factory->newRaw(factory); in newSize8()
449 newSizeUTF16 (pANTLR3_STRING_FACTORY factory, ANTLR3_UINT32 size) in newSizeUTF16() argument
453 string = factory->newRaw(factory); in newSizeUTF16()
476 newPtr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) in newPtr8() argument
480 string = factory->newSize(factory, size); in newPtr8()
509 newPtrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) in newPtrUTF16_8() argument
515 string = factory->newSize(factory, size); in newPtrUTF16_8()
557 newPtrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr, ANTLR3_UINT32 size) in newPtrUTF16_UTF16() argument
561 string = factory->newSize(factory, size); in newPtrUTF16_UTF16()
592 newStr8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) in newStr8() argument
594 return factory->newPtr8(factory, ptr, (ANTLR3_UINT32)strlen((const char *)ptr)); in newStr8()
603 newStrUTF16_8 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) in newStrUTF16_8() argument
605 return factory->newPtr8(factory, ptr, (ANTLR3_UINT32)strlen((const char *)ptr)); in newStrUTF16_8()
614 newStrUTF16_UTF16 (pANTLR3_STRING_FACTORY factory, pANTLR3_UINT8 ptr) in newStrUTF16_UTF16() argument
628 return factory->newPtr(factory, ptr, count); in newStrUTF16_UTF16()
632 destroy (pANTLR3_STRING_FACTORY factory, pANTLR3_STRING string) in destroy() argument
643 factory->strings->del(factory->strings, strIndex); in destroy()
649 factory->index--; in destroy()
655 if (strIndex< factory->index) in destroy()
663 for (i = strIndex; i < factory->index; i++) in destroy()
667 ((pANTLR3_STRING)(factory->strings->elements[i].element))->index = i; in destroy()
677 printable8(pANTLR3_STRING_FACTORY factory, pANTLR3_STRING instr) in printable8() argument
688 string = factory->newSize(factory, instr->len *2 + 1); in printable8()
724 printableUTF16(pANTLR3_STRING_FACTORY factory, pANTLR3_STRING instr) in printableUTF16() argument
737 string = factory->newSize(factory, instr->len *2 + 1); in printableUTF16()
782 closeFactory (pANTLR3_STRING_FACTORY factory) in closeFactory() argument
787 factory->strings->free(factory->strings); in closeFactory()
791 ANTLR3_FREE((void *)factory); in closeFactory()
1288 …newStr = string->factory->newPtr(string->factory, string->chars + startIndex, endIndex - startInd… in subString8()
1305 …newStr = string->factory->newPtr(string->factory, (pANTLR3_UINT8)((pANTLR3_UINT16)(string->chars)… in subStringUTF16()
1372 newStr = newRaw8(string->factory); in to8_UTF16()