Skip to content

rniczh/reviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

reviz

reviz is the regular expression visualize program. (re -> nfa -> dfa -> dfa_opt)

The html for demo(build by webassembly): DEMO

Syntax

It's support gramar as shown below:

cons:
AB

alter:
A|B

kleene
A*

positive:
A+

optional:
A?

bracket:
(A)

and characters:

_ : epsilon character

<0-9> <a-z> <A-Z> : alphanumeric character

Usage

Just Enter :

./reviz 'a(b|c)*'

It will generate nfa.dot, dfa.dot, opt.dot files

Or Enter :

./reviz_dot 'a(b|c)*'

It will convert these .dot file into .png file, however, you need to ensure that you have dot program already, if not, you can install graphviz by using pacman, apt ... etc.

Install

Dependencies:

GNU Make, GCC

$ make

and you will see two executable be generated under program root directory: reviz reviz_dot

Example

./reviz 'a(b|c)*'

DFA:
dfa

Optimized DFA:
opt

About

regular expression visualizer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published