<commit_before><?php

/*
 * Mustache PHP Compiler
 *
 * This is a straight port of the ruby mustache compiler
 *
 * (c) July 2011 - <NAME> - <EMAIL>
 */

define('MUSTACHE_PHP_VERSION_ID', '0.1');

require_once('lib/StringScanner.php');
require_once('lib/Mustache.php');

function usage() {
  print "Usage:\n\n";
  print " mustache.php [-o outputfile] [-p partialDir] [-i] [-e] [-t] [-h] [-j json] -- inputfiles...\n\n";
  print "   -o outputfile : store php in this file\n";
  print "   -t            : print token array\n";
  print "   -h            : this information\n";
  print "   -p path       : set template path\n";
  print "   -e            : evaluate templates\n";
  print "   -j json       : parse json file and pass as context to evaluation\n";
  print "   -c name       : compile to class name\n";
  print "   --disable-lambdas : disable lambdas for compilation\n";
  print "   --disable-indentation : disable indentation for compilation\n";
  print "   --include-partials : include partials directly as code\n";
}


if (defined('STDIN')) {
  error_reporting(E_ALL);

  require_once('Console/Getopt.php');
  $o = new Console_Getopt();
  $argv = $o->readPHPArgv();

  /* check we are not included by someone */
  if (realpath($argv[0]) != realpath(__FILE__)) {
    return;
  }
  
  function filenameToFunctionName($filename){
    $name = basename($filename);
    $name = preg_replace('/\.[^\.]*$/', '_', $name);
    $name = preg_replace('/[^a-zA-Z0-9]/', '_', $name);
    return $name;
  }
  
  function _getopt($opts, $name) {
    if (array_key_exists($name, $opts)) {
      return $opts[$name];<commit_msg>Reset xdebug netsting level<commit_after><?php

/*
 * Mustache PHP Compiler
 *
 * This is a straight port of the ruby mustache compiler
 *
 * (c) July 2011 - <NAME> - <EMAIL>
 */

define('MUSTACHE_PHP_VERSION_ID', '0.1');

require_once('lib/StringScanner.php');
require_once('lib/Mustache.php');

function usage() {
  print "Usage:\n\n";
  print " mustache.php [-o outputfile] [-p partialDir] [-i] [-e] [-t] [-h] [-j json] -- inputfiles...\n\n";
  print "   -o outputfile : store php in this file\n";
  print "   -t            : print token array\n";
  print "   -h            : this information\n";
  print "   -p path       : set template path\n";
  print "   -e            : evaluate templates\n";
  print "   -j json       : parse json file and pass as context to evaluation\n";
  print "   -c name       : compile to class name\n";
  print "   --disable-lambdas : disable lambdas for compilation\n";
  print "   --disable-indentation : disable indentation for compilation\n";
  print "   --include-partials : include partials directly as code\n";
}


if (defined('STDIN')) {
  error_reporting(E_ALL);
  ini_set('xdebug.max_nesting_level', 10000);

  require_once('Console/Getopt.php');
  $o = new Console_Getopt();
  $argv = $o->readPHPArgv();

  /* check we are not included by someone */
  if (realpath($argv[0]) != realpath(__FILE__)) {
    return;
  }
  
  function filenameToFunctionName($filename){
    $name = basename($filename);
    $name = preg_replace('/\.[^\.]*$/', '_', $name);
    $name = preg_replace('/[^a-zA-Z0-9]/', '_', $name);
    return $name;
  }
  
  function _getopt($opts, $name) {
    if (array_key_exists($name, $opts)) {
      return $opts[$name];
{'fraction_non_alphanumeric': 0.1693939393939394, 'fraction_numerical': 0.0069696969696969695, 'mean_word_length': 2.8339140534262484, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '3455888', 'n_tokens_mistral': 1152, 'n_tokens_neox': 1116, 'n_words': 294}