Skip to content
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.

edgarogh/automata-to-graphviz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFA description DSL

Examples:

-> 1^b -a> (2)

2 -b> -> (1) -a> 2
2 -a> P
(1) -b> P

-> 1^a,b

Basic syntax

Nodes can be used without explicit declaration.

  • 1, P: basic node

  • (1), (E): acceptor node

  • -> before a node: input "connector" (only one allowed per DFA)

  • -a>, -a,b>: connectors, resp. for labels {a}, and {a,b}

  • 1^a: looping connector (connector for symbol a, from 1 to 1) (shortcut)

  • Enter: new line = new expression with fresh context

Usage

Unix stdin/stdout.

i.e: cargo run < automata.txt

License

By Edgar Onghena dev@edgar.bzh

GPLv3