use of edu.princeton.cs.algs4.ST in project antlr4 by antlr.
the class CppTarget method getVisitorFileName.
@Override
public String getVisitorFileName(boolean header) {
assert gen.g.name != null;
ST extST = getTemplates().getInstanceOf(header ? "headerFileExtension" : "codeFileExtension");
String listenerName = gen.g.name + "Visitor";
return listenerName + extST.render();
}
use of edu.princeton.cs.algs4.ST in project antlr4 by antlr.
the class CppTarget method getListenerFileName.
@Override
public String getListenerFileName(boolean header) {
assert gen.g.name != null;
ST extST = getTemplates().getInstanceOf(header ? "headerFileExtension" : "codeFileExtension");
String listenerName = gen.g.name + "Listener";
return listenerName + extST.render();
}
use of edu.princeton.cs.algs4.ST in project antlr4 by antlr.
the class CppTarget method getBaseListenerFileName.
@Override
public String getBaseListenerFileName(boolean header) {
assert gen.g.name != null;
ST extST = getTemplates().getInstanceOf(header ? "headerFileExtension" : "codeFileExtension");
String listenerName = gen.g.name + "BaseListener";
return listenerName + extST.render();
}
use of edu.princeton.cs.algs4.ST in project antlr4 by antlr.
the class Target method getListenerFileName.
/** A given grammar T, return the listener name such as
* TListener.java, if we're using the Java target.
*/
public String getListenerFileName(boolean header) {
assert gen.g.name != null;
ST extST = getTemplates().getInstanceOf("codeFileExtension");
String listenerName = gen.g.name + "Listener";
return listenerName + extST.render();
}
use of edu.princeton.cs.algs4.ST in project antlr4 by antlr.
the class Target method getVisitorFileName.
/** A given grammar T, return the visitor name such as
* TVisitor.java, if we're using the Java target.
*/
public String getVisitorFileName(boolean header) {
assert gen.g.name != null;
ST extST = getTemplates().getInstanceOf("codeFileExtension");
String listenerName = gen.g.name + "Visitor";
return listenerName + extST.render();
}
Aggregations