cgv
Loading...
Searching...
No Matches
operators.h
1#pragma once
2
3#include <string>
4
5#include "lib_begin.h"
6
7namespace cgv {
8 namespace ppp {
9
10 enum OperatorType {
11 OT_ASSIGN,
12 OT_ASSIGN_REF,
13 OT_ASSIGN_ADD,
14 OT_ASSIGN_SUB,
15 OT_ASSIGN_MUL,
16 OT_ASSIGN_DIV,
17 OT_ASSIGN_AND,
18 OT_ASSIGN_OR,
19 OT_ASSIGN_XOR,
20 OT_ASSIGN_LSH,
21 OT_ASSIGN_RSH,
22
23 OT_LOG_OR,
24
25 OT_LOG_AND,
26
27 OT_OR,
28
29 OT_XOR,
30
31 OT_AND,
32
33 OT_EQUAL,
34 OT_UNEQUAL,
35 OT_EQUAL_TYPE,
36 OT_UNEQUAL_TYPE,
37
38 OT_LESS,
39 OT_GREATER,
40 OT_LESS_OR_EQUAL,
41 OT_GREATER_OR_EQUAL,
42
43 OT_LSH,
44 OT_RSH,
45
46 OT_ADD,
47 OT_SUB,
48
49 OT_MUL,
50 OT_DIV,
51 OT_MOD,
52
53 OT_NOT,
54 OT_EXISTS,
55 OT_INC,
56 OT_DEC,
57 OT_NEGATE,
58 OT_COMPL,
59
60 OT_DOT,
61
62 OT_MAP_UP,
63 OT_MAP_DOWN,
64 OT_BINARY_MAP,
65 OT_UNARY_MAP,
66 OT_LAST
67 };
68
69 enum OperatorPrecedence {
70 OP_LEFT, OP_RIGHT
71 };
72
73 enum OperatorLocation {
74 OL_PREFIX, OL_POSTFIX
75 };
76
77 extern CGV_API const char* operator_characters;
78
79 extern CGV_API OperatorPrecedence get_operator_precedence(OperatorType ot);
80 extern CGV_API const char* get_operator_word(OperatorType ot);
81 extern CGV_API int get_operator_priority(OperatorType ot);
82 extern CGV_API int get_operator_arity(OperatorType ot);
83 extern CGV_API OperatorLocation get_operator_location(OperatorType ot);
84
85 extern CGV_API OperatorType get_operator_type(const std::string& s);
86
87 }
88}
89#include <cgv/config/lib_end.h>
the cgv namespace
Definition print.h:11