Skip to content

pocorall/automaton

Repository files navigation

A DFA/NFA library that is fast and easy to use

With pocorall.automaton, you can do:

  • Search multiple strings super fast (see benchmark)

For a quick glance, check out our test cases and javadocs.

The pocorall.automaton library is forked from dk.brics.automaton. We extended the original code as following ways:

State object

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.

Maven artifact

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>

License

Both pocorall.automaton and the original code(dk.brics.automaton) are available under BSD license.

Contributors

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.

About

A DFA/NFA library that is fast and easy to use

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published