jaskell.parsec.Eof 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.io.EOFException;
/**
* Created by Mars Liu on 2016-01-02.
* Eof 期待 state 的 next 操作取到 eof 状态.
*/
public class Eof implements Parsec {
@Override
public E parse(State s) throws EOFException, ParsecException {
try{
E re = s.next();
String message = String.format("Expect eof but %s", re);
throw s.trap(message);
} catch (EOFException e) {
return null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy