Computer storage and retrieval of generic chemical structures in patents, 3. Chemical grammars and their role in the manipulation of chemical structures