Examples of JSGFRuleGrammar


Examples of edu.cmu.sphinx.jsgf.JSGFRuleGrammar

    /**
     * newGrammarFromJSGF - Once JavaCC supports Readers we will change this
     */
    public static JSGFRuleGrammar newGrammarFromJSGF(InputStream i, JSGFRuleGrammarFactory factory) throws JSGFGrammarParseException
    {
        JSGFRuleGrammar grammar = null;
        if (parser == null) {
            parser = new JSGFParser(i);
        } else {
            parser.ReInit(i);
        }
View Full Code Here

Examples of edu.cmu.sphinx.jsgf.JSGFRuleGrammar

    /**
     * newGrammarFromJSGF - Once JavaCC supports Readers we will change this
     */
    public static JSGFRuleGrammar newGrammarFromJSGF(Reader i, JSGFRuleGrammarFactory factory) throws JSGFGrammarParseException
    {
        JSGFRuleGrammar grammar = null;
        if (parser == null) {
            parser = new JSGFParser(i);
        } else {
            parser.ReInit(i);
        }
View Full Code Here

Examples of edu.cmu.sphinx.jsgf.JSGFRuleGrammar

        }
    }

  @SuppressWarnings("unused")
final public JSGFRuleGrammar GrammarUnit(JSGFRuleGrammarFactory factory) throws ParseException {
    JSGFRuleGrammar grammar = null;
    switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
    case IDENTIFIER:
      IdentHeader();
      break;
    default:
View Full Code Here

Examples of edu.cmu.sphinx.jsgf.JSGFRuleGrammar

  }

  @SuppressWarnings("unused")
final public JSGFRuleGrammar GrammarDeclaration(JSGFRuleGrammarFactory factory) throws ParseException {
    String s;
    JSGFRuleGrammar grammar = null;
    Token t = null;
    t = jj_consume_token(GRAMMAR);
    s = Name();
    jj_consume_token(26);
        grammar = factory.newGrammar (s);
        if (grammar != null && t != null && t.specialToken != null) {
            if (t.specialToken.image != null && t.specialToken.image.startsWith("/**")) {
                JSGFRuleGrammar JG = grammar;
                JG.addGrammarDocComment(t.specialToken.image);
            }
        }
        {if (true) return grammar;}
    throw new Error("Missing return statement in function");
  }
View Full Code Here

Examples of edu.cmu.sphinx.jsgf.JSGFRuleGrammar

        JSGFRuleName r = new JSGFRuleName(name);
        if (grammar != null) {
            grammar.addImport(r);
            if (grammar instanceof JSGFRuleGrammar && t != null && t.specialToken != null) {
                if (t.specialToken.image != null && t.specialToken.image.startsWith("/**")) {
                    JSGFRuleGrammar JG = grammar;
                    JG.addImportDocComment(r, t.specialToken.image);
                }
            }
        }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.