MIDTERM COM 1205 Winter 2002 Question 1: CDefs = CDef ["." CDefs]. CDef = CN Ps. Ps = P ["," Ps]. P = CN. CN = Ident. Main = String. Consider the above class dictionary A. Rewrite the class dictionary A without using optional parts and call the new class dictionary B. Make it as simple as possible. No optional parts, syntactically introduced with [ ], are allowed in B. Class dictionary B must define the same language as class dictionary A. Put class dictionary B into UNKNOWN1. Write a method that prints for a given CDefs-object the total number of CN-objects the CDefs-object contains. Your program must work without change for both class dictionaries A and B. Fill in the UNKNOWN2 below: void countCN(ClassGraph cg) { UNKNOWN2 }