<commit_before>module.exports = (function() {
  /*
   * Generated by PEG.js 0.7.0.
   *
   * http://pegjs.majda.cz/
   */

  function peg$subclass(child, parent) {
    function ctor() { this.constructor = child; }
    ctor.prototype = parent.prototype;
    child.prototype = new ctor();
  }

  function SyntaxError(expected, found, offset, line, column) {
    function buildMessage(expected, found) {
      function stringEscape(s) {
        function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }

        return s
          .replace(/\\/g,   '\\\\')
          .replace(/"/g,    '\\"')
          .replace(/\x08/g, '\\b')
          .replace(/\t/g,   '\\t')
          .replace(/\n/g,   '\\n')
          .replace(/\f/g,   '\\f')
          .replace(/\r/g,   '\\r')
          .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
          .replace(/[\x10-\x1F\x80-\xFF]/g,    function(ch) { return '\\x'  + hex(ch); })
          .replace(/[\u0180-\u0FFF]/g,         function(ch) { return '\\u0' + hex(ch); })
          .replace(/[\u1080-\uFFFF]/g,         function(ch) { return '\\u'  + hex(ch); });
      }

      var expectedDesc, foundDesc;

      switch (expected.length) {
        case 0:
          expectedDesc = "end of input";
          break;

        case 1:
          expectedDesc = expected[0];
          break;

        default:
          expectedDesc = expected.slice(0, -1).join(", ")
            + " or "
            + expected[expected.length - 1];
      }

      foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";

      return "Expected " + expectedDesc + " but " + foundDesc + " found.";
    }

    this.expected = expected;
    this.found    = found;
    this.offset   = offset;
    this.line     = line;
    this.column   = column;

    this.name     = "SyntaxError";
    this.message  = buildMessage(expected, found);
  }

  peg$subclass(SyntaxError, Error);

  function parse(input) {
    var options = arguments.length > 1 ? arguments[1] : {},

        peg$startRuleFunctions = { start: peg$parsestart },
        peg$startRuleFunction  = peg$parsestart,

        peg$c0 = function() { diag.compute(); return diag; },
        peg$c1 = null,
        peg$c2 = "",
        peg$c3 = [],
        peg$c4 = "title",
        peg$c5 = "\"title\"",
        peg$c6 = function(p) { diag.setTitle(p); },
        peg$c7 = "participant",
        peg$c8 = "\"participant\"",
        peg$c9 = "as",
        peg$c10 = "\"as\"",
        peg$c11 = function(q, w) {
        		diag.parts.add(w, q);
        	},
        peg$c12 = function(w) {
        		diag.parts.add(w);
        	},
        peg$c13 = "advance",
        peg$c14 = "\"advance\"",
        peg$c15 = function(n) { diag.addAdvance(line(), n); },
        peg$c16 = function(tm, from, op, to, msg, opts) {
        	  	diag.addMessage(line(), tm, from, op, to, msg, opts);
        	},
        peg$c17 = "set",
        peg$c18 = "\"set\"",
        peg$c19 = function(w, val) { diag.setProp(w, val); },
        peg$c20 = ":",
        peg$c21 = "\":\"",
        peg$c22 = function(w) { return w; },
        peg$c23 = function(nm, t) { return diag.addEndpoint(nm, t); },
        peg$c24 = "@",
        peg$c25 = "\"@\"",
        peg$c26 = function(nw) { return nw; },
        peg$c27 = "true",
        peg$c28 = "\"true\"",
        peg$c29 = function() {return true;},
        peg$c30 = "false",
        peg$c31 = "\"false\"",
        peg$c32 = function() {return false;},
        peg$c33 = /^[^[#\n]/,
        peg$c34 = "[^[#\\n]",
        peg$c35 = function(p) { return p.join(''); },
        peg$c36 = "->",
        peg$c37 = "\"->\"",
        peg$c38 = function() { return ast.ARROW; },
        peg$c39 = "<->",
        peg$c40 = "\"<->\"",
        peg$c41 = function() { return ast.DARROW; },
        peg$c42 = "[",
        peg$c43 = "\"[\"",
        peg$c44 = "]",
        peg$c45 = "\"]\"",
        peg$c46 = ",",
        peg$c47 = "\",\"",
        peg$c48 = function(o) {return o;},
        peg$c49 = function(first, follow) { 
        		var opts = {};
        		opts[first[0]] = first[1];
        		for (var i=0; i<follow.length; i++) {
        			opts[follow[i][0]] = follow[i][1];
        		}
        		return opts;
        	},
        peg$c50 = "=",
        peg$c51 = "\"=\"",
        peg$c52 = function(nw) {return nw;},
        peg$c53 = function(name, value) {
        		return [name, (value === '') ? true : value];
        	},
        peg$c54 = "#",
        peg$c55 = "\"#\"",
        peg$c56 = /^[^\n]/,
        peg$c57 = "[^\\n]",
        peg$c58 = /^[^#"\r\n\t ]/,
        peg$c59 = "[^#\"\\r\\n\\t ]",
        peg$c60 = function(chars) { 
        		return chars.join(''); 
        	},
        peg$c61 = "\"",
        peg$c62 = "\"\\\"\"",
        peg$c63 = /^[^"]/,
        peg$c64 = "[^\"]",
        peg$c65 = function(info) { return info.join(''); },
        peg$c66 = /^[a-zA-Z0-9_'\-]/,
        peg$c67 = "[a-zA-Z0-9_'\\-]",
        peg$c68 = function(chars) { return chars.join('').trim(); },
        peg$c69 = /^[0-9]/,<commit_msg>Parse A->B, which means "-" is no longer a valid identifier char.<commit_after>module.exports = (function() {
  /*
   * Generated by PEG.js 0.7.0.
   *
   * http://pegjs.majda.cz/
   */

  function peg$subclass(child, parent) {
    function ctor() { this.constructor = child; }
    ctor.prototype = parent.prototype;
    child.prototype = new ctor();
  }

  function SyntaxError(expected, found, offset, line, column) {
    function buildMessage(expected, found) {
      function stringEscape(s) {
        function hex(ch) { return ch.charCodeAt(0).toString(16).toUpperCase(); }

        return s
          .replace(/\\/g,   '\\\\')
          .replace(/"/g,    '\\"')
          .replace(/\x08/g, '\\b')
          .replace(/\t/g,   '\\t')
          .replace(/\n/g,   '\\n')
          .replace(/\f/g,   '\\f')
          .replace(/\r/g,   '\\r')
          .replace(/[\x00-\x07\x0B\x0E\x0F]/g, function(ch) { return '\\x0' + hex(ch); })
          .replace(/[\x10-\x1F\x80-\xFF]/g,    function(ch) { return '\\x'  + hex(ch); })
          .replace(/[\u0180-\u0FFF]/g,         function(ch) { return '\\u0' + hex(ch); })
          .replace(/[\u1080-\uFFFF]/g,         function(ch) { return '\\u'  + hex(ch); });
      }

      var expectedDesc, foundDesc;

      switch (expected.length) {
        case 0:
          expectedDesc = "end of input";
          break;

        case 1:
          expectedDesc = expected[0];
          break;

        default:
          expectedDesc = expected.slice(0, -1).join(", ")
            + " or "
            + expected[expected.length - 1];
      }

      foundDesc = found ? "\"" + stringEscape(found) + "\"" : "end of input";

      return "Expected " + expectedDesc + " but " + foundDesc + " found.";
    }

    this.expected = expected;
    this.found    = found;
    this.offset   = offset;
    this.line     = line;
    this.column   = column;

    this.name     = "SyntaxError";
    this.message  = buildMessage(expected, found);
  }

  peg$subclass(SyntaxError, Error);

  function parse(input) {
    var options = arguments.length > 1 ? arguments[1] : {},

        peg$startRuleFunctions = { start: peg$parsestart },
        peg$startRuleFunction  = peg$parsestart,

        peg$c0 = function() { diag.compute(); return diag; },
        peg$c1 = null,
        peg$c2 = "",
        peg$c3 = [],
        peg$c4 = "title",
        peg$c5 = "\"title\"",
        peg$c6 = function(p) { diag.setTitle(p); },
        peg$c7 = "participant",
        peg$c8 = "\"participant\"",
        peg$c9 = "as",
        peg$c10 = "\"as\"",
        peg$c11 = function(q, w) {
        		diag.parts.add(w, q);
        	},
        peg$c12 = function(w) {
        		diag.parts.add(w);
        	},
        peg$c13 = "advance",
        peg$c14 = "\"advance\"",
        peg$c15 = function(n) { diag.addAdvance(line(), n); },
        peg$c16 = function(tm, from, op, to, msg, opts) {
        	  	diag.addMessage(line(), tm, from, op, to, msg, opts);
        	},
        peg$c17 = "set",
        peg$c18 = "\"set\"",
        peg$c19 = function(w, val) { diag.setProp(w, val); },
        peg$c20 = ":",
        peg$c21 = "\":\"",
        peg$c22 = function(w) { return w; },
        peg$c23 = function(nm, t) { return diag.addEndpoint(nm, t); },
        peg$c24 = "@",
        peg$c25 = "\"@\"",
        peg$c26 = function(nw) { return nw; },
        peg$c27 = "true",
        peg$c28 = "\"true\"",
        peg$c29 = function() {return true;},
        peg$c30 = "false",
        peg$c31 = "\"false\"",
        peg$c32 = function() {return false;},
        peg$c33 = /^[^[#\n]/,
        peg$c34 = "[^[#\\n]",
        peg$c35 = function(p) { return p.join(''); },
        peg$c36 = "->",
        peg$c37 = "\"->\"",
        peg$c38 = function() { return ast.ARROW; },
        peg$c39 = "<->",
        peg$c40 = "\"<->\"",
        peg$c41 = function() { return ast.DARROW; },
        peg$c42 = "[",
        peg$c43 = "\"[\"",
        peg$c44 = "]",
        peg$c45 = "\"]\"",
        peg$c46 = ",",
        peg$c47 = "\",\"",
        peg$c48 = function(o) {return o;},
        peg$c49 = function(first, follow) { 
        		var opts = {};
        		opts[first[0]] = first[1];
        		for (var i=0; i<follow.length; i++) {
        			opts[follow[i][0]] = follow[i][1];
        		}
        		return opts;
        	},
        peg$c50 = "=",
        peg$c51 = "\"=\"",
        peg$c52 = function(nw) {return nw;},
        peg$c53 = function(name, value) {
        		return [name, (value === '') ? true : value];
        	},
        peg$c54 = "#",
        peg$c55 = "\"#\"",
        peg$c56 = /^[^\n]/,
        peg$c57 = "[^\\n]",
        peg$c58 = /^[^#"\r\n\t ]/,
        peg$c59 = "[^#\"\\r\\n\\t ]",
        peg$c60 = function(chars) { 
        		return chars.join(''); 
        	},
        peg$c61 = "\"",
        peg$c62 = "\"\\\"\"",
        peg$c63 = /^[^"]/,
        peg$c64 = "[^\"]",
        peg$c65 = function(info) { return info.join(''); },
        peg$c66 = /^[a-zA-Z0-9_']/,
        peg$c67 = "[a-zA-Z0-9_']",
        peg$c68 = function(chars) { return chars.join('').trim(); },
        peg$c69 = /^[0-9]/,
{'fraction_non_alphanumeric': 0.21527301244975983, 'fraction_numerical': 0.035290657778649155, 'mean_word_length': 1.654006243496358, 'pattern_counts': {'":': 4, '<': 9, '<?xml version=': 0, '>': 14, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6221576', 'n_tokens_mistral': 3928, 'n_tokens_neox': 3691, 'n_words': 653}