Esempio n. 1
0
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;
}
Esempio n. 2
0
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;
}
Esempio n. 3
0
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;
    }
}
Esempio n. 4
0
CcNode_t *
CcEBNF_NewNode(CcEBNF_t * self, CcNode_t * node)
{
    return (CcNode_t *)CcArrayList_New(&self->nodes, &node->base);
}
Esempio n. 5
0
void
CcXmlSpec_AddAttr(CcXmlSpec_t * self, const char * tokenName,
		  const CcsToken_t * token)
{
    CcArrayList_New(&self->Attrs, CcXmlData(tokenName, token));
}
Esempio n. 6
0
void
CcXmlSpec_AddProcessInstruction(CcXmlSpec_t * self, const char * tokenName,
				const CcsToken_t * token)
{
    CcArrayList_New(&self->PInstructions, CcXmlData(tokenName, token));
}