How To Install byaccj on CentOS 7

In this tutorial we learn how to install byaccj on CentOS 7. byaccj is Parser Generator with Java Extension

Introduction

In this tutorial we learn how to install byaccj on CentOS 7.

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 CentOS 7. In this tutorial we discuss both methods but you only need to choose one of method to install byaccj.

Install byaccj on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install byaccj

Install byaccj on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install byaccj

How To Uninstall byaccj on CentOS 7

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

sudo dnf remove byaccj

References

Summary

In this tutorial we learn how to install byaccj on CentOS 7 using yum and dnf.