/** * Load named grammar from import rule * * @param grammarName * @return already loaded grammar * @throws JSGFGrammarParseException * @throws IOException */ private JSGFRuleGrammar LoadNamedGrammar(String grammarName) { var url = GrammarNameToUrl(BaseUrl, grammarName); JSGFRuleGrammar ruleGrammar = JSGFParser.NewGrammarFromJSGF(url, new JSGFRuleGrammarFactory(Manager)); ruleGrammar.SetEnabled(true); return(ruleGrammar); }
private JSGFRuleGrammar loadNamedGrammar(string text) { URL url = JSGFGrammar.grammarNameToURL(this.baseURL, text); URL url2 = url; JSGFRuleGrammar jsgfruleGrammar = JSGFParser.newGrammarFromJSGF(url2, new JSGFRuleGrammarFactory(this.manager)); jsgfruleGrammar.setEnabled(true); return(jsgfruleGrammar); }