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

org.vesalainen.grammar.math.MathExpressionParserFactory Maven / Gradle / Ivy

Go to download

Java Lookahead Parser Generator. Generator produces LALR(k) parsers. Grammar rules are entered using annotations. Rule annotation can be attached to reducer method, which keeps rule and it's action together.

The newest version!
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package org.vesalainen.grammar.math;

/**
 *
 * @author tkv
 */
public class MathExpressionParserFactory
{
    public static final String MathExpressionParserClass = "org.vesalainen.grammar.impl.MathExpressionParserImpl";
    
    public static  MathExpressionParserIntf getInstance()
    {
        try
        {
            Class cls = Class.forName(MathExpressionParserClass);
            return (MathExpressionParserIntf) cls.newInstance();
        }
        catch (ClassNotFoundException | InstantiationException | IllegalAccessException ex)
        {
            throw new IllegalArgumentException(ex);
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy