How To Install re2c on Fedora 36

In this tutorial we learn how to install re2c in Fedora 36. re2c is Tool for generating C, C++, and go recognizers from regular expressions

Introduction

In this tutorial we learn how to install re2c on Fedora 36.

What is re2c

re2c is a tool for writing very fast and very flexible scanners. Unlike any other such tool, re2c focuses on generating high efficient code for regular expression matching. As a result this allows a much broader range of use than any traditional lexer offers. And Last but not least re2c generates warning free code that is equal to hand-written code in terms of size, speed and quality.

We can use yum or dnf to install re2c on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install re2c.

Install re2c on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install re2c using dnf by running the following command:

sudo dnf -y install re2c

Install re2c on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install re2c using yum by running the following command:

sudo yum -y install re2c

How To Uninstall re2c on Fedora 36

To uninstall only the re2c package we can use the following command:

sudo dnf remove re2c

re2c Package Contents on Fedora 36

/usr/bin/re2c
/usr/bin/re2go
/usr/lib/.build-id
/usr/lib/.build-id/32
/usr/lib/.build-id/32/199744d525a3bf2b18fb6f58d27fe60aae7736
/usr/lib/.build-id/78
/usr/lib/.build-id/78/dd0c5e03f86ec14c2e833ae8d53f903e9b8f6b
/usr/share/doc/re2c
/usr/share/doc/re2c/CHANGELOG
/usr/share/doc/re2c/README.md
/usr/share/doc/re2c/examples
/usr/share/doc/re2c/examples/c
/usr/share/doc/re2c/examples/c/01_basic.c
/usr/share/doc/re2c/examples/c/01_basic.re
/usr/share/doc/re2c/examples/c/__run_all.sh
/usr/share/doc/re2c/examples/c/conditions
/usr/share/doc/re2c/examples/c/conditions/parse_u32_blocks.c
/usr/share/doc/re2c/examples/c/conditions/parse_u32_blocks.re
/usr/share/doc/re2c/examples/c/conditions/parse_u32_conditions.c
/usr/share/doc/re2c/examples/c/conditions/parse_u32_conditions.re
/usr/share/doc/re2c/examples/c/encodings
/usr/share/doc/re2c/examples/c/encodings/unicode_identifier.c
/usr/share/doc/re2c/examples/c/encodings/unicode_identifier.re
/usr/share/doc/re2c/examples/c/eof
/usr/share/doc/re2c/examples/c/eof/01_sentinel.c
/usr/share/doc/re2c/examples/c/eof/01_sentinel.re
/usr/share/doc/re2c/examples/c/eof/02_bounds_checking.c
/usr/share/doc/re2c/examples/c/eof/02_bounds_checking.re
/usr/share/doc/re2c/examples/c/eof/03_eof_rule.c
/usr/share/doc/re2c/examples/c/eof/03_eof_rule.re
/usr/share/doc/re2c/examples/c/eof/04_generic_api_sentinel.c
/usr/share/doc/re2c/examples/c/eof/04_generic_api_sentinel.re
/usr/share/doc/re2c/examples/c/eof/05_generic_api_eof_rule.c
/usr/share/doc/re2c/examples/c/eof/05_generic_api_eof_rule.re
/usr/share/doc/re2c/examples/c/fill
/usr/share/doc/re2c/examples/c/fill/01_fill.c
/usr/share/doc/re2c/examples/c/fill/01_fill.re
/usr/share/doc/re2c/examples/c/fill/02_fill.c
/usr/share/doc/re2c/examples/c/fill/02_fill.re
/usr/share/doc/re2c/examples/c/generic_api
/usr/share/doc/re2c/examples/c/generic_api/ifstream.c
/usr/share/doc/re2c/examples/c/generic_api/ifstream.re
/usr/share/doc/re2c/examples/c/headers
/usr/share/doc/re2c/examples/c/headers/header.c
/usr/share/doc/re2c/examples/c/headers/header.re
/usr/share/doc/re2c/examples/c/headers/src
/usr/share/doc/re2c/examples/c/headers/src/lexer
/usr/share/doc/re2c/examples/c/headers/src/lexer/lexer.h
/usr/share/doc/re2c/examples/c/includes
/usr/share/doc/re2c/examples/c/includes/definitions.h
/usr/share/doc/re2c/examples/c/includes/include.c
/usr/share/doc/re2c/examples/c/includes/include.re
/usr/share/doc/re2c/examples/c/real_world
/usr/share/doc/re2c/examples/c/real_world/cxx98.c
/usr/share/doc/re2c/examples/c/real_world/cxx98.re
/usr/share/doc/re2c/examples/c/reuse
/usr/share/doc/re2c/examples/c/reuse/braille.c
/usr/share/doc/re2c/examples/c/reuse/braille.re
/usr/share/doc/re2c/examples/c/reuse/braille.ucs2.txt
/usr/share/doc/re2c/examples/c/reuse/braille.utf16.txt
/usr/share/doc/re2c/examples/c/reuse/braille.utf32.txt
/usr/share/doc/re2c/examples/c/reuse/braille.utf8.txt
/usr/share/doc/re2c/examples/c/reuse/reuse.c
/usr/share/doc/re2c/examples/c/reuse/reuse.re
/usr/share/doc/re2c/examples/c/state
/usr/share/doc/re2c/examples/c/state/push.c
/usr/share/doc/re2c/examples/c/state/push.re
/usr/share/doc/re2c/examples/c/submatch
/usr/share/doc/re2c/examples/c/submatch/01_stags.c
/usr/share/doc/re2c/examples/c/submatch/01_stags.re
/usr/share/doc/re2c/examples/c/submatch/01_stags_fill.c
/usr/share/doc/re2c/examples/c/submatch/01_stags_fill.re
/usr/share/doc/re2c/examples/c/submatch/02_mtags.c
/usr/share/doc/re2c/examples/c/submatch/02_mtags.re
/usr/share/doc/re2c/examples/c/submatch/03_posix.c
/usr/share/doc/re2c/examples/c/submatch/03_posix.re
/usr/share/doc/re2c/examples/c/submatch/http_rfc7230.c
/usr/share/doc/re2c/examples/c/submatch/http_rfc7230.re
/usr/share/doc/re2c/examples/c/submatch/parse_etc_passwd.c
/usr/share/doc/re2c/examples/c/submatch/parse_etc_passwd.re
/usr/share/doc/re2c/examples/c/submatch/parse_options.c
/usr/share/doc/re2c/examples/c/submatch/parse_options.re
/usr/share/doc/re2c/examples/c/submatch/parse_records.c
/usr/share/doc/re2c/examples/c/submatch/parse_records.re
/usr/share/doc/re2c/examples/c/submatch/uri_rfc3986.c
/usr/share/doc/re2c/examples/c/submatch/uri_rfc3986.re
/usr/share/doc/re2c/examples/go
/usr/share/doc/re2c/examples/go/01_basic.go
/usr/share/doc/re2c/examples/go/01_basic.re
/usr/share/doc/re2c/examples/go/__run_all.sh
/usr/share/doc/re2c/examples/go/conditions
/usr/share/doc/re2c/examples/go/conditions/parse_u32_blocks.go
/usr/share/doc/re2c/examples/go/conditions/parse_u32_blocks.re
/usr/share/doc/re2c/examples/go/conditions/parse_u32_conditions.go
/usr/share/doc/re2c/examples/go/conditions/parse_u32_conditions.re
/usr/share/doc/re2c/examples/go/encodings
/usr/share/doc/re2c/examples/go/encodings/unicode_identifier.go
/usr/share/doc/re2c/examples/go/encodings/unicode_identifier.re
/usr/share/doc/re2c/examples/go/eof
/usr/share/doc/re2c/examples/go/eof/01_sentinel.go
/usr/share/doc/re2c/examples/go/eof/01_sentinel.re
/usr/share/doc/re2c/examples/go/eof/02_bounds_checking.go
/usr/share/doc/re2c/examples/go/eof/02_bounds_checking.re
/usr/share/doc/re2c/examples/go/eof/03_eof_rule.go
/usr/share/doc/re2c/examples/go/eof/03_eof_rule.re
/usr/share/doc/re2c/examples/go/eof/04_generic_api_sentinel.go
/usr/share/doc/re2c/examples/go/eof/04_generic_api_sentinel.re
/usr/share/doc/re2c/examples/go/eof/05_generic_api_eof_rule.go
/usr/share/doc/re2c/examples/go/eof/05_generic_api_eof_rule.re
/usr/share/doc/re2c/examples/go/fill
/usr/share/doc/re2c/examples/go/fill/01_fill.go
/usr/share/doc/re2c/examples/go/fill/01_fill.re
/usr/share/doc/re2c/examples/go/fill/02_fill.go
/usr/share/doc/re2c/examples/go/fill/02_fill.re
/usr/share/doc/re2c/examples/go/headers
/usr/share/doc/re2c/examples/go/headers/header.go
/usr/share/doc/re2c/examples/go/headers/header.re
/usr/share/doc/re2c/examples/go/headers/src
/usr/share/doc/re2c/examples/go/headers/src/lexer
/usr/share/doc/re2c/examples/go/headers/src/lexer/lexer.go
/usr/share/doc/re2c/examples/go/includes
/usr/share/doc/re2c/examples/go/includes/definitions.go
/usr/share/doc/re2c/examples/go/includes/include.go
/usr/share/doc/re2c/examples/go/includes/include.re
/usr/share/doc/re2c/examples/go/reuse
/usr/share/doc/re2c/examples/go/reuse/reuse.go
/usr/share/doc/re2c/examples/go/reuse/reuse.re
/usr/share/doc/re2c/examples/go/state
/usr/share/doc/re2c/examples/go/state/push.go
/usr/share/doc/re2c/examples/go/state/push.re
/usr/share/doc/re2c/examples/go/submatch
/usr/share/doc/re2c/examples/go/submatch/01_stags.go
/usr/share/doc/re2c/examples/go/submatch/01_stags.re
/usr/share/doc/re2c/examples/go/submatch/01_stags_fill.go
/usr/share/doc/re2c/examples/go/submatch/01_stags_fill.re
/usr/share/doc/re2c/examples/go/submatch/02_mtags.go
/usr/share/doc/re2c/examples/go/submatch/02_mtags.re
/usr/share/doc/re2c/examples/go/submatch/03_posix.go
/usr/share/doc/re2c/examples/go/submatch/03_posix.re
/usr/share/doc/re2c/help.rst
/usr/share/doc/re2c/help.rst.in
/usr/share/doc/re2c/manpage.rst
/usr/share/doc/re2c/manpage.rst.in
/usr/share/doc/re2c/manual
/usr/share/doc/re2c/manual/api
/usr/share/doc/re2c/manual/api/api.rst_
/usr/share/doc/re2c/manual/api/interface.rst_
/usr/share/doc/re2c/manual/conditions
/usr/share/doc/re2c/manual/conditions/conditions.rst_
/usr/share/doc/re2c/manual/configurations
/usr/share/doc/re2c/manual/configurations/configurations.rst_
/usr/share/doc/re2c/manual/directives
/usr/share/doc/re2c/manual/directives/directives.rst_
/usr/share/doc/re2c/manual/dot
/usr/share/doc/re2c/manual/dot/dot.rst_
/usr/share/doc/re2c/manual/encodings
/usr/share/doc/re2c/manual/encodings/encodings.rst_
/usr/share/doc/re2c/manual/eof
/usr/share/doc/re2c/manual/eof/01_sentinel.rst_
/usr/share/doc/re2c/manual/eof/02_bounds_checking.rst_
/usr/share/doc/re2c/manual/eof/03_eof_rule.rst_
/usr/share/doc/re2c/manual/eof/04_generic_api.rst_
/usr/share/doc/re2c/manual/eof/eof.rst_
/usr/share/doc/re2c/manual/fill
/usr/share/doc/re2c/manual/fill/01_fill.rst_
/usr/share/doc/re2c/manual/fill/02_fill.rst_
/usr/share/doc/re2c/manual/fill/fill.rst_
/usr/share/doc/re2c/manual/headers
/usr/share/doc/re2c/manual/headers/headers.rst_
/usr/share/doc/re2c/manual/includes
/usr/share/doc/re2c/manual/includes/includes.rst_
/usr/share/doc/re2c/manual/options
/usr/share/doc/re2c/manual/options/debug.rst_
/usr/share/doc/re2c/manual/options/internal.rst_
/usr/share/doc/re2c/manual/options/options.rst_
/usr/share/doc/re2c/manual/regexps
/usr/share/doc/re2c/manual/regexps/regular_expressions.rst_
/usr/share/doc/re2c/manual/reuse
/usr/share/doc/re2c/manual/reuse/reuse.rst_
/usr/share/doc/re2c/manual/skeleton
/usr/share/doc/re2c/manual/skeleton/skeleton.rst_
/usr/share/doc/re2c/manual/state
/usr/share/doc/re2c/manual/state/state.rst_
/usr/share/doc/re2c/manual/submatch
/usr/share/doc/re2c/manual/submatch/submatch.rst_
/usr/share/doc/re2c/manual/submatch/submatch_example_mtags.rst_
/usr/share/doc/re2c/manual/submatch/submatch_example_posix.rst_
/usr/share/doc/re2c/manual/submatch/submatch_example_stags.rst_
/usr/share/doc/re2c/manual/submatch/submatch_example_stags_fill.rst_
/usr/share/doc/re2c/manual/syntax
/usr/share/doc/re2c/manual/syntax/syntax.rst_
/usr/share/doc/re2c/manual/warnings
/usr/share/doc/re2c/manual/warnings/warnings_general.rst_
/usr/share/doc/re2c/manual/warnings/warnings_list.rst_
/usr/share/doc/re2c/re2c.1
/usr/share/doc/re2c/re2go.1
/usr/share/licenses/re2c
/usr/share/licenses/re2c/LICENSE
/usr/share/man/man1/re2c.1.gz
/usr/share/man/man1/re2go.1.gz
/usr/share/re2c
/usr/share/re2c/stdlib
/usr/share/re2c/stdlib/unicode_categories.re

References

Summary

In this tutorial we learn how to install re2c on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).