How To Install ml-lpt on Ubuntu 18.04

In this tutorial we learn how to install ml-lpt on Ubuntu 18.04. ml-lpt is SML/NJ language processing tools

Introduction

In this tutorial we learn how to install ml-lpt on Ubuntu 18.04.

What is ml-lpt

ml-lpt is:

Tradition has it that when a new programming language is introduced, new scanner and parser generators are written in that language, and generate code for that language. Traditional also has it that the new tools are modeled after the old lex and yacc tools, both in terms of the algorithms used, and often the syntax as well. The language Standard ML is no exception: ml-lex and ml-yacc are the SML incarnations of the old Unix tools.

This package has two new tools, ml-ulex and ml-antlr, that follow tradition in separating scanning from parsing, but break from tradition in their implementation: ml-ulex is based on regular expression derivatives rather than subset-construction, and ml-antlr is based on LL(k) parsing rather than LALR(1) parsing.

There are three methods to install ml-lpt on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install ml-lpt Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install ml-lpt using apt-get by running the following command:

sudo apt-get -y install ml-lpt

Install ml-lpt Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install ml-lpt using apt by running the following command:

sudo apt -y install ml-lpt

Install ml-lpt Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install ml-lpt using aptitude by running the following command:

sudo aptitude -y install ml-lpt

How To Uninstall ml-lpt on Ubuntu 18.04

To uninstall only the ml-lpt package we can use the following command:

sudo apt-get remove ml-lpt

Uninstall ml-lpt And Its Dependencies

To uninstall ml-lpt and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove ml-lpt

Remove ml-lpt Configurations and Data

To remove ml-lpt configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge ml-lpt

Remove ml-lpt configuration, data, and all of its dependencies

We can use the following command to remove ml-lpt configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge ml-lpt

References

Summary

In this tutorial we learn how to install ml-lpt package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.