How To Install byaccj on Fedora 34

byaccj is Parser Generator with Java Extension

Introduction

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

What is byaccj

BYACC/J is an extension of the Berkeley v 1.8 YACC-compatible parser generator. Standard YACC takes a YACC source file, and generates one or more C files from it, which if compiled properly, will produce a LALR-grammar parser. This is useful for expression parsing, interactive command parsing, and file reading. Many megabytes of YACC code have been written over the years. This is the standard YACC tool that is in use every day to produce C/C++ parsers. I have added a “-J” flag which will cause BYACC to generate Java source code, instead. So there finally is a YACC for Java now!

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

Install byaccj 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 byaccj using dnf by running the following command:

sudo dnf -y install byaccj

Install byaccj 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 byaccj using yum by running the following command:

sudo yum -y install byaccj

How To Uninstall byaccj on Fedora 34

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

sudo dnf remove byaccj

byaccj Package Contents on Fedora 34

/usr/bin/byaccj
/usr/lib/.build-id
/usr/lib/.build-id/8d
/usr/lib/.build-id/8d/594ee715c0ca4fbff033a7488ddd076172e33f
/usr/share/doc/byaccj
/usr/share/doc/byaccj/ACKNOWLEDGEMEN
/usr/share/doc/byaccj/README
/usr/share/doc/byaccj/tf.y
/usr/share/doc/byaccj/yacc.cat

References

Summary

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