Parser parser = new Parser(result.toString(),registry); parser.registerPrefixMap(prefixes); parser.addRulesPreload(preloadedRules);
Parser parser = new Parser(result.toString(),registry); parser.registerPrefixMap(prefixes); parser.addRulesPreload(preloadedRules);
/** * Parse a string as a rule using a specified BuiltinRegistry to resolve functor names * * @param source the source string for the rule * @param registry the BuiltinRegistry used to resolve functor names * @throws ParserException if there is a problem */ public static Rule parseRule(String source,BuiltinRegistry registry) throws ParserException { Parser parser = new Parser(source,registry); return parser.parseRule(); }
/** * Parse a string as a list a rules. * @return a list of rules * @throws ParserException if there is a problem */ public static List<Rule> parseRules(String source,BuiltinRegistry registry) throws ParserException { return parseRules(new Parser(source,registry)); }
/** * Parse a string as a list a rules. * @return a list of rules * @throws ParserException if there is a problem */ public static List<Rule> parseRules(String source,BuiltinRegistry registry) throws ParserException { return parseRules(new Parser(source,registry)); }
/** * Parse a string as a rule using a specified BuiltinRegistry to resolve functor names * * @param source the source string for the rule * @param registry the BuiltinRegistry used to resolve functor names * @throws ParserException if there is a problem */ public static Rule parseRule(String source,BuiltinRegistry registry) throws ParserException { Parser parser = new Parser(source,registry); return parser.parseRule(); }