Package org.antlr.stringtemplate

Examples of org.antlr.stringtemplate.CommonGroupLoader


  static public boolean m_renderHeaderAndFooter = true;
 
  public VoiceXMLSpeechPageWriter()
  {
    //our stringtemplate template files are in our jar file
    CommonGroupLoader loader = new CommonGroupLoader("org/speakright/core/render/voicexml/templates", this);
    m_templateGroup = loader.loadGroup("speakright"); //load speakright.stg   
  }
View Full Code Here


  PromptValue m_mostRecentParent = null;
 
  public String generateBaseClass(String sroName, String packageName, String xmlPath)
  {
    //our stringtemplate template files are in our jar file
    CommonGroupLoader loader = new CommonGroupLoader("org/speakright/tools/srogen/templates", this);
    StringTemplateGroup group = loader.loadGroup("srogen"); //load mgen.stg   
   
    StringTemplate t = group.getInstanceOf("genclass");
    t.setAttribute("package", packageName + ".gen");
//    String sroName = "SRONumber";
    t.setAttribute("sroName", sroName);
View Full Code Here

 
  public String generatePromptsXML(String sroName, String xmlPath)
  {
    //our stringtemplate template files are in our jar file
    CommonGroupLoader loader = new CommonGroupLoader("org/speakright/tools/srogen/templates", this);
    StringTemplateGroup group = loader.loadGroup("srogen"); //load mgen.stg   
   
    StringTemplate t = group.getInstanceOf("genxml");
    t.setAttribute("sroName", sroName);
   
    ArrayList<PromptValue> promptL = readPrompts(xmlPath);
View Full Code Here

//    StringTemplate hello = new StringTemplate("Hello, $name$");
//    hello.setAttribute("name", "World");
//    log(hello.toString());

    //our stringtemplate template files are in our jar file
    CommonGroupLoader loader = new CommonGroupLoader("org/speakright/tools/mgen/templates", this);
    StringTemplateGroup group = loader.loadGroup("mgen"); //load mgen.stg   
   
    StringTemplate t = group.getInstanceOf("modelclass");
    t.setAttribute("package", packageName);
    t.setAttribute("className", "Model");
   
View Full Code Here

      junitFileName = "Test"+grammarInfo.getGrammarName();
    }
    String lexerName = grammarInfo.getGrammarName()+"Lexer";
    String parserName = grammarInfo.getGrammarName()+"Parser";
   
    StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
    StringTemplateGroup.registerGroupLoader(loader);
    StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
    StringBuffer buf = compileToBuffer(junitFileName, lexerName, parserName);
    writeTestFile(".", junitFileName+".java", buf.toString());
  }
View Full Code Here

        }
    return testResultST.toString();
  }
 
  private StringTemplateGroup getTemplateGroup() {
    StringTemplateGroupLoader loader = new CommonGroupLoader("org/antlr/gunit", null);
    StringTemplateGroup.registerGroupLoader(loader);
    StringTemplateGroup.registerDefaultLexer(AngleBracketTemplateLexer.class);
    StringTemplateGroup group = StringTemplateGroup.loadGroup("gUnitTestResult");
    return group;
  }
View Full Code Here

TOP

Related Classes of org.antlr.stringtemplate.CommonGroupLoader

Copyright © 2018 www.massapicom. 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.