<commit_before>import scala.util.parsing.combinator._

import scala.util.parsing.combinator.syntactical.StandardTokenParsers
import scala.util.parsing.input._
import scala.util.parsing.syntax._

import scala.collection.mutable.HashMap

object Test {
  def main(args: Array[String]): Unit = {
    import grammars3._

    val head = phrase(AnBnCn)

    println(extractResult(head(new lexical.Scanner("a b c"))))
    println(extractResult(head(new lexical.Scanner("a a b b c c"))))
    println(extractResult(head(new lexical.Scanner("a a a b b b c c c"))))
    println(extractResult(head(new lexical.Scanner("a a a a b b b b c c c c"))))

    println(extractResult(head(new lexical.Scanner("a a a b b b b c c c c"))))
    println(extractResult(head(new lexical.Scanner("a a a a b b b c c c c"))))
    println(extractResult(head(new lexical.Scanner("a a a a b b b b c c c"))))
  }
}

object grammars3 extends StandardTokenParsers with PackratParsers {

  def extractResult(r: ParseResult[_]) = r match {
    case Success(a,_) => a
    case NoSuccess(a,_) => a
  }


  lexical.reserved ++= List("a","b", "c")<commit_msg>Calmed down grudge-holding packrat test case.<commit_after>import scala.util.parsing.combinator._

import scala.util.parsing.combinator.syntactical.StandardTokenParsers
import scala.util.parsing.input._
import scala.util.parsing.syntax._

import scala.collection.mutable.HashMap

object Test {
  def main(args: Array[String]): Unit = {
    import grammars3._

    val head = phrase(AnBnCn)

    println(extractResult(head(new lexical.Scanner("a b c"))))
    println(extractResult(head(new lexical.Scanner("a a b b c c"))))
    println(extractResult(head(new lexical.Scanner("a a a b b b c c c"))))
    println(extractResult(head(new lexical.Scanner("a a a a b b b b c c c c"))))

    println(extractResult(AnBnCn(new PackratReader(new lexical.Scanner("a a a b b b b c c c c")))))
    println(extractResult(AnBnCn(new PackratReader(new lexical.Scanner("a a a a b b b c c c c")))))
    println(extractResult(AnBnCn(new PackratReader(new lexical.Scanner("a a a a b b b b c c c")))))
  }
}

object grammars3 extends StandardTokenParsers with PackratParsers {

  def extractResult(r: ParseResult[_]) = r match {
    case Success(a,_) => a
    case NoSuccess(a,_) => a
  }


  lexical.reserved ++= List("a","b", "c")
{'fraction_non_alphanumeric': 0.13075268817204302, 'fraction_numerical': 0.0017204301075268817, 'mean_word_length': 4.250564334085778, 'pattern_counts': {'":': 0, '<': 3, '<?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': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1981101', 'n_tokens_mistral': 865, 'n_tokens_neox': 815, 'n_words': 229}