July 2, 2004 2:56 PM
I've put up the code I've adapted for my use from MarkTriggs's file listing generator in the Code Archives section. Additionally, it provides a summary for C files. The ability to publish the code to html relies extensively on Satyakid's implementation of html-fontify.

It was so funny when I tried to write a regexp that would match all the function declarations in C code. The while loop, if, etc matches with the same regexp. I didn't waste any time doing any more research on regexps. Simply wrote lame hacks to remove the evil miscreants ;). Later when I was reading through The History of C++, (Stroustrup, 1996), I realized even the legendary Stroustrup had failed to come up with a BNF for C syntax. He even contacted Ravi Sethi1, who was also defeated and found that he couldn't express C semantics that way. To quote Stroustrup:

The main problem was the irregularity of C and the number of implementation-dependent and undefined aspects of a C implementation.

I have to admit, it was so much fun writing this piece of code. Elisp is awesome even in the hands of inefficient and lazy h4k3rs!


[1] Author of textbook2 for our Programming Languages paper.
[2] "Programming Languages Designs and Concepts"

Copyright © 2004-2011 Anirudh Sasikumar. All rights reserved.
Last Updated: January 21, 2005 4:34 PM