How To Install jflex on Fedora 34

jflex is Fast Scanner Generator

Introduction

In this tutorial we learn how to install jflex on Fedora 34.

What is jflex

JFlex is a lexical analyzer generator (also known as scanner generator) for Java, written in Java. It is also a rewrite of the very useful tool JLex which was developed by Elliot Berk at Princeton University. As Vern Paxson states for his C/C++ tool flex not share any code though. JFlex is designed to work together with the LALR parser generator CUP by Scott Hudson, and the Java modification of Berkeley Yacc BYacc/J by Bob Jamison. It can also be used together with other parser generators like ANTLR or as a standalone tool.

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

Install jflex on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo dnf -y install jflex

Install jflex on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

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

sudo yum -y install jflex

How To Uninstall jflex on Fedora 34

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

sudo dnf remove jflex

jflex Package Contents on Fedora 34

/usr/bin/jflex
/usr/share/applications/jflex.desktop
/usr/share/doc/jflex
/usr/share/doc/jflex/COPYRIGHT
/usr/share/doc/jflex/doc
/usr/share/doc/jflex/doc/._manual.pdf
/usr/share/doc/jflex/doc/COPYRIGHT
/usr/share/doc/jflex/doc/fig
/usr/share/doc/jflex/doc/fig/jflex-black.png
/usr/share/doc/jflex/doc/manual.css
/usr/share/doc/jflex/doc/manual.html
/usr/share/doc/jflex/doc/manual.pdf
/usr/share/emacs/site-lisp/jflex
/usr/share/emacs/site-lisp/jflex/jflex-mode.el
/usr/share/emacs/site-lisp/jflex/jflex-mode.elc
/usr/share/java/jflex.jar
/usr/share/man/man1/jflex.1.gz
/usr/share/maven-metadata/jflex.xml
/usr/share/maven-poms/jflex.pom
/usr/share/pixmaps/jflex.png

References

Summary

In this tutorial we learn how to install jflex on Fedora 34 using yum and dnf.