>In declarations we have typespecifiers such as 'void', 'float',>'int', 'unsigned' etc. The programmer is not allowed to use these>things in any desired combination. There are some constraints.>My question is: How to implement these constraints ?>>We can build some (or all?) of the constraints in the grammar.>This would result in a much bigger grammar.

Always one to like to jazz around, I decided to see for myself what
would be involved in putting the constraints in the grammar entirely
by writing (an admittedly overly simplified) grammar that would deal
with delcarations in the following forms:

I realize that the grammar doesn't deal with the perfectly legal case
of:

static const char c;

but it could with some work. What does it prove? I can imagine that
an entirely grammar driven system of constraints would quickly become
much more convoluted than what follows.... especially if were to
handle all legal cases correctly (which mine doesn't by far).