There are several unreferenced rules in the grammar: StaticAssert ConditionalDeclaration TemplateDeclaration TemplateMixin Based on other documentation and testing the compiler, I think the fix is to add them to the DeclDef rule, which would become: DeclDef: AttributeSpecifier ImportDeclaration EnumDeclaration ClassDeclaration InterfaceDeclaration AggregateDeclaration Declaration Constructor Destructor Invariant UnitTest StaticConstructor StaticDestructor StaticAssert ConditionalDeclaration DebugSpecification VersionSpecification MixinDeclaration TemplateDeclaration TemplateMixin ;
http://www.dsource.org/projects/phobos/changeset/1378
Fixed dmd 1.054 and 2.038