jaskell.parsec.common.Space 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 jaskell.parsec.ParsecException;
import java.io.EOFException;
/**
* Created by Mars Liu on 2016-01-07.
* Space 匹配空格
*/
public class Space
implements Parsec {
@Override
public Character parse(State s)
throws EOFException, ParsecException {
Character re = s.next();
if (Character.isSpaceChar(re)) {
return re;
} else {
String message = String.format("Expect %c is space.", re);
throw s.trap(message);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy