{"id":36745,"date":"2019-10-31T22:13:31","date_gmt":"2019-10-31T19:13:31","guid":{"rendered":"https:\/\/prohoster.info\/blog\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2\/"},"modified":"2019-10-31T22:13:31","modified_gmt":"2019-10-31T19:13:31","slug":"vypusk-generatora-leksicheskih-analizatorov-re2c-1-2","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2","title":{"rendered":"Release of the lexical analyzer generator re2c 1.2","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p><noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/releases\/release_notes.html\">Took place<\/a><\/noindex> release <noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/\">re2c<\/a><\/noindex>, a free lexical analyzer generator for C and C++ languages. Recall that re2c was written in 1993 by Peter Babulis as an experimental generator of very fast lexical analyzers, distinguished from other generators by the speed of the generated code and an unusually flexible user interface that allows easy and effective integration of analyzers into existing codebases. Since then, the project has been developed by the community and continues to serve as a platform for experimentation and research in formal grammars and finite automata.<\/p>\n<p>The preparation of the release took almost a whole year. Most of the time, as always, was spent on developing the theoretical foundation and writing<br \/>\narticles &#171;<noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/2019_borsotti_trofimovich_efficient_posix_submatch_extraction_on_nfa.pdf\">Efficient POSIX Submatch Extraction on NFA<\/a><\/noindex>&#171;.<br \/>\nThe algorithms described in the article are implemented in the experimental library libre2c<br \/>\n(the library and performance test build is disabled by default and is enabled using the configure option &#171;&#8212;enable-libs&#187;). The library is not intended to compete with existing projects like RE2, but rather serves as a research platform for developing new<br \/>\nalgorithms (which can then be used in re2c or other projects). It is also convenient for testing, measuring performance, and creating bindings for other languages.<\/p>\n<p>The main innovations in re2c version 1.2:<\/p>\n<ul>\n<li class=\"l\"> A new simplified way to check for the end of input data (&#171;EOF rule&#187;) has been added. For this, the configuration &#171;re2c:eof&#187; has been introduced,<br \/>\n   allowing the selection of a terminal symbol,<br \/>\n   and a special rule &#171;$&#187; triggers if the lexer<br \/>\n   successfully reaches the end of the input data.<br \/>\n   Historically, re2c offers several methods for checking for<br \/>\n   end of input, varying in limitations, efficiency, and simplicity<br \/>\n   of use. The new method is designed to simplify coding while<br \/>\n   remaining efficient and widely applicable. The old methods<br \/>\n   still work and may be preferable in certain cases.<\/p>\n<li class=\"l\"> The ability to include external files using the directive has been added,<br \/>\n   &#171;\n\/*!include:re2c &#171;file.re&#187; *\n&#187;, where &#171;file.re&#187; is the name of the included file. Re2c looks for files in the directory of the including file,<br \/>\n   as well as in the list of paths specified using the &#171;-I&#187; option.<br \/>\n   Included files may include other files.<br \/>\n   Re2c provides &#171;standard&#187; files in the directory &#171;include\/&#187;<br \/>\n   of the project \u2014 it is assumed that useful definitions will accumulate there<br \/>\n   So far, at the request of users, one file with definitions of Unicode categories has been added.<br \/>\n   The ability to generate header files with arbitrary<\/p>\n<li class=\"l\"> content using the -t \u2014type-header options (or corresponding<br \/>\n   using options &#171;-t &#8212;type-header&#187; (or corresponding<br \/>\n   configurations) and new directives &#171;\n\/*!header:re2c:on*\/&#187; and<br \/>\n   &#171;\n\/*!header:re2c:off*\/&#187;. This can be useful in cases,<br \/>\n   used in other translation units.<br \/>\n   Re2c now understands UTF8 literals and character classes in regular expressions.<\/p>\n<li class=\"l\"> By default, re2c parses expressions like \"\u2200x \u2203y\" as.<br \/>\n   By default, re2c parses expressions like &#171;&#8704;x &#8707;y&#187; as<br \/>\n   a sequence of 1-bit ASCII characters &#171;e2 88 80 78 20 e2 88 83 79&#187;<br \/>\n   (hex codes), and users have to manually escape Unicode characters:<br \/>\n   &#171;&#092;&#092;u2200x &#092;&#092;u2203y&#187;. This is very inconvenient and unexpected for many<br \/>\n   users (as evidenced by the constant bug reports). Therefore, now<br \/>\n   re2c provides the option &#171;&#8212;input-encoding {ascii | utf8}&#187;<br \/>\n   which allows changing the behavior and parsing &#171;&#8704;x &#8707;y&#187; as<br \/>\n   &#171;2200 78 20 2203 79&#187;.<\/p>\n<li class=\"l\"> Re2c now allows the use of regular re2c blocks in &#171;-r &#8212;reuse&#187; mode.<br \/>\n   This is convenient if the input file contains many blocks, and only some of them<br \/>\n   need to be reused.<\/p>\n<li class=\"l\"> A format for warnings and error messages can now be set<br \/>\n   with the new option &#171;&#8212;location-format {gnu | msvc}&#187;. The GNU format is displayed<br \/>\n   as &#171;filename:line:column:&#187;, while the MSVC format is displayed as &#171;filename(line,column)&#187;.<br \/>\n   This feature may be useful for IDE enthusiasts.<br \/>\n   A &#171;&#8212;verbose&#187; option has also been added, which outputs a brief success message in case of success.                                                 <\/p>\n<li class=\"l\"> The &#171;compatibility&#187; mode with flex has been improved \u2014 some parsing errors have been fixed.<br \/>\n   incorrect operator precedence in rare cases have been fixed.<br \/>\n   Historically, the &#171;-F &#8212;flex-support&#187; option allows writing code<br \/>\n   in a mix of flex style and re2c style, which complicates parsing somewhat.<br \/>\n   The compatibility mode with flex is rarely used in new code,<br \/>\n   but re2c continues to support it for backward compatibility.<\/p>\n<li class=\"l\"> The character class subtraction operator &#171;\/&#187; is now applied<br \/>\n   before expanding the encoding, which allows it to be applied in more cases,<br \/>\n   if a variable-length character encoding (such as UTF8) is used.<\/p>\n<li class=\"l\"> The output file is now created atomically: re2c first creates a temporary file<br \/>\n   and writes the result to it, then renames the temporary file to the output<br \/>\n   in one operation.<\/p>\n<li class=\"l\"> The documentation has been completed and rewritten; in particular, new<br \/>\n   chapters on <noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html#buffer-refilling\">http:\/\/re2c.org\/manual\/manual.html#buffer-refilling buffer refilling<\/a><\/noindex><br \/>\n   and <noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html#eof-handling\">on methods to check for the end of input data<\/a><\/noindex>.<br \/>\n   The new documentation is compiled as<br \/>\n   <noindex><a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html\">comprehensive one-page guide<\/a><\/noindex><br \/>\n   with examples (the same sources are rendered in manpage and online documentation).<br \/>\n   Weak attempts have been made to improve the site's readability on phones.<\/p>\n<li class=\"l\"> From a developer's perspective, re2c has gained a more complete debugging subsystem.<br \/>\n   Debugging code is now disabled in release builds and<br \/>\n   and can be enabled using the configure option &#171;&#8212;enable-debug&#187;.<\/p>\n<\/ul>\n<p><noindex><a rel=\"nofollow\" name=\"link\"><\/a><\/noindex><\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/www.opennet.ru\/opennews\/art.shtml?num=51209\">opennet.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 re2c, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f \u044f\u0437\u044b\u043a\u043e\u0432 C \u0438 C++. \u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e re2c \u0431\u044b\u043b \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0432 1993 \u0433\u043e\u0434\u0443 \u041f\u0438\u0442\u0435\u0440\u043e\u043c \u0411\u0430\u043c\u0431\u0443\u043b\u0438\u0441\u043e\u043c \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u0435\u0438\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u044b\u0439 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440 \u043e\u0447\u0435\u043d\u044c \u0431\u044b\u0441\u0442\u0440\u044b\u0445 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0439\u0441\u044f \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u0432 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0438 \u043d\u0435\u043e\u0431\u044b\u0447\u043d\u043e \u0433\u0438\u0431\u043a\u0438\u043c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043b\u0435\u0433\u043a\u043e \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0432\u0441\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u044b \u0432 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u043a\u043e\u0434\u043e\u0432\u0443\u044e \u0431\u0430\u0437\u0443. \u0421 \u0442\u0435\u0445 \u043f\u043e\u0440 [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[702],"tags":[],"class_list":["post-36745","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.2 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 re2c, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.2\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 re2c 1.2 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 re2c, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T19:13:31+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:13:31+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47Release of the re2c lexical analyzer generator 1.2 | ProHoster","description":"The release of re2c, a free lexical generator, has taken place.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u0412\u044b\u043f\u0443\u0441\u043a \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0430\u043d\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u0432 re2c 1.2 | ProHoster","og:description":"\u0421\u043e\u0441\u0442\u043e\u044f\u043b\u0441\u044f \u0440\u0435\u043b\u0438\u0437 re2c, \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e\u0433\u043e \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u0430 \u043b\u0435\u043a\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/vypusk-generatora-leksicheskih-analizatorov-re2c-1-2","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T19:13:31+00:00","article:modified_time":"2019-10-31T19:13:31+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"36745","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-01-22 04:42:19","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:39:23","updated":"2026-01-22 04:42:19","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/36745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=36745"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/36745\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=36745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=36745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=36745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}