docs: function dumpSourceToFile(sourcecode, errname, err_id, options, ex) {
      var dumpfile;
  
      try {
          var dumpPaths = [(options.outfile ? path.dirname(options.outfile) : null), options.inputPath, process.cwd()];
          var dumpName = path.basename(options.inputFilename || options.moduleName || (options.outfile ? path.dirname(options.outfile) : null) || options.defaultModuleName || errname)
          .replace(/\.[a-z]{1,5}$/i, '')          // remove extension .y, .yacc, .jison, ...whatever
          .replace(/[^a-z0-9_]/ig, '_');          // make sure it's legal in the destination filesystem: the least common denominator.
          if (dumpName === '' || dumpName === '_') {
              dumpName = '__bugger__';
          }
          err_id = err_id || 'XXX';
  
          var ts = new Date();
          var tm = ts.getUTCFullYear() +
              '_' + pad(ts.getUTCMonth() + 1) +
              '_' + pad(ts.getUTCDate()) +
              'T' + pad(ts.getUTCHours()) +
              '' + pad(ts.getUTCMinutes()) +
              '' + pad(ts.getUTCSeconds()) +
              '.' + pad(ts.getUTCMilliseconds(), 3) +
              'Z';
  
          dumpName += '.fatal_' + err_id + '_dump_' + tm + '.js';
  
          for (var i = 0, l = dumpPaths.length; i < l; i++) {
              if (!dumpPaths[i]) {
                  continue;
              }
  
              try {
                  dumpfile = path.normalize(dumpPaths[i] + '/' + dumpName);
                  fs.writeFileSync(dumpfile, sourcecode, 'utf8');
                  console.error("****** offending generated " + errname + " source code dumped into file: ", dumpfile);
                  break;          // abort loop once a dump action was successful!
              } catch (ex3) {
                  //console.error("generated " + errname + " source code fatal DUMPING error ATTEMPT: ", i, " = ", ex3.message, " -- while attempting to dump into file: ", dumpfile, "\n", ex3.stack);
                  if (i === l - 1) {
                      throw ex3;
                  }
              }
          }
      } catch (ex2) {
          console.error("generated " + errname + " source code fatal DUMPING error: ", ex2.message, " -- while attempting to dump into file: ", dumpfile, "\n", ex2.stack);
      }
  
      // augment the exception info, when available:
      if (ex) {
          ex.offending_source_code = sourcecode;
          ex.offending_source_title = errname;
          ex.offending_source_dumpfile = dumpfile;
      }    
  }