29 static const std::string array_of_predefined_types[];
40 static const std::string array_of_predefined_variables[];
62 virtual void report(std::ostream & s)
const = 0;
93 class basic_generator;
109 virtual void report(std::ostream & s)
const = 0;
135 class mapping_generator;
136 class external_placeholder_generator;
146 std::map<std::string, int> map_placeholder_names_to_integer;
147 std::map<std::string, double> map_placeholder_names_to_float;
148 std::map<std::string, std::string> map_placeholder_names_to_string;
149 std::map<std::string, std::string> map_placeholder_names_to_identifier;
150 std::map<std::string, code> map_placeholder_names_to_code;
151 std::map<std::string, bool> map_placeholder_names_to_flag_has_been_bound;
153 std::map<std::string, std::string> map_placeholder_names_to_placeholder_names;
167 auto [it, s] = map_placeholder_names_to_integer.insert(std::pair(p,v));
168 if (!s)
throw std::runtime_error(
"failed to bind a placeholder");
172 auto [it, s] = map_placeholder_names_to_float.insert(std::pair(p,v));
173 if (!s)
throw std::runtime_error(
"failed to bind a placeholder");
177 auto [it, s] = map_placeholder_names_to_string.insert(std::pair(p,v));
178 if (!s)
throw std::runtime_error(
"failed to bind a placeholder");
182 auto [it, s] = map_placeholder_names_to_identifier.insert(std::pair(p,v));
183 if (!s)
throw std::runtime_error(
"failed to bind a placeholder");
188 auto [it, s] = map_placeholder_names_to_placeholder_names.insert(std::pair(p,p2));
189 if (!s)
throw std::runtime_error(
"failed to bind a placeholder");
219 virtual void report(std::ostream & s)
const = 0;
253 virtual void get_copy(std::shared_ptr<signature_item> & target)
const = 0;
262 template <
typename TYPE>
270 virtual void report(std::ostream & s)
const override
285 virtual void get_copy(std::shared_ptr<signature_item> & target)
const override
287 target = std::make_shared<simple_value_integer_signature_item>(
source,
value);
304 virtual void get_copy(std::shared_ptr<signature_item> & target)
const override
306 target = std::make_shared<simple_value_float_signature_item>(
source,
value);
322 virtual void report(std::ostream & s)
const override
324 s <<
'\"' <<
value <<
'\"';
326 virtual void print(std::ostream & s)
const override
337 virtual void get_copy(std::shared_ptr<signature_item> & target)
const override
339 target = std::make_shared<simple_value_string_signature_item>(
source,
value);
353 std::vector<std::string> vector_of_identifiers;
354 const std::string debug_name;
371#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
384 virtual bool get_match(
const generic_name_item & gni,
const machine & m,
const basic_generator & g, matching_protocol & target)
const override;
390 virtual void get_copy(std::shared_ptr<signature_item> & target)
const override
392 target = std::make_shared<simple_value_enum_signature_item>(
source,
value);
395 virtual std::string
get_debug_type_name()
const {
return "simple_value_enum_signature_item"; }
399 virtual std::string
get_type_name()
const override {
return "identifier"; }
407 virtual void print(std::ostream & s)
const override
412 virtual void report(std::ostream & s)
const override
427 virtual void get_copy(std::shared_ptr<signature_item> & target)
const override
430 target = std::make_shared<simple_value_enum_signature_item>(
source,
id);
445 std::unique_ptr<code> my_code;
451 virtual void report(std::ostream & s)
const override;
457 virtual void get_copy(std::shared_ptr<signature_item> & target)
const;
464 class signature_common_data;
465 class generic_stream;
475 static std::unique_ptr<signature_common_data> our_common_data;
477 std::vector<std::shared_ptr<signature_item>> vector_of_items;
479 unsigned line_number;
481 bool get_it_has_prefix(
const std::string & pattern)
const;
483 void execute_predefined_print(
machine & m)
const;
484 void execute_predefined_create(
machine & m)
const;
485 void execute_predefined_get(
machine & m)
const;
486 void execute_predefined_read(
machine & m)
const;
487 void execute_predefined_compare(
machine & m)
const;
488 void execute_predefined_add(
machine & m)
const;
489 void execute_predefined_subtract(
machine & m)
const;
490 void execute_predefined_multiply(
machine & m)
const;
491 void execute_predefined_divide(
machine & m)
const;
492 void execute_predefined_set(
machine & m)
const;
493 void execute_predefined_getline(
machine & m)
const;
494 void execute_predefined_execution(
machine & m)
const;
495 void execute_predefined_match(
machine & m)
const;
496 void execute_predefined_modulo(
machine & m)
const;
497 void execute_predefined_cast(
machine & m)
const;
516 std::string
get_item_representation(
int item_index)
const {
return vector_of_items[item_index]->get_string_representation(); }
517 std::string
get_item_type_name(
int item_index)
const {
return vector_of_items[item_index]->get_type_name(); }
523 const std::vector<std::shared_ptr<signature_item>> &
get_vector_of_items()
const {
return vector_of_items; }
532 const std::string my_signature_regular_expression_code;
534 std::unique_ptr<generic_name> my_name;
536 std::vector<std::shared_ptr<signature_item>> vector_of_items;
538 std::unique_ptr<std::regex> my_regular_expression;
540 enum class state { INITIAL, IDENTIFIER, PLACEHOLDER_1, PLACEHOLDER_2, PLACEHOLDER_3, PLACEHOLDER_4, PLACEHOLDER_5, PLACEHOLDER_6 };
542 void parse(
const std::string & c);
547 const std::vector<std::shared_ptr<signature_item>> &
get_vector_of_items()
const {
return vector_of_items; }
560 virtual void report(std::ostream & s)
const = 0;
571 virtual void get_copy(std::shared_ptr<generic_type> & target)
const = 0;
573 virtual void get_copy(std::unique_ptr<generic_type> & target)
const = 0;
587 const std::string name;
608 virtual void report(std::ostream & s)
const
615 if (name ==
"integer" || name ==
"float" || name==
"string" || name==
"code")
624 virtual void get_copy(std::shared_ptr<generic_type> & target)
const override
626 target = std::make_shared<generic_type_named>(name);
629 virtual void get_copy(std::unique_ptr<generic_type> & target)
const override
631 target = std::make_unique<generic_type_named>(name);
652 virtual void report(std::ostream & s)
const = 0;
658 virtual void get_copy(std::unique_ptr<generic_range_boundary> & target)
const = 0;
668 virtual void report(std::ostream & s)
const override
678 virtual void get_copy(std::unique_ptr<generic_range_boundary> & target)
const override
680 target = std::make_unique<generic_range_boundary_int_literal>(b);
688 std::unique_ptr<generic_name> name;
698 virtual void report(std::ostream & s)
const override;
704 virtual void get_copy(std::unique_ptr<generic_range_boundary> & target)
const override
706 target = std::make_unique<generic_range_boundary_variable_value>(*name);
714 std::unique_ptr<generic_range_boundary> min_boundary, max_boundary;
718 min_boundary{min_b}, max_boundary{max_b}
722 generic_range(std::unique_ptr<generic_range_boundary> && a, std::unique_ptr<generic_range_boundary> && b):
723 min_boundary{std::move(a)}, max_boundary{std::move(b)} {}
727 min_boundary->report(s);
729 max_boundary->report(s);
734 return min_boundary->get_value(m, g);
738 return max_boundary->get_value(m, g);
743 min_boundary->add_placeholders_to_generator(g);
744 max_boundary->add_placeholders_to_generator(g);
747 void get_copy(std::unique_ptr<generic_range> & target)
const
749 std::unique_ptr<generic_range_boundary> a, b;
750 min_boundary->get_copy(a);
751 max_boundary->get_copy(b);
752 target = std::make_unique<generic_range>(std::move(a), std::move(b));
759 std::unique_ptr<generic_range> r;
768 std::unique_ptr<generic_range> i;
773 virtual void report(std::ostream & s)
const
785 return r->get_min_value(m, g);
789 return r->get_max_value(m, g);
797 r->add_placeholders_to_generator(g);
820 virtual void get_copy(std::shared_ptr<generic_type> & target)
const override
822 target = std::make_shared<generic_type_range>(*r);
825 virtual void get_copy(std::unique_ptr<generic_type> & target)
const override
827 target = std::make_unique<generic_type_range>(*r);
848 class replacing_policy;
850 class type_definition;
860 static const std::vector<std::shared_ptr<type_definition>>
dummy;
870 virtual void report(std::ostream & s)
const = 0;
872 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const = 0;
884 virtual void get_copy(std::shared_ptr<statement> & target)
const = 0;
898 virtual void report(std::ostream & s)
const = 0;
910 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const = 0;
935 class list_of_generic_name_items;
943 std::vector<std::shared_ptr<generic_name_item>> vector_of_name_items;
964 vector_of_name_items.push_back(std::move(i));
978#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
979 const std::string identifier;
986#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
996 virtual void report(std::ostream & s)
const override
998#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1007#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1008 target.
add_content(std::make_shared<simple_value_enum_signature_item>(*
this, identifier));
1016#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1017 target.
add_content(std::make_shared<simple_value_enum_signature_item>(*
this, identifier));
1025#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1036#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1043 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1045#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1046 gni = std::make_shared<identifier_name_item>(identifier);
1056#ifdef CHOMIK_DONT_USE_OPTIMIZATIONS
1057 return identifier==v;
1067 const std::string placeholder;
1068 std::shared_ptr<generic_type> type_name;
1077 std::shared_ptr<generic_type> i;
1079 type_name = std::move(i);
1082 virtual void report(std::ostream & s)
const override
1084 s <<
'(' << placeholder <<
':';
1085 type_name->report(s);
1097 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1099 gni = std::make_shared<placeholder_name_item>(placeholder, *type_name);
1109 class list_of_generic_name_items;
1114 std::shared_ptr<generic_name> name;
1123 virtual void report(std::ostream & s)
const override;
1133 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1135 gni = std::make_shared<variable_value_name_item>(*name);
1150 std::unique_ptr<code> my_code;
1155 virtual void report(std::ostream & s)
const override;
1169 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1171 gni = std::make_shared<code_name_item>(*my_code);
1185 generic_name generic_name_the_print_target_stream_index,
1186 generic_name_the_print_separator,
1187 generic_name_the_print_end_of_line,
1188 generic_name_the_created_stream_index,
1189 generic_name_the_set_to_stream_stream_index,
1190 generic_name_the_get_from_stream_stream_index,
1191 generic_name_the_get_from_stream_result,
1192 generic_name_the_read_from_stream_source_stream_index,
1193 generic_name_the_read_from_stream_result_integer,
1194 generic_name_the_read_from_stream_result_string,
1195 generic_name_the_read_from_stream_max_size,
1196 generic_name_the_compare_result,
1197 generic_name_the_multiply_result_integer,
1198 generic_name_the_divide_result_float,
1199 generic_name_the_add_result_integer,
1200 generic_name_the_subtract_result_integer,
1201 generic_name_the_get_is_defined_result,
1202 generic_name_the_get_amount_of_ad_hoc_types_result,
1203 generic_name_the_get_amount_of_variables_in_the_memory_result,
1204 generic_name_the_get_amount_of_items_in_the_memory_variables_signature_result,
1205 generic_name_the_get_signature_item_representation_result,
1206 generic_name_the_get_signature_item_types_name_result,
1207 generic_name_the_getline_stream_index,
1208 generic_name_the_getline_result,
1209 generic_name_the_created_signature_regular_expression_index,
1210 generic_name_the_match_expression_index,
1211 generic_name_the_match_result,
1212 generic_name_the_modulo_result_integer,
1213 generic_name_the_stream_is_good,
1214 generic_name_the_cast_result_integer,
1215 generic_name_the_multiply_result_float,
1216 generic_name_the_cast_result_float,
1217 generic_name_the_add_result_float,
1218 generic_name_the_subtract_result_float;
1220 std::unique_ptr<signature> signature_the_print_target_stream_index,
1221 signature_the_print_separator,
1222 signature_the_print_end_of_line,
1223 signature_the_created_stream_index,
1224 signature_the_set_to_stream_stream_index,
1225 signature_the_get_from_stream_stream_index,
1226 signature_the_get_from_stream_result,
1227 signature_the_read_from_stream_source_stream_index,
1228 signature_the_read_from_stream_result_integer,
1229 signature_the_read_from_stream_result_string,
1230 signature_the_read_from_stream_max_size,
1231 signature_the_compare_result,
1232 signature_the_multiply_result_integer,
1233 signature_the_divide_result_float,
1234 signature_the_add_result_integer,
1235 signature_the_subtract_result_integer,
1236 signature_the_get_is_defined_result,
1237 signature_the_get_amount_of_ad_hoc_types_result,
1238 signature_the_get_amount_of_variables_in_the_memory_result,
1239 signature_the_get_amount_of_items_in_the_memory_variables_signature_result,
1240 signature_the_get_signature_item_representation_result,
1241 signature_the_get_signature_item_types_name_result,
1242 signature_the_getline_stream_index,
1243 signature_the_getline_result,
1244 signature_the_created_signature_regular_expression_index,
1245 signature_the_match_expression_index,
1246 signature_the_match_result,
1247 signature_the_modulo_result_integer,
1248 signature_the_stream_is_good,
1249 signature_the_cast_result_integer,
1250 signature_the_multiply_result_float,
1251 signature_the_cast_result_float,
1252 signature_the_add_result_float,
1253 signature_the_subtract_result_float;
1255 std::vector<std::unique_ptr<signature>> signature_the_match_group_integer_x;
1256 std::vector<std::unique_ptr<signature>> signature_the_match_group_boolean_x;
1265 template <
typename TYPE>
1272 virtual void report(std::ostream & s)
const override
1279 std::stringstream s;
1295 target.
add_content(std::make_shared<simple_value_integer_signature_item>(*
this,
my_value));
1300 target.
add_content(std::make_shared<simple_value_integer_signature_item>(*
this,
my_value));
1308 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1310 gni = std::make_shared<name_item_integer>(
my_value);
1337 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1339 gni = std::make_shared<name_item_float>(
my_value);
1356 virtual void report(std::ostream & s)
const override
1364 target.
add_content(std::make_shared<simple_value_string_signature_item>(*
this,
my_value));
1367 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override
1369 gni = std::make_shared<name_item_string>(
my_value);
1379 class list_of_statements;
1384 std::unique_ptr<code> my_code_pointer;
1395 virtual void report(std::ostream & s)
const override;
1405 virtual void get_copy(std::shared_ptr<generic_name_item> & gni)
const override;
1414 const std::string name;
1415 std::unique_ptr<type_definition_body> body;
1434 class type_instance;
1442 virtual void report(std::ostream & s)
const = 0;
1444 virtual void expand(
machine & m,
int depth,
const std::string & n, std::shared_ptr<type_instance> & e)
const = 0;
1458 std::unique_ptr<generic_range> r;
1465 virtual void report(std::ostream & s)
const override
1470 virtual void expand(
machine & m,
int depth,
const std::string & n, std::shared_ptr<type_instance> & e)
const override;
1474 r->add_placeholders_to_generator(g);
1486 class list_of_generic_names;
1491 const std::string placeholder_name_in_father, placeholder_name_in_son;
1499 const std::string name;
1500 std::shared_ptr<generic_type> placeholder_type;
1503 generator_placeholder(
const std::string & n, std::shared_ptr<generic_type> && t): name{n}, placeholder_type{std::move(t)} {}
1509 return placeholder_type->get_is_finite();
1517 class generic_value;
1520 template <
typename TYPE,
int REPRESENTATION_TYPE>
class simple_placeholder_with_value;
1521 template <
typename TYPE,
int REPRESENTATION_TYPE>
class simple_placeholder_with_value_and_report;
1523 class description_of_a_cartesian_product;
1553 virtual void report(std::ostream & s)
const {};
1555 virtual void add_placeholder(
const std::string & p, std::shared_ptr<generic_type> && t) {}
1591 virtual void add_mapping(
const std::string & f,
const std::string & s) {}
1607 std::map<std::string, std::string> map_child_placeholder_to_father_placeholder;
1609 const std::string my_filename;
1610 const unsigned line_number;
1613 mapping_generator(
const std::string & filename,
unsigned new_line_number): my_filename{filename}, line_number{new_line_number} {}
1617 virtual void report(std::ostream & s)
const override;
1631 virtual void add_mapping(
const std::string & f,
const std::string & s)
1633 auto [it, success] = map_child_placeholder_to_father_placeholder.insert(std::pair(s, f));
1636 throw std::runtime_error(
"failed to add mapping to a mapping generator");
1651 GENERATOR_TYPE & my_generator;
1665 std::vector<std::shared_ptr<generator_placeholder>> vector_of_placeholders;
1666 std::map<std::string, std::shared_ptr<generator_placeholder>> map_placeholder_names_to_placeholders;
1668 std::vector<std::shared_ptr<placeholder_with_value>> memory;
1669 std::map<std::string, std::shared_ptr<placeholder_with_value>> map_placeholder_names_to_placeholders_with_value;
1671 int initial_amount_of_ad_hoc_type_instances;
1673 const std::string my_filename;
1674 const unsigned line_number;
1680 generator(
const std::string & filename,
unsigned new_line_number);
1702 return "unknown_placeholder";
1705 virtual void add_placeholder(
const std::string & p, std::shared_ptr<generic_type> && t)
override;
1709 std::shared_ptr<placeholder_with_value> p2{p};
1710 auto [it, success] = map_placeholder_names_to_placeholders_with_value.insert(std::pair(p->get_name(), std::move(p2)));
1713 throw std::runtime_error(
"failed to insert a placeholder with value");
1716 memory.push_back(std::move(p));
1719 virtual void report(std::ostream & s)
const override;
1753 std::vector<std::shared_ptr<placeholder_with_value>> memory;
1754 std::map<std::string, std::shared_ptr<placeholder_with_value>> map_placeholder_names_to_placeholders_with_value;
1756 const std::string my_filename;
1757 const unsigned line_number;
1762 virtual void report(std::ostream & s)
const override;
1787 std::vector<std::shared_ptr<generic_name>> vector_of_names;
1794 virtual void report(std::ostream & s)
const override;
1796 virtual void expand(
machine & m,
int depth,
const std::string & n, std::shared_ptr<type_instance> & e)
const override;
1809 std::vector<std::shared_ptr<type_definition>> vector_of_type_definitions;
1815 std::shared_ptr<type_definition> xt{t};
1816 vector_of_type_definitions.push_back(std::move(xt));
1820 for (
auto & i: l->vector_of_type_definitions)
1822 std::shared_ptr<type_definition> yl{i};
1823 vector_of_type_definitions.push_back(std::move(yl));
1834 std::vector<std::shared_ptr<generic_name>> vector_of_names;
1843 std::shared_ptr<generic_name> xt{gn};
1844 vector_of_names.push_back(std::move(xt));
1848 for (
auto & i: l->vector_of_names)
1850 std::shared_ptr<generic_name> yl{i};
1851 vector_of_names.push_back(std::move(yl));
1866 std::vector<std::shared_ptr<type_definition>> vector_of_type_definitions;
1877 std::shared_ptr<type_definition> x{i};
1878 vector_of_type_definitions.push_back(std::move(x));
1889 virtual void report(std::ostream & s)
const override;
1891 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
1899 virtual void get_copy(std::shared_ptr<statement> & target)
const override
1910 std::shared_ptr<generic_name> name;
1911 std::shared_ptr<generic_type> type_name;
1917 variable_definition(std::shared_ptr<generic_name> && n, std::shared_ptr<generic_type> && t): name{n}, type_name{t} {}
1923 type_name->report(s);
1930 name->add_placeholders_to_generator(g);
1931 type_name->add_placeholders_to_generator(g);
1940 std::vector<std::shared_ptr<variable_definition>> vector_of_variable_definitions;
1949 std::shared_ptr<variable_definition> x{vd};
1950 vector_of_variable_definitions.push_back(std::move(x));
1954 for (
auto & i: l->vector_of_variable_definitions)
1956 std::shared_ptr<variable_definition> y{i};
1957 vector_of_variable_definitions.push_back(std::move(y));
1969 std::vector<std::shared_ptr<variable_definition>> vector_of_variable_definitions;
1981 std::shared_ptr<variable_definition> y{i};
1982 vector_of_variable_definitions.push_back(std::move(y));
1996 return *vector_of_variable_definitions[vector_of_variable_definitions.size()-1];
1999 virtual void report(std::ostream & s)
const override;
2001 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
2009 virtual void get_copy(std::shared_ptr<statement> & target)
const override
2044 class generic_literal;
2054 virtual void report(std::ostream & s)
const = 0;
2076 virtual void get_copy(std::unique_ptr<generic_value> & target)
const = 0;
2095 std::unique_ptr<generic_name> name;
2107 virtual void report(std::ostream & s)
const override
2125 name->add_placeholders_to_generator(g);
2140 virtual void get_copy(std::unique_ptr<generic_value> & target)
const override
2142 target = std::make_unique<generic_value_variable_value>(*name);
2159 virtual void report(std::ostream & s)
const = 0;
2179 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const = 0;
2193 const std::string placeholder;
2194 std::unique_ptr<generic_type> type_name;
2201 placeholder{p}, type_name{t}, expected_type{e} {}
2204 placeholder{p}, type_name{std::move(t)}, expected_type{e} {}
2208 virtual void report(std::ostream & s)
const override;
2224 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const override
2226 std::unique_ptr<generic_type> t;
2227 type_name->get_copy(t);
2228 target = std::make_unique<generic_literal_placeholder>(placeholder, std::move(t), expected_type);
2237 std::unique_ptr<generic_literal> literal;
2249 return literal->get_actual_memory_representation_type(m, g);
2251 virtual void report(std::ostream & s)
const override
2259 return literal->get_actual_text_representation(m, g);
2263 literal->add_placeholders_to_generator(g);
2268 literal->get_result_replacing_placeholders(m, g, p, target);
2281 virtual void get_copy(std::unique_ptr<generic_value> & target)
const override;
2289 literal->get_copy(target);
2295 template <
typename TYPE,
int REPRESENTATION_TYPE>
2302 virtual void report(std::ostream & s)
const override
2314 std::stringstream s;
2335 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const override
2337 target = std::make_unique<simple_literal_integer>(
my_value);
2353 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const override
2355 target = std::make_unique<simple_literal_float>(
my_value);
2371 virtual void report(std::ostream & s)
const override
2373 s <<
"value string " <<
'\"' <<
my_value <<
'\"';
2380 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const
2382 target = std::make_unique<simple_literal_string>(
my_value);
2392 class list_of_statements;
2400 std::unique_ptr<code> my_code_pointer;
2420 virtual void report(std::ostream & s)
const override;
2434 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const
2436 target = std::make_unique<generic_literal_code>(*my_code_pointer);
2447 const std::string type_name;
2448 std::unique_ptr<generic_name> name;
2457 virtual void report(std::ostream & s)
const override
2459 s <<
"value " << type_name <<
' ';
2470 return name->get_actual_text_representation(m, g);
2474 name->add_placeholders_to_generator(g);
2483 virtual void get_copy(std::unique_ptr<generic_literal> & target)
const override
2485 target = std::make_unique<generic_literal_enum>(type_name, *name);
2498 const std::string placeholder;
2499 std::shared_ptr<generic_type> type_name;
2505 virtual void report(std::ostream & s)
const override
2507 s <<
"[ (" << placeholder <<
':';
2508 type_name->report(s);
2518 std::shared_ptr<generic_type> t{type_name};
2520 type_name->add_placeholders_to_generator(g);
2524 virtual void get_copy(std::unique_ptr<generic_value> & target)
const override
2526 std::shared_ptr<generic_type> i;
2527 type_name->get_copy(i);
2528 target = std::make_unique<generic_value_placeholder>(placeholder, std::move(i));
2541 std::unique_ptr<generic_name> name;
2542 std::unique_ptr<generic_value> value;
2544 void execute_if_cartesian_product_has_one_item(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2546 void execute_if_cartesian_product_is_finite_and_small(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2548 void execute_if_cartesian_product_is_large_or_infinite(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2559 std::unique_ptr<generic_value> i;
2561 value = std::move(i);
2568 virtual void report(std::ostream & s)
const override;
2570 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
2574 name->add_placeholders_to_generator(g);
2580 virtual void get_copy(std::shared_ptr<statement> & target)
const override;
2604 std::unique_ptr<generic_value> value;
2619 virtual void report(std::ostream & s)
const override;
2621 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
2627 virtual void get_copy(std::shared_ptr<statement> & target)
const override
2629 std::unique_ptr<generic_value> n;
2631 target = std::make_shared<execute_value_statement>(std::move(n),
line_number);
2643 std::unique_ptr<generic_name> name;
2645 void execute_if_cartesian_product_has_one_item(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2647 void execute_if_cartesian_product_is_finite_and_small(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2649 void execute_if_cartesian_product_is_large_or_infinite(
machine & m, std::shared_ptr<basic_generator> & g)
const;
2660 name->add_generic_name_item(std::move(i));
2665 virtual void report(std::ostream & s)
const override;
2667 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
2673 virtual void get_copy(std::shared_ptr<statement> & target)
const override
2675 std::unique_ptr<generic_name> n=std::make_unique<generic_name>(*name);
2676 target = std::make_shared<execute_variable_value_statement>(std::move(n),
line_number);
2693 virtual void report(std::ostream & s)
const override
2695 s <<
"expand(" << depth <<
");";
2698 virtual void execute(
machine & m, std::shared_ptr<const statement> && i, std::shared_ptr<basic_generator> father=
nullptr)
const override;
2704 virtual void get_copy(std::shared_ptr<statement> & target)
const
2706 target = std::make_shared<expand_statement>(depth,
line_number);
2717 std::vector<std::shared_ptr<statement>> vector_of_statements;
2735 vector_of_statements.push_back(std::move(s));
2754 std::vector<std::shared_ptr<generic_name_item>> vector_of_name_items;
2763 std::shared_ptr<generic_name_item> xi{i};
2764 vector_of_name_items.push_back(std::move(xi));
2768 for (
auto & j: l->vector_of_name_items)
2770 std::shared_ptr<generic_name_item> y{j};
2771 vector_of_name_items.push_back(std::move(y));
2779 class type_instance_enum_value;
2784 static const std::vector<std::unique_ptr<type_instance_enum_value>>::const_iterator dummy;
2792 virtual void report(std::ostream & s)
const = 0;
2851 virtual void report(std::ostream & s)
const override
2855 s << simple_placeholder_with_value<TYPE, REPRESENTATION_TYPE>::placeholder <<
'=';
2865 const std::string name;
2866 const unsigned level;
2878 std::vector<std::unique_ptr<type_instance_enum_value>> vector_of_values;
2886 virtual void report(std::ostream & s)
const override;
2890 return vector_of_values.begin();
2894 return vector_of_values.end();
2901 virtual std::string
get_enum_item(
int i) {
return vector_of_values[i]->get_name(); }
2911 virtual void report(std::ostream & s)
const override;
2937 virtual void report(std::ostream & s)
const override;
2946 const std::string placeholder;
2947 const std::string type_name;
2948 const bool is_finite;
2962 std::vector<std::unique_ptr<cartesian_product_dimension>> vector_of_dimensions;
2967 vector_of_dimensions.push_back(std::move(d));
2976 std::unique_ptr<description_of_a_cartesian_product> my_cartesian_product;
2978 family_of_variables(std::unique_ptr<description_of_a_cartesian_product> && d): my_cartesian_product{std::move(d)} {}
2988 virtual void report(std::ostream & s)
const = 0;
3009 std::unique_ptr<generic_literal> my_value;
3013 my_value{std::move(v)}, actual_type{t} {}
3014 virtual void report(std::ostream & s)
const override;
3031 std::unique_ptr<generic_literal> my_value;
3034 virtual void report(std::ostream & s)
const override;
3045 std::unique_ptr<generic_value> my_value;
3048 virtual void report(std::ostream & s)
const override;
3062 std::unique_ptr<generic_name> my_assignment_target;
3063 std::unique_ptr<description_of_a_cartesian_product> my_cartesian_product;
3064 std::unique_ptr<assignment_source> my_assignment_source;
3068 std::unique_ptr<description_of_a_cartesian_product> && p,
3069 std::unique_ptr<assignment_source> && s):
3070 my_assignment_target{std::move(t)},
3071 my_cartesian_product{std::move(p)},
3072 my_assignment_source{std::move(s)} {}
3087 virtual void report(std::ostream & s)
const override
3090 s <<
'=' <<
value <<
"\n";
3156 std::unique_ptr<code> value;
3160 virtual void report(std::ostream & s)
const override;
3178 using iterator_type = std::vector<std::unique_ptr<type_instance_enum_value>>::const_iterator;
3179 const iterator_type first, last;
3183 {p, f, ti}, first{f}, last{l} {}
3185 virtual void report(std::ostream & s)
const override
3187 s <<
placeholder <<
'=' << (*value)->get_name() <<
"\n";
3192 return value != last;
3197 return value == last;
3205 return (*value)->get_level() > max_level;
3208 virtual int get_level()
const {
return (*value)->get_level(); }
3213 static_cast<int>(variable_with_value::actual_memory_representation_type::INTEGER)>
3218 virtual void report(std::ostream & s)
const override
3236 static_cast<int>(variable_with_value::actual_memory_representation_type::INTEGER)>
3244 virtual void report(std::ostream & s)
const override
3250 return value != last;
3254 return value >= last;
3290 virtual bool read_char(
unsigned char & target) {
return false; }
3314 std::string my_getline_result;
3318 virtual bool read_char(
unsigned char & target)
override { target = std::cin.get();
return std::cin.operator bool(); }
3320 virtual void getline()
override { std::getline(std::cin, my_getline_result); }
3334 std::ofstream file_stream;
3348 std::ifstream file_stream;
3349 std::string my_getline_result;
3358 virtual bool read_char(
unsigned char & target)
override { target = file_stream.get();
return file_stream.operator bool(); }
3359 virtual void getline()
override { std::getline(file_stream, my_getline_result); }
3362 virtual int read_integer()
override {
int result = 0; file_stream >> result;
return result; }
3370 std::stringstream string_stream;
3371 std::string my_getline_result;
3381 virtual std::string
get_result()
const override {
return string_stream.str(); }
3382 virtual void set_result(
const std::string & r)
override { string_stream.clear(); string_stream.str(r); }
3384 virtual int read_integer()
override {
int v; string_stream >> v;
return v; }
3386 virtual bool read_char(
unsigned char & target)
override { target = string_stream.get();
return string_stream.operator bool(); }
3388 virtual void getline()
override { std::getline(string_stream, my_getline_result); }
3398 std::uniform_int_distribution<int> distribution;
3400 std::random_device dev;
3402 std::uniform_int_distribution<std::mt19937::result_type> dist;
3412 const std::string type_name;
3429 static constexpr int max_match_group_index = 10;
3442 std::vector<std::shared_ptr<variable_with_value>>
memory;
3455 if (i>=0 && i<
memory.size())
return memory[i]->get_amount_of_signature_items();
3505 void get_first_and_last_iterators_for_enum_type(
const std::string & type_name, std::vector<std::unique_ptr<type_instance_enum_value>>::const_iterator & f, std::vector<std::unique_ptr<type_instance_enum_value>>::const_iterator & l)
const
3525 throw std::runtime_error(
"failed to insert a type instance into machine's map");
3528 std::shared_ptr<type_instance> i2{i};
3606 std::shared_ptr<list_of_statements> body;
3616 body->set_is_main(is_main);
3621 body->set_is_main(is_main);
3630 body->add_statement(std::move(s));
3636 body->set_is_main(m);
3683 static parser * the_parser_pointer;
std::ostream & operator<<(std::ostream &s, const chomik::generic_value &v)
const assignment_source & get_source() const
Definition chomik.h:3076
assignment_event(std::unique_ptr< generic_name > &&t, std::unique_ptr< description_of_a_cartesian_product > &&p, std::unique_ptr< assignment_source > &&s)
Definition chomik.h:3067
void report(std::ostream &s) const
bool get_match(const signature &s, const machine &m, const basic_generator &g, matching_protocol &target) const
virtual ~assignment_event()
Definition chomik.h:3073
virtual void get_actual_code_value(const machine &m, const basic_generator &g, code &target) const override
assignment_source_code_pattern(std::unique_ptr< generic_literal > &&v)
Definition chomik.h:3033
virtual void report(std::ostream &s) const override
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type() const override
Definition chomik.h:3036
virtual void report(std::ostream &s) const override
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:3019
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:3020
virtual void get_actual_code_value(const machine &m, const basic_generator &g, code &target) const
virtual std::string get_actual_identifier_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:3021
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:3018
assignment_source_literal_value(std::unique_ptr< generic_literal > &&v, variable_with_value::actual_memory_representation_type t)
Definition chomik.h:3012
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type() const override
Definition chomik.h:3016
virtual void get_actual_code_value(const machine &m, const basic_generator &g, code &target) const override
virtual void report(std::ostream &s) const override
assignment_source_variable_value(std::unique_ptr< generic_value > &&v)
Definition chomik.h:3047
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2993
virtual void report(std::ostream &s) const =0
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type() const
Definition chomik.h:2990
virtual void get_actual_code_value(const machine &m, const basic_generator &g, code &target) const
Definition chomik.h:2997
virtual std::string get_actual_identifier_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2996
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2995
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2994
virtual ~assignment_source()
Definition chomik.h:2987
virtual void get_copy(std::shared_ptr< statement > &target) const override
assignment_statement(generic_name *const n, generic_value *const v, unsigned new_line_number)
Definition chomik.h:2554
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
virtual bool get_is_code_assignment(machine &m) const override
Definition chomik.h:2582
assignment_statement(const generic_value &gv, unsigned new_line_number)
Definition chomik.h:2556
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2572
virtual void report(std::ostream &s) const override
assignment_statement(const generic_name &gn, const generic_value &gv, unsigned new_line_number)
virtual statement_type get_statement_type() const override
Definition chomik.h:2566
static dictionary_of_identifiers our_dictionary
Definition chomik.h:365
virtual void initialize_description_of_a_cartesian_product(description_of_a_cartesian_product &target) const =0
virtual ~basic_generator()
Definition chomik.h:1539
virtual std::string get_actual_text_representation_of_a_placeholder(const std::string &placeholder) const
Definition chomik.h:1585
virtual void add_placeholder(const std::string &p, std::shared_ptr< generic_type > &&t)
Definition chomik.h:1555
virtual void report(std::ostream &s) const
Definition chomik.h:1553
virtual double get_placeholder_value_float(const std::string &p) const
std::string get_placeholder_value_enum(const std::string &p) const
virtual placeholder_with_value & get_placeholder_with_value(const std::string &p)
virtual void add_mapping(const std::string &f, const std::string &s)
Definition chomik.h:1591
virtual void initialize_mapping(const matching_protocol &mp)
Definition chomik.h:1593
virtual const std::string convert_childs_placeholder_name_to_father(const std::string &cpn) const
Definition chomik.h:1545
virtual bool get_can_have_placeholders() const
Definition chomik.h:1557
virtual void debug() const
Definition chomik.h:1595
static simple_placeholder_with_value_and_report< int, static_cast< int >(chomik::variable_with_value::actual_memory_representation_type::INTEGER)> dummy
Definition chomik.h:1536
virtual void initialize(machine &m)=0
void set_father(std::shared_ptr< basic_generator > f)
Definition chomik.h:1543
virtual void increment(machine &m)=0
virtual bool get_the_cartesian_product_of_placeholder_types_is_finite() const
std::string get_placeholder_value_string(const std::string &p) const
virtual int get_placeholder_value_integer(const std::string &p) const
std::weak_ptr< basic_generator > my_father
Definition chomik.h:1534
virtual bool get_terminated() const
Definition chomik.h:1583
virtual bool get_the_cartesian_product_of_placeholder_types_is_empty() const
virtual bool get_the_cartesian_product_of_placeholder_types_is_small(machine &m) const
virtual bool get_has_placeholder_with_value(const std::string &p) const
Definition chomik.h:1547
virtual void finalize(machine &m)
Definition chomik.h:1597
virtual bool get_is_valid()
Definition chomik.h:1579
virtual bool get_the_cartesian_product_of_placeholder_types_has_one_item() const
virtual void get_placeholder_value_code(const std::string &p, code &target) const
virtual const placeholder_with_value & get_placeholder_with_value(const std::string &p) const
virtual bool get_has_placeholder(const std::string &p) const
Definition chomik.h:1587
cartesian_product_dimension(const std::string &p, const std::string &t, bool f)
Definition chomik.h:2950
virtual ~cartesian_product_dimension()
Definition chomik.h:2951
void report(std::ostream &s) const
virtual bool get_match_code(const code &v, const machine &m, const basic_generator &g) const override
code_name_item(const code &c)
virtual bool get_is_code() const override
Definition chomik.h:1157
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
code_name_item()
Definition chomik.h:1152
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1169
virtual void report(std::ostream &s) const override
code_signature_item(const generic_name_item &s, const code &c)
Definition chomik.h:447
virtual void report(std::ostream &s) const override
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const override
virtual bool get_it_is_code() const override
Definition chomik.h:453
virtual void get_copy(std::shared_ptr< signature_item > &target) const
code_signature_item(const code_signature_item &s)
Definition chomik.h:449
virtual std::string get_type_name() const override
Definition chomik.h:459
bool operator==(const code &c) const
void add_content_to_signature(const generic_name_item &s, signature &target, const machine &m, const basic_generator &g) const
void report(std::ostream &s) const
void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
code(list_of_statements *const l)
Definition chomik.h:3614
void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const
std::string get_actual_text_representation(const machine &m, const basic_generator &g) const
void add_statement(std::shared_ptr< statement > &&s)
Definition chomik.h:3628
code()
Definition chomik.h:3619
void execute(machine &m, std::shared_ptr< basic_generator > father=nullptr) const
const list_of_statements & get_body() const
Definition chomik.h:3639
void add_placeholders_to_generator(basic_generator &g) const
void set_is_main(bool m)
Definition chomik.h:3633
void report(std::ostream &s) const
description_of_a_cartesian_product(const basic_generator &g)
void add_dimension(std::unique_ptr< cartesian_product_dimension > &&d)
Definition chomik.h:2965
dictionary_of_identifiers(const std::string &d)
Definition chomik.h:356
int get_identifier_index(const std::string id)
const std::string get_identifier_by_index(int index) const
execute_statement(unsigned new_line_number)
Definition chomik.h:2592
virtual ~execute_statement()
Definition chomik.h:2593
virtual statement_type get_statement_type() const override
Definition chomik.h:2617
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual void report(std::ostream &s) const override
virtual void get_copy(std::shared_ptr< statement > &target) const override
Definition chomik.h:2627
execute_value_statement(std::unique_ptr< generic_value > &&v, unsigned new_line_number)
Definition chomik.h:2613
virtual void add_placeholders_to_generator(basic_generator &g) const override
execute_variable_value_statement(unsigned new_line_number)
Definition chomik.h:2654
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
void add_generic_name_item(std::shared_ptr< generic_name_item > &&i)
Definition chomik.h:2658
virtual void get_copy(std::shared_ptr< statement > &target) const override
Definition chomik.h:2673
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
execute_variable_value_statement(std::unique_ptr< generic_name > &&n, unsigned new_line_number)
Definition chomik.h:2652
virtual statement_type get_statement_type() const override
Definition chomik.h:2663
virtual void report(std::ostream &s) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
expand_statement(int nd, unsigned new_line_number)
Definition chomik.h:2689
virtual statement_type get_statement_type() const override
Definition chomik.h:2691
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2700
virtual void report(std::ostream &s) const override
Definition chomik.h:2693
virtual void get_copy(std::shared_ptr< statement > &target) const
Definition chomik.h:2704
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
virtual void initialize_description_of_a_cartesian_product(description_of_a_cartesian_product &target) const override
virtual const placeholder_with_value & get_placeholder_with_value(const std::string &p) const override
virtual void initialize_mapping(const matching_protocol &mp) override
virtual placeholder_with_value & get_placeholder_with_value(const std::string &p) override
virtual void report(std::ostream &s) const override
virtual bool get_has_placeholder_with_value(const std::string &p) const override
external_placeholder_generator(const std::string &filename, unsigned new_line_number)
virtual void increment(machine &m) override
virtual void initialize(machine &m) override
void add_placeholder_with_value(std::shared_ptr< placeholder_with_value > &&p)
virtual ~family_of_variables()
Definition chomik.h:2979
family_of_variables(std::unique_ptr< description_of_a_cartesian_product > &&d)
Definition chomik.h:2978
const std::string & get_name() const
Definition chomik.h:1505
generator_placeholder(const std::string &n, std::shared_ptr< generic_type > &&t)
Definition chomik.h:1503
bool get_type_is_finite() const
Definition chomik.h:1507
const generic_type & get_placeholder_type() const
Definition chomik.h:1514
generic_type & get_placeholder_type()
Definition chomik.h:1512
virtual const placeholder_with_value & get_placeholder_with_value(const std::string &p) const override
virtual bool get_terminated() const override
virtual void finalize(machine &m) override
generator(const generic_name &gn, const std::string &filename, unsigned new_line_number)
virtual placeholder_with_value & get_placeholder_with_value(const std::string &p) override
virtual int get_placeholder_value_integer(const std::string &p) const override
virtual void initialize(machine &m) override
virtual std::string get_actual_text_representation_of_a_placeholder(const std::string &placeholder) const override
Definition chomik.h:1700
virtual bool get_the_cartesian_product_of_placeholder_types_is_empty() const override
Definition chomik.h:1726
virtual bool get_has_placeholder(const std::string &p) const override
bool get_does_not_exceed_level(int max_level) const
virtual void get_placeholder_value_code(const std::string &p, code &target) const override
virtual bool get_can_have_placeholders() const
Definition chomik.h:1684
generator(const generic_range &gr, const std::string &filename, unsigned new_line_number)
virtual void increment(machine &m) override
virtual void report(std::ostream &s) const override
void add_placeholder_with_value(std::shared_ptr< placeholder_with_value > &&p)
Definition chomik.h:1707
virtual bool get_has_placeholder_with_value(const std::string &p) const override
virtual bool get_the_cartesian_product_of_placeholder_types_has_one_item() const override
virtual void initialize_description_of_a_cartesian_product(description_of_a_cartesian_product &target) const override
virtual bool get_the_cartesian_product_of_placeholder_types_is_small(machine &m) const override
virtual bool get_is_valid() override
virtual double get_placeholder_value_float(const std::string &p) const override
generator(const generic_value &gv, const std::string &filename, unsigned new_line_number)
virtual void debug() const override
virtual void add_placeholder(const std::string &p, std::shared_ptr< generic_type > &&t) override
generator(const std::string &filename, unsigned new_line_number)
virtual bool get_the_cartesian_product_of_placeholder_types_is_finite() const override
generic_literal_code(std::unique_ptr< code > &&c)
Definition chomik.h:2415
generic_literal_code(list_of_statements *const l)
Definition chomik.h:2405
virtual void report(std::ostream &s) const override
generic_literal_code(const code &c)
Definition chomik.h:2413
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const override
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
generic_literal_code()
Definition chomik.h:2409
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
Definition chomik.h:2422
virtual bool get_is_code() const override
Definition chomik.h:2441
code & get_code()
Definition chomik.h:2418
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual void get_copy(std::unique_ptr< generic_literal > &target) const
Definition chomik.h:2434
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
generic_literal_enum(const char *const tn, generic_name *const gn)
Definition chomik.h:2453
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2488
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
Definition chomik.h:2463
virtual std::string get_actual_enum_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2481
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
Definition chomik.h:2468
virtual void get_copy(std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2483
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2472
generic_literal_enum(const std::string &tn, const generic_name &gn)
Definition chomik.h:2455
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:2477
virtual void report(std::ostream &s) const override
Definition chomik.h:2457
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
Definition chomik.h:2206
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const override
generic_literal_placeholder(const char *const p, generic_type *const t, variable_with_value::actual_memory_representation_type e)
Definition chomik.h:2200
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const override
virtual void report(std::ostream &s) const override
generic_literal_placeholder(const std::string &p, std::unique_ptr< generic_type > &&t, variable_with_value::actual_memory_representation_type e)
Definition chomik.h:2203
virtual void get_copy(std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2224
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const override
virtual void report(std::ostream &s) const =0
virtual std::string get_actual_enum_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2169
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const =0
virtual ~generic_literal()
Definition chomik.h:2158
virtual bool get_is_code() const
Definition chomik.h:2183
virtual void get_copy(std::unique_ptr< generic_literal > &target) const =0
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const =0
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
Definition chomik.h:2167
virtual void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:2165
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const =0
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2173
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2175
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2171
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const =0
virtual void add_placeholders_to_generator(basic_generator &g) const =0
virtual bool get_match_code(const code &v, const machine &m, const basic_generator &g) const
Definition chomik.h:930
virtual bool get_is_variable_value() const
Definition chomik.h:932
virtual void report(std::ostream &s) const =0
virtual bool get_is_string() const
Definition chomik.h:918
virtual bool get_match_string(const std::string &v, const machine &m, const basic_generator &g) const
Definition chomik.h:928
virtual void add_content_to_signature(signature &target) const
Definition chomik.h:904
virtual bool get_match_identifier(const std::string &v, const machine &m, const basic_generator &g) const
Definition chomik.h:929
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const =0
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const =0
virtual ~generic_name_item()
Definition chomik.h:896
virtual bool get_match_float(double v, const machine &m, const basic_generator &g) const
Definition chomik.h:927
virtual bool get_is_float() const
Definition chomik.h:916
virtual std::string get_placeholder_name() const
Definition chomik.h:924
virtual bool get_match_integer(int v, const machine &m, const basic_generator &g) const
Definition chomik.h:926
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const =0
virtual bool get_is_code() const
Definition chomik.h:920
virtual bool get_is_identifier() const
Definition chomik.h:912
virtual bool get_is_placeholder() const
Definition chomik.h:922
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const =0
virtual bool get_is_integer() const
Definition chomik.h:914
generic_name(const generic_name &gn)
generic_name(list_of_generic_name_items *const l)
void report(std::ostream &s) const
void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const
const std::vector< std::shared_ptr< generic_name_item > > & get_vector_of_name_items() const
Definition chomik.h:956
std::string get_actual_text_representation(const machine &m, const basic_generator &g) const
void add_placeholders_to_generator(basic_generator &g) const
bool operator==(const generic_name &n) const
void add_generic_name_item(std::shared_ptr< generic_name_item > &&i)
Definition chomik.h:962
generic_range_boundary_int_literal(const int i)
Definition chomik.h:666
virtual void report(std::ostream &s) const override
Definition chomik.h:668
virtual int get_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:673
virtual void get_copy(std::unique_ptr< generic_range_boundary > &target) const override
Definition chomik.h:678
generic_range_boundary_variable_value(generic_name *gn)
Definition chomik.h:694
generic_range_boundary_variable_value(const generic_name &gn)
virtual int get_value(const machine &m, const basic_generator &g) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual void get_copy(std::unique_ptr< generic_range_boundary > &target) const override
Definition chomik.h:704
virtual void report(std::ostream &s) const override
virtual int get_value(const machine &m, const basic_generator &g) const =0
virtual ~generic_range_boundary()
Definition chomik.h:650
virtual void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:656
virtual void report(std::ostream &s) const =0
virtual void get_copy(std::unique_ptr< generic_range_boundary > &target) const =0
generic_range(std::unique_ptr< generic_range_boundary > &&a, std::unique_ptr< generic_range_boundary > &&b)
Definition chomik.h:722
void report(std::ostream &s) const
Definition chomik.h:725
void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:741
void get_copy(std::unique_ptr< generic_range > &target) const
Definition chomik.h:747
int get_min_value(const machine &m, const basic_generator &g) const
Definition chomik.h:732
generic_range(generic_range_boundary *const min_b, generic_range_boundary *const max_b)
Definition chomik.h:717
int get_max_value(const machine &m, const basic_generator &g) const
Definition chomik.h:736
generic_stream_file_output(const std::string &file_name)
Definition chomik.h:3336
virtual bool get_should_be_opened() const override
Definition chomik.h:3338
virtual bool get_is_good() override
Definition chomik.h:3342
virtual bool get_allows_output() const override
Definition chomik.h:3337
virtual std::ostream & get_output_stream() override
Definition chomik.h:3340
virtual bool get_should_be_closed() const override
Definition chomik.h:3339
generic_stream_random_enum_stream(const std::string &n, machine &m)
virtual bool get_allows_input() const override
Definition chomik.h:3416
virtual std::string read_string() override
virtual bool get_allows_input() const override
Definition chomik.h:3405
generic_stream_random_number_stream(int a, int b)
Definition chomik.h:3404
virtual int read_integer() override
virtual std::ostream & get_output_stream() override
Definition chomik.h:3308
virtual bool get_allows_output() const override
Definition chomik.h:3307
virtual bool get_allows_output() const override
Definition chomik.h:3300
virtual std::ostream & get_output_stream() override
Definition chomik.h:3301
virtual int read_integer() override
Definition chomik.h:3384
virtual bool get_allows_output() const
Definition chomik.h:3377
virtual std::istream & get_input_stream() override
Definition chomik.h:3379
virtual std::string getline_result() const override
Definition chomik.h:3389
virtual void set_result(const std::string &r) override
Definition chomik.h:3382
virtual bool read_char(unsigned char &target) override
Definition chomik.h:3386
virtual std::ostream & get_output_stream() override
Definition chomik.h:3378
generic_stream_stringstream()
Definition chomik.h:3373
virtual void getline() override
Definition chomik.h:3388
generic_stream_stringstream(const std::string &s)
Definition chomik.h:3374
virtual bool get_allows_input() const
Definition chomik.h:3376
virtual std::string get_result() const override
Definition chomik.h:3381
virtual bool get_is_good() override
Definition chomik.h:3391
virtual bool get_should_be_closed() const
Definition chomik.h:3283
virtual void getline()
Definition chomik.h:3292
virtual void set_result(const std::string &r)
Definition chomik.h:3288
virtual ~generic_stream()
Definition chomik.h:3279
virtual std::string getline_result() const
Definition chomik.h:3287
generic_stream()
Definition chomik.h:3277
virtual std::istream & get_input_stream()
Definition chomik.h:3285
virtual bool get_is_good()
Definition chomik.h:3294
virtual bool get_allows_output() const
Definition chomik.h:3281
virtual std::string read_string()
Definition chomik.h:3291
void set_max_size(int ms)
Definition chomik.h:3278
virtual bool get_allows_input() const
Definition chomik.h:3280
int max_size
Definition chomik.h:3269
virtual int read_integer()
Definition chomik.h:3289
virtual bool get_should_be_opened() const
Definition chomik.h:3282
virtual bool read_char(unsigned char &target)
Definition chomik.h:3290
void read_string_of_x_characters(std::string &target, unsigned x)
virtual std::string get_result() const
Definition chomik.h:3286
virtual std::ostream & get_output_stream()
Definition chomik.h:3284
virtual void get_copy(std::shared_ptr< generic_type > &target) const override
Definition chomik.h:624
virtual void report(std::ostream &s) const
Definition chomik.h:608
virtual bool get_is_an_ad_hoc_type() const override
Definition chomik.h:640
virtual bool get_is_equal(const generic_type &t) const override
Definition chomik.h:634
virtual bool get_is_finite() const override
Definition chomik.h:613
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(const machine &m) const override
generic_type_named(const std::string &n)
Definition chomik.h:591
generic_type_named(const char *const n)
Definition chomik.h:589
virtual std::string get_type_name(const machine &m, const basic_generator &g) const override
Definition chomik.h:593
virtual void get_copy(std::unique_ptr< generic_type > &target) const override
Definition chomik.h:629
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:622
virtual std::string get_low_level_type_name() const override
Definition chomik.h:603
virtual std::string get_generic_type_name() const override
Definition chomik.h:598
virtual void get_copy(std::shared_ptr< generic_type > &target) const override
Definition chomik.h:820
virtual bool get_is_finite() const override
Definition chomik.h:778
generic_type_range(generic_range *const nr)
Definition chomik.h:764
virtual void get_copy(std::unique_ptr< generic_type > &target) const override
Definition chomik.h:825
virtual void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:795
virtual std::string get_type_name(const machine &m, const basic_generator &g) const override
Definition chomik.h:800
virtual std::string get_generic_type_name() const override
Definition chomik.h:807
virtual bool get_is_an_ad_hoc_type() const override
Definition chomik.h:836
int get_min_value(const machine &m, const basic_generator &g) const
Definition chomik.h:783
virtual void update_boundaries(machine &m, int &f, int &l, basic_generator &g) const override
Definition chomik.h:841
virtual void report(std::ostream &s) const
Definition chomik.h:773
int get_max_value(const machine &m, const basic_generator &g) const
Definition chomik.h:787
virtual bool get_is_equal(const generic_type &t) const override
Definition chomik.h:830
virtual std::string get_low_level_type_name() const override
Definition chomik.h:815
generic_type_range(const generic_range &rn)
Definition chomik.h:766
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(const machine &m) const override
Definition chomik.h:792
virtual std::string get_generic_type_name() const =0
virtual void report(std::ostream &s) const =0
virtual std::string get_low_level_type_name() const =0
virtual bool get_is_equal(const generic_type &t) const =0
virtual bool get_is_an_ad_hoc_type() const =0
virtual ~generic_type()
Definition chomik.h:559
virtual void update_boundaries(machine &m, int &f, int &l, basic_generator &g) const
Definition chomik.h:579
virtual bool get_is_finite() const =0
virtual void get_copy(std::shared_ptr< generic_type > &target) const =0
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(const machine &m) const =0
virtual std::string get_type_name(const machine &m, const basic_generator &g) const =0
virtual void add_placeholders_to_generator(basic_generator &g) const =0
virtual void get_copy(std::unique_ptr< generic_type > &target) const =0
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
Definition chomik.h:2247
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2273
virtual void get_literal_copy(std::unique_ptr< generic_literal > &target) const
Definition chomik.h:2287
virtual void report(std::ostream &s) const override
Definition chomik.h:2251
virtual bool get_is_literal() const override
Definition chomik.h:2285
generic_value_literal(std::unique_ptr< generic_literal > &&l)
Definition chomik.h:2244
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const override
virtual bool get_is_code(machine &m) const override
Definition chomik.h:2292
virtual std::string get_actual_enum_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2271
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const override
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2275
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2261
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
Definition chomik.h:2257
virtual void get_copy(std::unique_ptr< generic_value > &target) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< generic_value > &target) const override
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:2266
generic_value_literal(generic_literal *const l)
Definition chomik.h:2242
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
virtual void get_copy(std::unique_ptr< generic_value > &target) const override
Definition chomik.h:2524
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< generic_value > &target) const override
generic_value_placeholder(const char *const p, generic_type *const t)
Definition chomik.h:2501
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
virtual void report(std::ostream &s) const override
Definition chomik.h:2505
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2516
generic_value_placeholder(const std::string &p, std::shared_ptr< generic_type > &>)
Definition chomik.h:2503
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const override
generic_value_variable_value(std::unique_ptr< generic_name > &&n)
Definition chomik.h:2103
virtual std::string get_actual_enum_value(const machine &m, const basic_generator &g) const override
generic_value_variable_value(const generic_name &gn)
Definition chomik.h:2105
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const override
virtual void report(std::ostream &s) const override
Definition chomik.h:2107
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const override
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const override
generic_value_variable_value(generic_name *const n)
Definition chomik.h:2101
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
virtual void get_copy(std::unique_ptr< generic_value > &target) const override
Definition chomik.h:2140
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2118
virtual bool get_is_code(machine &m) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< generic_value > &target) const override
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< generic_value > &target) const =0
virtual bool get_is_literal() const
Definition chomik.h:2082
virtual void get_copy(std::unique_ptr< generic_value > &target) const =0
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const =0
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2064
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const =0
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2060
virtual void add_placeholders_to_generator(basic_generator &g) const =0
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2062
virtual void get_literal_copy(std::unique_ptr< generic_literal > &target) const
Definition chomik.h:2078
virtual void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
Definition chomik.h:2068
virtual std::string get_actual_enum_value(const machine &m, const basic_generator &g) const
Definition chomik.h:2066
virtual bool get_is_code(machine &m) const
Definition chomik.h:2084
virtual ~generic_value()
Definition chomik.h:2052
virtual bool get_is_code_with_placeholders(machine &m, basic_generator &g) const
Definition chomik.h:2080
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const =0
virtual void report(std::ostream &s) const =0
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:1032
virtual bool get_is_identifier() const override
Definition chomik.h:1052
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
Definition chomik.h:1005
virtual bool get_match_identifier(const std::string &v, const machine &m, const basic_generator &g) const override
Definition chomik.h:1054
identifier_name_item(const std::string &i)
Definition chomik.h:993
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1043
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:1034
identifier_name_item(const char *const i)
Definition chomik.h:991
virtual void add_content_to_signature(signature &target) const override
Definition chomik.h:1014
virtual void report(std::ostream &s) const override
Definition chomik.h:996
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
Definition chomik.h:1023
std::vector< std::shared_ptr< generic_name_item > > & get_vector_of_name_items()
Definition chomik.h:2776
list_of_generic_name_items(generic_name_item *const i, list_of_generic_name_items *const l)
Definition chomik.h:2759
list_of_generic_names(generic_name *const gn, list_of_generic_names *const l)
Definition chomik.h:1839
std::vector< std::shared_ptr< generic_name > > & get_vector_of_names()
Definition chomik.h:1856
bool operator==(const list_of_statements &l) const
void report(std::ostream &s) const
void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
void add_placeholders_to_generator(basic_generator &g) const
std::vector< std::shared_ptr< statement > > & get_vector_of_statements()
Definition chomik.h:2729
list_of_statements(const list_of_statements &s)
void set_is_main(bool m)
Definition chomik.h:2738
const std::vector< std::shared_ptr< statement > > & get_vector_of_statements() const
Definition chomik.h:2731
list_of_statements(statement *const s, list_of_statements *const l)
void add_statement(std::shared_ptr< statement > &&s)
Definition chomik.h:2733
std::vector< std::shared_ptr< type_definition > > & get_vector_of_type_definitions()
Definition chomik.h:1828
list_of_type_definitions(type_definition *const t, list_of_type_definitions *const l)
Definition chomik.h:1811
list_of_variable_definitions(variable_definition *const vd, list_of_variable_definitions *const l)
Definition chomik.h:1945
std::vector< std::shared_ptr< variable_definition > > & get_vector_of_variable_definitions()
Definition chomik.h:1962
~machine_finalization_guard()
Definition chomik.h:1655
machine_finalization_guard(machine &m, GENERATOR_TYPE &p)
Definition chomik.h:1654
const std::vector< std::unique_ptr< assignment_event > > & get_vector_of_assignment_events() const
Definition chomik.h:3468
std::vector< std::unique_ptr< generic_stream > > vector_of_streams
Definition chomik.h:3446
void add_variable_definition_statement(std::shared_ptr< const statement > &&s)
Definition chomik.h:3490
std::string get_signature_item_type_name(int var_index, int item_index) const
void report(std::ostream &s) const
std::map< std::string, std::shared_ptr< type_instance > > map_type_name_to_type_instance
Definition chomik.h:3436
signature_regular_expression & get_signature_regular_expression(int i)
Definition chomik.h:3586
void add_signature_regular_expression(std::unique_ptr< signature_regular_expression > &&e)
Definition chomik.h:3470
void get_variable_value_code(const signature &vn, code &target) const
std::vector< std::unique_ptr< signature_regular_expression > > vector_of_signature_regular_expressions
Definition chomik.h:3448
std::vector< std::shared_ptr< const statement > > vector_of_variable_definition_statements
Definition chomik.h:3433
void add_type_instance(std::shared_ptr< type_instance > &&i)
Definition chomik.h:3519
void destroy_ad_hoc_type_instances_above(int amount)
int get_max_enum_type_index(const std::string &tn) const
void get_first_and_last_iterators_for_ad_hoc_range_type(const std::string &type_name, int &f, int &l) const
static std::ostream * current_compilation_error_stream
Definition chomik.h:3596
int get_amount_of_variables_in_the_memory() const
Definition chomik.h:3452
std::vector< std::shared_ptr< const statement > > vector_of_type_definiton_statements
Definition chomik.h:3432
variable_with_value & get_variable_with_value_by_index(int index)
int get_amount_of_streams() const
Definition chomik.h:3580
std::string get_enum_type_item(const std::string &tn, int i) const
std::string get_actual_text_representation_of_a_variable(const signature &vn) const
int get_last_created_stream_index() const
Definition chomik.h:3576
std::string get_variable_value_enum(const signature &vn) const
void add_variable_with_value(std::shared_ptr< variable_with_value > &&vv)
std::map< std::string, std::shared_ptr< variable_with_value > > map_signature_string_representation_to_variable_with_value
Definition chomik.h:3444
std::vector< std::shared_ptr< variable_with_value > > memory
Definition chomik.h:3442
std::string get_variable_value_string(const signature &vn) const
virtual void execute_user_defined_executable(const signature &s)
Definition chomik.h:3573
std::vector< std::unique_ptr< assignment_event > > vector_of_assignment_events
Definition chomik.h:3440
void get_first_and_last_iterators_for_enum_type(const std::string &type_name, std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator &f, std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator &l) const
Definition chomik.h:3505
type_instance * create_an_ad_hoc_type(const generic_type &t, generator &g, const std::string &tn)
int get_amount_of_signature_regular_expressions() const
Definition chomik.h:3582
const variable_with_value & get_variable_with_value(const signature &vn) const
bool get_variable_is_represented_in_memory(const signature &vn) const
virtual void create_predefined_types()
virtual void create_predefined_variables()
void get_first_and_last_iterators_for_range_type(const std::string &type_name, int &f, int &l) const
Definition chomik.h:3511
static std::ostream * current_runtime_warning_stream
Definition chomik.h:3596
std::string get_signature_item_representation(int var_index, int item_index) const
void add_type_definition_statement(std::shared_ptr< const statement > &&s)
Definition chomik.h:3485
variable_with_value & get_variable_with_value(const signature &vn)
variable_with_value::actual_memory_representation_type get_actual_memory_representation_type_of_the_variable(const signature &vn) const
void add_stream(std::unique_ptr< generic_stream > &&s)
Definition chomik.h:3475
void add_ad_hoc_type(std::shared_ptr< type_instance_ad_hoc_range > &&t)
int get_last_created_signature_regular_expression_index() const
Definition chomik.h:3578
void create_auxilliary_variables_for_type_instance(type_instance &ti)
double get_variable_value_float(const signature &vn) const
virtual bool get_is_user_defined_executable(const signature &s) const
Definition chomik.h:3571
type_instance & get_type_instance(const std::string &type_name) const
Definition chomik.h:3500
int get_amount_of_ad_hoc_type_instances() const
Definition chomik.h:3594
bool get_type_instance_is_known(const std::string &type_name) const
Definition chomik.h:3495
virtual bool get_can_create_files() const
Definition chomik.h:3462
virtual void create_predefined_streams()
std::vector< std::shared_ptr< type_instance > > vector_of_type_instances
Definition chomik.h:3435
generic_stream & get_stream(int i)
Definition chomik.h:3584
std::vector< std::shared_ptr< family_of_variables > > vector_of_variable_families
Definition chomik.h:3438
void add_assignment_event(std::unique_ptr< assignment_event > &&e)
Definition chomik.h:3480
int get_variable_value_integer(const signature &vn) const
std::vector< std::shared_ptr< type_instance > > vector_of_ad_hoc_type_instances
Definition chomik.h:3435
int get_amount_of_items_in_the_memory_variables_signature(int i) const
Definition chomik.h:3453
mapping_generator_placeholder(const std::string &fn, const std::string sn)
Definition chomik.h:1493
virtual void initialize_description_of_a_cartesian_product(description_of_a_cartesian_product &target) const override
mapping_generator(const std::string &filename, unsigned new_line_number)
Definition chomik.h:1613
virtual void increment(machine &m) override
virtual const placeholder_with_value & get_placeholder_with_value(const std::string &p) const override
virtual const std::string convert_childs_placeholder_name_to_father(const std::string &cpn) const override
virtual void report(std::ostream &s) const override
virtual void initialize_mapping(const matching_protocol &mp) override
void clear_mappings()
Definition chomik.h:1640
virtual void initialize(machine &m) override
virtual bool get_has_placeholder_with_value(const std::string &p) const override
virtual placeholder_with_value & get_placeholder_with_value(const std::string &p) override
virtual void add_mapping(const std::string &f, const std::string &s)
Definition chomik.h:1631
void bind_placeholder_as_float(const std::string &p, double v)
Definition chomik.h:170
bool get_is_placeholder_bound_as_integer(const std::string &p) const
Definition chomik.h:156
std::string get_placeholder_value_identifier(const std::string &p) const
Definition chomik.h:163
void bind_placeholder_as_integer(const std::string &p, int v)
Definition chomik.h:165
bool get_is_placeholder_bound_as_identifier(const std::string &p) const
Definition chomik.h:159
void report(std::ostream &s) const
void initialize_mapping(external_placeholder_generator &target) const
void bind_placeholder_as_identifier(const std::string &p, std::string v)
Definition chomik.h:180
double get_placeholder_value_float(const std::string &p) const
Definition chomik.h:161
int get_placeholder_value_integer(const std::string &p) const
Definition chomik.h:160
std::string get_placeholder_value_string(const std::string &p) const
Definition chomik.h:162
void copy_bound_placeholders(generator &target) const
matching_protocol()
Definition chomik.h:155
void bind_placeholder_as_placeholder(const std::string &p, const std::string &p2)
Definition chomik.h:186
bool get_is_placeholder_bound_as_string(const std::string &p) const
Definition chomik.h:158
bool get_is_successful() const
Definition chomik.h:192
void initialize_mapping(mapping_generator &target) const
void bind_placeholder_as_string(const std::string &p, std::string v)
Definition chomik.h:175
void bind_placeholder_as_code(const std::string &p, const code &c)
bool get_is_placeholder_bound_as_float(const std::string &p) const
Definition chomik.h:157
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
virtual void report(std::ostream &s) const override
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
name_item_code(list_of_statements *const l)
Definition chomik.h:1389
name_item_code()
Definition chomik.h:1393
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
name_item_code(const code &cp)
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:1332
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
Definition chomik.h:1323
name_item_float(double v)
Definition chomik.h:1322
virtual bool get_match_float(double v, const machine &m, const basic_generator &g) const override
Definition chomik.h:1344
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1337
virtual void add_content_to_signature(signature &target) const override
Definition chomik.h:1327
virtual bool get_is_float() const override
Definition chomik.h:1342
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:1303
name_item_integer(int v)
Definition chomik.h:1292
virtual bool get_is_integer() const override
Definition chomik.h:1313
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1308
virtual void add_content_to_signature(signature &target) const override
Definition chomik.h:1298
virtual bool get_match_integer(int v, const machine &m, const basic_generator &g) const override
Definition chomik.h:1315
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
Definition chomik.h:1293
virtual void report(std::ostream &s) const override
Definition chomik.h:1356
name_item_string(std::string v)
Definition chomik.h:1350
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
virtual bool get_is_string() const override
Definition chomik.h:1372
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:1352
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1367
virtual void add_content_to_signature(signature &target) const override
Definition chomik.h:1362
virtual bool get_match_string(const std::string &v, const machine &m, const basic_generator &g) const override
Definition chomik.h:1374
int parse(const char *filename)
static void register_parser(parser *p)
Definition chomik.h:3686
void copy_list_of_statements_to_the_program(list_of_statements *const l)
int parse_string(const std::string &code, std::ostream &error_stream)
static parser * get_parser_pointer()
Definition chomik.h:3687
placeholder_name_item(const std::string &p, const generic_type &t)
Definition chomik.h:1075
generic_type & get_type() const
Definition chomik.h:1106
virtual void report(std::ostream &s) const override
Definition chomik.h:1082
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1097
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual std::string get_placeholder_name() const
Definition chomik.h:1104
virtual bool get_is_placeholder() const override
Definition chomik.h:1102
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
placeholder_name_item(const char *const p, generic_type *const t)
Definition chomik.h:1073
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
virtual void update_ad_hoc_range_type_instance(machine &m, basic_generator &g)
Definition chomik.h:129
virtual int get_level() const
Definition chomik.h:127
virtual bool get_is_valid() const
Definition chomik.h:113
virtual bool get_is_terminated() const
Definition chomik.h:115
virtual std::string get_value_string() const
Definition chomik.h:119
virtual ~placeholder_with_value()
Definition chomik.h:107
virtual std::string get_value_enum() const
Definition chomik.h:121
virtual void get_value_code(code &target) const
Definition chomik.h:123
const std::string & get_name() const
Definition chomik.h:105
virtual bool get_exceeds_level(int max_level) const
Definition chomik.h:125
virtual void update_int_value(int f, int l)
Definition chomik.h:131
virtual variable_with_value::actual_memory_representation_type get_representation_type() const =0
virtual void report(std::ostream &s) const =0
virtual void increment()
Definition chomik.h:117
const std::string placeholder
Definition chomik.h:101
placeholder_with_value(const std::string &n)
Definition chomik.h:103
static bool get_type_is_predefined(const std::string &type_name)
static bool get_variable_is_predefined(const std::string &prefix)
void report(std::ostream &s) const
Definition chomik.h:3667
void add_statement(std::shared_ptr< statement > &&s)
void execute(machine &m) const
virtual bool replace_known_placeholders_with_their_values() const override
Definition chomik.h:2041
virtual bool replace_all_variables_with_their_values() const override
Definition chomik.h:2039
virtual bool replace_all_variables_with_their_values() const override
Definition chomik.h:2031
virtual bool replace_known_placeholders_with_their_values() const override
Definition chomik.h:2033
virtual bool replace_known_placeholders_with_their_values() const =0
virtual bool replace_all_variables_with_their_values() const =0
~signature_common_data()
Definition chomik.h:1260
virtual std::string get_debug_type_name() const
Definition chomik.h:255
virtual bool get_it_is_code() const
Definition chomik.h:239
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const =0
virtual bool get_it_is_float() const
Definition chomik.h:235
virtual bool get_it_is_enum() const
Definition chomik.h:237
virtual void print(std::ostream &s) const
Definition chomik.h:225
virtual bool get_it_is_identifier(const std::string &pattern) const
Definition chomik.h:229
virtual std::string get_type_name() const =0
virtual int get_value_integer() const
Definition chomik.h:241
virtual bool get_is_predefined() const
Definition chomik.h:227
std::string get_string_representation() const
virtual std::string get_value_string() const
Definition chomik.h:245
signature_item(const generic_name_item &s)
Definition chomik.h:216
virtual std::string get_value_enum() const
Definition chomik.h:247
virtual void report(std::ostream &s) const =0
virtual ~signature_item()
Definition chomik.h:218
virtual bool get_it_is_integer() const
Definition chomik.h:233
const generic_name_item & source
Definition chomik.h:214
virtual bool get_it_is_string() const
Definition chomik.h:231
virtual double get_value_float() const
Definition chomik.h:243
virtual void get_copy(std::shared_ptr< signature_item > &target) const =0
virtual void get_value_code(std::unique_ptr< code > &target)
Definition chomik.h:249
const std::vector< std::shared_ptr< signature_item > > & get_vector_of_items() const
Definition chomik.h:547
signature_regular_expression(const std::string &c)
std::regex & get_regular_expression()
Definition chomik.h:549
void execute_predefined(machine &m) const
std::string get_string_representation() const
void add_content(std::shared_ptr< signature_item > &&i)
void report(std::ostream &s) const
void set_line_number(unsigned n)
Definition chomik.h:506
std::string get_item_type_name(int item_index) const
Definition chomik.h:517
const std::vector< std::shared_ptr< signature_item > > & get_vector_of_items() const
Definition chomik.h:523
bool get_is_predefined(const machine &m) const
signature(const generic_name &gn, const machine &m, const basic_generator &g)
signature(const generic_name &gn)
std::string get_item_representation(int item_index) const
Definition chomik.h:516
int get_amount_of_items() const
Definition chomik.h:508
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2358
virtual double get_value_float() const
Definition chomik.h:2350
virtual void get_copy(std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2353
simple_literal_float(double v)
Definition chomik.h:2349
virtual double get_actual_float_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2351
virtual int get_actual_integer_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2333
virtual void get_copy(std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2335
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2340
simple_literal_integer(int v)
Definition chomik.h:2330
virtual int get_value_integer() const
Definition chomik.h:2331
virtual std::string get_value_string() const
Definition chomik.h:2376
virtual void get_copy(std::unique_ptr< generic_literal > &target) const
Definition chomik.h:2380
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::unique_ptr< generic_literal > &target) const override
Definition chomik.h:2385
virtual std::string get_actual_string_value(const machine &m, const basic_generator &g) const override
Definition chomik.h:2378
simple_literal_string(const std::string &v)
Definition chomik.h:2369
virtual void report(std::ostream &s) const override
Definition chomik.h:2371
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
Definition chomik.h:2312
simple_literal(const TYPE v)
Definition chomik.h:2301
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:2318
virtual variable_with_value::actual_memory_representation_type get_actual_memory_representation_type(machine &m, basic_generator &g) const override
Definition chomik.h:2307
const TYPE my_value
Definition chomik.h:2299
virtual void report(std::ostream &s) const override
Definition chomik.h:2302
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
Definition chomik.h:2320
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
Definition chomik.h:1277
virtual void report(std::ostream &s) const override
Definition chomik.h:1272
virtual void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:1284
const TYPE my_value
Definition chomik.h:1269
simple_name_item(TYPE v)
Definition chomik.h:1271
virtual bool get_is_valid() const override
Definition chomik.h:3190
virtual int get_level() const
Definition chomik.h:3208
virtual void increment() override
Definition chomik.h:3199
virtual bool get_exceeds_level(int max_level) const
Definition chomik.h:3203
simple_placeholder_for_enum(const std::string &p, const iterator_type f, const iterator_type l, type_instance *ti)
Definition chomik.h:3181
virtual void report(std::ostream &s) const override
Definition chomik.h:3185
virtual bool get_is_terminated() const override
Definition chomik.h:3195
virtual std::string get_value_enum() const override
Definition chomik.h:3201
virtual bool get_is_valid() const override
Definition chomik.h:3222
virtual bool get_is_terminated() const override
Definition chomik.h:3226
virtual void increment() override
Definition chomik.h:3230
simple_placeholder_for_infinite_range(const std::string &p, type_instance *ti)
Definition chomik.h:3216
virtual void report(std::ostream &s) const override
Definition chomik.h:3218
virtual void report(std::ostream &s) const override
Definition chomik.h:3244
simple_placeholder_for_range(const std::string &p, const int f, const int l, type_instance *ti)
Definition chomik.h:3242
virtual bool get_is_valid() const override
Definition chomik.h:3248
virtual void update_int_value(int f, int l) override
virtual bool get_is_terminated() const override
Definition chomik.h:3252
virtual void increment() override
Definition chomik.h:3256
simple_placeholder_with_value_and_report(const std::string &p, const TYPE v, type_instance *ti)
Definition chomik.h:2849
virtual void report(std::ostream &s) const override
Definition chomik.h:2851
TYPE value
Definition chomik.h:2822
simple_placeholder_with_value(const std::string &p, const TYPE v, type_instance *ti)
Definition chomik.h:2825
virtual void update_int_value(TYPE f, TYPE l)
Definition chomik.h:2835
type_instance * my_type_instance
Definition chomik.h:2823
virtual void update_ad_hoc_range_type_instance(machine &m, basic_generator &g) override
Definition chomik.h:2838
virtual variable_with_value::actual_memory_representation_type get_representation_type() const override
Definition chomik.h:2828
TYPE get_value() const
Definition chomik.h:2833
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const override
virtual bool get_it_is_identifier(const std::string &pattern) const
Definition chomik.h:419
virtual void print(std::ostream &s) const override
Definition chomik.h:407
virtual void get_copy(std::shared_ptr< signature_item > &target) const override
Definition chomik.h:427
virtual std::string get_type_name() const override
Definition chomik.h:437
simple_value_enum_signature_item(const generic_name_item &s, const std::string &i)
Definition chomik.h:405
virtual bool get_is_predefined() const override
Definition chomik.h:417
virtual void report(std::ostream &s) const override
Definition chomik.h:412
virtual std::string get_value_enum() const override
Definition chomik.h:425
const std::string get_enum() const
Definition chomik.h:435
virtual std::string get_debug_type_name() const
Definition chomik.h:433
virtual bool get_it_is_enum() const override
Definition chomik.h:423
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const override
virtual bool get_it_is_float() const override
Definition chomik.h:299
virtual void get_copy(std::shared_ptr< signature_item > &target) const override
Definition chomik.h:304
simple_value_float_signature_item(const generic_name_item &s, const double v)
Definition chomik.h:298
virtual double get_value_float() const override
Definition chomik.h:300
virtual std::string get_type_name() const override
Definition chomik.h:311
virtual std::string get_debug_type_name() const
Definition chomik.h:309
virtual std::string get_type_name() const override
Definition chomik.h:292
virtual std::string get_debug_type_name() const
Definition chomik.h:290
virtual void get_copy(std::shared_ptr< signature_item > &target) const override
Definition chomik.h:285
simple_value_integer_signature_item(const generic_name_item &s, const int v)
Definition chomik.h:279
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const override
virtual int get_value_integer() const override
Definition chomik.h:281
virtual bool get_it_is_integer() const override
Definition chomik.h:280
virtual void report(std::ostream &s) const override
Definition chomik.h:270
simple_value_signature_item(const generic_name_item &s, const TYPE v)
Definition chomik.h:268
const TYPE value
Definition chomik.h:266
virtual std::string get_debug_type_name() const
Definition chomik.h:342
virtual std::string get_type_name() const override
Definition chomik.h:344
virtual void print(std::ostream &s) const override
Definition chomik.h:326
virtual bool get_match(const generic_name_item &gni, const machine &m, const basic_generator &g, matching_protocol &target) const override
virtual std::string get_value_string() const override
Definition chomik.h:333
virtual bool get_it_is_string() const override
Definition chomik.h:331
virtual void get_copy(std::shared_ptr< signature_item > &target) const override
Definition chomik.h:337
simple_value_string_signature_item(const generic_name_item &s, const std::string v)
Definition chomik.h:321
virtual void report(std::ostream &s) const override
Definition chomik.h:322
simple_variable_with_value_enum(std::shared_ptr< signature > &&s, std::string v)
Definition chomik.h:3141
virtual void assign_value_enum(std::string v) override
Definition chomik.h:3145
virtual std::string get_debug_type_name() const override
Definition chomik.h:3147
virtual std::string get_value_enum() const override
Definition chomik.h:3143
virtual double get_value_float() const override
Definition chomik.h:3119
virtual std::string get_debug_type_name() const override
Definition chomik.h:3123
virtual void assign_value_float(double v) override
Definition chomik.h:3121
simple_variable_with_value_float(std::shared_ptr< signature > &&s, double v)
Definition chomik.h:3117
virtual void assign_value_integer(int v) override
Definition chomik.h:3108
virtual int get_value_integer() const override
Definition chomik.h:3106
simple_variable_with_value_integer(std::shared_ptr< signature > &&s, int v)
Definition chomik.h:3104
virtual std::string get_debug_type_name() const override
Definition chomik.h:3110
virtual void assign_value_string(std::string v) override
Definition chomik.h:3133
virtual std::string get_value_string() const override
Definition chomik.h:3131
simple_variable_with_value_string(std::shared_ptr< signature > &&s, std::string v)
Definition chomik.h:3129
virtual std::string get_debug_type_name() const override
Definition chomik.h:3135
virtual void report(std::ostream &s) const override
Definition chomik.h:3087
virtual actual_memory_representation_type get_representation_type() const override
Definition chomik.h:3093
TYPE value
Definition chomik.h:3083
simple_variable_with_value(std::shared_ptr< signature > &&s, TYPE v)
Definition chomik.h:3085
virtual std::string get_debug_type_name() const override
Definition chomik.h:3098
virtual const std::vector< std::shared_ptr< type_definition > > & get_vector_of_type_definitions() const
Definition chomik.h:887
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &s) const =0
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const =0
virtual void add_placeholders_to_generator(basic_generator &g) const =0
virtual bool get_is_code_assignment(machine &m) const
Definition chomik.h:880
virtual void get_copy(std::shared_ptr< statement > &target) const =0
unsigned line_number
Definition chomik.h:858
void get_actual_code_value(const machine &m, const basic_generator &g, const replacing_policy &p, code &target) const
virtual ~statement()
Definition chomik.h:867
statement_type
Definition chomik.h:863
virtual void report(std::ostream &s) const =0
static const std::vector< std::shared_ptr< type_definition > > dummy
Definition chomik.h:860
virtual statement_type get_statement_type() const =0
virtual void expand(machine &m, int depth) const
Definition chomik.h:874
statement(unsigned l)
Definition chomik.h:865
virtual void expand(machine &m, int depth, const std::string &n, std::shared_ptr< type_instance > &e) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
type_definition_body_enum(list_of_generic_names *const l)
virtual void report(std::ostream &s) const override
virtual bool get_is_range() const
Definition chomik.h:1800
virtual int get_max_value(machine &m, basic_generator &g) const override
Definition chomik.h:1483
type_definition_body_range(generic_range *const nr)
Definition chomik.h:1463
virtual void add_placeholders_to_generator(basic_generator &g) const override
Definition chomik.h:1472
virtual bool get_is_range() const override
Definition chomik.h:1477
virtual void report(std::ostream &s) const override
Definition chomik.h:1465
virtual int get_min_value(machine &m, basic_generator &g) const override
Definition chomik.h:1481
virtual void expand(machine &m, int depth, const std::string &n, std::shared_ptr< type_instance > &e) const override
virtual void expand(machine &m, int depth, const std::string &n, std::shared_ptr< type_instance > &e) const =0
virtual void add_placeholders_to_generator(basic_generator &g) const =0
virtual ~type_definition_body()
Definition chomik.h:1440
virtual int get_max_value(machine &m, basic_generator &g) const
Definition chomik.h:1452
virtual bool get_is_range() const =0
virtual int get_min_value(machine &m, basic_generator &g) const
Definition chomik.h:1450
virtual void report(std::ostream &s) const =0
virtual void report(std::ostream &s) const override
virtual void get_copy(std::shared_ptr< statement > &target) const override
Definition chomik.h:1899
virtual const std::vector< std::shared_ptr< type_definition > > & get_vector_of_type_definitions() const override
Definition chomik.h:1904
virtual void add_placeholders_to_generator(basic_generator &g) const override
type_definition_statement(unsigned new_line_number)
Definition chomik.h:1883
type_definition_statement(list_of_type_definitions *const l, unsigned new_line_number)
Definition chomik.h:1871
virtual void expand(machine &m, int depth) const override
virtual statement_type get_statement_type() const override
Definition chomik.h:1887
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
type_definition(const char *const type_name, type_definition_body *const b)
Definition chomik.h:1420
void report(std::ostream &s) const
bool get_is_range() const
void add_placeholders_to_generator(basic_generator &g) const
type_definition_body & get_body()
Definition chomik.h:1432
void expand(machine &m, int depth, std::shared_ptr< type_instance > &e) const
const std::string & get_name() const
Definition chomik.h:1428
virtual void update(placeholder_with_value &v, machine &m, basic_generator &g) override
virtual void report(std::ostream &s) const override
type_instance_ad_hoc_range(const generic_type &t, const std::string &n, int b1, int b2)
Definition chomik.h:2930
const std::string & get_name() const
Definition chomik.h:2870
unsigned get_level() const
Definition chomik.h:2872
type_instance_enum_value(const std::string &n, unsigned new_level)
Definition chomik.h:2868
virtual void add_type_instance_enum_value(const signature &n, unsigned new_level) override
virtual type_instance_mode get_mode() const
Definition chomik.h:2897
type_instance_enum(const std::string &n)
Definition chomik.h:2880
virtual std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator get_last_iterator_for_enum() const override
Definition chomik.h:2892
virtual void add_type_instance_enum_value(const std::string &n, unsigned int new_level) override
virtual void report(std::ostream &s) const override
virtual std::string get_enum_item(int i)
Definition chomik.h:2901
virtual std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator get_first_iterator_for_enum() const override
Definition chomik.h:2888
virtual int get_amount_of_values() const override
Definition chomik.h:2899
virtual void report(std::ostream &s) const override
virtual int get_last_iterator_for_range() const override
Definition chomik.h:2915
type_instance_range(const std::string &n, int b1, int b2)
Definition chomik.h:2909
virtual type_instance_mode get_mode() const
Definition chomik.h:2917
virtual int get_first_iterator_for_range() const override
Definition chomik.h:2913
virtual int get_amount_of_values() const override
Definition chomik.h:2919
int max_boundary
Definition chomik.h:2907
int min_boundary
Definition chomik.h:2907
virtual void add_type_instance_enum_value(const signature &n, unsigned new_level=1)
Definition chomik.h:2794
type_instance(const std::string &n)
Definition chomik.h:2790
virtual void update(placeholder_with_value &v, machine &m, basic_generator &g)
Definition chomik.h:2812
virtual int get_last_iterator_for_range() const
Definition chomik.h:2802
type_instance_mode
Definition chomik.h:2788
void update_name(const std::string &n)
Definition chomik.h:2814
virtual int get_amount_of_values() const =0
std::string name
Definition chomik.h:2786
virtual std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator get_last_iterator_for_enum() const
Definition chomik.h:2799
const std::string get_name() const
Definition chomik.h:2804
virtual void report(std::ostream &s) const =0
virtual std::string get_enum_item(int i)
Definition chomik.h:2810
virtual std::vector< std::unique_ptr< type_instance_enum_value > >::const_iterator get_first_iterator_for_enum() const
Definition chomik.h:2798
virtual int get_first_iterator_for_range() const
Definition chomik.h:2801
virtual void add_type_instance_enum_value(const std::string &n, unsigned new_level=1)
Definition chomik.h:2796
virtual type_instance_mode get_mode() const
Definition chomik.h:2806
virtual void execute(machine &m, std::shared_ptr< const statement > &&i, std::shared_ptr< basic_generator > father=nullptr) const override
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual void report(std::ostream &s) const override
virtual void expand(machine &m, int depth) const override
virtual void get_copy(std::shared_ptr< statement > &target) const override
Definition chomik.h:2009
variable_definition_statement(unsigned new_line_number)
Definition chomik.h:1987
bool operator==(const variable_definition_statement &s) const
virtual void make_copy_with_replacements(const machine &m, const basic_generator &g, const replacing_policy &p, std::shared_ptr< statement > &target) const override
variable_definition & get_last_variable_definition()
Definition chomik.h:1994
variable_definition_statement(list_of_variable_definitions *const l, unsigned new_line_number)
Definition chomik.h:1974
virtual statement_type get_statement_type() const override
Definition chomik.h:1992
void add_placeholders_to_generator(basic_generator &g) const
Definition chomik.h:1928
void expand(machine &m, int depth) const
void report(std::ostream &s) const
Definition chomik.h:1919
bool operator==(const variable_definition &d) const
variable_definition(std::shared_ptr< generic_name > &&n, std::shared_ptr< generic_type > &&t)
Definition chomik.h:1917
virtual bool get_match_identifier(const std::string &v, const machine &m, const basic_generator &g) const override
virtual void report(std::ostream &s) const override
virtual bool get_match_float(double v, const machine &m, const basic_generator &g) const override
virtual std::string get_actual_text_representation(const machine &m, const basic_generator &g) const override
virtual void get_result_replacing_placeholders(const machine &m, const basic_generator &g, const replacing_policy &p, generic_name &target) const override
variable_value_name_item(list_of_generic_name_items *const l)
virtual void get_copy(std::shared_ptr< generic_name_item > &gni) const override
Definition chomik.h:1133
virtual void add_content_to_signature(signature &target, const machine &m, const basic_generator &g) const override
variable_value_name_item(const generic_name &gn)
virtual void add_placeholders_to_generator(basic_generator &g) const override
virtual bool get_is_variable_value() const override
Definition chomik.h:1144
virtual bool get_match_integer(int v, const machine &m, const basic_generator &g) const override
virtual bool get_match_code(const code &v, const machine &m, const basic_generator &g) const override
virtual bool get_match_string(const std::string &v, const machine &m, const basic_generator &g) const override
virtual actual_memory_representation_type get_representation_type() const override
Definition chomik.h:3166
virtual void get_value_code(code &target) const
virtual void report(std::ostream &s) const override
variable_with_value_code(std::shared_ptr< signature > &&s, std::unique_ptr< code > &&v)
Definition chomik.h:3158
virtual std::string get_debug_type_name() const override
Definition chomik.h:3171
virtual void assign_value_code(const code &ci) override
virtual void report(std::ostream &s) const =0
virtual void assign_value_string(std::string v)
Definition chomik.h:82
virtual int get_value_integer() const
Definition chomik.h:68
virtual double get_value_float() const
Definition chomik.h:70
actual_memory_representation_type
Definition chomik.h:53
virtual std::string get_value_enum() const
Definition chomik.h:74
virtual actual_memory_representation_type get_representation_type() const =0
variable_with_value(std::shared_ptr< signature > &&n)
Definition chomik.h:55
virtual ~variable_with_value()
Definition chomik.h:56
virtual std::string get_debug_type_name() const
Definition chomik.h:88
int get_amount_of_signature_items() const
virtual void assign_value_code(const code &ci)
Definition chomik.h:86
std::shared_ptr< signature > actual_name
Definition chomik.h:51
virtual void assign_value_enum(std::string v)
Definition chomik.h:84
std::string get_signature_item_type_name(int item_index) const
virtual void assign_value_float(double v)
Definition chomik.h:80
virtual std::string get_value_string() const
Definition chomik.h:72
virtual void get_value_code(code &target) const
Definition chomik.h:76
std::string get_signature_string_representation() const
std::string get_signature_item_representation(int item_index) const
virtual void assign_value_integer(int v)
Definition chomik.h:78