more robust parsing of source files