Article View: gnu.gcc.help
Article #51224Need to parse structs
From: Ken Hardy
Date: Thu, 17 Jun 1993 16:00
Date: Thu, 17 Jun 1993 16:00
14 lines
1267 bytes
1267 bytes
I thought I'd ask before setting off to reinvent a wheel someone else already has rolling ... I need to parse header files to produce information about structures' elements type, size, and offset. I want 1) to verify that C structs being generated for an Intel-based data server have the proper padding & alignment required by a sparc, and 2) to automatically generate byte-swapping information needed to use the little-endian Intel data on a big-endian Sparc or HP. If anyone has anything like this to share I'd be tickled pink. Otherwise, I'd be happy with any pointers/code for doing this myself. Are parts of the Gnu compiler adaptable to purposes such as these? A yacc-able or bison-able C grammer would be a big start. Thanx.
Technical Details
Message-ID:
<1650@racerx.bridge.COM>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!darwin.sura.net!haven.umd.edu!uunet!racerx!Bridge.COMShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,9488ac34e395de80,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-06-17 09:06:38 PST Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!howland.reston.ans.net!darwin.sura.net!haven.umd.edu!uunet!racerx!Bridge.COM From: ken@Bridge.COM (Ken Hardy) Newsgroups: gnu.gcc.help Subject: Need to parse structs Message-ID: <1650@racerx.bridge.COM> Date: 17 Jun 93 16:00:10 GMT Sender: ken@racerx.bridge.COM Organization: Planet Earth Lines: 15