C bites / programming style

djm at nmtvax.UUCP djm at nmtvax.UUCP
Tue Oct 8 07:27:21 AEST 1985

In article <> putnam at kbsvax.UUCP (jefu) writes:
> ...
>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.
> ...

Does your site have Lex and Yacc?  If you want to build a parser, that's
the way to go, especially if you're not particularly skilled at writing
such things.  Your 'template', in this case, would consist of a grammer
that Yacc understands (basically).

It could get a little hairy writing a grammer for some languages, but
that's what job security's all about :-).

    Dieter Muller
    (uucp)         ucbvax ! unmvax ! -------------------------V
    (uucp)         [ihnp4 | cmcl2] ! lanl {ARPA | UUCP} ! --> nmtvax!djm
    (arpa)         djm.nmt at csnet-relay
    (csnet)        djm at nmt
    (mental_net)   Hey you!  Yeah, you with the fuzzy face!

P.S.  I tried a mail response, but the gateway to ARPA got somewhat ill
on the address specification.

More information about the Comp.lang.c mailing list