jaskell.parsec.common.EndOfLine 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.common;
import static jaskell.parsec.common.Txt.text;
import jaskell.parsec.ParsecException;
import java.io.EOFException;
/**
* Created by zhaonf on 16/1/10.
* EndOfLine 尝试匹配 \r\n 或 \n
*/
public class EndOfLine
implements Parsec {
private final Parsec parsec =
new Choice<>(new Text("\n"), new Text("\r\n"));
@Override
public String parse(State s)
throws EOFException, ParsecException {
return parsec.parse(s);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy