public class JUnitCodeGen extends Object
| Modifier and Type | Field and Description |
|---|---|
GrammarInfo |
grammarInfo |
Map<String,String> |
ruleWithReturn |
| Constructor and Description |
|---|
JUnitCodeGen(GrammarInfo grammarInfo,
ClassLoader classLoader,
String testsuiteDir) |
JUnitCodeGen(GrammarInfo grammarInfo,
String testsuiteDir) |
| Modifier and Type | Method and Description |
|---|---|
protected String |
changeFirstCapital(String ruleName) |
void |
compile() |
StringBuffer |
compileToBuffer(String className,
String lexerName,
String parserName) |
static String |
escapeForJava(String inputString) |
protected String |
genClassHeader(org.antlr.stringtemplate.StringTemplateGroup group,
String junitFileName,
String lexerName,
String parserName) |
protected String |
genTestRuleMethods(org.antlr.stringtemplate.StringTemplateGroup group) |
String |
getOutputDirectoryPath() |
String |
getTypeString(int type) |
static String |
normalizeTreeSpec(String t) |
void |
setOutputDirectoryPath(String outputDirectoryPath) |
protected void |
writeTestFile(String dir,
String fileName,
String content) |
public GrammarInfo grammarInfo
public JUnitCodeGen(GrammarInfo grammarInfo, String testsuiteDir) throws ClassNotFoundException
ClassNotFoundExceptionpublic JUnitCodeGen(GrammarInfo grammarInfo, ClassLoader classLoader, String testsuiteDir) throws ClassNotFoundException
ClassNotFoundExceptionpublic String getOutputDirectoryPath()
public void setOutputDirectoryPath(String outputDirectoryPath)
public void compile()
throws IOException
IOExceptionpublic StringBuffer compileToBuffer(String className, String lexerName, String parserName)
protected String genClassHeader(org.antlr.stringtemplate.StringTemplateGroup group, String junitFileName, String lexerName, String parserName)
protected String genTestRuleMethods(org.antlr.stringtemplate.StringTemplateGroup group)
public String getTypeString(int type)
Copyright © 1992-2013 ANTLR. All Rights Reserved.