2006.06.26
Dave Prosser's C Preprocessing Algorithm
For about five years I've been trying to implement a fully conforming
C preprocessor for the front end of the
CScout refactoring browser.
I've found this to be a fiendishly difficult task.
Although what I have written can correctly process million-line
real-life projects, every once in a while I come across a construct
that confuses my implementation.
While searching the web for explanations of some of the finer points
of the C standard I came across a reference to an algorithm by
Dave Prosser that the X3J11 (ANSI C standard) committee used as a basis
for the standard's wording.
Continue reading "Dave Prosser's C Preprocessing Algorithm"Last modified: Monday, June 26, 2006 7:15 pm
2006.06.25
Interoperability Requires Temperance
After testing the CScout refactoring browser
on the FreeBSD kernel, I decided
to try it on Linux.
I'm getting there, but slowly, and the reason is the gratuitous use of
gcc extensions made in the Linux kernel source code.
Every time I come across a program construct that CScout doesn't
grok, I have to study the C standards to see if the construct is legal C
that CScout fails to implement or a gcc extension.
Extensions are trouble, because, they're typically only vaguely documented.
Continue reading "Interoperability Requires Temperance"Last modified: Sunday, June 25, 2006 7:01 pm
2006.06.16
Batch Files as Shell Scripts
Although the Unix Bourne shell offers a superb environment for combining
existing commands into sophisticated programs, using a Unix shell
as an interactive command environment under Windows can be painful.
Continue reading "Batch Files as Shell Scripts"Last modified: Friday, June 16, 2006 3:58 pm