<commit_before>var fs = require('fs');
var path = require('path');
var util = require('util');
var P = require('../src/parsimmon');

// This parser supports basic math with + - * / ^, unary negation, and
// parentheses. It does not evaluate the math, just turn it into a series of
// nested lists that are easy to evaluate.

// You might think that parsing math would be easy since people learn it early
// in school, but dealing with precedence and associativity of operators is
// actually one of the hardest and most tedious things you can do in a parser!
// If you look at a language like JavaScript, it has even more operators than
// math, like = and && and || and ++ and so many more...

///////////////////////////////////////////////////////////////////////

// Returns a new parser that ignores whitespace before and after the parser.
function spaced(parser) {
  return P.optWhitespace.then(parser).skip(P.optWhitespace);
}
<commit_msg>Forgot a word<commit_after>var fs = require('fs');
var path = require('path');
var util = require('util');
var P = require('../src/parsimmon');

// This parser supports basic math with + - * / ^, unary negation, factorial,
// and parentheses. It does not evaluate the math, just turn it into a series of
// nested lists that are easy to evaluate.

// You might think that parsing math would be easy since people learn it early
// in school, but dealing with precedence and associativity of operators is
// actually one of the hardest and most tedious things you can do in a parser!
// If you look at a language like JavaScript, it has even more operators than
// math, like = and && and || and ++ and so many more...

///////////////////////////////////////////////////////////////////////

// Returns a new parser that ignores whitespace before and after the parser.
function spaced(parser) {
  return P.optWhitespace.then(parser).skip(P.optWhitespace);
}

{'fraction_non_alphanumeric': 0.16657908565423016, 'fraction_numerical': 0.0, 'mean_word_length': 2.675675675675676, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3574966', 'n_tokens_mistral': 486, 'n_tokens_neox': 466, 'n_words': 245}