/*
** test.h - By Michael Radwick
**
**	This file demonstrates the behavior of c2man when it parses
**  an admittedly funny comment box style.  When c2man runs with
**  the comment box "Type and Structure definitions" shown below,
**  c2man will generate the message "parse error" on the
**  line "struct _ForthAtom *stack;" (within the ForthStack type definition).
**
**	I found two approaches to get around this which should shed some
**  light on the cause.  First, adding a simple one-line comment
**  just before the structure definition made the problem go away.
**  Second, if instead the box comment is modified to look like:
*/

/**************************************
*   Type and Structure definitions
**************************************/

/*
** Also makes the problem go away.   This makes me think that
** the fix should be somewhere in the code that controls the
** parsing state in lex.l (perhaps I'm not getting back to
** INITIAL state at the right time? )
*/

/**************************************/
/*   Type and Structure definitions   */
/**************************************/


typedef enum
{
	ATOM_Integer, ATOM_Real, ATOM_Character, ATOM_ForthString, ATOM_Primitive, ATOM_Symbol,
	ATOM_Function, ATOM_Array, ATOM_Stack, ATOM_Empty, ATOM_Dictionary,
	ATOM_Mark, ATOM_Quote
} ForthAtomType;

typedef struct _Stack
{
	unsigned int		size;		/* size of the stack */
	unsigned int		sp;			/* pointer to top element on stack */
	struct _ForthAtom	*stack;		/* the actual stack */
} *ForthStack;


syntax highlighted by Code2HTML, v. 0.9.1