<commit_before>// main.C

#include "daisy.h"
#include "input.h"
#include "syntax.h"

#include <iostream.h>

int 
main (int argc, char* argv[])
{
#ifdef HANDLE_EXCEPTIONS
  try 
    {
#endif HANDLE_EXCEPTIONS
      Syntax syntax;
      Daisy::load_syntax (syntax);
      pair<Log*, const AttributeList*> init = parse (syntax, argc, argv);
      Daisy daisy (*init.first, *init.second);
      daisy.run ();
#ifdef HANDLE_EXCEPTIONS
    }
  catch (const Usage& usage)
    {
      cerr << usage.what () << "\n";
      return 2;
    }
  catch (const exception& except)
    {
      cerr << except.what () << "\n";
      return 1;
    }
  catch (...)
    { 
      cerr << "Unexpected exception." << "\n";
      cerr.flush ();
      abort ();
    }
#endif HANDLE_EXCEPTIONS
  return 0;
}
<commit_msg>The parser is now fully syntax directed.<commit_after>// main.C

#include "daisy.h"
#include "input.h"
#include "syntax.h"

#include <iostream.h>

int 
main (int argc, char* argv[])
{
#ifdef HANDLE_EXCEPTIONS
  try 
    {
#endif HANDLE_EXCEPTIONS
      Syntax syntax;
      Daisy::load_syntax (syntax);
      pair<Log*, const AttributeList*> init = parse (syntax, argc, argv);
      Daisy daisy (*init.first, *init.second);
      daisy.run ();
      delete init.first;
      delete init.second;
#ifdef HANDLE_EXCEPTIONS
    }
  catch (const Usage& usage)
    {
      cerr << usage.what () << "\n";
      return 2;
    }
  catch (const exception& except)
    {
      cerr << except.what () << "\n";
      return 1;
    }
  catch (...)
    { 
      cerr << "Unexpected exception." << "\n";
      cerr.flush ();
      abort ();
    }
#endif HANDLE_EXCEPTIONS
  return 0;
}

{'fraction_non_alphanumeric': 0.15342960288808663, 'fraction_numerical': 0.0036101083032490976, 'mean_word_length': 2.3938775510204082, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 7, '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': '6022289', 'n_tokens_mistral': 623, 'n_tokens_neox': 568, 'n_words': 148}