-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathErrorCodes.cs
More file actions
231 lines (185 loc) · 6.19 KB
/
Copy pathErrorCodes.cs
File metadata and controls
231 lines (185 loc) · 6.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
/*
muParserNET - muParser library wrapper for .NET Framework
Copyright (c) 2015 Luiz Carlos Viana Melo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
This software uses and contains parts copied from muParser library.
muParser library - Copyright (C) 2013 Ingo Berg
*/
namespace muParserNET
{
/// <summary>
/// Error codes.
/// </summary>
public enum ErrorCodes
{
/// <summary>
/// Unexpected binary operator found
/// </summary>
UNEXPECTED_OPERATOR = 0,
/// <summary>
/// Token cant be identified.
/// </summary>
UNASSIGNABLE_TOKEN = 1,
/// <summary>
/// Unexpected end of formula. (Example: "2+sin(")
/// </summary>
UNEXPECTED_EOF = 2,
/// <summary>
/// An unexpected comma has been found. (Example: "1,23")
/// </summary>
UNEXPECTED_ARG_SEP = 3,
/// <summary>
/// An unexpected argument has been found
/// </summary>
UNEXPECTED_ARG = 4,
/// <summary>
/// An unexpected value token has been found
/// </summary>
UNEXPECTED_VAL = 5,
/// <summary>
/// An unexpected variable token has been found
/// </summary>
UNEXPECTED_VAR = 6,
/// <summary>
/// Unexpected Parenthesis, opening or closing
/// </summary>
UNEXPECTED_PARENS = 7,
/// <summary>
/// A string has been found at an inapropriate position
/// </summary>
UNEXPECTED_STR = 8,
/// <summary>
/// A string function has been called with a different type of argument
/// </summary>
STRING_EXPECTED = 9,
/// <summary>
/// A numerical function has been called with a non value type of argument
/// </summary>
VAL_EXPECTED = 10,
/// <summary>
/// Missing parens. (Example: "3*sin(3")
/// </summary>
MISSING_PARENS = 11,
/// <summary>
/// Unexpected function found. (Example: "sin(8)cos(9)")
/// </summary>
UNEXPECTED_FUN = 12,
/// <summary>
/// Unterminated string constant. (Example: "3*valueof("hello)")
/// </summary>
UNTERMINATED_STRING = 13,
/// <summary>
/// Too many function parameters
/// </summary>
TOO_MANY_PARAMS = 14,
/// <summary>
/// Too few function parameters. (Example: "ite(1<2,2)")
/// </summary>
TOO_FEW_PARAMS = 15,
/// <summary>
/// binary operators may only be applied to value items of the same type
/// </summary>
OPRT_TYPE_CONFLICT = 16,
/// <summary>
/// result is a string
/// </summary>
STR_RESULT = 17,
// Invalid Parser input Parameters
/// <summary>
/// Invalid function, variable or constant name.
/// </summary>
INVALID_NAME = 18,
/// <summary>
/// Invalid binary operator identifier
/// </summary>
INVALID_BINOP_IDENT = 19,
/// <summary>
/// Invalid function, variable or constant name.
/// </summary>
INVALID_INFIX_IDENT = 20,
/// <summary>
/// Invalid function, variable or constant name.
/// </summary>
INVALID_POSTFIX_IDENT = 21,
/// <summary>
/// Trying to overload builtin operator
/// </summary>
BUILTIN_OVERLOAD = 22,
/// <summary>
/// Invalid callback function pointer
/// </summary>
INVALID_FUN_PTR = 23,
/// <summary>
/// Invalid variable pointer
/// </summary>
INVALID_VAR_PTR = 24,
/// <summary>
/// The Expression is empty
/// </summary>
EMPTY_EXPRESSION = 25,
/// <summary>
/// Name conflict
/// </summary>
NAME_CONFLICT = 26,
/// <summary>
/// Invalid operator priority
/// </summary>
OPT_PRI = 27,
/// <summary>
/// Catch division by zero, sqrt(-1), log(0) (currently unused)
/// </summary>
DOMAIN_ERROR = 28,
/// <summary>
/// Division by zero (currently unused)
/// </summary>
DIV_BY_ZERO = 29,
/// <summary>
/// Generic error
/// </summary>
GENERIC = 30,
/// <summary>
/// Conflict with current locale
/// </summary>
LOCALE = 31,
/// <summary>
/// Unexpected conditional
/// </summary>
UNEXPECTED_CONDITIONAL = 32,
/// <summary>
/// Missing the else clause
/// </summary>
MISSING_ELSE_CLAUSE = 33,
/// <summary>
/// Misplaced colon
/// </summary>
MISPLACED_COLON = 34,
// internal errors
/// <summary>
/// Internal error of any kind.
/// </summary>
INTERNAL_ERROR = 35,
// The last two are special entries
/// <summary>
/// This is no error code, It just stores just the total number of error codes
/// </summary>
COUNT,
/// <summary>
/// Undefined message, placeholder to detect unassigned error messages
/// </summary>
UNDEFINED = -1
}
}