A Converter from Regex to DFA Graph(using graphviz-kotlin)
Initially be designed for helping me to complete my assignments of Principles of Compilation
- build using
Gradle
./gradlew build
then you can use build/libs/Regex2Graph-fat-1.0-SNAPSHOT.jar
directly.
java -jar build/libs/Regex2Graph-fat-1.0-SNAPSHOT.jar [-o <output svg filename>]
Then it can translate Regex from stdin to .svg
file.
- Only 1 regex(in first line) can be process.
- Doesn't have Syntax Check to Regex input.
- Only
Concat
,Or
,Brackets
,Question mark
andKleene star
can be process. - In output, it doesn't merge ranges, so the graph may be a little complicated.