Skip to content

This repository contains code for converting regular expressions into DFA.

Notifications You must be signed in to change notification settings

johnmaxrin/autoregex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Regular Expression to DFA Conversion

This repository contains code for converting regular expressions into deterministic finite automata (DFA) and using the resulting DFA to match patterns. The algorithm employed in this conversion is based on the well-known "Dragon Book" (Compilers Principles, Techniques and Tool by ALSU).

Overview

This repository provides a C implementation of the regular expression to the DFA conversion process. It allows you to:

  1. Convert regular expressions into equivalent DFAs.
  2. Use the DFA to match patterns against input text efficiently.
  3. Understand and implement the conversion algorithm specified in the "Dragon Book."

How to Use

Clone this repository to your local machine.

git clone https://github.com/yourusername/autoregex.git

Next, Navigate to the project directory.

cd autoregex

Then build executable using

make

Finally! For running the executable

./autoregex

Suported Operations

OR ( | )
Eg: a|b : either a or b can be matched

STAR ( * )
Eg: a* : a, aa, aaa, etc can be matched

WILD (.)
Eg: a.b : acb, atb, etc can be matched

About

This repository contains code for converting regular expressions into DFA.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published