Parse input file with specific (limited) "C variable definitions"
$30-250 USD
Pagado a la entrega
Hi,
I require a C/C++ function that parses an input file and creates an output file.
Example input file:
--------------------------------------------------------------------
BYTE b_var1 = 34;
BYTE b_var2 = POOL_VAR_RND_INITIALIZED;
BYTE b_var3;
BYTE b_array1[] = {0x11, 0x12, 0x55};
BYTE b_array2[4];
WORD w_var1 = 34;
WORD w_var2 = POOL_VAR_RND_INITIALIZED;
WORD w_array1[] = { 0x1111, 0x12, 0x5555 };
WORD w_array2[4];
DWORD d_var1 = 34;
DWORD d_var2 = POOL_VAR_RND_INITIALIZED;
DWORD d_array1[] = { 0x11, 0x12, 0x55 };
DWORD d_array2[4];
DWORD d_array3[5] = { 0x11, 0x12, 0x55, 0x44444444, 0x66666666 };
QWORD q_var1 = 0x1122334455;
QWORD q_array1[5] = { 0x11, 0x12, 0x55, 0x44444444, 0x66666666 };
LPBYTE pointer1 = NULL;
LPBYTE pointer2;
-------------------------------------------------------------
The output file will be the following for the above example (basically it's transforming each variable definition into a different format):
------------------------------------------------------------
// BYTE b_var1 = 34;
b_var1 <INT8><34>
// BYTE b_var2 = POOL_VAR_RND_INITIALIZED;
b_var2 <INT8><POOL_VAR_RND_INITIALIZED>
// BYTE b_var3;
b_var3 <INT8><0>
// BYTE b_array1[] = {0x11, 0x12, 0x55};
b_array1 <BUFFER><3 * sizeof(BYTE)>
<db><0x11, 0x12, 0x55>
// BYTE b_array2[4];
b_array2 <BUFFER><4 * sizeof(BYTE)>
// WORD w_var1 = 34;
w_var1 <INT16><34>
// WORD w_var2 = POOL_VAR_RND_INITIALIZED;
w_var2 <INT16><POOL_VAR_RND_INITIALIZED>
// WORD w_array1[] = { 0x1111, 0x12, 0x5555 };
w_array1 <BUFFER><3 * sizeof(WORD)>
<dw><0x1111, 0x12, 0x5555>
// WORD w_array2[4];
w_array1 <BUFFER><4 * sizeof(WORD)>
// DWORD d_var1 = 34;
d_var1 <INT32><34>
// DWORD d_var2 = POOL_VAR_RND_INITIALIZED;
d_var2 <INT32><POOL_VAR_RND_INITIALIZED>
// DWORD d_array1[] = { 0x11, 0x12, 0x55 };
d_array1 <BUFFER><3 * sizeof(DWORD)>
<dd><0x11, 0x12, 0x55>
// DWORD d_array2[4];
d_array2 <BUFFER><4 * sizeof(DWORD)>
// DWORD d_array3[5] = { 0x11, 0x12, 0x55, 0x44444444, 0x66666666 };
d_array3 <BUFFER><5 * sizeof(DWORD)>
<dd><0x11, 0x12, 0x55, 0x44444444, 0x66666666>
// QWORD q_var1 = 0x1122334455;
q_var1 <INT64><0x1122334455>
// QWORD q_array1[5] = { 0x11, 0x12, 0x55, 0x44444444, 0x66666666 };
q_array3 <BUFFER><5 * sizeof(QWORD)>
<dq><0x11, 0x12, 0x55, 0x44444444, 0x66666666>
// LPBYTE pointer1 = NULL;
pointer1 <POINTER><NULL>
// LPBYTE pointer2;
pointer2 <POINTER><0>
--------------------------------------------------
The different variable types are BYTE, WORD, DWORD, QWORD, LPBYTE.
The solution should compile under Visual Studio (I'm using VS2015)
If you have any questions, let me know please.
Thanks
Nº del proyecto: #12673861
Sobre el proyecto
Adjudicado a:
29 freelancers están ofertando un promedio de $95 por este trabajo
Dear client, how are you? I am a C++ programmer and mathematician. No problem. Let's do. No problem. Let's do. No problem. Let's do. No problem. Let's do. No problem. Let's do. Please check my "Profile & Work Li Más
Hello, I am expert with c and c++ since more than 20 years ago ... you can see my previous work and reputation. Please, give me all samples files. It is only about variables?. I may do it in few hours. Best regards!
Hola, I specialise in C++ based engineering (in the real world), and lately do freelancing due to health issues. If interested, I can implement this C++ function for you and send it off to you - within 12 hours. Más
Hi, i'm software engineer and expert c,c++,java and c# developer. I have 3 years experience in oo programing, data structures and algorithms, artificial intelligence algorithms, game programming socket programming and Más
Hello! Please check my profile/reviews to know a bit about me. It would be great if I could help you out. Thank you!
Hi, I've got quite some experience with C and C++ and I'm sure I can finish this within a couple of hours. Is it okay with you to use the standard regex library in C++?
We are team of excellent developers. We have 2 year experience related to your project field. We can do your project and solve your all problems according to your requirements. We have read your description for project Más
Hello This problem belongs to the category of parser design which is a subset of compiler design. We will need to design a grammar for this language (Context free Grammar) and then make a parser and a translator. Más
Obvious questions would be around what constitutes invalid input, and how should that be handled? Are lines of the input to be treated as strictly terminated by a semicolon (they can be split over multiple lines)? Más
Sir, I would like to do your work. I know PHP very well. And having 3 years of PHP and web development experience. If you want a demo or ask a question. I am ready to work with you.
I am working in C from last couple of years. and I like to face challenges like this where we need pure Brain and logic to design this. Well I can do it, No problem. I guess you need a generic solution by which any fil Más
Hi. Yes I am a student, but I have a good knowledge in C++. I am using C++11. I cam finished you progect from 1 day as you need.
Hello, I can develop a function by using C language. If possible, I hope we will have discussion about this project. And I can do it for you. Thank you