-
Notifications
You must be signed in to change notification settings - Fork 0
/
Definition.h
89 lines (83 loc) · 2.18 KB
/
Definition.h
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
#ifndef DEFINITION
#define DEFINITION
#define _USE_MATH_DEFINES
#include<iostream>
#include<math.h>
#include<ctype.h>
using std::string;
#define ERROR_FAILURE 17;
// ñòðîêîâûå îïðåäåëåíèÿ.
#define LEFT_BRACKET_C_STR "("
#define ADDITION_C_STR "+"
#define DEDACTION_C_STR "-"
#define MULTIPLE_C_STR "*"
#define DIVISION_C_STR "/"
#define RIGHT_BRACKET_C_STR ")"
#define POINT_C_STR "."
#define COMA_C_STR ","
#define POWER_C_STR "^"
#define SPACE_C_STR " "
#define SPACE_C_STR " "
#define ALPHABET_BEGIN 'a'
#define ALPHABET_END 'z'
#define LEFT_FUNCTION_BRACKET_C_STR "["
#define RIGHT_FUNCTION_BRACKET_C_STR "]"
#define FACTORIAL_C_STR "!" //çàðåçåðâèðîâàíî
#define PERSENT_C_STR "%" //çàðåçåðâèðîâàíî
//constants
#define e_C_STR "e"
#define Ï_C_STR "ï"
#define LEFT_BRACKET '('
#define ADDITION '+'
#define DEDACTION '-'
#define MULTIPLE '*'
#define DIVISION '/'
#define RIGHT_BRACKET ')'
#define POINT '.'
#define COMA ','
#define POWER '^'
#define SPACE ' '
#define SPACE_C_STR " "
#define ALPHABET_BEGIN 'a'
#define ALPHABET_END 'z'
#define LEFT_FUNCTION_BRACKET '['
#define RIGHT_FUNCTION_BRACKET ']'
#define FACTORIAL '!' //çàðåçåðâèðîâàíî
#define PERSENT '%' //çàðåçåðâèðîâàíî
//constants
#define e 'e'
#define Ï 'ï'
//math_functions
#define SIN "sin"
#define COS "cos"
#define TAN "tg"
#define CTAN "ctg"
#define SQRT "sqrt"
#define LN "ln"
#define LG "lg"
#define LOGB "logb"
#define ASIN "asin"
#define ACOS "acos"
#define ATAN "atg"
#define ACTAN "actg"
#define ABS "abs"
#define SINH "sinh"
#define COSH "cosh"
#define TANH "tgh"
#define CTANH "ctgh"
#define ASINH "asinh"
#define ACOSH "acosh"
#define ATANH "atgh"
#define ACTANH "actgh"
#define MOD "mod" // çàðåçåðâèðîâàíî
bool is_alpha(const char);
bool is_point(const char);
bool is_digit(const char);
bool is_digit(const char*);
bool is_digit_or_alpha(const string::const_iterator &);
bool is_operator(const string::const_iterator &);
bool is_bracket(const string::const_iterator &);
size_t group_number(const string::const_iterator &);
bool is_unary_minus(const string::const_iterator &);
size_t simbol_type(const string::const_iterator &);
#endif // !DEFINITION