Misc DECO info:

General commentary:

	C++ is HUGE.  It's much bigger than C, by orders of
	magnitude, in terms of features, complexity, and most
	of all the amount of work required to parse it.
	Whenever possible, I tried to find commonalities between
	features and simplify them.  Unfortunately, I was 
	often stuck in the situation of having almost no time
	to work on this project, and needing a feature quickly
	so I could move on with some other part of the project,
	so many features got hacked into the system in 
	a less-than-clean way.  Bit by bit, I've tried to clean
	things up as I've had time to look at the interactions
	between various parts, but there's still a lot of
	work to be done.  I'm convinced that all of the code
	in Deco and CParse could be less than half the size
	it is now, with no loss of functionality, if I get enough
	time to clean it all up and reduce all of the complexity.


Error checking:

	The error checking is far from complete, although it seems
	to find a lot of errors pretty well, and report
	them nicely with full types displayed, and lists
	of function alternatives shown, etc.  Most errors that are
	caught are checks for conditions that must be true for the
	code to work.  Things that don't matter generally aren't
	caught, except for things I found easy to implement as
	a matter of course while I was adding various features.

	However, most errors that are reported usually include
	more than enough detail to find the problem, including
	scoped symbol names and full types, along with the
	file and line number the problem occured on.

	Very often, a parse error will later cause an internal
	error, although usually it at least gets trapped by
	an assert and reported.  Since nice error reporting
	isn't the focus of my thesis, I'm saving the cleanup
	of the error reporting for later.  As long as the
	errors are good enough to tell me what's going
	wrong, that's sufficient.  Given that criteria,
	the error checking is actually vastly superior
	to what it needs to be.


Running tests:
	
	You first need to include 'test' as a configuration type,
	by editing the Makefile (this is in your build area,
	after everything is configured) and finding a line that
	says something like:

	CONF_ARCH = isa_bus pc i486sx i486 i386dx i386 ix86 . gen

	Change it to say:

	CONF_ARCH = isa_bus pc i486sx i486 i386dx i386 ix86 test . gen

	Then type 'make config'.  This will reconfigure that directory
	to include any m-test directories, which contain all the
	tests and the Make file for the tests.  After that, for
	most tests you just type 'make tests'


Things to try:
	- run some C and C++ programs through deco, just to see how they
		get formatted on output and to see if it actually parses
		everything in the code

	- run some C/C++ header files through deco.  If the header is a C++
		header make sure it's called .hh or use the -x option
		to specify that it's a C++ header.  There's an option
		to turn on/off the exclusion of included declarations
		in the output.

	- use the -dA and/or -dy options with deco to see what's
		going on under the hood when parsing a C/C++ program.
		It's actually pretty scary how much information has
		to be parsed in just the header files for some
		programs before the main body of the code is
		reached...  

	- use the -dT option to see the internal representation of the
		types (but don't expect to compile the output!)

	- use the -frealtypes option to see the real types (with typedef'ed
		names removed) of all declarations.  Try something like
		the following code sample with -frealtypes turned on:
			
			typedef int (*fp)(char, int);
			fp f(fp x[10]);

	- use the -fsavecode option to just tokenize functions
		so you might be able to parse programs that don't
		parse otherwise

Just remember:
	
	- there is *no* template support yet.  So, if your program 
		includes standard header files, and those header
		files use templates, it just won't work!

