Parse a regular language which describes open/closing on a file.