Question about Declaration Specifiers

Satish Kumar .C chittamu at umvlsi.ecs.umass.edu
Tue Feb 27 03:14:35 AEST 1990


The grammar in K & R 2nd edition gives the rule for Declaration
Specifiers as follows.

Declaration_Specifiers : Storage_Class_Specifier
			| Type_Specifier
			| Type_Qualifier
			| Storage_Class_Specifier Declaration_Specifiers
			| Type_Specifier Declaration_Specifiers
			| Type_Qualifier Declaration_Specifiers
			;

Obviously this means we can have declarations of the sort

register const int
const register int
int register const

etc.

I was always under the impression that the rule had to be

Declaration_Specifiers : Type_Qualifier Storage_Class_Specifier Type_Specifier

Am I mistaken? Is my interpretation of K & R's grammar correct? Or is
there some other reason for it being that way? Any help would be greatly
appreciated.

Thanks,
-- 
	-Satish.
	chittamu at cs.umass.edu
--
The Theory of Objectivity: E = MC++



More information about the Comp.lang.c mailing list