コード例 #1
0
Identifier::Identifier()
{
	this->setCode(IDENTIFIER);
	setLeftChild(NULL);
    setRightChild(NULL);
	list = NULL;
}
コード例 #2
0
ファイル: Token.cpp プロジェクト: TheLinkers/cse220_lab05
Token::Token()
{
    //What code do I need here to initialize everything.
    setLeftChild(NULL);
    setRightChild(NULL);
    list = NULL;
}
コード例 #3
0
Identifier::Identifier(): Token()
{
	this->setCode(IDENTIFIER);
    //What code do I need here to initialize everything.
    setLeftChild(NULL);
    setRightChild(NULL);
    list = NULL;
}
コード例 #4
0
ファイル: test.c プロジェクト: cschubiner/CS166_Homework
void test1() {

    struct node * root = calloc(1, sizeof(struct node));
    struct node * lStruct = calloc(1, sizeof(struct node));

    struct node * lStruct2 = calloc(1, sizeof(struct node));

    setLeftChild(root, lStruct);
    setRightChild(root, lStruct2);

    setNodeRed(lStruct2);
    setNodeRed(root->left);


    struct node * third1 = calloc(1, sizeof(struct node));
    struct node * third2 = calloc(1, sizeof(struct node));
    struct node * third3 = calloc(1, sizeof(struct node));
    struct node * third4 = calloc(1, sizeof(struct node));

    setLeftChild(lStruct, third1);
    setRightChild(lStruct, third2);
    setLeftChild(lStruct2, third3);
    setRightChild(lStruct2, third4);

    // setNodeRed(third1);
    setNodeRed(third2);

    assert(!is_red_black_tree(root));

    free(third1);
    free(third2);
    free(third3);
    free(third4);

    free(lStruct);
    free(lStruct2);

    free(root);

}
コード例 #5
0
ファイル: Identifier.cpp プロジェクト: teamtwenty/Lab-5
Identifier::Identifier()
{
    setLeftChild(NULL);
    setRightChild(NULL);
}