Ram Maheshwari Logo Image
Yared Fikremariam

Regular Expression Engine

A Regular expression interpreter that takes in an input string, a regex string and performs series of reductions

Project Image

Project Overview

This project implements algorithms that work with regular expressions, NFAs and DFAs. It works by converting the input regular expression to Non-Deterministic Finite Automata (NFA) then the NFA is converted to a Deterministic Automata (DFA) using the subset construction and the DFA and checked with the input string to see if it is matched.

The interpreter is assembled from three parts. The first part simulates an NFA, part two implements an NFA to DFA converter and the last part converts a regular expression to an NFA.

Features

- Regular Expression to NFA converter
- NFA to DFA converter
- Accept function that runs DFA on the input string to check if its matched

Tools Used

OCaml