<commit_before>#!/usr/bin/bash

# This script tests Antlr grammars for the C# target. It searches
# pom.xml files for grammars, generates a driver, builds, and tests the
# parser on input files. The code only runs on Linux-type boxes.
# It requires Bash, rm, pwd, echo, cat, xml2, grep, sed, awk, find, and
# the NET SDK.
#
# Most grammars in this directory are target independent. However,
# there is a large number that, currently, are for a specific target.
# These grammars are skipped from testing by inclusion of the name of
# the grammar (path from the top-level directory of the repository) in
# the "do_not_do_list". If you add a new grammar with a pom.xml file
# that includes testing, then the grammar will be tested for the C#
# target. If your grammar is target specific, adjust the list
# below.

# List<string> do_not_do_list = ...;
# idl iri molecule rfc1035 rfc1960 tcpheader unicode/graphemes abb 

do_not_do_list=" \
idl molecule tcpheader unicode/graphemes \
======== \
antlr/antlr2 antlr/antlr3 antlr/antlr4 apex asm/masm asn/asn_3gpp \
cobol85 cpp cql3 csharp cto dice fortran77 fusion-tables \
graphstream-dgs haskell html java/java java/java8 java/java9 \
javadoc javascript/ecmascript kirikiri-tjs kotlin/kotlin kotlin/kotlin-formal \
less logo/ucb-logo lpc mckeeman-form muparser oncrpc pgn php \
powerbuilder promql prov-n python/python3 python/python3alt \
r rego rexx rfc822/rfc822-datetime rfc822/rfc822-emailaddress \
scss sharc sql/hive sql/mysql sql/plsql sql/sqlite sql/tsql \
stringtemplate swift/swift2 swift/swift3 swift-fin thrift tnsnames \
turtle-doc v vb6 wat xml xpath/xpath31 xsd-regex z \
"

# Sanity checks for required environment.
unameOut="$(uname -s)"
case "${unameOut}" in
    Linux*)     machine=Linux;;
    Darwin*)    machine=Mac;;
    CYGWIN*)    machine=Cygwin;;
    MINGW*)     machine=MinGw;;
    *)          machine="UNKNOWN:${unameOut}"
esac
echo ${machine}
if [[ "$machine" != "Linux" && "$machine" != "Mac" ]]
then
    echo "This script runs only in a Linux environment. Skipping."
    exit 0
fi

date

# List<string> failed = new List<string>();
failed=""
<commit_msg>Ignore Rust in C# tests.<commit_after>#!/usr/bin/bash

# This script tests Antlr grammars for the C# target. It searches
# pom.xml files for grammars, generates a driver, builds, and tests the
# parser on input files. The code only runs on Linux-type boxes.
# It requires Bash, rm, pwd, echo, cat, xml2, grep, sed, awk, find, and
# the NET SDK.
#
# Most grammars in this directory are target independent. However,
# there is a large number that, currently, are for a specific target.
# These grammars are skipped from testing by inclusion of the name of
# the grammar (path from the top-level directory of the repository) in
# the "do_not_do_list". If you add a new grammar with a pom.xml file
# that includes testing, then the grammar will be tested for the C#
# target. If your grammar is target specific, adjust the list
# below.

# List<string> do_not_do_list = ...;
# idl iri molecule rfc1035 rfc1960 tcpheader unicode/graphemes abb 

do_not_do_list=" \
idl molecule tcpheader unicode/graphemes \
======== \
antlr/antlr2 antlr/antlr3 antlr/antlr4 apex asm/masm asn/asn_3gpp \
cobol85 cpp cql3 csharp cto dice fortran77 fusion-tables \
graphstream-dgs haskell html java/java java/java8 java/java9 \
javadoc javascript/ecmascript kirikiri-tjs kotlin/kotlin kotlin/kotlin-formal \
less logo/ucb-logo lpc mckeeman-form muparser oncrpc pgn php \
powerbuilder promql prov-n python/python3 python/python3alt \
r rego rexx rfc822/rfc822-datetime rfc822/rfc822-emailaddress rust \
scss sharc sql/hive sql/mysql sql/plsql sql/sqlite sql/tsql \
stringtemplate swift/swift2 swift/swift3 swift-fin thrift tnsnames \
turtle-doc v vb6 wat xml xpath/xpath31 xsd-regex z \
"

# Sanity checks for required environment.
unameOut="$(uname -s)"
case "${unameOut}" in
    Linux*)     machine=Linux;;
    Darwin*)    machine=Mac;;
    CYGWIN*)    machine=Cygwin;;
    MINGW*)     machine=MinGw;;
    *)          machine="UNKNOWN:${unameOut}"
esac
echo ${machine}
if [[ "$machine" != "Linux" && "$machine" != "Mac" ]]
then
    echo "This script runs only in a Linux environment. Skipping."
    exit 0
fi

date

# List<string> failed = new List<string>();
failed=""

{'fraction_non_alphanumeric': 0.09962581852198316, 'fraction_numerical': 0.018709073900841908, 'mean_word_length': 3.9445086705202312, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 8}, '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': '4594841', 'n_tokens_mistral': 1518, 'n_tokens_neox': 1426, 'n_words': 515}