Update rules so that class declarations are syntactically restricted.