Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #ifndef PARSE_ERR_H
00029
00030 #define PARSE_ERR_H
00031
00032
00033
00034
00035
00036 #define DEBUG 1
00037
00038
00039 #define NO_LINE -1
00040
00041
00042
00043
00044
00045 #define ERR_META '@'
00046
00047
00048
00049
00050
00051 #define NBR_ERRORS 29
00052
00053 #define ERROR_MSSG_0 "Illegal character @ in input."
00054 #define ERROR_MSSG_1 "Bad value for discount factor. Valid range is 0 to 1."
00055 #define ERROR_MSSG_2 "Bad number of states specified. Must be > 0."
00056 #define ERROR_MSSG_3 "Bad number of actions specified. Must be > 0."
00057 #define ERROR_MSSG_4 "Bad number of observations specified. Must be > 0."
00058 #define ERROR_MSSG_5 "State number is out of range."
00059 #define ERROR_MSSG_6 "Action number is out of range."
00060 #define ERROR_MSSG_7 "Observation number is out of range."
00061 #define ERROR_MSSG_8 "No state with name @ found."
00062 #define ERROR_MSSG_9 "No action with name @ found."
00063 #define ERROR_MSSG_10 "No observation with name @ found."
00064 #define ERROR_MSSG_11 "Bad probability. Must be between 0 and 1."
00065 #define ERROR_MSSG_12 "Not enough matrix entries."
00066 #define ERROR_MSSG_13 "Unreckognized matrix context."
00067 #define ERROR_MSSG_14 "Duplicate name '@' in list."
00068 #define ERROR_MSSG_15 "Too many matrix entries."
00069 #define ERROR_MSSG_16 "Missing 'discount:' specification."
00070 #define ERROR_MSSG_17 "Missing 'values:' specification"
00071 #define ERROR_MSSG_18 "Missing 'states:' specification"
00072 #define ERROR_MSSG_19 "Missing 'actions:' specification"
00073 #define ERROR_MSSG_20 "Missing 'observations:' specification"
00074 #define ERROR_MSSG_21 "Bad probability sum for T: @."
00075 #define ERROR_MSSG_22 "Bad probability sum for O: @"
00076 #define ERROR_MSSG_23 "Syntax error."
00077 #define ERROR_MSSG_24 "Bad probability sum for start belief state"
00078 #define ERROR_MSSG_25 "The keyword 'reset' is not allowed in this context"
00079 #define ERROR_MSSG_26 "Observations not valid in MDP, or missing observations in POMDP"
00080 #define ERROR_MSSG_27 "This type of starting state specification is not valid for an MDP."
00081 #define ERROR_MSSG_28 "Not a valid reward syntax for this problem type."
00082
00083
00084 #define ILL_CHAR_ERR 0
00085 #define BAD_DISCOUNT_VAL 1
00086 #define BAD_NUM_STATES 2
00087 #define BAD_NUM_ACTIONS 3
00088 #define BAD_NUM_OBS 4
00089 #define BAD_STATE_VAL 5
00090 #define BAD_ACTION_VAL 6
00091 #define BAD_OBS_VAL 7
00092 #define BAD_STATE_STR 8
00093 #define BAD_ACTION_STR 9
00094 #define BAD_OBS_STR 10
00095 #define BAD_PROB_VAL 11
00096 #define TOO_FEW_ENTRIES 12
00097 #define BAD_MATRIX_CONTEXT 13
00098 #define DUPLICATE_STRING 14
00099 #define TOO_MANY_ENTRIES 15
00100 #define MISSING_DISCOUNT 16
00101 #define MISSING_VALUES 17
00102 #define MISSING_STATES 18
00103 #define MISSING_ACTIONS 19
00104 #define MISSING_OBS 20
00105 #define BAD_TRANS_PROB_SUM 21
00106 #define BAD_OBS_PROB_SUM 22
00107 #define PARSE_ERR 23
00108 #define BAD_START_PROB_SUM 24
00109 #define BAD_RESET_USAGE 25
00110 #define OBS_IN_MDP_PROBLEM 26
00111 #define BAD_START_STATE_TYPE 27
00112 #define BAD_REWARD_SYNTAX 28
00113
00114
00115 #define OUT_OF_RANGE_MSSG "** ERROR ** ERR_enter: errorid of %d out of range\n"
00116 #define NO_ERRORS "No Errors found.\n"
00117 #define NO_LINE_ERROR "ERROR: "
00118 #define LINE_ERROR "ERROR: line %d: "
00119 #define NO_LINE_WARNING "WARNING:"
00120 #define LINE_WARNING "WARNING: line %d: "
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 typedef struct enode
00135 {
00136 char *source;
00137
00138 int lineNumber;
00139
00140 int errorNumber;
00141
00142 char *modString;
00143
00144
00145
00146 struct enode *nextError;
00147 } Err_node;
00148
00149 #ifdef __cplusplus
00150 extern "C" {
00151 #endif
00152
00153 int ERR_dump(void);
00154 void ERR_enter( char *source,
00155 int lineno,
00156 int errorid,
00157 char *modificationString );
00158 void ERR_initialize(void);
00159 void ERR_cleanUp(void);
00160
00161 #ifdef __cplusplus
00162 }
00163 #endif
00164
00165 #endif
00166