How about using an existing parser for C instead?
In reply to Re: a question about re by moritz in thread a question about re by SonicWang