<commit_before>'use strict';

var u = require('unparse-js'),
    C = u.combinators,
    Cst = u.cst;

var P = C.position,
    item = P.item, oneOf = P.oneOf,
    literal = P.literal, string = P.string,
    not1 = P.not1, not0 = C.not0,
    cut = Cst.cut, node = Cst.node,
    alt = C.alt, many0 = C.many0,
    many1 = C.many1, error = C.error,
    optional = C.optional, seq = C.seq,
    seq2L = C.seq2L, zero = C.zero,
    seq2R = C.seq2R;


// to allow mutual recursion
var form = error('unimplemented'),
    discard = error('unimplemented');

var comment = node('comment',
        ['open', alt(literal(';'), string('#!'))],
        ['value', many0(not1(oneOf('\n\r')))]),

    whitespace = node('whitespace',
        ['value', many1(oneOf(', \t\n\r'))]);
    

var _macro            = oneOf('";@^`~()[]{}\\\'%#'),

    _terminatingMacro = oneOf('";@^`~()[]{}\\');


var number = node('number',
        ['sign' , optional(oneOf('+-'))],
        ['first', oneOf('0123456789')  ],
        ['rest' , many0(not1(alt(whitespace, _macro)))]),

    symbol = node('symbol',
        ['first', alt(not1(alt(whitespace, _macro)), literal('%'))],
        ['rest', many0(not1(alt(whitespace, _terminatingMacro)))]),

    char = node('char',
        ['open', literal('\\')],
        ['first', cut('any character', item)],
        ['rest', many0(not1(alt(whitespace, _terminatingMacro)))]),<commit_msg>oops, \f is considered whitespace<commit_after>'use strict';

var u = require('unparse-js'),
    C = u.combinators,
    Cst = u.cst;

var P = C.position,
    item = P.item, oneOf = P.oneOf,
    literal = P.literal, string = P.string,
    not1 = P.not1, not0 = C.not0,
    cut = Cst.cut, node = Cst.node,
    alt = C.alt, many0 = C.many0,
    many1 = C.many1, error = C.error,
    optional = C.optional, seq = C.seq,
    seq2L = C.seq2L, zero = C.zero,
    seq2R = C.seq2R;


// to allow mutual recursion
var form = error('unimplemented'),
    discard = error('unimplemented');

var comment = node('comment',
        ['open', alt(literal(';'), string('#!'))],
        ['value', many0(not1(oneOf('\n\r')))]),

    whitespace = node('whitespace',
        ['value', many1(oneOf(', \t\n\r\f'))]);
    

var _macro            = oneOf('";@^`~()[]{}\\\'%#'),

    _terminatingMacro = oneOf('";@^`~()[]{}\\');


var number = node('number',
        ['sign' , optional(oneOf('+-'))],
        ['first', oneOf('0123456789')  ],
        ['rest' , many0(not1(alt(whitespace, _macro)))]),

    symbol = node('symbol',
        ['first', alt(not1(alt(whitespace, _macro)), literal('%'))],
        ['rest', many0(not1(alt(whitespace, _terminatingMacro)))]),

    char = node('char',
        ['open', literal('\\')],
        ['first', cut('any character', item)],
        ['rest', many0(not1(alt(whitespace, _terminatingMacro)))]),
{'fraction_non_alphanumeric': 0.2282142857142857, 'fraction_numerical': 0.022857142857142857, 'mean_word_length': 2.9284712482468445, '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': '2323753', 'n_tokens_mistral': 1073, 'n_tokens_neox': 1030, 'n_words': 209}