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.

[1172 byte] By [pepto_geckoa] at [2007-10-2 4:38:46]
# 1
Check replies on the other post http://forum.java.sun.com/thread.jspa?threadID=680728&tstart=0
aniseeda at 2007-7-16 0:11:52 > top of Java-index,Administration Tools,Sun Connection...
# 2
This thread is a duplicate of http://forum.java.sun.com/thread.jspa?threadID=680728
ChuckBinga at 2007-7-16 0:11:52 > top of Java-index,Administration Tools,Sun Connection...