<commit_before>/* $Id$ */

#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <errno.h>

#include <re/re.h>

const char *
re_strerror(enum re_errno e)
{
	switch (e) {
	case RE_ESUCCESS:    return "Success";
	case RE_EERRNO:      return strerror(errno);
	case RE_EBADDIALECT: return "Bad dialect";

	case RE_EOVERLAP:    return "Redundancy in group";
	case RE_ENEGRANGE:   return "Negative group range";
	case RE_ENEGCOUNT:   return "Negative count range";

	case RE_EHEXRANGE:   return "Hex escape out of range";
	case RE_EOCTRANGE:   return "Octal escape out of range";
	case RE_ECOUNTRANGE: return "Count out of range";

	case RE_EXSUB:       return "Syntax error: expected sub-expression";
	case RE_EXTERM:      return "Syntax error: expected group term";
	case RE_EXGROUP:     return "Syntax error: expected group";
	case RE_EXATOM:      return "Syntax error: expected atom";
	case RE_EXCOUNT:     return "Syntax error: expected count";
	case RE_EXATOMS:     return "Syntax error: expected atoms list";
	case RE_EXALTS:      return "Syntax error: expected alternative list";
	case RE_EXRANGE:     return "Syntax error: expected range separator";
	case RE_EXEOF:       return "Syntax error: expected EOF";
	case RE_EXESC:       return "Syntax error: expected character escape";
	}

	assert(!"unreached");
	return NULL;
}

<commit_msg>Oops... this should have been committed in [838].<commit_after>/* $Id$ */

#include <assert.h>
#include <string.h>
#include <stddef.h>
#include <errno.h>

#include <re/re.h>

const char *
re_strerror(enum re_errno e)
{
	switch (e) {
	case RE_ESUCCESS:     return "Success";
	case RE_EERRNO:       return strerror(errno);
	case RE_EBADDIALECT:  return "Bad dialect";

	case RE_EOVERLAP:     return "Redundancy in group";
	case RE_ENEGRANGE:    return "Negative group range";
	case RE_ENEGCOUNT:    return "Negative count range";

	case RE_EHEXRANGE:    return "Hex escape out of range";
	case RE_EOCTRANGE:    return "Octal escape out of range";
	case RE_ECOUNTRANGE:  return "Count out of range";

	case RE_EXSUB:        return "Syntax error: expected sub-expression";
	case RE_EXTERM:       return "Syntax error: expected group term";
	case RE_EXGROUP:      return "Syntax error: expected group";
	case RE_EXATOM:       return "Syntax error: expected atom";
	case RE_EXCOUNT:      return "Syntax error: expected count";
	case RE_EXATOMS:      return "Syntax error: expected atoms list";
	case RE_EXALTS:       return "Syntax error: expected alternative list";
	case RE_EXRANGE:      return "Syntax error: expected range separator";
	case RE_EXCLOSEGROUP: return "Syntax error: group is not closed";
	case RE_EXEOF:        return "Syntax error: expected EOF";
	case RE_EXESC:        return "Syntax error: expected character escape";
	}

	assert(!"unreached");
	return NULL;
}


{'fraction_non_alphanumeric': 0.09781073446327683, 'fraction_numerical': 0.001059322033898305, 'mean_word_length': 3.9614711033274954, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, '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': '1638713', 'n_tokens_mistral': 938, 'n_tokens_neox': 918, 'n_words': 318}