Ввиду внезапного отказа одного из разработчиков необходимо интегрировать libtcc в radare2 для разработки cparse модуля.
Описание работы:
Write parser on pure C without external dependencies for data
descriptions with C syntax, e.g.
struct qwe {
int i2;
long i3;
struct wer {
char rt[5];
int* 4;
};
unsigned int y;
};
It should support:
1) Recursive parsing (nested structs)
2) Structs, unions, enums, arrays and bitfields
3) Signed/unsigned
4) Additional attributes
5) Simple preprocessor for :
a) #define/#undefine
b) #ifdef/#if defined
c) AND, OR, NOT operations on defined contstants (e.g. #if defined(SOME1) || defined(SOME2)
d) #include
6) Function definitions, like
int *some_function(int arg1, char *arg2, char rt[5]);
7) Function attributes (inline, static, volatile)
8) Variable arguments count (like e.g. printf() function definition)
9) __attribute__((packed))
10) Multidimensional arrays
11) Multiple data and/or function definitions in the file
12) All standard C data types + linux kernel (uint8_t, etc) + clang types (u8, u16, i32, etc)
All syntax taken from C standard.
It shouldn't be written using bison/antlr/etc.
It should be integrated in radare2 using it's api, see here
old and buggy implementation
https://github.com/radare/radare2/tree/master/libr/anal/cparse
Result should be licensed under LGPLv3
Полное ТЗ (плюс дополнительная информация) - http://sync.in/nbnmBQ9N05
См. также коммиты https://github.com/radare/radare2/commit/a21afe405322a3b1ffcecf754ee75cccbb27... и https://github.com/radare/radare2/commit/537cbefdbffe150a1595a3d63ce0bbeb56d3...
Срок: 2 месяца
Цена вопроса: 500 евро.