-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinterpreter.h
190 lines (170 loc) · 7.13 KB
/
interpreter.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
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
/*
* The MIT License (MIT)
*
* Copyright (c) 2019 - 2022 TheVice
*
*/
#ifndef _INTERPRETER_H_
#define _INTERPRETER_H_
#include <stddef.h>
#include <stdint.h>
struct range;
/*conversion*/
uint8_t conversion_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t bool_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t double_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t int_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t long_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t int64_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
/*date_time*/
uint8_t datetime_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t datetime_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t timespan_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t timespan_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
/*echo*/
uint8_t echo_get_attributes_and_arguments_for_task(
const uint8_t*** task_attributes, const uint8_t** task_attributes_lengths,
uint8_t* task_attributes_count, void* task_arguments);
uint8_t echo_evaluate_task(void* task_arguments, uint8_t verbose);
/*environment*/
uint8_t environment_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t environment_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
/*hash*/
uint8_t hash_algorithm_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t hash_algorithm_exec_function(
uint8_t function, const void* arguments,
uint8_t arguments_count, void* output);
uint8_t file_get_checksum(
const uint8_t* path, const struct range* algorithm,
const struct range* algorithm_parameter, void* output);
/*math_unit*/
uint8_t math_get_function(const uint8_t* name_start, const uint8_t* name_finish);
uint8_t math_exec_function(uint8_t function, const void* arguments,
uint8_t arguments_count, void* output);
/*operating_system*/
uint8_t os_get_function(const uint8_t* name_start, const uint8_t* name_finish);
uint8_t os_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t platform_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
/*path*/
uint8_t path_get_id_of_get_full_path_function();
uint8_t path_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t path_exec_function(
const void* project,
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t cygpath_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
/*sleep_unit*/
uint8_t sleep_unit_get_attributes_and_arguments_for_task(
const uint8_t*** task_attributes, const uint8_t** task_attributes_lengths,
uint8_t* task_attributes_count, void* task_arguments);
uint8_t sleep_unit_evaluate_task(
void* task_arguments, uint8_t verbose);
/*target*/
uint8_t target_get_attributes_and_arguments_for_task(
const uint8_t*** task_attributes, const uint8_t** task_attributes_lengths,
uint8_t* task_attributes_count, void* task_arguments);
uint8_t target_evaluate_task(
void* the_project, void* task_arguments, uint8_t target_help,
const uint8_t* attributes_start, const uint8_t* attributes_finish,
const uint8_t* element_finish,
const struct range* sub_nodes_names, uint8_t verbose);
uint8_t target_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t target_exec_function(
const void* the_project, const void* the_target,
uint8_t function, const void* arguments,
uint8_t arguments_count, void* output, uint8_t verbose);
uint8_t call_get_attributes_and_arguments_for_task(
const uint8_t*** task_attributes, const uint8_t** task_attributes_lengths,
uint8_t* task_attributes_count, void* task_arguments);
uint8_t call_evaluate_task(
void* the_project, void* task_arguments, uint8_t verbose);
/*version*/
uint8_t version_get_function(
const uint8_t* name_start, const uint8_t* name_finish);
uint8_t version_exec_function(
uint8_t function, const void* arguments, uint8_t arguments_count,
void* output);
uint8_t interpreter_disassemble_function(
const struct range* function, struct range* name_space,
struct range* name, struct range* arguments_area);
uint8_t interpreter_actualize_property_value(
const void* the_project, const void* the_target,
uint8_t property_function_id, const void* the_property,
ptrdiff_t size, void* output, uint8_t verbose);
uint8_t interpreter_get_values_for_arguments(
const void* the_project, const void* the_target,
const struct range* arguments_area, void* values,
uint8_t* values_count, uint8_t verbose);
uint8_t interpreter_evaluate_function(
const void* the_project, const void* the_target,
const struct range* function, void* output, uint8_t verbose);
uint8_t interpreter_evaluate_code(
const void* the_project, const void* the_target,
const void* the_current_property, const struct range* code,
void* output, uint8_t verbose);
uint8_t interpreter_is_xml_tag_should_be_skip_by_if_or_unless(
const void* the_project, const void* the_target,
const uint8_t* start_of_attributes, const uint8_t* finish_of_attributes,
uint8_t* skip, void* attributes, uint8_t verbose);
uint8_t interpreter_get_xml_tag_attribute_values(
const void* the_project, const void* the_target,
const uint8_t* start_of_attributes, const uint8_t* finish_of_attributes,
uint8_t* fail_on_error, uint8_t* task_verbose,
void* attributes, uint8_t verbose);
uint8_t interpreter_get_arguments_from_xml_tag_record(
const void* the_project, const void* the_target,
const uint8_t* start_of_attributes, const uint8_t* finish_of_attributes,
const uint8_t** attributes, const uint8_t* attributes_lengths,
uint8_t index, uint8_t attributes_count,
void* output, uint8_t verbose);
uint8_t interpreter_get_xml_element_value(
const void* the_project, const void* the_target,
const uint8_t* attributes_finish, const uint8_t* element_finish,
void* output, uint8_t verbose);
uint8_t interpreter_get_task(
const uint8_t* task_name_start, const uint8_t* task_name_finish);
uint8_t interpreter_prepare_attributes_and_arguments_for_property_task(
const void* the_project, const void* the_target,
const uint8_t*** task_attributes, const uint8_t** task_attributes_lengths,
uint8_t* task_attributes_count, void* task_arguments,
const uint8_t* attributes_start, const uint8_t* attributes_finish,
uint8_t verbose);
uint8_t interpreter_evaluate_task(
void* the_project, const void* the_target, const struct range* task_name,
const uint8_t* element_finish, const struct range* sub_nodes_names,
uint8_t target_help, uint8_t verbose);
uint8_t interpreter_evaluate_tasks(
void* the_project, const void* the_target,
const void* elements, const struct range* sub_nodes_names,
uint8_t target_help, uint8_t verbose);
uint8_t interpreter_get_unknown_task_id();
#endif