{"id":369159,"date":"2024-05-21T03:57:30","date_gmt":"2024-05-21T03:57:30","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=369159"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=369159","title":{"rendered":"<span>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0430 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0441 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. \u0418 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0445\u043e\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044f \u043d\u0430\u0448\u0435\u043b \u0432\u043e\u043e\u0431\u0449\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/133780\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u0443<\/a>, \u0432\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043b\u043e\u0445\u0430, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0432 \u044f\u0437\u044b\u043a \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0430 \u043d\u0435 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0434\u043b\u044f \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b C++, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0433\u0443\u0433\u043b\u0430, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043d, \u043b\u0438\u0431\u043e \u0447\u0438\u0441\u0442\u044b\u0439 &#171;\u0421\u0438&#187;. \u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0432 \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0438\u0439 asm, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f DOS.<\/p>\n<p>\u0421 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f 2023 \u0433\u043e\u0434\u0430. \u041d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u0435\u0433\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u043e\u0439\u043c\u0435\u0442 \u043b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0441\u0430\u043b\u0438\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0432 \u0432\u0443\u0437\u0435.<\/p>\n<h2>\u041e \u0447\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0440\u0435\u0447\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/h2>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443: \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0438\u0437 &#171;\u041a\u043d\u0438\u0433\u0438 \u0414\u0440\u0430\u043a\u043e\u043d\u0430-2&#187;, \u043d\u043e \u043c\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0439 \u0431\u044b\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0438\u043c\u043e\u043b\u0435\u0442\u043d\u044b\u043c (\u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u0438 \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044e).<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0444\u0430\u0437\u0430\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0414\u043b\u044f \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0430\u0437\u044b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a9f\/a62\/966\/a9fa629665f452914cba44d583b73bfc.png\" width=\"342\" height=\"919\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a9f\/a62\/966\/a9fa629665f452914cba44d583b73bfc.png\"\/><\/figure>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f, \u043a\u0430\u043a \u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439  \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u043e\u0449\u0443 \u0441\u0445\u0435\u043c\u0443, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0448\u0430\u0433\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 (\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u043c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430) \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<h2>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/h2>\n<p>\u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u0430 \u0435\u0433\u043e \u044d\u0442\u0430\u043f\u0435 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0433\u043a\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 &#171;\u0441 \u0431\u0430\u0437\u0430\u0440\u0430&#187;: <\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0430 (+, -, *, \/ (\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435)).    \u0423 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445  \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u0434\u0440\u0443\u0433 \u043d\u0430\u0434 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u043e\u0431\u043e\u043a. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0446\u0438\u043a\u043b\u043e\u0432 if, if\/else, while.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 print. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &lt; (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 1, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u043e, \u0438 0 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f,  \u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b 26 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043e\u0434\u0438\u043d \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445: unsigned short.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0431\u0435\u043b\u044b, \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0430 \u044f\u0437\u044b\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 (\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0439):<\/p>\n<pre><code>&lt;program> ::= &lt;statement> &lt;statement> ::=  \"if\" &lt;parenExpr> &lt;statement> |                  \"if\" &lt;parenExpr> &lt;statement> \"else\" &lt;statement> |                  \"while\" &lt;parenExpr> &lt;statement> |                  \"print\" &lt;parenExpr> |                  \"{\" { &lt;statement> } \"}\" |                  &lt;expr> \";\" |                  \";\" &lt;parenExpr> ::= \"(\" &lt;expr> \")\" &lt;expr> ::= &lt;test> | &lt;id> \"=\" &lt;expr> &lt;test> ::= &lt;arExpr> | &lt;arExpr> \"&lt;\" &lt;arExpr> &lt;arExpr>  ::= &lt;term> | &lt;arExpr> \"+\" &lt;term> |               &lt;arExpr> \"*\" &lt;term> | &lt;arExpr> \"-\" &lt;term> |               &lt;arExpr> \"\/\" &lt;term> &lt;term> ::= &lt;id> | &lt;int> | &lt;parenExpr> &lt;id>   ::= \"a\" | \"b\" | ... | \"z\" &lt;int>  ::= &lt;digit>, { &lt;digit> } &lt;digit> ::= \"0\" | \"1\" | ... | \"9\" <\/code><\/pre>\n<p>\u0412\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u042d\u0442\u043e\u0442 \u043e\u0434\u0438\u043d \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438, \u043b\u0438\u0431\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\/\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c (if, if\/else, while), \u043b\u0438\u0431\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u0430 (print), \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0438 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435-\u0443\u0441\u043b\u043e\u0432\u0438\u0435 (\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u043e 0, \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a false, \u0432 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u043a\u0430\u043a true) \u0438 \u0442\u0435\u043b\u043e (\u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c).<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439.<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 print \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430\u043c \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0439 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u044c\u0448\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439).<\/p>\n<p>\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0434 \u0442\u0435\u0440\u043c\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e   \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0443, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<\/h2>\n<p>\u041e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.<\/p>\n<pre><code class=\"cpp\">\/\/compiler.h  enum class tokensTypes {     NUM, VAR, IF, ELSE, WHILE, LBRA, RBRA, LPAR, RPAR,     ADD, SUB, MUL, DIV, LESS, ASSIG,     SEMICOL, ENDFILE, ERROR, PRINT };  \/\/compiler.cpp  std::map&lt;char, compiler::tokensTypes> compiler::specialSymbols { std::pair&lt;char, tokensTypes>{'{', tokensTypes::LBRA}, std::pair&lt;char, tokensTypes>{'}', tokensTypes::RBRA}, std::pair&lt;char, tokensTypes>{'(', tokensTypes::LPAR}, std::pair&lt;char, tokensTypes>{')', tokensTypes::RPAR}, std::pair&lt;char, tokensTypes>{'+', tokensTypes::ADD}, std::pair&lt;char, tokensTypes>{'-', tokensTypes::SUB}, std::pair&lt;char, tokensTypes>{'*', tokensTypes::MUL}, std::pair&lt;char, tokensTypes>{'\/', tokensTypes::DIV}, std::pair&lt;char, tokensTypes>{'&lt;', tokensTypes::LESS}, std::pair&lt;char, tokensTypes>{'=', tokensTypes::ASSIG}, std::pair&lt;char, tokensTypes>{';', tokensTypes::SEMICOL}, };  std::map&lt;std::string, compiler::tokensTypes> compiler::specialWords { std::pair&lt;std::string, tokensTypes>{\"if\", tokensTypes::IF}, std::pair&lt;std::string, tokensTypes>{\"else\", tokensTypes::ELSE}, std::pair&lt;std::string, tokensTypes>{\"while\", tokensTypes::WHILE}, std::pair&lt;std::string, tokensTypes>{\"print\", tokensTypes::PRINT}, };<\/code><\/pre>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0432 \u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d:<\/p>\n<pre><code class=\"cpp\">\/\/ compiler.h  class token { public:     tokensTypes type;     unsigned short value;     char variable;      token(tokensTypes type, int value = 0, char variable = 'a'); };  \/\/ compiler.cpp  compiler::token compiler::getNexttoken() { if (nowPos == textLen) \/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 return token(compiler::tokensTypes::ENDFILE);  std::string str = \"\"; \/\/ \u0412 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d char now = text[nowPos++];      \/\/ \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b while ((now == ' ' || now == '\\r' || now == '\\n' || now == '\\t')&amp;&amp; nowPos &lt; textLen) now = text[nowPos++];     \/\/ \u0418 \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 if (nowPos == textLen) return token(compiler::tokensTypes::ENDFILE);      \/\/ \u041f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0448\u043b\u0438 \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043a\u043e\u043d\u0446\u0435 \u0442\u043e\u043a\u0435\u043d\u0430, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c while (!(now == ' ' || now == '\\r' || now == '\\n' || now == '\\t')) {         \/\/ \u0415\u0441\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u0430\u043c if (str.size() == 0)  { if (specialSymbols.count(now)) return token(specialSymbols[now]); else if (isdigit(now)) { do { str += now; now = text[nowPos++]; } while (isdigit(now)); nowPos--; break; } else str += now; } else { if (specialSymbols.count(now)) \/\/ \u0415\u0441\u043b\u0438 \u0431\u044b\u043b \u0432\u0441\u0442\u0440\u0435\u0447\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b {                              \/\/ \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u043e\u043a\u0435\u043d\u0430 nowPos--; break; } str += now; }  if (specialWords.count(str)) \/\/\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 return token(specialWords[str]);  if (nowPos == textLen) break;  now = text[nowPos++]; }      \/\/ \u0415\u0441\u043b\u0438 \u0432 \u0442\u043e\u043a\u0435\u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u0431\u0443\u043a\u0432\u0430, \u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 if (str.size() == 1 &amp;&amp; str[0] >= 'a' &amp;&amp; str[0] &lt;= 'z') return  token(tokensTypes::VAR, 0, str[0]);  unsigned short value = 0;     \/\/ \u0415\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d - \u0447\u0438\u0441\u043b\u043e, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u043c \u0435\u0433\u043e  for (int i = 0; i &lt; str.size(); i++) { if (isdigit(str[i])) value = value * 10 + (str[i] - '0'); else return token(compiler::tokensTypes::ERROR); }  return token(compiler::tokensTypes::NUM, value); }<\/code><\/pre>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">\/\/compiler.cpp  bool compiler::compile(std::string&amp; result) { token token = getNexttoken();  while (token.type != tokensTypes::ENDFILE) { if (token.type == tokensTypes::ERROR) \/\/ \u0415\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d { result = \"Lexical error\"; \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 return false; } tokens.push_back(token); token = getNexttoken(); } tokens.push_back(token); }<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c.<\/p>\n<h2>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/h2>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0442\u0430\u043a \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0443\u0437\u043b\u044b \u0438 \u0438\u0445 \u0442\u0438\u043f\u044b:<\/p>\n<pre><code class=\"cpp\">\/\/ compiler.h  enum class nodeTypes {     CONST, VAR, ADD, SUB, MUL, DIV,     LESSTHEN, SET, IF, IFELSE, WHILE,     EMPTY, SEQ, EXPR, PROG, PRINT };  class node { public:     nodeTypes type;     int value;     node* op1;     node* op2;     node* op3;      node(nodeTypes type, int value = 0, node* op1 = nullptr, node* op2 = nullptr, node* op3 = nullptr);     ~node(); };<\/code><\/pre>\n<p>\u0421 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0432\u043e\u0434\u043d\u044b\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (\u043a\u043e\u0434\u0430 \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0440\u044b\u043b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440):<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">\/\/ compiler.cpp  bool compiler::parser::parse(std::vector&lt;token>&amp; tokens, compiler::node&amp; result) { int count = 0; compiler::node* node = new compiler::node(nodeTypes::EMPTY); bool res = parser::statement(tokens, count, node);  if (count != tokens.size() - 1 || !res) return false;  result = *node; return true; }  bool compiler::parser::statement(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; node = new compiler::node(nodeTypes::EMPTY); bool parsed = true; switch (tokens[count].type) { case compiler::tokensTypes::IF: count++; node->type = nodeTypes::IF; parsed = compiler::parser::parenExpr(tokens, count, node->op1);  if (!parsed) return false;  parsed = compiler::parser::statement(tokens, count, node->op2);  if (!parsed) return false;  if (tokens[count].type == tokensTypes::ELSE) { count++; node->type = nodeTypes::IFELSE; bool parsed = compiler::parser::statement(tokens, count, node->op3);  if (!parsed) return false; } break;  case compiler::tokensTypes::WHILE: count++; node->type = nodeTypes::WHILE; parsed = compiler::parser::parenExpr(tokens, count, node->op1);  if (!parsed) return false;  parsed = compiler::parser::statement(tokens, count, node->op2);  if (!parsed) return false; break;  case compiler::tokensTypes::SEMICOL: count++; break;  case compiler::tokensTypes::LBRA: count++; while (tokens[count].type != tokensTypes::RBRA &amp;&amp; count &lt; tokens.size()) { node = new compiler::node(nodeTypes::SEQ, 0, node);  bool parsed = compiler::parser::statement(tokens, count, node->op2);  if (!parsed) return false; } count++; break;  case compiler::tokensTypes::PRINT: count++; node->type = nodeTypes::PRINT; parsed = compiler::parser::parenExpr(tokens, count, node->op1);  if (!parsed) return false; break;  if (!parsed) return false;  default: node->type = nodeTypes::EXPR; parsed = compiler::parser::expr(tokens, count, node->op1);  if (tokens[count++].type != tokensTypes::SEMICOL) return false;  if (!parsed) return false; }  return true; }  bool compiler::parser::parenExpr(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; if (tokens[count].type != tokensTypes::LPAR) return false;  count++;  bool res = expr(tokens, count, node);  if (tokens[count].type != tokensTypes::RPAR) return false;  count++; return true; }  bool compiler::parser::expr(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; if (tokens[count].type != compiler::tokensTypes::VAR) return test(tokens, count, node);  bool res = test(tokens, count, node);  if (!res) return false;  if (node->type == nodeTypes::VAR &amp;&amp; tokens[count].type == tokensTypes::ASSIG) { node = new compiler::node(nodeTypes::SET, 0, node); count++; res = expr(tokens, count, node->op2); }  return res; }  bool compiler::parser::test(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; bool res = arExpr(tokens, count, node);  if (!res) return false;  if (tokens[count].type == tokensTypes::LESS) { count++; node = new compiler::node(nodeTypes::LESSTHEN, 0, node); res = arExpr(tokens, count, node->op2); }  return res; }  bool compiler::parser::arExpr(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; bool res = term(tokens, count, node);  if (!res) return false;  tokensTypes now = tokens[count].type;  while (now == tokensTypes::ADD || now == tokensTypes::SUB || now == tokensTypes::MUL || now == tokensTypes::DIV) { nodeTypes nT = nodeTypes::EMPTY; switch (now) { case compiler::tokensTypes::ADD: nT = nodeTypes::ADD; break; case compiler::tokensTypes::SUB: nT = nodeTypes::SUB; break; case compiler::tokensTypes::MUL: nT = nodeTypes::MUL; break; case compiler::tokensTypes::DIV: nT = nodeTypes::DIV; break; }  node = new compiler::node(nT, 0, node); count++; bool res = term(tokens, count, node->op2);  if (!res) return false;  now = tokens[count].type; }  return true; }  bool compiler::parser::term(std::vector&lt;token>&amp; tokens, int&amp; count, compiler::node*&amp; node) { delete node; bool parsed; switch(tokens[count].type) { case tokensTypes::VAR: node = new compiler::node(nodeTypes::VAR, tokens[count].variable - 'a'); count++; break;  case tokensTypes::NUM: node = new compiler::node(nodeTypes::CONST, tokens[count].value); count++; break;  default: bool res = parenExpr(tokens, count, node);  if (!res) return false;  break; }  return true; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0417\u0434\u0435\u0441\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0438 \u0441 \u043f\u0440\u0430\u0432\u0438\u043b\u0430\u043c\u0438 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u044b\u0448\u0435. \u0421\u0442\u043e\u0438\u0442 \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043d\u0430 \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0442\u0441\u044f \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0435 \u0443\u0437\u043b\u044b. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0433\u0440\u0443\u043f\u043f:<\/p>\n<ul>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 CONST, VAR: \u043d\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432, \u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0447\u0438\u0441\u043b\u0430 \u0438\u043b\u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432\u0435<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 ADD, SUB, MUL, DIV, LESSTHEN: \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u043e \u0434\u0432\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u0430, \u0433\u0434\u0435 op1 &#8212; \u043b\u0435\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434, \u0430 op2 &#8212; \u043f\u0440\u0430\u0432\u044b\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 SET: \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u043f\u043e \u0434\u0432\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u0430: op1 &#8212; \u0443\u0437\u0435\u043b \u0442\u0438\u043f\u0430 VAR \u0441 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, op2 &#8212; \u0443\u0437\u0435\u043b, \u0441\u043e\u0431\u0438\u0440\u0430\u044e\u0449\u0438\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 IF \u0438 WHILE: \u0442\u0430\u043a\u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432 \u0441\u0435\u0431\u044f \u043f\u043e \u0434\u0432\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u0430: op1 &#8212; \u0443\u0441\u043b\u043e\u0432\u0438\u0435, \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u044c \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f, op2 &#8212; \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 IFELSE: \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0442\u0440\u0438 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u0430. \u041f\u0435\u0440\u0432\u044b\u0435 \u0434\u0432\u0430 \u0442\u0430\u043a\u0438\u0435 \u0436\u0435, \u043a\u0430\u043a \u0443 \u0443\u0437\u043b\u043e\u0432 IF \u0438\u043b\u0438 WHILE, \u0442\u0440\u0435\u0442\u0438\u0439 &#8212; \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442\u0441\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0435, \u0435\u0441\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043b\u043e\u0436\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 SEQ: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u0432\u0430 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u0430. op1 &#8212; \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c\u043e\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, op2 &#8212; \u0442\u0435\u043a\u0443\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435. (\u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0441\u0442\u043e\u0438\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432 &#171;\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u043c&#187; \u043f\u043e\u0440\u044f\u0434\u043a\u0435: \u0443\u0437\u0435\u043b \u0445\u0440\u0430\u043d\u0438\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0435, \u043d\u043e \u0432 \u0442\u0430\u043a\u043e\u043c \u0432\u0438\u0434\u0435 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u043e\u0449\u0435)<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 EXPR \u0438 PROG: \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b op1, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u044e\u0449\u0438\u0439 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p>\u0423\u0437\u043b\u044b \u0442\u0438\u043f\u0430 PRINT: \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0439 \u0443\u0437\u0435\u043b, \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u0432\u044b\u0432\u043e\u0434\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ul>\n<p>\u041f\u0440\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d \u0438 \u043d\u0430 \u0435\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442\u0441\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u043e \u0442\u0438\u043f\u0435 \u0442\u0435\u043a\u0443\u0449\u0435\u0433\u043e \u0443\u0437\u043b\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0441\u0430.<\/p>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u043e\u043a\u043e\u043d\u0447\u0435\u043d: \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043a\u043e\u0434\u0430:<\/p>\n<pre><code class=\"cpp\">\/\/ compiler.cpp  bool compiler::compile(std::string&amp; result) { token token = getNexttoken();  while (token.type != tokensTypes::ENDFILE) { if (token.type == tokensTypes::ERROR) { result = \"Lexical error\"; return false; } tokens.push_back(token); token = getNexttoken(); } tokens.push_back(token);  compiler::node tree = compiler::node(nodeTypes::EMPTY); if (!compiler::parser::parse(tokens, tree)) return false; }<\/code><\/pre>\n<h2>\u0413\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u043a\u043e\u0434\u0430<\/h2>\n<p>\u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u0438 \u0434\u0435\u0440\u0435\u0432\u0430, \u043d\u0430\u043c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0432\u044b\u0434\u0435\u043b\u0438\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u0432 \u043b\u044e\u0431\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0435: \u043d\u0430\u0447\u0430\u043b\u043e \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b, \u043c\u0430\u043a\u0440\u043e\u0441 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u0435\u043b \u0432 \u0434\u0435\u0441\u044f\u0442\u0438\u0447\u043d\u043e\u043c \u0432\u0438\u0434\u0435 \u0438 \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b:<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"assembly\">const std::string compiler::linker::programsStart = R\"STR(ASSUME CS:CODE, DS:DATA  DATA SEGMENT         vars dw 26 dup (0) DATA ENDS;  CODE SEGMENT         PRINT MACRO         local DIVCYC, PRINTNUM;         push ax;         push bx;         push cx;         push dx;         mov bx, 10;         mov cx, 0;     DIVCYC:         mov dx, 0;         div bx;         push dx;         inc cx;         cmp ax, 0;         jne DIVCYC;     PRINTNUM:         pop dx;         add dl, '0';         mov ah, 02h;         int 21h;         dec cx;         cmp cx, 0;         jne PRINTNUM; mov dl, 0dh;         mov ah, 02h;         int 21h; mov dl, 0ah;         mov ah, 02h;         int 21h;         pop dx;         pop cx;         pop bx;         pop ax;         ENDM;      begin:         lea si, vars; )STR\";  const std::string compiler::linker::programsEnd = R\"STR(        mov ah, 4Ch;         int 21h; CODE ENDS; end begin)STR\";<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0418\u0437 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e\u0433\u043e \u0432 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435: \u0432\u044b\u0434\u0435\u043b\u0435\u043d\u0438\u0435 26 \u0441\u043b\u043e\u0432 (\u0443\u0447\u0430\u0441\u0442\u043a\u043e\u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u043f\u043e \u0434\u0432\u0430 \u0431\u0430\u0439\u0442\u0430) \u043f\u043e\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u0432\u043e\u0434 \u0447\u0438\u0441\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u043a\u0440\u043e\u0441\u0430 PRINT (\u043e\u043d \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430 AX, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0432 \u0441\u0442\u0435\u043a\u0435 \u043f\u0435\u0440\u0435\u0434 \u0432\u044b\u0432\u043e\u0434\u043e\u043c \u0438 \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044f \u0435\u0433\u043e \u043f\u043e\u0441\u043b\u0435, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0432 \u0441\u0442\u0435\u043a \u0446\u0438\u0444\u0440\u044b \u0447\u0438\u0441\u043b\u0430, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0438\u0445 \u043e\u0434\u043d\u0443 \u0437\u0430 \u0434\u0440\u0443\u0433\u043e\u0439).<\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u0448\u0430\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0445 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u043c \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u043e\u043c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u043c \u0438 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440 AX (\u0432 \u043d\u0435\u043c \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043b\u0435\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438), \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0430, \u0445\u0440\u0430\u043d\u044f\u0449\u0435\u0433\u043e \u043f\u0440\u0430\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0433\u0438\u0441\u0442\u0440 BX.<\/p>\n<p>\u041f\u0440\u0438 \u0441\u0431\u043e\u0440\u043a\u0435 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u043a\u0430 programsStart, \u0437\u0430\u0442\u0435\u043c \u043a \u043d\u0435\u0439 \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043a\u043e\u0434\u0430, \u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0430\u0435\u0442\u0441\u044f \u044d\u0442\u043e \u0441\u0442\u0440\u043e\u043a\u043e\u0439 programsEnd.<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0446\u0438\u044e \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0443\u0437\u043b\u043e\u0432 \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">std::string compiler::linker::compileNode(compiler::node* block, int&amp; labelCount) { std::string result = \"\";  int lCount1, lCount2, firstLabelNum, secondLabelNum, thirdLabelNum;  switch (block->type) { case nodeTypes::PROG: result += compileNode(block->op1, labelCount); break;  case nodeTypes::PRINT: result += compileNode(block->op1, labelCount); result += \"        PRINT;\\n\"; break;  case nodeTypes::VAR: result += \"        mov ax, [si + \" + std::to_string(block->value * 2) + \"];\\n\"; break;  case nodeTypes::CONST: result += \"        mov ax, \" + std::to_string(block->value) + \";\\n\"; break;  case nodeTypes::ADD: result += compileNode(block->op1, labelCount); result += \"        push ax;\\n\"; result += compileNode(block->op2, labelCount); result += \"        mov bx, ax;\\n\"; result += \"        pop ax;\\n\"; result += \"        add ax, bx;\\n\"; break;  case nodeTypes::SUB: result += compileNode(block->op1, labelCount); result += \"        push ax;\\n\"; result += compileNode(block->op2, labelCount); result += \"        mov bx, ax;\\n\"; result += \"        pop ax;\\n\"; result += \"        sub ax, bx;\\n\"; break;  case nodeTypes::MUL: result += compileNode(block->op1, labelCount); result += \"        push ax;\\n\"; result += compileNode(block->op2, labelCount); result += \"        mov bx, ax;\\n\"; result += \"        pop ax;\\n\"; result += \"        mul bx;\\n\"; break;  case nodeTypes::DIV: result += compileNode(block->op1, labelCount); result += \"        push ax;\\n\"; result += compileNode(block->op2, labelCount); result += \"        mov bx, ax;\\n\"; result += \"        pop ax;\\n\"; result += \"        xor dx, dx;\\n\"; result += \"        div bx;\\n\"; break;  case nodeTypes::SET: result += compileNode(block->op2, labelCount); result += \"        mov [si + \" + std::to_string(block->op1->value * 2) + \"], ax;\\n\"; break;  case nodeTypes::EXPR: result += compileNode(block->op1, labelCount) + '\\n'; break;  case nodeTypes::LESSTHEN: result += compileNode(block->op1, labelCount); result += \"        push ax;\\n\"; result += compileNode(block->op2, labelCount); result += \"        mov bx, ax;\\n\"; result += \"        pop ax;\\n\"; result += \"        cmp ax, bx;\\n\"; result += \"        jae LBL\" + std::to_string(labelCount++) + \";\\n\"; result += \"        mov ax, 1;\\n\"; result += \"        jmp LBL\" + std::to_string(labelCount++) + \";\\n\"; result += \"    LBL\" + std::to_string(labelCount - 2) + \":\\n\"; result += \"        mov ax, 0;\\n\"; result += \"    LBL\" + std::to_string(labelCount - 1) + \": nop\\n\"; break;  case nodeTypes::IF: result += compileNode(block->op1, labelCount); result += \"        cmp ax, 0;\\n\"; lCount1 = labelCount; result += \"        jne LBL\" + std::to_string(labelCount++) + \";\\n\"; lCount2 = labelCount; result += \"        jmp LBL\" + std::to_string(labelCount++) + \";\\n\"; result += \"    LBL\" + std::to_string(lCount1) + \": nop\\n\"; result += compileNode(block->op2, labelCount); result += \"    LBL\" + std::to_string(lCount2) + \": nop\\n\"; break;  case nodeTypes::SEQ: result += compileNode(block->op1, labelCount); result += compileNode(block->op2, labelCount); break;  case nodeTypes::IFELSE: result += compileNode(block->op1, labelCount); result += \"        cmp ax, 0;\\n\"; firstLabelNum = labelCount; result += \"        je LBL\" + std::to_string(labelCount++) + \";\\n\"; result += compileNode(block->op2, labelCount); secondLabelNum = labelCount; result += \"        jmp LBL\" + std::to_string(labelCount++) + \";\\n\"; result += \"    LBL\" + std::to_string(firstLabelNum) + \": nop\\n\"; result += compileNode(block->op3, labelCount); result += \"    LBL\" + std::to_string(secondLabelNum) + \": nop\\n\"; break;  case nodeTypes::WHILE: secondLabelNum = labelCount; result += \"        jmp LBL\" + std::to_string(labelCount++) + \"; \\n\"; firstLabelNum = labelCount; result += \"    LBL\" + std::to_string(labelCount++) + \": nop\\n\"; result += compileNode(block->op2, labelCount); result += \"    LBL\" + std::to_string(secondLabelNum) + \": nop\\n\"; result += compileNode(block->op1, labelCount); result += \"        cmp ax, 0;\\n\"; thirdLabelNum = labelCount; result += \"        je LBL\" + std::to_string(thirdLabelNum) + \"\\n\"; result += \"        jmp LBL\" + std::to_string(firstLabelNum) + \"\\n\"; result += \"    LBL\" + std::to_string(thirdLabelNum) + \": nop\\n\"; break;  default: break; }  return result; }<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u043a\u043e\u0434\u0435 \u0441\u0442\u043e\u0438\u0442 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<ol>\n<li>\n<p>\u0414\u043b\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0443\u0447\u0430\u0441\u0442\u0438\u0435 \u0434\u0432\u0443\u0445 \u043e\u043f\u0435\u0440\u0430\u043d\u0434\u043e\u0432, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043b\u0435\u0432\u044b\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 AX, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u043e\u043d \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u0441\u0442\u0435\u043a, \u0430 \u0437\u0430\u0442\u0435\u043c \u043d\u0430 \u0435\u0433\u043e \u043c\u0435\u0441\u0442\u0435 \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432\u0442\u043e\u0440\u043e\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434. \u041f\u0435\u0440\u0435\u0434 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0430\u0432\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u043d\u0434 \u043f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u0435\u0442\u0441\u044f \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440 BX, \u0430 \u043b\u0435\u0432\u044b\u0439 &#8212; \u0432 AX, \u043f\u043e\u0441\u043b\u0435 \u0447\u0435\u0433\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u0432 AX.<\/p>\n<\/li>\n<li>\n<p>\u0410\u0434\u0440\u0435\u0441\u0430 \u044f\u0447\u0435\u0435\u043a \u0432 \u043f\u0430\u043c\u044f\u0442\u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u043e \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438: \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043d\u0430 \u0441\u0434\u0432\u0438\u0433 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u0434\u0432\u0438\u0433 \u0438\u0437\u0432\u0435\u0441\u0442\u0435\u043d \u0437\u0430\u0440\u0430\u043d\u0435\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 LESSTHEN \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0435 AX 1 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u0442\u0438\u043d\u044b \u0438 0 \u0432 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b IF, IFELSE \u0438 WHERE \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442 \u0447\u0438\u0441\u043b\u043e \u0441 0   (\u0441\u043c. \u043f\u0443\u043d\u043a\u0442 3 \u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u044f \u043a \u044f\u0437\u044b\u043a\u0443).<\/p>\n<\/li>\n<li>\n<p>\u0412\u043c\u0435\u0441\u0442\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u043e\u0432 \u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u0442\u0440\u0438\u0446\u0430\u043d\u0438\u0435 \u0443\u0441\u043b\u043e\u0432\u0438\u044f \u0434\u043b\u044f \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0447\u0435\u0440\u0435\u0437 \u043e\u0434\u0438\u043d \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440, \u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434 \u043d\u0430 \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 jmp (\u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 &#171;Relative jump out of range by xxxxh bytes&#187;.<\/p>\n<\/li>\n<\/ol>\n<p>\u0418 \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u044d\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432 \u043c\u0435\u0442\u043e\u0434 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438:<\/p>\n<pre><code class=\"coffeescript\">\/\/ compiler.css  std::string compiler::linker::compile() { std::string program = \"\"; program += programsStart; int a = 0; program += compileNode(tree, a); program += programsEnd; return  program; }  bool compiler::compile(std::string&amp; result) { token token = getNexttoken();  while (token.type != tokensTypes::ENDFILE) { if (token.type == tokensTypes::ERROR) { result = \"Lexical error\"; return false; } tokens.push_back(token); token = getNexttoken(); } tokens.push_back(token);  compiler::node tree = compiler::node(nodeTypes::EMPTY); if (!compiler::parser::parse(tokens, tree)) return false;  compiler:linker linker = compiler::linker(&amp;tree);  result = linker.compile(); return true; }<\/code><\/pre>\n<p>\u041e\u0441\u0442\u0430\u0435\u0442\u0441\u044f \u043b\u0438\u0448\u044c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430<\/h2>\n<p>\u041e\u0442\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u043b\u0435\u0433\u043a\u0438\u0435 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438! \u0422\u043e\u043b\u044c\u043a\u043e \u0445\u0430\u0440\u0434\u043a\u043e\u0440. \u0414\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0431\u0443\u0434\u0443\u0442 \u0440\u0435\u0448\u0435\u043d\u044b \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u043e\u0438\u0441\u043a\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u0447\u0438\u0441\u043b\u0430 \u0432 \u043a\u043e\u043b\u044c\u0446\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0447\u0438\u0441\u0435\u043b (\u043f\u0440\u0438\u0432\u0435\u0442, \u0442\u0435\u043e\u0440\u0435\u043c\u0430 \u042d\u0439\u043b\u0435\u0440\u0430), \u0430 \u0442\u0430\u043a\u0436\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u041d\u041e\u0414 \u0434\u0432\u0443\u0445 \u0447\u0438\u0441\u0435\u043b.<\/p>\n<p>\u0414\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u043d\u0430 &#171;\u043d\u0430\u0448\u0435\u043c \u044f\u0437\u044b\u043a\u0435&#187;:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include \"compiler.h\"  int main() {     char* data = new char[166];      memcpy(data, \"{a = 6; m = 283; s = m - 2; b = a; c = 1; while(0 &lt; s) { if (0 &lt; s - (s\/2*2)){c = c * b; c = c - (c \/ m * m);} s = s \/ 2; b = b * b; b = b - (b \/ m * m);} print(c);}\", 166);      compiler comp = compiler(data, 166);      std::string result;      comp.compile(result);      std::cout &lt;&lt; result; }<\/code><\/pre>\n<p>\u041a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u043a\u043e\u0434\u043e\u043c \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0431\u0435\u0437 \u043a\u0430\u043a\u043e\u0433\u043e-\u043b\u0438\u0431\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u044d\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u0438 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u0434\u0430\u0436\u0435 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0441\u043b\u0430\u0431\u043e\u0433\u043e \u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434, \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430\u0448\u0438\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u043c:<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"assembly\">ASSUME CS:CODE, DS:DATA  DATA SEGMENT         vars dw 26 dup (0) DATA ENDS;  CODE SEGMENT         PRINT MACRO         local DIVCYC, PRINTNUM;         push ax;         push bx;         push cx;         push dx;         mov bx, 10;         mov cx, 0;     DIVCYC:         mov dx, 0;         div bx;         push dx;         inc cx;         cmp ax, 0;         jne DIVCYC;     PRINTNUM:         pop dx;         add dl, '0';         mov ah, 02h;         int 21h;         dec cx;         cmp cx, 0;         jne PRINTNUM;                 mov dl, 0dh;         mov ah, 02h;         int 21h;                 mov dl, 0ah;         mov ah, 02h;         int 21h;         pop dx;         pop cx;         pop bx;         pop ax;         ENDM;      begin:         lea si, vars;         mov ax, 6;         mov [si + 0], ax;          mov ax, 283;         mov [si + 24], ax;          mov ax, [si + 24];         push ax;         mov ax, 2;         mov bx, ax;         pop ax;         sub ax, bx;         mov [si + 36], ax;          mov ax, [si + 0];         mov [si + 2], ax;          mov ax, 1;         mov [si + 4], ax;          jmp LBL0;     LBL1: nop         mov ax, 0;         push ax;         mov ax, [si + 36];         push ax;         mov ax, [si + 36];         push ax;         mov ax, 2;         mov bx, ax;         pop ax;         xor dx, dx;         div bx;         push ax;         mov ax, 2;         mov bx, ax;         pop ax;         mul bx;         mov bx, ax;         pop ax;         sub ax, bx;         mov bx, ax;         pop ax;         cmp ax, bx;         jae LBL2;         mov ax, 1;         jmp LBL3;     LBL2:         mov ax, 0;     LBL3: nop         cmp ax, 0;         jne LBL4;         jmp LBL5;     LBL4: nop         mov ax, [si + 4];         push ax;         mov ax, [si + 2];         mov bx, ax;         pop ax;         mul bx;         mov [si + 4], ax;          mov ax, [si + 4];         push ax;         mov ax, [si + 4];         push ax;         mov ax, [si + 24];         mov bx, ax;         pop ax;         xor dx, dx;         div bx;         push ax;         mov ax, [si + 24];         mov bx, ax;         pop ax;         mul bx;         mov bx, ax;         pop ax;         sub ax, bx;         mov [si + 4], ax;      LBL5: nop         mov ax, [si + 36];         push ax;         mov ax, 2;         mov bx, ax;         pop ax;         xor dx, dx;         div bx;         mov [si + 36], ax;          mov ax, [si + 2];         push ax;         mov ax, [si + 2];         mov bx, ax;         pop ax;         mul bx;         mov [si + 2], ax;          mov ax, [si + 2];         push ax;         mov ax, [si + 2];         push ax;         mov ax, [si + 24];         mov bx, ax;         pop ax;         xor dx, dx;         div bx;         push ax;         mov ax, [si + 24];         mov bx, ax;         pop ax;         mul bx;         mov bx, ax;         pop ax;         sub ax, bx;         mov [si + 2], ax;      LBL0: nop         mov ax, 0;         push ax;         mov ax, [si + 36];         mov bx, ax;         pop ax;         cmp ax, bx;         jae LBL6;         mov ax, 1;         jmp LBL7;     LBL6:         mov ax, 0;     LBL7: nop         cmp ax, 0;         je LBL8         jmp LBL1     LBL8: nop         mov ax, [si + 4];         PRINT;         mov ah, 4Ch;         int 21h; CODE ENDS; end begin<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043c\u043d\u043e\u0433\u043e \u0438 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043a\u0440\u0430\u0441\u0438\u0432\u043e (\u0430 \u0447\u0442\u043e \u0436\u0434\u0430\u0442\u044c \u043e\u0442 \u0432\u0437\u044f\u0442\u0438\u044f \u043e\u0441\u0442\u0430\u0442\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 \u0434\u0435\u043b\u0435\u043d\u0438\u0435, \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u0438 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435?), \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043f\u043e\u043f\u0430\u0432\u0448\u0435\u0433\u043e\u0441\u044f \u0441\u0430\u0439\u0442\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/982\/03c\/591\/98203c591b7f00be957976ca25bb8378.png\" width=\"114\" height=\"52\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/982\/03c\/591\/98203c591b7f00be957976ca25bb8378.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/a32\/ccc\/bd2\/a32cccbd291ba819a055e62b06a1b150.png\" width=\"968\" height=\"374\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/a32\/ccc\/bd2\/a32cccbd291ba819a055e62b06a1b150.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u0438\u043c, \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0441\u043e\u0448\u043b\u0438\u0441\u044c. \u041f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443 \u0415\u0432\u043a\u043b\u0438\u0434\u0430. \u041a\u043e\u0434 \u043d\u0430 &#171;\u043d\u0430\u0448\u0435\u043c&#187; \u044f\u0437\u044b\u043a\u0435 \u0434\u043b\u044f \u043d\u0435\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c:<\/p>\n<pre><code class=\"cpp\">#include &lt;iostream> #include \"compiler.h\"  int main() {     char* data = new char[85];      memcpy(data, \"{a = 11004; b = 10087; while(0 &lt; b)  {c = a - (a \/ b * b); a = b; b = c;} print(a);}\", 85);      compiler comp = compiler(data, 85);      std::string result;      comp.compile(result);      std::cout &lt;&lt; result; }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434:<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"assembly\">ASSUME CS:CODE, DS:DATA  DATA SEGMENT         vars dw 26 dup (0) DATA ENDS;  CODE SEGMENT         PRINT MACRO         local DIVCYC, PRINTNUM;         push ax;         push bx;         push cx;         push dx;         mov bx, 10;         mov cx, 0;     DIVCYC:         mov dx, 0;         div bx;         push dx;         inc cx;         cmp ax, 0;         jne DIVCYC;     PRINTNUM:         pop dx;         add dl, '0';         mov ah, 02h;         int 21h;         dec cx;         cmp cx, 0;         jne PRINTNUM;                 mov dl, 0dh;         mov ah, 02h;         int 21h;                 mov dl, 0ah;         mov ah, 02h;         int 21h;         pop dx;         pop cx;         pop bx;         pop ax;         ENDM;      begin:         lea si, vars;         mov ax, 11004;         mov [si + 0], ax;          mov ax, 10087;         mov [si + 2], ax;          jmp LBL0;     LBL1: nop         mov ax, [si + 0];         push ax;         mov ax, [si + 0];         push ax;         mov ax, [si + 2];         mov bx, ax;         pop ax;         xor dx, dx;         div bx;         push ax;         mov ax, [si + 2];         mov bx, ax;         pop ax;         mul bx;         mov bx, ax;         pop ax;         sub ax, bx;         mov [si + 4], ax;          mov ax, [si + 2];         mov [si + 0], ax;          mov ax, [si + 4];         mov [si + 2], ax;      LBL0: nop         mov ax, 0;         push ax;         mov ax, [si + 2];         mov bx, ax;         pop ax;         cmp ax, bx;         jae LBL2;         mov ax, 1;         jmp LBL3;     LBL2:         mov ax, 0;     LBL3: nop         cmp ax, 0;         je LBL4         jmp LBL1     LBL4: nop         mov ax, [si + 0];         PRINT;         mov ah, 4Ch;         int 21h; CODE ENDS; end begin<\/code><\/pre>\n<\/p>\n<\/div>\n<\/details>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043a\u043e\u0434\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/01e\/848\/f6d\/01e848f6d68d084bd69576cb8f19fa5c.png\" width=\"103\" height=\"65\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/01e\/848\/f6d\/01e848f6d68d084bd69576cb8f19fa5c.png\"\/><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/db1\/c4d\/124\/db1c4d1249655da832606ec3372f5506.png\" width=\"944\" height=\"351\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/db1\/c4d\/124\/db1c4d1249655da832606ec3372f5506.png\"\/><\/figure>\n<p>\u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0432\u0441\u0435 \u0441\u0445\u043e\u0434\u0438\u0442\u0441\u044f.<\/p>\n<h2>\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0439<\/h2>\n<p>\u041f\u043e\u043b\u043d\u044b\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b <a href=\"https:\/\/github.com\/NickolayYarovoy\/SimpleCompiler\" rel=\"noopener noreferrer nofollow\">\u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u0432 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>.<\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/796091\/\"> https:\/\/habr.com\/ru\/articles\/796091\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0412 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043c\u043d\u0435 \u0441\u0442\u0430\u043b\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0432 \u0446\u0435\u043b\u043e\u043c, \u0430 \u0432 \u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u0438 \u0442\u0440\u0430\u043d\u0441\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0441 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432\u044b\u0441\u043e\u043a\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440. \u0418 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0441\u0442\u0430\u0442\u0435\u0439 \u043d\u0430 \u044d\u0442\u0443 \u0442\u0435\u043c\u0443 \u043d\u0435 \u0442\u0430\u043a \u043c\u043d\u043e\u0433\u043e, \u0430 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438 \u0438 \u0445\u043e\u0442\u044c \u0441\u043a\u043e\u043b\u044c\u043a\u043e-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u044b\u043c \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435\u043c \u044f \u043d\u0430\u0448\u0435\u043b \u0432\u043e\u043e\u0431\u0449\u0435 <a href=\"https:\/\/habr.com\/ru\/articles\/133780\/\" rel=\"noopener noreferrer nofollow\">\u043e\u0434\u043d\u0443<\/a>, \u0432\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0431\u044b\u043b \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0442\u0440\u0430\u043d\u043d\u044b\u043c.<\/p>\n<p>\u041d\u0435 \u0433\u043e\u0432\u043e\u0440\u044e, \u0447\u0442\u043e \u044d\u0442\u0430 \u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043b\u043e\u0445\u0430, \u043d\u0430\u043f\u0440\u043e\u0442\u0438\u0432, \u043d\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u0431\u044b\u043b\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043a\u043e\u0434 \u0432 \u044f\u0437\u044b\u043a \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0439 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u044b, \u0430 \u043d\u0435 \u0432 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u044b\u0439 \u043a\u043e\u0434. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0432\u043e\u044e \u0441\u0442\u0430\u0442\u044c\u044e, \u0434\u043b\u044f \u043e\u0441\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b.<\/p>\n<h2>\u0412\u044b\u0431\u043e\u0440 \u044f\u0437\u044b\u043a\u043e\u0432 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u044f\u0437\u044b\u043a\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430 \u044f \u0432\u044b\u0431\u0440\u0430\u043b C++, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c \u0433\u0443\u0433\u043b\u0430, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u0434\u043b\u044f \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u043e\u043d, \u043b\u0438\u0431\u043e \u0447\u0438\u0441\u0442\u044b\u0439 &#171;\u0421\u0438&#187;. \u0422\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0436\u0435 \u0431\u0443\u0434\u0435\u043c \u0432 \u0441\u0442\u0430\u0440\u0435\u043d\u044c\u043a\u0438\u0439 asm, \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u043d\u044b\u0439 \u0434\u043b\u044f DOS.<\/p>\n<p>\u0421 \u0432\u044b\u0431\u043e\u0440\u043e\u043c \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430 \u0441\u0442\u043e\u0438\u0442 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443, \u043f\u043e\u0447\u0435\u043c\u0443 \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a\u043e\u0435 \u044d\u043a\u0437\u043e\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f 2023 \u0433\u043e\u0434\u0430. \u041d\u0430 \u0434\u0435\u043b\u0435 \u0432\u0441\u0435 \u043f\u0440\u043e\u0441\u0442\u043e: \u0435\u0433\u043e, \u043d\u0430 \u043c\u043e\u0439 \u0432\u0437\u0433\u043b\u044f\u0434, \u043f\u043e\u0439\u043c\u0435\u0442 \u043b\u044e\u0431\u043e\u0439, \u043a\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 \u0441\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430\u043c\u0438 \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0443\u0434\u0435\u043d\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u0441\u0430\u043b\u0438\u0441\u044c \u044d\u0442\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0432 \u0432\u0443\u0437\u0435.<\/p>\n<h2>\u041e \u0447\u0435\u043c \u0431\u0443\u0434\u0435\u0442 \u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0434\u0442\u0438 \u0440\u0435\u0447\u044c \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/h2>\n<p>\u0421\u0440\u0430\u0437\u0443 \u0441\u0434\u0435\u043b\u0430\u044e \u043e\u0433\u043e\u0432\u043e\u0440\u043a\u0443: \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0438\u0437 &#171;\u041a\u043d\u0438\u0433\u0438 \u0414\u0440\u0430\u043a\u043e\u043d\u0430-2&#187;, \u043d\u043e \u043c\u043e\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u0441\u0442\u0432\u043e \u0441 \u043d\u0435\u0439 \u0431\u044b\u043b\u043e \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u0438\u043c\u043e\u043b\u0435\u0442\u043d\u044b\u043c (\u0434\u043e\u0441\u0442\u0430\u0442\u044c \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u0430\u0442\u044c\u0438 \u0438 \u043f\u0440\u043e\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u043f\u043e \u0434\u0438\u0430\u0433\u043e\u043d\u0430\u043b\u0438 \u043f\u043e \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u044e).<\/p>\n<p>\u0412\u0435\u0440\u043d\u0435\u043c\u0441\u044f \u043a \u0444\u0430\u0437\u0430\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b. \u0414\u043b\u044f \u0438\u0445 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0432\u043e\u0442 \u0442\u0430\u043a\u043e\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0439 \u0444\u0430\u0437\u044b:<\/p>\n<figure class=\"\"><\/figure>\n<p>\u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u044f, \u043a\u0430\u043a \u0438 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435, \u0443\u043f\u043e\u043c\u044f\u043d\u0443\u0442\u043e\u0439  \u0432 \u0437\u0430\u0433\u043e\u043b\u043e\u0432\u043a\u0435, \u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0443\u043f\u0440\u043e\u0449\u0443 \u0441\u0445\u0435\u043c\u0443, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u043e\u043f\u0443\u0449\u0435\u043d\u044b \u0448\u0430\u0433\u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 (\u0432 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u043d\u0435\u043c \u043d\u0435\u0442 \u0441\u043c\u044b\u0441\u043b\u0430) \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043f\u0440\u043e\u043c\u0435\u0436\u0443\u0442\u043e\u0447\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u0435\u0433\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0432\u0435\u0449\u0435\u043d \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0438 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u044f \u0430\u0441\u0441\u0435\u043c\u0431\u043b\u0435\u0440\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430.<\/p>\n<h2>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430<\/h2>\n<p>\u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440, \u043c\u043e\u0436\u043d\u043e \u0441\u043a\u0430\u0437\u0430\u0442\u044c, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0438\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0430. \u041d\u0430 \u0435\u0433\u043e \u044d\u0442\u0430\u043f\u0435 \u0442\u0435\u043a\u0441\u0442 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u043d\u0430\u0431\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0431\u0435\u0437 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c\u0441\u044f, \u043a\u0430\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b \u0432 \u043d\u0430\u0448\u0435\u043c \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440\u0435. \u0412 \u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0431\u0443\u0434\u0435\u0442 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u0441\u043b\u0435\u0433\u043a\u0430 \u0443\u0441\u043b\u043e\u0436\u043d\u0435\u043d\u043d\u044b\u0439 \u043a\u0430\u043b\u044c\u043a\u0443\u043b\u044f\u0442\u043e\u0440 &#171;\u0441 \u0431\u0430\u0437\u0430\u0440\u0430&#187;: <\/p>\n<ul>\n<li>\n<p>\u0414\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0431\u0430\u0437\u043e\u0432\u0430\u044f \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0430 (+, -, *, \/ (\u0446\u0435\u043b\u043e\u0447\u0438\u0441\u043b\u0435\u043d\u043d\u043e\u0435)).    \u0423 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445  \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u0430 \u0434\u0440\u0443\u0433 \u043d\u0430\u0434 \u0434\u0440\u0443\u0433\u043e\u043c, \u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0441\u043a\u043e\u0431\u043e\u043a. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u044b \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0446\u0438\u043a\u043b\u043e\u0432 if, if\/else, while.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b\u0432\u043e\u0434 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 print. <\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0432\u0435\u043b\u0438\u0447\u0438\u043d \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0436\u0435\u043d \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 &lt; (\u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 1, \u0435\u0441\u043b\u0438 \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043d\u043e, \u0438 0 \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f,  \u0435\u043c\u0443 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b 26 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0442\u0435\u043a\u0441\u0442\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u044b \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u044b\u043c\u0438 \u043b\u0430\u0442\u0438\u043d\u0441\u043a\u0438\u043c\u0438 \u0431\u0443\u043a\u0432\u0430\u043c\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043e\u0434\u0438\u043d \u0442\u0438\u043f \u0434\u0430\u043d\u043d\u044b\u0445: unsigned short.<\/p>\n<\/li>\n<li>\n<p>\u041f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0445 \u0441\u043a\u043e\u0431\u043e\u043a.<\/p>\n<\/li>\n<li>\n<p>\u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u043e\u0431\u0435\u043b\u044b, \u0441\u0438\u043c\u0432\u043e\u043b\u044b \u0442\u0430\u0431\u0443\u043b\u044f\u0446\u0438\u0438 \u0438 \u043f\u0435\u0440\u0435\u043d\u043e\u0441\u044b \u043d\u0430 \u043d\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u043d\u0435 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043f\u0440\u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0435 \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0430 \u044f\u0437\u044b\u043a\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 (\u043c\u043e\u0434\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0438 \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u043d\u0430\u0447\u0430\u043b\u0435 \u0434\u0430\u043d\u043d\u043e\u0439):<\/p>\n<pre><code>&lt;program> ::= &lt;statement> &lt;statement> ::=  \"if\" &lt;parenExpr> &lt;statement> |                  \"if\" &lt;parenExpr> &lt;statement> \"else\" &lt;statement> |                  \"while\" &lt;parenExpr> &lt;statement> |                  \"print\" &lt;parenExpr> |                  \"{\" { &lt;statement> } \"}\" |                  &lt;expr> \";\" |                  \";\" &lt;parenExpr> ::= \"(\" &lt;expr> \")\" &lt;expr> ::= &lt;test> | &lt;id> \"=\" &lt;expr> &lt;test> ::= &lt;arExpr> | &lt;arExpr> \"&lt;\" &lt;arExpr> &lt;arExpr>  ::= &lt;term> | &lt;arExpr> \"+\" &lt;term> |               &lt;arExpr> \"*\" &lt;term> | &lt;arExpr> \"-\" &lt;term> |               &lt;arExpr> \"\/\" &lt;term> &lt;term> ::= &lt;id> | &lt;int> | &lt;parenExpr> &lt;id>   ::= \"a\" | \"b\" | ... | \"z\" &lt;int>  ::= &lt;digit>, { &lt;digit> } &lt;digit> ::= \"0\" | \"1\" | ... | \"9\" <\/code><\/pre>\n<p>\u0412\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043e\u0434\u043d\u043e\u0433\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430. \u042d\u0442\u043e\u0442 \u043e\u0434\u0438\u043d \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0438\u0431\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u043c \u0442\u0430\u043a\u0438\u0445 \u0436\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432, \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u044b\u0445 \u0432 \u0444\u0438\u0433\u0443\u0440\u043d\u044b\u0435 \u0441\u043a\u043e\u0431\u043a\u0438, \u043b\u0438\u0431\u043e \u0443\u0441\u043b\u043e\u0432\u043d\u044b\u043c\/\u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c (if, if\/else, while), \u043b\u0438\u0431\u043e \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0432\u043e\u0434\u0430 \u0447\u0438\u0441\u043b\u0430 (print), \u043b\u0438\u0431\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0423\u0441\u043b\u043e\u0432\u043d\u044b\u0435 \u0438 \u0446\u0438\u043a\u043b\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u044b \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0432 \u0441\u0435\u0431\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435-\u0443\u0441\u043b\u043e\u0432\u0438\u0435 (\u0437\u0430\u043f\u0438\u0441\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445. \u0415\u0441\u043b\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u043e 0, \u0442\u043e \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0442\u043e\u0440 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e \u043a\u0430\u043a false, \u0432 \u0438\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 &#8212; \u043a\u0430\u043a true) \u0438 \u0442\u0435\u043b\u043e (\u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u043e\u043b\u043d\u043e\u0446\u0435\u043d\u043d\u044b\u043c \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c).<\/p>\n<p>\u041e\u0431\u044b\u0447\u043d\u044b\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043a\u043e\u0439 \u0441 \u0437\u0430\u043f\u044f\u0442\u043e\u0439.<\/p>\n<p>\u0412\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0435 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0438 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0435 print \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u044f, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0438\u0435 \u0438\u0437 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0445 \u043d\u0430\u043c \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439 \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u043d\u0438\u0439 (\u043a\u043e\u0442\u043e\u0440\u044b\u0435, \u043a\u0430\u043a \u0431\u044b\u043b\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043e \u0440\u0430\u043d\u044c\u0448\u0435, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u044e\u0442 \u043d\u043e\u0432\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439).<\/p>\n<p>\u0410\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043d\u0430\u0434 \u0442\u0435\u0440\u043c\u0430\u043c\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u0441\u0432\u043e\u044e   \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0435\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439, \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u043e\u043c \u0438\u043b\u0438 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u0432 \u043a\u0440\u0443\u0433\u043b\u044b\u0445 \u0441\u043a\u043e\u0431\u043a\u0430\u0445.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u0433\u0440\u0430\u043c\u043c\u0430\u0442\u0438\u043a\u0443, \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043f\u0435\u0440\u0435\u0439\u0442\u0438 \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430.<\/p>\n<h2>\u041b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440<\/h2>\n<p>\u041e\u043f\u0438\u0448\u0435\u043c \u043f\u0435\u0440\u0435\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0431\u0443\u0434\u0443\u0442 \u0432\u0441\u0435 \u0442\u0438\u043f\u044b \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c\u044b\u0435 \u043f\u0440\u0438 \u0440\u0430\u0437\u0431\u043e\u0440\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043b\u043e\u0432\u0430\u0440\u0438, \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043b\u044f\u0442\u044c\u0441\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432 \u0441 \u0442\u043e\u043a\u0435\u043d\u0430\u043c\u0438.<\/p>\n<pre><code class=\"cpp\">\/\/compiler.h  enum class tokensTypes {     NUM, VAR, IF, ELSE, WHILE, LBRA, RBRA, LPAR, RPAR,     ADD, SUB, MUL, DIV, LESS, ASSIG,     SEMICOL, ENDFILE, ERROR, PRINT };  \/\/compiler.cpp  std::map&lt;char, compiler::tokensTypes> compiler::specialSymbols { std::pair&lt;char, tokensTypes>{'{', tokensTypes::LBRA}, std::pair&lt;char, tokensTypes>{'}', tokensTypes::RBRA}, std::pair&lt;char, tokensTypes>{'(', tokensTypes::LPAR}, std::pair&lt;char, tokensTypes>{')', tokensTypes::RPAR}, std::pair&lt;char, tokensTypes>{'+', tokensTypes::ADD}, std::pair&lt;char, tokensTypes>{'-', tokensTypes::SUB}, std::pair&lt;char, tokensTypes>{'*', tokensTypes::MUL}, std::pair&lt;char, tokensTypes>{'\/', tokensTypes::DIV}, std::pair&lt;char, tokensTypes>{'&lt;', tokensTypes::LESS}, std::pair&lt;char, tokensTypes>{'=', tokensTypes::ASSIG}, std::pair&lt;char, tokensTypes>{';', tokensTypes::SEMICOL}, };  std::map&lt;std::string, compiler::tokensTypes> compiler::specialWords { std::pair&lt;std::string, tokensTypes>{\"if\", tokensTypes::IF}, std::pair&lt;std::string, tokensTypes>{\"else\", tokensTypes::ELSE}, std::pair&lt;std::string, tokensTypes>{\"while\", tokensTypes::WHILE}, std::pair&lt;std::string, tokensTypes>{\"print\", tokensTypes::PRINT}, };<\/code><\/pre>\n<p>\u0410 \u0442\u0430\u043a\u0436\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e \u0441\u0442\u0440\u043e\u043a\u0435 \u0438 \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u043f\u043e\u0437\u0438\u0446\u0438\u0438 \u043a\u0443\u0440\u0441\u043e\u0440\u0430 \u0432 \u043d\u0435\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d:<\/p>\n<pre><code class=\"cpp\">\/\/ compiler.h  class token { public:     tokensTypes type;     unsigned short value;     char variable;      token(tokensTypes type, int value = 0, char variable = 'a'); };  \/\/ compiler.cpp  compiler::token compiler::getNexttoken() { if (nowPos == textLen) \/\/ \u0415\u0441\u043b\u0438 \u0444\u0430\u0439\u043b \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043d, \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 return token(compiler::tokensTypes::ENDFILE);  std::string str = \"\"; \/\/ \u0412 \u044d\u0442\u0443 \u0441\u0442\u0440\u043e\u043a\u0443 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0442\u043e\u043a\u0435\u043d char now = text[nowPos++];      \/\/ \u041f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b while ((now == ' ' || now == '\\r' || now == '\\n' || now == '\\t')&amp;&amp; nowPos &lt; textLen) now = text[nowPos++];     \/\/ \u0418 \u0441\u043d\u043e\u0432\u0430 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043a\u043e\u043d\u0435\u0446 \u0444\u0430\u0439\u043b\u0430 if (nowPos == textLen) return token(compiler::tokensTypes::ENDFILE);      \/\/ \u041f\u043e\u043a\u0430 \u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0448\u043b\u0438 \u043a \u0441\u0438\u043c\u0432\u043e\u043b\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043a\u043e\u043d\u0446\u0435 \u0442\u043e\u043a\u0435\u043d\u0430, \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c while (!(now == ' ' || now == '\\r' || now == '\\n' || now == '\\t')) {         \/\/ \u0415\u0441\u043b\u0438 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043d\u0435\u0442 \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u0432, \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043f\u0440\u0438\u0447\u0430\u0441\u0442\u043d\u043e\u0441\u0442\u044c\u043a \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u0430\u043c \u0438\u043b\u0438 \u0447\u0438\u0441\u043b\u0430\u043c if (str.size() == 0)  { if (specialSymbols.count(now)) return token(specialSymbols[now]); else if (isdigit(now)) { do { str += now; now = text[nowPos++]; } while (isdigit(now)); nowPos--; break; } else str += now; } else { if (specialSymbols.count(now)) \/\/ \u0415\u0441\u043b\u0438 \u0431\u044b\u043b \u0432\u0441\u0442\u0440\u0435\u0447\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b {                              \/\/ \u0422\u0430\u043a\u0436\u0435 \u0437\u0430\u043a\u0430\u043d\u0447\u0438\u0432\u0430\u0435\u043c \u043f\u0430\u0440\u0441\u0438\u043d\u0433 \u0442\u043e\u043a\u0435\u043d\u0430 nowPos--; break; } str += now; }  if (specialWords.count(str)) \/\/\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0435 \u0432 \u0441\u043f\u0438\u0441\u043a\u0435 \u0437\u0430\u0440\u0435\u0437\u0435\u0440\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 return token(specialWords[str]);  if (nowPos == textLen) break;  now = text[nowPos++]; }      \/\/ \u0415\u0441\u043b\u0438 \u0432 \u0442\u043e\u043a\u0435\u043d\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u0447\u043d\u0430\u044f \u0431\u0443\u043a\u0432\u0430, \u0442\u043e \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u0443\u0435\u043c \u043a\u0430\u043a \u0438\u043c\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 if (str.size() == 1 &amp;&amp; str[0] >= 'a' &amp;&amp; str[0] &lt;= 'z') return  token(tokensTypes::VAR, 0, str[0]);  unsigned short value = 0;     \/\/ \u0415\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d - \u0447\u0438\u0441\u043b\u043e, \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0435\u043c \u0435\u0433\u043e  for (int i = 0; i &lt; str.size(); i++) { if (isdigit(str[i])) value = value * 10 + (str[i] - '0'); else return token(compiler::tokensTypes::ERROR); }  return token(compiler::tokensTypes::NUM, value); }<\/code><\/pre>\n<p>\u0412 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434\u0435 \u043a\u043e\u043c\u043f\u0438\u043b\u044f\u0446\u0438\u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0442\u043e\u043a\u0435\u043d\u043e\u0432:<\/p>\n<pre><code class=\"cpp\">\/\/compiler.cpp  bool compiler::compile(std::string&amp; result) { token token = getNexttoken();  while (token.type != tokensTypes::ENDFILE) { if (token.type == tokensTypes::ERROR) \/\/ \u0415\u0441\u043b\u0438 \u0442\u043e\u043a\u0435\u043d \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d { result = \"Lexical error\"; \/\/ \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443 return false; } tokens.push_back(token); token = getNexttoken(); } tokens.push_back(token); }<\/code><\/pre>\n<p>\u041d\u0430 \u044d\u0442\u043e\u043c \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u043c.<\/p>\n<h2>\u0421\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0430\u043d\u0430\u043b\u0438\u0437<\/h2>\n<p>\u0412\u043e \u0432\u0440\u0435\u043c\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0430\u043a \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u043e\u043a\u0435\u043d\u043e\u0432, \u0442\u0430\u043a \u0438 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e. \u0414\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0435\u0440\u0435\u0432\u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0443\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0443\u0437\u043b\u044b \u0438 \u0438\u0445 \u0442\u0438\u043f\u044b:<\/p>\n<pre><code class=\"cpp\">\/\/ compiler.h  enum class nodeTypes {     CONST, VAR, ADD, SUB, MUL, DIV,     LESSTHEN, SET, IF, IFELSE, WHILE,     EMPTY, SEQ, EXPR, PROG, PRINT };  class node { public:     nodeTypes type;     int value;     node* op1;     node* op2;     node* op3;      node(nodeTypes type, int value = 0, node* op1 = nullptr, node* op2 = nullptr, node* op3 = nullptr);     ~node(); };<\/code><\/pre>\n<p>\u0421 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u0432\u043e\u0434\u043d\u044b\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u043c\u0435\u0442\u043e\u0434\u044b, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0438\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0432 \u0441\u0438\u043d\u0442\u0430\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0434\u0435\u0440\u0435\u0432\u043e (\u043a\u043e\u0434\u0430 \u043c\u043d\u043e\u0433\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u043a\u0440\u044b\u043b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440):<\/p>\n<details class=\"spoiler\">\n<summary>Hidden text<\/summary>\n<div class=\"spoiler__content\">\n<pre><code class=\"cpp\">\/\/ compiler.cpp  bool compiler::parser::parse(std::vector&lt;token>&amp; tokens, compiler::node&amp; result) { int count = 0; compiler::node* node = new compiler::node(nodeTypes::EMPTY); bool res = parser::statement(tokens, count, node);<\/code><\/pre>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-369159","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369159","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=369159"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/369159\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=369159"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=369159"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=369159"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}