{"id":36759,"date":"2019-10-31T22:13:39","date_gmt":"2019-10-31T19:13:39","guid":{"rendered":"https:\/\/prohoster.info\/blog\/re2c-1-2\/"},"modified":"2019-10-31T22:13:39","modified_gmt":"2019-10-31T19:13:39","slug":"re2c-1-2","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/news\/re2c-1-2","title":{"rendered":"re2c 1.2","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>On Friday, August 2nd, the release of re2c was published \u2014 a free lexical analyzer generator for C and C++ languages. Remember, re2c was created in 1993 by Peter Bambulys as an experimental generator of very fast lexical analyzers, distinct from other generators by the speed of the generated code and an unusually flexible user interface that allows easy and efficient integration of analyzers into existing codebases. Since then, the project has been developed by the community and continues to serve as a platform for experiments and research in formal grammars and finite automata.<\/p>\n<p>Key innovations in version 1.2:<\/p>\n<ul>\n<li>\n<p>A new (simplified) way to check for end of input<br \/>\n(English: \u201cEOF rule\u201d).<br \/>\nFor this, the configuration re2c:eof has been added,<br \/>\nallowing the selection of a terminal symbol,<br \/>\nand a special rule $ that triggers if the lexer<br \/>\nsuccessfully reaches the end of the input data.<br \/>\nHistorically, re2c offers several methods for checking for<br \/>\nend of input, varying in limitations, efficiency, and simplicity<br \/>\nof use. The new method is designed to simplify coding while<br \/>\nremaining efficient and widely applicable. The old methods<br \/>\nstill work and may be preferable in certain cases.<\/p>\n<\/li>\n<li>\n<p>The ability to include external files using the directive has been added,<br \/>\n\/*!include:re2c &quot;file.re&quot; *\/, \u0433\u0434\u0435 file.re<br \/>\nthis is the name of the included file. Re2c searches for files in the directory of the including file,<br \/>\nas well as in the list of paths specified using the -I option.<br \/>\nIncluded files may include other files.<br \/>\nRe2c provides \u201cstandard\u201d files in the include\/ directory of the project \u2014 it is expected that useful definitions will accumulate there.<br \/>\nwith content using the -t \u2014type-header options (or corresponding ones).<br \/>\nSo far, at the request of users, one file with definitions of Unicode categories has been added.<br \/>\nThe ability to generate header files with arbitrary<\/p>\n<\/li>\n<li>\n<p>content using the -t \u2014type-header options (or corresponding<br \/>\nBy default, re2c parses expressions like \u201c\u2200x \u2203y\u201d as.<br \/>\nwhen re2c should generate definitions of variables, structures, and macros,<br \/>\n\/*!header:re2c:off*\/. \u042d\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u044f\u0445,<br \/>\nused in other translation units.<br \/>\nRe2c now understands UTF8 literals and character classes in regular expressions.<\/p>\n<\/li>\n<li>\n<p>By default, re2c parses expressions like \"\u2200x \u2203y\" as.<br \/>\n\u201cu2200x u2203y\u201d. This is very inconvenient and unexpected for many.<br \/>\nA sequence of 1-bit ASCII characters e2 88 80 78 20 e2 88 83 79<br \/>\n(hex codes), and users have to manually escape Unicode characters:<br \/>\nre2c provides the option \u2014input-encoding ,<br \/>\nusers (as evidenced by the constant bug reports). Therefore, now<br \/>\nwhich allows changing the behavior and parsing \u201c\u2200x \u2203y\u201d as.<br \/>\nRe2c now allows using ordinary re2c blocks in -r \u2014reuse mode.<br \/>\n2200 78 20 2203 79.<\/p>\n<\/li>\n<li>\n<p>with the new option \u2014location-format . The GNU format displays.<br \/>\nThis is convenient if the input file contains many blocks, and only some of them<br \/>\nneed to be reused.<\/p>\n<\/li>\n<li>\n<p>A format for warnings and error messages can now be set<br \/>\nas filename:line:column:, and the MSVC format \u2014 as filename(line,column).<br \/>\nA \u2014verbose option has also been added, which prints a brief success message in case of success.<br \/>\nThis feature may be useful for IDE enthusiasts.<br \/>\nThe compatibility mode with flex has been improved \u2014 some parsing errors have been corrected.<\/p>\n<\/li>\n<li>\n<p>Historically, the -F \u2014flex-support option allows writing code.<br \/>\nincorrect operator precedence in rare cases have been fixed.<br \/>\nwhich can be enabled with the configure option \u2014enable-debug.<br \/>\nin a mix of flex style and re2c style, which complicates parsing somewhat.<br \/>\nThe compatibility mode with flex is rarely used in new code,<br \/>\nbut re2c continues to support it for backward compatibility.<\/p>\n<\/li>\n<li>\n<p>The subtraction operator for character classes \/ is now applied<br \/>\nbefore expanding the encoding, which allows it to be applied in more cases,<br \/>\nif a variable-length character encoding (such as UTF8) is used.<\/p>\n<\/li>\n<li>\n<p>The output file is now created atomically: re2c first creates a temporary file<br \/>\nand writes the result to it, then renames the temporary file to the output<br \/>\nin one operation.<\/p>\n<\/li>\n<li>\n<p>The documentation has been completed and rewritten; in particular, new<br \/>\n<noindex>chapters have been added <a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html#buffer-refilling\">on buffer filling<\/a><\/noindex><br \/>\nand <a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html#eof-handling\">on methods to check for the end of input data<\/a>.<br \/>\nThe new documentation is compiled as<br \/>\n<a rel=\"nofollow\" href=\"http:\/\/re2c.org\/manual\/manual.html\">a comprehensive single-page manual<\/a><br \/>\nwith examples (the same sources are rendered in manpage and online documentation).<br \/>\nWeak attempts have been made to improve the site's readability on phones.<\/p>\n<\/li>\n<li>\n<p>From a developer's perspective, re2c has gained a more complete debugging subsystem.<br \/>\nDebugging code is now disabled in release builds and<br \/>\nThis release took a long time \u2014 almost a whole year.<\/p>\n<\/li>\n<\/ul>\n<p>\u201cEfficient POSIX Submatch Extraction on NFA\u201d<br \/>\nMost of the time, as always, was spent on developing the theoretical foundation and writing<br \/>\narticle <a rel=\"nofollow\" href=\"http:\/\/re2c.org\/2019_borsotti_trofimovich_efficient_posix_submatch_extraction_on_nfa.pdf\">\u2014enable-libs). The library is designed not to compete with existing ones.<\/a>.<br \/>\nThe algorithms described in the article are implemented in the experimental library libre2c<br \/>\n(building the library and benchmarks is disabled by default and can be enabled with the configure option<br \/>\n&#8212;enable-libs). \u0411\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 \u0437\u0430\u0434\u0443\u043c\u0430\u043d\u0430 \u043d\u0435 \u043a\u0430\u043a \u043a\u043e\u043d\u043a\u0443\u0440\u0435\u043d\u0442 \u0443\u0436\u0435 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c<br \/>\nprojects like RE2, but rather as a research platform for developing new<br \/>\nalgorithms (which can later be used in re2c or other projects).<br \/>\nIt is also convenient for testing, benchmarking, and creating bindings to other languages.<\/p>\n<p>Thanks from the re2c developers to everyone who helped make this release happen,<br \/>\nand to the community in general for ideas, bug reports, patches, morale, etc. ;]<\/p>\n<p>Source: <a \ncontent=\"nofollow\" rel=\"nofollow\" href=\"http:\/\/www.linux.org.ru\/news\/development\/15144630\">linux.org.ru<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 2-\u0433\u043e \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 re2c &mdash; \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\u0440\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 [&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-36759","post","type-post","status-publish","format-standard","hentry","category-news"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 2-\u0433\u043e \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 re2c \u2014 \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++.\" \/>\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\/re2c-1-2\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\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\udd47re2c 1.2 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 2-\u0433\u043e \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 re2c \u2014 \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++.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/news\/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:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T19:13:39+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\udd47re2c 1.2 | ProHoster","description":"On Friday, August 2nd, the re2c release came out \u2014 a free lexical analyzer generator for C and C++.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/news\/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\udd47re2c 1.2 | ProHoster","og:description":"\u0412 \u043f\u044f\u0442\u043d\u0438\u0446\u0443 2-\u0433\u043e \u0430\u0432\u0433\u0443\u0441\u0442\u0430 \u0432\u044b\u0448\u0435\u043b \u0440\u0435\u043b\u0438\u0437 re2c \u2014 \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++.","og:url":"https:\/\/prohoster.info\/en\/blog\/news\/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:39+00:00","article:modified_time":"2019-10-31T19:13:39+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"36759","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:45: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:45: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\/36759","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=36759"}],"version-history":[{"count":0,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/36759\/revisions"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=36759"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=36759"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=36759"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}