In grammar form:

filename = text:filechar+ { return text; }
filechar
  = text:[^\\{}:;] { return text; }
  / "\\" text:.   { return text; }