text file parsing and output
Hi,
I'm extremely new to Java and need to read and parse a text file and generate a new text file with modifications as follows:
1. Ignore and rewrite comments
2. Ignore and rewrite compiler commands
3. (a) Modify function prototypes be removing their return values, if any,
(b) append an '_VAR' to the function name and args
(c) add an ampersand to the args when passed by reference
sample input file:
/***** comment *****/
#if (INCLUDE_STATIC_BUILD == OS_FALSE)
extern OS_MEMORY_POOL*MEM_Non_Cached;
#endif
UINT16 TLS_IP_Check (const UINT16 *s, UINT16 len);
INT32MEM_Copy_Data(NET_BUFFER *buf_ptr, const CHAR HUGE *buffer, INT32 numbytes, UINT16 flags);
sample output file:
/***** comment *****/
#if (INCLUDE_STATIC_BUILD == OS_FALSE)
extern OS_MEMORY_POOL*MEM_Non_Cached;
#endif
UINT16_VAR = TLS_IP_Check (&UINT16_VAR, UINT16_VAR);
INT32_VAR = MEM_Copy_Data(&NET_BUFFER_VAR, name, INT32_VAR, UINT16_VAR);
***********************************************************************
I would appreciate any help!
Thanks.

