NFA implementation

Implementation and example.