FOG - Flexible Object Generator
The Flexible Object Generator is a meta-compiler for a
super-set C++ language. FOG offers preprocessing facilities using
meta-object concepts that integrate with the C++ language.
FOG renders the C preprocessor obsolete, eliminates
substantial lexical redundancy from C++ and generalises C++ so
that patterns can be realised by using meta-functions.
Publications
The documents contained in these directories are included
by the contributing authors as a means to ensure timely
dissemination of scholarly and technical work on a non-commercial
basis. Copyright and all rights therein are maintained by the
authors or by other copyright holders, notwithstanding that they
have offered their works here electronically. It is understood
that all persons copying this information will adhere to the
terms and constraints invoked by each author's copyright.
2001
- Edward D. Willink.
Meta-Compilation for C++,
Abstract, PostScript, PDF,
PhD Thesis, Computer Science Research Group, University
of Surrey, June 2001.
2000
- Edward D. Willink.
Meta-Compilation for C++,
Abstract, PostScript, PDF,
PhD Thesis, Computer Science Research Group, University
of Surrey, January 2000.
- Edward D. Willink and Vyacheslav B. Muchnick.
An Object-Oriented Preprocessor Fit for C++,
Abstract, PostScript, PDF,
IEE Proceedings - Software, Vol 147, No 2, 49-58, April
2000.
1999
- Edward D. Willink and Vyacheslav B. Muchnick.
Weaving a Way Past the C++ One Definition Rule,
Abstract, PostScript, Gzipped PostScript, PDF, Zipped
PDF,
Position Paper for the Aspect Oriented Programming
Workshop at the European Conference on Object Oriented
Programming (ECOOP'99), Lisbon, June 14, 1999.
- Edward D. Willink and Vyacheslav B. Muchnick.
Preprocessing C++ : Substitution and Composition,
Abstract, PostScript, Gzipped PostScript, PDF, Zipped
PDF,
Proceedings of the Eastern European Conference on the
Technology of Object Oriented Languages and Systems,
TOOLS EE 99, Blagoevgrad, Bulgaria, June 1999.
- Edward D. Willink and Vyacheslav B. Muchnick.
Preprocessing C++ : Meta-Class Aspects,
Abstract, PostScript, Gzipped PostScript, PDF, Zipped
PDF,
Proceedings of the Eastern European Conference on the
Technology of Object Oriented Languages and Systems,
TOOLS EE 99, Blagoevgrad, Bulgaria, June 1999.
1998
Download
FOG uses some novel parsing techniques to successfully parse
C++ without type or template information. The complete standard
C++ grammar for this is CxxGrammar.y
(without action routines) or CxxTester.y
(with action routines). The corresponding FOG grammars are FogGrammar.y (without action routines)
or FogTester.y (with action
routines). The variants with action routines may be built to
produce a program that parses preprocessed C++ source with the
aid of parser support claesses and makefiles downloadable as CxxSrc.tgz for Unix or CxxNtSrc.tgz for NT.
FOG has been developed using Sun C++ 4.2 under Solaris 2.5.
Confirmatory builds are performed under NT4 using Visual C++,
however the NT executable has never been used in earnest. A gcc
build will only be possible once gcc offers a reasonable level of
template support (2.8.0 nearly compiles).
FOG User Guide
This is currently a very thin document describing..
FogUser.html
Much more information is available in my thesis. This descibes the superset
grammar approach adopted by FOG version 2, which is now available
in experimental form and superseded the multi-pass approach which
was made available in 1999.
FOG Release Notes and Bug Summary
The release notes may be viewed at
FogBugs.html
FOG for Solaris 2.5 and Sun C++ 4.2
Porting to other Unix platforms should not provide undue
problems, although it should not be attempted by those unfamiliar
with the wonders of make.
FogSunSolaris.tgz (0.9MB)
contains just
- the FOG executable fog built using SUN C++ 4.2 under
Solaris 2.5
- HTML files
FogGnuSolaris.tgz (0.9MB)
contains just
- the FOG executable fog built using EGCS 1.0.2 under
Solaris 2.5
- HTML files
FogSrc.tgz (3.0MB) contains the full
sources for UNIX (and NT) with new-line terminations
FOG for NT 4 and Visual C++ 6
Use under Visual C++ 5 should be possible, but expect
considerable trivial aggravation.
FogNt.tgz (0.8MB) contains just
- the FOG executable at fog/Release/Fog.exe
- HTML files
FogNtSrc.tgz (3.2MB) contains the
full sources for NT (and Unix) with CR LF line terminationst
- a workspace to build everything using DevStudio (and
gmake) at ./root.dsw
- a makefile to build everything using gmake at
./makefile.gmake
Please feel free to contact Ed.Willink@rrl.co.uk with
constructive suggestions or comments.
Last updated 05 July 2001.