jaskell.expression.parser.Q 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.expression.parser;
import jaskell.expression.Expression;
import jaskell.expression.Quote;
import jaskell.parsec.ParsecException;
import jaskell.parsec.common.Parsec;
import jaskell.parsec.common.SkipWhitespaces;
import jaskell.parsec.common.State;
import java.io.EOFException;
import static jaskell.parsec.common.Txt.ch;
import static jaskell.parsec.common.Txt.skipWhiteSpaces;
import static jaskell.parsec.common.Combinator.between;
/**
* TODO
*
* @author mars
* @version 1.0.0
* @since 2020/06/04 11:31
*/
public class Q implements Parsec {
@Override
public Quote parse(State s) throws EOFException, ParsecException {
Parser p = new Parser();
SkipWhitespaces skips = skipWhiteSpaces();
Parsec parser = between(ch('(').then(skips), skips.then(ch(')')), p);
return new Quote(parser.parse(s));
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy