org.antlr.gunit
Class JUnitCodeGen
java.lang.Object
org.antlr.gunit.JUnitCodeGen
public class JUnitCodeGen
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
grammarInfo
public GrammarInfo grammarInfo
ruleWithReturn
public Map<String,String> ruleWithReturn
JUnitCodeGen
public JUnitCodeGen(GrammarInfo grammarInfo,
String testsuiteDir)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
JUnitCodeGen
public JUnitCodeGen(GrammarInfo grammarInfo,
ClassLoader classLoader,
String testsuiteDir)
throws ClassNotFoundException
- Throws:
ClassNotFoundException
getOutputDirectoryPath
public String getOutputDirectoryPath()
setOutputDirectoryPath
public void setOutputDirectoryPath(String outputDirectoryPath)
compile
public void compile()
throws IOException
- Throws:
IOException
compileToBuffer
public StringBuffer compileToBuffer(String className,
String lexerName,
String parserName)
genClassHeader
protected String genClassHeader(org.antlr.stringtemplate.StringTemplateGroup group,
String junitFileName,
String lexerName,
String parserName)
genTestRuleMethods
protected String genTestRuleMethods(org.antlr.stringtemplate.StringTemplateGroup group)
getTypeString
public String getTypeString(int type)
writeTestFile
protected void writeTestFile(String dir,
String fileName,
String content)
escapeForJava
public static String escapeForJava(String inputString)
changeFirstCapital
protected String changeFirstCapital(String ruleName)
normalizeTreeSpec
public static String normalizeTreeSpec(String t)
Copyright © 2011. All Rights Reserved.