Module OLD.Mangling

This module aims to implement mangling functions for the COBOL AST.

exception Not_mangled

This exception is raised when a not mangled name is given in a context where it is expected for the name to be mangled

This function mangles an entry name option, by changing every None or Some (Filler) entries into Some (Name "Filler<n>") where <n> is incremented every time a new None or Some (Filler) entry is encountered. It does not change any other entry_name value.

val mangled_data_name : Cobol_ptree.data_name Cobol_ptree.with_loc option -> string

This function returns the name as a string if it is in the form of Some (Name name) and raises the Not_mangled exception if the pattern of the entry_name is different.