void CcGlobals_NewSection(CcGlobals_t * self, const char * secname, CcsPosition_t * pos) { CcSection_t * section = (CcSection_t *) CcArrayList_New(&self->sections, CcObject(&SectionType)); section->name = CcStrdup(secname); section->pos = pos; }
int CcSyntax_SyncError(CcSyntax_t * self, const CcSymbol_t * sym) { CcSyntaxError_t * error = (CcSyntaxError_t *) CcArrayList_New(&self->errors, CcObject(&CcSyntaxErrorType)); error->type = cet_sync; error->sym = sym; return error->base.index; }
static void CcSyntax_Errors(CcSyntax_t * self) { CcArrayListIter_t iter; const CcSymbol_t * sym; CcSyntaxError_t * error; const CcArrayList_t * terminals = &self->globals->symtab.terminals; for (sym = (const CcSymbol_t *)CcArrayList_FirstC(terminals, &iter); sym; sym = (const CcSymbol_t *)CcArrayList_NextC(terminals, &iter)) { error = (CcSyntaxError_t *) CcArrayList_New(&self->errors, CcObject(&CcSyntaxErrorType)); error->type = cet_t; error->sym = sym; } }
CcNode_t * CcEBNF_NewNode(CcEBNF_t * self, CcNode_t * node) { return (CcNode_t *)CcArrayList_New(&self->nodes, &node->base); }
void CcXmlSpec_AddAttr(CcXmlSpec_t * self, const char * tokenName, const CcsToken_t * token) { CcArrayList_New(&self->Attrs, CcXmlData(tokenName, token)); }
void CcXmlSpec_AddProcessInstruction(CcXmlSpec_t * self, const char * tokenName, const CcsToken_t * token) { CcArrayList_New(&self->PInstructions, CcXmlData(tokenName, token)); }