Parse input file with specific (limited) "C variable definitions"
$30-250 USD
Πληρώθηκε κατά την παράδοση
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
Ταυτότητα Εργασίας: #12673861
Σχετικά με την εργασία
Ανατέθηκε στον:
29 freelancers κάνουν προσφορές κατά μέσο όρο $95 για αυτή τη δουλειά
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 Περισσότερα
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!
I am very proficient in c and c++. I have 16 years c++ developing experience now, and have worked for more than 6 years. My work is online game developing, and mainly focus on server side, using c++ under linux environ Περισσότερα
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. Περισσότερα
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 Περισσότερα
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 Περισσότερα
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. Περισσότερα
Hello More 20 years programming experience. I need more details to set real price and time. Regards. ----------------------------------------------------------------------------------------------------------------- Περισσότερα
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)? Περισσότερα
Hi, I am competitive to this kind of task, can take good care of this project. In fact, I already done related to this job before. Let me know the best of your time so we can discuss further based on your requirements Περισσότερα
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 Περισσότερα
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