C bites / programming style

jefu putnam at steinmetz.UUCP
Thu Sep 26 21:25:03 AEST 1985


The great C style debate continues....

Rather than hitting each other over the head with foam rubber curly
braces and screaming "Infidel!" at each other, why not do something
more amusing...

I have been thinking about building a language formatter for a couple
years.  I want, essentially, to be able to feed it a template for the
language in question and have it spit out a formatter.  This means
essentially that it must learn the syntax of the language from my 
template, build a 'parser' for it, and include in the parser enough
information to be able to add the formatting commands when it spits 
it out.  At a minimum, i would like such to be able to handle C,
Fortran (ick), Lisp and Prolog.  Unhappily, I dont have quite the
parser experience, or the time, to sit down and really make this work.

(Parenthetically, C pre-processing could break this especially for 
 code that is broken by pre-processor #if's in the middle of statements, 
 but such code is already badly damaged for human readability anyway).
 
Then we could all stop worrying about this problem and when confronted
with code we didnt like the 'looks' of, we could run it through our 
formatter, and read it in the style we want to be accustomed to.
-- 
               O                      -- jefu
       tell me all about              -- UUCP: edison!steinmetz!putnam
Anna Livia! I want to hear all....    -- ARPA: putnam at kbsvax.decnet@GE-CRD



More information about the Comp.lang.c mailing list