Strip trailing line comments when reading a file for attributes parsing