Skip to content

A Converter from Regex to DFA Graph(using graphviz-kotlin)

Notifications You must be signed in to change notification settings

LeoAlex0/Regex2Graph

Repository files navigation

Regex2Graph

A Converter from Regex to DFA Graph(using graphviz-kotlin)

Initially be designed for helping me to complete my assignments of Principles of Compilation

test

Build

  1. build using Gradle
./gradlew build

then you can use build/libs/Regex2Graph-fat-1.0-SNAPSHOT.jar directly.

Usage

java -jar build/libs/Regex2Graph-fat-1.0-SNAPSHOT.jar [-o <output svg filename>]

Then it can translate Regex from stdin to .svg file.

Limitations

  1. Only 1 regex(in first line) can be process.
  2. Doesn't have Syntax Check to Regex input.
  3. Only Concat,Or,Brackets,Question mark and Kleene star can be process.
  4. In output, it doesn't merge ranges, so the graph may be a little complicated.

About

A Converter from Regex to DFA Graph(using graphviz-kotlin)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages