Parsing a subset of C

29 views
Skip to first unread message

Felipe Balbi

unread,
Dec 8, 2014, 1:12:43 PM12/8/14
to treet...@googlegroups.com
Hi,

I'm trying to convert a set of C files (basically a set of static data definition) from C into
another format, but the file contains a bunch of other data that I really don't want to parse.

Is there a way to skip every line until I find my first matching rule ?

For example, I know that the data I want to parse begins with "static struct", so is there a way
to skip the input until the first static struct ?

What I noticed is that I always fail at offset 0 if I don't parse the C comment in the beginning
of the file.

cheers
Reply all
Reply to author
Forward
0 new messages