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

jscl.text.VariableParser Maven / Gradle / Ivy

There is a newer version: 1.0.11
Show newest version
package jscl.text;

import jscl.math.Generic;
import jscl.math.Variable;

import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class VariableParser implements Parser {

	public static final Parser parser = new VariableParser();

	private final static List> parsers = Arrays.asList(
			OperatorParser.parser,
			FunctionParser.parser,
			ConstantParser.parser);

	private final static MultiTryParser internalParser = new MultiTryParser(new ArrayList>(parsers));

	private VariableParser() {
	}

	public Variable parse(@Nonnull Parameters p, Generic previousSumElement) throws ParseException {
		return internalParser.parse(p, previousSumElement);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy