jaskell.parsec.Atom Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaskell-java8 Show documentation
Show all versions of jaskell-java8 Show documentation
This is a utils library for java 8 project.
It include parsec combinators and sql generators library.
package jaskell.parsec;
import java.util.Set;
/**
* Created by march on 16/9/12.
* static util class for atom parsers.
*/
public class Atom {
public static Parsec one() {
return new One<>();
}
public static > Parsec eof() {
return new Eof<>();
}
public static Return pack(T value) {
return new Return<>(value);
}
public static Fail fail(String message, Object...objects) {
return new Fail<>(message, objects);
}
public static Eq eq(E item) {
return new Eq<>(item);
}
public static Ne ne(E item) {
return new Ne<>(item);
}
public static OneOf oneOf(Set data) {
return new OneOf<>(data);
}
public static NoneOf noneOf(Set data) {
return new NoneOf<>(data);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy