A DFA/NFA library that is fast and easy to use
With pocorall.automaton, you can do:
- Search multiple strings super fast (see benchmark)
The pocorall.automaton library is forked from dk.brics.automaton. We extended the original code as following ways:
In conventional state machine, each state has a boolean property that specifies whether it is acceptable or not. However, in many contexts, we need to bound an object which describes extra informations about the state. In this library, a state object is received for every matching:
AutomatonMatcher matcher = ...; Object stateObj = matcher.find();
The find() method returns null when no matches are found.
Include these repository and dependency descriptions into your pom.
<repositories> <repository> <id>automaton-github</id> <url>https://raw.github.com/pocorall/automaton/master/mvn-repo</url> </repository> </repositories>
<dependencies> <dependency> <groupId>net.pocorall</groupId> <artifactId>automaton</artifactId> <version>2.0</version> </dependency> <dependencies>
Both pocorall.automaton and the original code(dk.brics.automaton) are available under BSD license.
This library is maintained by Sung-Ho Lee
Original code is developed by Anders Møller at Aarhus University, with contributions, suggestions and bug reports from Alexandar Bakic, Jodi Moran, Brandon Lee, David Lutterkort, John Gibson, Alex Meyer, Daniel Lowe, Harald Zauner, Dawid Weiss, Robert Muir, Hans-Martin Adorf, Dale Richardson, Yannick Versley, and Gustaf Lundh.