tsingle@sunland.sunland.gsfc.nasa.gov (Tim Singletary) (07/12/90)
We need to do various transformations on C programs, one of the more
interesting of which is to transform stuff like:
struct {
unsigned int a: 3;
unsigned int b: 4;
unsigned int c: 1;
} bitfields;
into
struct {
unsigned int c: 1;
unsigned int b: 4;
unsigned int a: 3;
} bitfields;
Sed and lex are powerful enough to do most of our transformations, but
stuff like the above will (I think) require yacc.
Does anyone have a lex/yacc grammar which recognizes C (or at least a
substantial subset of C), and if you do, would you mind mailing it to
me?
Thanks,
tim
--
Tim Singletary, August Automation Inc., (301) 286-7942
--
NRA extremist, etc.