jakesgordon / javascript-state-machine

A javascript finite state machine library
MIT License
8.69k stars 964 forks source link

LL/LR DFAs/NFAs #155

Open Berkmann18 opened 6 years ago

Berkmann18 commented 6 years ago

So far I managed to get it generate the dot code for a simple NFA (in LL(0) say) but the problem is that there's no way to specify accepting states (using the "terminal" field doesn't to help). Usually that is done by changing the shape of a node (in dot/graphviz) to "doublecircle".

Also, I don't know if this library was intended to cover that, but it seems impossible to model LR state machines (so square nodes for terminals, circles for LR items and double circles for accepting states).