Check-in modifications made by HGM so far
[capablanca.git] / lasker-2.2.3 / src / formula.h
1 /*
2    This program is free software; you can redistribute it and/or modify
3    it under the terms of the GNU General Public License as published by
4    the Free Software Foundation; either version 2 of the License, or
5    (at your option) any later version.
6    
7    This program is distributed in the hope that it will be useful,
8    but WITHOUT ANY WARRANTY; without even the implied warranty of
9    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10    GNU General Public License for more details.
11    
12    You should have received a copy of the GNU General Public License
13    along with this program; if not, write to the Free Software
14    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
15 */
16
17
18 #ifndef FORMULA_H
19 #define FORMULA_H
20
21 #define OP_BAD      -1
22
23 #define OP_NONE      0
24 #define OP_RTPAREN   1
25 #define OP_OR        2
26 #define OP_AND       3
27 #define OP_EQ        4
28 #define OP_NEQ       5
29 #define OP_GT        6
30 #define OP_GE        7
31 #define OP_LT        8
32 #define OP_LE        9
33 #define OP_PLUS     10
34 #define OP_MINUS    11
35 #define OP_MULT     12
36 #define OP_DIV      13
37 #define OP_NEGATE   14
38 #define OP_NOT      15
39
40 #define OPTYPE_BAD     0
41 #define OPTYPE_NONE    1
42 #define OPTYPE_RPAREN  2
43 #define OPTYPE_PAREN   3
44 #define OPTYPE_OR      4
45 #define OPTYPE_AND     5
46 #define OPTYPE_COMPEQ  6
47 #define OPTYPE_COMPGL  7
48 #define OPTYPE_ADD     8
49 #define OPTYPE_MULT    9
50 #define OPTYPE_UNARY  10 
51
52 #define ERR_NONE 0
53 #define ERR_EOF 1
54 #define ERR_UNARY 2
55 #define ERR_BADCHAR 3
56 #define ERR_BADVAR 4
57 #define ERR_BADOP 5
58 #define ERR_NONESENSE 6
59 #define ERR_DIVBYZERO 7
60 #define ERR_PAREN 8
61
62 #define FUDGE_FACTOR 1e-3
63
64 #endif
65