All Downloads are FREE. Search and download functionalities are using the official Maven repository.

jaskell.expression.parser.N Maven / Gradle / Ivy

Go to download

This is a utils library for java 8 project. It include parsec combinators and sql generators library.

There is a newer version: 2.9.2
Show newest version
package jaskell.expression.parser;

import jaskell.expression.Expression;
import jaskell.expression.Number;
import jaskell.parsec.ParsecException;
import jaskell.parsec.common.Parsec;
import jaskell.parsec.common.ScNumber;
import jaskell.parsec.common.State;

import java.io.EOFException;


/**
 * TODO
 *
 * @author mars
 * @version 1.0.0
 * @since 2020/06/04 10:53
 */
public class N implements Parsec {
  private final Parsec number = new ScNumber();
  @Override
  public Number parse(State s) throws EOFException, ParsecException {
    String re = number.parse(s);
    return new Number(Double.parseDouble(re));
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy