Mercurial > hg > Gears > GearsAgda
view src/llrb/llrbContext.h @ 19:9302b1a48008
add llrb
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 21 Apr 2015 22:36:23 +0900 |
parents | |
children | 324c44f2076f |
line wrap: on
line source
/* Context definition for llrb example */ enum Code { Code1, Code2, Allocate, Put, Insert, Exit, }; enum Color { Red, Black, }; struct Context { int codeSize; __code (**code) (struct Context *); void* heap; union Data* root; int dataSize; union Data **data; }; union Data { struct Node { int key; int value; enum Color color; union Data* left; union Data* right; } node; struct Allocate { long size; enum Code next; enum Code after_put; int key; int value; } allocate; };