2016-08-31 10:51:59 -07:00
|
|
|
#ifndef RUNTIME_ERROR_COSTS_H_
|
|
|
|
|
#define RUNTIME_ERROR_COSTS_H_
|
|
|
|
|
|
2017-02-19 21:52:48 -08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
|
extern "C" {
|
|
|
|
|
#endif
|
|
|
|
|
|
2016-10-05 14:02:49 -07:00
|
|
|
#define ERROR_STATE 0
|
2016-08-31 10:51:59 -07:00
|
|
|
#define ERROR_COST_PER_SKIPPED_TREE 10
|
|
|
|
|
#define ERROR_COST_PER_SKIPPED_LINE 3
|
|
|
|
|
#define ERROR_COST_PER_SKIPPED_CHAR 0
|
|
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
|
unsigned count;
|
2017-02-19 21:52:48 -08:00
|
|
|
unsigned cost;
|
2016-08-31 17:29:14 -07:00
|
|
|
unsigned push_count;
|
2016-08-31 10:51:59 -07:00
|
|
|
} ErrorStatus;
|
|
|
|
|
|
2017-02-19 21:52:48 -08:00
|
|
|
int error_status_compare(ErrorStatus a, ErrorStatus b);
|
2016-08-31 10:51:59 -07:00
|
|
|
|
2017-02-19 21:52:48 -08:00
|
|
|
#ifdef __cplusplus
|
2016-08-31 10:51:59 -07:00
|
|
|
}
|
2017-02-19 21:52:48 -08:00
|
|
|
#endif
|
2016-08-31 10:51:59 -07:00
|
|
|
|
|
|
|
|
#endif
|