Search in sources :

Example 1 with SubstringAtom

use of org.apache.stanbol.rules.manager.atoms.SubstringAtom in project stanbol by apache.

the class RuleParserImpl method substringAtom.

public final SubstringAtom substringAtom() throws ParseException {
    StringFunctionAtom arg;
    NumericFunctionAtom start;
    NumericFunctionAtom length;
    jj_consume_token(SUBSTRING);
    jj_consume_token(LPAR);
    arg = stringFunctionAtom();
    jj_consume_token(COMMA);
    start = numericFunctionAtom();
    jj_consume_token(COMMA);
    length = numericFunctionAtom();
    jj_consume_token(RPAR);
    {
        if (true)
            return new SubstringAtom(arg, start, length);
    }
    throw new Error("Missing return statement in function");
}
Also used : StringFunctionAtom(org.apache.stanbol.rules.manager.atoms.StringFunctionAtom) NumericFunctionAtom(org.apache.stanbol.rules.manager.atoms.NumericFunctionAtom) SubstringAtom(org.apache.stanbol.rules.manager.atoms.SubstringAtom)

Aggregations

NumericFunctionAtom (org.apache.stanbol.rules.manager.atoms.NumericFunctionAtom)1 StringFunctionAtom (org.apache.stanbol.rules.manager.atoms.StringFunctionAtom)1 SubstringAtom (org.apache.stanbol.rules.manager.atoms.SubstringAtom)1